1 /* 2 * Copyright (C) 2023-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 * Description: supply Cast mirror player definition. 15 * Author: zhangjingnan 16 * Create: 2023-05-27 17 */ 18 19 #ifndef MIRROR_PLAYER_H 20 #define MIRROR_PLAYER_H 21 22 #include "cast_engine_common.h" 23 #include "i_mirror_player.h" 24 #include "i_mirror_player_impl.h" 25 #include "oh_remote_control_event.h" 26 27 namespace OHOS { 28 namespace CastEngine { 29 namespace CastEngineClient { 30 class MirrorPlayer : public IMirrorPlayer { 31 public: MirrorPlayer(sptr<IMirrorPlayerImpl> proxy)32 MirrorPlayer(sptr<IMirrorPlayerImpl> proxy) : proxy_(proxy) {}; 33 ~MirrorPlayer() override; 34 35 int32_t Play(const std::string &deviceId) override; 36 int32_t Pause(const std::string &deviceId) override; 37 int32_t SetAppInfo(const AppInfo &appInfo) override; 38 int32_t SetSurface(const std::string &surfaceId) override; 39 int32_t DeliverInputEvent(OHRemoteControlEvent event) override; 40 int32_t InjectEvent(const OHRemoteControlEvent &event) override; 41 int32_t Release() override; 42 int32_t GetDisplayId(std::string &displayId) override; 43 int32_t ResizeVirtualScreen(uint32_t width, uint32_t height) override; 44 45 private: 46 sptr<IMirrorPlayerImpl> proxy_; 47 }; 48 } // namespace CastEngineClient 49 } // namespace CastEngine 50 } // namespace OHOS 51 #endif