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 DeleteCredential(int32_t osAccountId, const char *credId); 33 34 int32_t DeleteCredByParams(int32_t osAccountId, const char *requestParams, char **returnData); 35 36 int32_t UpdateCredInfo(int32_t osAccountId, const char *credId, const char *requestParams); 37 38 int32_t BatchUpdateCredentials(int32_t osAccountId, const char *requestParams, char **returnData); 39 40 int32_t AgreeCredential(int32_t osAccountId, const char *selfCredId, const char *requestParams, char **returnData); 41 42 int32_t RegisterChangeListener(const char *appId, CredChangeListener *listener); 43 44 int32_t UnregisterChangeListener(const char *appId); 45 46 void DestroyInfo(char **returnData); 47 48 int32_t InitIdentityService(void); 49 50 void DestroyIdentityService(void); 51 52 #ifdef __cplusplus 53 } 54 #endif 55 #endif // IDENTITY_SERVICE_H