QXmpp  Version:0.9.1
Static Public Member Functions | List of all members
QXmppUtils Class Reference

The QXmppUtils class contains static utility functions. More...

#include <QXmppUtils.h>

Static Public Member Functions

static QDateTime datetimeFromString (const QString &str)
 
static QString datetimeToString (const QDateTime &dt)
 
static int timezoneOffsetFromString (const QString &str)
 
static QString timezoneOffsetToString (int secs)
 
static QString jidToDomain (const QString &jid)
 Returns the domain for the given jid.
 
static QString jidToResource (const QString &jid)
 Returns the resource for the given jid.
 
static QString jidToUser (const QString &jid)
 Returns the user for the given jid.
 
static QString jidToBareJid (const QString &jid)
 Returns the bare jid (i.e. without resource) for the given jid.
 
static quint32 generateCrc32 (const QByteArray &input)
 Calculates the CRC32 checksum for the given input.
 
static QByteArray generateHmacMd5 (const QByteArray &key, const QByteArray &text)
 Generates the MD5 HMAC for the given key and text.
 
static QByteArray generateHmacSha1 (const QByteArray &key, const QByteArray &text)
 Generates the SHA1 HMAC for the given key and text.
 
static int generateRandomInteger (int N)
 
static QByteArray generateRandomBytes (int length)
 
static QString generateStanzaHash (int length=32)
 

Detailed Description

The QXmppUtils class contains static utility functions.

Member Function Documentation

QDateTime QXmppUtils::datetimeFromString ( const QString &  str)
static

Parses a date-time from a string according to XEP-0082: XMPP Date and Time Profiles.

QString QXmppUtils::datetimeToString ( const QDateTime &  dt)
static

Serializes a date-time to a string according to XEP-0082: XMPP Date and Time Profiles.

QByteArray QXmppUtils::generateRandomBytes ( int  length)
static

Returns a random byte array of the specified size.

Parameters
length
int QXmppUtils::generateRandomInteger ( int  N)
static

Generates a random integer x between 0 and N-1.

Parameters
N
QString QXmppUtils::generateStanzaHash ( int  length = 32)
static

Returns a random alphanumerical string of the specified size.

Parameters
length
int QXmppUtils::timezoneOffsetFromString ( const QString &  str)
static

Parses a timezone offset (in seconds) from a string according to XEP-0082: XMPP Date and Time Profiles.

QString QXmppUtils::timezoneOffsetToString ( int  secs)
static

Serializes a timezone offset (in seconds) to a string according to XEP-0082: XMPP Date and Time Profiles.


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