ServiceRecordUtilities Class

Utilities method working on SDP ServiceRecords, for instance to produce a 'dump' of the record's contents.

Definition

Namespace: InTheHand.Net.Bluetooth.Sdp
Assembly: InTheHand.Net.Bluetooth (in InTheHand.Net.Bluetooth.dll) Version: 4.0.32+5cdf1cfd21064ea31c5de33d160200ca1c4bc218
C#
public static class ServiceRecordUtilities
Inheritance
Object    ServiceRecordUtilities

Remarks

This class produces output like the following:
 
AttrId: 0x0000 -- ServiceRecordHandle
UInt32: 0x0

AttrId: 0x0001 -- ServiceClassIdList
ElementSequence
    Uuid16: 0x1000 -- ServiceDiscoveryServer

AttrId: 0x0004 -- ProtocolDescriptorList
ElementSequence
    ElementSequence
        Uuid16: 0x100 -- L2CapProtocol
        UInt16: 0x1
    ElementSequence
        Uuid16: 0x1 -- SdpProtocol
( ( L2Cap, PSM=Sdp ), ( Sdp ) )

AttrId: 0x0005 -- BrowseGroupList
ElementSequence
    Uuid16: 0x1002 -- PublicBrowseGroup

AttrId: 0x0006 -- LanguageBaseAttributeIdList
ElementSequence
    UInt16: 0x656E
    UInt16: 0x6A
    UInt16: 0x100

AttrId: 0x0100 -- ServiceName
TextString: [en] 'Service Discovery'

AttrId: 0x0101 -- ServiceDescription
TextString: [en] 'Publishes services to remote devices'

AttrId: 0x0102 -- ProviderName
TextString: [en] 'Microsoft'

AttrId: 0x0200 -- VersionNumberList
ElementSequence
    UInt16: 0x100

AttrId: 0x0201 -- ServiceDatabaseState
UInt32: 0x1
The Service Class Id names and Attribute Id names are looked up using GetName(Guid)/etc and MapServiceClassToAttributeIdList respectively.

Methods

Dump(ServiceRecord, Type) Gets a String containing a 'dump' of the given record, including attribute names etc.
Dump(TextWriter, ServiceRecord, Type) Produce a 'dump' of the given record, including attribute names etc to the given TextWriter.
DumpRaw(ServiceRecord) Gets a string containing a raw 'dump' of the given record, not including attribute names etc.
DumpRaw(TextWriter, ServiceRecord) Produce a raw 'dump' of the given record, not including attribute names etc, to the given TextWriter.

See Also