CBluetoothPMPExampleEngine Class Reference

Inherits MListenerObserver, MConnectorObserver, MDeviceDiscoObserver, and MServiceDiscoObserver.

List of all members.

Public Member Functions

 ~CBluetoothPMPExampleEngine ()
void DiscoverDevicesL ()
void DiscoverServicesL ()
void StartSlaveL ()
void StopSlaveL ()
void SendMessageL ()
void ConnectDevicesL ()
void DisconnectDevices ()
void ShowConnectedDevicesL ()
void HandleListenerDataReceivedL (const TDesC &aData)
void HandleConnectorDataReceivedL (THostName aName, const TDesC &aData)
void HandleConnectorErrorL (THostName aName, TInt aError)
void HandleListenerConnectedL ()
void HandleListenerDisconnectedL ()
void HandleDeviceDiscoveryComplete (TInt aError)
void DeviceDiscovered (const TDeviceData &aDevice)
void HandleServiceDiscoveryCompleteL ()
void ReportServiceDiscoveryErrorL (TInt aError)
TBool HasConnections ()
void TurnBtOnL ()
TBool IsDiscoveryActive ()
void StopDiscovery ()

Static Public Member Functions

static CBluetoothPMPExampleEngineNewL (CBluetoothPMPExampleAppUi &)
static CBluetoothPMPExampleEngineNewLC (CBluetoothPMPExampleAppUi &)

Public Attributes

CListeneriListener
CDeviceDiscovereriDeviceDiscoverer
CServiceAdvertiseriServiceAdvertiser
CServiceDiscovereriServiceDiscoverer
TBool iIsSlave
TBool iIsMaster

Detailed Description

CBluetoothPMPExampleEngine application engine class.

Definition at line 97 of file BluetoothPMPExampleEngine.h.


Constructor & Destructor Documentation

CBluetoothPMPExampleEngine::~CBluetoothPMPExampleEngine (  ) 

~CBluetoothPMPExampleContainer()

discussion Destroy the object and release all memory objects

Definition at line 103 of file BluetoothPMPExampleEngine.cpp.


Member Function Documentation

CBluetoothPMPExampleEngine * CBluetoothPMPExampleEngine::NewL ( CBluetoothPMPExampleAppUi aAppUi  )  [static]

NewL()

discussion Create new CBluetoothPMPExampleEngine object return a pointer to the created instance of CBluetoothPMPExampleEngine

Definition at line 17 of file BluetoothPMPExampleEngine.cpp.

CBluetoothPMPExampleEngine * CBluetoothPMPExampleEngine::NewLC ( CBluetoothPMPExampleAppUi aAppUi  )  [static]

NewLC()

Definition at line 27 of file BluetoothPMPExampleEngine.cpp.

void CBluetoothPMPExampleEngine::DiscoverDevicesL (  ) 

DiscoverDevicesL()

discussion Discovers bluetooth devices within range. the discovered devices will be displayed to user.

Definition at line 161 of file BluetoothPMPExampleEngine.cpp.

void CBluetoothPMPExampleEngine::DiscoverServicesL (  ) 

StartServiceDiscovery()

discussion Starts service discovery for services on remote devices.

Definition at line 179 of file BluetoothPMPExampleEngine.cpp.

void CBluetoothPMPExampleEngine::StartSlaveL (  ) 

StartSlaveL()

discussion Starts the application in slave more. the application will open listening socket to listen to incoming connection request, and advertise its services.

Definition at line 193 of file BluetoothPMPExampleEngine.cpp.

void CBluetoothPMPExampleEngine::SendMessageL (  ) 

SendMessageL()

discussion Send a message to all connected slaves. the user will be prompted to enter the message text he/she wishes to send.

Definition at line 330 of file BluetoothPMPExampleEngine.cpp.

void CBluetoothPMPExampleEngine::ConnectDevicesL (  ) 

ConnectDevicesL()

discussion Connects to the remote devices that were discovered to offer the service we require.

