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 const std::string AVSESSION_CAST_BEHAVIOR = "AVSESSION_CAST_BEHAVIOR"; 86 87 const std::string ORG_PKG = "ORG_PKG"; 88 const std::string HOST_PKG = "HOST_PKG"; 89 const std::string TO_CALL_PKG = "TO_CALL_PKG"; 90 const std::string TRIGGER_MODE = "TRIGGER_MODE"; 91 const std::string FUNC = "FUNC"; 92 93 const std::string BIZ_SCENE = "BIZ_SCENE"; 94 const std::string BIZ_STAGE = "BIZ_STAGE"; 95 96 const std::string STAGE_RES = "STAGE_RES"; 97 const std::string BIZ_STATE = "BIZ_STATE"; 98 const std::string ERROR_CODE = "ERROR_CODE"; 99 100 const std::string DISCOVERY_DEVICE_LIST = "DISCOVERY_DEVICE_LIST"; 101 const std::string LOCAL_UDID = "LOCAL_UDID"; 102 const std::string LOCAL_NET_ID = "LOCAL_NET_ID"; 103 const std::string LOCAL_DEV_TYPE = "LOCAL_DEV_TYPE"; 104 const std::string PEER_UDID = "PEER_UDID"; 105 const std::string PEER_BT_MAC = "PEER_BT_MAC"; 106 const std::string PEER_NET_ID = "PEER_NET_ID"; 107 const std::string PEER_DEV_TYPE = "PEER_DEV_TYPE"; 108 const std::string PEER_DEV_NAME = "PEER_DEV_NAME"; 109 const std::string IS_TRUST = "IS_TRUST"; 110 const std::string LOCAL_SESS_NAME = "LOCAL_SESS_NAME"; 111 const std::string PEER_SESS_NAME = "PEER_SESS_NAME"; 112 113 const std::string DEV_PHONE = "00E"; 114 const std::string DEV_LAPTOP = "00C"; 115 const std::string AVSESSION_PKG_NAME = "av_session"; 116 const std::string CAST_ENGINE_PKG = "cast_engine_service"; 117 const std::string MEDIA_CONTROL_PKG = "mediacontroller"; 118 119 constexpr uint32_t DEVICE_ID_MIN_LEN = 10; 120 } // namespace OHOS::AVSession 121 122 #endif // OHOS_AV_SESSION_RADAR_CONSTANTS_H