|
QXmpp Version: 1.15.1
|
The QXmppUtils class contains static utility functions. More...
#include <QXmppUtils.h>
Static Public Member Functions | |
| static QDateTime | datetimeFromString (QStringView 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 | generateStanzaUuid () |
| static QString | generateStanzaHash (int length=36) |
The QXmppUtils class contains static utility functions.
|
static |
Parses a date-time from a string according to XEP-0082: XMPP Date and Time Profiles.
Takes QStringView since QXmpp 1.8.
|
static |
Serializes a date-time to a string according to XEP-0082: XMPP Date and Time Profiles.
|
static |
Returns a random byte array of the specified size.
| length |
|
static |
Generates a random integer x between 0 and N-1.
| N |
|
static |
Returns a random alphanumerical string of the specified size.
Since QXmpp 1.3 this will generate a UUID, if the specified length is 36 which is also the new default value. The returned string is still 36 characters long, but will contain dashes (as specified in the UUID format).
| length |
|
static |
Creates a new stanza id in the UUID format.
|
static |
Parses a timezone offset (in seconds) from a string according to XEP-0082: XMPP Date and Time Profiles.
|
static |
Serializes a timezone offset (in seconds) to a string according to XEP-0082: XMPP Date and Time Profiles.