1 /*
2 * Copyright (c) 2024-2025 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 "auth_session_json_deps_mock.h"
17
18 using namespace testing;
19 using namespace testing::ext;
20
21 namespace OHOS {
22 void *g_authSessionJsonDepsInterface;
AuthSessionJsonDepsInterfaceMock()23 AuthSessionJsonDepsInterfaceMock::AuthSessionJsonDepsInterfaceMock()
24 {
25 g_authSessionJsonDepsInterface = reinterpret_cast<void *>(this);
26 }
27
~AuthSessionJsonDepsInterfaceMock()28 AuthSessionJsonDepsInterfaceMock::~AuthSessionJsonDepsInterfaceMock()
29 {
30 g_authSessionJsonDepsInterface = nullptr;
31 }
32
GetInterface()33 static AuthSessionJsonDepsInterfaceMock *GetInterface()
34 {
35 return reinterpret_cast<AuthSessionJsonDepsInterfaceMock *>(g_authSessionJsonDepsInterface);
36 }
37
38 extern "C" {
JSON_GetStringFromObject(const JsonObj * obj,const char * key,char * value,uint32_t size)39 bool JSON_GetStringFromObject(const JsonObj *obj, const char *key, char *value, uint32_t size)
40 {
41 return GetInterface()->JSON_GetStringFromObject(obj, key, value, size);
42 }
43
JSON_GetInt32FromOject(const JsonObj * obj,const char * key,int32_t * value)44 bool JSON_GetInt32FromOject(const JsonObj *obj, const char *key, int32_t *value)
45 {
46 return GetInterface()->JSON_GetInt32FromOject(obj, key, value);
47 }
48
JSON_GetInt64FromOject(const JsonObj * obj,const char * key,int64_t * value)49 bool JSON_GetInt64FromOject(const JsonObj *obj, const char *key, int64_t *value)
50 {
51 return GetInterface()->JSON_GetInt64FromOject(obj, key, value);
52 }
53
JSON_GetBoolFromOject(const JsonObj * obj,const char * key,bool * value)54 bool JSON_GetBoolFromOject(const JsonObj *obj, const char *key, bool *value)
55 {
56 return GetInterface()->JSON_GetBoolFromOject(obj, key, value);
57 }
58
LnnEncryptAesGcm(AesGcmInputParam * in,int32_t keyIndex,uint8_t ** out,uint32_t * outLen)59 int32_t LnnEncryptAesGcm(AesGcmInputParam *in, int32_t keyIndex, uint8_t **out, uint32_t *outLen)
60 {
61 return GetInterface()->LnnEncryptAesGcm(in, keyIndex, out, outLen);
62 }
63
LnnDecryptAesGcm(AesGcmInputParam * in,uint8_t ** out,uint32_t * outLen)64 int32_t LnnDecryptAesGcm(AesGcmInputParam *in, uint8_t **out, uint32_t *outLen)
65 {
66 return GetInterface()->LnnDecryptAesGcm(in, out, outLen);
67 }
68
JSON_AddStringToObject(JsonObj * obj,const char * key,const char * value)69 bool JSON_AddStringToObject(JsonObj *obj, const char *key, const char *value)
70 {
71 return GetInterface()->JSON_AddStringToObject(obj, key, value);
72 }
73
SoftBusGenerateStrHash(const unsigned char * str,uint32_t len,unsigned char * hash)74 int32_t SoftBusGenerateStrHash(const unsigned char *str, uint32_t len, unsigned char *hash)
75 {
76 return GetInterface()->SoftBusGenerateStrHash(str, len, hash);
77 }
78
ConvertBytesToHexString(char * outBuf,uint32_t outBufLen,const unsigned char * inBuf,uint32_t inLen)79 int32_t ConvertBytesToHexString(char *outBuf, uint32_t outBufLen,
80 const unsigned char *inBuf, uint32_t inLen)
81 {
82 return GetInterface()->ConvertBytesToHexString(outBuf, outBufLen, inBuf, inLen);
83 }
84
LnnGetUdidByBrMac(const char * brMac,char * udid,uint32_t udidLen)85 int32_t LnnGetUdidByBrMac(const char *brMac, char *udid, uint32_t udidLen)
86 {
87 return GetInterface()->LnnGetUdidByBrMac(brMac, udid, udidLen);
88 }
89
AuthFindLatestNormalizeKey(const char * udidHash,AuthDeviceKeyInfo * deviceKey,bool clearOldKey)90 int32_t AuthFindLatestNormalizeKey(const char *udidHash, AuthDeviceKeyInfo *deviceKey, bool clearOldKey)
91 {
92 return GetInterface()->AuthFindLatestNormalizeKey(udidHash, deviceKey, clearOldKey);
93 }
94
AuthFindDeviceKey(const char * udidHash,int32_t keyType,AuthDeviceKeyInfo * deviceKey)95 int32_t AuthFindDeviceKey(const char *udidHash, int32_t keyType, AuthDeviceKeyInfo *deviceKey)
96 {
97 return GetInterface()->AuthFindDeviceKey(udidHash, keyType, deviceKey);
98 }
99
AuthGetLatestIdByUuid(const char * uuid,AuthLinkType type,bool isMeta,AuthHandle * authHandle)100 void AuthGetLatestIdByUuid(const char *uuid, AuthLinkType type, bool isMeta, AuthHandle *authHandle)
101 {
102 return GetInterface()->AuthGetLatestIdByUuid(uuid, type, isMeta, authHandle);
103 }
104
GetAuthManagerByAuthId(int64_t authId)105 AuthManager *GetAuthManagerByAuthId(int64_t authId)
106 {
107 return GetInterface()->GetAuthManagerByAuthId(authId);
108 }
109
GetLatestSessionKey(const SessionKeyList * list,AuthLinkType type,int32_t * index,SessionKey * key)110 int32_t GetLatestSessionKey(const SessionKeyList *list, AuthLinkType type, int32_t *index, SessionKey *key)
111 {
112 return GetInterface()->GetLatestSessionKey(list, type, index, key);
113 }
114
DelDupAuthManager(AuthManager * auth)115 void DelDupAuthManager(AuthManager *auth)
116 {
117 return GetInterface()->DelDupAuthManager(auth);
118 }
119
IsPotentialTrustedDevice(TrustedRelationIdType idType,const char * deviceId,bool isPrecise,bool isPointToPoint)120 bool IsPotentialTrustedDevice(TrustedRelationIdType idType,
121 const char *deviceId, bool isPrecise, bool isPointToPoint)
122 {
123 return GetInterface()->IsPotentialTrustedDevice(idType, deviceId, isPrecise, isPointToPoint);
124 }
125
IsPotentialTrustedDeviceDp(const char * deviceIdHash,bool isPointToPoint)126 bool IsPotentialTrustedDeviceDp(const char *deviceIdHash, bool isPointToPoint)
127 {
128 return GetInterface()->IsPotentialTrustedDeviceDp(deviceIdHash, isPointToPoint);
129 }
130
ConvertBytesToUpperCaseHexString(char * outBuf,uint32_t outBufLen,const unsigned char * inBuf,uint32_t inLen)131 int32_t ConvertBytesToUpperCaseHexString(char *outBuf, uint32_t outBufLen,
132 const unsigned char *inBuf, uint32_t inLen)
133 {
134 return GetInterface()->ConvertBytesToUpperCaseHexString(outBuf, outBufLen, inBuf, inLen);
135 }
136
ConvertHexStringToBytes(unsigned char * outBuf,uint32_t outBufLen,const char * inBuf,uint32_t inLen)137 int32_t ConvertHexStringToBytes(unsigned char *outBuf, uint32_t outBufLen,
138 const char *inBuf, uint32_t inLen)
139 {
140 return GetInterface()->ConvertHexStringToBytes(outBuf, outBufLen, inBuf, inLen);
141 }
142
AuthFindNormalizeKeyByServerSide(const char * udidHash,bool isServer,AuthDeviceKeyInfo * deviceKey)143 int32_t AuthFindNormalizeKeyByServerSide(const char *udidHash, bool isServer, AuthDeviceKeyInfo *deviceKey)
144 {
145 return GetInterface()->AuthFindNormalizeKeyByServerSide(udidHash, isServer, deviceKey);
146 }
147
AuthUpdateCreateTime(const char * udidHash,int32_t keyType,bool isServer)148 void AuthUpdateCreateTime(const char *udidHash, int32_t keyType, bool isServer)
149 {
150 return GetInterface()->AuthUpdateCreateTime(udidHash, keyType, isServer);
151 }
152
IsFeatureSupport(uint64_t feature,FeatureCapability capaBit)153 bool IsFeatureSupport(uint64_t feature, FeatureCapability capaBit)
154 {
155 return GetInterface()->IsFeatureSupport(feature, capaBit);
156 }
157
LnnGetLocalStrInfo(InfoKey key,char * info,uint32_t len)158 int32_t LnnGetLocalStrInfo(InfoKey key, char *info, uint32_t len)
159 {
160 return GetInterface()->LnnGetLocalStrInfo(key, info, len);
161 }
162
IsSupportUDIDAbatement(void)163 bool IsSupportUDIDAbatement(void)
164 {
165 return GetInterface()->IsSupportUDIDAbatement();
166 }
167
JSON_AddBoolToObject(JsonObj * obj,const char * key,bool value)168 bool JSON_AddBoolToObject(JsonObj *obj, const char *key, bool value)
169 {
170 return GetInterface()->JSON_AddBoolToObject(obj, key, value);
171 }
172
IsNeedUDIDAbatement(const AuthSessionInfo * info)173 bool IsNeedUDIDAbatement(const AuthSessionInfo *info)
174 {
175 return GetInterface()->IsNeedUDIDAbatement(info);
176 }
177
JSON_AddInt32ToObject(JsonObj * obj,const char * key,int32_t value)178 bool JSON_AddInt32ToObject(JsonObj *obj, const char *key, int32_t value)
179 {
180 return GetInterface()->JSON_AddInt32ToObject(obj, key, value);
181 }
182
IsSupportFeatureByCapaBit(uint32_t feature,AuthCapability capaBit)183 bool IsSupportFeatureByCapaBit(uint32_t feature, AuthCapability capaBit)
184 {
185 return GetInterface()->IsSupportFeatureByCapaBit(feature, capaBit);
186 }
187
JSON_CreateObject()188 JsonObj *JSON_CreateObject()
189 {
190 return GetInterface()->JSON_CreateObject();
191 }
192
JSON_Delete(JsonObj * obj)193 void JSON_Delete(JsonObj *obj)
194 {
195 return GetInterface()->JSON_Delete(obj);
196 }
197
JSON_Parse(const char * str,uint32_t len)198 JsonObj *JSON_Parse(const char *str, uint32_t len)
199 {
200 return GetInterface()->JSON_Parse(str, len);
201 }
202
LnnGetLocalNodeInfo(void)203 const NodeInfo *LnnGetLocalNodeInfo(void)
204 {
205 return GetInterface()->LnnGetLocalNodeInfo();
206 }
207
JSON_PrintUnformatted(const JsonObj * obj)208 char *JSON_PrintUnformatted(const JsonObj *obj)
209 {
210 return GetInterface()->JSON_PrintUnformatted(obj);
211 }
212
GetFd(uint64_t connId)213 int32_t GetFd(uint64_t connId)
214 {
215 return GetInterface()->GetFd(connId);
216 }
217
SoftBusSocketGetPeerName(int32_t socketFd,SoftBusSockAddr * addr)218 int32_t SoftBusSocketGetPeerName(int32_t socketFd, SoftBusSockAddr *addr)
219 {
220 return GetInterface()->SoftBusSocketGetPeerName(socketFd, addr);
221 }
222
SoftBusInetNtoP(int32_t af,const void * src,char * dst,int32_t size)223 const char *SoftBusInetNtoP(int32_t af, const void *src, char *dst, int32_t size)
224 {
225 return GetInterface()->SoftBusInetNtoP(af, src, dst, size);
226 }
227
GetPeerUdidByNetworkId(const char * networkId,char * udid,uint32_t len)228 int32_t GetPeerUdidByNetworkId(const char *networkId, char *udid, uint32_t len)
229 {
230 return GetInterface()->GetPeerUdidByNetworkId(networkId, udid, len);
231 }
232
GetIsExchangeUdidByNetworkId(const char * networkId,bool * isExchangeUdid)233 int32_t GetIsExchangeUdidByNetworkId(const char *networkId, bool *isExchangeUdid)
234 {
235 return GetInterface()->GetIsExchangeUdidByNetworkId(networkId, isExchangeUdid);
236 }
237
LnnGetUnifiedDeviceName(char * unifiedName,uint32_t len)238 int32_t LnnGetUnifiedDeviceName(char *unifiedName, uint32_t len)
239 {
240 return GetInterface()->LnnGetUnifiedDeviceName(unifiedName, len);
241 }
242
LnnSetLocalStrInfo(InfoKey key,const char * info)243 int32_t LnnSetLocalStrInfo(InfoKey key, const char *info)
244 {
245 return GetInterface()->LnnSetLocalStrInfo(key, info);
246 }
247
GetExtData(char * value,uint32_t len)248 int32_t GetExtData(char *value, uint32_t len)
249 {
250 return GetInterface()->GetExtData(value, len);
251 }
252
AuthMetaGetConnIdByInfo(const AuthConnInfo * connInfo,uint32_t * connectionId)253 int32_t AuthMetaGetConnIdByInfo(const AuthConnInfo *connInfo, uint32_t *connectionId)
254 {
255 return GetInterface()->AuthMetaGetConnIdByInfo(connInfo, connectionId);
256 }
257
LnnGetMetaPtk(uint32_t connId,char * metaPtk,uint32_t len)258 int32_t LnnGetMetaPtk(uint32_t connId, char *metaPtk, uint32_t len)
259 {
260 return GetInterface()->LnnGetMetaPtk(connId, metaPtk, len);
261 }
262
LnnGetLocalPtkByUuid(const char * uuid,char * localPtk,uint32_t len)263 int32_t LnnGetLocalPtkByUuid(const char *uuid, char *localPtk, uint32_t len)
264 {
265 return GetInterface()->LnnGetLocalPtkByUuid(uuid, localPtk, len);
266 }
267
LnnDumpRemotePtk(const char * oldPtk,const char * newPtk,const char * log)268 void LnnDumpRemotePtk(const char *oldPtk, const char *newPtk, const char *log)
269 {
270 return GetInterface()->LnnDumpRemotePtk(oldPtk, newPtk, log);
271 }
272
SoftBusBase64Encode(unsigned char * dst,size_t dlen,size_t * olen,const unsigned char * src,size_t slen)273 int32_t SoftBusBase64Encode(unsigned char *dst, size_t dlen, size_t *olen,
274 const unsigned char *src, size_t slen)
275 {
276 return GetInterface()->SoftBusBase64Encode(dst, dlen, olen, src, slen);
277 }
278
SoftBusBase64Decode(unsigned char * dst,size_t dlen,size_t * olen,const unsigned char * src,size_t slen)279 int32_t SoftBusBase64Decode(unsigned char *dst, size_t dlen, size_t *olen,
280 const unsigned char *src, size_t slen)
281 {
282 return GetInterface()->SoftBusBase64Decode(dst, dlen, olen, src, slen);
283 }
284
LnnUpdateLocalBroadcastCipherKey(BroadcastCipherKey * broadcastKey)285 int32_t LnnUpdateLocalBroadcastCipherKey(BroadcastCipherKey *broadcastKey)
286 {
287 return GetInterface()->LnnUpdateLocalBroadcastCipherKey(broadcastKey);
288 }
289
ProcessCipherKeySyncInfo(const void * json,const char * networkId)290 void ProcessCipherKeySyncInfo(const void *json, const char *networkId)
291 {
292 return GetInterface()->ProcessCipherKeySyncInfo(json, networkId);
293 }
294
LnnHasDiscoveryType(const NodeInfo * info,DiscoveryType type)295 bool LnnHasDiscoveryType(const NodeInfo *info, DiscoveryType type)
296 {
297 return GetInterface()->LnnHasDiscoveryType(info, type);
298 }
299
LnnGetNetworkIdByUuid(const char * uuid,char * buf,uint32_t len)300 int32_t LnnGetNetworkIdByUuid(const char *uuid, char *buf, uint32_t len)
301 {
302 return GetInterface()->LnnGetNetworkIdByUuid(uuid, buf, len);
303 }
304
LnnGetRemoteNumInfo(const char * netWorkId,InfoKey key,int32_t * info)305 int32_t LnnGetRemoteNumInfo(const char *netWorkId, InfoKey key, int32_t *info)
306 {
307 return GetInterface()->LnnGetRemoteNumInfo(netWorkId, key, info);
308 }
309
SoftbusGetConfig(ConfigType type,unsigned char * val,uint32_t len)310 int32_t SoftbusGetConfig(ConfigType type, unsigned char *val, uint32_t len)
311 {
312 return GetInterface()->SoftbusGetConfig(type, val, len);
313 }
314
GenerateCertificate(SoftbusCertChain * softbusCertChain,const AuthSessionInfo * info)315 int32_t GenerateCertificate(SoftbusCertChain *softbusCertChain, const AuthSessionInfo *info)
316 {
317 return GetInterface()->GenerateCertificate(softbusCertChain, info);
318 }
319
FreeSoftbusChain(SoftbusCertChain * softbusCertChain)320 void FreeSoftbusChain(SoftbusCertChain *softbusCertChain)
321 {
322 return GetInterface()->FreeSoftbusChain(softbusCertChain);
323 }
324
InitSoftbusChain(SoftbusCertChain * softbusCertChain)325 int32_t InitSoftbusChain(SoftbusCertChain *softbusCertChain)
326 {
327 return GetInterface()->InitSoftbusChain(softbusCertChain);
328 }
329
VerifyCertificate(SoftbusCertChain * softbusCertChain,const NodeInfo * nodeInfo,const AuthSessionInfo * info)330 int32_t VerifyCertificate(SoftbusCertChain *softbusCertChain,
331 const NodeInfo *nodeInfo, const AuthSessionInfo *info)
332 {
333 return GetInterface()->VerifyCertificate(softbusCertChain, nodeInfo, info);
334 }
335
LnnGetLocalNodeInfoSafe(NodeInfo * info)336 int32_t LnnGetLocalNodeInfoSafe(NodeInfo *info)
337 {
338 return GetInterface()->LnnGetLocalNodeInfoSafe(info);
339 }
340
LnnGetBtMac(const NodeInfo * info)341 const char *LnnGetBtMac(const NodeInfo *info)
342 {
343 return GetInterface()->LnnGetBtMac(info);
344 }
345
SoftBusGetBtState(void)346 int32_t SoftBusGetBtState(void)
347 {
348 return GetInterface()->SoftBusGetBtState();
349 }
350
SoftBusGetBtMacAddr(SoftBusBtAddr * mac)351 int32_t SoftBusGetBtMacAddr(SoftBusBtAddr *mac)
352 {
353 return GetInterface()->SoftBusGetBtMacAddr(mac);
354 }
355
ConvertBtMacToStr(char * strMac,uint32_t strMacLen,const uint8_t * binMac,uint32_t binMacLen)356 int32_t ConvertBtMacToStr(char *strMac, uint32_t strMacLen, const uint8_t *binMac, uint32_t binMacLen)
357 {
358 return GetInterface()->ConvertBtMacToStr(strMac, strMacLen, binMac, binMacLen);
359 }
360
LnnGetDeviceDisplayName(const char * nickName,const char * defaultName,char * deviceName,uint32_t len)361 int32_t LnnGetDeviceDisplayName(const char *nickName,
362 const char *defaultName, char *deviceName, uint32_t len)
363 {
364 return GetInterface()->LnnGetDeviceDisplayName(nickName, defaultName, deviceName, len);
365 }
366
SoftBusGetSysTimeMs(void)367 uint64_t SoftBusGetSysTimeMs(void)
368 {
369 return GetInterface()->SoftBusGetSysTimeMs();
370 }
371
LnnGetSupportedProtocols(const NodeInfo * info)372 uint64_t LnnGetSupportedProtocols(const NodeInfo *info)
373 {
374 return GetInterface()->LnnGetSupportedProtocols(info);
375 }
376
StringToUpperCase(const char * str,char * buf,int32_t size)377 int32_t StringToUpperCase(const char *str, char *buf, int32_t size)
378 {
379 return GetInterface()->StringToUpperCase(str, buf, size);
380 }
381
LnnGetAuthPort(const NodeInfo * info,int32_t ifnameIdx)382 int32_t LnnGetAuthPort(const NodeInfo *info, int32_t ifnameIdx)
383 {
384 return GetInterface()->LnnGetAuthPort(info, ifnameIdx);
385 }
386
LnnGetSessionPort(const NodeInfo * info,int32_t ifnameIdx)387 int32_t LnnGetSessionPort(const NodeInfo *info, int32_t ifnameIdx)
388 {
389 return GetInterface()->LnnGetSessionPort(info, ifnameIdx);
390 }
391
LnnGetProxyPort(const NodeInfo * info,int32_t ifnameIdx)392 int32_t LnnGetProxyPort(const NodeInfo *info, int32_t ifnameIdx)
393 {
394 return GetInterface()->LnnGetProxyPort(info, ifnameIdx);
395 }
396
JSON_AddBytesToObject(JsonObj * obj,const char * key,uint8_t * value,uint32_t size)397 bool JSON_AddBytesToObject(JsonObj *obj, const char *key, uint8_t *value, uint32_t size)
398 {
399 return GetInterface()->JSON_AddBytesToObject(obj, key, value, size);
400 }
401
JSON_GetBytesFromObject(const JsonObj * obj,const char * key,uint8_t * value,uint32_t bufLen,uint32_t * size)402 bool JSON_GetBytesFromObject(const JsonObj *obj, const char *key, uint8_t *value,
403 uint32_t bufLen, uint32_t *size)
404 {
405 return GetInterface()->JSON_GetBytesFromObject(obj, key, value, bufLen, size);
406 }
407
JSON_AddInt16ToObject(JsonObj * obj,const char * key,int16_t value)408 bool JSON_AddInt16ToObject(JsonObj *obj, const char *key, int16_t value)
409 {
410 return GetInterface()->JSON_AddInt16ToObject(obj, key, value);
411 }
412
JSON_AddInt64ToObject(JsonObj * obj,const char * key,int64_t value)413 bool JSON_AddInt64ToObject(JsonObj *obj, const char *key, int64_t value)
414 {
415 return GetInterface()->JSON_AddInt64ToObject(obj, key, value);
416 }
417
LnnGetP2pMac(const NodeInfo * info)418 const char *LnnGetP2pMac(const NodeInfo *info)
419 {
420 return GetInterface()->LnnGetP2pMac(info);
421 }
422
LnnGetDeviceName(const DeviceBasicInfo * info)423 const char *LnnGetDeviceName(const DeviceBasicInfo *info)
424 {
425 return GetInterface()->LnnGetDeviceName(info);
426 }
427
LnnConvertIdToDeviceType(uint16_t typeId)428 char *LnnConvertIdToDeviceType(uint16_t typeId)
429 {
430 return GetInterface()->LnnConvertIdToDeviceType(typeId);
431 }
432
LnnGetDeviceUdid(const NodeInfo * info)433 const char *LnnGetDeviceUdid(const NodeInfo *info)
434 {
435 return GetInterface()->LnnGetDeviceUdid(info);
436 }
437
PackCipherKeySyncMsg(void * json)438 bool PackCipherKeySyncMsg(void *json)
439 {
440 return GetInterface()->PackCipherKeySyncMsg(json);
441 }
442
LnnGetP2pRole(const NodeInfo * info)443 int32_t LnnGetP2pRole(const NodeInfo *info)
444 {
445 return GetInterface()->LnnGetP2pRole(info);
446 }
447
LnnGetStaFrequency(const NodeInfo * info)448 int32_t LnnGetStaFrequency(const NodeInfo *info)
449 {
450 return GetInterface()->LnnGetStaFrequency(info);
451 }
452
GetSessionKeyProfile(int32_t sessionKeyId,uint8_t * sessionKey,uint32_t * length)453 bool GetSessionKeyProfile(int32_t sessionKeyId, uint8_t *sessionKey, uint32_t *length)
454 {
455 return GetInterface()->GetSessionKeyProfile(sessionKeyId, sessionKey, length);
456 }
457
DelSessionKeyProfile(int32_t sessionKeyId)458 void DelSessionKeyProfile(int32_t sessionKeyId)
459 {
460 return GetInterface()->DelSessionKeyProfile(sessionKeyId);
461 }
462
AuthSessionGetIsSameAccount(int64_t authSeq)463 bool AuthSessionGetIsSameAccount(int64_t authSeq)
464 {
465 return GetInterface()->AuthSessionGetIsSameAccount(authSeq);
466 }
467
AuthSessionGetUserId(int64_t authSeq)468 int32_t AuthSessionGetUserId(int64_t authSeq)
469 {
470 return GetInterface()->AuthSessionGetUserId(authSeq);
471 }
472
GetActiveOsAccountIds(void)473 int32_t GetActiveOsAccountIds(void)
474 {
475 return GetInterface()->GetActiveOsAccountIds();
476 }
477
LnnGetLocalByteInfo(InfoKey key,uint8_t * info,uint32_t len)478 int32_t LnnGetLocalByteInfo(InfoKey key, uint8_t *info, uint32_t len)
479 {
480 return GetInterface()->LnnGetLocalByteInfo(key, info, len);
481 }
482
LnnGetLocalStrInfoByIfnameIdx(InfoKey key,char * info,uint32_t len,int32_t ifIdx)483 int32_t LnnGetLocalStrInfoByIfnameIdx(InfoKey key, char *info, uint32_t len, int32_t ifIdx)
484 {
485 return GetInterface()->LnnGetLocalStrInfoByIfnameIdx(key, info, len, ifIdx);
486 }
487
IsTrustedDeviceFromAccess(const char * peerAccountHash,const char * peerUdid,int32_t peerUserId)488 bool IsTrustedDeviceFromAccess(const char *peerAccountHash, const char *peerUdid, int32_t peerUserId)
489 {
490 return GetInterface()->IsTrustedDeviceFromAccess(peerAccountHash, peerUdid, peerUserId);
491 }
492 }
493 } // namespace OHOS