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 voidAddDeviceL(const CBTDevice &, TRequestStatus &)
IMPORT_C voidClose()
IMPORT_C TIntCloseView()
IMPORT_C voidCreateView(const TBTRegistrySearch &, TRequestStatus &)
IMPORT_C voidDeleteAllInView(TRequestStatus &)
IMPORT_C voidGetDevice(TBTNamelessDevice &, TRequestStatus &)
voidGetResults(TPtr8 &, TRequestStatus &)
IMPORT_C voidModifyBluetoothDeviceNameL(const TBTDevAddr &, const TDesC8 &, TRequestStatus &)
IMPORT_C voidModifyDevice(const TBTNamelessDevice &, TRequestStatus &)
IMPORT_C voidModifyFriendlyDeviceNameL(const TBTDevAddr &, const TDesC &, TRequestStatus &)
IMPORT_C voidNotifyViewChange(TRequestStatus &)
IMPORT_C TIntOpen(RBTRegServ &)
voidPreLoad(TRequestStatus &)
IMPORT_C voidUnpairAllInView(TRequestStatus &)
IMPORT_C voidUnpairDevice(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_CRBTRegistry()

Default constructor for registry subsession

Member Functions Documentation

AddDeviceL(const CBTDevice &, TRequestStatus &)

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

Parameters

const CBTDevice & aDeviceDetailsreference to CBTDevice of details of device to add
TRequestStatus & aStatusreference to client AO's TRequestStatus

Close()

IMPORT_C voidClose()[virtual]

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

CloseView()

IMPORT_C TIntCloseView()
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 voidCreateView(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 & aSearchA search struct with details of devices to be contained in the result set
TRequestStatus & aStatusTRequestStatus supplied by caller

DeleteAllInView(TRequestStatus &)

IMPORT_C voidDeleteAllInView(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 & aStatusa TRequestStatus passed in by the caller

GetDevice(TBTNamelessDevice &, TRequestStatus &)

IMPORT_C voidGetDevice(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 & aDevicereference 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 & aStatusreference to client AO's TRequestStatus

GetResults(TPtr8 &, TRequestStatus &)

voidGetResults(TPtr8 &aResultBuf,
TRequestStatus &aStatus
)

Parameters

TPtr8 & aResultBuf
TRequestStatus & aStatus

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

IMPORT_C voidModifyBluetoothDeviceNameL(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 & aAddressThe address of the device of which to change the name
const TDesC8 & aNewNameThe new name (note - this is an 8bit descriptor)
TRequestStatus & aStatusreference to client AO's TRequestStatus

ModifyDevice(const TBTNamelessDevice &, TRequestStatus &)

IMPORT_C voidModifyDevice(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 & aDeviceThe new details - the device address MUST be present in aDeviceDetails is used as the key
TRequestStatus & aStatusreference to client AO's TRequestStatus

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

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

Parameters

const TBTDevAddr & aAddressThe address of the device of which to change the name
const TDesC & aNewNameThe new name (note - not an 8bit descriptor)
TRequestStatus & aStatusreference to client AO's TRequestStatus

NotifyViewChange(TRequestStatus &)

IMPORT_C voidNotifyViewChange(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 & aStatusreference to client AO's TRequestStatus

Open(RBTRegServ &)

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

Parameters

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

PreLoad(TRequestStatus &)

voidPreLoad(TRequestStatus &aStatus)

Parameters

TRequestStatus & aStatus

UnpairAllInView(TRequestStatus &)

IMPORT_C voidUnpairAllInView(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 & aStatusreference to client AO's TRequestStatus

UnpairDevice(const TBTDevAddr &, TRequestStatus &)

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

Parameters

const TBTDevAddr & aAddressThe device to unpair
TRequestStatus & aStatusreference 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]