CBTEngPlugin Class Reference

class CBTEngPlugin : public CBase

BTEng plug-in base class.

This is the base class from which a BT Engine ECom plug-in inherit. BT Engine plug-ins implement Bluetooth profiles. This interface is used to issue commands relating to service-level connection management (i.e. relating to profile connections). Each plugin implementation identifies itself through the SDP Service Class UUIDs defined by the Bluetooth SIG for profiles it supports.

bteng.lib
Since
S60 v3.2

Inherits from

Constructor & Destructor Documentation

~CBTEngPlugin()

~CBTEngPlugin ( ) [inline, virtual]

Destructor; destroys the plug-in through the ECom framework.

Member Functions Documentation

CancelConnect(const TBTDevAddr &)

void CancelConnect ( const TBTDevAddr & aAddr ) [pure virtual]

Instructs the plug-in to cancel the creation a service-level connection with the specified Bluetooth address.

In addition, as this is part of an asynchronous operation, the plug-in completes the outstanding asyncronous request status with KErrCancel.

Since
S60 v3.2

Parameters

const TBTDevAddr & aAddr The BT device address identifying a remote device.

Connect(const TBTDevAddr &)

TInt Connect ( const TBTDevAddr & aAddr ) [pure virtual]

Instructs the plug-in to create a service-level connection with the specified Bluetooth address.

This is an asynchronous operation; on completion, the plug-in informs the observer by calling MBTEngPluginObserver::ConnectComplete with the appropriate error code.

Since
S60 v3.2

Parameters

const TBTDevAddr & aAddr The BT device address identifying a remote device.

Disconnect(const TBTDevAddr &, TBTDisconnectType)

TInt Disconnect ( const TBTDevAddr & aAddr,
TBTDisconnectType aDiscType
) [pure virtual]

Instructs the plug-in to create a service-level connection with the specified Bluetooth address.

This is an asynchronous operation; on completion, the plug-in informs the observer by calling MBTEngPluginObserver::DisconnectComplete with the appropriate error code.

Since
S60 v3.2

Parameters

const TBTDevAddr & aAddr The BT device address identifying a remote device. In case the address is the NULL address, the plug-in is expected to disconnect all its connections.
TBTDisconnectType aDiscType The type of disconnection; EGraceful for graceful (normal) disconnection, EImmediate for immediate (forced) disconnection.

GetConnections(RBTDevAddrArray &, TBTProfile)

void GetConnections ( RBTDevAddrArray & aAddrArray,
TBTProfile aConnectedProfile
) [pure virtual]

Gets the addresses of the connected devices for the specified profile.

Since
S60 v3.2

Parameters

RBTDevAddrArray & aAddrArray On return, holds the Bluetooth device addresses of the connected Bluetooth devices for the requested profile.
TBTProfile aConnectedProfile The profile for which the existing connections are requested.

GetSupportedProfiles(RProfileArray &)

void GetSupportedProfiles ( RProfileArray & aProfiles ) [pure virtual]

Gets the list of profiles implemented by this plug-in. Profiles are identified by the SDP Service Class UUID (short form), as assigned by the Bluetooth SIG.

Since
S60 v3.2

Parameters

RProfileArray & aProfiles Array of integers identifying the BT profiles implemented by this plug-in.

IsConnected(const TBTDevAddr &)

TBTEngConnectionStatus IsConnected ( const TBTDevAddr & aAddr ) [pure virtual]

Indicates if this plug-in has a service-level connection with the specified Bluetooth address.

Since
S60 v3.2

Parameters

const TBTDevAddr & aAddr The BT device address identifying a remote device.

IsProfileSupported(const TBTProfile)

TBool IsProfileSupported ( const TBTProfile aProfile ) const [pure virtual]

Indicates if this plug-in implements the specified profiles. Profiles are identified by the SDP Service Class UUID (short form), as assigned by the Bluetooth SIG.

Since
S60 v3.2

Parameters

const TBTProfile aProfile Integer identifying the BT profile.

NewL(const TUid)

CBTEngPlugin * NewL ( const TUid aImplementationUid ) [static, inline]

Constructor; loads the plug-in through the ECom framework.

Since
S60 v3.2

Parameters

const TUid aImplementationUid The UID of the interface implementation to be loaded.

SetObserver(MBTEngPluginObserver *)

void SetObserver ( MBTEngPluginObserver * aObserver ) [pure virtual]

Sets the observer for receiving connection events through the MBTEngPluginObserver interface. This method MUST be called before any command is given to the plug-in

Since
S60 v3.2

Parameters

MBTEngPluginObserver * aObserver The observer of connection events.

Member Type Definitions Documentation

Typedef RProfileArray

typedef RArray < TBTProfile > RProfileArray

Array of BT profiles.

Member Data Documentation

TUid iInstanceUid

TUid iInstanceUid [private]

UID set by ECOM when the instance is created. Used when the instance is destroyed.