CBluetoothResponder Class Reference

Inherits CBluetoothConnectionBase, MBluetoothServiceAdvertiserObserver, and MSocketWriterReaderObserver.

List of all members.

Public Types

enum  TResponderState {
  EIdle, EFindingAvailablePort, EBinding, EAdvertising,
  ERegisteringService, EListening, EWaitingForData, ESendingData
}

Public Member Functions

 ~CBluetoothResponder ()
void ReportAdvertiserErr (TInt aError)
void AdvertiserComplete ()
void WriteComplete (TInt aError)
void ReportData (const TDesC8 &aData, TInt aError)
void SendData (const TDesC8 &aData)
void StartL ()

Static Public Member Functions

static CBluetoothResponderNewL (MBluetoothObserver &aRespObs, RSocketServ &aSocketServer)

Detailed Description

CBluetoothResponder Advertises a BT service and listens for incoming connection

Definition at line 72 of file BluetoothResponder.h.


Member Enumeration Documentation

TResponderState State Machine

Definition at line 81 of file BluetoothResponder.h.


Constructor & Destructor Documentation

CBluetoothResponder::~CBluetoothResponder (  ) 

Destructor

Definition at line 86 of file BluetoothResponder.cpp.


Member Function Documentation

CBluetoothResponder * CBluetoothResponder::NewL ( MBluetoothObserver aRespObs,
RSocketServ &  aSocketServer 
) [static]

Two stage constructor

Parameters:
aRespObs Interface to report to the caller the status of the connection and incoming/sending data completion
aSocketServer A handle to an existing session on the socket server (ESock)

Definition at line 44 of file BluetoothResponder.cpp.

void CBluetoothResponder::ReportAdvertiserErr ( TInt  aError  )  [virtual]

Callback to notify any error during BT service advertising

Parameters:
aError An error

Implements MBluetoothServiceAdvertiserObserver.

Definition at line 301 of file BluetoothResponder.cpp.

void CBluetoothResponder::AdvertiserComplete (  )  [virtual]

Callback to notify the completion of the service advertising

Implements MBluetoothServiceAdvertiserObserver.

Definition at line 312 of file BluetoothResponder.cpp.

void CBluetoothResponder::WriteComplete ( TInt  aError  )  [virtual]

Callback to notify the caller of the sending data completion

Parameters:
aError KErrNone if succesful, otherwise one of the system errors

Implements MSocketWriterReaderObserver.

Definition at line 323 of file BluetoothResponder.cpp.

void CBluetoothResponder::ReportData ( const TDesC8 &  aData,
TInt  aError 
) [virtual]

Callback to notify the caller of incoming data from the remote BT device

Parameters:
aData A descriptor for the data being received from the remote BT device
aError KErrNone if succesful, otherwise one of the system errors

Implements MSocketWriterReaderObserver.

Definition at line 345 of file BluetoothResponder.cpp.

void CBluetoothResponder::SendData ( const TDesC8 &  aData  )  [virtual]

Send the data to the remote BT device. On completion calls MBluetoothObserver::SendDataComplete

Parameters:
aData A descriptor for the data being sent to the remote BT device

Implements CBluetoothConnectionBase.

Definition at line 284 of file BluetoothResponder.cpp.

void CBluetoothResponder::StartL (  )  [virtual]

Kicks off the state machine

Implements CBluetoothConnectionBase.

Definition at line 123 of file BluetoothResponder.cpp.


Generated by  doxygen 1.6.2