xref: /btstack/src/btstack_defines.h (revision bdc352b16da8ddb06e0abca313290fcc1e06a43b)
1 /*
2  * Copyright (C) 2015 BlueKitchen GmbH
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * 1. Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  *    notice, this list of conditions and the following disclaimer in the
12  *    documentation and/or other materials provided with the distribution.
13  * 3. Neither the name of the copyright holders nor the names of
14  *    contributors may be used to endorse or promote products derived
15  *    from this software without specific prior written permission.
16  * 4. Any redistribution, use, or modification is done solely for
17  *    personal benefit and not for any commercial purpose or for
18  *    monetary gain.
19  *
20  * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS
21  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS
24  * RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
27  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
28  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
30  * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31  * SUCH DAMAGE.
32  *
33  * Please inquire about commercial licensing options at
34  * [email protected]
35  *
36  */
37 
38 /*
39  * btstack-defines.h
40  *
41  * BTstack definitions, events, and error codes */
42 
43 #ifndef BTSTACK_DEFINES_H
44 #define BTSTACK_DEFINES_H
45 
46 #include <stdint.h>
47 #include "btstack_linked_list.h"
48 
49 
50 // UNUSED macro
51 #ifndef UNUSED
52 #define UNUSED(x) (void)(sizeof(x))
53 #endif
54 
55 // TYPES
56 
57 // packet handler
58 typedef void (*btstack_packet_handler_t) (uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size);
59 
60 // packet callback supporting multiple registrations
61 typedef struct {
62     btstack_linked_item_t    item;
63     btstack_packet_handler_t callback;
64 } btstack_packet_callback_registration_t;
65 
66 // context callback supporting multiple registrations
67 typedef struct {
68   btstack_linked_item_t * item;
69   void (*callback)(void * context);
70   void * context;
71 } btstack_context_callback_registration_t;
72 
73 /**
74  * @brief 128 bit key used with AES128 in Security Manager
75  */
76 typedef uint8_t sm_key_t[16];
77 
78 // DEFINES
79 
80 // hci con handles (12 bit): 0x0000..0x0fff
81 #define HCI_CON_HANDLE_INVALID 0xffff
82 
83 
84 #define DAEMON_EVENT_PACKET     0x05
85 
86 // L2CAP data
87 #define L2CAP_DATA_PACKET       0x06
88 
89 // RFCOMM data
90 #define RFCOMM_DATA_PACKET      0x07
91 
92 // Attribute protocol data
93 #define ATT_DATA_PACKET         0x08
94 
95 // Security Manager protocol data
96 #define SM_DATA_PACKET          0x09
97 
98 // SDP query result - only used by daemon
99 // format: type (8), record_id (16), attribute_id (16), attribute_length (16), attribute_value (max 1k)
100 #define SDP_CLIENT_PACKET       0x0a
101 
102 // BNEP data
103 #define BNEP_DATA_PACKET        0x0b
104 
105 // Unicast Connectionless Data
106 #define UCD_DATA_PACKET         0x0c
107 
108 // GOEP data
109 #define GOEP_DATA_PACKET        0x0d
110 
111 // PBAP data
112 #define PBAP_DATA_PACKET        0x0e
113 
114 // AVRCP browsing data
115 #define AVRCP_BROWSING_DATA_PACKET     0x0f
116 
117 // MAP data
118 #define MAP_DATA_PACKET        0x10
119 
120 
121 // debug log messages
122 #define LOG_MESSAGE_PACKET      0xfc
123 
124 
125 // ERRORS
126 // last error code in 2.1 is 0x38 - we start with 0x50 for BTstack errors
127 
128 /* ENUM_START: BTSTACK_ERROR_CODE */
129 #define BTSTACK_CONNECTION_TO_BTDAEMON_FAILED              0x50
130 #define BTSTACK_ACTIVATION_FAILED_SYSTEM_BLUETOOTH         0x51
131 #define BTSTACK_ACTIVATION_POWERON_FAILED                  0x52
132 #define BTSTACK_ACTIVATION_FAILED_UNKNOWN                  0x53
133 #define BTSTACK_NOT_ACTIVATED                              0x54
134 #define BTSTACK_BUSY                                       0x55
135 #define BTSTACK_MEMORY_ALLOC_FAILED                        0x56
136 #define BTSTACK_ACL_BUFFERS_FULL                           0x57
137 
138 // l2cap errors - enumeration by the command that created them
139 #define L2CAP_COMMAND_REJECT_REASON_COMMAND_NOT_UNDERSTOOD 0x60
140 #define L2CAP_COMMAND_REJECT_REASON_SIGNALING_MTU_EXCEEDED 0x61
141 #define L2CAP_COMMAND_REJECT_REASON_INVALID_CID_IN_REQUEST 0x62
142 
143 #define L2CAP_CONNECTION_RESPONSE_RESULT_SUCCESSFUL        0x63
144 #define L2CAP_CONNECTION_RESPONSE_RESULT_PENDING           0x64
145 #define L2CAP_CONNECTION_RESPONSE_RESULT_REFUSED_PSM       0x65
146 #define L2CAP_CONNECTION_RESPONSE_RESULT_REFUSED_SECURITY  0x66
147 #define L2CAP_CONNECTION_RESPONSE_RESULT_REFUSED_RESOURCES 0x67
148 #define L2CAP_CONNECTION_RESPONSE_RESULT_ERTM_NOT_SUPPORTED 0x68
149 // should be L2CAP_CONNECTION_RTX_TIMEOUT
150 #define L2CAP_CONNECTION_RESPONSE_RESULT_RTX_TIMEOUT       0x69
151 #define L2CAP_CONNECTION_BASEBAND_DISCONNECT               0x6A
152 #define L2CAP_SERVICE_ALREADY_REGISTERED                   0x6B
153 #define L2CAP_DATA_LEN_EXCEEDS_REMOTE_MTU                  0x6C
154 #define L2CAP_SERVICE_DOES_NOT_EXIST                       0x6D
155 #define L2CAP_LOCAL_CID_DOES_NOT_EXIST                     0x6E
156 
157 #define RFCOMM_MULTIPLEXER_STOPPED                         0x70
158 #define RFCOMM_CHANNEL_ALREADY_REGISTERED                  0x71
159 #define RFCOMM_NO_OUTGOING_CREDITS                         0x72
160 #define RFCOMM_AGGREGATE_FLOW_OFF                          0x73
161 #define RFCOMM_DATA_LEN_EXCEEDS_MTU                        0x74
162 
163 #define SDP_HANDLE_ALREADY_REGISTERED                      0x80
164 #define SDP_QUERY_INCOMPLETE                               0x81
165 #define SDP_SERVICE_NOT_FOUND                              0x82
166 #define SDP_HANDLE_INVALID                                 0x83
167 #define SDP_QUERY_BUSY                                     0x84
168 
169 #define ATT_HANDLE_VALUE_INDICATION_IN_PROGRESS            0x90
170 #define ATT_HANDLE_VALUE_INDICATION_TIMEOUT                0x91
171 #define ATT_HANDLE_VALUE_INDICATION_DISCONNECT             0x92
172 
173 #define GATT_CLIENT_NOT_CONNECTED                          0x93
174 #define GATT_CLIENT_BUSY                                   0x94
175 #define GATT_CLIENT_IN_WRONG_STATE                         0x95
176 #define GATT_CLIENT_DIFFERENT_CONTEXT_FOR_ADDRESS_ALREADY_EXISTS 0x96
177 #define GATT_CLIENT_VALUE_TOO_LONG                         0x97
178 #define GATT_CLIENT_CHARACTERISTIC_NOTIFICATION_NOT_SUPPORTED 0x98
179 #define GATT_CLIENT_CHARACTERISTIC_INDICATION_NOT_SUPPORTED   0x99
180 
181 #define BNEP_SERVICE_ALREADY_REGISTERED                    0xA0
182 #define BNEP_CHANNEL_NOT_CONNECTED                         0xA1
183 #define BNEP_DATA_LEN_EXCEEDS_MTU                          0xA2
184 
185 // OBEX ERRORS
186 #define OBEX_UNKNOWN_ERROR                                 0xB0
187 #define OBEX_CONNECT_FAILED                                0xB1
188 #define OBEX_DISCONNECTED                                  0xB2
189 #define OBEX_NOT_FOUND                                     0xB3
190 #define OBEX_NOT_ACCEPTABLE                                0xB4
191 
192 #define AVDTP_SEID_DOES_NOT_EXIST                          0xC0
193 #define AVDTP_CONNECTION_DOES_NOT_EXIST                    0xC1
194 #define AVDTP_CONNECTION_IN_WRONG_STATE                    0xC2
195 #define AVDTP_STREAM_ENDPOINT_IN_WRONG_STATE               0xC3
196 #define AVDTP_STREAM_ENDPOINT_DOES_NOT_EXIST               0xC4
197 #define AVDTP_MEDIA_CONNECTION_DOES_NOT_EXIST              0xC5
198 /* ENUM_END */
199 
200 // DAEMON COMMANDS
201 
202 #define OGF_BTSTACK 0x3d
203 
204 // cmds for BTstack
205 // get state: @returns HCI_STATE
206 #define BTSTACK_GET_STATE                                  0x01
207 
208 // set power mode: param HCI_POWER_MODE
209 #define BTSTACK_SET_POWER_MODE                             0x02
210 
211 // set capture mode: param on
212 #define BTSTACK_SET_ACL_CAPTURE_MODE                       0x03
213 
214 // get BTstack version
215 #define BTSTACK_GET_VERSION                                0x04
216 
217 // get system Bluetooth state
218 #define BTSTACK_GET_SYSTEM_BLUETOOTH_ENABLED               0x05
219 
220 // set system Bluetooth state
221 #define BTSTACK_SET_SYSTEM_BLUETOOTH_ENABLED               0x06
222 
223 // enable inquiry scan for this client
224 #define BTSTACK_SET_DISCOVERABLE                           0x07
225 
226 // set global Bluetooth state
227 #define BTSTACK_SET_BLUETOOTH_ENABLED                      0x08
228 
229 // create l2cap channel: param bd_addr(48), psm (16)
230 #define L2CAP_CREATE_CHANNEL                               0x20
231 
232 // disconnect l2cap disconnect, param channel(16), reason(8)
233 #define L2CAP_DISCONNECT                                   0x21
234 
235 // register l2cap service: param psm(16), mtu (16)
236 #define L2CAP_REGISTER_SERVICE                             0x22
237 
238 // unregister l2cap disconnect, param psm(16)
239 #define L2CAP_UNREGISTER_SERVICE                           0x23
240 
241 // accept connection param bd_addr(48), dest cid (16)
242 #define L2CAP_ACCEPT_CONNECTION                            0x24
243 
244 // decline l2cap disconnect,param bd_addr(48), dest cid (16), reason(8)
245 #define L2CAP_DECLINE_CONNECTION                           0x25
246 
247 // create l2cap channel: param bd_addr(48), psm (16), mtu (16)
248 #define L2CAP_CREATE_CHANNEL_MTU                           0x26
249 
250 // register SDP Service Record: service record (size)
251 #define SDP_REGISTER_SERVICE_RECORD                        0x30
252 
253 // unregister SDP Service Record
254 #define SDP_UNREGISTER_SERVICE_RECORD                      0x31
255 
256 // Get remote RFCOMM services
257 #define SDP_CLIENT_QUERY_RFCOMM_SERVICES                   0x32
258 
259 // Get remote SDP services
260 #define SDP_CLIENT_QUERY_SERVICES                          0x33
261 
262 // RFCOMM "HCI" Commands
263 #define RFCOMM_CREATE_CHANNEL       0x40
264 #define RFCOMM_DISCONNECT     0x41
265 #define RFCOMM_REGISTER_SERVICE     0x42
266 #define RFCOMM_UNREGISTER_SERVICE   0x43
267 #define RFCOMM_ACCEPT_CONNECTION    0x44
268 #define RFCOMM_DECLINE_CONNECTION   0x45
269 #define RFCOMM_PERSISTENT_CHANNEL   0x46
270 #define RFCOMM_CREATE_CHANNEL_WITH_CREDITS   0x47
271 #define RFCOMM_REGISTER_SERVICE_WITH_CREDITS 0x48
272 #define RFCOMM_GRANT_CREDITS                 0x49
273 
274 // GAP Classic 0x50
275 #define GAP_DISCONNECT              0x50
276 
277 // GAP LE      0x60
278 #define GAP_LE_SCAN_START           0x60
279 #define GAP_LE_SCAN_STOP            0x61
280 #define GAP_LE_CONNECT              0x62
281 #define GAP_LE_CONNECT_CANCEL       0x63
282 #define GAP_LE_SET_SCAN_PARAMETERS  0x64
283 
284 // GATT (Client) 0x70
285 #define GATT_DISCOVER_ALL_PRIMARY_SERVICES                       0x70
286 #define GATT_DISCOVER_PRIMARY_SERVICES_BY_UUID16                 0x71
287 #define GATT_DISCOVER_PRIMARY_SERVICES_BY_UUID128                0x72
288 #define GATT_FIND_INCLUDED_SERVICES_FOR_SERVICE                  0x73
289 #define GATT_DISCOVER_CHARACTERISTICS_FOR_SERVICE                0x74
290 #define GATT_DISCOVER_CHARACTERISTICS_FOR_SERVICE_BY_UUID128     0x75
291 #define GATT_DISCOVER_CHARACTERISTIC_DESCRIPTORS                 0x76
292 #define GATT_READ_VALUE_OF_CHARACTERISTIC                        0x77
293 #define GATT_READ_LONG_VALUE_OF_CHARACTERISTIC                   0x78
294 #define GATT_WRITE_VALUE_OF_CHARACTERISTIC_WITHOUT_RESPONSE      0x79
295 #define GATT_WRITE_VALUE_OF_CHARACTERISTIC                       0x7A
296 #define GATT_WRITE_LONG_VALUE_OF_CHARACTERISTIC                  0x7B
297 #define GATT_RELIABLE_WRITE_LONG_VALUE_OF_CHARACTERISTIC         0x7C
298 #define GATT_READ_CHARACTERISTIC_DESCRIPTOR                      0X7D
299 #define GATT_READ_LONG_CHARACTERISTIC_DESCRIPTOR                 0X7E
300 #define GATT_WRITE_CHARACTERISTIC_DESCRIPTOR                     0X7F
301 #define GATT_WRITE_LONG_CHARACTERISTIC_DESCRIPTOR                0X80
302 #define GATT_WRITE_CLIENT_CHARACTERISTIC_CONFIGURATION           0X81
303 #define GATT_GET_MTU                                             0x82
304 
305 // SM 0x90
306 #define SM_SET_AUTHENTICATION_REQUIREMENTS 0x90
307 #define SM_SET_IO_CAPABILITIES             0x92
308 #define SM_BONDING_DECLINE                 0x93
309 #define SM_JUST_WORKS_CONFIRM              0x94
310 #define SM_NUMERIC_COMPARISON_CONFIRM      0x95
311 #define SM_PASSKEY_INPUT                   0x96
312 
313 // ATT
314 
315 // ..
316 // Internal properties reuse some GATT Characteristic Properties fields
317 #define ATT_DB_VERSION                                     0x01
318 
319 // EVENTS
320 
321 /**
322  * @format 1
323  * @param state
324  */
325 #define BTSTACK_EVENT_STATE                                0x60
326 
327 /**
328  * @format 1
329  * @param number_connections
330  */
331 #define BTSTACK_EVENT_NR_CONNECTIONS_CHANGED               0x61
332 
333 /**
334  * @format
335  */
336 #define BTSTACK_EVENT_POWERON_FAILED                       0x62
337 
338 /**
339  * @format 1
340  * @param discoverable
341  */
342 #define BTSTACK_EVENT_DISCOVERABLE_ENABLED                 0x66
343 
344 // Daemon Events
345 
346 /**
347  * @format 112
348  * @param major
349  * @param minor
350  @ @param revision
351  */
352 #define DAEMON_EVENT_VERSION                               0x63
353 
354 // data: system bluetooth on/off (bool)
355 /**
356  * @format 1
357  * param system_bluetooth_enabled
358  */
359 #define DAEMON_EVENT_SYSTEM_BLUETOOTH_ENABLED              0x64
360 
361 // data: event (8), len(8), status (8) == 0, address (48), name (1984 bits = 248 bytes)
362 
363 /*
364  * @format 1BT
365  * @param status == 0 to match read_remote_name_request
366  * @param address
367  * @param name
368  */
369 #define DAEMON_EVENT_REMOTE_NAME_CACHED                    0x65
370 
371 // internal - data: event(8)
372 #define DAEMON_EVENT_CONNECTION_OPENED                     0x67
373 
374 // internal - data: event(8)
375 #define DAEMON_EVENT_CONNECTION_CLOSED                     0x68
376 
377 // data: event(8), len(8), local_cid(16), credits(8)
378 #define DAEMON_EVENT_L2CAP_CREDITS                         0x74
379 
380 /**
381  * @format 12
382  * @param status
383  * @param psm
384  */
385 #define DAEMON_EVENT_L2CAP_SERVICE_REGISTERED              0x75
386 
387 /**
388  * @format 21
389  * @param rfcomm_cid
390  * @param credits
391  */
392 #define DAEMON_EVENT_RFCOMM_CREDITS                        0x84
393 
394 /**
395  * @format 11
396  * @param status
397  * @param channel_id
398  */
399 #define DAEMON_EVENT_RFCOMM_SERVICE_REGISTERED             0x85
400 
401 /**
402  * @format 11
403  * @param status
404  * @param server_channel_id
405  */
406 #define DAEMON_EVENT_RFCOMM_PERSISTENT_CHANNEL             0x86
407 
408 /**
409   * @format 14
410   * @param status
411   * @param service_record_handle
412   */
413 #define DAEMON_EVENT_SDP_SERVICE_REGISTERED                0x90
414 
415 
416 
417 // additional HCI events
418 
419 /**
420  * @brief Indicates HCI transport enters/exits Sleep mode
421  * @format 1
422  * @param active
423  */
424 #define HCI_EVENT_TRANSPORT_SLEEP_MODE                     0x69
425 
426 /**
427  * @brief Outgoing packet
428  */
429 #define HCI_EVENT_TRANSPORT_PACKET_SENT                    0x6E
430 
431 /**
432  * @format B
433  * @param handle
434  */
435 #define HCI_EVENT_SCO_CAN_SEND_NOW                         0x6F
436 
437 
438 // L2CAP EVENTS
439 
440 /**
441  * @format 1BH222222111
442  * @param status
443  * @param address
444  * @param handle
445  * @param psm
446  * @param local_cid
447  * @param remote_cid
448  * @param local_mtu
449  * @param remote_mtu
450  * @param flush_timeout
451  * @param incoming
452  * @param mode
453  * @param fcs
454  */
455 #define L2CAP_EVENT_CHANNEL_OPENED                         0x70
456 
457 /*
458  * @format 2
459  * @param local_cid
460  */
461 #define L2CAP_EVENT_CHANNEL_CLOSED                         0x71
462 
463 /**
464  * @format BH222
465  * @param address
466  * @param handle
467  * @param psm
468  * @param local_cid
469  * @param remote_cid
470  */
471 #define L2CAP_EVENT_INCOMING_CONNECTION                    0x72
472 
473 // ??
474 // data: event(8), len(8), handle(16)
475 #define L2CAP_EVENT_TIMEOUT_CHECK                          0x73
476 
477 /**
478  * @format H2222
479  * @param handle
480  * @param interval_min
481  * @param interval_max
482  * @param latencey
483  * @param timeout_multiplier
484  */
485 #define L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST    0x76
486 
487 // data: event(8), len(8), handle(16), result (16) (0 == ok, 1 == fail)
488  /**
489   * @format H2
490   * @param handle
491   * @param result
492   */
493 #define L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_RESPONSE   0x77
494 
495 /**
496  * @format 2
497  * @param local_cid
498  */
499 #define L2CAP_EVENT_CAN_SEND_NOW                           0x78
500 
501 // LE Data Channels
502 
503 /**
504  * @format 1BH2222
505  * @param address_type
506  * @param address
507  * @param handle
508  * @param psm
509  * @param local_cid
510  * @param remote_cid
511  * @param remote_mtu
512  */
513 #define L2CAP_EVENT_LE_INCOMING_CONNECTION                 0x79
514 
515 /**
516  * @format 11BH122222
517  * @param status
518  * @param address_type
519  * @param address
520  * @param handle
521  * @param incoming
522  * @param psm
523  * @param local_cid
524  * @param remote_cid
525  * @param local_mtu
526  * @param remote_mtu
527  */
528 #define L2CAP_EVENT_LE_CHANNEL_OPENED                      0x7a
529 
530 /*
531  * @format 2
532  * @param local_cid
533  */
534 #define L2CAP_EVENT_LE_CHANNEL_CLOSED                      0x7b
535 
536 /*
537  * @format 2
538  * @param local_cid
539  */
540 #define L2CAP_EVENT_LE_CAN_SEND_NOW                        0x7c
541 
542 /*
543  * @format 2
544  * @param local_cid
545  */
546 #define L2CAP_EVENT_LE_PACKET_SENT                         0x7d
547 
548 /*
549  * @format 2
550  * @param local_cid
551  */
552 #define L2CAP_EVENT_ERTM_BUFFER_RELEASED                   0x7e
553 
554 
555 // RFCOMM EVENTS
556 
557 /**
558  * @format 1B21221
559  * @param status
560  * @param bd_addr
561  * @param con_handle
562  * @param server_channel
563  * @param rfcomm_cid
564  * @param max_frame_size
565  * @param incoming
566  */
567 #define RFCOMM_EVENT_CHANNEL_OPENED                        0x80
568 
569 /**
570  * @format 2
571  * @param rfcomm_cid
572  */
573 #define RFCOMM_EVENT_CHANNEL_CLOSED                        0x81
574 
575 /**
576  * @format B12
577  * @param bd_addr
578  * @param server_channel
579  * @param rfcomm_cid
580  */
581 #define RFCOMM_EVENT_INCOMING_CONNECTION                   0x82
582 
583 /**
584  * @format 21
585  * @param rfcomm_cid
586  * @param line_status
587  */
588 #define RFCOMM_EVENT_REMOTE_LINE_STATUS                    0x83
589 
590 /**
591  * @format 21
592  * @param rfcomm_cid
593  * @param modem_status
594  */
595 #define RFCOMM_EVENT_REMOTE_MODEM_STATUS                   0x87
596 
597  /**
598   * TODO: format for variable data 2?
599   * param rfcomm_cid
600   * param rpn_data
601   */
602 #define RFCOMM_EVENT_PORT_CONFIGURATION                    0x88
603 
604 /**
605  * @format 2
606  * @param rfcomm_cid
607  */
608 #define RFCOMM_EVENT_CAN_SEND_NOW                          0x89
609 
610 
611 /**
612  * @format 1
613  * @param status
614  */
615 #define SDP_EVENT_QUERY_COMPLETE                                 0x91
616 
617 /**
618  * @format 1T
619  * @param rfcomm_channel
620  * @param name
621  */
622 #define SDP_EVENT_QUERY_RFCOMM_SERVICE                           0x92
623 
624 /**
625  * @format 22221
626  * @param record_id
627  * @param attribute_id
628  * @param attribute_length
629  * @param data_offset
630  * @param data
631  */
632 #define SDP_EVENT_QUERY_ATTRIBUTE_BYTE                           0x93
633 
634 /**
635  * @format 22LV
636  * @param record_id
637  * @param attribute_id
638  * @param attribute_length
639  * @param attribute_value
640  */
641 #define SDP_EVENT_QUERY_ATTRIBUTE_VALUE                          0x94
642 
643 /**
644  * @format 224
645  * @param total_count
646  * @param record_index
647  * @param record_handle
648  * @note Not provided by daemon, only used for internal testing
649  */
650 #define SDP_EVENT_QUERY_SERVICE_RECORD_HANDLE                    0x95
651 
652 /**
653  * @format H1
654  * @param handle
655  * @param status
656  */
657 #define GATT_EVENT_QUERY_COMPLETE                                0xA0
658 
659 /**
660  * @format HX
661  * @param handle
662  * @param service
663  */
664 #define GATT_EVENT_SERVICE_QUERY_RESULT                          0xA1
665 
666 /**
667  * @format HY
668  * @param handle
669  * @param characteristic
670  */
671 #define GATT_EVENT_CHARACTERISTIC_QUERY_RESULT                   0xA2
672 
673 /**
674  * @format H2X
675  * @param handle
676  * @param include_handle
677  * @param service
678  */
679 #define GATT_EVENT_INCLUDED_SERVICE_QUERY_RESULT                 0xA3
680 
681 /**
682  * @format HZ
683  * @param handle
684  * @param characteristic_descriptor
685  */
686 #define GATT_EVENT_ALL_CHARACTERISTIC_DESCRIPTORS_QUERY_RESULT   0xA4
687 
688 /**
689  * @format H2LV
690  * @param handle
691  * @param value_handle
692  * @param value_length
693  * @param value
694  */
695 #define GATT_EVENT_CHARACTERISTIC_VALUE_QUERY_RESULT             0xA5
696 
697 /**
698  * @format H22LV
699  * @param handle
700  * @param value_handle
701  * @param value_offset
702  * @param value_length
703  * @param value
704  */
705 #define GATT_EVENT_LONG_CHARACTERISTIC_VALUE_QUERY_RESULT        0xA6
706 
707 /**
708  * @format H2LV
709  * @param handle
710  * @param value_handle
711  * @param value_length
712  * @param value
713  */
714 #define GATT_EVENT_NOTIFICATION                                  0xA7
715 
716 /**
717  * @format H2LV
718  * @param handle
719  * @param value_handle
720  * @param value_length
721  * @param value
722  */
723 #define GATT_EVENT_INDICATION                                    0xA8
724 
725 /**
726  * @format H2LV
727  * @param handle
728  * @param descriptor_handle
729  * @param descriptor_length
730  * @param descriptor
731  */
732 #define GATT_EVENT_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT        0xA9
733 
734 /**
735  * @format H2LV
736  * @param handle
737  * @param descriptor_offset
738  * @param descriptor_length
739  * @param descriptor
740  */
741 #define GATT_EVENT_LONG_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT   0xAA
742 
743 /**
744  * @format H2
745  * @param handle
746  * @param MTU
747  */
748 #define GATT_EVENT_MTU                                           0xAB
749 
750 /**
751  * @format H
752  * @param handle
753  */
754 #define GATT_EVENT_CAN_WRITE_WITHOUT_RESPONSE                    0xAC
755 
756 /**
757  * @format 1BH
758  * @param address_type
759  * @param address
760  * @param handle
761  */
762 #define ATT_EVENT_CONNECTED                                      0xB3
763 
764 /**
765  * @format H
766  * @param handle
767  */
768 #define ATT_EVENT_DISCONNECTED                                   0xB4
769 
770 /**
771  * @format H2
772  * @param handle
773  * @param MTU
774  */
775 #define ATT_EVENT_MTU_EXCHANGE_COMPLETE                          0xB5
776 
777  /**
778   * @format 1H2
779   * @param status
780   * @param conn_handle
781   * @param attribute_handle
782   */
783 #define ATT_EVENT_HANDLE_VALUE_INDICATION_COMPLETE               0xB6
784 
785 /**
786  * @format
787  */
788 #define ATT_EVENT_CAN_SEND_NOW                                   0xB7
789 
790 // TODO: daemon only event
791 
792 /**
793  * @format 12
794  * @param status
795  * @param service_uuid
796  */
797  #define BNEP_EVENT_SERVICE_REGISTERED                      0xC0
798 
799 /**
800  * @format 12222BH
801  * @param status
802  * @param bnep_cid
803  * @param source_uuid
804  * @param destination_uuid
805  * @param mtu
806  * @param remote_address
807  * @param con_handle
808  */
809  #define BNEP_EVENT_CHANNEL_OPENED                   0xC1
810 
811 /**
812  * @format 222B
813  * @param bnep_cid
814  * @param source_uuid
815  * @param destination_uuid
816  * @param remote_address
817  */
818  #define BNEP_EVENT_CHANNEL_CLOSED                          0xC2
819 
820 /**
821  * @format 222B1
822  * @param bnep_cid
823  * @param source_uuid
824  * @param destination_uuid
825  * @param remote_address
826  * @param channel_state
827  */
828 #define BNEP_EVENT_CHANNEL_TIMEOUT                         0xC3
829 
830 /**
831  * @format 222B
832  * @param bnep_cid
833  * @param source_uuid
834  * @param destination_uuid
835  * @param remote_address
836  */
837  #define BNEP_EVENT_CAN_SEND_NOW                           0xC4
838 
839  /**
840   * @format H1B
841   * @param handle
842   * @param addr_type
843   * @param address
844   */
845 #define SM_EVENT_JUST_WORKS_REQUEST                              0xD0
846 
847  /**
848   * @format H1B
849   * @param handle
850   * @param addr_type
851   * @param address
852   */
853 #define SM_EVENT_JUST_WORKS_CANCEL                               0xD1
854 
855  /**
856   * @format H1B4
857   * @param handle
858   * @param addr_type
859   * @param address
860   * @param passkey
861   */
862 #define SM_EVENT_PASSKEY_DISPLAY_NUMBER                          0xD2
863 
864  /**
865   * @format H1B
866   * @param handle
867   * @param addr_type
868   * @param address
869   */
870 #define SM_EVENT_PASSKEY_DISPLAY_CANCEL                          0xD3
871 
872  /**
873   * @format H1B
874   * @param handle
875   * @param addr_type
876   * @param address
877   */
878 #define SM_EVENT_PASSKEY_INPUT_NUMBER                            0xD4
879 
880  /**
881   * @format H1B
882   * @param handle
883   * @param addr_type
884   * @param address
885   */
886 #define SM_EVENT_PASSKEY_INPUT_CANCEL                            0xD5
887 
888  /**
889   * @format H1B4
890   * @param handle
891   * @param addr_type
892   * @param address
893   * @param passkey
894   */
895 #define SM_EVENT_NUMERIC_COMPARISON_REQUEST                      0xD6
896 
897  /**
898   * @format H1B
899   * @param handle
900   * @param addr_type
901   * @param address
902   */
903 #define SM_EVENT_NUMERIC_COMPARISON_CANCEL                       0xD7
904 
905  /**
906   * @format H1B
907   * @param handle
908   * @param addr_type
909   * @param address
910   */
911 #define SM_EVENT_IDENTITY_RESOLVING_STARTED                      0xD8
912 
913  /**
914   * @format H1B
915   * @param handle
916   * @param addr_type
917   * @param address
918   */
919 #define SM_EVENT_IDENTITY_RESOLVING_FAILED                       0xD9
920 
921  /**
922   * @brief Identify resolving succeeded
923   *
924   * @format H1B1B2
925   * @param handle
926   * @param addr_type
927   * @param address
928   * @param identity_addr_type
929   * @param identity_address
930   * @param index
931   *
932   */
933 #define SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED                    0xDA
934 
935  /**
936   * @format H1B
937   * @param handle
938   * @param addr_type
939   * @param address
940   */
941 #define SM_EVENT_AUTHORIZATION_REQUEST                           0xDB
942 
943  /**
944   * @format H1B1
945   * @param handle
946   * @param addr_type
947   * @param address
948   * @param authorization_result
949   */
950 #define SM_EVENT_AUTHORIZATION_RESULT                            0xDC
951 
952  /**
953   * @format H1
954   * @param handle
955   * @param action see SM_KEYPRESS_*
956   */
957 #define SM_EVENT_KEYPRESS_NOTIFICATION                           0xDD
958 
959  /**
960   * @brief Emitted during pairing to inform app about address used as identity
961   *
962   * @format H1B1B2
963   * @param handle
964   * @param addr_type
965   * @param address
966   * @param identity_addr_type
967   * @param identity_address
968   * @param index
969   */
970 #define SM_EVENT_IDENTITY_CREATED                                0xDE
971 
972  /**
973   * @brief Emitted to inform app that pairing is complete. Possible status values:
974   *        ERROR_CODE_SUCCESS                            -> pairing success
975   *        ERROR_CODE_CONNECTION_TIMEOUT                 -> timeout
976   *        ERROR_CODE_REMOTE_USER_TERMINATED_CONNECTION  -> disconnect
977   *        ERROR_CODE_AUTHENTICATION_FAILURE             -> SM protocol error, see reason field with SM_REASON_* from bluetooth.h
978   *
979   * @format H1B11
980   * @param handle
981   * @param addr_type
982   * @param address
983   * @param status
984   * @param reason if status == ERROR_CODE_AUTHENTICATION_FAILURE
985   */
986 #define SM_EVENT_PAIRING_COMPLETE                                0xDF
987 
988 
989 // GAP
990 
991 /**
992  * @format H1
993  * @param handle
994  * @param security_level
995  */
996 #define GAP_EVENT_SECURITY_LEVEL                                 0xE0
997 
998 /**
999  * @format 1B
1000  * @param status
1001  * @param address
1002  */
1003 #define GAP_EVENT_DEDICATED_BONDING_COMPLETED                    0xE1
1004 
1005 /**
1006  * @format 11B1JV
1007  * @param advertising_event_type
1008  * @param address_type
1009  * @param address
1010  * @param rssi
1011  * @param data_length
1012  * @param data
1013  */
1014 #define GAP_EVENT_ADVERTISING_REPORT                          0xE2
1015 
1016  /**
1017  * @format B132111JV
1018  * @param bd_addr
1019  * @param page_scan_repetition_mode
1020  * @param class_of_device
1021  * @param clock_offset
1022  * @param rssi_available
1023  * @param rssi
1024  * @param name_available
1025  * @param name_len
1026  * @param name
1027  */
1028 #define GAP_EVENT_INQUIRY_RESULT                              0xE3
1029 
1030 /**
1031  * @format 1
1032  * @param status
1033  */
1034 #define GAP_EVENT_INQUIRY_COMPLETE                            0xE4
1035 
1036 
1037 // Meta Events, see below for sub events
1038 #define HCI_EVENT_HSP_META                                 0xE8
1039 #define HCI_EVENT_HFP_META                                 0xE9
1040 #define HCI_EVENT_ANCS_META                                0xEA
1041 #define HCI_EVENT_AVDTP_META                               0xEB
1042 #define HCI_EVENT_AVRCP_META                               0xEC
1043 #define HCI_EVENT_GOEP_META                                0xED
1044 #define HCI_EVENT_PBAP_META                                0xEE
1045 #define HCI_EVENT_HID_META                                 0xEF
1046 #define HCI_EVENT_A2DP_META                                0xF0
1047 #define HCI_EVENT_HIDS_META                                0xF1
1048 #define HCI_EVENT_GATTSERVICE_META                         0xF2
1049 #define HCI_EVENT_BIP_META                                 0xF3
1050 #define HCI_EVENT_MAP_META                                 0xF4
1051 
1052 // Potential other meta groups
1053 // #define HCI_EVENT_BNEP_META                                0xxx
1054 // #define HCI_EVENT_GAP_META                                 0xxx
1055 // #define HCI_EVENT_GATT_META                                0xxx
1056 // #define HCI_EVENT_PAN_META                                 0xxx
1057 // #define HCI_EVENT_SDP_META                                 0xxx
1058 // #define HCI_EVENT_SM_META                                  0xxx
1059 
1060 
1061 /** HSP Subevent */
1062 
1063 /**
1064  * @format 11
1065  * @param subevent_code
1066  * @param status 0 == OK
1067  */
1068 #define HSP_SUBEVENT_RFCOMM_CONNECTION_COMPLETE             0x01
1069 
1070 /**
1071  * @format 11
1072  * @param subevent_code
1073  * @param status 0 == OK
1074  */
1075 #define HSP_SUBEVENT_RFCOMM_DISCONNECTION_COMPLETE           0x02
1076 
1077 
1078 /**
1079  * @format 11H
1080  * @param subevent_code
1081  * @param status 0 == OK
1082  * @param handle
1083  */
1084 #define HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE             0x03
1085 
1086 /**
1087  * @format 11
1088  * @param subevent_code
1089  * @param status 0 == OK
1090  */
1091 #define HSP_SUBEVENT_AUDIO_DISCONNECTION_COMPLETE          0x04
1092 
1093 /**
1094  * @format 1
1095  * @param subevent_code
1096  */
1097 #define HSP_SUBEVENT_RING                                  0x05
1098 
1099 /**
1100  * @format 11
1101  * @param subevent_code
1102  * @param gain Valid range: [0,15]
1103  */
1104 #define HSP_SUBEVENT_MICROPHONE_GAIN_CHANGED               0x06
1105 
1106 /**
1107  * @format 11
1108  * @param subevent_code
1109  * @param gain Valid range: [0,15]
1110  */
1111 #define HSP_SUBEVENT_SPEAKER_GAIN_CHANGED                  0x07
1112 
1113 /**
1114  * @format 1JV
1115  * @param subevent_code
1116  * @param value_length
1117  * @param value
1118  */
1119 #define HSP_SUBEVENT_HS_COMMAND                            0x08
1120 
1121 /**
1122  * @format 1JV
1123  * @param subevent_code
1124  * @param value_length
1125  * @param value
1126  */
1127 #define HSP_SUBEVENT_AG_INDICATION                         0x09
1128 
1129 
1130 /** HFP Subevent */
1131 
1132 /**
1133  * @format 11HB
1134  * @param subevent_code
1135  * @param status 0 == OK
1136  * @param con_handle
1137  * @param bd_addr
1138  */
1139 #define HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED  0x01
1140 
1141 /**
1142  * @format 1
1143  * @param subevent_code
1144  */
1145 #define HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_RELEASED     0x02
1146 
1147 /**
1148  * @format 11HB1
1149  * @param subevent_code
1150  * @param status 0 == OK
1151  * @param handle
1152  * @param bd_addr
1153  * @param negotiated_codec
1154  */
1155 #define HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED          0x03
1156 
1157 /**
1158  * @format 1
1159  * @param subevent_code
1160  */
1161 #define HFP_SUBEVENT_AUDIO_CONNECTION_RELEASED             0x04
1162 
1163 /**
1164  * @format 11
1165  * @param subevent_code
1166  * @param status 0 == OK
1167  */
1168 #define HFP_SUBEVENT_COMPLETE                              0x05
1169 
1170 /**
1171  * @format 11111111T
1172  * @param subevent_code
1173  * @param indicator_index
1174  * @param indicator_status
1175  * @param indicator_min_range
1176  * @param indicator_max_range
1177  * @param indicator_mandatory
1178  * @param indicator_enabled
1179  * @param indicator_status_changed
1180  * @param indicator_name
1181  */
1182 #define HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED           0x06
1183 
1184 /**
1185  * @format 111T
1186  * @param subevent_code
1187  * @param network_operator_mode
1188  * @param network_operator_format
1189  * @param network_operator_name
1190  */
1191 #define HFP_SUBEVENT_NETWORK_OPERATOR_CHANGED              0x07
1192 
1193 /**
1194  * @format 11
1195  * @param subevent_code
1196  * @param error
1197  */
1198 #define HFP_SUBEVENT_EXTENDED_AUDIO_GATEWAY_ERROR             0x08
1199 
1200 /**
1201  * @format 1
1202  * @param subevent_code
1203  */
1204 #define HFP_SUBEVENT_START_RINGINIG                           0x0A
1205 
1206 /**
1207  * @format 1
1208  * @param subevent_code
1209  */
1210 #define HFP_SUBEVENT_STOP_RINGINIG                            0x0B
1211 
1212 /**
1213  * @format 1
1214  * @param subevent_code
1215  */
1216 #define HFP_SUBEVENT_CALL_TERMINATED                          0x0C
1217 
1218 /**
1219  * @format 1T
1220  * @param subevent_code
1221  * @param number
1222  */
1223 #define HFP_SUBEVENT_PLACE_CALL_WITH_NUMBER                   0x0D
1224 
1225 /**
1226  * @format 1
1227  * @param subevent_code
1228  */
1229 #define HFP_SUBEVENT_ATTACH_NUMBER_TO_VOICE_TAG               0x0E
1230 
1231 /**
1232  * @format 1T
1233  * @param subevent_code
1234  * @param number
1235  */
1236 #define HFP_SUBEVENT_NUMBER_FOR_VOICE_TAG                     0x0F
1237 
1238 /**
1239  * @format 1T
1240  * @param subevent_code
1241  * @param dtmf code
1242  */
1243 #define HFP_SUBEVENT_TRANSMIT_DTMF_CODES                      0x10
1244 
1245 /**
1246  * @format 1
1247  * @param subevent_code
1248  */
1249  #define HFP_SUBEVENT_CALL_ANSWERED                            0x11
1250 
1251 /**
1252  * @format 1
1253  * @param subevent_code
1254  */
1255 #define HFP_SUBEVENT_CONFERENCE_CALL                          0x12
1256 
1257 /**
1258  * @format 1
1259  * @param subevent_code
1260  */
1261 #define HFP_SUBEVENT_RING                                     0x13
1262 
1263 /**
1264  * @format 111
1265  * @param subevent_code
1266  * @param status
1267  * @param gain
1268  */
1269  #define HFP_SUBEVENT_SPEAKER_VOLUME                           0x14
1270 
1271 /**
1272  * @format 111
1273  * @param subevent_code
1274  * @param status
1275  * @param gain
1276  */
1277 #define HFP_SUBEVENT_MICROPHONE_VOLUME                        0x15
1278 
1279 /**
1280  * @format 11T
1281  * @param subevent_code
1282  * @param type
1283  * @param number
1284  */
1285 #define HFP_SUBEVENT_CALL_WAITING_NOTIFICATION                0x16
1286 
1287 /**
1288  * @format 11T
1289  * @param subevent_code
1290  * @param type
1291  * @param number
1292  */
1293 #define HFP_SUBEVENT_CALLING_LINE_IDENTIFICATION_NOTIFICATION 0x17
1294 
1295 /**
1296  * @format 1111111T
1297  * @param subevent_code
1298  * @param clcc_idx
1299  * @param clcc_dir
1300  * @param clcc_status
1301  * @param clcc_mode
1302  * @param clcc_mpty
1303  * @param bnip_type
1304  * @param bnip_number
1305  */
1306 #define HFP_SUBEVENT_ENHANCED_CALL_STATUS                     0x18
1307 
1308 /**
1309  * @format 111T
1310  * @param subevent_code
1311  * @param status
1312  * @param bnip_type
1313  * @param bnip_number
1314  */
1315  #define HFP_SUBEVENT_SUBSCRIBER_NUMBER_INFORMATION            0x19
1316 
1317 /**
1318  * @format 1T
1319  * @param subevent_code
1320  * @param value
1321  */
1322 #define HFP_SUBEVENT_RESPONSE_AND_HOLD_STATUS                 0x1A
1323 
1324 // ANCS Client
1325 
1326 /**
1327  * @format 1H
1328  * @param subevent_code
1329  * @param handle
1330  */
1331 #define ANCS_SUBEVENT_CLIENT_CONNECTED                              0xF0
1332 
1333 /**
1334  * @format 1H2T
1335  * @param subevent_code
1336  * @param handle
1337  * @param attribute_id
1338  * @param text
1339  */
1340 #define ANCS_SUBEVENT_CLIENT_NOTIFICATION                           0xF1
1341 
1342 /**
1343  * @format 1H
1344  * @param subevent_code
1345  * @param handle
1346  */
1347 #define ANCS_SUBEVENT_CLIENT_DISCONNECTED                           0xF2
1348 
1349 
1350 /** AVDTP Subevent */
1351 
1352 /**
1353  * @format 1211
1354  * @param subevent_code
1355  * @param avdtp_cid
1356  * @param local_seid
1357  * @param signal_identifier
1358  */
1359 #define AVDTP_SUBEVENT_SIGNALING_ACCEPT                     0x01
1360 
1361 /**
1362  * @format 1211
1363  * @param subevent_code
1364  * @param avdtp_cid
1365  * @param local_seid
1366  * @param signal_identifier
1367  */
1368 #define AVDTP_SUBEVENT_SIGNALING_REJECT                     0x02
1369 
1370 /**
1371  * @format 1211
1372  * @param subevent_code
1373  * @param avdtp_cid
1374  * @param local_seid
1375  * @param signal_identifier
1376  */
1377 #define AVDTP_SUBEVENT_SIGNALING_GENERAL_REJECT             0x03
1378 
1379 /**
1380  * @format 12B1
1381  * @param subevent_code
1382  * @param avdtp_cid
1383  * @param bd_addr
1384  * @param status 0 == OK
1385  */
1386 #define AVDTP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED     0x04
1387 
1388 /**
1389  * @format 12
1390  * @param subevent_code
1391  * @param avdtp_cid
1392  */
1393 #define AVDTP_SUBEVENT_SIGNALING_CONNECTION_RELEASED        0x05
1394 
1395 /**
1396  * @format 121111
1397  * @param subevent_code
1398  * @param avdtp_cid
1399  * @param remote_seid        0x01 – 0x3E
1400  * @param in_use      0-not in use, 1-in use
1401  * @param media_type  0-audio, 1-video, 2-multimedia
1402  * @param sep_type    0-source, 1-sink
1403  */
1404 #define AVDTP_SUBEVENT_SIGNALING_SEP_FOUND                  0x06
1405 
1406 /**
1407  * @format 121111111111
1408  * @param subevent_code
1409  * @param avdtp_cid
1410  * @param local_seid
1411  * @param remote_seid
1412  * @param media_type
1413  * @param sampling_frequency_bitmap
1414  * @param channel_mode_bitmap
1415  * @param block_length_bitmap
1416  * @param subbands_bitmap
1417  * @param allocation_method_bitmap
1418  * @param min_bitpool_value
1419  * @param max_bitpool_value
1420  */
1421 #define AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY          0x07
1422 
1423 /**
1424  * @format 121112LV
1425  * @param subevent_code
1426  * @param avdtp_cid
1427  * @param local_seid
1428  * @param remote_seid
1429  * @param media_type
1430  * @param media_codec_type
1431  * @param media_codec_information_len
1432  * @param media_codec_information
1433  */
1434 #define AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY        0x08
1435 
1436 
1437 /**
1438  * @format 1211
1439  * @param subevent_code
1440  * @param avdtp_cid
1441  * @param local_seid
1442  * @param remote_seid
1443  */
1444 #define AVDTP_SUBEVENT_SIGNALING_MEDIA_TRANSPORT_CAPABILITY        0x09
1445 
1446 
1447 /**
1448  * @format 1211
1449  * @param subevent_code
1450  * @param avdtp_cid
1451  * @param local_seid
1452  * @param remote_seid
1453  */
1454 #define AVDTP_SUBEVENT_SIGNALING_REPORTING_CAPABILITY        0x0A
1455 
1456 
1457 /**
1458  * @format 1211111
1459  * @param subevent_code
1460  * @param avdtp_cid
1461  * @param local_seid
1462  * @param remote_seid
1463  * @param recovery_type
1464  * @param maximum_recovery_window_size
1465  * @param maximum_number_media_packets
1466  */
1467 #define AVDTP_SUBEVENT_SIGNALING_RECOVERY_CAPABILITY        0x0B
1468 
1469 
1470 /**
1471  * @format 12112LV
1472  * @param subevent_code
1473  * @param avdtp_cid
1474  * @param local_seid
1475  * @param remote_seid
1476  * @param cp_type
1477  * @param cp_type_value_len
1478  * @param cp_type_value
1479  */
1480 #define AVDTP_SUBEVENT_SIGNALING_CONTENT_PROTECTION_CAPABILITY        0x0C
1481 
1482 
1483 /**
1484  * @format 121111111111
1485  * @param subevent_code
1486  * @param avdtp_cid
1487  * @param local_seid
1488  * @param remote_seid
1489  * @param fragmentation
1490  * @param transport_identifiers_num
1491  * @param transport_session_identifier_1
1492  * @param transport_session_identifier_2
1493  * @param transport_session_identifier_3
1494  * @param tcid_1
1495  * @param tcid_2
1496  * @param tcid_3
1497  */
1498 #define AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY        0x0D
1499 
1500 
1501 /**
1502  * @format 1211
1503  * @param subevent_code
1504  * @param avdtp_cid
1505  * @param local_seid
1506  * @param remote_seid
1507  */
1508 #define AVDTP_SUBEVENT_SIGNALING_DELAY_REPORTING_CAPABILITY        0x0E
1509 
1510 
1511 /**
1512  * @format 1211111
1513  * @param subevent_code
1514  * @param avdtp_cid
1515  * @param local_seid
1516  * @param remote_seid
1517  * @param back_ch
1518  * @param media
1519  * @param recovery
1520  */
1521 #define AVDTP_SUBEVENT_SIGNALING_HEADER_COMPRESSION_CAPABILITY        0x0F
1522 
1523 
1524 /**
1525  * @format 12111121111111
1526  * @param subevent_code
1527  * @param avdtp_cid
1528  * @param local_seid
1529  * @param remote_seid
1530  * @param reconfigure
1531  * @param media_type
1532  * @param sampling_frequency
1533  * @param channel_mode
1534  * @param num_channels
1535  * @param block_length
1536  * @param subbands
1537  * @param allocation_method
1538  * @param min_bitpool_value
1539  * @param max_bitpool_value
1540  */
1541 #define AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION        0x10
1542 
1543 /**
1544  * @format 1211112LV
1545  * @param subevent_code
1546  * @param avdtp_cid
1547  * @param local_seid
1548  * @param remote_seid
1549  * @param reconfigure
1550  * @param media_type
1551  * @param media_codec_type
1552  * @param media_codec_information_len
1553  * @param media_codec_information
1554  */
1555 #define AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION        0x11
1556 
1557 /**
1558  * @format 12B111
1559  * @param subevent_code
1560  * @param avdtp_cid
1561  * @param bd_addr
1562  * @param local_seid
1563  * @param remote_seid
1564  * @param status 0 == OK
1565  */
1566 #define AVDTP_SUBEVENT_STREAMING_CONNECTION_ESTABLISHED     0x12
1567 
1568 /**
1569  * @format 121
1570  * @param subevent_code
1571  * @param avdtp_cid
1572  * @param local_seid
1573  */
1574 #define AVDTP_SUBEVENT_STREAMING_CONNECTION_RELEASED        0x13
1575 
1576 /**
1577  * @format 1212
1578  * @param subevent_code
1579  * @param avdtp_cid
1580  * @param local_seid
1581  * @param sequence_number
1582  */
1583 #define AVDTP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW   0x14
1584 
1585 /**
1586  * @format 1211
1587  * @param subevent_code
1588  * @param avdtp_cid
1589  * @param local_seid
1590  * @param remote_seid
1591  */
1592 #define AVDTP_SUBEVENT_SIGNALING_CAPABILITY_DONE             0x15
1593 
1594 
1595 /**
1596  * @format 12
1597  * @param subevent_code
1598  * @param avdtp_cid
1599  */
1600 #define AVDTP_SUBEVENT_SIGNALING_SEP_DICOVERY_DONE           0x16
1601 
1602 
1603 /** A2DP Subevent */
1604 /* Stream goes through following states:
1605  * - OPEN         - indicated with A2DP_SUBEVENT_STREAM_ESTABLISHED event
1606  * - START        - indicated with A2DP_SUBEVENT_STREAM_STARTED event
1607  * - SUSPEND      - indicated with A2DP_SUBEVENT_STREAM_SUSPENDED event
1608  * - ABORT/STOP   - indicated with A2DP_SUBEVENT_STREAM_RELEASED event
1609 
1610  OPEN state will be followed by ABORT/STOP. Stream is ready but media transfer is not started.
1611  START can come only after the stream is OPENED, and indicates that media transfer is started.
1612  SUSPEND is optional, it pauses the stream.
1613  */
1614 
1615 /**
1616  * @format 121            Sent only by A2DP source.
1617  * @param subevent_code
1618  * @param a2dp_cid
1619  * @param local_seid
1620  */
1621 #define A2DP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW         0x01
1622 
1623 /**
1624  * @format 12111121111111
1625  * @param subevent_code
1626  * @param a2dp_cid
1627  * @param int_seid
1628  * @param acp_seid
1629  * @param reconfigure
1630  * @param media_type
1631  * @param sampling_frequency
1632  * @param channel_mode
1633  * @param num_channels
1634  * @param block_length
1635  * @param subbands
1636  * @param allocation_method
1637  * @param min_bitpool_value
1638  * @param max_bitpool_value
1639  */
1640 #define A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION      0x02
1641 
1642 /**
1643  * @format 1211112LV
1644  * @param subevent_code
1645  * @param a2dp_cid
1646  * @param int_seid
1647  * @param acp_seid
1648  * @param reconfigure
1649  * @param media_type
1650  * @param media_codec_type
1651  * @param media_codec_information_len
1652  * @param media_codec_information
1653  */
1654 #define A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION    0x03
1655 
1656 /**
1657  * @format 12B111          Stream is opened byt not started.
1658  * @param subevent_code
1659  * @param a2dp_cid
1660  * @param bd_addr
1661  * @param local_seid
1662  * @param remote_seid
1663  * @param status
1664  */
1665 #define A2DP_SUBEVENT_STREAM_ESTABLISHED                           0x04
1666 
1667 /**
1668  * @format 121            Indicates that media transfer is started.
1669  * @param subevent_code
1670  * @param a2dp_cid
1671  * @param local_seid
1672  */
1673 #define A2DP_SUBEVENT_STREAM_STARTED                               0x05
1674 
1675 /**
1676  * @format 121           Stream is paused.
1677  * @param subevent_code
1678  * @param a2dp_cid
1679  * @param local_seid
1680  */
1681 #define A2DP_SUBEVENT_STREAM_SUSPENDED                              0x06
1682 
1683 /**
1684  * @format 121           Stream is stoped or aborted.
1685  * @param subevent_code
1686  * @param a2dp_cid
1687  * @param local_seid
1688  */
1689 #define A2DP_SUBEVENT_STREAM_STOPPED                                0x07
1690 
1691 /**
1692  * @format 121            Stream is released.
1693  * @param subevent_code
1694  * @param a2dp_cid
1695  * @param local_seid
1696  */
1697 #define A2DP_SUBEVENT_STREAM_RELEASED                               0x08
1698 
1699 /**
1700  * @format 1211
1701  * @param subevent_code
1702  * @param a2dp_cid
1703  * @param local_seid
1704  * @param signal_identifier
1705  */
1706 #define A2DP_SUBEVENT_COMMAND_ACCEPTED                              0x09
1707 
1708 /**
1709  * @format 1211
1710  * @param subevent_code
1711  * @param a2dp_cid
1712  * @param local_seid
1713  * @param signal_identifier
1714  */
1715 #define A2DP_SUBEVENT_COMMAND_REJECTED                              0x0A
1716 
1717 /**
1718  * @format 12B1
1719  * @param subevent_code
1720  * @param a2dp_cid
1721  * @param bd_addr
1722  * @param status 0 == OK
1723  */
1724 #define A2DP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED              0x0B
1725 
1726 /**
1727  * @format 12            Signaling channel is released.
1728  * @param subevent_code
1729  * @param a2dp_cid
1730  */
1731 #define A2DP_SUBEVENT_SIGNALING_CONNECTION_RELEASED                  0x0C
1732 
1733 /**
1734  * @format 1211          Stream was reconfigured
1735  * @param subevent_code
1736  * @param a2dp_cid
1737  * @param local_seid
1738  * @param status
1739  */
1740 #define A2DP_SUBEVENT_STREAM_RECONFIGURED                            0x0D
1741 
1742 /** AVRCP Subevent */
1743 
1744 /**
1745  * @format 11B2
1746  * @param subevent_code
1747  * @param status 0 == OK
1748  * @param bd_addr
1749  * @param avrcp_cid
1750  */
1751 #define AVRCP_SUBEVENT_CONNECTION_ESTABLISHED                           0x01
1752 
1753 /**
1754  * @format 12
1755  * @param subevent_code
1756  * @param avrcp_cid
1757  */
1758 #define AVRCP_SUBEVENT_CONNECTION_RELEASED                              0x02
1759 
1760 /**
1761  * @format 12111
1762  * @param subevent_code
1763  * @param avrcp_cid
1764  * @param command_type
1765  * @param repeat_mode
1766  * @param shuffle_mode
1767  */
1768 #define AVRCP_SUBEVENT_SHUFFLE_AND_REPEAT_MODE                          0x03
1769 
1770 /**
1771  * @format 121441
1772  * @param subevent_code
1773  * @param avrcp_cid
1774  * @param command_type
1775  * @param song_length
1776  * @param song_position
1777  * @param play_status
1778  */
1779  #define AVRCP_SUBEVENT_PLAY_STATUS                                     0x04
1780 
1781 /**
1782  * @format 1211
1783  * @param subevent_code
1784  * @param avrcp_cid
1785  * @param command_type
1786  * @param play_status
1787  */
1788 #define AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_STATUS_CHANGED             0x05
1789 
1790 /**
1791  * @format 121
1792  * @param subevent_code
1793  * @param avrcp_cid
1794  * @param command_type
1795  */
1796 #define AVRCP_SUBEVENT_NOTIFICATION_TRACK_CHANGED                       0x06
1797 
1798 /**
1799  * @format 121
1800  * @param subevent_code
1801  * @param avrcp_cid
1802  * @param command_type
1803  */
1804 #define AVRCP_SUBEVENT_NOTIFICATION_NOW_PLAYING_CONTENT_CHANGED          0x07
1805 
1806 /**
1807  * @format 121
1808  * @param subevent_code
1809  * @param avrcp_cid
1810  * @param command_type
1811  */
1812 #define AVRCP_SUBEVENT_NOTIFICATION_AVAILABLE_PLAYERS_CHANGED            0x08
1813 
1814 /**
1815  * @format 1211
1816  * @param subevent_code
1817  * @param avrcp_cid
1818  * @param command_type
1819  * @param absolute_volume
1820  */
1821 #define AVRCP_SUBEVENT_NOTIFICATION_VOLUME_CHANGED                       0x09
1822 
1823 /**
1824  * @format 1211
1825  * @param subevent_code
1826  * @param avrcp_cid
1827  * @param command_type
1828  * @param absolute_volume
1829  */
1830 #define AVRCP_SUBEVENT_SET_ABSOLUTE_VOLUME_RESPONSE                      0x0A
1831 
1832 /**
1833  * @format 1211
1834  * @param subevent_code
1835  * @param avrcp_cid
1836  * @param command_type
1837  * @param notification_id
1838  */
1839 #define AVRCP_SUBEVENT_ENABLE_NOTIFICATION_COMPLETE                       0x0B
1840 
1841 /**
1842  * @format 1211
1843  * @param subevent_code
1844  * @param avrcp_cid
1845  * @param command_type
1846  * @param operation_id
1847  */
1848 #define AVRCP_SUBEVENT_OPERATION_START                                    0x0C
1849 
1850 /**
1851  * @format 1211
1852  * @param subevent_code
1853  * @param avrcp_cid
1854  * @param command_type
1855  * @param operation_id
1856  */
1857 #define AVRCP_SUBEVENT_OPERATION_COMPLETE                                 0x0D
1858 
1859 /**
1860  * @format 121
1861  * @param subevent_code
1862  * @param avrcp_cid
1863  * @param command_type
1864  */
1865 #define AVRCP_SUBEVENT_PLAYER_APPLICATION_VALUE_RESPONSE                   0x0E
1866 
1867 /**
1868  * @format 12
1869  * @param subevent_code
1870  * @param avrcp_cid
1871  */
1872 #define AVRCP_SUBEVENT_COMPANY_IDS_QUERY                                    0x0F
1873 
1874 /**
1875  * @format 12
1876  * @param subevent_code
1877  * @param avrcp_cid
1878  */
1879 #define AVRCP_SUBEVENT_EVENT_IDS_QUERY                                      0x10
1880 
1881 /**
1882  * @format 12
1883  * @param subevent_code
1884  * @param avrcp_cid
1885  */
1886 #define AVRCP_SUBEVENT_PLAY_STATUS_QUERY                                    0x11
1887 
1888 /**
1889  * @format 12111
1890  * @param subevent_code
1891  * @param avrcp_cid
1892  * @param operation_id
1893  * @param operands_length
1894  * @param operand
1895  */
1896 #define AVRCP_SUBEVENT_OPERATION                                            0x12
1897 
1898 /**
1899  * @format 1211
1900  * @param subevent_code
1901  * @param avrcp_cid
1902  * @param command_type
1903  * @param track
1904  */
1905 #define AVRCP_SUBEVENT_NOW_PLAYING_TRACK_INFO                                 0x13
1906 
1907 /**
1908  * @format 1211
1909  * @param subevent_code
1910  * @param avrcp_cid
1911  * @param command_type
1912  * @param total_tracks
1913  */
1914 #define AVRCP_SUBEVENT_NOW_PLAYING_TOTAL_TRACKS_INFO                          0x14
1915 
1916 /**
1917  * @format 1214
1918  * @param subevent_code
1919  * @param avrcp_cid
1920  * @param command_type
1921  * @param song_length in ms
1922  */
1923 #define AVRCP_SUBEVENT_NOW_PLAYING_SONG_LENGTH_MS_INFO                        0x15
1924 
1925 /**
1926  * @format 121JV
1927  * @param subevent_code
1928  * @param avrcp_cid
1929  * @param command_type
1930  * @param value_len
1931  * @param value
1932  */
1933 #define AVRCP_SUBEVENT_NOW_PLAYING_TITLE_INFO                                 0x16
1934 
1935  /*
1936  * @format 121JV
1937  * @param subevent_code
1938  * @param avrcp_cid
1939  * @param command_type
1940  * @param value_len
1941  * @param value
1942  */
1943 #define AVRCP_SUBEVENT_NOW_PLAYING_ARTIST_INFO                                0x17
1944 
1945  /*
1946  * @format 121JV
1947  * @param subevent_code
1948  * @param avrcp_cid
1949  * @param command_type
1950  * @param value_len
1951  * @param value
1952  */
1953 #define AVRCP_SUBEVENT_NOW_PLAYING_ALBUM_INFO                                 0x18
1954 
1955  /*
1956  * @format 121JV
1957  * @param subevent_code
1958  * @param avrcp_cid
1959  * @param command_type
1960  * @param value_len
1961  * @param value
1962  */
1963 #define AVRCP_SUBEVENT_NOW_PLAYING_GENRE_INFO                                 0x19
1964 
1965 /*
1966  * @format 1211
1967  * @param subevent_code
1968  * @param avrcp_cid
1969  * @param command_type
1970  * @param status
1971  */
1972 #define AVRCP_SUBEVENT_NOW_PLAYING_INFO_DONE                                  0x1A
1973 
1974 /**
1975  * @format 1B2
1976  * @param subevent_code
1977  * @param bd_addr
1978  * @param browsing_cid
1979  */
1980 #define AVRCP_SUBEVENT_INCOMING_BROWSING_CONNECTION                          0x1B
1981 
1982 /**
1983  * @format 11B2
1984  * @param subevent_code
1985  * @param status 0 == OK
1986  * @param bd_addr
1987  * @param browsing_cid
1988  */
1989 #define AVRCP_SUBEVENT_BROWSING_CONNECTION_ESTABLISHED                        0x1C
1990 
1991 /**
1992  * @format 12
1993  * @param subevent_code
1994  * @param browsing_cid
1995  */
1996 #define AVRCP_SUBEVENT_BROWSING_CONNECTION_RELEASED                           0x1D
1997 
1998 /**
1999  * @format 12211
2000  * @param subevent_code
2001  * @param browsing_cid
2002  * @param uid_counter
2003  * @param browsing_status
2004  * @param bluetooth_status
2005  */
2006 #define AVRCP_SUBEVENT_BROWSING_DONE                                          0x1E
2007 
2008 /**
2009  * @format 1214
2010  * @param subevent_code
2011  * @param browsing_cid
2012  * @param scope
2013  * @param attr_bitmap
2014  */
2015 #define AVRCP_SUBEVENT_BROWSING_GET_FOLDER_ITEMS                              0x1F
2016 
2017 /**
2018  * @format 121
2019  * @param subevent_code
2020  * @param browsing_cid
2021  * @param scope
2022  */
2023 #define AVRCP_SUBEVENT_BROWSING_GET_TOTAL_NUM_ITEMS                           0x20
2024 
2025 /**
2026  * @format 1214
2027  * @param subevent_code
2028  * @param avrcp_cid
2029  * @param command_type
2030  * @param playback_position_ms
2031  */
2032 #define AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_POS_CHANGED                      0x21
2033 
2034 
2035 /**
2036  * @format 121BH1
2037  * @param subevent_code
2038  * @param goep_cid
2039  * @param status
2040  * @param bd_addr
2041  * @param con_handle
2042  * @param incoming
2043  */
2044 #define GOEP_SUBEVENT_CONNECTION_OPENED                                    0x01
2045 
2046 /**
2047  * @format 12
2048  * @param subevent_code
2049  * @param goep_cid
2050 */
2051 #define GOEP_SUBEVENT_CONNECTION_CLOSED                                    0x02
2052 
2053 /**
2054  * @format 12
2055  * @param subevent_code
2056  * @param goep_cid
2057 */
2058 #define GOEP_SUBEVENT_CAN_SEND_NOW                                         0x03
2059 
2060 /**
2061  * @format 121BH1
2062  * @param subevent_code
2063  * @param pbap_cid
2064  * @param status
2065  * @param bd_addr
2066  * @param con_handle
2067  * @param incoming
2068  */
2069 #define PBAP_SUBEVENT_CONNECTION_OPENED                                    0x01
2070 
2071 /**
2072  * @format 12
2073  * @param subevent_code
2074  * @param goep_cid
2075 */
2076 #define PBAP_SUBEVENT_CONNECTION_CLOSED                                    0x02
2077 
2078 /**
2079  * @format 121
2080  * @param subevent_code
2081  * @param goep_cid
2082  * @param status
2083  */
2084 #define PBAP_SUBEVENT_OPERATION_COMPLETED                                  0x03
2085 
2086 /**
2087  * @format 1212
2088  * @param subevent_code
2089  * @param goep_cid
2090  * @param status
2091  * @param phoneboook_size
2092  */
2093 #define PBAP_SUBEVENT_PHONEBOOK_SIZE                                       0x04
2094 
2095 /**
2096  * @format 1211
2097  * @param subevent_code
2098  * @param goep_cid
2099  * @param user_id_required
2100  * @param full_access
2101  */
2102 #define PBAP_SUBEVENT_AUTHENTICATION_REQUEST                               0x05
2103 
2104 /**
2105  * @format 12JVJV
2106  * @param subevent_code
2107  * @param goep_cid
2108  * @param name_len
2109  * @param name
2110  * @param handle_len
2111  * @param handle
2112  */
2113 #define PBAP_SUBEVENT_CARD_RESULT                                          0x06
2114 
2115 
2116 // HID Meta Event Group
2117 
2118 /**
2119  * @format 121BH1
2120  * @param subevent_code
2121  * @param hid_cid
2122  * @param status
2123  * @param bd_addr
2124  * @param con_handle
2125  * @param incoming
2126  */
2127 #define HID_SUBEVENT_CONNECTION_OPENED                                     0x01
2128 
2129 /**
2130  * @format 12
2131  * @param subevent_code
2132  * @param hid_cid
2133 */
2134 #define HID_SUBEVENT_CONNECTION_CLOSED                                     0x02
2135 
2136 /**
2137  * @format 12
2138  * @param subevent_code
2139  * @param hid_cid
2140 */
2141 #define HID_SUBEVENT_CAN_SEND_NOW                                          0x03
2142 
2143 /**
2144  * @format 12
2145  * @param subevent_code
2146  * @param con_handle
2147 */
2148 #define HID_SUBEVENT_SUSPEND                                               0x04
2149 
2150 /**
2151  * @format 12
2152  * @param subevent_code
2153  * @param con_handle
2154 */
2155 #define HID_SUBEVENT_EXIT_SUSPEND                                          0x05
2156 
2157 
2158 // HIDS Meta Event Group
2159 
2160 /**
2161  * @format 12
2162  * @param subevent_code
2163  * @param con_handle
2164 */
2165 #define HIDS_SUBEVENT_CAN_SEND_NOW                                          0x01
2166 
2167 /**
2168  * @format 121
2169  * @param subevent_code
2170  * @param con_handle
2171  * @param protocol_mode
2172 */
2173 #define HIDS_SUBEVENT_PROTOCOL_MODE                                         0x02
2174 
2175 /**
2176  * @format 121
2177  * @param subevent_code
2178  * @param con_handle
2179  * @param enable
2180 */
2181 #define HIDS_SUBEVENT_BOOT_MOUSE_INPUT_REPORT_ENABLE                        0x03
2182 
2183 /**
2184  * @format 121
2185  * @param subevent_code
2186  * @param con_handle
2187  * @param enable
2188 */
2189 #define HIDS_SUBEVENT_BOOT_KEYBOARD_INPUT_REPORT_ENABLE                     0x04
2190 
2191 /**
2192  * @format 121
2193  * @param subevent_code
2194  * @param con_handle
2195  * @param enable
2196 */
2197 #define HIDS_SUBEVENT_INPUT_REPORT_ENABLE                                   0x05
2198 
2199 /**
2200  * @format 121
2201  * @param subevent_code
2202  * @param con_handle
2203  * @param enable
2204 */
2205 #define HIDS_SUBEVENT_OUTPUT_REPORT_ENABLE                                  0x06
2206 
2207 /**
2208  * @format 121
2209  * @param subevent_code
2210  * @param con_handle
2211  * @param enable
2212 */
2213 #define HIDS_SUBEVENT_FEATURE_REPORT_ENABLE                                 0x07
2214 
2215 /**
2216  * @format 12
2217  * @param subevent_code
2218  * @param con_handle
2219 */
2220 #define HIDS_SUBEVENT_SUSPEND                                               0x08
2221 
2222 /**
2223  * @format 12
2224  * @param subevent_code
2225  * @param con_handle
2226 */
2227 #define HIDS_SUBEVENT_EXIT_SUSPEND                                          0x09
2228 
2229 /**
2230  * @format 1211
2231  * @param subevent_code
2232  * @param con_handle
2233  * @param measurement_type  // 0 - force magnitude, 1 - torque magnitude, see cycling_power_sensor_measurement_context_t
2234  * @param is_enhanced
2235 */
2236 #define GATTSERVICE_SUBEVENT_CYCLING_POWER_START_CALIBRATION               0x01
2237 
2238 /**
2239  * @format 12
2240  * @param subevent_code
2241  * @param con_handle
2242 */
2243 #define GATTSERVICE_SUBEVENT_CYCLING_POWER_BROADCAST_START                 0x02
2244 
2245 /**
2246  * @format 12
2247  * @param subevent_code
2248  * @param con_handle
2249 */
2250 #define GATTSERVICE_SUBEVENT_CYCLING_POWER_BROADCAST_STOP                  0x03
2251 
2252 
2253 // MAP Meta Event Group
2254 
2255 /**
2256  * @format 121BH1
2257  * @param subevent_code
2258  * @param map_cid
2259  * @param status
2260  * @param bd_addr
2261  * @param con_handle
2262  * @param incoming
2263  */
2264 #define MAP_SUBEVENT_CONNECTION_OPENED                                    0x01
2265 
2266 /**
2267  * @format 12
2268  * @param subevent_code
2269  * @param map_cid
2270 */
2271 #define MAP_SUBEVENT_CONNECTION_CLOSED                                    0x02
2272 
2273 /**
2274  * @format 121
2275  * @param subevent_code
2276  * @param map_cid
2277  * @param status
2278  */
2279 #define MAP_SUBEVENT_OPERATION_COMPLETED                                  0x03
2280 
2281 
2282 /**
2283  * @format 12LV
2284  * @param subevent_code
2285  * @param map_cid
2286  * @param name_len
2287  * @param name
2288  */
2289 #define MAP_SUBEVENT_FOLDER_LISTING_ITEM                                  0x04
2290 
2291 /**
2292  * @format 12D
2293  * @param subevent_code
2294  * @param map_cid
2295  * @param handle
2296 
2297  */
2298 #define MAP_SUBEVENT_MESSAGE_LISTING_ITEM                                 0x05
2299 
2300 /**
2301  * @format 12
2302  * @param subevent_code
2303  * @param map_cid
2304  */
2305 #define MAP_SUBEVENT_PARSING_DONE                                         0x06
2306 
2307 
2308 
2309 
2310 #endif
2311