Classes | Public Types | Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | Properties | Friends

WTransaction Class Reference

#include <transaction.h>

Inheritance diagram for WTransaction:
WHelper

List of all members.

Classes

class  Log
class  LogWrap
class  WaitFor_Private
 ancestor of other WaitFor classes
class  WaitForAll
class  WaitForAny

Public Types

enum  Stage { Uninitialized = 0, Request = 1, Success = 6, Error = 10 }

Public Slots

virtual bool waitForFinished (int tmout=30000)

Signals

void finished ()

Public Member Functions

virtual Stage stage () const
virtual bool isInProgress () const
 returns true if the transaction is currently in progress
virtual bool isFinished () const
 returns true if the transaction is finished
virtual bool isUnstarted () const
 returns true if the transaction has not started yet
virtual bool hasError () const
virtual QString errorType () const
virtual QString errorString () const
virtual QString interface () const
virtual ~WTransaction ()

Protected Slots

virtual void endQuery ()

Protected Member Functions

 WTransaction (QString iface=QString())
 WTransaction (const WTransaction &)
virtual WTransactionoperator= (const WTransaction &)
virtual QByteArray executeQuery (QString, QByteArray)
virtual void startQuery (QString, QByteArray)
virtual QByteArray encodeError () const

Protected Attributes

WTransaction_Privated

Properties

Stage stage
bool isInProgress
bool isFinished
bool isUnstarted
bool hasError
QString errorType
QString errorString
QString interfaceName

Friends

class WTransaction::Log
class WTransaction::LogWrap
class WTransaction_Private

Detailed Description

base class of all transactions


Member Enumeration Documentation

stage the transaction is in

Enumerator:
Uninitialized 

transaction has not started yet

Request 

transaction is running

Success 

transaction ended successfully

Error 

transaction ended with an error


Constructor & Destructor Documentation

WTransaction::~WTransaction (  )  [virtual]

deconstructor

WTransaction::WTransaction ( QString  iface = QString()  )  [protected]

internal: construct the transaction

WTransaction::WTransaction ( const WTransaction t  )  [protected]

internal: copy the transaction


Member Function Documentation

QByteArray WTransaction::encodeError (  )  const [protected, virtual]

internal: encode an error, used by server

void WTransaction::endQuery (  )  [protected, virtual, slot]

internal: collect query data

virtual QString WTransaction::errorString (  )  const [virtual]

returns the (translated) human readable error string

virtual QString WTransaction::errorType (  )  const [virtual]

returns the error type (usually the component causing it)

QByteArray WTransaction::executeQuery ( QString  hreq,
QByteArray  data 
) [protected, virtual]

internal: execute a query synchronously on the web, used by subclasses

void WTransaction::finished (  )  [signal]

this signal is raised when the transaction is finished successfully or with an error, data or an error information is available

virtual bool WTransaction::hasError (  )  const [virtual]

returns whether the transaction had an error while executing

QString WTransaction::interface (  )  const [virtual]

returns the interface that is used for the transaction

virtual bool WTransaction::isFinished (  )  const [inline, virtual]

returns true if the transaction is finished

virtual bool WTransaction::isInProgress (  )  const [inline, virtual]

returns true if the transaction is currently in progress

virtual bool WTransaction::isUnstarted (  )  const [inline, virtual]

returns true if the transaction has not started yet

WTransaction & WTransaction::operator= ( const WTransaction t  )  [protected, virtual]

internal: copy the transaction

virtual Stage WTransaction::stage (  )  const [virtual]

returns the stage the transaction is in

void WTransaction::startQuery ( QString  hreq,
QByteArray  data 
) [protected, virtual]

internal: execute a query on the web asynchronously

bool WTransaction::waitForFinished ( int  tmout = 30000  )  [virtual, slot]

waits for this transaction to finish, returns true if the transaction was successful, returns immediately if the transaction is not running

Parameters:
tmout the maximum amount of milli seconds to wait, if 0 it will not time out

Friends And Related Function Documentation

friend class WTransaction::Log [friend]
friend class WTransaction::LogWrap [friend]
friend class WTransaction_Private [friend]

Member Data Documentation


Property Documentation

QString WTransaction::errorString [read]
QString WTransaction::errorType [read]
bool WTransaction::hasError [read]
QString WTransaction::interfaceName [read]
bool WTransaction::isFinished [read]
bool WTransaction::isInProgress [read]
bool WTransaction::isUnstarted [read]
WTransaction::Stage WTransaction::stage [read]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Friends Defines