1 /* 2 * Copyright (c) 2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #include "subscribe_info.h" 17 #include "subscriber.h" 18 #include "common_event_defination.h" 19 20 namespace OHOS::CommonEventManager { 21 // CommonEventSubscribeInfoImpl SetPriority(int32_t & priority)22 void CommonEventSubscribeInfoImpl::SetPriority(int32_t &priority) 23 { 24 return info_->SetPriority(priority); 25 } 26 GetPriority()27 int32_t CommonEventSubscribeInfoImpl::GetPriority() 28 { 29 return info_->GetPriority(); 30 } 31 SetUserId(int32_t & userId)32 void CommonEventSubscribeInfoImpl::SetUserId(int32_t &userId) 33 { 34 return info_->SetUserId(userId); 35 } 36 GetUserId()37 int32_t CommonEventSubscribeInfoImpl::GetUserId() 38 { 39 return info_->GetUserId(); 40 } 41 SetPermission(const std::string & permission)42 void CommonEventSubscribeInfoImpl::SetPermission(const std::string &permission) 43 { 44 return info_->SetPermission(permission); 45 } 46 GetPermission()47 std::string CommonEventSubscribeInfoImpl::GetPermission() 48 { 49 return info_->GetPermission(); 50 } 51 SetDeviceId(const std::string & deviceId)52 void CommonEventSubscribeInfoImpl::SetDeviceId(const std::string &deviceId) 53 { 54 return info_->SetDeviceId(deviceId); 55 } 56 GetDeviceId()57 std::string CommonEventSubscribeInfoImpl::GetDeviceId() 58 { 59 return info_->GetDeviceId(); 60 } 61 SetPublisherBundleName(const std::string & publisherBundleName)62 void CommonEventSubscribeInfoImpl::SetPublisherBundleName(const std::string &publisherBundleName) 63 { 64 return info_->SetPublisherBundleName(publisherBundleName); 65 } 66 GetPublisherBundleName()67 std::string CommonEventSubscribeInfoImpl::GetPublisherBundleName() 68 { 69 return info_->GetPublisherBundleName(); 70 } 71 GetEvents()72 std::vector<std::string> CommonEventSubscribeInfoImpl::GetEvents() 73 { 74 return info_->GetMatchingSkills().GetEvents(); 75 } 76 GetInfoPtr()77 std::shared_ptr<CommonEventSubscribeInfo> CommonEventSubscribeInfoImpl::GetInfoPtr() 78 { 79 return info_; 80 } 81 }