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 45 of file Response.h.
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.
CResponse::~CResponse | ( | ) |
Destructor
Definition at line 50 of file Response.cpp.
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.
Definition at line 170 of file Response.cpp.
TBuf< KMaxError > CResponse::Error | ( | ) | const |
Returns the error description.
Definition at line 185 of file Response.cpp.
TInt CResponse::TaskCount | ( | ) | const |
Returns 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. |
Definition at line 205 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 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.
Definition at line 314 of file Response.cpp.