• 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_LITE_INTERFACE_H
17 #define OHOS_ROSEN_SCREEN_SESSION_MANAGER_LITE_INTERFACE_H
18 
19 #include <iremote_broker.h>
20 #include <cinttypes>
21 #include "dm_common.h"
22 #include "zidl/display_manager_agent_interface.h"
23 #include "display_info.h"
24 #include "fold_screen_info.h"
25 #include "screen_group_info.h"
26 
27 namespace OHOS {
28 namespace Rosen {
29 
30 class IScreenSessionManagerLite : public IRemoteBroker {
31 public:
32     DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.IScreenSessionManagerLite");
33 
34     enum class ScreenManagerLiteMessage : uint32_t {
35         TRANS_ID_GET_DEFAULT_DISPLAY_INFO = 0,
36         TRANS_ID_GET_DISPLAY_BY_ID,
37         TRANS_ID_GET_DISPLAY_BY_SCREEN,
38         TRANS_ID_REGISTER_DISPLAY_MANAGER_AGENT,
39         TRANS_ID_UNREGISTER_DISPLAY_MANAGER_AGENT,
40         TRANS_ID_WAKE_UP_BEGIN,
41         TRANS_ID_WAKE_UP_END,
42         TRANS_ID_SUSPEND_BEGIN,
43         TRANS_ID_SUSPEND_END,
44         TRANS_ID_SET_SPECIFIED_SCREEN_POWER,
45         TRANS_ID_SET_SCREEN_POWER_FOR_ALL,
46         TRANS_ID_GET_SCREEN_POWER,
47         TRANS_ID_SET_DISPLAY_STATE,
48         TRANS_ID_GET_DISPLAY_STATE,
49         TRANS_ID_GET_ALL_DISPLAYIDS,
50         TRANS_ID_NOTIFY_DISPLAY_EVENT,
51         TRANS_ID_GET_SCREEN_INFO_BY_ID,
52         TRANS_ID_GET_SCREEN_GROUP_INFO_BY_ID,
53         TRANS_ID_SET_SCREEN_ACTIVE_MODE,
54         TRANS_ID_GET_ALL_SCREEN_INFOS,
55         TRANS_ID_SET_ORIENTATION,
56         TRANS_ID_SET_VIRTUAL_PIXEL_RATIO,
57         TRANS_ID_IS_SCREEN_ROTATION_LOCKED,
58         TRANS_ID_SET_SCREEN_ROTATION_LOCKED,
59         TRANS_ID_HAS_PRIVATE_WINDOW,
60         TRANS_ID_SCENE_BOARD_SET_FOLD_DISPLAY_MODE,
61         TRANS_ID_SCENE_BOARD_GET_FOLD_DISPLAY_MODE,
62         TRANS_ID_SCENE_BOARD_IS_FOLDABLE,
63         TRANS_ID_SCENE_BOARD_GET_FOLD_STATUS,
64         TRANS_ID_SCENE_BOARD_GET_CURRENT_FOLD_CREASE_REGION,
65         TRANS_ID_GET_CUTOUT_INFO,
66         TRANS_ID_GET_SCREEN_POWER_AUTO,
67     };
68 
RegisterDisplayManagerAgent(const sptr<IDisplayManagerAgent> & displayManagerAgent,DisplayManagerAgentType type)69     virtual DMError RegisterDisplayManagerAgent(const sptr<IDisplayManagerAgent>& displayManagerAgent,
70         DisplayManagerAgentType type) { return DMError::DM_OK; }
UnregisterDisplayManagerAgent(const sptr<IDisplayManagerAgent> & displayManagerAgent,DisplayManagerAgentType type)71     virtual DMError UnregisterDisplayManagerAgent(const sptr<IDisplayManagerAgent>& displayManagerAgent,
72         DisplayManagerAgentType type) { return DMError::DM_OK; }
73 
GetFoldDisplayMode()74     virtual FoldDisplayMode GetFoldDisplayMode() { return FoldDisplayMode::UNKNOWN; }
SetFoldDisplayMode(const FoldDisplayMode)75     virtual void SetFoldDisplayMode(const FoldDisplayMode) {}
IsFoldable()76     virtual bool IsFoldable() { return false; };
GetFoldStatus()77     virtual FoldStatus GetFoldStatus() { return FoldStatus::UNKNOWN; };
GetDefaultDisplayInfo()78     virtual sptr<DisplayInfo> GetDefaultDisplayInfo() { return nullptr; }
GetDisplayInfoById(DisplayId displayId)79     virtual sptr<DisplayInfo> GetDisplayInfoById(DisplayId displayId) { return nullptr; }
GetCutoutInfo(DisplayId displayId)80     virtual sptr<CutoutInfo> GetCutoutInfo(DisplayId displayId) { return nullptr; }
81 };
82 } // namespace Rosen
83 } // namespace OHOS
84 
85 #endif // OHOS_ROSEN_SCREEN_SESSION_MANAGER_LITE_INTERFACE_H
86