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 */ 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 constexpr int32_t WEAR_ENABLED = 1; 25 const int32_t BT_VIRTUAL_DEVICE_ADD = 0; 26 const int32_t BT_VIRTUAL_DEVICE_REMOVE = 1; 27 constexpr const uint8_t CONN_REASON_MANUAL_VIRTUAL_CONNECT_PREEMPT_FLAG = 0x03; 28 29 enum BluetoothDeviceAction : int32_t { 30 WEAR_ACTION = 0, 31 UNWEAR_ACTION = 1, 32 ENABLEFROMREMOTE_ACTION, 33 DISABLEFROMREMOTE_ACTION, 34 ENABLE_WEAR_DETECTION_ACTION, 35 DISABLE_WEAR_DETECTION_ACTION, 36 USER_SELECTION_ACTION, 37 STOP_VIRTUAL_CALL, 38 CONNECTING_ACTION = 100, 39 CONNECT_ACTION, 40 DISCONNECT_ACTION, 41 VIRTUAL_DEVICE_ADD_ACTION, 42 VIRTUAL_DEVICE_REMOVE_ACTION, 43 }; 44 45 enum DeviceStatus : int32_t { 46 ADD = 0, 47 REMOVE = 1, 48 VIRTUAL_ADD = 2, 49 VIRTUAL_REMOVE = 3, 50 }; 51 52 enum EventType : int32_t { 53 DEFAULT_SELECT = 0, 54 USER_UNSELECT = 1, 55 USER_SELECT = 2, 56 }; 57 58 enum ScoCategory : int32_t { 59 SCO_DEFAULT = -1, 60 SCO_CALLULAR = 0, 61 SCO_VIRTUAL = 1, 62 SCO_RECOGNITION = 2, 63 }; 64 65 enum RecognitionStatus : int32_t { 66 RECOGNITION_CONNECTING = 0, 67 RECOGNITION_CONNECTED = 1, 68 RECOGNITION_DISCONNECTING = 2, 69 RECOGNITION_DISCONNECTED = 3, 70 }; 71 } // namespace Bluetooth 72 } // namespace OHOS 73 74 #endif // BLUETOOTH_DEVICE_UTILS_H