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