#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
#include <winternl.h>
#include "wine/debug.h"
#include "bthsdpdef.h"
#include "bluetoothapis.h"
Go to the source code of this file.
|
| | WINE_DEFAULT_DEBUG_CHANNEL (bluetoothapis) |
| |
| static void | bth_read_uint128 (BYTE *s, SDP_ULARGE_INTEGER_16 *v) |
| |
| static BYTE | data_elem_type (BYTE elem) |
| |
| static BYTE | data_elem_size_desc (BYTE elem) |
| |
| static BOOL | sdp_elem_read_var_size (BYTE *stream, ULONG stream_size, SIZE_T *read, BYTE size_desc, UINT32 *size) |
| |
| static BOOL | sdp_read_specific_type (BYTE *stream, ULONG stream_size, SDP_SPECIFICTYPE st, SDP_ELEMENT_DATA *data, SIZE_T *read) |
| |
| static DWORD | sdp_read_element_data (BYTE *stream, ULONG stream_size, SDP_ELEMENT_DATA *data, SIZE_T *read) |
| |
| DWORD WINAPI | BluetoothSdpGetElementData (BYTE *stream, ULONG stream_size, SDP_ELEMENT_DATA *data) |
| |
| DWORD WINAPI | BluetoothSdpGetContainerElementData (BYTE *stream, ULONG stream_size, HBLUETOOTH_CONTAINER_ELEMENT *handle, SDP_ELEMENT_DATA *data) |
| |
| BOOL WINAPI | BluetoothSdpEnumAttributes (BYTE *stream, ULONG stream_size, PFN_BLUETOOTH_ENUM_ATTRIBUTES_CALLBACK callback, void *param) |
| |
| static BOOL WINAPI | get_attr_value_callback (ULONG attr_id, BYTE *stream, ULONG stream_size, void *params) |
| |
| DWORD WINAPI | BluetoothSdpGetAttributeValue (BYTE *stream, ULONG stream_size, USHORT attr_id, SDP_ELEMENT_DATA *data) |
| |
◆ BTH_READ_UINT16
Definition at line 33 of file sdp.c.
◆ BTH_READ_UINT32
Definition at line 34 of file sdp.c.
◆ BTH_READ_UINT64
Definition at line 35 of file sdp.c.
◆ SDP_ELEMENT_IS_ATTRID
Definition at line 56 of file sdp.c.
◆ SDP_ELEMENT_IS_UINT16
Definition at line 55 of file sdp.c.
◆ SDP_SIZE_DESC_16_BYTES
| #define SDP_SIZE_DESC_16_BYTES 4 |
Definition at line 41 of file sdp.c.
◆ SDP_SIZE_DESC_1_BYTE
| #define SDP_SIZE_DESC_1_BYTE 0 |
Definition at line 37 of file sdp.c.
◆ SDP_SIZE_DESC_2_BYTES
| #define SDP_SIZE_DESC_2_BYTES 1 |
Definition at line 38 of file sdp.c.
◆ SDP_SIZE_DESC_4_BYTES
| #define SDP_SIZE_DESC_4_BYTES 2 |
Definition at line 39 of file sdp.c.
◆ SDP_SIZE_DESC_8_BYTES
| #define SDP_SIZE_DESC_8_BYTES 3 |
Definition at line 40 of file sdp.c.
◆ SDP_SIZE_DESC_NEXT_UINT16
| #define SDP_SIZE_DESC_NEXT_UINT16 6 |
Definition at line 43 of file sdp.c.
◆ SDP_SIZE_DESC_NEXT_UINT32
| #define SDP_SIZE_DESC_NEXT_UINT32 7 |
Definition at line 44 of file sdp.c.
◆ SDP_SIZE_DESC_NEXT_UINT8
| #define SDP_SIZE_DESC_NEXT_UINT8 5 |
Definition at line 42 of file sdp.c.
◆ BluetoothSdpEnumAttributes()
Definition at line 320 of file sdp.c.
322{
326
328
330
333 {
336 }
337
339 {
342 break;
343 default:
346 }
347
348 for (;;)
349 {
352 BYTE *raw_attr_stream;
353
355 data.data.sequence.length, &
cursor, &attrid );
358 {
361 }
362
367 {
370 }
374 }
375}
#define ERROR_INVALID_PARAMETER
#define ERROR_NO_MORE_ITEMS
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
static IPrintDialogCallback callback
int const char int stream_size
DWORD WINAPI BluetoothSdpGetElementData(BYTE *stream, ULONG stream_size, SDP_ELEMENT_DATA *data)
DWORD WINAPI BluetoothSdpGetContainerElementData(BYTE *stream, ULONG stream_size, HBLUETOOTH_CONTAINER_ELEMENT *handle, SDP_ELEMENT_DATA *data)
#define SDP_ELEMENT_IS_ATTRID(d)
union _SDP_ELEMENT_DATA::@2942 data
#define ERROR_INVALID_DATA
Referenced by BluetoothSdpGetAttributeValue().
◆ BluetoothSdpGetAttributeValue()
Definition at line 400 of file sdp.c.
402{
404
406
408
413
415}
#define ERROR_FILE_NOT_FOUND
static BOOL WINAPI get_attr_value_callback(ULONG attr_id, BYTE *stream, ULONG stream_size, void *params)
BOOL WINAPI BluetoothSdpEnumAttributes(BYTE *stream, ULONG stream_size, PFN_BLUETOOTH_ENUM_ATTRIBUTES_CALLBACK callback, void *param)
◆ BluetoothSdpGetContainerElementData()
Definition at line 263 of file sdp.c.
266{
270
272
275
277
279 {
283
287
292
296
299 }
300 else
301 {
304
307 }
310
315}
GLuint GLuint GLsizei GLenum type
static BYTE data_elem_size_desc(BYTE elem)
static BOOL sdp_elem_read_var_size(BYTE *stream, ULONG stream_size, SIZE_T *read, BYTE size_desc, UINT32 *size)
#define SDP_SIZE_DESC_NEXT_UINT8
#define SDP_SIZE_DESC_NEXT_UINT32
static DWORD sdp_read_element_data(BYTE *stream, ULONG stream_size, SDP_ELEMENT_DATA *data, SIZE_T *read)
static BYTE data_elem_type(BYTE elem)
Referenced by BluetoothSdpEnumAttributes().
◆ BluetoothSdpGetElementData()
◆ bth_read_uint128()
◆ data_elem_size_desc()
| static BYTE data_elem_size_desc |
( |
BYTE |
elem | ) |
|
|
static |
◆ data_elem_type()
◆ get_attr_value_callback()
◆ sdp_elem_read_var_size()
◆ sdp_read_element_data()
Definition at line 154 of file sdp.c.
156{
159
161
165
169
172 {
175
178 break;
183
186
189
191 data->specificType = st;
192 break;
196
201 break;
206 {
209
214
218
220
224 {
226 data->
data.string.length = elems_size;
227 }
228 else
229 {
230
231
233 data->
data.sequence.length = elems_size + *
read + size_read;
234 }
235 *
read += size_read + elems_size;
236 break;
237 }
238 default:
240 }
241
243}
#define SDP_SIZE_DESC_1_BYTE
static const SDP_SPECIFICTYPE SDP_BASIC_TYPES[4][5]
static BOOL sdp_read_specific_type(BYTE *stream, ULONG stream_size, SDP_SPECIFICTYPE st, SDP_ELEMENT_DATA *data, SIZE_T *read)
#define SDP_SIZE_DESC_16_BYTES
Referenced by BluetoothSdpGetContainerElementData(), and BluetoothSdpGetElementData().
◆ sdp_read_specific_type()
Definition at line 110 of file sdp.c.
112{
113 switch (st)
114 {
120 break;
127 break;
133 break;
139 break;
146 break;
147 default:
149 }
150
152}
COMPILER_DEPENDENT_UINT64 UINT64
static void bth_read_uint128(BYTE *s, SDP_ULARGE_INTEGER_16 *v)
Referenced by sdp_read_element_data().
◆ WINE_DEFAULT_DEBUG_CHANNEL()
| WINE_DEFAULT_DEBUG_CHANNEL |
( |
bluetoothapis |
| ) |
|
◆ SDP_BASIC_TYPES
Initial value:= {
{
},
{
},
{
},
}
#define SDP_SIZE_DESC_2_BYTES
#define SDP_SIZE_DESC_8_BYTES
#define SDP_SIZE_DESC_4_BYTES
Definition at line 85 of file sdp.c.
Referenced by sdp_read_element_data().