RBTRegistry Class Reference

class RBTRegistry : public RBTManSubSession

Creates and opens a subsession on the BT Registry Server for remote devices.

This subsession allows details of remote devices to be updated, modified, examined etc.

Inherits from

Public Member Functions
RBTRegistry ()
IMPORT_C void AddDeviceL (const CBTDevice &, TRequestStatus &)
IMPORT_C void Close ()
IMPORT_C TInt CloseView ()
IMPORT_C void CreateView (const TBTRegistrySearch &, TRequestStatus &)
IMPORT_C void DeleteAllInView ( TRequestStatus &)
IMPORT_C void GetDevice ( TBTNamelessDevice &, TRequestStatus &)
void GetResults ( TPtr8 &, TRequestStatus &)
IMPORT_C void ModifyBluetoothDeviceNameL (const TBTDevAddr &, const TDesC8 &, TRequestStatus &)
IMPORT_C void ModifyDevice (const TBTNamelessDevice &, TRequestStatus &)
IMPORT_C void ModifyFriendlyDeviceNameL (const TBTDevAddr &, const TDesC &, TRequestStatus &)
IMPORT_C void NotifyViewChange ( TRequestStatus &)
IMPORT_C TInt Open ( RBTRegServ &)
void PreLoad ( TRequestStatus &)
IMPORT_C void UnpairAllInView ( TRequestStatus &)
IMPORT_C void UnpairDevice (const TBTDevAddr &, TRequestStatus &)
Inherited Functions
RBTManSubSession::CancelRequest(TRequestStatus &)
RBTManSubSession::IsBusy()const
RBTManSubSession::LocalComplete(TRequestStatus &,TInt)
RBTManSubSession::RBTManSubSession()
RBTManSubSession::SetBusy(TRequestStatus &)
RSubSessionBase::CloseSubSession(TInt)
RSubSessionBase::CreateAutoCloseSubSession(RSessionBase &,TInt,const TIpcArgs &)
RSubSessionBase::CreateSubSession(const RSessionBase &,TInt)
RSubSessionBase::CreateSubSession(const RSessionBase &,TInt,const TIpcArgs &)
RSubSessionBase::RSubSessionBase()
RSubSessionBase::Send(TInt)const
RSubSessionBase::Send(TInt,const TIpcArgs &)const
RSubSessionBase::SendReceive(TInt)const
RSubSessionBase::SendReceive(TInt,TRequestStatus &)const
RSubSessionBase::SendReceive(TInt,const TIpcArgs &)const
RSubSessionBase::SendReceive(TInt,const TIpcArgs &,TRequestStatus &)const
RSubSessionBase::Session()const
RSubSessionBase::SubSessionHandle()const
Private Attributes
TPckgBuf < TBTDevAddr > iAddrBuf
TPckg < TBTNamelessDevice > iDevicePckg
TUint32 iPadding1
TUint32 iPadding2
TBTRegistrySearchPckgBuf iSearchPckg
CBufFlat * iSendBuffer
TPtrC8 iSendBufferPtr
Inherited Attributes
RBTManSubSession::iClientServerMsg

Constructor & Destructor Documentation

RBTRegistry()

IMPORT_C RBTRegistry ( )

Default constructor for registry subsession

Member Functions Documentation

AddDeviceL(const CBTDevice &, TRequestStatus &)

IMPORT_C void AddDeviceL ( const CBTDevice & aDeviceDetails,
TRequestStatus & aStatus
)
Add device to the registry
leave
OOM
capability
LocalServices

Parameters

const CBTDevice & aDeviceDetails reference to CBTDevice of details of device to add
TRequestStatus & aStatus reference to client AO's TRequestStatus

Close()

IMPORT_C void Close ( ) [virtual]

Close the subsession. Removes all server side resources pertaining to this subsession

CloseView()

IMPORT_C TInt CloseView ( )
Close a previously created view on the registry. Allows an app to use this subsession for other view or non-view operations
Post-condition
Subsession is left open for further use - eg to create another view, or perform a viewless operation

CreateView(const TBTRegistrySearch &, TRequestStatus &)

IMPORT_C void CreateView ( const TBTRegistrySearch & aSearch,
TRequestStatus & aStatus
)

Create a constrained view of devices on the remote device table of the registry server.

This is in effect a registry search facility. It is needed if the user wishes find data in the registry of uncertain size. For example:- 1) a list of remote devices. 2) full details of a remote device including its name and/or friendly name. Note 1: Some methods in the API (e.g. UnpairAllInView) require a view to have been created prior to their use. Note 2: When a view has been generated, if details of the device(s) found are needed, these should be obtained using an instance of CBTRegistryResponse . Note 3: A view must be closed before a new view can be created.

UnpairAllInView DeleteAllInView CloseView NotifyViewChange TBTRegistrySearch CBTRegistryResponse
capability
LocalServices
capability
ReadDeviceData (LocalServices only if link key is not needed)

Parameters

const TBTRegistrySearch & aSearch A search struct with details of devices to be contained in the result set
TRequestStatus & aStatus TRequestStatus supplied by caller

DeleteAllInView(TRequestStatus &)

