1 /*
2  * Copyright (c) 2022 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 FOUNDATION_ACE_INTERFACE_UI_CONTENT_STUB_H
17 #define FOUNDATION_ACE_INTERFACE_UI_CONTENT_STUB_H
18 
19 #include <iremote_object.h>
20 #include <iremote_stub.h>
21 
22 #include "ui_content_service_interface.h"
23 
24 namespace OHOS::Ace {
25 class UiContentStub : public IRemoteStub<IUiContentService> {
26 public:
27     virtual int32_t OnRemoteRequest(
28         uint32_t code, MessageParcel& data, MessageParcel& reply, MessageOption& option) override;
29 
30 private:
31     int32_t GetInspectorTreeInner(MessageParcel& data, MessageParcel& reply, MessageOption& option);
32     int32_t ConnectInner(MessageParcel& data, MessageParcel& reply, MessageOption& option);
33     int32_t RegisterClickEventCallbackInner(MessageParcel& data, MessageParcel& reply, MessageOption& option);
34     int32_t RegisterRouterChangeEventCallbackInner(MessageParcel& data, MessageParcel& reply, MessageOption& option);
35     int32_t RegisterSearchEventCallbackInner(MessageParcel& data, MessageParcel& reply, MessageOption& option);
36     int32_t RegisterComponentChangeEventCallbackInner(MessageParcel& data, MessageParcel& reply, MessageOption& option);
37     int32_t RegisterWebUnfocusEventCallbackInner(MessageParcel& data, MessageParcel& reply, MessageOption& option);
38     int32_t UnregisterClickEventCallbackInner(MessageParcel& data, MessageParcel& reply, MessageOption& option);
39     int32_t UnregisterSearchEventCallbackInner(MessageParcel& data, MessageParcel& reply, MessageOption& option);
40     int32_t UnregisterRouterChangeEventCallbackInner(MessageParcel& data, MessageParcel& reply, MessageOption& option);
41     int32_t UnregisterComponentChangeEventCallbackInner(
42         MessageParcel& data, MessageParcel& reply, MessageOption& option);
43     int32_t UnregisterWebUnfocusEventCallbackInner(MessageParcel& data, MessageParcel& reply, MessageOption& option);
44 };
45 } // namespace OHOS::Ace
46 #endif // FOUNDATION_ACE_INTERFACE_UI_CONTENT_STUB_H
47