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_CLIENT_PROXY_H 17 #define OHOS_ROSEN_SCREEN_SESSION_MANAGER_CLIENT_PROXY_H 18 19 #include <iremote_proxy.h> 20 21 #include "screen_session_manager_client_interface.h" 22 23 namespace OHOS::Rosen { 24 class ScreenSessionManagerClientProxy : public IRemoteProxy<IScreenSessionManagerClient> { 25 public: ScreenSessionManagerClientProxy(const sptr<IRemoteObject> & impl)26 explicit ScreenSessionManagerClientProxy(const sptr<IRemoteObject>& impl) 27 : IRemoteProxy<IScreenSessionManagerClient>(impl) {} 28 virtual ~ScreenSessionManagerClientProxy() = default; 29 30 void SwitchUserCallback(std::vector<int32_t> oldScbPids, int32_t currentScbPid) override; 31 void OnScreenConnectionChanged(ScreenId screenId, ScreenEvent screenEvent, 32 ScreenId rsId, const std::string& name) override; 33 void OnPropertyChanged(ScreenId screenId, 34 const ScreenProperty& property, ScreenPropertyChangeReason reason) override; 35 void OnPowerStatusChanged(DisplayPowerEvent event, EventStatus status, 36 PowerStateChangeReason reason) override; 37 void OnSensorRotationChanged(ScreenId screenId, float sensorRotation) override; 38 void OnHoverStatusChanged(ScreenId screenId, int32_t hoverStatus) override; 39 void OnScreenOrientationChanged(ScreenId screenId, float screenOrientation) override; 40 void OnScreenRotationLockedChanged(ScreenId screenId, bool isLocked) override; 41 void OnDisplayStateChanged(DisplayId defaultDisplayId, sptr<DisplayInfo> displayInfo, 42 const std::map<DisplayId, sptr<DisplayInfo>>& displayInfoMap, DisplayStateChangeType type) override; 43 void OnScreenshot(DisplayId displayId) override; 44 void OnImmersiveStateChanged(bool& immersive) override; 45 void SetDisplayNodeScreenId(ScreenId screenId, ScreenId displayNodeScreenId) override; 46 void OnGetSurfaceNodeIdsFromMissionIdsChanged(std::vector<uint64_t>& missionIds, 47 std::vector<uint64_t>& surfaceNodeIds, bool isBlackList = false) override; 48 void OnUpdateFoldDisplayMode(FoldDisplayMode displayMode) override; 49 void SetVirtualPixelRatioSystem(ScreenId screenId, float virtualPixelRatio) override; 50 void OnFoldStatusChangedReportUE(const std::vector<std::string>& screenFoldInfo) override; 51 void ScreenCaptureNotify(ScreenId mainScreenId, int32_t uid, const std::string& clientName) override; 52 53 private: 54 static inline BrokerDelegator<ScreenSessionManagerClientProxy> delegator_; 55 }; 56 } // namespace OHOS::Rosen 57 58 #endif // OHOS_ROSEN_SCREEN_SESSION_MANAGER_CLIENT_PROXY_H 59