PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFBBTServiceDiscovery
Wrapper Class for the IBTServiceDiscovery interface.
#include <SFBBTServiceDiscovery.h.hpp>
class SFBBTServiceDiscovery : public SFBQuery;
SFMTYPEDEFWRAPPER(SFBBTServiceDiscovery)

Inheritance diagram

 Inheritance diagram of SFBBTServiceDiscoveryClass

Version

BREW 2.0 BREW 2.1 BREW 3.1 BREW 4.0
X X X O

Reference

BREW API IBTServiceDiscovery

Member

Public Functions
SFCError DeregisterService( UInt32 handle )
Remove from the local Service Discovery database the entry represented by the given service record object.
SFCError GetDiscoverableMode( BTSvcDiscoverableMode * mode )
Retrieve the current discoverable mode of the system.
SFCError GetEvent( BTSDEventType * event , BTResult * result )
Retrieve SD events. When the signal registered via OnEventNotify() is triggered, this API should be called repeatedly until AEE_ENOMORE is returned.
SFCError GetLocalDBSummary( BTServiceRecordSummary * db , SInt32 num , SInt32 numreq )
Retrieve the summary information of the local Service Disovery DB.
SFCError GetMyRecordHandles( UInt32Ptr handle , SInt32 num , SInt32Ptr numValid )
Retrieve the handles of all service records created by this Service Discovery object.
SFCError GetName( BTDeviceInfo * deviceInfo )
Retrieve the remote device's name obtained via the most recent call to StartNameRequest().
SFCError GetNextResponse( BTDeviceInfo * deviceInfo )
Retrieve the next device response.
SFCError GetNumFoundRecs( SInt32Ptr num )
Retrieve the number of records matching service search pattern.
SFCError GetSearchResult( ACharPtr resultXML , SInt32 size , SInt32Ptr sizereq )
Retrieve the result from the most recent call to StartServiceSearch().
SFCError GetSearchResult( SFXAnsiStringPtr resultXML )
Retrieve the result from the most recent call to StartServiceSearch().
static
SFBBTServiceDiscoverySmp
NewInstance( SFCErrorPtr exception = null )
Create a new SFBBTServiceDiscovery instance.
static
SFBBTServiceDiscoverySmp
NewInstance( AEECLSID id , SFCErrorPtr exception = null )
Create a new SFBBTServiceDiscovery instance.
SFCError OnEventNotify( SFBSignalSmpConstRef signal )
Register a signal to be triggered when there is an event that occurred on the SD object.
SFCError ReadRecord( UInt32 handle , ACharPtr serviceRecordXML , SInt32 size , SInt32Ptr sizereq )
Retrieve the service record in XML representation.
SFCError ReadRecord( UInt32 handle , SFXAnsiStringPtr serviceRecordXML )
Retrieve the service record in XML representation.
SFCError RegisterService( ACharConstPtr serviceRecordXML , Bool connectable )
Add an entry to the local Service Discovery database.
SFCError RegisterService( SFXAnsiStringConstRef serviceRecordXML , Bool connectable )
Add an entry to the local Service Discovery database.
SFCError SetDiscoverableMode( BTSvcDiscoverableMode mode )
Set the service discoverable mode.
SFCError StartDeviceSearch( BTClassOfService cos , SInt32 maxDevices , SInt32 duration )
Initiate a device search session.
SFCError StartNameRequest( BDAddress const * address )
Request remote device for its name.
SFCError StartServiceSearch( BDAddress const * address , BTSvcSearchPattern const * pattern )
Request remote device for data in its Service Discovery DB.
SFCError StopDeviceSearch( Void )
Stop an on-going device search.
SFCError StopNameRequest( BDAddress const * address )
Stop the on-going name request.
SFCError StopServiceSearch( Void )
Stop the on-going service search request.
SFCError WriteRecord( UInt32 handle , ACharConstPtr serviceRecordXML )
Update service record with data from given XML string.
SFCError WriteRecord( UInt32 handle , SFXAnsiStringConstRef serviceRecordXML )
Update service record with data from given XML string.
SFCError QueryInterface( AEECLSID clsid , VoidHandle handle ) (inherits from SFBQuery)
Ask an object for another API contract from the object in question.
SFCError QueryInterface( AEECLSID clsid , SFBBaseSmpPtr handle ) (inherits from SFBQuery)
Ask an object for another API contract from the object in question.
SFBBaseSmp QueryInterface( AEECLSID clsid ) (inherits from SFBQuery)
Ask an object for another API contract from the object in question.
Void Self( AEECLSID clsidReq , SFBQuerySmpPtr clone , AEECLSID clsidImp ) (inherits from SFBQuery)
Helper macro for those implementing an object with a single interface.
SFBQuerySmp Self( AEECLSID clsidReq , AEECLSID clsidImp ) (inherits from SFBQuery)
Helper macro for those implementing an object with a single interface.
Protected Functions
static
SFBBaseSmp
FactoryByCreate( AEECLSID id , SFCErrorPtr exception = null ) (inherits from SFBBase)
Create the instance for the specified ClassID's interface.
static
SFBBaseSmp
FactoryByQuery( SFBQuerySmpConstRef query , AEECLSID id , SFCErrorPtr exception = null ) (inherits from SFBBase)
Create the instance for the specified ClassID's interface using the SFBQuery instance.

