In The Hand - .NET Components for Mobility
ServiceRecordUtilities Class
NamespacesInTheHand.Net.BluetoothServiceRecordUtilities
Utilities method working on SDP ServiceRecords, for instance to produce a 'dump' of the record's contents.
Declaration Syntax
C#Visual Basic
public static class ServiceRecordUtilities
Public NotInheritable Class ServiceRecordUtilities
Members
All MembersMethods



IconMemberDescription
Dump(ServiceRecord, array<Type>[]()[])
Gets a String containing a 'dump' of the given record, including attribute names etc.

Dump(TextWriter, ServiceRecord, array<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.

Remarks
This class produces output like the following:
CopyC#
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 HackClassUuidLookup and MapServiceClassToAttributeIdList respectively.
Inheritance Hierarchy
Object
ServiceRecordUtilities

Assembly: InTheHand.Net.Personal (Module: InTheHand.Net.Personal) Version: 2.2.0.0