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_STUB_H
17 #define OS_ACCOUNT_INTERFACES_INNERKITS_ACCOUNT_IAM_NATIVE_INCLUDE_ACCOUNT_IAM_CALLBACK_STUB_H
18 
19 #include <map>
20 #include "iaccount_iam_callback.h"
21 #include "iremote_stub.h"
22 
23 namespace OHOS {
24 namespace AccountSA {
25 class IDMCallbackStub : public IRemoteStub<IIDMCallback> {
26 public:
IDMCallbackStub()27     IDMCallbackStub() {};
28     int OnRemoteRequest(
29         uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) override;
30 
31 private:
32     ErrCode ProcOnAcquireInfo(MessageParcel &data, MessageParcel &reply);
33     ErrCode ProcOnResult(MessageParcel &data, MessageParcel &reply);
34 };
35 
36 class GetCredInfoCallbackStub : public IRemoteStub<IGetCredInfoCallback> {
37 public:
GetCredInfoCallbackStub()38     GetCredInfoCallbackStub() {};
39     int OnRemoteRequest(
40         uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) override;
41 
42 private:
43     ErrCode ProcOnCredentialInfo(MessageParcel &data, MessageParcel &reply);
44 };
45 
46 class GetSetPropCallbackStub : public IRemoteStub<IGetSetPropCallback> {
47 public:
GetSetPropCallbackStub()48     GetSetPropCallbackStub() {};
49     int OnRemoteRequest(
50         uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) override;
51 
52 private:
53     ErrCode ProcOnResult(MessageParcel &data, MessageParcel &reply);
54 };
55 
56 class GetEnrolledIdCallbackStub : public IRemoteStub<IGetEnrolledIdCallback> {
57 public:
GetEnrolledIdCallbackStub()58     GetEnrolledIdCallbackStub() {};
59     int OnRemoteRequest(
60         uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) override;
61 
62 private:
63     ErrCode ProcOnEnrolledId(MessageParcel &data, MessageParcel &reply);
64 };
65 
66 class PreRemoteAuthCallbackStub : public IRemoteStub<IPreRemoteAuthCallback> {
67 public:
PreRemoteAuthCallbackStub()68     PreRemoteAuthCallbackStub() {};
69     int OnRemoteRequest(
70         uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) override;
71 
72 private:
73     ErrCode ProcOnResult(MessageParcel &data, MessageParcel &reply);
74 };
75 }  // namespace AccountSA
76 }  // namespace OHOS
77 #endif  // OS_ACCOUNT_INTERFACES_INNERKITS_ACCOUNT_IAM_NATIVE_INCLUDE_ACCOUNT_IAM_CALLBACK_STUB_H