/* * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef OHOS_ROSEN_WINDOW_SCENE_SESSION_RPOXY_H #define OHOS_ROSEN_WINDOW_SCENE_SESSION_RPOXY_H #include #include #include "interfaces/include/ws_common.h" #include "session/host/include/zidl/session_interface.h" namespace OHOS::Rosen { class SessionProxy : public IRemoteProxy { public: explicit SessionProxy(const sptr& impl) : IRemoteProxy(impl) {}; ~SessionProxy() {}; WSError Foreground(sptr property) override; WSError Background() override; WSError Disconnect() override; WSError Connect(const sptr& sessionStage, const sptr& eventChannel, const std::shared_ptr& surfaceNode, SystemSessionConfig& systemConfig, sptr property = nullptr, sptr token = nullptr) override; WSError UpdateActiveStatus(bool isActive) override; WSError PendingSessionActivation(const sptr abilitySessionInfo) override; bool WriteAbilitySessionInfoBasic(MessageParcel& data, const sptr abilitySessionInfo); WSError TerminateSession(const sptr abilitySessionInfo) override; WSError NotifySessionException(const sptr abilitySessionInfo) override; WSError OnSessionEvent(SessionEvent event) override; WSError RaiseToAppTop() override; WSError UpdateSessionRect(const WSRect& rect, const SizeChangeReason& reason) override; WSError CreateAndConnectSpecificSession(const sptr& sessionStage, const sptr& eventChannel, const std::shared_ptr& surfaceNode, sptr property, int32_t& persistentId, sptr& session, sptr token = nullptr) override; WSError DestroyAndDisconnectSpecificSession(const int32_t& persistentId) override; WSError OnNeedAvoid(bool status) override; AvoidArea GetAvoidAreaByType(AvoidAreaType type) override; WSError RequestSessionBack() override; WSError MarkProcessed(int32_t eventId) override; WSError SetGlobalMaximizeMode(MaximizeMode mode) override; WSError GetGlobalMaximizeMode(MaximizeMode& mode) override; WSError UpdateWindowSessionProperty(sptr property) override; WSError SetAspectRatio(float ratio) override; WSError UpdateWindowSceneAfterCustomAnimation(bool isAdd) override; WSError RaiseAboveTarget(int32_t subWindowId) override; WSError TransferAbilityResult(uint32_t resultCode, const AAFwk::Want& want) override; WSError TransferExtensionData(const AAFwk::WantParams& wantParams) override; void NotifyRemoteReady() override; void NotifyExtensionDied() override; WSError UpdateWindowAnimationFlag(bool needDefaultAnimationFlag) override; private: static inline BrokerDelegator delegator_; }; } // namespace OHOS::Rosen #endif // OHOS_ROSEN_WINDOW_SCENE_SESSION_RPOXY_H