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 <string> 20 #include "bluetooth_device.h" 21 22 namespace OHOS { 23 namespace Bluetooth { 24 25 enum BluetoothDeviceAction : int32_t { 26 WEAR_ACTION = 0, 27 UNWEAR_ACTION = 1, 28 ENABLEFROMREMOTE_ACTION, 29 DISABLEFROMREMOTE_ACTION, 30 ENABLE_WEAR_DETECTION_ACTION, 31 DISABLE_WEAR_DETECTION_ACTION, 32 USER_SELECTION_ACTION, 33 STOP_VIRTUAL_CALL, 34 CATEGORY_UPDATE_ACTION, 35 CONNECTING_ACTION = 100, 36 CONNECT_ACTION, 37 DISCONNECT_ACTION, 38 VIRTUAL_DEVICE_ADD_ACTION, 39 VIRTUAL_DEVICE_REMOVE_ACTION, 40 }; 41 42 enum DeviceStatus : int32_t { 43 ADD = 0, 44 REMOVE = 1, 45 VIRTUAL_ADD = 2, 46 VIRTUAL_REMOVE = 3, 47 }; 48 49 enum EventType : int32_t { 50 DEFAULT_SELECT = 0, 51 USER_UNSELECT = 1, 52 USER_SELECT = 2, 53 }; 54 55 enum ScoCategory : int32_t { 56 SCO_DEFAULT = -1, 57 SCO_CALLULAR = 0, 58 SCO_VIRTUAL = 1, 59 SCO_RECOGNITION = 2, 60 }; 61 62 enum AudioScoState : int32_t { 63 INIT = 0, 64 DISCONNECTED, 65 CONNECTED, 66 CONNECTING, 67 DISCONNECTING, 68 }; 69 70 std::string GetEncryptAddr(const std::string &addr); 71 } // namespace Bluetooth 72 } // namespace OHOS 73 74 #endif // BLUETOOTH_DEVICE_UTILS_H