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 #ifndef USER_IDM_CALLBACK_INTERFACE_H 17 #define USER_IDM_CALLBACK_INTERFACE_H 18 19 #include <optional> 20 21 #include "iremote_broker.h" 22 23 #include "attributes.h" 24 #include "iam_common_defines.h" 25 #include "iam_callback_interface.h" 26 #include "idm_callback_interface_ipc_interface_code.h" 27 #include "idm_get_cred_info_callback_interface_ipc_interface_code.h" 28 #include "idm_get_secure_user_info_callback_interface_ipc_interface_code.h" 29 #include "user_idm_client_defines.h" 30 31 namespace OHOS { 32 namespace UserIam { 33 namespace UserAuth { 34 class IdmGetCredInfoCallbackInterface : public IRemoteBroker { 35 public: 36 /* 37 * return all registered credential information. 38 */ 39 virtual void OnCredentialInfos(const std::vector<CredentialInfo> &credInfoList) = 0; 40 41 DECLARE_INTERFACE_DESCRIPTOR(u"ohos.useridm.IGetInfoCallback"); 42 }; 43 44 class IdmGetSecureUserInfoCallbackInterface : public IRemoteBroker { 45 public: 46 /* 47 * return all registered security information. 48 */ 49 virtual void OnSecureUserInfo(const SecUserInfo &secUserInfo) = 0; 50 51 DECLARE_INTERFACE_DESCRIPTOR(u"ohos.useridm.IGetSecInfoCallback"); 52 }; 53 54 class IdmCallbackInterface : public IamCallbackInterface { 55 public: 56 DECLARE_INTERFACE_DESCRIPTOR(u"ohos.useridm.IIDMCallback"); 57 }; 58 } // namespace UserAuth 59 } // namespace UserIam 60 } // namespace OHOS 61 #endif // USER_IDM_CALLBACK_INTERFACE_H