Preparations for release.
[AROS.git] / compiler / include / bluetooth / sdp.h
blob6bc76f9ff9872434edbd8b2b735da6ba83c118ec
1 #ifndef BLUETOOTH_SDP_H
2 #define BLUETOOTH_SDP_H
3 /*
4 ** $VER: sdp.h 1.0 (15.05.06)
5 **
6 ** Bluetooth Service Discovery Protocol (SDP) definitions include file
7 **
8 ** (C) Copyright 2006 Chris Hodges
9 ** All Rights Reserved
12 #if defined(__GNUC__)
13 # pragma pack(1)
14 #endif
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
43 struct BTSDPPkt
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 */
53 /* PDU IDs */
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
62 /* Errors */
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
71 #if defined(__GNUC__)
72 # pragma pack()
73 #endif
75 #endif /* BLUETOOTH_SDP_H */