Inherits CBluetoothConnectionBase, MBluetoothServiceAdvertiserObserver, and MSocketWriterReaderObserver.
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 CBluetoothResponder * | NewL (MBluetoothObserver &aRespObs, RSocketServ &aSocketServer) |
CBluetoothResponder Advertises a BT service and listens for incoming connection
Definition at line 72 of file BluetoothResponder.h.
TResponderState State Machine
Definition at line 81 of file BluetoothResponder.h.
CBluetoothResponder::~CBluetoothResponder | ( | ) |
Destructor
Definition at line 86 of file BluetoothResponder.cpp.
CBluetoothResponder * CBluetoothResponder::NewL | ( | MBluetoothObserver & | aRespObs, | |
RSocketServ & | aSocketServer | |||
) | [static] |
Two stage constructor
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
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
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
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
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.