- uint16_t AttributeIDListLength = ServiceDiscovery_GetDataElementSize(&CurrentParameter, &ElementHeaderSize);
- BT_SDP_DEBUG(2, "-- Total Attribute Length: 0x%04X", AttributeIDListLength);
- while (AttributeIDListLength)
+static uint8_t ServiceDiscovery_GetAttribute(uint8_t UUIDList[][UUID_SIZE_BYTES], const uint8_t TotalUUIDs, const uint32_t Attribute,
+ uint8_t** DataBuffer, uint8_t BufferLen)
+{
+ for (uint8_t CurrTableItem = 0; CurrTableItem < (sizeof(SDP_Services_Table) / sizeof(ServiceTable_t)); CurrTableItem++)
+ {
+ for (uint8_t CurrUUIDIndex = 0; CurrUUIDIndex < TotalUUIDs; CurrUUIDIndex++)
+ {
+ if (!(memcmp(SDP_Services_Table[CurrTableItem].UUID, UUIDList[CurrUUIDIndex], UUID_SIZE_BYTES)))
+ {
+ const ServiceAttributeTable_t* AttributeTable = SDP_Services_Table[CurrTableItem].AttributeTable;
+
+ // TODO: Process attribute table
+ BT_SDP_DEBUG(2, "FOUND UUID IN TABLE");
+
+ break;
+ }
+ }
+ }
+
+ return 0;
+}
+
+static uint8_t ServiceDiscovery_GetUUIDList(uint8_t UUIDList[][UUID_SIZE_BYTES], const void** CurrentParameter)
+{
+ uint8_t ElementHeaderSize;
+ uint8_t TotalUUIDs = 0;
+
+ uint16_t ServicePatternLength = ServiceDiscovery_GetDataElementSize(CurrentParameter, &ElementHeaderSize);
+ BT_SDP_DEBUG(2, "-- Total UUID Length: 0x%04X", ServicePatternLength);
+ while (ServicePatternLength)