CBTEngDevMan Class Reference

class CBTEngDevMan : public CActive

Class CBTEngDevMan

This is a helper class that simplifies the usage of Symbian's BT Device Registry interface.

btengdevman.dll
Since
S60 v3.0

Inherits from

Public Member Functions
~CBTEngDevMan ()
IMPORT_C TInt AddDevice (const CBTDevice &)
IMPORT_C TInt DeleteDevices (const TBTRegistrySearch &)
IMPORT_C TInt GetDevices (const TBTRegistrySearch &, CBTDeviceArray *)
IMPORT_C TInt ModifyDevice (const CBTDevice &)
IMPORT_C CBTEngDevMan * NewL ( MBTEngDevManObserver *)
IMPORT_C CBTEngDevMan * NewLC ( MBTEngDevManObserver *)
Private Member Functions
CBTEngDevMan ( MBTEngDevManObserver *)
void ConstructL ()
void DoCancel ()
void DoModifyDeviceL ()
TInt RunError ( TInt )
void RunL ()
Inherited Functions
CActive::CActive(TInt)
CActive::Cancel()
CActive::Deque()
CActive::Extension_(TUint,TAny *&,TAny *)
CActive::IsActive()const
CActive::IsAdded()const
CActive::Priority()const
CActive::SetActive()
CActive::SetPriority(TInt)
CActive::~CActive()
CBase::CBase()
CBase::Delete(CBase *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Public Member Enumerations
enum TModifyState {
ECheckNone , ECheckPairing , ECheckDevName , ECheckFriendlyName , ECheckNameless , ECheckFinal
}
enum TState { EStateIdle , EStateAddDevice , EStateGetDevices , EStateModifyDevice , EStateDeleteDevices }
Inherited Enumerations
CActive:TPriority
Private Attributes
CActiveSchedulerWait * iAsyncWaiter
TBool iCreatingView
CBTDevice * iModifiedDevice
TModifyState iModifyState
MBTEngDevManObserver * iObserver
RBTRegServ iRegServ
RBTRegistry iRegistry
CBTRegistryResponse * iResponse
CBTDeviceArray * iResultArray
TState iState
Inherited Attributes
CActive::iStatus

Constructor & Destructor Documentation

CBTEngDevMan(MBTEngDevManObserver *)

CBTEngDevMan ( MBTEngDevManObserver * aObserver ) [private]

C++ default constructor

Since
S60 v3.0

Parameters

MBTEngDevManObserver * aObserver Pointer to callback interface for informing the result of the operation.

~CBTEngDevMan()

~CBTEngDevMan ( ) [virtual]

Destructor

Member Functions Documentation

AddDevice(const CBTDevice &)

IMPORT_C TInt AddDevice ( const CBTDevice & aDevice )

Add a device into the Bluetooth device registry.

Since
S60 v3.0

Parameters

const CBTDevice & aDevice Device to be added.

ConstructL()

void ConstructL ( ) [private]

Symbian 2nd-phase constructor

Since
S60 v3.0

DeleteDevices(const TBTRegistrySearch &)

IMPORT_C TInt DeleteDevices ( const TBTRegistrySearch & aCriteria )

Delete one or more devices that match the search pattern from the registry.

Since
S60 v3.0

Parameters

const TBTRegistrySearch & aCriteria Search criteria for the devices to be deleted.

DoCancel()

void DoCancel ( ) [private, virtual]

Cancel current outstanding operation, if any.

Since
S60 v3.0

DoModifyDeviceL()

void DoModifyDeviceL ( ) [private]

Processes the result of a registry search.

Since
S60 v3.0

GetDevices(const TBTRegistrySearch &, CBTDeviceArray *)

IMPORT_C TInt GetDevices ( const TBTRegistrySearch & aCriteria,
CBTDeviceArray * aResultArray
)

Get an array of devices that match the search pattern from the registry. If no callback interface has been passed during construction, this function will complete synchronously.

Since
S60 v3.0

Parameters

const TBTRegistrySearch & aCriteria Search criteria for the devices to be returned.
CBTDeviceArray * aResultArray

ModifyDevice(const CBTDevice &)

IMPORT_C TInt ModifyDevice ( const CBTDevice & aDevice )

Modify a device in the Bluetooth device registry.

Since
S60 v3.2

Parameters

const CBTDevice & aDevice Device to be modifed.

NewL(MBTEngDevManObserver *)

IMPORT_C CBTEngDevMan * NewL ( MBTEngDevManObserver * aObserver ) [static]

Two-phase constructor

Since
S60 v3.2

Parameters

MBTEngDevManObserver * aObserver Pointer to callback interface for informing the result of the operation. If NULL, the GetDevices operation will operate syncrhonously; the other operations are then not available.

NewLC(MBTEngDevManObserver *)

IMPORT_C CBTEngDevMan * NewLC ( MBTEngDevManObserver * aObserver ) [static]

Two-phase constructor

Since
S60 v3.2

Parameters

MBTEngDevManObserver * aObserver Pointer to callback interface for informing the result of the operation. If NULL, the GetDevices operation will operate syncrhonously; the other operations are then not available.

RunError(TInt)

TInt RunError ( TInt aError ) [private, virtual]

If an error occurs, the callback is called with the error code.

Since
S60 v3.0

Parameters

TInt aError

RunL()

void RunL ( ) [private, virtual]

When the Active Object completes succesfully, the callback is called with the return value.

Since
S60 v3.0

Member Enumerations Documentation

Enum TModifyState

Substates enumeration for modifying device parameters

Enumerators

ECheckNone
ECheckPairing
ECheckDevName
ECheckFriendlyName
ECheckNameless
ECheckFinal

Enum TState

States enumeration

Enumerators

EStateIdle
EStateAddDevice
EStateGetDevices
EStateModifyDevice
EStateDeleteDevices

Member Data Documentation

CActiveSchedulerWait * iAsyncWaiter

CActiveSchedulerWait * iAsyncWaiter [private]

Nested active scheduler loop for synchronous GetDevice operation. own.

TBool iCreatingView

TBool iCreatingView [private]

Used to mark when a view is being created.

CBTDevice * iModifiedDevice

CBTDevice * iModifiedDevice [private]

Reference to modified device to be stored in registry. own.

TModifyState iModifyState

TModifyState iModifyState [private]

Keeps track of sequence of modifications.

MBTEngDevManObserver * iObserver

MBTEngDevManObserver * iObserver [private]

Observer class which implements the method that is called when the request is completed. Not own.

RBTRegServ iRegServ

RBTRegServ iRegServ [private]

Registry access session.

RBTRegistry iRegistry

RBTRegistry iRegistry [private]

Subsession on the BT Registry Server.

CBTRegistryResponse * iResponse

CBTRegistryResponse * iResponse [private]

Holds the response from the registry query. Own.

CBTDeviceArray * iResultArray

CBTDeviceArray * iResultArray [private]

Reference to the device array in which the results will be stored. Not own.

TState iState

TState iState [private]

Keeps track of the current state.