1 /*
2  * Copyright (C) 2022-2023 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 "os_account_adapter.h"
17 #include "device_auth.h"
18 #include "device_auth_defines.h"
19 
DevAuthGetRealOsAccountLocalId(int32_t inputId)20 int32_t DevAuthGetRealOsAccountLocalId(int32_t inputId)
21 {
22     return inputId;
23 }
24 
IsOsAccountUnlocked(int32_t osAccountId)25 bool IsOsAccountUnlocked(int32_t osAccountId)
26 {
27     (void)osAccountId;
28     return true;
29 }
30 
AddOsAccountEventCallback(EventCallbackId callbackId,OsAccountCallbackFunc unlockFunc,OsAccountCallbackFunc removeFunc)31 void AddOsAccountEventCallback(EventCallbackId callbackId, OsAccountCallbackFunc unlockFunc,
32     OsAccountCallbackFunc removeFunc)
33 {
34     (void)callbackId;
35     (void)unlockFunc;
36     (void)removeFunc;
37 }
38 
RemoveOsAccountEventCallback(EventCallbackId callbackId)39 void RemoveOsAccountEventCallback(EventCallbackId callbackId)
40 {
41     (void)callbackId;
42 }
43 
InitOsAccountAdapter(void)44 void InitOsAccountAdapter(void) {}
45 
DestroyOsAccountAdapter(void)46 void DestroyOsAccountAdapter(void) {}
47 
GetAllOsAccountIds(int32_t ** osAccountIds,uint32_t * size)48 int32_t GetAllOsAccountIds(int32_t **osAccountIds, uint32_t *size)
49 {
50     (void)osAccountIds;
51     (void)size;
52     return HC_ERR_NOT_SUPPORT;
53 }
54 
IsOsAccountSupported(void)55 bool IsOsAccountSupported(void)
56 {
57     return false;
58 }
59 
GetCurrentActiveOsAccountId(void)60 int32_t GetCurrentActiveOsAccountId(void)
61 {
62     return DEFAULT_OS_ACCOUNT;
63 }