RBTRegistry Class Reference

#include <btmanclient.h>

Link against: btmanclient.lib

class RBTRegistry : public RBTManSubSession

Inherits from

Public Member Functions
RBTRegistry()
IMPORT_C voidAddDeviceL(const CBTDevice &, TRequestStatus &)
virtual 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 Attributes
RBTManSubSession::iClientServerMsg
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

Detailed Description

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.

Constructor & Destructor Documentation

RBTRegistry ( )

IMPORT_CRBTRegistry()

Default constructor for registry subsession

Member Function Documentation

AddDeviceL ( const CBTDevice &, TRequestStatus & )

IMPORT_C voidAddDeviceL(const CBTDevice &aDeviceDetails,
TRequestStatus &aStatus
)
Add device to the registry
leave
OOM
capability
LocalServices
ParameterDescription
aDeviceDetailsreference to CBTDevice of details of device to add
aStatusreference to client AO's TRequestStatus

Close ( )

IMPORT_C voidClose()[virtual]

Reimplemented from RBTManSubSession::Close()

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

Returns: Systemwide error

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.

See also: UnpairAllInView DeleteAllInView CloseView NotifyViewChange TBTRegistrySearch CBTRegistryResponse

capability
LocalServices
capability
ReadDeviceData (LocalServices only if link key is not needed)
ParameterDescription
aSearchA search struct with details of devices to be contained in the result set
aStatusTRequestStatus supplied by caller

Returns: systemwide error

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

See also: CreateView

capability
LocalServices
capability
WriteDeviceData (Only if different process than the one that created the device)
ParameterDescription
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

See also: 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)
ParameterDescription
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
aStatusreference to client AO's TRequestStatus

GetResults ( TPtr8 &, TRequestStatus & )

voidGetResults(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)
ParameterDescription
aAddressThe address of the device of which to change the name
aNewNameThe new name (note - this is an 8bit descriptor)
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
ParameterDescription
aDeviceThe new details - the device address MUST be present in aDeviceDetails is used as the key
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
ParameterDescription
aAddressThe address of the device of which to change the name
aNewNameThe new name (note - not an 8bit descriptor)
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.

See also: CreateView CloseView

ParameterDescription
aStatusreference to client AO's TRequestStatus

Open ( RBTRegServ & )

IMPORT_C TIntOpen(RBTRegServ &aSession)
Open a Bluetooth device subsession.
capability
LocalServices
ParameterDescription
aSessionThe BTManager session to which this subsession is to be attached.

Returns: An error code depicting the outcome of the "open".

PreLoad ( TRequestStatus & )

voidPreLoad(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
ParameterDescription
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
ParameterDescription
aAddressThe device to unpair
aStatusreference to client AO's TRequestStatus