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 22 namespace OHOS { 23 namespace Rosen { 24 class DisplayManagerAgentProxy : public IRemoteProxy<IDisplayManagerAgent> { 25 public: DisplayManagerAgentProxy(const sptr<IRemoteObject> & impl)26 explicit DisplayManagerAgentProxy(const sptr<IRemoteObject>& impl) : IRemoteProxy<IDisplayManagerAgent>(impl) {}; 27 ~DisplayManagerAgentProxy() = default; 28 29 virtual void NotifyDisplayPowerEvent(DisplayPowerEvent event, EventStatus status) override; 30 virtual void NotifyDisplayStateChanged(DisplayId id, DisplayState state) override; 31 virtual void OnScreenConnect(sptr<ScreenInfo>) override; 32 virtual void OnScreenDisconnect(ScreenId) override; 33 virtual void OnScreenChange(const sptr<ScreenInfo>&, ScreenChangeEvent) override; 34 virtual void OnScreenGroupChange(const std::string& trigger, 35 const std::vector<sptr<ScreenInfo>>&, ScreenGroupChangeEvent) override; 36 virtual void OnDisplayCreate(sptr<DisplayInfo>) override; 37 virtual void OnDisplayDestroy(DisplayId) override; 38 virtual void OnDisplayChange(sptr<DisplayInfo>, DisplayChangeEvent) override; 39 virtual void OnScreenshot(sptr<ScreenshotInfo>) override; 40 virtual void NotifyPrivateWindowStateChanged(bool hasPrivate) override; 41 virtual void NotifyFoldStatusChanged(FoldStatus) override; 42 virtual void NotifyDisplayModeChanged(FoldDisplayMode) override; 43 private: 44 static inline BrokerDelegator<DisplayManagerAgentProxy> delegator_; 45 }; 46 } // namespace Rosen 47 } // namespace OHOS 48 #endif // OHOS_ROSEN_DISPLAY_MANAGER_AGRNT_PROXY_H