CListener Class Reference

List of all members.

Public Types

enum  TState { ENone = 1, EConnecting, EWaiting, ESending }

Public Member Functions

 ~CListener ()
void StartListenerL (TInt &aChannel)
void StopListener ()
void SendData (const TDesC8 &aData)
TBool IsConnected ()

Static Public Member Functions

static CListenerNewL (MListenerObserver &aObserver, RSocketServ &aSocketServ)
static CListenerNewLC (MListenerObserver &aObserver, RSocketServ &aSocketServ)

Public Attributes

RSocket iListenSock
RSocket iSock
TSockXfrLength iLen
TBuf8< KReceivedBufferSize > iBuffer
MListenerObserveriObserver
RSocketServ & iSocketServ
TBool iIsConnected
TState iState

Protected Member Functions

void RunL ()
void DoCancel ()
TInt RunError (TInt aError)

Detailed Description

Definition at line 45 of file Listener.h.


Constructor & Destructor Documentation

CListener::~CListener (  ) 

~CConnector()

discussion Destroy the object and release all memory objects

Definition at line 57 of file Listener.cpp.


Member Function Documentation

CListener * CListener::NewL ( MListenerObserver aObserver,
RSocketServ &  aSocketServ 
) [static]

NewL()

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

Definition at line 10 of file Listener.cpp.

CListener * CListener::NewLC ( MListenerObserver aObserver,
RSocketServ &  aSocketServ 
) [static]

NewLC()

Definition at line 19 of file Listener.cpp.

void CListener::StartListenerL ( TInt &  aChannel  ) 

StartListenerL()

discussion Starts the listener. listener will open a listening socket and listen on incoming connections.

param aChannel the communication channel (port) the listener listens to.

Definition at line 72 of file Listener.cpp.

void CListener::StopListener (  ) 

StopListener()

discussion Stops the listener, closes the listening socket.

Definition at line 181 of file Listener.cpp.

void CListener::SendData ( const TDesC8 &  aData  ) 

SendData()

discussion Sends data to master. user will be prompted to enter the message to send.

param aData the message to be send.

Definition at line 214 of file Listener.cpp.

TBool CListener::IsConnected (  ) 

IsConnected()

discussion check if listener is connected to.

return true if listener has a connection from master.

Definition at line 304 of file Listener.cpp.

void CListener::RunL (  )  [protected]

RunL()

discussion Handle the active objects request completion.

Definition at line 230 of file Listener.cpp.

void CListener::DoCancel (  )  [protected]

DoCancel()

discussion Cancels the outstanding request on active object.

Definition at line 291 of file Listener.cpp.


Generated by  doxygen 1.6.2