CListener Class Reference

List of all members.

Public Types

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

Public Member Functions

 ~CListener ()
void StartListenerL (TInt &aChannel)
void StopListener ()
void SendData (const TDesC8 &aData)
TBool IsConnected ()
 ~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)
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)
void RunL ()
void DoCancel ()
TInt RunError (TInt aError)

Detailed Description

Definition at line 70 of file Listener.h.


Constructor & Destructor Documentation

CListener::~CListener (  ) 

~CConnector()

discussion Destroy the object and release all memory objects

Definition at line 82 of file Listener.cpp.

CListener::~CListener (  ) 

~CConnector()

discussion Destroy the object and release all memory objects


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 35 of file Listener.cpp.

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

NewLC()

Definition at line 44 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.

Start listener. Listener will open a listening socket on a channel (port) gotten from GetOpt() call.

Definition at line 97 of file Listener.cpp.

void CListener::StopListener (  ) 

StopListener()

discussion Stops the listener, closes the listening socket.

Definition at line 206 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 239 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 329 of file Listener.cpp.

void CListener::RunL (  )  [protected]

RunL()

discussion Handle the active objects request completion.

Definition at line 255 of file Listener.cpp.

void CListener::DoCancel (  )  [protected]

DoCancel()

discussion Cancels the outstanding request on active object.

Definition at line 316 of file Listener.cpp.

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

NewL()

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

static CListener* CListener::NewLC ( MListenerObserver aObserver,
RSocketServ &  aSocketServ 
) [static]
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.

void CListener::StopListener (  ) 

StopListener()

discussion Stops the listener, closes the listening socket.

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.

TBool CListener::IsConnected (  ) 

IsConnected()

discussion check if listener is connected to.

return true if listener has a connection from master.

void CListener::RunL (  )  [protected]

RunL()

discussion Handle the active objects request completion.

void CListener::DoCancel (  )  [protected]

DoCancel()

discussion Cancels the outstanding request on active object.


Generated by  doxygen 1.6.2