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     (void)inputId;
23     return DEFAULT_OS_ACCOUNT;
24 }
25 
IsOsAccountUnlocked(int32_t osAccountId)26 bool IsOsAccountUnlocked(int32_t osAccountId)
27 {
28     (void)osAccountId;
29     return true;
30 }
31 
AddOsAccountEventCallback(EventCallbackId callbackId,OsAccountCallbackFunc unlockFunc,OsAccountCallbackFunc removeFunc)32 void AddOsAccountEventCallback(EventCallbackId callbackId, OsAccountCallbackFunc unlockFunc,
33     OsAccountCallbackFunc removeFunc)
34 {
35     (void)callbackId;
36     (void)unlockFunc;
37     (void)removeFunc;
38 }
39 
RemoveOsAccountEventCallback(EventCallbackId callbackId)40 void RemoveOsAccountEventCallback(EventCallbackId callbackId)
41 {
42     (void)callbackId;
43 }
44 
InitOsAccountAdapter(void)45 void InitOsAccountAdapter(void) {}
46 
DestroyOsAccountAdapter(void)47 void DestroyOsAccountAdapter(void) {}
48 
GetAllOsAccountIds(int32_t ** osAccountIds,uint32_t * size)49 int32_t GetAllOsAccountIds(int32_t **osAccountIds, uint32_t *size)
50 {
51     (void)osAccountIds;
52     (void)size;
53     return HC_ERR_NOT_SUPPORT;
54 }
55 
IsOsAccountSupported(void)56 bool IsOsAccountSupported(void)
57 {
58     return false;
59 }
60 
GetCurrentActiveOsAccountId(void)61 int32_t GetCurrentActiveOsAccountId(void)
62 {
63     return DEFAULT_OS_ACCOUNT;
64 }