• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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  * Description: Cast session implement class.
15  * Author: zhangge
16  * Create: 2022-07-19
17  */
18 
19 #ifndef CAST_SESSION_COMMON_H
20 #define CAST_SESSION_COMMON_H
21 
22 #include <array>
23 #include "cast_engine_common.h"
24 #include "cast_service_common.h"
25 
26 namespace OHOS {
27 namespace CastEngine {
28 namespace CastEngineService {
29 struct CastRemoteDeviceInfo {
30     CastInnerRemoteDevice remoteDevice;
31     DeviceState deviceState;
32 };
33 
34 enum class SessionState : uint8_t {
35     DEFAULT,
36     DISCONNECTED,
37     CONNECTING,
38     CONNECTED,
39     PLAYING,
40     PAUSED,
41     DISCONNECTING,
42     STREAM,
43     AUTHING,
44     SESSION_STATE_MAX,
45 };
46 
47 const std::array<std::string, static_cast<size_t>(SessionState::SESSION_STATE_MAX)> SESSION_STATE_STRING = {
48     "DEFAULT", "DISCONNECTED", "CONNECTING", "CONNECTED", "PLAYING", "PAUSED", "DISCONNECTING", "STREAM",
49     "AUTHING"
50 };
51 } // namespace CastEngineService
52 } // namespace CastEngine
53 } // namespace OHOS
54 
55 #endif
56