1 /*
2  * Copyright (c) 2022-2024 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 OS_ACCOUNT_INTERFACES_INNERKITS_ACCOUNT_IAM_NATIVE_INCLUDE_ACCOUNT_IAM_CALLBACK_H
17 #define OS_ACCOUNT_INTERFACES_INNERKITS_ACCOUNT_IAM_NATIVE_INCLUDE_ACCOUNT_IAM_CALLBACK_H
18 
19 #include "accountmgr_service_ipc_interface_code.h"
20 #include "account_iam_info.h"
21 #include "iremote_broker.h"
22 #include "iremote_object.h"
23 
24 namespace OHOS {
25 namespace AccountSA {
26 class IIDMCallback : public IRemoteBroker {
27 public:
28     DECLARE_INTERFACE_DESCRIPTOR(u"ohos.accountfwk.IIDMCallback");
29     virtual void OnAcquireInfo(int32_t module, uint32_t acquireInfo, const Attributes &extraInfo) = 0;
30     virtual void OnResult(int32_t result, const Attributes &extraInfo) = 0;
31 };
32 
33 class IGetCredInfoCallback : public IRemoteBroker {
34 public:
35     DECLARE_INTERFACE_DESCRIPTOR(u"ohos.accountfwk.IGetCredInfoCallback");
36     virtual void OnCredentialInfo(const std::vector<CredentialInfo> &infoList) = 0;
37 };
38 
39 class IGetSetPropCallback : public IRemoteBroker {
40 public:
41     DECLARE_INTERFACE_DESCRIPTOR(u"ohos.accountfwk.IGetSetPropCallback");
42     virtual void OnResult(int32_t result, const Attributes &extraInfo) = 0;
43 };
44 
45 class IGetEnrolledIdCallback : public IRemoteBroker {
46 public:
47     DECLARE_INTERFACE_DESCRIPTOR(u"ohos.accountfwk.IGetEnrolledIdCallback");
48     virtual void OnEnrolledId(int32_t result, uint64_t enrolledId) = 0;
49 };
50 
51 class IPreRemoteAuthCallback : public IRemoteBroker {
52 public:
53     DECLARE_INTERFACE_DESCRIPTOR(u"ohos.accountfwk.IPreRemoteAuthCallback");
54     virtual void OnResult(int32_t result) = 0;
55 };
56 }  // namespace AccountSA
57 }  // OHOS
58 #endif  // OS_ACCOUNT_INTERFACES_INNERKITS_ACCOUNT_IAM_NATIVE_INCLUDE_ACCOUNT_IAM_CALLBACK_H
59