• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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: Cast mirror player interface.
15  * Author: zhangjingnan
16  * Create: 2023-05-27
17  */
18 
19 #ifndef I_CAST_MIRROR_PLAYER_H
20 #define I_CAST_MIRROR_PLAYER_H
21 
22 #include "cast_engine_common.h"
23 #include "oh_remote_control_event.h"
24 
25 namespace OHOS {
26 namespace CastEngine {
27 class EXPORT IMirrorPlayer {
28 public:
29     IMirrorPlayer() = default;
30     IMirrorPlayer(const IMirrorPlayer &) = delete;
31     IMirrorPlayer &operator = (const IMirrorPlayer &) = delete;
32     IMirrorPlayer(IMirrorPlayer &&) = delete;
33     IMirrorPlayer &operator = (IMirrorPlayer &&) = delete;
34     virtual ~IMirrorPlayer() = default;
35 
36     virtual int32_t Play(const std::string &deviceId) = 0;
37     virtual int32_t Pause(const std::string &deviceId) = 0;
38     virtual int32_t SetAppInfo(const AppInfo &appInfo) = 0;
39     virtual int32_t SetSurface(const std::string &surfaceId) = 0;
40     virtual int32_t DeliverInputEvent(OHRemoteControlEvent event) = 0;
41     virtual int32_t InjectEvent(const OHRemoteControlEvent &event) = 0;
42     virtual int32_t Release() = 0;
43     virtual int32_t GetDisplayId(std::string &displayId) = 0;
44     virtual int32_t ResizeVirtualScreen(uint32_t width, uint32_t height) = 0;
45 };
46 } // namespace CastEngine
47 } // namespace OHOS
48 
49 #endif
50