• 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_ROSEN_SCREEN_SESSION_MANAGER_INTERFACE_H
17 #define OHOS_ROSEN_SCREEN_SESSION_MANAGER_INTERFACE_H
18 
19 #include "display_manager_interface.h"
20 #include "marshalling_helper.h"
21 
22 namespace OHOS {
23 namespace Rosen {
24 
25 class IScreenSessionManager : public IDisplayManager {
26 public:
27     DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.IScreenSessionManager");
28 
GetDefaultDisplayInfo()29     virtual sptr<DisplayInfo> GetDefaultDisplayInfo() override { return nullptr; }
GetDisplayInfoById(DisplayId displayId)30     virtual sptr<DisplayInfo> GetDisplayInfoById(DisplayId displayId) override { return nullptr; }
GetDisplayInfoByScreen(ScreenId screenId)31     virtual sptr<DisplayInfo> GetDisplayInfoByScreen(ScreenId screenId) override {return nullptr; }
HasPrivateWindow(DisplayId displayId,bool & hasPrivateWindow)32     virtual DMError HasPrivateWindow(DisplayId displayId, bool& hasPrivateWindow) override { return DMError::DM_OK; }
33 
CreateVirtualScreen(VirtualScreenOption option,const sptr<IRemoteObject> & displayManagerAgent)34     virtual ScreenId CreateVirtualScreen(VirtualScreenOption option,
35         const sptr<IRemoteObject>& displayManagerAgent) override { return -1; }
DestroyVirtualScreen(ScreenId screenId)36     virtual DMError DestroyVirtualScreen(ScreenId screenId) override { return DMError::DM_OK; }
SetVirtualScreenSurface(ScreenId screenId,sptr<IBufferProducer> surface)37     virtual DMError SetVirtualScreenSurface(ScreenId screenId, sptr<IBufferProducer> surface) override
38     {
39         return DMError::DM_OK;
40     }
SetOrientation(ScreenId screenId,Orientation orientation)41     virtual DMError SetOrientation(ScreenId screenId, Orientation orientation) override { return DMError::DM_OK; }
42     virtual std::shared_ptr<Media::PixelMap> GetDisplaySnapshot(DisplayId displayId,
43         DmErrorCode* errorCode = nullptr) override { return nullptr; }
SetScreenRotationLocked(bool isLocked)44     virtual DMError SetScreenRotationLocked(bool isLocked) override { return DMError::DM_OK; }
IsScreenRotationLocked(bool & isLocked)45     virtual DMError IsScreenRotationLocked(bool& isLocked) override { return DMError::DM_OK; }
46 
47     // colorspace, gamut
GetScreenSupportedColorGamuts(ScreenId screenId,std::vector<ScreenColorGamut> & colorGamuts)48     virtual DMError GetScreenSupportedColorGamuts(ScreenId screenId,
49         std::vector<ScreenColorGamut>& colorGamuts) override
50     {
51         return DMError::DM_OK;
52     }
GetScreenColorGamut(ScreenId screenId,ScreenColorGamut & colorGamut)53     virtual DMError GetScreenColorGamut(ScreenId screenId, ScreenColorGamut& colorGamut) override
54     {
55         return DMError::DM_OK;
56     }
SetScreenColorGamut(ScreenId screenId,int32_t colorGamutIdx)57     virtual DMError SetScreenColorGamut(ScreenId screenId, int32_t colorGamutIdx) override { return DMError::DM_OK; }
GetScreenGamutMap(ScreenId screenId,ScreenGamutMap & gamutMap)58     virtual DMError GetScreenGamutMap(ScreenId screenId, ScreenGamutMap& gamutMap) override { return DMError::DM_OK; }
SetScreenGamutMap(ScreenId screenId,ScreenGamutMap gamutMap)59     virtual DMError SetScreenGamutMap(ScreenId screenId, ScreenGamutMap gamutMap) override { return DMError::DM_OK; }
SetScreenColorTransform(ScreenId screenId)60     virtual DMError SetScreenColorTransform(ScreenId screenId) override { return DMError::DM_OK; }
61 
RegisterDisplayManagerAgent(const sptr<IDisplayManagerAgent> & displayManagerAgent,DisplayManagerAgentType type)62     virtual DMError RegisterDisplayManagerAgent(const sptr<IDisplayManagerAgent>& displayManagerAgent,
63         DisplayManagerAgentType type) override { return DMError::DM_OK; }
UnregisterDisplayManagerAgent(const sptr<IDisplayManagerAgent> & displayManagerAgent,DisplayManagerAgentType type)64     virtual DMError UnregisterDisplayManagerAgent(const sptr<IDisplayManagerAgent>& displayManagerAgent,
65         DisplayManagerAgentType type) override { return DMError::DM_OK; }
WakeUpBegin(PowerStateChangeReason reason)66     virtual bool WakeUpBegin(PowerStateChangeReason reason) override { return false; }
WakeUpEnd()67     virtual bool WakeUpEnd() override { return false; }
SuspendBegin(PowerStateChangeReason reason)68     virtual bool SuspendBegin(PowerStateChangeReason reason) override { return false; }
SuspendEnd()69     virtual bool SuspendEnd() override { return false; }
SetScreenPowerForAll(ScreenPowerState state,PowerStateChangeReason reason)70     virtual bool SetScreenPowerForAll(ScreenPowerState state, PowerStateChangeReason reason) override { return false; }
GetScreenPower(ScreenId dmsScreenId)71     virtual ScreenPowerState GetScreenPower(ScreenId dmsScreenId) override { return ScreenPowerState::INVALID_STATE; }
SetDisplayState(DisplayState state)72     virtual bool SetDisplayState(DisplayState state) override { return false; }
GetDisplayState(DisplayId displayId)73     virtual DisplayState GetDisplayState(DisplayId displayId) override {return DisplayState::UNKNOWN; }
GetAllDisplayIds()74     virtual std::vector<DisplayId> GetAllDisplayIds() override { return std::vector<DisplayId>{}; }
GetCutoutInfo(DisplayId displayId)75     virtual sptr<CutoutInfo> GetCutoutInfo(DisplayId displayId) override { return nullptr; }
NotifyDisplayEvent(DisplayEvent event)76     virtual void NotifyDisplayEvent(DisplayEvent event) override {}
SetFreeze(std::vector<DisplayId> displayIds,bool isFreeze)77     virtual bool SetFreeze(std::vector<DisplayId> displayIds, bool isFreeze) override { return false; }
GetScreenInfoById(ScreenId screenId)78     virtual sptr<ScreenInfo> GetScreenInfoById(ScreenId screenId) override { return nullptr; }
GetScreenGroupInfoById(ScreenId screenId)79     virtual sptr<ScreenGroupInfo> GetScreenGroupInfoById(ScreenId screenId) override { return nullptr; }
GetAllScreenInfos(std::vector<sptr<ScreenInfo>> & screenInfos)80     virtual DMError GetAllScreenInfos(std::vector<sptr<ScreenInfo>>& screenInfos) override { return DMError::DM_OK; }
MakeMirror(ScreenId mainScreenId,std::vector<ScreenId> mirrorScreenIds,ScreenId & screenGroupId)81     virtual DMError MakeMirror(ScreenId mainScreenId, std::vector<ScreenId> mirrorScreenIds,
82         ScreenId& screenGroupId) override { return DMError::DM_OK; }
MakeExpand(std::vector<ScreenId> screenId,std::vector<Point> startPoints,ScreenId & screenGroupId)83     virtual DMError MakeExpand(std::vector<ScreenId> screenId, std::vector<Point> startPoints,
84         ScreenId& screenGroupId) override { return DMError::DM_OK; }
StopMirror(const std::vector<ScreenId> & mirrorScreenIds)85     virtual DMError StopMirror(const std::vector<ScreenId>& mirrorScreenIds) override { return DMError::DM_OK; }
StopExpand(const std::vector<ScreenId> & expandScreenIds)86     virtual DMError StopExpand(const std::vector<ScreenId>& expandScreenIds) override { return DMError::DM_OK; }
RemoveVirtualScreenFromGroup(std::vector<ScreenId> screens)87     virtual void RemoveVirtualScreenFromGroup(std::vector<ScreenId> screens) override {}
SetScreenActiveMode(ScreenId screenId,uint32_t modeId)88     virtual DMError SetScreenActiveMode(ScreenId screenId, uint32_t modeId) override { return DMError::DM_OK; }
SetVirtualPixelRatio(ScreenId screenId,float virtualPixelRatio)89     virtual DMError SetVirtualPixelRatio(ScreenId screenId, float virtualPixelRatio) override { return DMError::DM_OK; }
90     virtual DMError AddSurfaceNodeToDisplay(DisplayId displayId,
91         std::shared_ptr<class RSSurfaceNode>& surfaceNode, bool onTop = true) override { return DMError::DM_OK; }
RemoveSurfaceNodeFromDisplay(DisplayId displayId,std::shared_ptr<class RSSurfaceNode> & surfaceNode)92     virtual DMError RemoveSurfaceNodeFromDisplay(DisplayId displayId,
93         std::shared_ptr<class RSSurfaceNode>& surfaceNode) override { return DMError::DM_OK; }
DumpAllScreensInfo(std::string & dumpInfo)94     virtual void DumpAllScreensInfo(std::string& dumpInfo) {}
DumpSpecialScreenInfo(ScreenId id,std::string & dumpInfo)95     virtual void DumpSpecialScreenInfo(ScreenId id, std::string& dumpInfo) {}
96     // Fold Screen
SetFoldDisplayMode(const FoldDisplayMode displayMode)97     void SetFoldDisplayMode(const FoldDisplayMode displayMode) override {}
98 
GetFoldDisplayMode()99     FoldDisplayMode GetFoldDisplayMode() override { return FoldDisplayMode::UNKNOWN; }
100 
IsFoldable()101     bool IsFoldable() override { return false; };
102 
GetFoldStatus()103     FoldStatus GetFoldStatus() override { return FoldStatus::UNKNOWN; };
104 
GetCurrentFoldCreaseRegion()105     sptr<FoldCreaseRegion> GetCurrentFoldCreaseRegion() override { return nullptr; };
106 };
107 
108 } // namespace Rosen
109 } // namespace OHOS
110 
111 #endif // OHOS_ROSEN_SCREEN_SESSION_MANAGER_INTERFACE_H