• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2023-2025 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_SCREEN_SESSION_MANAGER_INTERFACE_H
17 #define OHOS_ROSEN_SCREEN_SESSION_MANAGER_INTERFACE_H
18 
19 #include <ui/rs_display_node.h>
20 
21 #include "display_manager_interface_code.h"
22 #include "dm_common.h"
23 #include "fold_screen_info.h"
24 #include "interfaces/include/ws_common.h"
25 #include "screen.h"
26 #include "screen_group_info.h"
27 #include "session/screen/include/screen_property.h"
28 #include "window_manager_hilog.h"
29 #include "zidl/idisplay_manager_agent.h"
30 #include "zidl/screen_session_manager_client_interface.h"
31 
32 namespace OHOS {
33 namespace Rosen {
34 template<typename T>
35 class RRectT;
36 
37 class IScreenSessionManager : public IRemoteBroker {
38 public:
39     DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.IScreenSessionManager");
40 
GetDefaultDisplayInfo()41     virtual sptr<DisplayInfo> GetDefaultDisplayInfo() { return nullptr; }
GetDisplayInfoById(DisplayId displayId)42     virtual sptr<DisplayInfo> GetDisplayInfoById(DisplayId displayId) { return nullptr; }
GetVisibleAreaDisplayInfoById(DisplayId displayId)43     virtual sptr<DisplayInfo> GetVisibleAreaDisplayInfoById(DisplayId displayId) { return nullptr; }
GetDisplayInfoByScreen(ScreenId screenId)44     virtual sptr<DisplayInfo> GetDisplayInfoByScreen(ScreenId screenId) {return nullptr; }
HasPrivateWindow(DisplayId displayId,bool & hasPrivateWindow)45     virtual DMError HasPrivateWindow(DisplayId displayId, bool& hasPrivateWindow) { return DMError::DM_OK; }
ConvertScreenIdToRsScreenId(ScreenId screenId,ScreenId & rsScreenId)46     virtual bool ConvertScreenIdToRsScreenId(ScreenId screenId, ScreenId& rsScreenId) { return true; }
UpdateDisplayHookInfo(int32_t uid,bool enable,const DMHookInfo & hookInfo)47     virtual void UpdateDisplayHookInfo(int32_t uid, bool enable, const DMHookInfo& hookInfo) {}
GetDisplayHookInfo(int32_t uid,DMHookInfo & hookInfo)48     virtual void GetDisplayHookInfo(int32_t uid, DMHookInfo& hookInfo) {}
49 
CreateVirtualScreen(VirtualScreenOption option,const sptr<IRemoteObject> & displayManagerAgent)50     virtual ScreenId CreateVirtualScreen(VirtualScreenOption option,
51         const sptr<IRemoteObject>& displayManagerAgent) { return SCREEN_ID_INVALID; }
DestroyVirtualScreen(ScreenId screenId)52     virtual DMError DestroyVirtualScreen(ScreenId screenId) { return DMError::DM_OK; }
SetVirtualScreenSurface(ScreenId screenId,sptr<IBufferProducer> surface)53     virtual DMError SetVirtualScreenSurface(ScreenId screenId, sptr<IBufferProducer> surface)
54     {
55         return DMError::DM_OK;
56     }
57 
AddVirtualScreenBlockList(const std::vector<int32_t> & persistentIds)58     virtual DMError AddVirtualScreenBlockList(const std::vector<int32_t> &persistentIds)
59     {
60         return DMError::DM_ERROR_DEVICE_NOT_SUPPORT;
61     }
62 
RemoveVirtualScreenBlockList(const std::vector<int32_t> & persistentIds)63     virtual DMError RemoveVirtualScreenBlockList(const std::vector<int32_t> &persistentIds)
64     {
65         return DMError::DM_ERROR_DEVICE_NOT_SUPPORT;
66     }
SetScreenPrivacyMaskImage(ScreenId screenId,const std::shared_ptr<Media::PixelMap> & privacyMaskImg)67     virtual DMError SetScreenPrivacyMaskImage(ScreenId screenId,
68         const std::shared_ptr<Media::PixelMap>& privacyMaskImg)
69     {
70         return DMError::DM_OK;
71     }
SetVirtualMirrorScreenCanvasRotation(ScreenId screenId,bool autoRotate)72     virtual DMError SetVirtualMirrorScreenCanvasRotation(ScreenId screenId, bool autoRotate)
73     {
74         return DMError::DM_OK;
75     }
76 
SetVirtualMirrorScreenScaleMode(ScreenId screenId,ScreenScaleMode scaleMode)77     virtual DMError SetVirtualMirrorScreenScaleMode(ScreenId screenId, ScreenScaleMode scaleMode)
78     {
79         return DMError::DM_ERROR_DEVICE_NOT_SUPPORT;
80     }
SetOrientation(ScreenId screenId,Orientation orientation)81     virtual DMError SetOrientation(ScreenId screenId, Orientation orientation) { return DMError::DM_OK; }
82     virtual std::shared_ptr<Media::PixelMap> GetDisplaySnapshot(DisplayId displayId, DmErrorCode* errorCode = nullptr,
83         bool isUseDma = false, bool isCaptureFullOfScreen = false) { return nullptr; }
84     virtual std::vector<std::shared_ptr<Media::PixelMap>> GetDisplayHDRSnapshot(
85         DisplayId displayId, DmErrorCode& errorCode, bool isUseDma = false,
86         bool isCaptureFullOfScreen = false) { return { nullptr, nullptr }; }
87     virtual std::shared_ptr<Media::PixelMap> GetSnapshotByPicker(Media::Rect &rect,
88         DmErrorCode* errorCode = nullptr)
89     {
90         *errorCode = DmErrorCode::DM_ERROR_DEVICE_NOT_SUPPORT;
91         return nullptr;
92     }
SetScreenRotationLocked(bool isLocked)93     virtual DMError SetScreenRotationLocked(bool isLocked) { return DMError::DM_OK; }
SetScreenRotationLockedFromJs(bool isLocked)94     virtual DMError SetScreenRotationLockedFromJs(bool isLocked) { return DMError::DM_OK; }
IsScreenRotationLocked(bool & isLocked)95     virtual DMError IsScreenRotationLocked(bool& isLocked) { return DMError::DM_OK; }
96 
97     // colorspace, gamut
GetScreenSupportedColorGamuts(ScreenId screenId,std::vector<ScreenColorGamut> & colorGamuts)98     virtual DMError GetScreenSupportedColorGamuts(ScreenId screenId,
99         std::vector<ScreenColorGamut>& colorGamuts)
100     {
101         return DMError::DM_OK;
102     }
GetScreenColorGamut(ScreenId screenId,ScreenColorGamut & colorGamut)103     virtual DMError GetScreenColorGamut(ScreenId screenId, ScreenColorGamut& colorGamut)
104     {
105         return DMError::DM_OK;
106     }
SetScreenColorGamut(ScreenId screenId,int32_t colorGamutIdx)107     virtual DMError SetScreenColorGamut(ScreenId screenId, int32_t colorGamutIdx) { return DMError::DM_OK; }
GetScreenGamutMap(ScreenId screenId,ScreenGamutMap & gamutMap)108     virtual DMError GetScreenGamutMap(ScreenId screenId, ScreenGamutMap& gamutMap) { return DMError::DM_OK; }
SetScreenGamutMap(ScreenId screenId,ScreenGamutMap gamutMap)109     virtual DMError SetScreenGamutMap(ScreenId screenId, ScreenGamutMap gamutMap) { return DMError::DM_OK; }
SetScreenColorTransform(ScreenId screenId)110     virtual DMError SetScreenColorTransform(ScreenId screenId) { return DMError::DM_OK; }
111 
GetPixelFormat(ScreenId screenId,GraphicPixelFormat & pixelFormat)112     virtual DMError GetPixelFormat(ScreenId screenId, GraphicPixelFormat &pixelFormat)
113     {
114         return DMError::DM_ERROR_DEVICE_NOT_SUPPORT;
115     }
116 
SetPixelFormat(ScreenId screenId,GraphicPixelFormat pixelFormat)117     virtual DMError SetPixelFormat(ScreenId screenId, GraphicPixelFormat pixelFormat)
118     {
119         return DMError::DM_ERROR_DEVICE_NOT_SUPPORT;
120     }
121 
GetSupportedHDRFormats(ScreenId screenId,std::vector<ScreenHDRFormat> & hdrFormats)122     virtual DMError GetSupportedHDRFormats(ScreenId screenId,
123         std::vector<ScreenHDRFormat> &hdrFormats)
124     {
125         return DMError::DM_ERROR_DEVICE_NOT_SUPPORT;
126     }
127 
GetScreenHDRFormat(ScreenId screenId,ScreenHDRFormat & hdrFormat)128     virtual DMError GetScreenHDRFormat(ScreenId screenId, ScreenHDRFormat &hdrFormat)
129     {
130         return DMError::DM_ERROR_DEVICE_NOT_SUPPORT;
131     }
132 
SetScreenHDRFormat(ScreenId screenId,int32_t modeIdx)133     virtual DMError SetScreenHDRFormat(ScreenId screenId, int32_t modeIdx)
134     {
135         return DMError::DM_ERROR_DEVICE_NOT_SUPPORT;
136     }
137 
GetSupportedColorSpaces(ScreenId screenId,std::vector<GraphicCM_ColorSpaceType> & colorSpaces)138     virtual DMError GetSupportedColorSpaces(ScreenId screenId,
139         std::vector<GraphicCM_ColorSpaceType> &colorSpaces)
140     {
141         return DMError::DM_ERROR_DEVICE_NOT_SUPPORT;
142     }
143 
GetScreenColorSpace(ScreenId screenId,GraphicCM_ColorSpaceType & colorSpace)144     virtual DMError GetScreenColorSpace(ScreenId screenId, GraphicCM_ColorSpaceType &colorSpace)
145     {
146         return DMError::DM_ERROR_DEVICE_NOT_SUPPORT;
147     }
148 
SetScreenColorSpace(ScreenId screenId,GraphicCM_ColorSpaceType colorSpace)149     virtual DMError SetScreenColorSpace(ScreenId screenId, GraphicCM_ColorSpaceType colorSpace)
150     {
151         return DMError::DM_ERROR_DEVICE_NOT_SUPPORT;
152     }
153 
RegisterDisplayManagerAgent(const sptr<IDisplayManagerAgent> & displayManagerAgent,DisplayManagerAgentType type)154     virtual DMError RegisterDisplayManagerAgent(const sptr<IDisplayManagerAgent>& displayManagerAgent,
155         DisplayManagerAgentType type) { return DMError::DM_OK; }
UnregisterDisplayManagerAgent(const sptr<IDisplayManagerAgent> & displayManagerAgent,DisplayManagerAgentType type)156     virtual DMError UnregisterDisplayManagerAgent(const sptr<IDisplayManagerAgent>& displayManagerAgent,
157         DisplayManagerAgentType type) { return DMError::DM_OK; }
WakeUpBegin(PowerStateChangeReason reason)158     virtual bool WakeUpBegin(PowerStateChangeReason reason) { return false; }
WakeUpEnd()159     virtual bool WakeUpEnd() { return false; }
SuspendBegin(PowerStateChangeReason reason)160     virtual bool SuspendBegin(PowerStateChangeReason reason) { return false; }
SuspendEnd()161     virtual bool SuspendEnd() { return false; }
GetInternalScreenId()162     virtual ScreenId GetInternalScreenId() { return SCREEN_ID_INVALID; }
SetScreenPowerById(ScreenId screenId,ScreenPowerState state,PowerStateChangeReason reason)163     virtual bool SetScreenPowerById(ScreenId screenId, ScreenPowerState state, PowerStateChangeReason reason)
164     {
165         return false;
166     }
SetSpecifiedScreenPower(ScreenId,ScreenPowerState,PowerStateChangeReason)167     virtual bool SetSpecifiedScreenPower(ScreenId, ScreenPowerState, PowerStateChangeReason) { return false; }
SetScreenPowerForAll(ScreenPowerState state,PowerStateChangeReason reason)168     virtual bool SetScreenPowerForAll(ScreenPowerState state, PowerStateChangeReason reason) { return false; }
GetScreenPower(ScreenId dmsScreenId)169     virtual ScreenPowerState GetScreenPower(ScreenId dmsScreenId) { return ScreenPowerState::INVALID_STATE; }
GetScreenPower()170     virtual ScreenPowerState GetScreenPower() { return ScreenPowerState::INVALID_STATE; }
SetDisplayState(DisplayState state)171     virtual bool SetDisplayState(DisplayState state) { return false; }
GetDisplayState(DisplayId displayId)172     virtual DisplayState GetDisplayState(DisplayId displayId) {return DisplayState::UNKNOWN; }
TryToCancelScreenOff()173     virtual bool TryToCancelScreenOff() { return false; }
SetScreenBrightness(uint64_t screenId,uint32_t level)174     virtual bool SetScreenBrightness(uint64_t screenId, uint32_t level) { return false; }
GetScreenBrightness(uint64_t screenId)175     virtual uint32_t GetScreenBrightness(uint64_t screenId) { return 0; }
GetAllDisplayIds()176     virtual std::vector<DisplayId> GetAllDisplayIds() { return std::vector<DisplayId>{}; }
GetCutoutInfo(DisplayId displayId)177     virtual sptr<CutoutInfo> GetCutoutInfo(DisplayId displayId) { return nullptr; }
GetCutoutInfo(DisplayId displayId,int32_t width,int32_t height,Rotation rotation)178     virtual sptr<CutoutInfo> GetCutoutInfo(DisplayId displayId, int32_t width, int32_t height,
179                                            Rotation rotation) { return nullptr; }
HasImmersiveWindow(ScreenId screenId,bool & immersive)180     virtual DMError HasImmersiveWindow(ScreenId screenId, bool &immersive)
181     {
182         return DMError::DM_ERROR_DEVICE_NOT_SUPPORT;
183     }
NotifyDisplayEvent(DisplayEvent event)184     virtual void NotifyDisplayEvent(DisplayEvent event) {}
SetFreeze(std::vector<DisplayId> displayIds,bool isFreeze)185     virtual bool SetFreeze(std::vector<DisplayId> displayIds, bool isFreeze) { return false; }
GetScreenInfoById(ScreenId screenId)186     virtual sptr<ScreenInfo> GetScreenInfoById(ScreenId screenId) { return nullptr; }
GetScreenGroupInfoById(ScreenId screenId)187     virtual sptr<ScreenGroupInfo> GetScreenGroupInfoById(ScreenId screenId) { return nullptr; }
GetAllScreenInfos(std::vector<sptr<ScreenInfo>> & screenInfos)188     virtual DMError GetAllScreenInfos(std::vector<sptr<ScreenInfo>>& screenInfos) { return DMError::DM_OK; }
MakeMirror(ScreenId mainScreenId,std::vector<ScreenId> mirrorScreenIds,ScreenId & screenGroupId)189     virtual DMError MakeMirror(ScreenId mainScreenId, std::vector<ScreenId> mirrorScreenIds,
190         ScreenId& screenGroupId) { return DMError::DM_OK; }
191 
MakeMirrorForRecord(ScreenId mainScreenId,std::vector<ScreenId> mirrorScreenIds,ScreenId & screenGroupId)192     virtual DMError MakeMirrorForRecord(ScreenId mainScreenId, std::vector<ScreenId> mirrorScreenIds,
193         ScreenId &screenGroupId)
194     {
195         return DMError::DM_ERROR_DEVICE_NOT_SUPPORT;
196     }
MakeMirror(ScreenId mainScreenId,std::vector<ScreenId> mirrorScreenIds,DMRect mainScreenRegion,ScreenId & screenGroupId)197     virtual DMError MakeMirror(ScreenId mainScreenId, std::vector<ScreenId> mirrorScreenIds,
198         DMRect mainScreenRegion, ScreenId& screenGroupId) { return DMError::DM_OK; }
SetMultiScreenMode(ScreenId mainScreenId,ScreenId secondaryScreenId,MultiScreenMode screenMode)199     virtual DMError SetMultiScreenMode(ScreenId mainScreenId, ScreenId secondaryScreenId,
200         MultiScreenMode screenMode) { return DMError::DM_OK; }
SetMultiScreenRelativePosition(MultiScreenPositionOptions mainScreenOptions,MultiScreenPositionOptions secondScreenOption)201     virtual DMError SetMultiScreenRelativePosition(MultiScreenPositionOptions mainScreenOptions,
202         MultiScreenPositionOptions secondScreenOption) { return DMError::DM_OK; }
MakeExpand(std::vector<ScreenId> screenId,std::vector<Point> startPoints,ScreenId & screenGroupId)203     virtual DMError MakeExpand(std::vector<ScreenId> screenId, std::vector<Point> startPoints,
204         ScreenId& screenGroupId) { return DMError::DM_OK; }
StopMirror(const std::vector<ScreenId> & mirrorScreenIds)205     virtual DMError StopMirror(const std::vector<ScreenId>& mirrorScreenIds) { return DMError::DM_OK; }
DisableMirror(bool disableOrNot)206     virtual DMError DisableMirror(bool disableOrNot) { return DMError::DM_ERROR_INVALID_PERMISSION; }
StopExpand(const std::vector<ScreenId> & expandScreenIds)207     virtual DMError StopExpand(const std::vector<ScreenId>& expandScreenIds) { return DMError::DM_OK; }
RemoveVirtualScreenFromGroup(std::vector<ScreenId> screens)208     virtual void RemoveVirtualScreenFromGroup(std::vector<ScreenId> screens) {}
SetScreenActiveMode(ScreenId screenId,uint32_t modeId)209     virtual DMError SetScreenActiveMode(ScreenId screenId, uint32_t modeId) { return DMError::DM_OK; }
SetVirtualPixelRatio(ScreenId screenId,float virtualPixelRatio)210     virtual DMError SetVirtualPixelRatio(ScreenId screenId, float virtualPixelRatio) { return DMError::DM_OK; }
SetVirtualPixelRatioSystem(ScreenId screenId,float virtualPixelRatio)211     virtual DMError SetVirtualPixelRatioSystem(ScreenId screenId, float virtualPixelRatio)
212     {
213         return DMError::DM_OK;
214     }
SetDefaultDensityDpi(ScreenId screenId,float virtualPixelRatio)215     virtual DMError SetDefaultDensityDpi(ScreenId screenId, float virtualPixelRatio)
216     {
217         return DMError::DM_OK;
218     }
SetResolution(ScreenId screenId,uint32_t width,uint32_t height,float virtualPixelRatio)219     virtual DMError SetResolution(ScreenId screenId, uint32_t width, uint32_t height,
220         float virtualPixelRatio) { return DMError::DM_OK; }
GetDensityInCurResolution(ScreenId screenId,float & virtualPixelRatio)221     virtual DMError GetDensityInCurResolution(ScreenId screenId,
222         float& virtualPixelRatio) { return DMError::DM_OK; }
ResizeVirtualScreen(ScreenId screenId,uint32_t width,uint32_t height)223     virtual DMError ResizeVirtualScreen(ScreenId screenId, uint32_t width,
224         uint32_t height) { return DMError::DM_OK; }
225     virtual DMError AddSurfaceNodeToDisplay(DisplayId displayId,
226         std::shared_ptr<class RSSurfaceNode>& surfaceNode, bool onTop = true) { return DMError::DM_OK; }
RemoveSurfaceNodeFromDisplay(DisplayId displayId,std::shared_ptr<class RSSurfaceNode> & surfaceNode)227     virtual DMError RemoveSurfaceNodeFromDisplay(DisplayId displayId,
228         std::shared_ptr<class RSSurfaceNode>& surfaceNode) { return DMError::DM_OK; }
DumpAllScreensInfo(std::string & dumpInfo)229     virtual void DumpAllScreensInfo(std::string& dumpInfo) {}
DumpSpecialScreenInfo(ScreenId id,std::string & dumpInfo)230     virtual void DumpSpecialScreenInfo(ScreenId id, std::string& dumpInfo) {}
SetPrimaryDisplaySystemDpi(float dpi)231     virtual DMError SetPrimaryDisplaySystemDpi(float dpi) { return DMError::DM_OK; }
232     // Fold Screen
SetFoldDisplayMode(const FoldDisplayMode displayMode)233     virtual void SetFoldDisplayMode(const FoldDisplayMode displayMode) {}
SetFoldDisplayModeAsync(const FoldDisplayMode displayMode)234     virtual void SetFoldDisplayModeAsync(const FoldDisplayMode displayMode) {}
235     virtual DMError SetFoldDisplayModeFromJs(const FoldDisplayMode displayMode,
236         std::string reason = "") { return DMError::DM_OK; }
237 
SetDisplayScale(ScreenId screenId,float scaleX,float scaleY,float pivotX,float pivotY)238     virtual void SetDisplayScale(ScreenId screenId, float scaleX, float scaleY, float pivotX, float pivotY) {}
239 
SetFoldStatusLocked(bool locked)240     virtual void SetFoldStatusLocked(bool locked) {}
SetFoldStatusLockedFromJs(bool locked)241     virtual DMError SetFoldStatusLockedFromJs(bool locked) { return DMError::DM_OK; }
SetFoldStatusExpandAndLocked(bool locked)242     virtual void SetFoldStatusExpandAndLocked(bool locked) {}
243 
GetFoldDisplayMode()244     virtual FoldDisplayMode GetFoldDisplayMode() { return FoldDisplayMode::UNKNOWN; }
GetPhysicalScreenIds(std::vector<ScreenId> & screenIds)245     virtual DMError GetPhysicalScreenIds(std::vector<ScreenId>& screenIds) { return DMError::DM_OK; }
246 
IsFoldable()247     virtual bool IsFoldable() { return false; }
IsCaptured()248     virtual bool IsCaptured() { return false; }
249 
GetFoldStatus()250     virtual FoldStatus GetFoldStatus() { return FoldStatus::UNKNOWN; }
GetSuperFoldStatus()251     virtual SuperFoldStatus GetSuperFoldStatus() { return SuperFoldStatus::UNKNOWN; }
GetSuperRotation()252     virtual float GetSuperRotation() { return -1.f; }
SetLandscapeLockStatus(bool isLocked)253     virtual void SetLandscapeLockStatus(bool isLocked) {}
GetExtendScreenConnectStatus()254     virtual ExtendScreenConnectStatus GetExtendScreenConnectStatus() { return ExtendScreenConnectStatus::UNKNOWN; }
SetForceCloseHdr(ScreenId screenid,bool isForceCloseHdr)255     virtual void SetForceCloseHdr(ScreenId screenid, bool isForceCloseHdr) {}
256 
GetCurrentFoldCreaseRegion()257     virtual sptr<FoldCreaseRegion> GetCurrentFoldCreaseRegion() { return nullptr; }
GetLiveCreaseRegion(FoldCreaseRegion & region)258     virtual DMError GetLiveCreaseRegion(FoldCreaseRegion& region)
259     {
260         return DMError::DM_ERROR_DEVICE_NOT_SUPPORT;
261     }
262 
MakeUniqueScreen(const std::vector<ScreenId> & screenIds,std::vector<DisplayId> & displayIds)263     virtual DMError MakeUniqueScreen(const std::vector<ScreenId>& screenIds,
264         std::vector<DisplayId>& displayIds) { return DMError::DM_OK; }
265 
SetClient(const sptr<IScreenSessionManagerClient> & client)266     virtual void SetClient(const sptr<IScreenSessionManagerClient>& client) {}
SwitchUser()267     virtual void SwitchUser() {}
GetVirtualScreenFlag(ScreenId screenId)268     virtual VirtualScreenFlag GetVirtualScreenFlag(ScreenId screenId)
269     {
270         return VirtualScreenFlag::DEFAULT;
271     }
SetVirtualScreenFlag(ScreenId screenId,VirtualScreenFlag screenFlag)272     virtual DMError SetVirtualScreenFlag(ScreenId screenId, VirtualScreenFlag screenFlag)
273     {
274         return DMError::DM_ERROR_DEVICE_NOT_SUPPORT;
275     }
GetScreenProperty(ScreenId screenId)276     virtual ScreenProperty GetScreenProperty(ScreenId screenId) { return ScreenProperty(); }
GetDisplayNode(ScreenId screenId)277     virtual std::shared_ptr<RSDisplayNode> GetDisplayNode(ScreenId screenId) { return nullptr; }
278     virtual void UpdateScreenRotationProperty(ScreenId screenId, const RRectT<float>& bounds, float rotation,
279         ScreenPropertyChangeType screenPropertyChangeType, bool isSwitchUser = false) {}
UpdateScreenDirectionInfo(ScreenId screenId,const ScreenDirectionInfo & directionInfo,ScreenPropertyChangeType screenPropertyChangeType,const RRect & bounds)280     virtual void UpdateScreenDirectionInfo(ScreenId screenId, const ScreenDirectionInfo& directionInfo,
281         ScreenPropertyChangeType screenPropertyChangeType, const RRect& bounds) {}
UpdateAvailableArea(ScreenId screenId,DMRect area)282     virtual void UpdateAvailableArea(ScreenId screenId, DMRect area) {}
UpdateSuperFoldAvailableArea(ScreenId screenId,DMRect bArea,DMRect cArea)283     virtual void UpdateSuperFoldAvailableArea(ScreenId screenId, DMRect bArea, DMRect cArea) {}
UpdateSuperFoldExpandAvailableArea(ScreenId screenId,DMRect area)284     virtual void UpdateSuperFoldExpandAvailableArea(ScreenId screenId, DMRect area) {}
SetScreenOffDelayTime(int32_t delay)285     virtual int32_t SetScreenOffDelayTime(int32_t delay) { return 0; }
SetScreenOnDelayTime(int32_t delay)286     virtual int32_t SetScreenOnDelayTime(int32_t delay) { return 0; }
SetCameraStatus(int32_t cameraStatus,int32_t cameraPosition)287     virtual void SetCameraStatus(int32_t cameraStatus, int32_t cameraPosition) {}
GetCurvedCompressionArea()288     virtual uint32_t GetCurvedCompressionArea() { return 0; }
GetPhyScreenProperty(ScreenId screenId)289     virtual ScreenProperty GetPhyScreenProperty(ScreenId screenId) { return ScreenProperty(); }
NotifyDisplayChangeInfoChanged(const sptr<DisplayChangeInfo> & info)290     virtual void NotifyDisplayChangeInfoChanged(const sptr<DisplayChangeInfo>& info) {}
SetScreenPrivacyState(bool hasPrivate)291     virtual void SetScreenPrivacyState(bool hasPrivate) {}
SetPrivacyStateByDisplayId(DisplayId id,bool hasPrivate)292     virtual void SetPrivacyStateByDisplayId(DisplayId id, bool hasPrivate) {}
SetScreenPrivacyWindowList(DisplayId id,std::vector<std::string> privacyWindowList)293     virtual void SetScreenPrivacyWindowList(DisplayId id, std::vector<std::string> privacyWindowList) {}
GetAvailableArea(DisplayId displayId,DMRect & area)294     virtual DMError GetAvailableArea(DisplayId displayId, DMRect& area) { return DMError::DM_ERROR_DEVICE_NOT_SUPPORT; }
GetExpandAvailableArea(DisplayId displayId,DMRect & area)295     virtual DMError GetExpandAvailableArea(DisplayId displayId, DMRect& area)
296     {
297         return DMError::DM_ERROR_DEVICE_NOT_SUPPORT;
298     }
NotifyFoldToExpandCompletion(bool foldToExpand)299     virtual void NotifyFoldToExpandCompletion(bool foldToExpand) {}
NotifyScreenConnectCompletion(ScreenId screenId)300     virtual void NotifyScreenConnectCompletion(ScreenId screenId) {}
RecordEventFromScb(std::string description,bool needRecordEvent)301     virtual void RecordEventFromScb(std::string description, bool needRecordEvent) {}
GetDeviceScreenConfig()302     virtual DeviceScreenConfig GetDeviceScreenConfig() { return {}; }
SetVirtualScreenMaxRefreshRate(ScreenId id,uint32_t refreshRate,uint32_t & actualRefreshRate)303     virtual DMError SetVirtualScreenMaxRefreshRate(ScreenId id, uint32_t refreshRate,
304         uint32_t& actualRefreshRate) { return DMError::DM_OK; }
SetVirtualScreenRefreshRate(ScreenId screenId,uint32_t refreshInterval)305     virtual DMError SetVirtualScreenRefreshRate(ScreenId screenId, uint32_t refreshInterval)
306     {
307         return DMError::DM_OK;
308     }
ProxyForFreeze(const std::set<int32_t> & pidList,bool isProxy)309     virtual DMError ProxyForFreeze(const std::set<int32_t>& pidList, bool isProxy)
310     {
311         return DMError::DM_OK;
312     }
ResetAllFreezeStatus()313     virtual DMError ResetAllFreezeStatus()
314     {
315         return DMError::DM_OK;
316     }
317     virtual void SetVirtualScreenBlackList(ScreenId screenId, std::vector<uint64_t>& windowIdList,
318         std::vector<uint64_t> surfaceIdList = {}, std::vector<uint8_t> typeBlackList = {}) {}
SetVirtualDisplayMuteFlag(ScreenId screenId,bool muteFlag)319     virtual void SetVirtualDisplayMuteFlag(ScreenId screenId, bool muteFlag) {}
DisablePowerOffRenderControl(ScreenId screenId)320     virtual void DisablePowerOffRenderControl(ScreenId screenId) {}
321 
GetAllDisplayPhysicalResolution()322     virtual std::vector<DisplayPhysicalResolution> GetAllDisplayPhysicalResolution()
323     {
324         return std::vector<DisplayPhysicalResolution> {};
325     }
GetDisplayCapability(std::string & capabilitInfo)326     virtual DMError GetDisplayCapability(std::string& capabilitInfo)
327     {
328         return DMError::DM_OK;
329     }
SetVirtualScreenStatus(ScreenId screenId,VirtualScreenStatus screenStatus)330     virtual bool SetVirtualScreenStatus(ScreenId screenId, VirtualScreenStatus screenStatus) { return false; }
SetVirtualScreenSecurityExemption(ScreenId screenId,uint32_t pid,std::vector<uint64_t> & windowIdList)331     virtual DMError SetVirtualScreenSecurityExemption(ScreenId screenId, uint32_t pid,
332         std::vector<uint64_t>& windowIdList)
333     {
334         return DMError::DM_ERROR_DEVICE_NOT_SUPPORT;
335     }
336 
337     virtual std::shared_ptr<Media::PixelMap> GetScreenCapture(const CaptureOption& captureOption,
338         DmErrorCode* errorCode = nullptr)
339     {
340         *errorCode = DmErrorCode::DM_ERROR_DEVICE_NOT_SUPPORT;
341         return nullptr;
342     }
GetPrimaryDisplayInfo()343     virtual sptr<DisplayInfo> GetPrimaryDisplayInfo()
344     {
345         return nullptr;
346     }
347     virtual std::shared_ptr<Media::PixelMap> GetDisplaySnapshotWithOption(const CaptureOption& captureOption,
348         DmErrorCode* errorCode = nullptr)
349     {
350         *errorCode = DmErrorCode::DM_ERROR_DEVICE_NOT_SUPPORT;
351         return nullptr;
352     }
GetDisplayHDRSnapshotWithOption(const CaptureOption & captureOption,DmErrorCode & errorCode)353     virtual std::vector<std::shared_ptr<Media::PixelMap>> GetDisplayHDRSnapshotWithOption(
354         const CaptureOption& captureOption, DmErrorCode& errorCode)
355     {
356         errorCode = DmErrorCode::DM_ERROR_DEVICE_NOT_SUPPORT;
357         return { nullptr, nullptr };
358     }
SetScreenSkipProtectedWindow(const std::vector<ScreenId> & screenIds,bool isEnable)359     virtual DMError SetScreenSkipProtectedWindow(const std::vector<ScreenId> &screenIds, bool isEnable)
360     {
361         return DMError::DM_OK;
362     }
GetScreenCombination(ScreenId screenId)363     virtual ScreenCombination GetScreenCombination(ScreenId screenId) { return ScreenCombination::SCREEN_ALONE; }
GetIsRealScreen(ScreenId screenId)364     virtual bool GetIsRealScreen(ScreenId screenId) { return false; }
365     virtual DMError SetSystemKeyboardStatus(bool isTpKeyboardOn = false)
366     {
367         return DMError::DM_ERROR_DEVICE_NOT_SUPPORT;
368     }
SetDefaultMultiScreenModeWhenSwitchUser()369     virtual void SetDefaultMultiScreenModeWhenSwitchUser() {}
NotifyExtendScreenCreateFinish()370     virtual void NotifyExtendScreenCreateFinish() {}
NotifyExtendScreenDestroyFinish()371     virtual void NotifyExtendScreenDestroyFinish() {}
NotifyScreenMaskAppear()372     virtual void NotifyScreenMaskAppear() {}
GetKeyboardState()373     virtual bool GetKeyboardState() { return false; }
GetDeviceStatus()374     virtual uint32_t GetDeviceStatus() { return 0; }
GetScreenAreaOfDisplayArea(DisplayId displayId,const DMRect & displayArea,ScreenId & screenId,DMRect & screenArea)375     virtual DMError GetScreenAreaOfDisplayArea(DisplayId displayId, const DMRect& displayArea,
376         ScreenId& screenId, DMRect& screenArea) { return DMError::DM_OK; }
SetVirtualScreenAutoRotation(ScreenId screenId,bool enable)377     virtual DMError SetVirtualScreenAutoRotation(ScreenId screenId, bool enable) { return DMError::DM_OK; }
SetScreenPrivacyWindowTagSwitch(ScreenId screenId,const std::vector<std::string> & privacyWindowTag,bool enable)378     virtual DMError SetScreenPrivacyWindowTagSwitch(ScreenId screenId, const std::vector<std::string>& privacyWindowTag,
379         bool enable) { return DMError::DM_OK; }
SynchronizePowerStatus(ScreenPowerState state)380     virtual bool SynchronizePowerStatus(ScreenPowerState state) { return false; }
381 };
382 } // namespace Rosen
383 } // namespace OHOS
384 
385 #endif // OHOS_ROSEN_SCREEN_SESSION_MANAGER_INTERFACE_H
386