• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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     CATEGORY_UPDATE_ACTION,
39     CONNECTING_ACTION = 100,
40     CONNECT_ACTION,
41     DISCONNECT_ACTION,
42     VIRTUAL_DEVICE_ADD_ACTION,
43     VIRTUAL_DEVICE_REMOVE_ACTION,
44 };
45 
46 enum DeviceStatus : int32_t {
47     ADD = 0,
48     REMOVE = 1,
49     VIRTUAL_ADD = 2,
50     VIRTUAL_REMOVE = 3,
51 };
52 
53 enum EventType : int32_t {
54     DEFAULT_SELECT = 0,
55     USER_UNSELECT = 1,
56     USER_SELECT = 2,
57 };
58 
59 enum ScoCategory : int32_t {
60     SCO_DEFAULT = -1,
61     SCO_CALLULAR = 0,
62     SCO_VIRTUAL = 1,
63     SCO_RECOGNITION = 2,
64 };
65 
66 enum RecognitionStatus : int32_t {
67     RECOGNITION_CONNECTING = 0,
68     RECOGNITION_CONNECTED = 1,
69     RECOGNITION_DISCONNECTING = 2,
70     RECOGNITION_DISCONNECTED = 3,
71 };
72 
73 } // namespace Bluetooth
74 } // namespace OHOS
75 
76 #endif // BLUETOOTH_DEVICE_UTILS_H