Logo Search packages:      
Sourcecode: kmess version File versions

OfflineImService Class Reference
[network]

#include <offlineimservice.h>

Inheritance diagram for OfflineImService:

HttpSoapConnection TcpConnectionBase

List of all members.


Detailed Description

SOAP calls to the Offline-IM webserice.

This class implements the method calls of the Offline-IM webservice. The respones of these methods are processed internally; a signal is fired to return the processed results. The following methods of the Offline-IM webservice are available:

For additional documentation about Offline-IM, see: http://msnpiki.msnfanatic.com/index.php/MSNP13:Offline_IM

Author:
Diederik van der Boor

Definition at line 43 of file offlineimservice.h.


Signals

void messageReceived (const QString &messageId, const QString &from, const QString &to, const QDateTime &date, const QString &body, const QString &runId, int sequenceNum)
 Fired when the response of the getMessage() call arrived.
void metaDataReceived (QDomElement metaData)
 Fired when the response of the getMetaData() call arrived.
void requestFailed (HttpSoapConnection *client, const QString &faultCode, const QString &faultString, QDomElement faultNode)
 Fired when the SOAP request returned a SOAP fault.
void requestFailed (HttpSoapConnection *client, const QString &reason)
 Fired when another error occured.
void requestFinished (HttpSoapConnection *client, QDomElement resultRoot)
 Fired when a query completed.

Public Member Functions

virtual void closeConnection ()
 Close the connection, or the connection got closed by the server.
void deleteMessages (const QStringList &messageIds)
 SOAP call to delete messages from the remote storage.
QString getEndpoint () const
 Return the endpoint.
int getHttpStatusCode () const
 Return the received HTTP status code.
void getMessage (const QString &messageId, bool markAsRead=false)
 SOAP call to download an offline message.
void getMetaData ()
 SOAP call to download the value of the Mail-Data field.
QString getRemoteIp () const
 Get the remote ip the socket is connected with.
QString getRemotePort () const
 Get the remote port the socket is connected with.
const QString & getRequestId () const
 Return the last request ID.
const QString & getSoapAction () const
 Return the last SOAP action.
QString getSocketError () const
 Get a description of the socket error.
bool isConnected () const
 Return true if a connection is active.
bool isIdle ()
 Return whether the connection is idle.
 OfflineImService (const QString &authT, const QString &authP, QObject *parent=0)
 The constructor.
bool openConnection (const QString &host, int port, bool ssl=false, bool async=true)
 Connect to a remote host.
void sendRawPostRequest (const QString &content, const QString &soapAction=QString::null, const QString &requestId=QString::null)
 Send the a raw POST request to the server.
void sendRequest (const QString &soapAction, const QString &messageBody, const QString &messageHeader=QString::null, const QString &requestId=QString::null)
 Send a SOAP request to the webservice.
void sendRequest (const QString &soapAction, const SoapMessage &message, const QString &requestId=QString::null)
 Send a SOAP request to the webservice.
virtual ~OfflineImService ()
 The destructor.

Protected Member Functions

virtual bool closeSockets ()
 Close the sockets.
QString escapeString (QString value) const
 Escape a string for inclusion in XML.
int getBytesAvailable () const
 Return the number of bytes which are already received in the local buffer.
int getConnectTimeout () const
 Return the connect timeout in seconds.
virtual bool parseHttpBody (const QByteArray &responseBody)
 Parse the received server response.
virtual bool parseHttpHeader (const QString &preamble, const MimeMessage &header)
 Parse the HTTP header.
int peekBlock (QByteArray *buffer, const int maxSize=0, const int offset=0)
 Peek data from the socket.
int peekBlock (char *buffer, const int size)
 Peek data from the socket.
QByteArray readAll ()
 Return all data available in the read buffer.
int readBlock (QByteArray *buffer, const int maxSize=0, const int offset=0)
 Read data from the socket.
int readBlock (char *buffer, const int size)
 Read data from the socket.
void setConnectTimeout (int seconds)
 Set the connect timeout.
virtual void slotConnectionFailed ()
 Called when the connection could not be made.
virtual void slotRequestFailed (const QString &faultCode, const QString &faultString, QDomElement &faultNode)
 Called when the SOAP request failed with an SOAP fault.
void stopTimeoutDetection ()
 Stop the connection timeout detection.
bool writeBlock (const QByteArray &block)
 Write data to the socket.
bool writeBlock (const char *block, const int size)
 Write data to the socket.

Private Member Functions

QString extractRFC822Address (const QString &address)
 Extract the e-mail address from an RFC822 formatted string.
void processGetMessageResult (QDomElement &resultRoot)
 Process the response of the getMessage() call.
void slotRequestFinished (QDomElement &resultRoot)
 Process the response of the webservice.

Private Attributes

QString authP_
 The p value of the passport cookie.
QString authT_
 The t value of the passport cookie.
QString passportCookieHeader_
 The passport header to send with SOAP.

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

Generated by  Doxygen 1.6.0   Back to index