• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 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 OHOS_ABILITY_RUNTIME_QUERY_ERMS_OBSERVER_STUB_H
17 #define OHOS_ABILITY_RUNTIME_QUERY_ERMS_OBSERVER_STUB_H
18 
19 #include <map>
20 
21 #include "iremote_stub.h"
22 #include "query_erms_observer_interface.h"
23 #include "nocopyable.h"
24 
25 namespace OHOS {
26 namespace AbilityRuntime {
27 /**
28  * @class QueryERMSObserverStub
29  * IPC stub of IQueryERMSObserver.
30  */
31 class QueryERMSObserverStub : public IRemoteStub<IQueryERMSObserver> {
32 public:
33     /**
34      * QueryERMSObserverStub, constructor.
35      *
36      */
37     QueryERMSObserverStub();
38 
39     /**
40      * QueryERMSObserverStub, destructor.
41      *
42      */
43     virtual ~QueryERMSObserverStub();
44 
45     /**
46      * OnRemoteRequest, IPC method.
47      *
48      * @param code The IPC code.
49      * @param data The message parcel data.
50      * @param reply The message parcel reply.
51      * @param option The message parcel option.
52      * @return Error code of calling the function.
53      */
54     virtual int OnRemoteRequest(
55         uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) override;
56 
57 private:
58     DISALLOW_COPY_AND_MOVE(QueryERMSObserverStub);
59 
60     /**
61      * OnQueryFinishedInner, inner processing method for OnQueryFinished.
62      *
63      * @param data The message parcel data.
64      * @param reply The message parcel reply.
65      * @return Error code of calling the function.
66      */
67     int OnQueryFinishedInner(MessageParcel &data, MessageParcel &reply);
68 };
69 } // namespace AbilityRuntime
70 } // namespace OHOS
71 #endif // OHOS_ABILITY_RUNTIME_QUERY_ERMS_OBSERVER_STUB_H