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 */ 15 16 #ifndef OHOS_AV_SESSION_RADAR_CONSTANTS_H 17 #define OHOS_AV_SESSION_RADAR_CONSTANTS_H 18 19 #include <cstdint> 20 #include <string> 21 22 namespace OHOS::AVSession { 23 enum class TriggerMode : int32_t { 24 UNKNOWN = -1, 25 MEDIA_CONTROL = 0, 26 APPLICATION = 1, 27 }; 28 29 enum class BizScene : int32_t { 30 CAST_DISCOVERY = 1, 31 CAST_START, 32 CAST_CONTROL, 33 CAST_END 34 }; 35 36 enum class StageResult : int32_t { 37 IDLE = 0, 38 SUCCESS, 39 FAIL, 40 CANCEL, 41 }; 42 43 enum class BizState : int32_t { 44 BEGIN = 1, 45 END, 46 }; 47 48 enum class TrustState : int32_t { 49 UNKNOWN = 0, 50 TRUST, 51 NO_TRUST, 52 }; 53 54 enum class CastDiscoveryStage : int32_t { 55 START = 1, 56 DISPLAY, 57 STOP, 58 }; 59 60 enum class CastStartStage : int32_t { 61 START = 1, 62 CONNECT, 63 STARTED, 64 }; 65 66 enum class CastControlStage : int32_t { 67 SEND_COMMAND = 1, 68 RECV_COMMAND, 69 }; 70 71 enum class CastStopStage : int32_t { 72 STOP_BEGIN = 1, 73 STOP_END, 74 }; 75 76 enum class TrustStatus : int32_t { 77 UNKOWN = 0, 78 TRUST = 1, 79 UNTRUST = 2, 80 }; 81 82 constexpr uint8_t AV_SESSION_SYSTEM_ID = 226; 83 constexpr uint8_t AV_SESSION_MODULE_ID = 18; 84 85 namespace { 86 const char* AVSESSION_CAST_BEHAVIOR = "AVSESSION_CAST_BEHAVIOR"; 87 88 const char* ORG_PKG = "ORG_PKG"; 89 const char* HOST_PKG = "HOST_PKG"; 90 const char* TO_CALL_PKG = "TO_CALL_PKG"; 91 const char* TRIGGER_MODE = "TRIGGER_MODE"; 92 const char* FUNC = "FUNC"; 93 94 const char* BIZ_SCENE = "BIZ_SCENE"; 95 const char* BIZ_STAGE = "BIZ_STAGE"; 96 97 const char* STAGE_RES = "STAGE_RES"; 98 const char* BIZ_STATE = "BIZ_STATE"; 99 const char* ERROR_CODE = "ERROR_CODE"; 100 101 const char* DISCOVERY_DEVICE_LIST = "DISCOVERY_DEVICE_LIST"; 102 const char* LOCAL_UDID = "LOCAL_UDID"; 103 const char* LOCAL_NET_ID = "LOCAL_NET_ID"; 104 const char* LOCAL_DEV_TYPE = "LOCAL_DEV_TYPE"; 105 const char* PEER_UDID = "PEER_UDID"; 106 const char* PEER_BT_MAC = "PEER_BT_MAC"; 107 const char* PEER_NET_ID = "PEER_NET_ID"; 108 const char* PEER_DEV_TYPE = "PEER_DEV_TYPE"; 109 const char* PEER_DEV_NAME = "PEER_DEV_NAME"; 110 const char* IS_TRUST = "IS_TRUST"; 111 const char* LOCAL_SESS_NAME = "LOCAL_SESS_NAME"; 112 const char* PEER_SESS_NAME = "PEER_SESS_NAME"; 113 const char* SOURCE_TYPE = "SOURCE_TYPE"; 114 115 const std::string DEV_PHONE = "00E"; 116 const std::string DEV_LAPTOP = "00C"; 117 const std::string AVSESSION_PKG_NAME = "av_session"; 118 const std::string CAST_ENGINE_PKG = "cast_engine_service"; 119 const std::string MEDIA_CONTROL_PKG = "mediacontroller"; 120 } 121 constexpr uint32_t DEVICE_ID_MIN_LEN = 10; 122 } // namespace OHOS::AVSession 123 124 #endif // OHOS_AV_SESSION_RADAR_CONSTANTS_H