• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 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 OHOS_WINDOW_SCENE_SESSION_STAGE_STUB_H
17 #define OHOS_WINDOW_SCENE_SESSION_STAGE_STUB_H
18 
19 #include <map>
20 
21 #include <iremote_stub.h>
22 
23 #include "session/container/include/zidl/session_stage_interface.h"
24 
25 namespace OHOS::Rosen {
26 class SessionStageStub;
27 using SessionStageStubFunc = int (SessionStageStub::*)(MessageParcel& data, MessageParcel& reply);
28 
29 class SessionStageStub : public IRemoteStub<ISessionStage> {
30 public:
31     SessionStageStub() = default;
32     ~SessionStageStub() = default;
33 
34     int OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply,
35         MessageOption &option) override;
36 
37 private:
38     static const std::map<uint32_t, SessionStageStubFunc> stubFuncMap_;
39 
40     int HandleSetActive(MessageParcel& data, MessageParcel& reply);
41     int HandleUpdateRect(MessageParcel& data, MessageParcel& reply);
42     int HandleBackEventInner(MessageParcel& data, MessageParcel& reply);
43     int HandleUpdateFocus(MessageParcel& date, MessageParcel& reply);
44     int HandleNotifyDestroy(MessageParcel& data, MessageParcel& reply);
45     int HandleNotifyTouchDialogTarget(MessageParcel& data, MessageParcel& reply);
46     int HandleNotifyTransferComponentData(MessageParcel& data, MessageParcel& reply);
47     int HandleNotifyOccupiedAreaChange(MessageParcel& data, MessageParcel& reply);
48     int HandleUpdateAvoidArea(MessageParcel& data, MessageParcel& reply);
49     int HandleNotifyScreenshot(MessageParcel& data, MessageParcel& reply);
50     int HandleDumpSessionElementInfo(MessageParcel& data, MessageParcel& reply);
51     int HandleNotifyTouchOutside(MessageParcel& data, MessageParcel& reply);
52     int HandleUpdateWindowMode(MessageParcel& data, MessageParcel& reply);
53 };
54 } // namespace OHOS::Rosen
55 #endif // OHOS_WINDOW_SCENE_SESSION_STAGE_STUB_H
56