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 CResponse * | NewL () |
static CResponse * | NewLC () |
A wrapper class for handling responses from the server.
Definition at line 25 of file Response.h.
Enum for following the class' state.
Definition at line 32 of file Response.h.
Determines what type of response is in question.
Definition at line 57 of file Response.h.
CResponse::~CResponse | ( | ) |
Destructor
Definition at line 30 of file Response.cpp.
CResponse * CResponse::NewL | ( | ) | [static] |
Two-phased constructor.
Definition at line 42 of file Response.cpp.
CResponse * CResponse::NewLC | ( | ) | [static] |
Two-phased constructor.
Definition at line 54 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 81 of file Response.cpp.
TBool CResponse::HasError | ( | ) | const |
Returns whether errors occurred in the server side.
Definition at line 150 of file Response.cpp.
TBuf< KMaxError > CResponse::Error | ( | ) | const |
Returns the error description.
Definition at line 165 of file Response.cpp.
TInt CResponse::TaskCount | ( | ) | const |
Returns the number of tasks received from the server.
Definition at line 175 of file Response.cpp.
TBuf< KMaxTaskLength > CResponse::TaskDescription | ( | const TInt & | aIndex | ) | const |
Returns the task description.
aIndex | the index of the description. |
Definition at line 185 of file Response.cpp.
TInt CResponse::TaskId | ( | const TInt & | aIndex | ) | const |
CResponse::TResponseType CResponse::ResponseType | ( | ) | const |
Returns the type of this response.
Definition at line 215 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 226 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.
Definition at line 294 of file Response.cpp.