- (SDP_DATATYPE_Sequence | SDP_DATASIZE_Variable16Bit), (sizeof(ClassUUID_t) * 1),
- {
- {.Header = (SDP_DATATYPE_UUID | SDP_DATASIZE_128Bit), .UUID = {BASE_96BIT_UUID, 0x01, 0x00, 0x00, 0x00}}
- }
- };
-
-const struct
-{
- uint8_t Header;
- uint16_t Data;
-} PROGMEM ServiceDiscoveryServer_Attribute_Version = {(SDP_DATATYPE_UnsignedInt | SDP_DATASIZE_16Bit), 0x0100};
-
-/** Service Discovery Protocol attribute table, listing all supported attributes of the service. */
-const ServiceAttributeTable_t ServiceDiscoveryServer_Attribute_Table[] PROGMEM =
- {
- {.AttributeID = SDP_ATTRIBUTE_ID_SERVICERECORDHANDLE, .Data = &ServiceDiscoveryServer_Attribute_ServiceHandle },
- {.AttributeID = SDP_ATTRIBUTE_ID_SERVICECLASSIDS, .Data = &ServiceDiscoveryServer_Attribute_ServiceClassIDs },
- {.AttributeID = SDP_ATTRIBUTE_ID_VERSION, .Data = &ServiceDiscoveryServer_Attribute_Version },
-
- SERVICE_ATTRIBUTE_TABLE_TERMINATOR
- };
-
-/** Service Discovery Protocol attribute, indicationg the service's name. */
-const struct
-{
- uint8_t Header;
- uint8_t Length;
- uint8_t Data[];
-} PROGMEM SDP_Attribute_Name = {(SDP_DATATYPE_String | SDP_DATASIZE_Variable8Bit), sizeof("SDP"), "SDP"};
-
-/** Service Discovery Protocol attribute, indicationg the service's description. */
-const struct
-{
- uint8_t Header;
- uint8_t Length;
- uint8_t Data[];
-} PROGMEM SDP_Attribute_Description = {(SDP_DATATYPE_String | SDP_DATASIZE_Variable8Bit), sizeof("BT Service Discovery"), "BT Service Discovery"};
-
-/** Service Discovery Protocol attribute, indicationg the service's availability. */
-const struct
-{
- uint8_t Header;
- uint8_t Data;
-} PROGMEM SDP_Attribute_Availability = {(SDP_DATATYPE_UnsignedInt | SDP_DATASIZE_8Bit), 0xFF};
-
-const struct
-{
- uint8_t Header;
- uint16_t Data;
-} PROGMEM SDP_Attribute_LanguageOffset = {(SDP_DATATYPE_UnsignedInt | SDP_DATASIZE_16Bit), SDP_ATTRIBUTE_LANGOFFSET};
-
-const struct
-{
- uint8_t Header;
- uint32_t Data;
-} PROGMEM SDP_Attribute_ServiceHandle = {(SDP_DATATYPE_UnsignedInt | SDP_DATASIZE_32Bit), 0x00000001};
-
-const struct
-{
- uint8_t Header;
- uint16_t Size;
- ClassUUID_t UUIDList[];
-} PROGMEM SDP_Attribute_ServiceClassIDs =
- {
- (SDP_DATATYPE_Sequence | SDP_DATASIZE_Variable16Bit), (sizeof(ClassUUID_t) * 1),
- {
- {.Header = (SDP_DATATYPE_UUID | SDP_DATASIZE_128Bit), .UUID = {BASE_96BIT_UUID, 0x00, 0x00, 0x00, 0x01}}
- }
- };
-
-/** Service Discovery Protocol attribute table, listing all supported attributes of the service. */
-const ServiceAttributeTable_t SDP_Attribute_Table[] PROGMEM =
- {
- {.AttributeID = SDP_ATTRIBUTE_ID_SERVICERECORDHANDLE, .Data = &SDP_Attribute_ServiceHandle },
- {.AttributeID = SDP_ATTRIBUTE_ID_SERVICECLASSIDS, .Data = &SDP_Attribute_ServiceClassIDs },
- {.AttributeID = SDP_ATTRIBUTE_ID_LANGIDOFFSET, .Data = &SDP_Attribute_LanguageOffset },
- {.AttributeID = SDP_ATTRIBUTE_ID_NAME, .Data = &SDP_Attribute_Name },
- {.AttributeID = SDP_ATTRIBUTE_ID_DESCRIPTION, .Data = &SDP_Attribute_Description },
-
- SERVICE_ATTRIBUTE_TABLE_TERMINATOR
- };
-
-/** Master service table, listing all supported services (and their attribute tables) of the device, including
- * each service's UUID.
- */
-const ServiceTable_t SDP_Services_Table[] PROGMEM =
- {
- { // 128-bit UUID for the Service Discovery Server Service
- .UUID = {BASE_96BIT_UUID, 0x01, 0x00, 0x00, 0x00},
- .AttributeTable = ServiceDiscoveryServer_Attribute_Table,
- },
- { // 128-bit UUID for the SDP service
- .UUID = {BASE_96BIT_UUID, 0x00, 0x00, 0x00, 0x01},
- .AttributeTable = SDP_Attribute_Table,
- },
-#if 0
- { // 128-bit UUID for the RFCOMM service
- .UUID = {BASE_96BIT_UUID, 0x03, 0x00, 0x00, 0x00},
- .AttributeTable = RFCOMM_Attribute_Table,
- },
-#endif