IMPORT_C void DeleteAllInView ( TRequestStatus & aStatus )
Remove all devices in the view from the Registry
Pre-condition
View must be created first by client
CreateView
capability
LocalServices
capability
WriteDeviceData (Only if different process than the one that created the device)

Parameters

TRequestStatus & aStatus a TRequestStatus passed in by the caller

GetDevice(TBTNamelessDevice &, TRequestStatus &)

IMPORT_C void GetDevice ( TBTNamelessDevice & aDevice,
TRequestStatus & aStatus
)
Get a *nameless* device to the registry. To retrieve a full device with names a view should be created CreateView
Pre-condition
Clients must ensure that they do not call this method while the same operation is already outstanding on the same RBTRegistry subsession
capability
LocalServices
capability
ReadDeviceData (LocalServices only if link key is not needed)

Parameters

TBTNamelessDevice & aDevice reference to TBTDevice (used as input and output). The input MUST contain the device address - this is used as the key. Once the method completes the reference will contain all other details found from the registry
TRequestStatus & aStatus reference to client AO's TRequestStatus

GetResults(TPtr8 &, TRequestStatus &)

void GetResults ( TPtr8 & aResultBuf,
TRequestStatus & aStatus
)

Parameters

TPtr8 & aResultBuf
TRequestStatus & aStatus

ModifyBluetoothDeviceNameL(const TBTDevAddr &, const TDesC8 &, TRequestStatus &)

IMPORT_C void ModifyBluetoothDeviceNameL ( const TBTDevAddr & aAddress,
const TDesC8 & aNewName,
TRequestStatus & aStatus
)
Modify the Bluetooth name of a device. This is not used beyond the stack
capability
LocalServices
capability
WriteDeviceData (localServices only if friendly device name)

Parameters

const TBTDevAddr & aAddress The address of the device of which to change the name
const TDesC8 & aNewName The new name (note - this is an 8bit descriptor)
TRequestStatus & aStatus reference to client AO's TRequestStatus

ModifyDevice(const TBTNamelessDevice &, TRequestStatus &)

IMPORT_C void ModifyDevice ( const TBTNamelessDevice & aDevice,
TRequestStatus & aStatus
)
Update details of a device - other than its names: Not used beyond stack
capability
LocalServices
capability
WriteDeviceData

Parameters

const TBTNamelessDevice & aDevice The new details - the device address MUST be present in aDeviceDetails is used as the key
TRequestStatus & aStatus reference to client AO's TRequestStatus

ModifyFriendlyDeviceNameL(const TBTDevAddr &, const TDesC &, TRequestStatus &)

IMPORT_C void ModifyFriendlyDeviceNameL ( const TBTDevAddr & aAddress,
const TDesC & aNewName,
TRequestStatus & aStatus
)
Modify the friendly name of a device
leave
OOM
capability
LocalServices

Parameters

const TBTDevAddr & aAddress The address of the device of which to change the name
const TDesC & aNewName The new name (note - not an 8bit descriptor)
TRequestStatus & aStatus reference to client AO's TRequestStatus

NotifyViewChange(TRequestStatus &)

IMPORT_C void NotifyViewChange ( TRequestStatus & aStatus )

Notifies the client when a change has been made to the registry that affects the currently open view of devices. CreateView CloseView

Parameters

TRequestStatus & aStatus reference to client AO's TRequestStatus

Open(RBTRegServ &)

IMPORT_C TInt Open ( RBTRegServ & aSession )
Open a Bluetooth device subsession.
capability
LocalServices

Parameters

RBTRegServ & aSession The BTManager session to which this subsession is to be attached.

PreLoad(TRequestStatus &)

void PreLoad ( TRequestStatus & aStatus )

Parameters

TRequestStatus & aStatus

UnpairAllInView(TRequestStatus &)

IMPORT_C void UnpairAllInView ( TRequestStatus & aStatus )
Unpair all the devices in the view - useful to unbond eg all devices (create a View with search All), or eg unbond all headsets
capability
LocalServices
capability
WriteDeviceData

Parameters

TRequestStatus & aStatus reference to client AO's TRequestStatus

UnpairDevice(const TBTDevAddr &, TRequestStatus &)

IMPORT_C void UnpairDevice ( const TBTDevAddr & aAddress,
TRequestStatus & aStatus
)
Unpair a device in the registry
capability
LocalServices
capability
WriteDeviceData

Parameters

const TBTDevAddr & aAddress The device to unpair
TRequestStatus & aStatus reference to client AO's TRequestStatus

Member Data Documentation

TPckgBuf< TBTDevAddr > iAddrBuf

TPckgBuf < TBTDevAddr > iAddrBuf [private]

TPckg< TBTNamelessDevice > iDevicePckg

TPckg < TBTNamelessDevice > iDevicePckg [private]

TUint32 iPadding1

TUint32 iPadding1 [private]

TUint32 iPadding2

TUint32 iPadding2 [private]

TBTRegistrySearchPckgBuf iSearchPckg

TBTRegistrySearchPckgBuf iSearchPckg [private]

CBufFlat * iSendBuffer

CBufFlat * iSendBuffer [private]

TPtrC8 iSendBufferPtr

TPtrC8 iSendBufferPtr [private]