1 #ifndef BLUETOOTH_SDP_H
2 #define BLUETOOTH_SDP_H
4 ** $VER: sdp.h 1.0 (15.05.06)
6 ** Bluetooth Service Discovery Protocol (SDP) definitions include file
8 ** (C) Copyright 2006 Chris Hodges
16 /* Data Element Type Descriptors */
17 #define SDPDET_MASK 0xf8
18 #define SDPDET_SHIFT 3
20 #define SDPDET_NIL 0 // Nil, the null type (0)
21 #define SDPDET_UINT 1 // Unsigned integer (0 - 4)
22 #define SDPDET_SINT 2 // Signed integer (0 - 4)
23 #define SDPDET_UUID 3 // UUID (1, 2, 4)
24 #define SDPDET_STRING 4 // Text string (5, 6, 7)
25 #define SDPDET_BOOLEAN 5 // Boolean (0)
26 #define SDPDET_DATASEQ 6 // Data element sequence (5, 6, 7)
27 #define SDPDET_DATAMUT 7 // Data element sequence, one mutually exclusive (5, 6, 7)
28 #define SDPDET_URL 8 // URL (5, 6, 7)
30 /* Data Element Size Descriptors */
31 #define SDPDES_MASK 0x07
32 #define SDPDES_SHIFT 0
34 #define SDPDES_1BYTE 0 // 1 Byte (except for NIL)
35 #define SDPDES_2BYTES 1 // 2 Bytes
36 #define SDPDES_4BYTES 2 // 4 Bytes
37 #define SDPDES_8BYTES 3 // 8 Bytes
38 #define SDPDES_16BYTES 4 // 16 Bytes
39 #define SDPDES_8BITSIZE 5 // BYTE with size follows
40 #define SDPDES_16BITSIZE 6 // WORD with size follows
41 #define SDPDES_32BITSIZE 7 // LONG with size follows
45 UBYTE sdpp_ID
; /* PDU ID */
46 UBYTE sdpp_TransIDHigh
; /* Transaction ID HighByte */
47 UBYTE sdpp_TransIDLow
; /* Transaction ID LowByte */
48 UBYTE sdpp_ParamLenHigh
; /* Parameter Length HighByte */
49 UBYTE sdpp_ParamLenLow
; /* Parameter Length LowByte */
50 UBYTE sdpp_Param
[0]; /* Parameters */
54 #define SDPPID_ERROR_RESPONSE 0x01
55 #define SDPPID_SEARCH_REQUEST 0x02
56 #define SDPPID_SEARCH_RESPONSE 0x03
57 #define SDPPID_ATTRIBUTE_REQUEST 0x04
58 #define SDPPID_ATTRIBUTE_RESPONSE 0x05
59 #define SDPPID_SEARCH_ATTRIBUTE_REQUEST 0x06
60 #define SDPPID_SEARCH_ATTRIBUTE_RESPONSE 0x07
64 #define SDPERR_INVALID_SDP_VERSION 0x0001
65 #define SDPERR_INVALID_SERVICE_RECORD_HANDLE 0x0002
66 #define SDPERR_INVALID_REQUEST_SYNTAX 0x0003
67 #define SDPERR_INVALID_PDU_SIZE 0x0004
68 #define SDPERR_INVALID_CONTINUATION_STATE 0x0005
69 #define SDPERR_INSUFFICIENT_RESOURCES 0x0006
75 #endif /* BLUETOOTH_SDP_H */