PACK Qt Binding  $VERSION$
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
Public Types | Public Slots | Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
WInterface Class Referenceabstract

base class of all interfaces More...

#include <interface.h>

Inheritance diagram for WInterface:

Public Types

enum  LogLevel {
  LogNone =0, LogMinimal =1, LogInfo =2, LogOnError =0x12,
  LogDetailed =0xff
}
 

Public Slots

void setLogLevel (WInterface::LogLevel l)
 
void setWebTimeout (int t)
 
void resetProxy ()
 
void setProxy (QString proxyhost, unsigned short proxyport, QString proxyuser=QString(), QString proxypassword=QString())
 
void setUrl (QUrl u)
 
virtual void sslErrors (QNetworkReply *, const QList< QSslError > &)
 

Public Member Functions

virtual ~WInterface ()
 
virtual QMap< QString, QString > headers (QString) const
 
QUrl url () const
 
bool useProxy () const
 
bool useProxyAuth () const
 
QString proxyHost () const
 
unsigned short proxyPort () const
 
QString proxyUser () const
 
QString proxyPassword () const
 
int webTimeout () const
 
QString name () const
 
LogLevel logLevel () const
 
QString libraryVersionInfo (WOb::VersionInfo) const
 returns version info about the library More...
 
virtual QString wocVersionInfo (WOb::VersionInfo) const =0
 returns version info about the WOC that was used to generate the interface More...
 
virtual QString versionInfo (WOb::VersionInfo) const =0
 returns version info about the interface itself More...
 
virtual QString commVersion () const
 convenience function: return the protocol version of this interface More...
 
virtual QString needCommVersion () const
 convenience function: return the oldest protocol version this interface is compatible with More...
 
virtual QString version () const
 convenience function: return human readable version More...
 

Static Public Member Functions

static WInterfaceinstance (QString)
 
static QString staticLibraryVersionInfo (WOb::VersionInfo)
 returns version info about the library More...
 

Protected Member Functions

 WInterface (QString name)
 used by child classes for instantiation More...
 
QNetworkReply * post (const QNetworkRequest &request, const QByteArray &data)
 called by WTransaction to post a request More...
 
virtual WServerReply execute (const WServerRequest &)
 called by WServer to execute a transaction More...
 

Friends

class WTransaction
 
class WTransaction_Private
 
class WServer
 

Detailed Description

base class of all interfaces

Member Enumeration Documentation

log settings

Enumerator
LogNone 

no logging

LogMinimal 

minimal logging

LogInfo 

informational logging (more than minimal, not much yet)

LogOnError 

like LogInfo, but logs additional details on error

LogDetailed 

always log details

Constructor & Destructor Documentation

WInterface::WInterface ( QString  name)
protected

used by child classes for instantiation

WInterface::~WInterface ( )
virtual

Member Function Documentation

virtual QString WInterface::commVersion ( ) const
inlinevirtual

convenience function: return the protocol version of this interface

WServerReply WInterface::execute ( const WServerRequest )
protectedvirtual

called by WServer to execute a transaction

QMap< QString, QString > WInterface::headers ( QString  ) const
virtual

overwrite if you need additional headers (eg. session-ids) for certain transactions (transaction name is handed in as string argument); per default returns empty map

WInterface * WInterface::instance ( QString  name)
static

returns the instance registered under that name

QString WInterface::libraryVersionInfo ( WOb::VersionInfo  vi) const

returns version info about the library

LogLevel WInterface::logLevel ( ) const
inline

returns the current log level

QString WInterface::name ( ) const

get the name for this interface (returns empty string if not registered

virtual QString WInterface::needCommVersion ( ) const
inlinevirtual

convenience function: return the oldest protocol version this interface is compatible with

QNetworkReply * WInterface::post ( const QNetworkRequest &  request,
const QByteArray &  data 
)
protected

called by WTransaction to post a request

QString WInterface::proxyHost ( ) const
inline

returns the proxy host name

QString WInterface::proxyPassword ( ) const
inline

returns the proxy password

unsigned short WInterface::proxyPort ( ) const
inline

returns the proxy port

QString WInterface::proxyUser ( ) const
inline

returns the proxy user name

void WInterface::resetProxy ( )
inlineslot

resets the proxy settings to no proxy use

void WInterface::setLogLevel ( WInterface::LogLevel  l)
inlineslot

set log level

void WInterface::setProxy ( QString  proxyhost,
unsigned short  proxyport,
QString  proxyuser = QString(),
QString  proxypassword = QString() 
)
slot

sets the proxy settings

void WInterface::setUrl ( QUrl  u)
inlineslot

sets the URL of the interface

void WInterface::setWebTimeout ( int  t)
inlineslot

set timeout for page loads in seconds

void WInterface::sslErrors ( QNetworkReply *  reply,
const QList< QSslError > &   
)
virtualslot

handles SSL errors, per default ignores them, overwrite it if you need more sophisticated behavior

QString WInterface::staticLibraryVersionInfo ( WOb::VersionInfo  vi)
static

returns version info about the library

QUrl WInterface::url ( ) const
inline

returns the URL of the interface

bool WInterface::useProxy ( ) const
inline

returns whether the interface uses a proxy

bool WInterface::useProxyAuth ( ) const
inline

returns whether the proxy needs authentication

virtual QString WInterface::version ( ) const
inlinevirtual

convenience function: return human readable version

virtual QString WInterface::versionInfo ( WOb::VersionInfo  ) const
pure virtual

returns version info about the interface itself

int WInterface::webTimeout ( ) const
inline

return timeout in seconds

virtual QString WInterface::wocVersionInfo ( WOb::VersionInfo  ) const
pure virtual

returns version info about the WOC that was used to generate the interface

Friends And Related Function Documentation

friend class WServer
friend
friend class WTransaction
friend
friend class WTransaction_Private
friend

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