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