1 /* 2 * Copyright (C) 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_SERVICE_IPC_INTERFACE_CODE_H 17 #define BLUETOOTH_SERVICE_IPC_INTERFACE_CODE_H 18 19 #include "bluetooth_service_profile_interface_code.h" 20 #include "ipc_types.h" 21 22 /* SAID: 1130 */ 23 namespace OHOS { 24 namespace Bluetooth { 25 enum BluetoothBleAdvertiseCallbackInterfaceCode { 26 BT_BLE_ADVERTISE_CALLBACK_AUTO_STOP_EVENT = 0, 27 BT_BLE_ADVERTISE_CALLBACK_START_RESULT_EVENT, 28 BT_BLE_ADVERTISE_CALLBACK_ENABLE_RESULT_EVENT, 29 BT_BLE_ADVERTISE_CALLBACK_DISABLE_RESULT_EVENT, 30 BT_BLE_ADVERTISE_CALLBACK_STOP_RESULT_EVENT, 31 BT_BLE_ADVERTISE_CALLBACK_SET_ADV_DATA, 32 // The last code, if you want to add a new code, please add it before this 33 BT_BLE_ADVERTISE_CALLBACK_BUTT 34 }; 35 36 enum BluetoothBleAdvertiserInterfaceCode { 37 BLE_REGISTER_BLE_ADVERTISER_CALLBACK = 0, 38 BLE_DE_REGISTER_BLE_ADVERTISER_CALLBACK, 39 BLE_START_ADVERTISING, 40 BLE_START_ADVERTISING_WITH_RAWDATA, 41 BLE_STOP_ADVERTISING, 42 BLE_CLOSE, 43 BLE_GET_ADVERTISER_HANDLE, 44 BLE_SET_ADVERTISING_DATA, 45 BLE_ENABLE_ADVERTISING, 46 BLE_DISABLE_ADVERTISING, 47 // The last code, if you want to add a new code, please add it before this 48 BLE_ADVERTISER_BUTT 49 }; 50 51 enum BluetoothBleCentralManagerCallbackInterfaceCode { 52 BT_BLE_CENTRAL_MANAGER_CALLBACK = 0, 53 BT_BLE_CENTRAL_MANAGER_BLE_BATCH_CALLBACK, 54 BT_BLE_CENTRAL_MANAGER_CALLBACK_SCAN_FAILED, 55 BT_BLE_LPDEVICE_CALLBACK_NOTIFY_MSG_REPORT, 56 // The last code, if you want to add a new code, please add it before this 57 BT_BLE_CENTRAL_MANAGER_CALLBACK_BUTT 58 }; 59 60 enum BluetoothBleCentralManagerInterfaceCode { 61 BLE_REGISTER_BLE_CENTRAL_MANAGER_CALLBACK = 0, 62 BLE_DE_REGISTER_BLE_CENTRAL_MANAGER_CALLBACK, 63 BLE_START_SCAN, 64 BLE_START_SCAN_WITH_SETTINGS, 65 BLE_STOP_SCAN, 66 BLE_CONFIG_SCAN_FILTER, 67 BLE_REMOVE_SCAN_FILTER, 68 BLE_FREEZE_BY_RSS, 69 BLE_RESET_ALL_PROXY, 70 BLE_SET_LPDEVICE_ADV_PARAM, 71 BLE_SET_SCAN_REPORT_CHANNEL_TO_LPDEVICE, 72 BLE_ENABLE_SYNC_DATA_TO_LPDEVICE, 73 BLE_DISABLE_SYNC_DATA_TO_LPDEVICE, 74 BLE_SEND_PARAMS_TO_LPDEVICE, 75 BLE_IS_LPDEVICE_AVAILABLE, 76 BLE_SET_LPDEVICE_PARAM, 77 BLE_REMOVE_LPDEVICE_PARAM, 78 // The last code, if you want to add a new code, please add it before this 79 BLE_CENTRAL_MANAGER_BUTT 80 }; 81 82 enum BluetoothBlePeripheralObserverInterfaceCode { 83 BLE_ON_READ_REMOTE_RSSI_EVENT = 0, 84 BLE_PAIR_STATUS_CHANGED, 85 BLE_ACL_STATE_CHANGED, 86 // The last code, if you want to add a new code, please add it before this 87 BLE_PERIPHERAL_OBSERVER_BUTT 88 }; 89 90 enum BluetoothGattClientCallbackInterfaceCode { 91 BT_GATT_CLIENT_CALLBACK_CONNECT_STATE_CHANGE = 0, 92 BT_GATT_CLIENT_CALLBACK_CHARACTER_CHANGE, 93 BT_GATT_CLIENT_CALLBACK_CHARACTER_READ, 94 BT_GATT_CLIENT_CALLBACK_CHARACTER_WRITE, 95 BT_GATT_CLIENT_CALLBACK_DESCRIPTOR_READ, 96 BT_GATT_CLIENT_CALLBACK_DESCRIPTOR_WRITE, 97 BT_GATT_CLIENT_CALLBACK_MTU_UPDATE, 98 BT_GATT_CLIENT_CALLBACK_SERVICES_DISCOVER, 99 BT_GATT_CLIENT_CALLBACK_CONNECTION_PARA_CHANGE, 100 BT_GATT_CLIENT_CALLBACK_SERVICES_CHANGED, 101 BT_GATT_CLIENT_CALLBACK_READ_REMOTE_RSSI_VALUE, 102 // The last code, if you want to add a new code, please add it before this 103 BT_GATT_CLIENT_CALLBACK_BUTT 104 }; 105 106 enum BluetoothGattClientInterfaceCode { 107 BT_GATT_CLIENT_REGISTER_APP = 0, 108 BT_GATT_CLIENT_DEREGISTER_APP, 109 BT_GATT_CLIENT_CONNECT, 110 BT_GATT_CLIENT_DIS_CONNECT, 111 BT_GATT_CLIENT_DISCOVERY_SERVICES, 112 BT_GATT_CLIENT_READ_CHARACTERISTIC, 113 BT_GATT_CLIENT_WRITE_CHARACTERISTIC, 114 BT_GATT_CLIENT_SIGNED_WRITE_CHARACTERISTIC, 115 BT_GATT_CLIENT_READ_DESCRIPTOR, 116 BT_GATT_CLIENT_WRITE_DESCRIPTOR, 117 BT_GATT_CLIENT_REQUEST_EXCHANGE_MTU, 118 BT_GATT_CLIENT_GET_ALL_DEVICE, 119 BT_GATT_CLIENT_REQUEST_CONNECTION_PRIORITY, 120 BT_GATT_CLIENT_GET_SERVICES, 121 BT_GATT_CLIENT_REQUEST_FASTEST_CONNECTION, 122 BT_GATT_CLIENT_READ_REMOTE_RSSI_VALUE, 123 BT_GATT_CLIENT_REQUEST_NOTIFICATION, 124 // The last code, if you want to add a new code, please add it before this 125 BT_GATT_CLIENT_BUTT 126 }; 127 128 enum BluetoothGattServerCallbackInterfaceCode { 129 GATT_SERVER_CALLBACK_CHARACTERISTIC_READREQUEST = 0, 130 GATT_SERVER_CALLBACK_CONNECTIONSTATE_CHANGED, 131 GATT_SERVER_CALLBACK_ADD_SERVICE, 132 GATT_SERVER_CALLBACK_CHARACTERISTIC_READ_REQUEST, 133 GATT_SERVER_CALLBACK_CHARACTERISTIC_WRITE_REQUEST, 134 GATT_SERVER_CALLBACK_DESCRIPTOR_READ_REQUEST, 135 GATT_SERVER_CALLBACK_DESCRIPTOR_WRITE_REQUEST, 136 GATT_SERVER_CALLBACK_MTU_CHANGED, 137 GATT_SERVER_CALLBACK_NOTIFY_CONFIRM, 138 GATT_SERVER_CALLBACK_CONNECTION_PARAMETER_CHANGED, 139 // The last code, if you want to add a new code, please add it before this 140 GATT_SERVER_CALLBACK_BUTT 141 }; 142 143 enum BluetoothGattServerInterfaceCode { 144 GATT_SERVER_CLEAR_SERVICES = 0, 145 GATT_SERVER_ADD_SERVICE, 146 GATT_SERVER_REGISTER, 147 GATT_SERVER_DEREGISTER, 148 GATT_SERVER_CANCEL_CONNECTION, 149 GATT_SERVER_NOTIFY_CLIENT, 150 GATT_SERVER_REMOVE_SERVICE, 151 GATT_SERVER_RESPOND_CHARACTERISTIC_READ, 152 GATT_SERVER_RESPOND_CHARACTERISTIC_WRITE, 153 GATT_SERVER_RESPOND_DESCRIPTOR_READ, 154 GATT_SERVER_RESPOND_DESCRIPTOR_WRITE, 155 GATT_SERVER_CONNECT, 156 // The last code, if you want to add a new code, please add it before this 157 GATT_SERVER_BUTT 158 }; 159 160 enum class BluetoothHidHostObserverInterfaceCode { 161 COMMAND_ON_CONNECTION_STATE_CHANGED = MIN_TRANSACTION_ID + 0, 162 // The last code, if you want to add a new code, please add it before this 163 COMMAND_HID_HOST_OBSERVER_BUTT 164 }; 165 166 enum class BluetoothHidHostInterfaceCode { 167 COMMAND_CONNECT = MIN_TRANSACTION_ID + 0, 168 COMMAND_DISCONNECT, 169 COMMAND_GET_DEVICE_STATE, 170 COMMAND_GET_DEVICES_BY_STATES, 171 COMMAND_REGISTER_OBSERVER, 172 COMMAND_DEREGISTER_OBSERVER, 173 COMMAND_VCUN_PLUG, 174 COMMAND_SEND_DATA, 175 COMMAND_SET_REPORT, 176 COMMAND_GET_REPORT, 177 COMMAND_SET_CONNECT_STRATEGY, 178 COMMAND_GET_CONNECT_STRATEGY, 179 // The last code, if you want to add a new code, please add it before this 180 COMMAND_HID_HOST_BUTT 181 }; 182 183 enum BluetoothHostObserverInterfaceCode { 184 BT_HOST_OBSERVER_STATE_CHANGE = 0, 185 // ON_DIS_STA_CHANGE_CODE 186 BT_HOST_OBSERVER_DISCOVERY_STATE_CHANGE, 187 BT_HOST_OBSERVER_DISCOVERY_RESULT, 188 BT_HOST_OBSERVER_PAIR_REQUESTED, 189 BT_HOST_OBSERVER_PAIR_CONFIRMED, 190 BT_HOST_OBSERVER_SCAN_MODE_CHANGED, 191 BT_HOST_OBSERVER_DEVICE_NAME_CHANGED, 192 BT_HOST_OBSERVER_DEVICE_ADDR_CHANGED, 193 // The last code, if you want to add a new code, please add it before this 194 BT_HOST_OBSERVER_BUTT 195 }; 196 197 enum BluetoothHostInterfaceCode { 198 BT_REGISTER_OBSERVER = 0, 199 BT_DEREGISTER_OBSERVER, 200 BT_ENABLE, 201 BT_DISABLE, 202 BT_GETSTATE, 203 BT_GETPROFILE, 204 BT_GET_BLE, 205 BT_FACTORY_RESET, 206 BT_DISABLE_BLE, 207 BT_ENABLE_BLE, 208 BT_IS_BR_ENABLED, 209 BT_IS_BLE_ENABLED, 210 BT_GET_PROFILE_LIST, 211 BT_GET_MAXNUM_CONNECTED_AUDIODEVICES, 212 BT_GET_BT_STATE, 213 BT_GET_BT_PROFILE_CONNSTATE, 214 BT_GET_LOCAL_DEVICE_CLASS, 215 BT_SET_LOCAL_DEVICE_CLASS, 216 BT_GET_LOCAL_ADDRESS, 217 BT_GET_LOCAL_NAME, 218 BT_SET_LOCAL_NAME, 219 BT_GET_BT_SCAN_MODE, 220 BT_SET_BT_SCAN_MODE, 221 BT_GET_BONDABLE_MODE, 222 BT_SET_BONDABLE_MODE, 223 BT_START_BT_DISCOVERY, 224 BT_CANCEL_BT_DISCOVERY, 225 BT_IS_BT_DISCOVERING, 226 BT_GET_BT_DISCOVERY_END_MILLIS, 227 BT_GET_PAIRED_DEVICES, 228 BT_REMOVE_PAIR, 229 BT_REMOVE_ALL_PAIRS, 230 BT_REGISTER_REMOTE_DEVICE_OBSERVER, 231 BT_DEREGISTER_REMOTE_DEVICE_OBSERVER, 232 BT_GET_BLE_MAX_ADVERTISING_DATALENGTH, 233 GET_DEVICE_TYPE, 234 GET_PHONEBOOK_PERMISSION, 235 SET_PHONEBOOK_PERMISSION, 236 GET_MESSAGE_PERMISSION, 237 SET_MESSAGE_PERMISSION, 238 GET_POWER_MODE, 239 GET_DEVICE_NAME, 240 GET_DEVICE_ALIAS, 241 SET_DEVICE_ALIAS, 242 GET_DEVICE_BATTERY_LEVEL, 243 GET_PAIR_STATE, 244 START_PAIR, 245 CANCEL_PAIRING, 246 IS_BONDED_FROM_LOCAL, 247 IS_ACL_CONNECTED, 248 IS_ACL_ENCRYPTED, 249 GET_DEVICE_CLASS, 250 SET_DEVICE_PIN, 251 SET_DEVICE_PAIRING_CONFIRMATION, 252 SET_DEVICE_PASSKEY, 253 PAIR_REQUEST_PEPLY, 254 READ_REMOTE_RSSI_VALUE, 255 GET_LOCAL_SUPPORTED_UUIDS, 256 GET_DEVICE_UUIDS, 257 BT_REGISTER_BLE_ADAPTER_OBSERVER, 258 BT_DEREGISTER_BLE_ADAPTER_OBSERVER, 259 BT_REGISTER_BLE_PERIPHERAL_OBSERVER, 260 BT_DEREGISTER_BLE_PERIPHERAL_OBSERVER, 261 GET_LOCAL_PROFILE_UUIDS, 262 BT_SET_FAST_SCAN, 263 GET_RANDOM_ADDRESS, 264 SYNC_RANDOM_ADDRESS, 265 START_CREDIBLE_PAIR, 266 BT_COUNT_ENABLE_TIMES, 267 CONNECT_ALLOWED_PROFILES, 268 DISCONNECT_ALLOWED_PROFILES, 269 GET_DEVICE_PRODUCT_ID, 270 // The last code, if you want to add a new code, please add it before this 271 BT_HOST_BUTT 272 }; 273 274 enum BluetoothMapMceObserverInterfaceCode { 275 MCE_ON_ACTION_COMPLETED = 0, 276 MCE_ON_CONNECTION_STATE_CHANGED, 277 MCE_ON_EVENT_REPORTED, 278 MCE_ON_BMESSAGE_COMPLETED, 279 MCE_ON_MESSAGE_LIST_COMPLETED, 280 MCE_ON_CONVERSATION_LIST_COMPLETED, 281 // The last code, if you want to add a new code, please add it before this 282 MCE_OBSERVER_BUTT 283 }; 284 285 enum BluetoothMapMceInterfaceCode { 286 MCE_REGISTER_OBSERVER = 0, 287 MCE_DE_REGISTER_OBSERVER, 288 MCE_CONNECT, 289 MCE_DISCONNECT, 290 MCE_ISCONNECTED, 291 MCE_GET_CONNECT_DEVICES, 292 MCE_GET_DEVICES_BY_STATES, 293 MCE_GET_CONNECTION_STATE, 294 MCE_SET_CONNECTION_STRATEGY, 295 MCE_GET_CONNECTION_STRATEGY, 296 MCE_GET_UNREAD_MESSAGES, 297 MCE_GET_SUPPORTED_FEATURES, 298 MCE_SEND_MESSAGE, 299 MCE_SET_NOTIFICATION_FILTER, 300 MCE_GET_MESSAGES_LISTING, 301 MCE_GET_MESSAGE, 302 MCE_UPDATE_INBOX, 303 MCE_GET_CONVERSATION_LISTING, 304 MCE_SET_MESSAGE_STATUS, 305 MCE_SET_OWNER_STATUS, 306 MCE_GET_OWNER_STATUS, 307 MCE_GET_MAS_INSTANCE_INFO, 308 // The last code, if you want to add a new code, please add it before this 309 MCE_BUTT 310 }; 311 312 enum BluetoothMapMseObserverInterfaceCode { 313 MSE_ON_CONNECTION_STATE_CHANGED = 0, 314 MSE_ON_PERMISSION, 315 // The last code, if you want to add a new code, please add it before this 316 MSE_OBSERVER_BUTT 317 }; 318 319 enum BluetoothMapMseInterfaceCode { 320 MSE_REGISTER_OBSERVER = 0, 321 MSE_DEREGISTER_OBSERVER, 322 MSE_GET_DEVICE_STATE, 323 MSE_DISCONNECT, 324 MSE_GET_DEVICES_BY_STATES, 325 MSE_SET_CONNECTION_STRATEGY, 326 MSE_GET_CONNECTION_STRATEGY, 327 MSE_SET_ACCESS_AUTHORIZATION, 328 MSE_GET_ACCESS_AUTHORIZATION, 329 // The last code, if you want to add a new code, please add it before this 330 MSE_BUTT 331 }; 332 333 enum class BluetoothOppObserverInterfaceCode { 334 COMMAND_ON_RECEIVE_INCOMING_FILE_CHANGED = MIN_TRANSACTION_ID + 0, 335 COMMAND_ON_TRANSFER_STATE_CHANGED, 336 // The last code, if you want to add a new code, please add it before this 337 COMMAND_OPP_OBSERVER_BUTT 338 }; 339 340 enum class BluetoothOppInterfaceCode { 341 COMMAND_SEND_FILE = MIN_TRANSACTION_ID + 0, 342 COMMAND_SET_INCOMING_FILE_CONFIRMATION, 343 COMMAND_GET_CURRENT_TRANSFER_INFORMATION, 344 COMMAND_CANCEL_TRANSFER, 345 COMMAND_REGISTER_OBSERVER, 346 COMMAND_DEREGISTER_OBSERVER, 347 COMMAND_GET_DEVICE_STATE, 348 COMMAND_GET_DEVICES_BY_STATES, 349 // The last code, if you want to add a new code, please add it before this 350 COMMAND_OPP_BUTT 351 }; 352 353 enum class BluetoothPanObserverInterfaceCode { 354 COMMAND_ON_CONNECTION_STATE_CHANGED = MIN_TRANSACTION_ID + 0, 355 // The last code, if you want to add a new code, please add it before this 356 COMMAND_PAN_OBSERVER_BUTT 357 }; 358 359 enum class BluetoothPanInterfaceCode { 360 COMMAND_DISCONNECT = MIN_TRANSACTION_ID + 0, 361 COMMAND_GET_DEVICE_STATE, 362 COMMAND_GET_DEVICES_BY_STATES, 363 COMMAND_REGISTER_OBSERVER, 364 COMMAND_DEREGISTER_OBSERVER, 365 COMMAND_SET_TETHERING, 366 COMMAND_IS_TETHERING_ON, 367 // The last code, if you want to add a new code, please add it before this 368 COMMAND_PAN_BUTT 369 }; 370 371 372 enum BluetoothPbapPceObserverInterfaceCode { 373 PBAP_PCE_ON_SERVICE_CONNECTION_STATE_CHANGED = 0, 374 PBAP_PCE_ON_SERVICE_PASSWORD_REQUIRED, 375 PBAP_PCE_ON_ACTION_COMPLETED, 376 // The last code, if you want to add a new code, please add it before this 377 PBAP_PCE_OBSERVER_BUTT 378 }; 379 380 enum BluetoothPbapPceInterfaceCode { 381 PBAP_PCE_GET_DEVICE_STATE = 0, 382 PBAP_PCE_CONNECT, 383 PBAP_PCE_PULL_PHONEBOOK, 384 PBAP_PCE_SET_PHONEBOOK, 385 PBAP_PCE_PULL_VCARD_LISTING, 386 PBAP_PCE_PULL_VCARD_ENTRY, 387 PBAP_PCE_PULL_ISDOWNLOAGING, 388 PBAP_PCE_ABORT_DOWNLOADING, 389 PBAP_PCE_SET_DEVICE_PASSWORD, 390 PBAP_PCE_DISCONNECT, 391 PBAP_PCE_SET_CONNECT_STRATEGY, 392 PBAP_PCE_GET_CONNECT_STRATEGY, 393 PBAP_PCE_GET_DEVICES_BY_STATE, 394 PBAP_PCE_REGISTER_OBSERVER, 395 PBAP_PCE_DEREGISTER_OBSERVER, 396 // The last code, if you want to add a new code, please add it before this 397 PBAP_PCE_BUTT 398 }; 399 400 enum BluetoothPbapPseObserverInterfaceCode { 401 PBAP_PSE_ON_CONNECTION_STATE_CHANGE = 0, 402 // The last code, if you want to add a new code, please add it before this 403 PBAP_PSE_OBSERVER_BUTT 404 }; 405 406 enum BluetoothPbapPseInterfaceCode { 407 PBAP_PSE_GET_DEVICE_STATE = 0, 408 PBAP_PSE_GET_DEVICES_BY_STATES, 409 PBAP_PSE_DISCONNECT, 410 PBAP_PSE_SET_CONNECTION_STRATEGY, 411 PBAP_PSE_GET_CONNECTION_STRATEGY, 412 PBAP_PSE_REGISTER_OBSERVER, 413 PBAP_PSE_DEREGISTER_OBSERVER, 414 PBAP_PSE_SET_SHARE_TYPE, 415 PBAP_PSE_GET_SHARE_TYPE, 416 PBAP_PSE_SET_ACCESS_AUTHORIZATION, 417 PBAP_PSE_GET_ACCESS_AUTHORIZATION, 418 // The last code, if you want to add a new code, please add it before this 419 PBAP_PSE_BUTT 420 }; 421 422 enum BluetoothRemoteDeviceObserverInterfaceCode { 423 BT_REMOTE_DEVICE_OBSERVER_ACL_STATE = 0, 424 BT_REMOTE_DEVICE_OBSERVER_PAIR_STATUS, 425 BT_REMOTE_DEVICE_OBSERVER_REMOTE_UUID, 426 BT_REMOTE_DEVICE_OBSERVER_REMOTE_NAME, 427 BT_REMOTE_DEVICE_OBSERVER_REMOTE_ALIAS, 428 BT_REMOTE_DEVICE_OBSERVER_REMOTE_COD, 429 BT_REMOTE_DEVICE_OBSERVER_REMOTE_BATTERY_LEVEL, 430 // The last code, if you want to add a new code, please add it before this 431 BT_REMOTE_DEVICE_OBSERVER_BUTT 432 }; 433 434 enum BluetoothSocketInterfaceCode { 435 SOCKET_CONNECT = 0, 436 SOCKET_LISTEN, 437 DEREGISTER_SERVER_OBSERVER, 438 SOCKET_UPDATE_COC_PARAMS, 439 REGISTER_CLIENT_OBSERVER, 440 DEREGISTER_CLIENT_OBSERVER, 441 // The last code, if you want to add a new code, please add it before this 442 SOCKET_BUTT 443 }; 444 445 enum BluetoothSocketObserverInterfaceCode { 446 BT_SOCKET_OBSERVER_CONNECTION_STATE_CHANGED = 0, 447 // The last code, if you want to add a new code, please add it before this 448 BT_SOCKET_OBSERVER_BUTT 449 }; 450 451 enum BluetoothAudioManagerInterfaceCode { 452 WEAR_DETECTION_ENABLE = 0, 453 WEAR_DETECTION_DISABLE, 454 IS_WEAR_DETECTION_ENABLED, 455 BT_IS_WEAR_DETECTION_SUPPORTED, 456 BT_SEND_DEVICE_SELECTION, 457 // The last code, if you want to add a new code, please add it before this 458 WEAR_DETECTION_BUTT 459 }; 460 461 } // namespace Bluetooth 462 } // namespace OHOS 463 #endif // BLUETOOTH_SERVICE_IPC_INTERFACE_CODE_H