• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 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 #ifndef IDENTITY_SERVICE_H
17 #define IDENTITY_SERVICE_H
18 
19 #include "cred_listener.h"
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 int32_t AddCredential(int32_t osAccountId, const char *requestParams, char **returnData);
25 
26 int32_t ExportCredential(int32_t osAccountId, const char *credId, char **returnData);
27 
28 int32_t QueryCredentialByParams(int32_t osAccountId, const char *requestParams, char **returnData);
29 
30 int32_t QueryCredInfoByCredId(int32_t osAccountId, const char *credId, char **returnData);
31 
32 int32_t QueryCredInfoByCredIdAndUid(int32_t osAccountId, int32_t uid, const char *credId,
33     char **returnData);
34 
35 int32_t DeleteCredential(int32_t osAccountId, const char *credId);
36 
37 int32_t DeleteCredByParams(int32_t osAccountId, const char *requestParams, char **returnData);
38 
39 int32_t UpdateCredInfo(int32_t osAccountId, const char *credId, const char *requestParams);
40 
41 int32_t BatchUpdateCredentials(int32_t osAccountId, const char *requestParams, char **returnData);
42 
43 int32_t AgreeCredential(int32_t osAccountId, const char *selfCredId, const char *requestParams, char **returnData);
44 
45 int32_t RegisterChangeListener(const char *appId, CredChangeListener *listener);
46 
47 int32_t UnregisterChangeListener(const char *appId);
48 
49 void DestroyInfo(char **returnData);
50 
51 int32_t InitIdentityService(void);
52 
53 void DestroyIdentityService(void);
54 
55 #ifdef __cplusplus
56 }
57 #endif
58 #endif // IDENTITY_SERVICE_H