Logo Search packages:      
Sourcecode: webissues version File versions  Download package

WebIssues::CommandManager Class Reference

#include <commandmanager.h>

List of all members.


Detailed Description

Class for communicating with the WebIssues server.

This class contains a priority queue of AbstractBatch objects which provide commands to execute. Only a single command is executed at a time. If there are two or more batches, commands from the batch with the highest priority are executed first. Processing commands is asynchronous.

The instance of this class is available using the commandManager global variable. It is created and owned by the ConnectionManager.

Definition at line 41 of file commandmanager.h.


Public Types

enum  Error {
  NoError, ConnectionError, HttpError, InvalidServer,
  InvalidVersion, InvalidResponse, WebIssuesError, Aborted
}

Public Member Functions

void abort (AbstractBatch *batch)
 CommandManager ()
Error error () const
int errorCode () const
QString errorMessage (const QString &whatFailed)
void execute (AbstractBatch *batch)
const QUrl & serverUrl () const
const QString & serverVersion () const
void setServerUrl (const QUrl &url)
 ~CommandManager ()

Private Slots

void dataReadProgress (int done, int total)
void dataSendProgress (int done, int total)
void readyRead (const QHttpResponseHeader &response)
void requestFinished (int id, bool error)
void responseHeaderReceived (const QHttpResponseHeader &response)

Private Member Functions

void checkPendingCommand ()
bool handleCommandReply (const Reply &reply)
bool handleCommandResponse ()
QString makeSignature (const ReplyLine &line)
bool parseReply (const QString &string, Reply &reply)
QString quoteString (const QString &string)
void sendCommandRequest (Command *command)
void sendSetHostRequest ()
void setError (Error error, int code, const QString &string)
QString unquoteString (const QString &string)
bool validateReply (const Reply &reply)

Private Attributes

QList< AbstractBatch * > m_batches
QString m_contentType
QString m_cookie
AbstractBatchm_currentBatch
Commandm_currentCommand
int m_currentRequest
Error m_error
int m_errorCode
QString m_errorString
QHttp * m_http
QString m_protocolVersion
QString m_responseReason
int m_responseStatus
QString m_serverVersion
QUrl m_url

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index