BrisaCore::BrisaWebService Class Reference

Web service abstraction class. More...

#include <brisawebservice.h>

Inheritance diagram for BrisaCore::BrisaWebService:
BrisaUpnp::BrisaEventController

List of all members.

Public Slots

void pageRequestedEvent (QxtWebRequestEvent *event)
void respond (QByteArray response)
void respond (const QByteArray &response, const int &sessionId, const int &requestId)
void respond (const QHttpResponseHeader &response)
void respond (const QHttpResponseHeader &response, const int &sessionId, const int &requestId)

Signals

void genericRequestReceived (const QString &method, const QMultiHash< QString, QString > &headers, const QByteArray &requestContent, int sessionId, int requestId)
void genericRequestReceived (BrisaWebService *service, QMultiHash< QString, QString >, QString requestContent)

Public Member Functions

 BrisaWebService (QxtAbstractWebSessionManager *sm, QObject *parent=0)
 ~BrisaWebService ()

Detailed Description

Web service abstraction class.

BrisaWebService is used to receive and respond UPnP action and event requests. Currently this class is used mostly with BrisaService and BrisaEventController.

See also:
BrisaUpnp::BrisaService , BrisaUpnp::BrisaEventController

Definition at line 90 of file brisawebservice.h.


Constructor & Destructor Documentation

BrisaWebService::BrisaWebService ( QxtAbstractWebSessionManager *  sm,
QObject *  parent = 0 
)

Constructor for BrisaWebService

Parameters:
sm Session manager
parent parent

Definition at line 53 of file brisawebservice.cpp.

BrisaCore::BrisaWebService::~BrisaWebService (  )  [inline]

Destructor for BrisaWebService

Definition at line 105 of file brisawebservice.h.


Member Function Documentation

void BrisaCore::BrisaWebService::genericRequestReceived ( BrisaWebService service,
QMultiHash< QString, QString >  _t2,
QString  requestContent 
) [signal]

Reimplements genericRequestReceived() This signal is emmited when BrisaWebService receives a request, the main difference is that this signal has a pointer to the class that is emmiting the signal.

Parameters:
service empty
? ?
requestContent empty

Definition at line 114 of file moc_brisawebservice.cpp.

void BrisaCore::BrisaWebService::genericRequestReceived ( const QString &  method,
const QMultiHash< QString, QString > &  headers,
const QByteArray &  requestContent,
int  sessionId,
int  requestId 
) [signal]

This signal is emmited when BrisaWebService receives a request.

Parameters:
method empty
headers empty
requestContent empty
sessionId empty
requestId empty

Definition at line 107 of file moc_brisawebservice.cpp.

void BrisaWebService::pageRequestedEvent ( QxtWebRequestEvent *  event  )  [slot]

This method receives all web service requests and emits a genericRequestReceived() signal. If the request method is of "POST" type, the web service will reply a default message.

Note: Reimplemented from libQxt.

Parameters:
event empty

Definition at line 58 of file brisawebservice.cpp.

void BrisaWebService::respond ( const QHttpResponseHeader &  response,
const int &  sessionId,
const int &  requestId 
) [slot]

Reimplements respond(). This method responds only a HTTP header using the given session and request ID.

Parameters:
response empty
sessionId empty
requestId empty

Definition at line 94 of file brisawebservice.cpp.

void BrisaWebService::respond ( const QHttpResponseHeader &  response  )  [slot]

Reimplements respond() This method responds only a HTTP header to the session and request ID stored in BrisaWebService

Parameters:
response empty

Definition at line 89 of file brisawebservice.cpp.

void BrisaWebService::respond ( const QByteArray &  response,
const int &  sessionId,
const int &  requestId 
) [slot]

Reimplements respond(). We recommend using this method given the fact that it supports asynchronous requests.

Parameters:
response empty
sessionId empty
requestId empty

Definition at line 84 of file brisawebservice.cpp.

void BrisaWebService::respond ( QByteArray  response  )  [slot]

Responds response to the session and request ID currently stored in BrisaWebService, if using this method the response must be synchronous because the request and session ID can change quickly.

Parameters:
response empty

Definition at line 79 of file brisawebservice.cpp.


The documentation for this class was generated from the following files:
Generated on Thu Sep 30 14:04:30 2010 for Brisa by  doxygen 1.6.3