Definition at line 255 of file BluetoothPMPExampleEngine.cpp.

void CBluetoothPMPExampleEngine::DisconnectDevices (  ) 

DisconnectDevices()

discussion Disconnects from connected remote devices.

Definition at line 235 of file BluetoothPMPExampleEngine.cpp.

void CBluetoothPMPExampleEngine::ShowConnectedDevicesL (  ) 

ShowConnectedDevicesL()

discussion Displays the connected remote devices.

Definition at line 299 of file BluetoothPMPExampleEngine.cpp.

void CBluetoothPMPExampleEngine::HandleListenerDataReceivedL ( const TDesC &  aData  )  [virtual]

HandleListenerDataReceivedL()

discussion Handles the data slave received from a master.

param aData the data received.

Implements MListenerObserver.

Definition at line 375 of file BluetoothPMPExampleEngine.cpp.

void CBluetoothPMPExampleEngine::HandleConnectorDataReceivedL ( THostName  aName,
const TDesC &  aData 
) [virtual]

HandleConnectedDataReceivedL()

discussion Handles the data a master received from a slave.

param aName the name of the slave that sent the data. param aData the data received.

Implements MConnectorObserver.

Definition at line 420 of file BluetoothPMPExampleEngine.cpp.

void CBluetoothPMPExampleEngine::HandleListenerConnectedL (  )  [virtual]

HandleListenerConnectedL()

discussion Handles the event of slave connection (slave was connected to by master). user will be notified of connection.

Implements MListenerObserver.

Definition at line 389 of file BluetoothPMPExampleEngine.cpp.

void CBluetoothPMPExampleEngine::HandleListenerDisconnectedL (  )  [virtual]

HandleListenerDisconnectedL()

discussion Handles the event of slave disconnection, the master connection to slave was terminated. user will be notitied of disconnection.

Implements MListenerObserver.

Definition at line 400 of file BluetoothPMPExampleEngine.cpp.

void CBluetoothPMPExampleEngine::HandleDeviceDiscoveryComplete ( TInt  aError  )  [virtual]

HandleDeviceDiscoveryComplete()

discussion Handles the event of device discovery completion. the discovered devices will be displayed to user.

Implements MDeviceDiscoObserver.

Definition at line 507 of file BluetoothPMPExampleEngine.cpp.

void CBluetoothPMPExampleEngine::DeviceDiscovered ( const TDeviceData aDevice  )  [virtual]

DeviceDiscovered()

discussion nofify observer that a new device was found.

Implements MDeviceDiscoObserver.

Definition at line 613 of file BluetoothPMPExampleEngine.cpp.

void CBluetoothPMPExampleEngine::HandleServiceDiscoveryCompleteL (  )  [virtual]

HandleServiceDiscoveryCompleteL()

discussion Handles the event of service discovery completion. the discovered services will be displayed to user.

Implements MServiceDiscoObserver.

Definition at line 550 of file BluetoothPMPExampleEngine.cpp.

void CBluetoothPMPExampleEngine::ReportServiceDiscoveryErrorL ( TInt  aError  )  [virtual]

ReportServiceDiscoveryErrorL()

discussion An error has occured during service discovery

Implements MServiceDiscoObserver.

Definition at line 627 of file BluetoothPMPExampleEngine.cpp.

TBool CBluetoothPMPExampleEngine::HasConnections (  ) 

HasConnection()

discussion Returns true if master has any slave connections.

Definition at line 592 of file BluetoothPMPExampleEngine.cpp.

TBool CBluetoothPMPExampleEngine::IsDiscoveryActive (  ) 

IsDiscoveryActive()

discussion It returns ETrue if there is an ongoing device discovery

Definition at line 709 of file BluetoothPMPExampleEngine.cpp.

void CBluetoothPMPExampleEngine::StopDiscovery (  ) 

StopDiscovery()

discussion It stops device discovery if there is any ongoing

Definition at line 717 of file BluetoothPMPExampleEngine.cpp.


Generated by  doxygen 1.6.2