1 /* 2 * Copyright (C) 2022 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 "accessibility_mt_helper.h" 17 #include "os_account_manager.h" 18 #include "ffrt.h" 19 20 namespace OHOS { 21 namespace AccountSA { 22 const int32_t accountId = 100; 23 QueryActiveOsAccountIds(std::vector<int32_t> & accountIds)24ErrCode OsAccountManager::QueryActiveOsAccountIds(std::vector<int32_t>& accountIds) 25 { 26 accountIds.push_back(accountId); 27 return ERR_OK; 28 } 29 SubscribeOsAccount(const std::shared_ptr<OsAccountSubscriber> & subscriberAccount)30ErrCode OsAccountManager::SubscribeOsAccount(const std::shared_ptr<OsAccountSubscriber>& subscriberAccount) 31 { 32 (void)subscriberAccount; 33 return ERR_OK; 34 } 35 OsAccountSubscriber()36OsAccountSubscriber::OsAccountSubscriber() 37 { 38 } 39 OsAccountSubscriber(const OsAccountSubscribeInfo & subscribeInfo)40OsAccountSubscriber::OsAccountSubscriber(const OsAccountSubscribeInfo &subscribeInfo) : subscribeInfo_(subscribeInfo) 41 { 42 } 43 ~OsAccountSubscriber()44OsAccountSubscriber::~OsAccountSubscriber() 45 { 46 } 47 GetSubscribeInfo(OsAccountSubscribeInfo & info) const48void OsAccountSubscriber::GetSubscribeInfo(OsAccountSubscribeInfo &info) const 49 { 50 info = subscribeInfo_; 51 } 52 OsAccountSubscribeInfo()53OsAccountSubscribeInfo::OsAccountSubscribeInfo() 54 : osAccountSubscribeType_(ACTIVATING), name_("") 55 {} 56 OsAccountSubscribeInfo(const OS_ACCOUNT_SUBSCRIBE_TYPE & osAccountSubscribeType,const std::string & name)57OsAccountSubscribeInfo::OsAccountSubscribeInfo(const OS_ACCOUNT_SUBSCRIBE_TYPE &osAccountSubscribeType, 58 const std::string &name) : osAccountSubscribeType_(osAccountSubscribeType), name_(name) 59 { 60 (void)osAccountSubscribeType; 61 } 62 ~OsAccountSubscribeInfo()63OsAccountSubscribeInfo::~OsAccountSubscribeInfo() 64 {} 65 GetOsAccountSubscribeType(OS_ACCOUNT_SUBSCRIBE_TYPE & subscribetype) const66void OsAccountSubscribeInfo::GetOsAccountSubscribeType(OS_ACCOUNT_SUBSCRIBE_TYPE &subscribetype) const 67 { 68 subscribetype = osAccountSubscribeType_; 69 } 70 SetOsAccountSubscribeType(const OS_ACCOUNT_SUBSCRIBE_TYPE & subscribetype)71void OsAccountSubscribeInfo::SetOsAccountSubscribeType(const OS_ACCOUNT_SUBSCRIBE_TYPE &subscribetype) 72 { 73 osAccountSubscribeType_ = subscribetype; 74 } 75 GetName(std::string & subscribeName) const76void OsAccountSubscribeInfo::GetName(std::string &subscribeName) const 77 { 78 subscribeName = name_; 79 } 80 SetName(const std::string & subscribeName)81void OsAccountSubscribeInfo::SetName(const std::string &subscribeName) 82 { 83 name_ = subscribeName; 84 } 85 Marshalling(Parcel & parcel) const86bool OsAccountSubscribeInfo::Marshalling(Parcel &parcel) const 87 { 88 (void)parcel; 89 return false; 90 } 91 Unmarshalling(Parcel & parcel)92OsAccountSubscribeInfo *OsAccountSubscribeInfo::Unmarshalling(Parcel &parcel) 93 { 94 (void)parcel; 95 return nullptr; 96 } 97 ReadFromParcel(Parcel & parcel)98bool OsAccountSubscribeInfo::ReadFromParcel(Parcel &parcel) 99 { 100 (void)parcel; 101 return false; 102 } 103 } // AccountSA 104 } // OHOS