1 /*
2  * Copyright (c) 2021-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 OHOS_ROSEN_DISPLAY_MANAGER_AGRNT_PROXY_H
17 #define OHOS_ROSEN_DISPLAY_MANAGER_AGRNT_PROXY_H
18 
19 #include <iremote_proxy.h>
20 #include "display_manager_agent_interface.h"
21 #include "dm_common.h"
22 
23 namespace OHOS {
24 namespace Rosen {
25 class DisplayManagerAgentProxy : public IRemoteProxy<IDisplayManagerAgent> {
26 public:
DisplayManagerAgentProxy(const sptr<IRemoteObject> & impl)27     explicit DisplayManagerAgentProxy(const sptr<IRemoteObject>& impl) : IRemoteProxy<IDisplayManagerAgent>(impl) {};
28     ~DisplayManagerAgentProxy() = default;
29 
30     virtual void NotifyDisplayPowerEvent(DisplayPowerEvent event, EventStatus status) override;
31     virtual void NotifyDisplayStateChanged(DisplayId id, DisplayState state) override;
32     virtual void OnScreenConnect(sptr<ScreenInfo>) override;
33     virtual void OnScreenDisconnect(ScreenId) override;
34     virtual void OnScreenChange(const sptr<ScreenInfo>&, ScreenChangeEvent) override;
35     virtual void OnScreenGroupChange(const std::string& trigger,
36         const std::vector<sptr<ScreenInfo>>&, ScreenGroupChangeEvent) override;
37     virtual void OnDisplayCreate(sptr<DisplayInfo>) override;
38     virtual void OnDisplayDestroy(DisplayId) override;
39     virtual void OnDisplayChange(sptr<DisplayInfo>, DisplayChangeEvent) override;
40     virtual void OnScreenshot(sptr<ScreenshotInfo>) override;
41     virtual void NotifyPrivateWindowStateChanged(bool hasPrivate) override;
42     virtual void NotifyPrivateStateWindowListChanged(DisplayId id, std::vector<std::string> privacyWindowList) override;
43     virtual void NotifyFoldStatusChanged(FoldStatus) override;
44     virtual void NotifyFoldAngleChanged(std::vector<float> foldAngles) override;
45     virtual void NotifyCaptureStatusChanged(bool isCapture) override;
46     virtual void NotifyDisplayChangeInfoChanged(const sptr<DisplayChangeInfo>& info) override;
47     virtual void NotifyDisplayModeChanged(FoldDisplayMode) override;
48     virtual void NotifyAvailableAreaChanged(DMRect) override;
49     virtual void NotifyScreenModeChange(const std::vector<sptr<ScreenInfo>>& screenInfos) override;
50 private:
51     static inline BrokerDelegator<DisplayManagerAgentProxy> delegator_;
52 };
53 } // namespace Rosen
54 } // namespace OHOS
55 #endif // OHOS_ROSEN_DISPLAY_MANAGER_AGRNT_PROXY_H