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
NotifyOsAccountUnlocked(int32_t osAccountId)20 void NotifyOsAccountUnlocked(int32_t osAccountId)
21 {
22 (void)osAccountId;
23 }
24
NotifyOsAccountRemoved(int32_t osAccountId)25 void NotifyOsAccountRemoved(int32_t osAccountId)
26 {
27 (void)osAccountId;
28 }
29
DevAuthGetRealOsAccountLocalId(int32_t inputId)30 int32_t DevAuthGetRealOsAccountLocalId(int32_t inputId)
31 {
32 return inputId;
33 }
34
CheckIsForegroundOsAccountId(int32_t inputOsAccountId)35 bool CheckIsForegroundOsAccountId(int32_t inputOsAccountId)
36 {
37 (void)inputOsAccountId;
38 return true;
39 }
40
IsOsAccountUnlocked(int32_t osAccountId)41 bool IsOsAccountUnlocked(int32_t osAccountId)
42 {
43 (void)osAccountId;
44 return true;
45 }
46
AddOsAccountEventCallback(EventCallbackId callbackId,OsAccountCallbackFunc unlockFunc,OsAccountCallbackFunc removeFunc)47 void AddOsAccountEventCallback(EventCallbackId callbackId, OsAccountCallbackFunc unlockFunc,
48 OsAccountCallbackFunc removeFunc)
49 {
50 (void)callbackId;
51 (void)unlockFunc;
52 (void)removeFunc;
53 }
54
RemoveOsAccountEventCallback(EventCallbackId callbackId)55 void RemoveOsAccountEventCallback(EventCallbackId callbackId)
56 {
57 (void)callbackId;
58 }
59
InitOsAccountAdapter(void)60 void InitOsAccountAdapter(void) {}
61
DestroyOsAccountAdapter(void)62 void DestroyOsAccountAdapter(void) {}
63
GetAllOsAccountIds(int32_t ** osAccountIds,uint32_t * size)64 int32_t GetAllOsAccountIds(int32_t **osAccountIds, uint32_t *size)
65 {
66 (void)osAccountIds;
67 (void)size;
68 return HC_ERR_NOT_SUPPORT;
69 }
70
IsOsAccountSupported(void)71 bool IsOsAccountSupported(void)
72 {
73 return false;
74 }
75
GetCurrentActiveOsAccountId(void)76 int32_t GetCurrentActiveOsAccountId(void)
77 {
78 return DEFAULT_OS_ACCOUNT;
79 }