Much faster attribute range lookup - look through short list of attributes and compare to range, rather than looking up by each possible value within the range.
Cleanups to SDP code. Add missing RFCOMM language base ID offset attribute. Fix incorrect definition of the SWAPENDIAN_32() macro.
This commit is contained in:
parent
cb52e4371e
commit
3f3fdb01a9
3 changed files with 78 additions and 61 deletions
|
|
@ -49,13 +49,13 @@
|
|||
#define SDP_ATTRIBUTE_ID_SERVICERECORDHANDLE 0x0000
|
||||
#define SDP_ATTRIBUTE_ID_SERVICECLASSIDS 0x0001
|
||||
#define SDP_ATTRIBUTE_ID_LANGIDOFFSET 0x0006
|
||||
#define SDP_ATTRIBUTE_ID_AVAILABILITY 0x0008
|
||||
#define SDP_ATTRIBUTE_ID_VERSION 0x0200
|
||||
#define SDP_ATTRIBUTE_ID_SERVICENAME 0x0100
|
||||
#define SDP_ATTRIBUTE_ID_SERVICEDESCRIPTION 0x0101
|
||||
|
||||
#define SWAPENDIAN_16(x) ((((x) & 0xFF00) >> 8) | (((x) & 0x00FF) << 8))
|
||||
#define SWAPENDIAN_32(x) (SWAPENDIAN_16(((x) & 0xFFFF0000) >> 16) | SWAPENDIAN_16(((x) & 0x0000FFFF) << 16))
|
||||
#define SWAPENDIAN_32(x) ((((x) & 0xFF000000) >> 24) | (((x) & 0x00FF0000) >> 8) | \
|
||||
(((x) & 0x0000FF00) << 8) | (((x) & 0x000000FF) << 24))
|
||||
|
||||
/** Terminator for a service attribute table of type \ref ServiceAttributeTable_t. */
|
||||
#define SERVICE_ATTRIBUTE_TABLE_TERMINATOR {.Data = NULL}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue