PACK Qt Binding
$VERSION$
|
#include <transaction.h>
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 More... | |
virtual bool | isFinished () const |
returns true if the transaction is finished More... | |
virtual bool | isUnstarted () const |
returns true if the transaction has not started yet More... | |
virtual bool | hasError () const |
virtual QString | errorType () const |
virtual QString | errorString () const |
virtual QString | interface () const |
virtual | ~WTransaction () |
Log (WTransaction *parent, const QString &request, const QString &interface=QString()) | |
~Log () | |
deletes the logger More... | |
void | setRequ (const QString &, const QString &) |
logs/stores a request message More... | |
void | setResp (const QString &, const QString &) |
logs/stores a response message More... | |
void | setError (const QString &) |
logs an error, if the interface is set up to log only on errors it also logs the stored request and response More... | |
void | setInfo (const QString &) |
logs some informational message More... | |
LogWrap (WTransaction *parent, const QString &request, const QString &interface=QString()) | |
void | setRequ (const QString &, const QString &) |
logs/stores a request message More... | |
void | setResp (const QString &, const QString &) |
logs/stores a response message More... | |
void | setError (const QString &) |
logs an error, if the interface is set up to log only on errors it also logs the stored request and response More... | |
void | setInfo (const QString &) |
logs some informational message More... | |
Static Public Member Functions | |
static void | setLogPrefix (QString) |
sets the logging prefix for transactions, per default it is "T" More... | |
Protected Slots | |
virtual void | endQuery () |
Protected Member Functions | |
WTransaction (QString iface=QString()) | |
WTransaction (const WTransaction &) | |
virtual WTransaction & | operator= (const WTransaction &) |
virtual QByteArray | executeQuery (QString, QByteArray) |
virtual void | startQuery (QString, QByteArray) |
virtual QByteArray | encodeError () const |
virtual bool | canLogRequest () const |
internal: returns true if this transaction can log requests (default: true) More... | |
virtual bool | canLogResponse () const |
internal: returns true if this transaction can log responses (default: true) More... | |
Protected Member Functions inherited from WHelper | |
bool | str2bool (QString s) |
Protected Attributes | |
WTransaction_Private * | d |
Friends | |
class | WTransaction::Log |
class | WTransaction::LogWrap |
class | WTransaction_Private |
Additional Inherited Members | |
Static Protected Member Functions inherited from WHelper | |
static QList< QDomElement > | elementsByTagName (const QDomElement &, QString) |
base class of all transactions
enum WTransaction::Stage |
|
virtual |
deconstructor
|
protected |
internal: construct the transaction
|
protected |
internal: copy the transaction
WTransaction::~Log | ( | ) |
deletes the logger
|
protectedvirtual |
internal: returns true if this transaction can log requests (default: true)
|
protectedvirtual |
internal: returns true if this transaction can log responses (default: true)
|
protectedvirtual |
internal: encode an error, used by server
|
protectedvirtualslot |
internal: collect query data
|
virtual |
returns the (translated) human readable error string
|
virtual |
returns the error type (usually the component causing it)
|
protectedvirtual |
internal: execute a query synchronously on the web, used by subclasses
|
signal |
this signal is raised when the transaction is finished successfully or with an error, data or an error information is available
|
virtual |
returns whether the transaction had an error while executing
|
virtual |
returns the interface that is used for the transaction
|
inlinevirtual |
returns true if the transaction is finished
|
inlinevirtual |
returns true if the transaction is currently in progress
|
inlinevirtual |
returns true if the transaction has not started yet
WTransaction::Log | ( | WTransaction * | parent, |
const QString & | request, | ||
const QString & | interface = QString() |
||
) |
instantiates the logger
A logger object is used by transactions to output information about the message exchange that is going on. Depending on the log level of the interface the logger will log very tersely or verbosely. It can log messages immediately or store them to be logged in case of errors.
parent | the transaction this is about |
request | the name of the request this transaction issues |
interface | the name of the interface that is used |
WTransaction::LogWrap | ( | WTransaction * | parent, |
const QString & | request, | ||
const QString & | interface = QString() |
||
) |
instantiates a log wrapper using the logger of the parent or creates a new one in the parent
|
protectedvirtual |
internal: copy the transaction
void WTransaction::setError | ( | const QString & | ) |
logs an error, if the interface is set up to log only on errors it also logs the stored request and response
void WTransaction::setError | ( | const QString & | ) |
logs an error, if the interface is set up to log only on errors it also logs the stored request and response
void WTransaction::setInfo | ( | const QString & | ) |
logs some informational message
void WTransaction::setInfo | ( | const QString & | ) |
logs some informational message
|
static |
sets the logging prefix for transactions, per default it is "T"
void WTransaction::setRequ | ( | const QString & | , |
const QString & | |||
) |
logs/stores a request message
void WTransaction::setRequ | ( | const QString & | , |
const QString & | |||
) |
logs/stores a request message
void WTransaction::setResp | ( | const QString & | , |
const QString & | |||
) |
logs/stores a response message
void WTransaction::setResp | ( | const QString & | , |
const QString & | |||
) |
logs/stores a response message
|
virtual |
returns the stage the transaction is in
|
protectedvirtual |
internal: execute a query on the web asynchronously
|
virtualslot |
waits for this transaction to finish, returns true if the transaction was successful, returns immediately if the transaction is not running
tmout | the maximum amount of milli seconds to wait, if 0 it will not time out |
|
friend |
|
friend |
|
friend |
|
protected |