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