SFBBTServiceDiscovery::DeregisterService
Remove from the local Service Discovery database the entry represented by the given service record object.
[ public ]
SFCError DeregisterService(
    UInt32 handle   // handle of the service record to be removed
);

Reference

BREW API IBTServiceDiscovery_DeregisterService


SFBBTServiceDiscovery::GetDiscoverableMode
Retrieve the current discoverable mode of the system.
[ public ]
SFCError GetDiscoverableMode(
    BTSvcDiscoverableMode * mode   // destination for the current discoverable mode
);

Reference

BREW API IBTServiceDiscovery_GetDiscoverableMode


SFBBTServiceDiscovery::GetEvent
Retrieve SD events. When the signal registered via OnEventNotify() is triggered, this API should be called repeatedly until AEE_ENOMORE is returned.
[ public ]
SFCError GetEvent(
    BTSDEventType * event   // destination for the event code
    BTResult * result       // destination for failure result
);

Reference

BREW API IBTServiceDiscovery_GetEvent


SFBBTServiceDiscovery::GetLocalDBSummary
Retrieve the summary information of the local Service Disovery DB.
[ public ]
SFCError GetLocalDBSummary(
    BTServiceRecordSummary * db   // destination for the service record summary info
    SInt32 num                    // number of record buffers pDBInfo points to
    SInt32 numreq                 // destination for number of records yet to be read
);

Reference

BREW API IBTServiceDiscovery_GetLocalDBSummary


SFBBTServiceDiscovery::GetMyRecordHandles
Retrieve the handles of all service records created by this Service Discovery object.
[ public ]
SFCError GetMyRecordHandles(
    UInt32Ptr handle     // destination for the list of record handles
    SInt32 num           // number of handles puHandles can hold
    SInt32Ptr numValid   // number of valid handles
);

Reference

BREW API IBTServiceDiscovery_GetMyRecordHandles


SFBBTServiceDiscovery::GetName
Retrieve the remote device's name obtained via the most recent call to StartNameRequest().
[ public ]
SFCError GetName(
    BTDeviceInfo * deviceInfo   // deviceInfo->bdAddr: address of remote device
);

Reference

BREW API IBTServiceDiscovery_GetName | SFBBTServiceDiscovery::StartNameRequest


SFBBTServiceDiscovery::GetNextResponse
Retrieve the next device response.
[ public ]
SFCError GetNextResponse(
    BTDeviceInfo * deviceInfo   // destination for the next device response
);

Reference

BREW API IBTServiceDiscovery_GetNextResponse


SFBBTServiceDiscovery::GetNumFoundRecs
Retrieve the number of records matching service search pattern.
[ public ]
SFCError GetNumFoundRecs(
    SInt32Ptr num   // destination for the number of records found
);

Reference

BREW API IBTServiceDiscovery_GetNumFoundRecs


SFBBTServiceDiscovery::GetSearchResult
Retrieve the result from the most recent call to StartServiceSearch().
[ public ]
SFCError GetSearchResult(
    ACharPtr resultXML   // destination for the search result
    SInt32 size          // size of buffer pointed to by resultXML
    SInt32Ptr sizereq    // destination for the required size
);
[ public ]
SFCError GetSearchResult(
    SFXAnsiStringPtr resultXML   // destination for the search result
);

Reference

BREW API IBTServiceDiscovery_GetSearchResult | SFBBTServiceDiscovery::StartServiceSearch


SFBBTServiceDiscovery::NewInstance
Create a new SFBBTServiceDiscovery instance.
[ public, static ]
SFBBTServiceDiscoverySmp NewInstance(
    SFCErrorPtr exception = null   // Error
);
[ public, static ]
SFBBTServiceDiscoverySmp NewInstance(
    AEECLSID id                    // Class ID
    SFCErrorPtr exception = null   // Error
);

