1 /* 2 * Copyright (c) 2023-2025 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 BLUETOOTH_DEVICE_UTILS_H 17 #define BLUETOOTH_DEVICE_UTILS_H 18 19 #include "bluetooth_device.h" 20 21 namespace OHOS { 22 namespace Bluetooth { 23 24 enum BluetoothDeviceAction : int32_t { 25 WEAR_ACTION = 0, 26 UNWEAR_ACTION = 1, 27 ENABLEFROMREMOTE_ACTION, 28 DISABLEFROMREMOTE_ACTION, 29 ENABLE_WEAR_DETECTION_ACTION, 30 DISABLE_WEAR_DETECTION_ACTION, 31 USER_SELECTION_ACTION, 32 STOP_VIRTUAL_CALL, 33 CATEGORY_UPDATE_ACTION, 34 CONNECTING_ACTION = 100, 35 CONNECT_ACTION, 36 DISCONNECT_ACTION, 37 VIRTUAL_DEVICE_ADD_ACTION, 38 VIRTUAL_DEVICE_REMOVE_ACTION, 39 }; 40 41 enum DeviceStatus : int32_t { 42 ADD = 0, 43 REMOVE = 1, 44 VIRTUAL_ADD = 2, 45 VIRTUAL_REMOVE = 3, 46 }; 47 48 enum EventType : int32_t { 49 DEFAULT_SELECT = 0, 50 USER_UNSELECT = 1, 51 USER_SELECT = 2, 52 }; 53 54 enum ScoCategory : int32_t { 55 SCO_DEFAULT = -1, 56 SCO_CALLULAR = 0, 57 SCO_VIRTUAL = 1, 58 SCO_RECOGNITION = 2, 59 }; 60 61 enum RecognitionStatus : int32_t { 62 RECOGNITION_CONNECTING = 0, 63 RECOGNITION_CONNECTED = 1, 64 RECOGNITION_DISCONNECTING = 2, 65 RECOGNITION_DISCONNECTED = 3, 66 }; 67 enum AudioScoState : int32_t { 68 DISCONNECTED = 0, 69 CONNECTED = 1, 70 CONNECT_AFTER_DISCONNECTED = 2, 71 DISCONNECT_AFTER_CONNECTED = 3, 72 CONNECTING = 4, 73 DISCONNECTING = 5, 74 }; 75 enum AudioScoMode : int32_t { 76 DEFAULT_MODE = 0, 77 CALL_MODE = 1, 78 VOIP_MODE = 2, 79 REC_MODE = 3, 80 }; 81 82 } // namespace Bluetooth 83 } // namespace OHOS 84 85 #endif // BLUETOOTH_DEVICE_UTILS_H