CResponse Class Reference

List of all members.

Public Types

enum  TResponseState { ENotComplete, EComplete, EError }
enum  TResponseType { ELoadTasks = 0, ETaskComplete }

Public Member Functions

 ~CResponse ()
void ParseDataL (TDesC &aData)
TBool HasError () const
TBuf< KMaxError > Error () const
TInt TaskCount () const
TBuf< KMaxTaskLength > TaskDescription (const TInt &aIndex) const
TInt TaskId (const TInt &aIndex) const
TResponseType ResponseType () const
void InputDataL (const TDesC8 &aData)
TResponseState GetState () const

Static Public Member Functions

static CResponseNewL ()
static CResponseNewLC ()

Detailed Description

A wrapper class for handling responses from the server.

Definition at line 45 of file Response.h.

Member Enumeration Documentation

Enum for following the class' state.

Definition at line 52 of file Response.h.

Determines what type of response is in question.

Definition at line 77 of file Response.h.

Constructor & Destructor Documentation

CResponse::~CResponse (  ) 


Definition at line 50 of file Response.cpp.

Member Function Documentation

CResponse * CResponse::NewL (  )  [static]

Two-phased constructor.

Definition at line 62 of file Response.cpp.

CResponse * CResponse::NewLC (  )  [static]

Two-phased constructor.

Definition at line 74 of file Response.cpp.

void CResponse::ParseDataL ( TDesC &  aData  ) 

Constructs this response object from the data received from the server.

aData the data that was received from the server

Definition at line 101 of file Response.cpp.

TBool CResponse::HasError (  )  const

Returns whether errors occurred in the server side.

ETrue if response consist errors, EFalse if not.

Definition at line 170 of file Response.cpp.

TBuf< KMaxError > CResponse::Error (  )  const

Returns the error description.

the error description.

Definition at line 185 of file Response.cpp.

TInt CResponse::TaskCount (  )  const

Returns the number of tasks received from the server.

the number of tasks received from the server.

Definition at line 195 of file Response.cpp.

TBuf< KMaxTaskLength > CResponse::TaskDescription ( const TInt &  aIndex  )  const

Returns the task description.

aIndex the index of the description.
the task description.

Definition at line 205 of file Response.cpp.

TInt CResponse::TaskId ( const TInt &  aIndex  )  const

Returns the task id.

the task id.

Definition at line 220 of file Response.cpp.

CResponse::TResponseType CResponse::ResponseType (  )  const

Returns the type of this response.

the type of this response.

Definition at line 235 of file Response.cpp.

void CResponse::InputDataL ( const TDesC8 &  aData  ) 

Takes in a part of the server message.

aData part of the message

Definition at line 246 of file Response.cpp.

CResponse::TResponseState CResponse::GetState (  )  const

Returns whether the entire message has been given to CResponse. This function is used specifically by the engine to determine whether or not continue reading from the socket.

ETrue if message is complete, EFalse if not.

Definition at line 314 of file Response.cpp.

Generated by  doxygen 1.6.2