SFBBTServiceDiscovery::OnEventNotify
Register a signal to be triggered when there is an event that occurred on the SD object.
[ public ]
SFCError OnEventNotify(
    SFBSignalSmpConstRef signal   // signal to be triggered when an event occurs
);

Reference

BREW API IBTServiceDiscovery_OnEventNotify | SFBBTServiceDiscovery::GetEvent


SFBBTServiceDiscovery::ReadRecord
Retrieve the service record in XML representation.
[ public ]
SFCError ReadRecord(
    UInt32 handle               // record handle of the service record of interest
    ACharPtr serviceRecordXML   // destination for null-terminated XML representation of record
    SInt32 size                 // size of buffer pointed to by pszXML
    SInt32Ptr sizereq           // destination for required size
);
[ public ]
SFCError ReadRecord(
    UInt32 handle                       // record handle of the service record of interest
    SFXAnsiStringPtr serviceRecordXML   // destination for XML representation of record
);

Reference

BREW API IBTServiceDiscovery_ReadRecord


SFBBTServiceDiscovery::RegisterService
Add an entry to the local Service Discovery database.
[ public ]
SFCError RegisterService(
    ACharConstPtr serviceRecordXML   // null-terminated XML string representing the service record
    Bool connectable                 // true if local device should be connectable
);
[ public ]
SFCError RegisterService(
    SFXAnsiStringConstRef serviceRecordXML   // XML string representing the service record
    Bool connectable                         // true if local device should be connectable
);

Reference

BREW API IBTServiceDiscovery_RegisterService | SFBBTServiceDiscovery::GetMyRecordHandles


SFBBTServiceDiscovery::SetDiscoverableMode
Set the service discoverable mode.
[ public ]
SFCError SetDiscoverableMode(
    BTSvcDiscoverableMode mode   // the discoverable mode to set
);

Reference

BREW API IBTServiceDiscovery_SetDiscoverableMode


SFBBTServiceDiscovery::StartDeviceSearch
Initiate a device search session.
[ public ]
SFCError StartDeviceSearch(
    BTClassOfService cos   // class of device for which to search
    SInt32 maxDevices      // max number of devices for which to search
    SInt32 duration        // search duration in seconds
);

Reference

BREW API IBTServiceDiscovery_StartDeviceSearch | SFBBTServiceDiscovery::GetNextResponse | SFBBTServiceDiscovery::StopDeviceSearch


SFBBTServiceDiscovery::StartNameRequest
Request remote device for its name.
[ public ]
SFCError StartNameRequest(
    BDAddress const * address   // address of remote device
);

Reference

BREW API IBTServiceDiscovery_StartNameRequest | SFBBTServiceDiscovery::StopNameRequest | SFBBTServiceDiscovery::GetName


SFBBTServiceDiscovery::StartServiceSearch
Request remote device for data in its Service Discovery DB.
[ public ]
SFCError StartServiceSearch(
    BDAddress const * address            // address of remote device
    BTSvcSearchPattern const * pattern   // what to search for
);

Reference

BREW API IBTServiceDiscovery_StartServiceSearch | SFBBTServiceDiscovery::StopServiceSearch | SFBBTServiceDiscovery::GetNumFoundRecs | SFBBTServiceDiscovery::GetSearchResult


SFBBTServiceDiscovery::StopDeviceSearch
Stop an on-going device search.
[ public ]
SFCError StopDeviceSearch(Void);

Reference

BREW API IBTServiceDiscovery_StopDeviceSearch | SFBBTServiceDiscovery::GetNextResponse


SFBBTServiceDiscovery::StopNameRequest
Stop the on-going name request.
[ public ]
SFCError StopNameRequest(
    BDAddress const * address   // address of remote device
);

Reference

BREW API IBTServiceDiscovery_StopNameRequest


SFBBTServiceDiscovery::StopServiceSearch
Stop the on-going service search request.
[ public ]
SFCError StopServiceSearch(Void);

Reference

BREW API IBTServiceDiscovery_StopServiceSearch


SFBBTServiceDiscovery::WriteRecord
Update service record with data from given XML string.
[ public ]
SFCError WriteRecord(
    UInt32 handle                    // record holder of the service record of interest
    ACharConstPtr serviceRecordXML   // string representing service data to save in DB
);
[ public ]
SFCError WriteRecord(
    UInt32 handle                            // record holder of the service record of interest
    SFXAnsiStringConstRef serviceRecordXML   // string representing service data to save in DB
);

Reference

BREW API IBTServiceDiscovery_WriteRecord