1 /* 2 * Copyright (c) 2024 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_CAMERA_ICAMERA_SCENE_SESSION_MANAGER_H 17 #define OHOS_CAMERA_ICAMERA_SCENE_SESSION_MANAGER_H 18 19 #include "focus_change_info.h" 20 #include <iremote_broker.h> 21 #include "icamera_window_manager_callback.h" 22 23 namespace OHOS { 24 namespace CameraStandard { 25 enum class WindowManagerAgentType : uint32_t { 26 WINDOW_MANAGER_AGENT_TYPE_CAMERA_WINDOW = 9, 27 }; 28 29 class IWindowManager : public IRemoteBroker { 30 public: 31 DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.IWindowManager"); 32 enum class WindowManagerMessage : uint32_t { 33 TRANS_ID_REGISTER_WINDOW_MANAGER_AGENT = 7, 34 TRANS_ID_UNREGISTER_WINDOW_MANAGER_AGENT = 8, 35 }; 36 37 virtual int32_t RegisterWindowManagerAgent(WindowManagerAgentType type, 38 const sptr<IWindowManagerAgent>& windowManagerAgent) = 0; 39 virtual int32_t UnregisterWindowManagerAgent(WindowManagerAgentType type, 40 const sptr<IWindowManagerAgent>& windowManagerAgent) = 0; 41 virtual void GetFocusWindowInfo(OHOS::Rosen::FocusChangeInfo& focusInfo) = 0; 42 }; 43 44 class ISceneSessionManager : public IWindowManager { 45 public: 46 DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.ISceneSessionManager"); 47 48 enum class SceneSessionManagerMessage : uint32_t { 49 TRANS_ID_REGISTER_WINDOW_MANAGER_AGENT = 4, 50 TRANS_ID_UNREGISTER_WINDOW_MANAGER_AGENT = 5, 51 TRANS_ID_GET_FOCUS_SESSION_INFO = 7, 52 }; 53 54 virtual int32_t RegisterWindowManagerAgent(WindowManagerAgentType type, 55 const sptr<IWindowManagerAgent>& windowManagerAgent) = 0; 56 virtual int32_t UnregisterWindowManagerAgent(WindowManagerAgentType type, 57 const sptr<IWindowManagerAgent>& windowManagerAgent) = 0; 58 virtual void GetFocusWindowInfo(OHOS::Rosen::FocusChangeInfo& focusInfo) = 0; 59 }; 60 } // namespace CameraStandard 61 } // namespace OHOS 62 #endif // OHOS_CAMERA_ICAMERA_SCENE_SESSION_MANAGER_H