qxmpp-0.7.6/0000755000175000007640000000000012116723632012614 5ustar sharkyjerrywebqxmpp-0.7.6/qxmpp.pri0000644000175000007640000000343212116723562014501 0ustar sharkyjerryweb# Common definitions QT += network xml QXMPP_VERSION = 0.7.6 QXMPP_INCLUDEPATH = $$PWD/src/base $$PWD/src/client $$PWD/src/server # Determine library name CONFIG(debug, debug|release) { QXMPP_LIBRARY_NAME = qxmpp_d } else { QXMPP_LIBRARY_NAME = qxmpp } # Determine library type (shared or staticlib) isEmpty(QXMPP_LIBRARY_TYPE) { android { QXMPP_LIBRARY_TYPE = staticlib } else { QXMPP_LIBRARY_TYPE = shared } } # Libraries used internally by QXmpp android { } else:contains(MEEGO_EDITION,harmattan) { # meego/harmattan has speex for sure QXMPP_USE_SPEEX=1 } else:symbian { QXMPP_INTERNAL_INCLUDES = $$APP_LAYER_SYSTEMINCLUDE QXMPP_INTERNAL_LIBS = -lesock } else:win32 { QXMPP_INTERNAL_LIBS = -ldnsapi -lws2_32 } # Libraries for apps which use QXmpp QXMPP_LIBS = -l$${QXMPP_LIBRARY_NAME} contains(QXMPP_LIBRARY_TYPE,staticlib) { # Symbian needs a .lib extension to recognise the library as static symbian: QXMPP_LIBS = -l$${QXMPP_LIBRARY_NAME}.lib # FIXME: we should be able to use the link_prl option to automatically pull # in the extra libraries which the qxmpp library needs, but this does not # seem to work on win32, so we specify the dependencies here: QXMPP_LIBS += $$QXMPP_INTERNAL_LIBS DEFINES += QXMPP_STATIC } else { # Windows needs the major library version win32: QXMPP_LIBS = -l$${QXMPP_LIBRARY_NAME}0 DEFINES += QXMPP_SHARED } # Installation prefix and library directory isEmpty(PREFIX) { contains(MEEGO_EDITION,harmattan) { PREFIX = /usr } else:unix { PREFIX = /usr/local } else { PREFIX = $$[QT_INSTALL_PREFIX] } } isEmpty(LIBDIR) { LIBDIR = lib } # Internal API auto-tests !isEmpty(QXMPP_AUTOTEST_INTERNAL) { DEFINES += QXMPP_AUTOTEST_INTERNAL } qxmpp-0.7.6/examples/0000755000175000007640000000000012116723562014434 5ustar sharkyjerrywebqxmpp-0.7.6/examples/example_6_rpcClient/0000755000175000007640000000000012116723562020317 5ustar sharkyjerrywebqxmpp-0.7.6/examples/example_6_rpcClient/rpcClient.cpp0000644000175000007640000000430412116723562022747 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Ian Reinhart Geiser * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include #include "QXmppRpcManager.h" #include "QXmppUtils.h" #include "rpcClient.h" rpcClient::rpcClient(QObject *parent) : QXmppClient(parent) { // add RPC manager m_rpcManager = new QXmppRpcManager; addExtension(m_rpcManager); // observe incoming presences bool check = connect(this, SIGNAL(presenceReceived(QXmppPresence)), this, SLOT(slotPresenceReceived(QXmppPresence))); Q_ASSERT(check); Q_UNUSED(check); } rpcClient::~rpcClient() { } void rpcClient::slotInvokeRemoteMethod() { QXmppRemoteMethodResult methodResult = m_rpcManager->callRemoteMethod( m_remoteJid, "RemoteInterface.echoString", "This is a test" ); if( methodResult.hasError ) qDebug() << "Error:" << methodResult.code << methodResult.errorMessage; else qDebug() << "Result:" << methodResult.result; } /// A presence was received. void rpcClient::slotPresenceReceived(const QXmppPresence &presence) { const QLatin1String recipient("qxmpp.test1@qxmpp.org"); // if we are the recipient, or if the presence is not from the recipient, // do nothing if (QXmppUtils::jidToBareJid(configuration().jid()) == recipient || QXmppUtils::jidToBareJid(presence.from()) != recipient || presence.type() != QXmppPresence::Available) return; // invoke the remote method in 1 second m_remoteJid = presence.from(); QTimer::singleShot(1000, this, SLOT(slotInvokeRemoteMethod())); } qxmpp-0.7.6/examples/example_6_rpcClient/rpcClient.h0000644000175000007640000000216612116723562022420 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Ian Reinhart Geiser * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef RPCCLIENT_H #define RPCCLIENT_H #include "QXmppClient.h" class QXmppRpcManager; class rpcClient : public QXmppClient { Q_OBJECT public: rpcClient(QObject *parent = 0); ~rpcClient(); private slots: void slotInvokeRemoteMethod(); void slotPresenceReceived(const QXmppPresence &presence); private: QString m_remoteJid; QXmppRpcManager *m_rpcManager; }; #endif // RPCCLIENT_H qxmpp-0.7.6/examples/example_6_rpcClient/example_6_rpcClient.pro0000644000175000007640000000023012116723562024717 0ustar sharkyjerrywebinclude(../examples.pri) TARGET = example_6_rpcClient SOURCES += main.cpp \ rpcClient.cpp HEADERS += rpcClient.h OTHER_FILES += README qxmpp-0.7.6/examples/example_6_rpcClient/main.cpp0000644000175000007640000000203612116723562021750 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Ian Reinhart Geiser * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include "rpcClient.h" #include "QXmppLogger.h" int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); QXmppLogger::getLogger()->setLoggingType(QXmppLogger::StdoutLogging); rpcClient client; client.connectToServer("qxmpp.test2@qxmpp.org", "qxmpp456"); return a.exec(); } qxmpp-0.7.6/examples/example_8_server/0000755000175000007640000000000012116723562017704 5ustar sharkyjerrywebqxmpp-0.7.6/examples/example_8_server/example_8_server.pro0000644000175000007640000000011212116723562023670 0ustar sharkyjerrywebinclude(../examples.pri) TARGET = example_8_server SOURCES += main.cpp qxmpp-0.7.6/examples/example_8_server/main.cpp0000644000175000007640000000403212116723562021333 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include "QXmppLogger.h" #include "QXmppPasswordChecker.h" #include "QXmppServer.h" #define USERNAME "qxmpp.test1" #define PASSWORD "qxmpp123" class passwordChecker : public QXmppPasswordChecker { /// Retrieves the password for the given username. QXmppPasswordReply::Error getPassword(const QXmppPasswordRequest &request, QString &password) { if (request.username() == USERNAME) { password = PASSWORD; return QXmppPasswordReply::NoError; } else { return QXmppPasswordReply::AuthorizationError; } }; /// Returns true as we implemented getPassword(). bool hasGetPassword() const { return true; }; }; int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); // we want one argument : the domain to serve if (argc != 2) { fprintf(stderr, "Usage: xmppServer \n"); return EXIT_FAILURE; } const QString domain = QString::fromLocal8Bit(argv[1]); QXmppLogger logger; logger.setLoggingType(QXmppLogger::StdoutLogging); passwordChecker checker; QXmppServer server; server.setDomain(domain); server.setLogger(&logger); server.setPasswordChecker(&checker); server.listenForClients(); server.listenForServers(); return a.exec(); } qxmpp-0.7.6/examples/examples.pro0000644000175000007640000000063412116723562016777 0ustar sharkyjerrywebinclude(../qxmpp.pri) TEMPLATE = subdirs SUBDIRS = example_0_connected \ example_1_echoClient \ example_2_rosterHandling \ example_3_transferHandling \ # example_4_callHandling \ example_5_rpcInterface \ example_6_rpcClient \ example_7_archiveHandling \ example_8_server \ example_9_vCard # GuiClient qxmpp-0.7.6/examples/example_9_vCard/0000755000175000007640000000000012116723562017436 5ustar sharkyjerrywebqxmpp-0.7.6/examples/example_9_vCard/example_9_vCard.cpp0000644000175000007640000000633012116723562023146 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include #include #include #include #include #include #include #include "QXmppMessage.h" #include "QXmppRosterManager.h" #include "QXmppVCardIq.h" #include "QXmppVCardManager.h" #include "example_9_vCard.h" xmppClient::xmppClient(QObject *parent) : QXmppClient(parent) { bool check; Q_UNUSED(check); check = connect(this, SIGNAL(connected()), SLOT(clientConnected())); Q_ASSERT(check); check = connect(&this->rosterManager(), SIGNAL(rosterReceived()), SLOT(rosterReceived())); Q_ASSERT(check); } xmppClient::~xmppClient() { } void xmppClient::clientConnected() { std::cout<<"example_9_vCard:: CONNECTED"<vCardManager(), SIGNAL(vCardReceived(QXmppVCardIq)), SLOT(vCardReceived(QXmppVCardIq))); Q_ASSERT(check); Q_UNUSED(check); QStringList list = rosterManager().getRosterBareJids(); for(int i = 0; i < list.size(); ++i) { // request vCard of all the bareJids in roster vCardManager().requestVCard(list.at(i)); } } void xmppClient::vCardReceived(const QXmppVCardIq& vCard) { QString bareJid = vCard.from(); std::cout<<"example_9_vCard:: vCard Received:: " << qPrintable(bareJid) < #include "QXmppLogger.h" #include "QXmppMessage.h" #include "example_1_echoClient.h" echoClient::echoClient(QObject *parent) : QXmppClient(parent) { bool check = connect(this, SIGNAL(messageReceived(QXmppMessage)), SLOT(messageReceived(QXmppMessage))); Q_ASSERT(check); Q_UNUSED(check); } echoClient::~echoClient() { } void echoClient::messageReceived(const QXmppMessage& message) { QString from = message.from(); QString msg = message.body(); sendPacket(QXmppMessage("", from, "Your message: " + msg)); } int main(int argc, char *argv[]) { QCoreApplication app(argc, argv); echoClient client; client.logger()->setLoggingType(QXmppLogger::StdoutLogging); client.connectToServer("qxmpp.test1@qxmpp.org", "qxmpp123"); return app.exec(); } qxmpp-0.7.6/examples/example_1_echoClient/README0000644000175000007640000000033012116723562021320 0ustar sharkyjerrywebThis is a very simple bot which echoes the message sent to it. Run this example, send it a message from a friend of this bot. You will recieve the message back. This example shows how to receive and send messages. qxmpp-0.7.6/examples/example_3_transferHandling/0000755000175000007640000000000012116723562021662 5ustar sharkyjerrywebqxmpp-0.7.6/examples/example_3_transferHandling/example_3_transferHandling.qrc0000644000175000007640000000016212116723562027616 0ustar sharkyjerryweb example_3_transferHandling.cpp qxmpp-0.7.6/examples/example_3_transferHandling/example_3_transferHandling.h0000644000175000007640000000246412116723562027267 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Ian Reinhart Geiser * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef IBBCLIENT_H #define IBBCLIENT_H #include "QXmppClient.h" #include "QXmppTransferManager.h" class QBuffer; class xmppClient : public QXmppClient { Q_OBJECT public: xmppClient(QObject *parent = 0); void setRecipient(const QString &recipient); private slots: void slotError(QXmppTransferJob::Error error); void slotFileReceived(QXmppTransferJob *job); void slotFinished(); void slotPresenceReceived(const QXmppPresence &presence); void slotProgress(qint64 done, qint64 total); private: QString m_recipient; QXmppTransferManager *transferManager; }; #endif // IBBCLIENT_H qxmpp-0.7.6/examples/example_3_transferHandling/example_3_transferHandling.cpp0000644000175000007640000001121112116723562027610 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Ian Reinhart Geiser * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include #include #include #include #include "QXmppMessage.h" #include "QXmppUtils.h" #include "example_3_transferHandling.h" xmppClient::xmppClient(QObject *parent) : QXmppClient(parent), transferManager(0) { bool check; Q_UNUSED(check); // add transfer manager transferManager = new QXmppTransferManager; transferManager->setProxy("proxy.qxmpp.org"); addExtension(transferManager); // uncomment one of the following if you only want to use a specific transfer method: // // transferManager->setSupportedMethods(QXmppTransferJob::InBandMethod); // transferManager->setSupportedMethods(QXmppTransferJob::SocksMethod); check = connect(this, SIGNAL(presenceReceived(QXmppPresence)), this, SLOT(slotPresenceReceived(QXmppPresence))); Q_ASSERT(check); check = connect(transferManager, SIGNAL(fileReceived(QXmppTransferJob*)), this, SLOT(slotFileReceived(QXmppTransferJob*))); Q_ASSERT(check); } void xmppClient::setRecipient(const QString &recipient) { m_recipient = recipient; } /// A file transfer failed. void xmppClient::slotError(QXmppTransferJob::Error error) { qDebug() << "Transmission failed:" << error; } /// A file transfer request was received. void xmppClient::slotFileReceived(QXmppTransferJob *job) { bool check; Q_UNUSED(check); qDebug() << "Got transfer request from:" << job->jid(); check = connect(job, SIGNAL(error(QXmppTransferJob::Error)), this, SLOT(slotError(QXmppTransferJob::Error))); Q_ASSERT(check); check = connect(job, SIGNAL(finished()), this, SLOT(slotFinished())); Q_ASSERT(check); check = connect(job, SIGNAL(progress(qint64,qint64)), this, SLOT(slotProgress(qint64,qint64))); Q_ASSERT(check); // allocate a buffer to receive the file QBuffer *buffer = new QBuffer(this); buffer->open(QIODevice::WriteOnly); job->accept(buffer); } /// A file transfer finished. void xmppClient::slotFinished() { qDebug() << "Transmission finished"; } /// A presence was received void xmppClient::slotPresenceReceived(const QXmppPresence &presence) { bool check; Q_UNUSED(check); // if we don't have a recipient, or if the presence is not from the recipient, // do nothing if (m_recipient.isEmpty() || QXmppUtils::jidToBareJid(presence.from()) != m_recipient || presence.type() != QXmppPresence::Available) return; // send the file and connect to the job's signals QXmppTransferJob *job = transferManager->sendFile(presence.from(), ":/example_3_transferHandling.cpp", "example source code"); check = connect(job, SIGNAL(error(QXmppTransferJob::Error)), this, SLOT(slotError(QXmppTransferJob::Error))); Q_ASSERT(check); check = connect(job, SIGNAL(finished()), this, SLOT(slotFinished())); Q_ASSERT(check); check = connect(job, SIGNAL(progress(qint64,qint64)), this, SLOT(slotProgress(qint64,qint64))); Q_ASSERT(check); } /// A file transfer has made progress. void xmppClient::slotProgress(qint64 done, qint64 total) { qDebug() << "Transmission progress:" << done << "/" << total; } int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); // we want one argument : "send" or "receive" if (argc != 2 || (strcmp(argv[1], "send") && strcmp(argv[1], "receive"))) { fprintf(stderr, "Usage: %s send|receive\n", argv[0]); return EXIT_FAILURE; } xmppClient client; client.logger()->setLoggingType(QXmppLogger::StdoutLogging); if (!strcmp(argv[1], "send")) { client.setRecipient("qxmpp.test2@qxmpp.org"); client.connectToServer("qxmpp.test1@qxmpp.org", "qxmpp123"); } else { client.connectToServer("qxmpp.test2@qxmpp.org", "qxmpp456"); } return a.exec(); } qxmpp-0.7.6/examples/example_3_transferHandling/example_3_transferHandling.pro0000644000175000007640000000027712116723562027640 0ustar sharkyjerrywebinclude(../examples.pri) TARGET = example_3_transferHandling RESOURCES += example_3_transferHandling.qrc SOURCES += example_3_transferHandling.cpp HEADERS += example_3_transferHandling.h qxmpp-0.7.6/examples/example_7_archiveHandling/0000755000175000007640000000000012116723562021463 5ustar sharkyjerrywebqxmpp-0.7.6/examples/example_7_archiveHandling/example_7_archiveHandling.h0000644000175000007640000000311612116723562026664 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef XMPPCLIENT_H #define XMPPCLIENT_H #include #include "QXmppClient.h" class QXmppArchiveChat; class QXmppArchiveManager; class QXmppResultSetReply; class xmppClient : public QXmppClient { Q_OBJECT public: enum PageDirection { PageForwards = 0, PageBackwards }; xmppClient(QObject *parent = 0); ~xmppClient(); void setPageDirection(PageDirection direction); void setPageSize(int size); public slots: void clientConnected(); void archiveListReceived(const QList &chats, const QXmppResultSetReply &rsmReply); void archiveChatReceived(const QXmppArchiveChat &chat, const QXmppResultSetReply &rsmReply); private: QXmppArchiveManager *archiveManager; int m_collectionCount; QDateTime m_startDate; QDateTime m_endDate; PageDirection m_pageDirection; int m_pageSize; }; #endif // XMPPCLIENT_H qxmpp-0.7.6/examples/example_7_archiveHandling/example_7_archiveHandling.pro0000644000175000007640000000021712116723562027234 0ustar sharkyjerrywebinclude(../examples.pri) TARGET = example_7_archiveHandling SOURCES += example_7_archiveHandling.cpp HEADERS += example_7_archiveHandling.h qxmpp-0.7.6/examples/example_7_archiveHandling/example_7_archiveHandling.cpp0000644000175000007640000001137512116723562027225 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include #include "QXmppArchiveIq.h" #include "QXmppArchiveManager.h" #include "example_7_archiveHandling.h" static void logStart(const QString &msg) { qDebug("example_7_archiveHandling : %s", qPrintable(msg)); } static void logEnd(const QString &msg) { qDebug(" => %s", qPrintable(msg)); } xmppClient::xmppClient(QObject *parent) : QXmppClient(parent) , m_collectionCount(-1) , m_pageDirection(PageForwards) , m_pageSize(10) { bool check; Q_UNUSED(check); // add archive manager archiveManager = new QXmppArchiveManager; addExtension(archiveManager); // connect signals check = connect(this, SIGNAL(connected()), this, SLOT(clientConnected())); Q_ASSERT(check); check = connect(archiveManager, SIGNAL(archiveChatReceived(QXmppArchiveChat, QXmppResultSetReply)), SLOT(archiveChatReceived(QXmppArchiveChat, QXmppResultSetReply))); Q_ASSERT(check); check = connect(archiveManager, SIGNAL(archiveListReceived(QList, QXmppResultSetReply)), SLOT(archiveListReceived(QList, QXmppResultSetReply))); Q_ASSERT(check); // set limits m_startDate = QDateTime::currentDateTime().addDays(-21); m_endDate = QDateTime::currentDateTime(); } xmppClient::~xmppClient() { } void xmppClient::setPageDirection(PageDirection direction) { m_pageDirection = direction; } void xmppClient::setPageSize(int size) { m_pageSize = size; } void xmppClient::clientConnected() { logEnd("connected"); // we want 0 results, i.e. only result-set management information (count) logStart("fetching collection count"); QXmppResultSetQuery rsmQuery; rsmQuery.setMax(0); archiveManager->listCollections("", m_startDate, m_endDate, rsmQuery); } void xmppClient::archiveListReceived(const QList &chats, const QXmppResultSetReply &rsmReply) { if (m_collectionCount < 0) { logEnd(QString::number(rsmReply.count()) + " items"); m_collectionCount = rsmReply.count(); // fetch first page logStart("fetching collection first page"); QXmppResultSetQuery rsmQuery; rsmQuery.setMax(m_pageSize); if (m_pageDirection == PageBackwards) rsmQuery.setBefore(""); archiveManager->listCollections("", m_startDate, m_endDate, rsmQuery); } else if (!chats.size()) { logEnd("no items"); } else { logEnd(QString("items %1 to %2 of %3").arg(QString::number(rsmReply.index()), QString::number(rsmReply.index() + chats.size() - 1), QString::number(rsmReply.count()))); foreach (const QXmppArchiveChat &chat, chats) { qDebug("chat start %s", qPrintable(chat.start().toString())); // NOTE: to actually retrieve conversations, uncomment this //archiveManager->retrieveCollection(chat.with(), chat.start()); } if (!rsmReply.isNull()) { // fetch next page QXmppResultSetQuery rsmQuery; rsmQuery.setMax(m_pageSize); if (m_pageDirection == PageBackwards) { logStart("fetching collection previous page"); rsmQuery.setBefore(rsmReply.first()); } else { logStart("fetching collection next page"); rsmQuery.setAfter(rsmReply.last()); } archiveManager->listCollections("", m_startDate, m_endDate, rsmQuery); } } } void xmppClient::archiveChatReceived(const QXmppArchiveChat &chat, const QXmppResultSetReply &rsmReply) { logEnd(QString("chat received, RSM count %1").arg(QString::number(rsmReply.count()))); foreach (const QXmppArchiveMessage &msg, chat.messages()) { qDebug("example_7_archiveHandling : %s", qPrintable(msg.body())); } } int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); xmppClient client; client.setPageSize(15); client.setPageDirection(xmppClient::PageBackwards); client.connectToServer("qxmpp.test1@qxmpp.org", "qxmpp123"); return a.exec(); } qxmpp-0.7.6/examples/GuiClient/0000755000175000007640000000000012116723562016317 5ustar sharkyjerrywebqxmpp-0.7.6/examples/GuiClient/chatMsgGraphicsItem.cpp0000644000175000007640000002001712116723562022711 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "chatMsgGraphicsItem.h" #include #include #include QLinearGradient getGradient(const QColor &col, const QRectF &rect) { QLinearGradient g(rect.topLeft(), rect.bottomLeft()); qreal hue = col.hueF(); qreal value = col.valueF(); qreal saturation = col.saturationF(); QColor c = col; c.setHsvF(hue, 0.42 * saturation, 0.98 * value); g.setColorAt(0, c); c.setHsvF(hue, 0.58 * saturation, 0.95 * value); g.setColorAt(0.25, c); c.setHsvF(hue, 0.70 * saturation, 0.93 * value); g.setColorAt(0.5, c); c.setHsvF(hue, 0.95 * saturation, 0.9 * value); g.setColorAt(0.501, c); c.setHsvF(hue * 0.95, 0.95 * saturation, 0.95 * value); g.setColorAt(0.75, c); c.setHsvF(hue * 0.90, 0.95 * saturation, 1 * value); g.setColorAt(1.0, c); return g; } QLinearGradient darken(const QLinearGradient &gradient) { QGradientStops stops = gradient.stops(); for (int i = 0; i < stops.size(); ++i) { QColor color = stops.at(i).second; stops[i].second = color.darker(160); } QLinearGradient g = gradient; g.setStops(stops); return g; } static void drawPath(QPainter *p, const QPainterPath &path, const QColor &col, bool dark = false) { const QRectF pathRect = path.boundingRect(); const QLinearGradient baseGradient = getGradient(col, pathRect); const QLinearGradient darkGradient = darken(baseGradient); p->save(); // p->setOpacity(0.25); //glow // if (dark) // p->strokePath(path, QPen(darkGradient, 6)); // else // p->strokePath(path, QPen(baseGradient, 6)); p->setOpacity(1.0); //fill if (dark) p->fillPath(path, darkGradient); else p->fillPath(path, baseGradient); QLinearGradient g(pathRect.topLeft(), pathRect.topRight()); g.setCoordinateMode(QGradient::ObjectBoundingMode); p->setOpacity(0.2); p->fillPath(path, g); p->setOpacity(0.5); // highlight // if (dark) // p->strokePath(path, QPen(col.lighter(160).darker(160), 2)); // else // p->strokePath(path, QPen(col.lighter(160), 2)); p->setOpacity(1.0); p->restore(); } chatMsgGraphicsItem::chatMsgGraphicsItem(QGraphicsItem * parent):QGraphicsPathItem(parent), m_spikeWidth(9), m_spikeHeight(6), m_cornerRadius(10), m_textSpacing(4), m_color(Qt::yellow) { setPath(createPath()); // setFlags(QGraphicsItem::ItemIsMovable); QFont font; QFontMetrics fm(font); m_timeStampWidth = fm.width(getTime()) + 4; } void chatMsgGraphicsItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { Q_UNUSED(option); Q_UNUSED(widget); painter->setRenderHint(QPainter::Antialiasing); drawPath(painter, path(), m_color); // int spike_x = m_spikeWidth; // int spike_y = m_spikeHeight; // int corner = m_cornerRadius; // int length = m_width - spike_x; // int offset = spike_x; QFont font; font.setBold(true); QTextDocument textDoc(getText()); QTextOption textOp; textOp.setWrapMode(QTextOption::WrapAnywhere); textOp.setAlignment(Qt::AlignLeft); textDoc.setDefaultTextOption(textOp); textDoc.setTextWidth(getTextWidth()); textDoc.setDefaultFont(font); painter->setPen(Qt::white); painter->setFont(font); int height = (int) textDoc.size().height(); painter->drawText(m_spikeWidth + m_cornerRadius, 4, getTextWidth(), height, Qt::AlignLeft|Qt::TextWrapAnywhere, getText()); // painter->setPen(Qt::gray); painter->setPen(Qt::black); // font.setBold(false); painter->setFont(font); painter->drawText(-m_boxStartLength, 0, m_boxStartLength, m_height, Qt::AlignRight|Qt::AlignBottom, getName()); font.setBold(false); painter->setPen(Qt::gray); painter->setFont(font); int timeWidth; if(m_timeStampWidth > m_boxStartLength) timeWidth = m_timeStampWidth; else timeWidth = m_boxStartLength; painter->drawText(getMaxWidth() + 6, 0, timeWidth - 6, m_height, Qt::AlignBottom|Qt::AlignLeft, getTime()); } void chatMsgGraphicsItem::setText(const QString& text) { m_text = text; calculateWidth(); setPath(createPath()); } void chatMsgGraphicsItem::setMaxWidth(int width) { m_maxWidth = width; setPath(createPath()); } void chatMsgGraphicsItem::setViewWidth(int width) { //25 for scrollbar setMaxWidth(width - getBoxStartLength() - 25); } int chatMsgGraphicsItem::getMaxWidth() const { return m_maxWidth; } void chatMsgGraphicsItem::setAlignment(Alignment align) { m_alignment = align; setPath(createPath()); } QPainterPath chatMsgGraphicsItem::createPath() { calculateWidth(); int spike_x = m_spikeWidth; int spike_y = m_spikeHeight; int corner = m_cornerRadius; int length = m_width - spike_x; int offset = spike_x; QPainterPath messageBoxPath; messageBoxPath.moveTo(0 + offset, m_height - corner); QRectF rect(offset - 2*spike_x, m_height - corner - spike_y, 2*spike_x, 2*spike_y); messageBoxPath.arcMoveTo(rect, -90.0); messageBoxPath.arcTo(rect, 270, 90.0); messageBoxPath.lineTo(0 + offset, corner); messageBoxPath.arcTo(0 + offset, 0, 2*corner, 2*corner, 180, -90.0); messageBoxPath.lineTo(length - corner, 0); messageBoxPath.arcTo(length + offset - corner*2, 0, 2*corner, 2*corner, 90, -90.0); messageBoxPath.lineTo(length + offset, m_height - corner); messageBoxPath.arcTo(length + offset - corner*2, m_height - 2*corner, 2*corner, 2*corner, 0, -90.0); messageBoxPath.lineTo(offset + corner, m_height); messageBoxPath.arcTo(offset, m_height - 2*corner, 2*corner, 2*corner, 270, -45.0); messageBoxPath.closeSubpath(); return messageBoxPath; } QString chatMsgGraphicsItem::getText() const { return m_text; } int chatMsgGraphicsItem::getTextWidth() const { return getMaxWidth() - m_spikeWidth - m_cornerRadius*2; } void chatMsgGraphicsItem::calculateWidth() { QFont font; font.setBold(true); QTextDocument textDoc(m_text); textDoc.setDefaultFont(font); int idealWidth = (int)textDoc.size().width(); textDoc.setTextWidth(getTextWidth()); m_height = (int)textDoc.size().height(); if(idealWidth < getTextWidth()) { m_width = idealWidth + m_spikeWidth + m_cornerRadius; } else m_width = getMaxWidth(); } void chatMsgGraphicsItem::setName(const QString& name) { m_name = name; if(name != "Me") m_color = QColor(0, 210, 250); else m_color = QColor(250, 188, 239); } QString chatMsgGraphicsItem::getName() const { return m_name; } QString chatMsgGraphicsItem::getTime() const { return QTime::currentTime().toString("hh:mm"); } void chatMsgGraphicsItem::setBoxStartLength(int length) { m_boxStartLength = length; } int chatMsgGraphicsItem::getBoxStartLength() const { return m_boxStartLength; } void chatMsgGraphicsItem::setColor(const QColor& color) { m_color = color; } QRectF chatMsgGraphicsItem::boundingRect() const { QRectF rect = QGraphicsPathItem::boundingRect(); rect.setLeft(-getBoxStartLength()); int timeWidth; if(m_timeStampWidth > m_boxStartLength) timeWidth = m_timeStampWidth; else timeWidth = m_boxStartLength; rect.setRight(getMaxWidth() + timeWidth); return rect; } qxmpp-0.7.6/examples/GuiClient/statusWidget.ui0000644000175000007640000001351412116723562021351 0ustar sharkyjerryweb statusWidgetClass 0 0 251 40 Form 0 4 0 4 0 0 0 :/icons/resource/green.png 0 3 0 toolbutton QToolButton::InstantPopup Qt::ToolButtonTextBesideIcon true Qt::DownArrow Qt::Horizontal 40 10 0 0 0 Qt::Horizontal 40 10 :/icons/resource/avatar.png:/icons/resource/avatar.png 32 32 :/icons/resource/red.png:/icons/resource/red.png Busy :/icons/resource/green.png:/icons/resource/green.png Available :/icons/resource/gray.png:/icons/resource/gray.png Invisible :/icons/resource/gray.png:/icons/resource/gray.png Sign out :/icons/resource/orange.png:/icons/resource/orange.png Away statusAvatarWidget QPushButton
statusAvatarWidget.h
statusTextWidget QWidget
statusTextWidget.h
1
statusToolButton QToolButton
statusToolButton.h
qxmpp-0.7.6/examples/GuiClient/rosterListView.h0000644000175000007640000000302312116723562021473 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef ROSTERLISTVIEW_H #define ROSTERLISTVIEW_H #include #include class rosterListView : public QListView { Q_OBJECT public: rosterListView(QWidget* parent = 0); bool event(QEvent* e); public slots: void mousePressed(const QModelIndex& index); void doubleClicked(const QModelIndex& index); void clicked(const QModelIndex& index); private slots: void showChatDialog_helper(); void showProfile_helper(); void removeContact_helper(); protected: void keyPressEvent(QKeyEvent*); signals: void showChatDialog(const QString& bareJid); void showProfile(const QString& bareJid); void removeContact(const QString& bareJid); private: QString selectedBareJid(); private: QAction m_chat; QAction m_profile; QAction m_removeContact; }; #endif // ROSTERLISTVIEW_H qxmpp-0.7.6/examples/GuiClient/statusAvatarWidget.h0000644000175000007640000000174012116723562022320 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef STATUSAVATARWIDGET_H #define STATUSAVATARWIDGET_H #include class statusAvatarWidget : public QPushButton { public: statusAvatarWidget(QWidget* parent = 0); void paintEvent(QPaintEvent* event); QSize sizeHint() const; }; #endif // STATUSAVATARWIDGET_H qxmpp-0.7.6/examples/GuiClient/utils.cpp0000644000175000007640000001050112116723562020160 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "utils.h" #include #include int comparisonWeightsPresenceStatusType(QXmppPresence::AvailableStatusType statusType) { switch(statusType) { case QXmppPresence::Online: case QXmppPresence::Chat: return 0; case QXmppPresence::DND: return 1; case QXmppPresence::Away: case QXmppPresence::XA: return 2; case QXmppPresence::Invisible: return 3; default: return 5; } } int comparisonWeightsPresenceType(QXmppPresence::Type type) { switch(type) { case QXmppPresence::Available: return 0; case QXmppPresence::Unavailable: return 1; case QXmppPresence::Error: case QXmppPresence::Subscribe: case QXmppPresence::Subscribed: case QXmppPresence::Unsubscribe: case QXmppPresence::Unsubscribed: case QXmppPresence::Probe: return 3; default: return 5; } } QString presenceToStatusText(const QXmppPresence& presence) { QString statusText = presence.statusText(); if(statusText.isEmpty()) { if(presence.type() == QXmppPresence::Available) { switch(presence.availableStatusType()) { case QXmppPresence::Invisible: statusText = "Offline"; break; case QXmppPresence::Online: case QXmppPresence::Chat: statusText = "Available"; break; case QXmppPresence::Away: case QXmppPresence::XA: statusText = "Idle"; break; case QXmppPresence::DND: statusText = "Busy"; break; } } else statusText = "Offline"; } return statusText; } QString getSettingsDir(const QString& bareJid) { QString dir = QDesktopServices::storageLocation(QDesktopServices::DataLocation); if(bareJid.isEmpty()) return dir + "/"; else return QString(dir + "/%1/").arg(bareJid); } QString getSha1HashAsHex(const QByteArray& image) { if(image.isEmpty()) return ""; else return QString(QCryptographicHash::hash(image, QCryptographicHash::Sha1).toHex()); } QImage getImageFromByteArray(const QByteArray& image) { QBuffer buffer; buffer.setData(image); buffer.open(QIODevice::ReadOnly); QImageReader imageReader(&buffer); return imageReader.read(); } QString getImageType1(const QByteArray& image) { QBuffer buffer; buffer.setData(image); buffer.open(QIODevice::ReadOnly); QString format = QImageReader::imageFormat(&buffer); if(format.toUpper() == "PNG") return "image/png"; else if(format.toUpper() == "MNG") return "video/x-mng"; else if(format.toUpper() == "GIF") return "image/gif"; else if(format.toUpper() == "BMP") return "image/bmp"; else if(format.toUpper() == "XPM") return "image/x-xpm"; else if(format.toUpper() == "SVG") return "image/svg+xml"; else if(format.toUpper() == "JPEG") return "image/jpeg"; return "image/unknown"; } bool isValidBareJid(const QString& bareJid) { QRegExp re("^[^@]+@[^@]+$"); return re.exactMatch(bareJid); } QByteArray calculateXor(const QByteArray& data, const QByteArray& key) { if(key.isEmpty()) return data; QByteArray result; for(int i = 0 , j = 0; i < data.length(); ++i , ++j) { if(j == key.length()) j = 0; result.append(data.at(i) ^ key.at(j)); } return result; } qxmpp-0.7.6/examples/GuiClient/xmlConsoleDialog.h0000644000175000007640000000216412116723562021736 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef XMLCONSOLEDIALOG_H #define XMLCONSOLEDIALOG_H #include #include "QXmppLogger.h" namespace Ui { class xmlConsoleDialog; } class xmlConsoleDialog : public QDialog { Q_OBJECT public: explicit xmlConsoleDialog(QWidget *parent = 0); ~xmlConsoleDialog(); public slots: void message(QXmppLogger::MessageType, const QString &); private: Ui::xmlConsoleDialog *ui; }; #endif // XMLCONSOLEDIALOG_H qxmpp-0.7.6/examples/GuiClient/mainDialog.ui0000644000175000007640000002540112116723562020724 0ustar sharkyjerryweb mainDialogClass true 0 0 236 484 QXmpp :/icons/resource/icon.png:/icons/resource/icon.png 6 0 6 0 4 0 0 true QAbstractItemView::NoEditTriggers QAbstractItemView::ScrollPerPixel 29 29 29 29 :/icons/resource/addButton.png:/icons/resource/addButton.png 29 29 Qt::Horizontal 40 20 29 29 29 29 :/icons/resource/settingsButton.png:/icons/resource/settingsButton.png 29 29 true 20 20 Qt::Vertical 20 40 Login: QLineEdit::Password Remember password Qt::Horizontal 40 20 Sign in Cancel Qt::Horizontal 40 20 Qt::Horizontal 40 20 Qt::Horizontal 40 20 0 Qt::Horizontal 40 20 movie 0 0 0 35 Qt::Horizontal 40 20 Qt::Vertical 20 70 rosterListView QListView
rosterListView.h
searchLineEdit QLineEdit
searchLineEdit.h
signInStatusLabel QLabel
signInStatusLabel.h
qxmpp-0.7.6/examples/GuiClient/xmlConsoleDialog.ui0000644000175000007640000000643412116723562022130 0ustar sharkyjerryweb xmlConsoleDialog 0 0 569 349 Dialog :/icons/resource/icon.png:/icons/resource/icon.png 6 TextLabel Enable true Qt::Horizontal 40 20 Clear 0 0 Qt::Horizontal QDialogButtonBox::Cancel buttonBox accepted() xmlConsoleDialog accept() 389 289 157 274 buttonBox rejected() xmlConsoleDialog reject() 389 289 286 274 pushButton_clear clicked() textBrowser clear() 257 283 178 202 qxmpp-0.7.6/examples/GuiClient/statusWidget.cpp0000644000175000007640000001123112116723562021510 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "statusWidget.h" #include #include #include statusWidget::statusWidget(QWidget* parent) : QWidget(parent) { bool check; Q_UNUSED(check); setupUi(this); QMenu* menu = new QMenu(this); menu->addAction(actionAvailable); menu->addAction(actionBusy); menu->addAction(actionAway); // menu->addAction(actionInvisible); menu->addSeparator(); menu->addAction(actionSign_out); toolButton_userName->setMenu(menu); check = connect(statusTextWidgetObject, SIGNAL(statusTextChanged(QString)), SIGNAL(statusTextChanged(QString))); Q_ASSERT(check); check = connect(actionAvailable, SIGNAL(triggered()), SLOT(presenceMenuTriggered())); Q_ASSERT(check); check = connect(actionBusy, SIGNAL(triggered()), SLOT(presenceMenuTriggered())); Q_ASSERT(check); check = connect(actionAway, SIGNAL(triggered()), SLOT(presenceMenuTriggered())); Q_ASSERT(check); // check = connect(actionInvisible, SIGNAL(triggered()), SLOT(presenceMenuTriggered())); // Q_ASSERT(check); check = connect(actionSign_out, SIGNAL(triggered()), SLOT(presenceMenuTriggered())); Q_ASSERT(check); check = connect(pushButton_avatar, SIGNAL(clicked()), SLOT(avatarSelection())); Q_ASSERT(check); } void statusWidget::setStatusText(const QString& statusText) { statusTextWidgetObject->setStatusText(statusText); } void statusWidget::presenceMenuTriggered() { QString icon = "green"; QAction* action = qobject_cast(sender()); if(action == actionAvailable) { emit presenceTypeChanged(QXmppPresence::Available); icon = "green"; } else if(action == actionBusy) { emit presenceStatusTypeChanged(QXmppPresence::DND); icon = "red"; } else if(action == actionAway) { emit presenceStatusTypeChanged(QXmppPresence::Away); icon = "orange"; } #if 0 else if(action == actionInvisible) { emit presenceStatusTypeChanged(QXmppPresence::Invisible); icon = "gray"; } #endif else if(action == actionSign_out) { emit presenceTypeChanged(QXmppPresence::Unavailable); icon = "gray"; } label->setPixmap(QPixmap(":/icons/resource/"+icon+".png")); } void statusWidget::setPresenceAndStatusType(QXmppPresence::Type presenceType, QXmppPresence::AvailableStatusType statusType) { if(presenceType == QXmppPresence::Available) { QString icon = "green"; switch(statusType) { case QXmppPresence::Online: case QXmppPresence::Chat: icon = "green"; break; case QXmppPresence::Away: case QXmppPresence::XA: icon = "orange"; break; case QXmppPresence::DND: icon = "red"; break; case QXmppPresence::Invisible: icon = "gray"; break; } label->setPixmap(QPixmap(":/icons/resource/"+icon+".png")); } else if(presenceType == QXmppPresence::Unavailable) { label->setPixmap(QPixmap(":/icons/resource/gray.png")); } } void statusWidget::avatarSelection() { QString fileFilters = QString("Images (*.png *.jpeg *.jpg *.gif *.bmp);;All Files (*.*)"); QString file = QFileDialog::getOpenFileName(this, "Select your avatar", QString(), fileFilters); if(file.isEmpty()) return; QImage image; if(image.load(file)) { QImage scaled = image.scaled(QSize(96, 96), Qt::KeepAspectRatio, Qt::SmoothTransformation); emit avatarChanged(scaled); } else QMessageBox::information(this, "Avatar selection", "Invalid image file"); } void statusWidget::setDisplayName(const QString& name) { toolButton_userName->setText(name); } void statusWidget::setAvatar(const QImage& image) { pushButton_avatar->setIcon(QIcon(QPixmap::fromImage(image))); } qxmpp-0.7.6/examples/GuiClient/accountsCache.h0000644000175000007640000000226612116723562021241 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef ACCOUNTSCACHE_H #define ACCOUNTSCACHE_H #include #include class QStringList; class accountsCache : public QObject { Q_OBJECT public: explicit accountsCache(QObject *parent); QStringList getBareJids(); QString getPassword(const QString& bareJid); void addAccount(const QString& bareJid, const QString& passwd); public: void loadFromFile(); private: void saveToFile(); QDomDocument m_accountsDocument; }; #endif // ACCOUNTSCACHE_H qxmpp-0.7.6/examples/GuiClient/chatMsgGraphicsItem.h0000644000175000007640000000401512116723562022356 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef CHATMSGGRAPHICSITEM_H #define CHATMSGGRAPHICSITEM_H #include class chatMsgGraphicsItem : public QGraphicsPathItem { public: enum Alignment { LEFT = 0, RIGHT }; chatMsgGraphicsItem(QGraphicsItem * parent = 0); void setText(const QString& text); void setName(const QString& name); QString getName() const; QString getText() const; void setMaxWidth(int width); int getMaxWidth() const; void setViewWidth(int viewWidth); void setAlignment(Alignment align); void setBoxStartLength(int length); int getBoxStartLength() const; void setColor(const QColor&); virtual QRectF boundingRect() const; private: void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); QPainterPath createPath(); int getTextWidth() const; void calculateWidth(); QString getTime() const; // max width of bubble including the spike int m_maxWidth; // actual width int m_width; // height of bubble int m_height; int m_spikeWidth; int m_spikeHeight; int m_cornerRadius; int m_textSpacing; int m_boxStartLength; int m_timeStampWidth; QColor m_color; QString m_text; QString m_name; int m_length; Alignment m_alignment; }; #endif // CHATMSGGRAPHICSITEM_H qxmpp-0.7.6/examples/GuiClient/chatGraphicsView.h0000644000175000007640000000217712116723562021732 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef CHATGRAPHICSVIEW_H #define CHATGRAPHICSVIEW_H #include class chatGraphicsScene; class chatGraphicsView : public QGraphicsView { public: chatGraphicsView(QWidget* parent = 0); void setChatGraphicsScene(chatGraphicsScene* scene); void addMessage(const QString& user, const QString& message); private: void resizeEvent(QResizeEvent *event); chatGraphicsScene* m_scene; }; #endif // CHATGRAPHICSVIEW_H qxmpp-0.7.6/examples/GuiClient/statusAvatarWidget.cpp0000644000175000007640000000323312116723562022652 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "statusAvatarWidget.h" #include statusAvatarWidget::statusAvatarWidget(QWidget* parent) : QPushButton(parent) { } void statusAvatarWidget::paintEvent(QPaintEvent* event) { Q_UNUSED(event); QPainter painter(this); QRect r = rect(); QPixmap pixmap = icon().pixmap(sizeHint(), QIcon::Normal, QIcon::On); if(pixmap.isNull()) pixmap = QPixmap(":/icons/resource/avatar.png"); QRect pixRect(0, 0, 32, 32); pixRect.moveCenter(r.center()); painter.drawPixmap(pixRect, pixmap); if(underMouse() && !isDown()) { painter.drawRect(pixRect.adjusted(0, 0, -1, -1)); QColor col(Qt::white); col.setAlpha(80); painter.fillRect(pixRect.adjusted(0, 0, -1, -1), col); } if(isDown()) { QColor col(Qt::white); col.setAlpha(50); painter.drawRect(pixRect.adjusted(1, 1, -2, -2)); } } QSize statusAvatarWidget::sizeHint() const { return QSize(32, 32); } qxmpp-0.7.6/examples/GuiClient/rosterItem.cpp0000644000175000007640000001336612116723562021171 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "rosterItem.h" #include rosterItem::rosterItem(const QString& bareJid) { setData(bareJid, rosterItem::BareJid); setData("Offline", rosterItem::StatusText); setAvatar(QImage(":/icons/resource/avatar.png")); setIcon(QIcon(":/icons/resource/gray.png")); } void rosterItem::setName(const QString& name) { setText(name); } QString rosterItem::getName() { return text(); } void rosterItem::setPresence(const QXmppPresence &presence) { // determine status text QString statusText = presence.statusText(); if (statusText.isEmpty()) { if(presence.type() == QXmppPresence::Available) statusText = "Available"; else if(presence.type() == QXmppPresence::Unavailable) statusText = "Offline"; } // store data setData(statusText, rosterItem::StatusText); setData(static_cast(presence.type()), PresenceType); setData(static_cast(presence.availableStatusType()), StatusType); // update icon QString icon; if (presence.type() == QXmppPresence::Available) { switch (presence.availableStatusType()) { case QXmppPresence::Online: case QXmppPresence::Chat: icon = "green"; break; case QXmppPresence::Away: case QXmppPresence::XA: icon = "orange"; break; case QXmppPresence::DND: icon = "red"; break; case QXmppPresence::Invisible: icon = "gray"; break; } } else { icon = "gray"; } if (!icon.isEmpty()) setIcon(QIcon(":/icons/resource/"+icon+".png")); } void rosterItem::setAvatar(const QImage& image) { setData(QVariant(image), rosterItem::Avatar); } QImage rosterItem::getAvatar() { return qvariant_cast(data(rosterItem::Avatar)); } rosterItemDelegate::rosterItemDelegate() { } QSize rosterItemDelegate::sizeHint(const QStyleOptionViewItem& option, const QModelIndex & index) const { Q_UNUSED(option); Q_UNUSED(index); return QSize(44, 36); } void rosterItemDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const { painter->save(); painter->setRenderHint(QPainter::TextAntialiasing); QVariant value = index.data(Qt::DecorationRole); QColor selectedBg(60, 140, 222); QColor alternateBg(239, 245, 254); QColor selectedText(Qt::white); QColor nameTextColor(Qt::black); QColor statusTextColor(Qt::darkGray); QPixmap pixmap; if(value.type() == QVariant::Icon) { QIcon icon = qvariant_cast(value); pixmap = icon.pixmap(QSize(16, 16), QIcon::Normal, QIcon::On); } QPen penDivision; // if(index.row() % 2) // painter->fillRect(option.rect, alternateBg); if (option.state & QStyle::State_Selected) { painter->fillRect(option.rect, selectedBg); // painter->fillRect(option.rect, option.palette.highlight()); // penDivision.setColor(option.palette.highlight().color()); penDivision.setColor(selectedBg); nameTextColor = selectedText; statusTextColor = selectedText; } else { penDivision.setColor(QColor(244, 244, 244)); } QRect rect = option.rect; rect.setWidth(pixmap.width()); rect.setHeight(pixmap.height()); rect.moveTop(rect.y() + (option.rect.height() - pixmap.height())/2); rect.moveLeft(rect.left() + 2); painter->drawPixmap(rect, pixmap); rect = option.rect; rect.setLeft(rect.x() + pixmap.width() + 8); rect.moveTop(rect.y() + 3); QFont font; painter->setFont(font); painter->setPen(nameTextColor); if(!index.data(Qt::DisplayRole).toString().isEmpty()) painter->drawText(rect, index.data(Qt::DisplayRole).toString()); else painter->drawText(rect, index.data(rosterItem::BareJid).toString()); painter->setPen(statusTextColor); rect.setTop(rect.y() + rect.height()/2); rect.moveTop(rect.y() - 3); QString statusText = index.data(rosterItem::StatusText).toString(); QFontMetrics fontMetrics(font); statusText = fontMetrics.elidedText(statusText, Qt::ElideRight, rect.width() - 34); painter->drawText(rect, statusText); penDivision.setWidth(0); painter->setPen(penDivision); rect = option.rect; QPoint left = rect.bottomLeft(); left.setX(left.x() + 4); QPoint right = rect.bottomRight(); right.setX(right.x() - 4); painter->drawLine(left, right); QImage image; value = index.data(rosterItem::Avatar); if(value.type() == QVariant::Image) { image = qvariant_cast(value); } pixmap = QPixmap(":/icons/resource/avatar.png"); rect = option.rect; rect.setWidth(pixmap.width()); rect.setHeight(pixmap.height()); rect.moveTop(rect.y() + (option.rect.height() - pixmap.height())/2); rect.moveLeft(option.rect.x() + option.rect.width() - pixmap.width() - 2); // if(image.isNull()) // painter->drawPixmap(rect, pixmap); // else painter->drawImage(rect, image); painter->restore(); } qxmpp-0.7.6/examples/GuiClient/chatGraphicsView.cpp0000644000175000007640000000347112116723562022263 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "chatGraphicsView.h" #include "chatGraphicsScene.h" #include chatGraphicsView::chatGraphicsView(QWidget* parent) : QGraphicsView(parent) { setAlignment(Qt::AlignHCenter|Qt::AlignTop); setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setFrameStyle(QFrame::NoFrame); } void chatGraphicsView::setChatGraphicsScene(chatGraphicsScene* scene) { m_scene = scene; setScene(m_scene); } void chatGraphicsView::addMessage(const QString& user, const QString& message) { if(m_scene) m_scene->addMessage(user, message); QRectF rect = scene()->sceneRect(); rect.adjust(-4, -4, 4, 4); setSceneRect(rect); rect = sceneRect(); rect.setTop(sceneRect().height() - 20); rect.setWidth(20); ensureVisible(rect, 50, 50); } void chatGraphicsView::resizeEvent(QResizeEvent *event) { // pass this to scene m_scene->setWidthResize(event->size().width(), event->oldSize().width()); QGraphicsView::resizeEvent(event); QRectF rect = scene()->sceneRect(); rect.adjust(-4, -4, 4, 4); setSceneRect(rect); } qxmpp-0.7.6/examples/GuiClient/resource/0000755000175000007640000000000012116723562020146 5ustar sharkyjerrywebqxmpp-0.7.6/examples/GuiClient/resource/red.png0000644000175000007640000000054712116723562021434 0ustar sharkyjerrywebPNG  IHDR 2ϽsRGBbKGD pHYs  tIME$J'tEXtCommentCreated with GIMPWIDATӅ= @]D+%X%:1g(E%Bf烁f7 a="`&e0O2(1M%I̬l5ÈhS?T3rZN q? (h֙Z#hGw(UE]TJ]qZckSÔ&5@sh<L:s"IENDB`qxmpp-0.7.6/examples/GuiClient/resource/ajax-loader.gif0000644000175000007640000000621012116723562023023 0ustar sharkyjerrywebGIF89a Ƅ666VVV似! NETSCAPE2.0!Created with ajaxload.info! , IiabK$F RAT,2S*05//mp!z0;$0C.I*!HC(A@o!39T5\8) `dwxG=Y gwHbvA=0 V\\; ;H0t%HsrY'e$"\#E1CnĎ~J,,AaUw^4I%Pu Q33{0i1TGgwy}%%'R  = 3G%p0 JRo5Ȇ0IĦmykxT_}(^yKs>i_%n=q4e-M¤D! , I)*')Ed]PR A:!zrbw %6"G(d$["JFhaQP`p%†/BFP\cU ?TtW/pG&OtDa_sylD'M q tc b2DM : d% 4%s) uE3 YUtږD$JiM^%o/rvl9'L;99% i9 C "B BDs ^Xf}$P {L?P O4 E咛V$dJ#)pV$! , IiRͧ"Jd] RZN*P*;$P{*N\EА!1UO2D _r6Ib H8 B; "'ZtbK#C'Kw}?Kiz6:xKAC&}9tz\ \D5;x Qd( KW  MBIڈM=ˤs⸽8DaJ`@LG! , IiRͧ"Jd] RZN*P*;$P{*N\EА!1UO2D _r6Ib H8 B; "'ZtbK#C'KGziz68}z~%XK9:0}% tz\Blc LbQ   lj ųKň x(țPX ,ւ|/"! , IiRͧ"Jd] RZN*P*;$P{*N\EА!1UO2D _r6Ib H8 B; "'ZtbK#C'KGziz68}z~%:A/ C} u\ h}b D]=  V)  ڊ9CDK Ku *00StD! , IiRͧ"Jd] RZN*P*;$P{*N\EА!1UO2D _r6Ib H8 B; "'ZtbK#C'KGz z5 C: A/ C}u\ Eh}b6[=Wx&)I9Ԭ@oCT?Kd]B76ЫD! , IiRͧ"Jd] RZN*P*;$P{*N\EА!1UO2D _r6I ƀH03hոaj U {CIkmbK#cK8 {a8nV:/q:M Cu~Ehk6 [_6P.]6!)V! , IiRͧ"Jd]U RZN JjN2sK6 dI)  LHWG 6 KX젱.6d~zhuur/6 X5I;_t O#E {O9V94;VC/ 6Ø~*'MonbX:~]+V*mK_OrKN@.d~qЦDB֋ 5D;qxmpp-0.7.6/examples/GuiClient/resource/icon.xcf0000644000175000007640000000462412116723562021606 0ustar sharkyjerrywebgimp xcf file BB&G gimp-commentCreated with GIMPgimp-image-grid(style solid) (fgcolor (color-rgba 0.000000 0.000000 0.000000 1.000000)) (bgcolor (color-rgba 1.000000 1.000000 1.000000 1.000000)) (xspacing 10.000000) (yspacing 10.000000) (spacing-unit inches) (xoffset 0.000000) (yoffset 0.000000) (offset-unit inches) R  New Layer#4b     j ~ 333ZZ!ETK82  New Layer     ~  &&&RR&&&&RR&&  New Layer#2     %T h x::cMMMM  New Layer#5     #  :::MMMM  New Layer#1       :$$$:$$$$:MMMM Selection Mask  &  : JYYYYYYYYqxmpp-0.7.6/examples/GuiClient/resource/settingsButton.png0000644000175000007640000000306112116723562023710 0ustar sharkyjerrywebPNG  IHDR[HtEXtSoftwareAdobe ImageReadyqe<fiTXtXML:com.adobe.xmp UGaIDATxb?e,$ULXʙXb{oJeY@D?־{22gZW?|tp,m n<IQ| T>0nGQ+ήqZTaF03e+..CqW42W0F:v쥍b?(0}bbdx ?) +( F #}-GěS`6VFF`b x),,s37N^켂8?`ç/em[)M JR<_&&v`1 Ys{K*R>f梍Wm<x>~G__?l}qT5%L8ISm68d_߀~Z ״tjoX}-$ .lJo?srbQ9#Mj@ 3vSFPFg 'E P0R;&.d~J+\icSK @Aq?.uMQe]ʤIENDB`qxmpp-0.7.6/examples/GuiClient/resource/addButton.png0000644000175000007640000000050712116723562022602 0ustar sharkyjerrywebPNG  IHDRr ߔsRGBbKGD pHYs  tIME . ^iTXtCommentCreated with GIMPd.eIDATHc``FR58m```P{`]?)Yp29e````"3T1-c!;6-,E'c( x  ͇L$FRBw ag``A 'AJ-:>"@NY`P ݍj7nIENDB`qxmpp-0.7.6/examples/GuiClient/resource/searchIcon.png0000644000175000007640000000133312116723562022732 0ustar sharkyjerrywebPNG  IHDRVΎWsRGBbKGD pHYs  tIME 3:{&tEXtCommentCreated with GIMPW6IDAT8˭KSq?;S7<嶓njȄ"n?nq7ݔd҅g3M63gmGC(/>ZV?Gl-eIOCO[1Yv̮319-zw8ͳOQq~0@zS #'235Nz%NLL!I".  @PCH>6V-L,K֊/Ht1OGŽ#OPAAq,-f*pbhiݠہ Y>Pل88mutHqBaӉ " P)Z(sfB wD ԝ5YAF2KNZD `PW@ F]Y28wQv_EI,o_?ߋy?u>~K-U;( i+ ]0A|y "7 -D^f^V5g@\qJok=Tw}0W16>ǣ b$[Í-{?I_ݦZIENDB`qxmpp-0.7.6/examples/GuiClient/resource/orange.png0000644000175000007640000000053112116723562022126 0ustar sharkyjerrywebPNG  IHDR 2ϽsRGBbKGD pHYs  tIME0*tEXtCommentCreated with GIMPWIDATӅ=JabؤHm<{rT9B`c%Ft?6၁g`,UVbLe SNh?خy8>kyu{8{ 햷 ?o9cf7E?;TYeH% ̢YG]D'Z8HIENDB`qxmpp-0.7.6/examples/GuiClient/resource/downArrow.png0000644000175000007640000000031512116723562022635 0ustar sharkyjerrywebPNG  IHDRB%}sRGBbKGD pHYs  tIME 7*tEXtCommentCreated with GIMPW(IDATuA 0 Lgw$YlAM/)DIENDB`qxmpp-0.7.6/examples/GuiClient/resource/icon.png0000644000175000007640000000102512116723562021602 0ustar sharkyjerrywebPNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<IDATxbt-@ `bـ8 -X 9> ^ˀfNF Z  r pO>6@t >g"P,Su9~Nu)Cߪ YĹ+ n :b f <j!Btպ ')!/ k ~|~r{ x;7ۇg0ͷ j7܀^L~c ˀAmw2,}/ o I-ϯrym`bamifXz \P" 4PFL^XBE+Cϊ+ kp%e8 >V "Qw63+bd&d<R̈́ UsKIENDB`qxmpp-0.7.6/examples/GuiClient/resource/green.png0000644000175000007640000000057612116723562021764 0ustar sharkyjerrywebPNG  IHDR 2ϽsRGBbKGD pHYs  tIME/r6tEXtCommentCreated with GIMPWIDATӍбNP?ҤV+i`Yn,12'S$ -~l3×O1YHYRAR܅dUs3;y}g,$Xy_2责ZWotϒ\\krAYt gs#}^f'{+Xg4 0DZߣ,K^{d}R;3cc .+y ġZa(H>{v ?gXkl?A.l+Qq`#_og87h9ã fOKӬz~"mnǎ1֚ȡ!xcH|\?q D!jв ƁI8 iwG ,2[PΙn&>P(R 4癉d~zyY%p/d( c' %k;݉@ltj8@8LC7 BTUXBPL$-@5qF}fq}X`;K^f))mkƐ)(R3Sfxin;gWr98uܵ!x}Wj½vx;ۡ!rSbAc=lMؕꪄgc`uZ8#iGZ4] -ʲ@$ ]@ 0+&1F'T;:  񰇔z C.p)R ~M 4pM t}@m,5^) cxm&4څ||έko⣔ *%yk{lq-Y dBPW3IENDB`qxmpp-0.7.6/examples/GuiClient/resource/gray.png0000644000175000007640000000052512116723562021620 0ustar sharkyjerrywebPNG  IHDR 2ϽsRGBbKGD pHYs  tIME-tEXtCommentCreated with GIMPWIDATӍM @ Fxzz"x^] ]aH7߃@ /$ 0 'z#Ћ 1 \yO+"SbI,C. ؋ &ML#)抹K8av2; C?7CKڲVU8_VU~JTtpG>Pq~gQ}Yk) 4 LlhamɄL{X7@Y72R2]NX^/.\}Od6%m6ٌA8-wip-([`c |5=X.n6\Oj6lt=^5 (zCX$uGgURV444444444444444444444OUڝB2IENDB`qxmpp-0.7.6/examples/GuiClient/searchLineEdit.h0000644000175000007640000000423012116723562021352 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef SEARCHLINEEDIT_H #define SEARCHLINEEDIT_H #include #include #include class searchClearButton : public QPushButton { Q_OBJECT public: searchClearButton(QWidget *w) : QPushButton(w) { setMinimumSize(24, 24); setFixedSize(24, 24); setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); } void paintEvent(QPaintEvent *event) { Q_UNUSED(event); QPainter painter(this); int height = parentWidget()->geometry().height(); int width = height; //parentWidget()->geometry().width(); painter.setRenderHint(QPainter::Antialiasing, true); painter.setPen(Qt::white); float penwidth = isDown() ? 1.2 : underMouse() ? 1.6 : 1.2; painter.setBrush(Qt::red); //painter.drawEllipse(4, 4, width - 8, height - 8); QPen pen; pen.setWidthF(penwidth); pen.setColor(Qt::black); painter.setPen(pen); int border = 7; painter.drawLine(border, border, width - border, height - border); painter.drawLine(border, height - border, width - border, border); } }; class searchLineEdit : public QLineEdit { public: searchLineEdit(QWidget* parent = 0); protected: virtual void paintEvent(QPaintEvent* e); virtual void resizeEvent(QResizeEvent*); virtual void moveEvent(QMoveEvent*); private: QPushButton *clearButton; }; #endif // SEARCHLINEEDIT_H qxmpp-0.7.6/examples/GuiClient/aboutDialog.cpp0000644000175000007640000000270612116723562021262 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "aboutDialog.h" #include "ui_aboutDialog.h" #include "QXmppGlobal.h" #include aboutDialog::aboutDialog(QWidget *parent) : QDialog(parent), ui(new Ui::aboutDialog) { ui->setupUi(this); setWindowTitle(QString("About %1").arg(qApp->applicationName())); ui->textEdit->append(QString("Copyright 2009-2011, Manjeet Dahiya\n")); ui->textEdit->append(qApp->applicationName() + " " + qApp->applicationVersion()); ui->textEdit->append(QString("\nBased on:")); ui->textEdit->append(QString("QXmpp %1").arg(QXmppVersion())); ui->textEdit->append(QString("Qt %1 [built-with]").arg(qVersion())); ui->textEdit->append(QString("Qt %1 [running-with]").arg(QT_VERSION_STR)); } aboutDialog::~aboutDialog() { delete ui; } qxmpp-0.7.6/examples/GuiClient/signInStatusLabel.cpp0000644000175000007640000000502512116723562022420 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "signInStatusLabel.h" #include signInStatusLabel::signInStatusLabel(QWidget* parent):QLabel(parent), m_timer(this), m_option(None) { m_timer.setSingleShot(false); bool check = connect(&m_timer, SIGNAL(timeout()), SLOT(timeout())); Q_ASSERT(check); Q_UNUSED(check); } void signInStatusLabel::setCustomText(const QString& text, signInStatusLabel::Option op, int countDown) { m_text = text; m_option = op; m_countDown = countDown; switch(op) { case None: m_timer.stop(); m_postfix = ""; break; case WithProgressEllipsis: // m_timer.start(400); m_postfix = ""; break; case CountDown: m_timer.start(1000); m_postfix = ""; break; default: m_timer.stop(); m_postfix = ""; break; } if(m_option == CountDown) setText(m_text.arg(m_countDown) + m_postfix); else setText(m_text + m_postfix); updateGeometry(); } void signInStatusLabel::timeout() { switch(m_option) { case None: break; case WithProgressEllipsis: if(m_postfix == "") m_postfix = "."; else if(m_postfix == ".") m_postfix = ".."; else if(m_postfix == "..") m_postfix = "..."; else if(m_postfix == "...") m_postfix = ""; break; case CountDown: if(m_countDown == 0) m_timer.stop(); --m_countDown; break; default: break; } if(m_option == CountDown) setText(m_text.arg(m_countDown) + m_postfix); else setText(m_text + m_postfix); updateGeometry(); } //QSize signInStatusLabel::sizeHint() const //{ // QFont font; // QFontMetrics fm(font); // return QSize(fm.width(m_text) + 15, 20); //} qxmpp-0.7.6/examples/GuiClient/capabilitiesCache.h0000644000175000007640000000276712116723562022061 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef CAPABILITIESCACHE_H #define CAPABILITIESCACHE_H #include #include #include class QXmppClient; #include "QXmppDiscoveryIq.h" class capabilitiesCache : public QObject { Q_OBJECT public: capabilitiesCache(QXmppClient* client); bool isCapabilityAvailable(const QString& nodeVer); void requestInfo(const QString& jid, const QString& nodeVer); void loadFromFile(); QStringList getFeatures(const QString& nodeVer); QStringList getIdentities(const QString& nodeVer); signals: private slots: void infoReceived(const QXmppDiscoveryIq&); private: void saveToFile(const QString& nodeVer); QXmppClient* m_client; QMap m_mapCapabilities; QMap m_mapIdNodeVer; }; #endif // CAPABILITIESCACHE_H qxmpp-0.7.6/examples/GuiClient/profileDialog.ui0000644000175000007640000001325012116723562021437 0ustar sharkyjerryweb profileDialog 0 0 309 209 Profile true 6 QFrame::NoFrame true Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop 0 0 297 168 6 0 QLayout::SetFixedSize 0 0 96 96 96 96 :/icons/resource/avatar.png true Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop Qt::Vertical 0 0 TextLabel TextLabel TextLabel true Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse Qt::Vertical 0 0 Qt::Horizontal QDialogButtonBox::Close buttonBox accepted() profileDialog accept() 343 215 301 191 buttonBox rejected() profileDialog close() 237 216 230 172 qxmpp-0.7.6/examples/GuiClient/statusToolButton.h0000644000175000007640000000172612116723562022053 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef STATUSTOOLBUTTON_H #define STATUSTOOLBUTTON_H #include class statusToolButton : public QToolButton { public: statusToolButton(QWidget* parent = 0); void paintEvent(QPaintEvent* event); QSize sizeHint() const; }; #endif // STATUSTOOLBUTTON_H qxmpp-0.7.6/examples/GuiClient/statusTextWidget.h0000644000175000007640000000645412116723562022035 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef STATUSTEXTWIDGET_H #define STATUSTEXTWIDGET_H #include #include #include #include #include #include #include class statusLineEditButton : public QPushButton { Q_OBJECT public: statusLineEditButton(QWidget* parent = 0): QPushButton(parent) { setCursor(Qt::PointingHandCursor); } void paintEvent(QPaintEvent* event); QSize sizeHint() const { return QSize(14, 14); } }; class statusLineEdit : public QLineEdit { public: statusLineEdit(QWidget* parent = 0) : QLineEdit(parent) { setAttribute(Qt::WA_Hover, true); setText("Available"); setMinimumSize(QSize(20, 18)); } void focusInEvent(QFocusEvent* event); void mousePressEvent(QMouseEvent* event); void paintEvent(QPaintEvent* event) { if(hasFocus()) { QLineEdit::paintEvent(event); } else { QPainter p(this); QRect r = rect(); QPalette pal = palette(); QStyleOptionFrameV2 panel; initStyleOption(&panel); r = style()->subElementRect(QStyle::SE_LineEditContents, &panel, this); r.adjust(-1, -1, 0, 0); r.setLeft(r.left() + 4); p.setPen(Qt::darkGray); p.drawText(r, Qt::AlignVCenter, text()); } if(underMouse() && !hasFocus()) { QPainter p(this); QRect r = rect(); QPalette pal = palette(); QStyleOptionFrameV2 panel; initStyleOption(&panel); r = style()->subElementRect(QStyle::SE_LineEditContents, &panel, this); r.adjust(-1, -1, 0, 0); p.setPen(Qt::gray); p.drawRect(r); r.setLeft(r.left() + 4); p.setPen(Qt::darkGray); p.drawText(r, Qt::AlignVCenter, text()); } } QSize sizeHint() const; }; class statusTextWidget : public QWidget { Q_OBJECT public: statusTextWidget(QWidget* parent = 0); void setStatusText(const QString& statusText); public slots: void showMenu(); void textChanged(); private slots: void statusTextChanged_helper(); void statusTextChanged_menuClick(); void clearStatusTextHistory(); signals: void statusTextChanged(const QString&); private: void addStatusTextToList(const QString& status); statusLineEdit* m_statusLineEdit; statusLineEditButton* m_statusButton; QList m_statusTextActionList; QAction m_clearStatusTextHistory; }; #endif // STATUSTEXTWIDGET_H qxmpp-0.7.6/examples/GuiClient/chatGraphicsScene.h0000644000175000007640000000242412116723562022050 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef CHATGRAPHICSSCENE_H #define CHATGRAPHICSSCENE_H #include #include class chatMsgGraphicsItem; class chatGraphicsScene : public QGraphicsScene { public: chatGraphicsScene(QObject* parent = 0); void addMessage(const QString& user, const QString& message); void setWidthResize(int newWidth, int oldWidth); void verticalReposition(); void setBoxStartLength(int length); private: int m_verticalPosForNewMessage; int m_verticalSpacing; int m_boxStartLength; QList m_items; }; #endif // CHATGRAPHICSSCENE_H qxmpp-0.7.6/examples/GuiClient/chatDialog.h0000644000175000007640000000343412116723562020533 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef CHATDIALOG_H #define CHATDIALOG_H #include #include namespace Ui { class chatDialogClass; } class chatGraphicsView; class chatGraphicsScene; class QXmppClient; class QPushButton; class chatDialog : public QDialog { Q_OBJECT public: chatDialog(QWidget *parent = 0); void show(); QString getBareJid() const; QString getDisplayName() const; void setBareJid(const QString&); void setDisplayName(const QString&); void setQXmppClient(QXmppClient* client); void messageReceived(const QString& msg); private slots: void sendMessage(); protected: void keyPressEvent(QKeyEvent*); void paintEvent(QPaintEvent* event); virtual void resizeEvent(QResizeEvent*); virtual void moveEvent(QMoveEvent*); private: void updateSendButtonGeomerty(); Ui::chatDialogClass *ui; chatGraphicsView* m_view; chatGraphicsScene* m_scene; QPushButton* m_pushButtonSend; // holds a reference to the the connected client QXmppClient* m_client; QString m_bareJid; QString m_displayName; }; #endif // CHATDIALOG_H qxmpp-0.7.6/examples/GuiClient/rosterItemModel.cpp0000644000175000007640000000502012116723562022136 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "rosterItemModel.h" rosterItemModel::rosterItemModel(QObject* parent) : QStandardItemModel(parent) { // addRosterItemIfDontExist("jkhjkhkhkhk"); // addRosterItemIfDontExist("uuuu"); // addRosterItemIfDontExist("kkkkkkk"); // addRosterItemIfDontExist("jjjjjjjj"); } rosterItem* rosterItemModel::getRosterItemFromBareJid(const QString& bareJid) { if(m_jidRosterItemMap.contains(bareJid)) return m_jidRosterItemMap[bareJid]; else return 0; } rosterItem* rosterItemModel::getOrCreateItem(const QString& bareJid) { if(m_jidRosterItemMap.contains(bareJid)) { return m_jidRosterItemMap[bareJid]; } else { rosterItem* item = new rosterItem(bareJid); m_jidRosterItemMap[bareJid] = item; appendRow(item); return item; } } void rosterItemModel::updatePresence(const QString& bareJid, const QMap& presences) { rosterItem *item = getOrCreateItem(bareJid); if (!presences.isEmpty()) item->setPresence(*presences.begin()); else item->setPresence(QXmppPresence(QXmppPresence::Unavailable)); } void rosterItemModel::updateRosterEntry(const QString& bareJid, const QXmppRosterIq::Item& rosterEntry) { getOrCreateItem(bareJid)->setName(rosterEntry.name()); } void rosterItemModel::updateAvatar(const QString& bareJid, const QImage& image) { getOrCreateItem(bareJid)->setAvatar(image); } void rosterItemModel::updateName(const QString& bareJid, const QString& name) { if (!name.isEmpty()) getOrCreateItem(bareJid)->setName(name); } void rosterItemModel::clear() { QStandardItemModel::clear(); m_jidRosterItemMap.clear(); } void rosterItemModel::removeRosterEntry(const QString& bareJid) { rosterItem* item = getRosterItemFromBareJid(bareJid); if(item) { removeRow(item->row()); } } qxmpp-0.7.6/examples/GuiClient/GuiClient.pro0000644000175000007640000000251212116723562020724 0ustar sharkyjerrywebinclude(../examples.pri) TARGET = GuiClient TEMPLATE = app SOURCES += main.cpp \ chatMsgGraphicsItem.cpp \ chatGraphicsScene.cpp \ chatGraphicsView.cpp \ chatDialog.cpp \ mainDialog.cpp \ rosterItemModel.cpp \ rosterItem.cpp \ rosterItemSortFilterProxyModel.cpp \ utils.cpp \ rosterListView.cpp \ searchLineEdit.cpp \ statusWidget.cpp \ signInStatusLabel.cpp \ statusAvatarWidget.cpp \ statusTextWidget.cpp \ statusToolButton.cpp \ vCardCache.cpp \ profileDialog.cpp \ capabilitiesCache.cpp \ accountsCache.cpp \ xmlConsoleDialog.cpp \ aboutDialog.cpp HEADERS += chatMsgGraphicsItem.h \ chatGraphicsScene.h \ chatGraphicsView.h \ chatDialog.h \ mainDialog.h \ rosterItemModel.h \ rosterItem.h \ rosterItemSortFilterProxyModel.h \ utils.h \ rosterListView.h \ searchLineEdit.h \ statusWidget.h \ signInStatusLabel.h \ statusAvatarWidget.h \ statusTextWidget.h \ statusToolButton.h \ vCardCache.h \ profileDialog.h \ capabilitiesCache.h \ accountsCache.h \ xmlConsoleDialog.h \ aboutDialog.h FORMS += mainDialog.ui \ chatDialog.ui \ statusWidget.ui \ profileDialog.ui \ xmlConsoleDialog.ui \ aboutDialog.ui QT += network \ xml RESOURCES += resources.qrc qxmpp-0.7.6/examples/GuiClient/aboutDialog.h0000644000175000007640000000174712116723562020733 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef ABOUTDIALOG_H #define ABOUTDIALOG_H #include namespace Ui { class aboutDialog; } class aboutDialog : public QDialog { Q_OBJECT public: explicit aboutDialog(QWidget *parent = 0); ~aboutDialog(); private: Ui::aboutDialog *ui; }; #endif // ABOUTDIALOG_H qxmpp-0.7.6/examples/GuiClient/rosterItemSortFilterProxyModel.cpp0000644000175000007640000000702712116723562025227 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "rosterItemSortFilterProxyModel.h" #include "rosterItem.h" #include "utils.h" rosterItemSortFilterProxyModel::rosterItemSortFilterProxyModel(QObject* parent): QSortFilterProxyModel(parent), m_showOfflineContacts(true), m_sortByName(false) { setDynamicSortFilter(true); setFilterRole(Qt::DisplayRole); setFilterCaseSensitivity(Qt::CaseInsensitive); } bool rosterItemSortFilterProxyModel::lessThan(const QModelIndex &left, const QModelIndex &right) const { if(m_sortByName) { int compare = left.data().toString().compare(right.data().toString(), Qt::CaseInsensitive); if(compare < 0) return true; else return false; } else { int leftPresenceType = sourceModel()->data(left, rosterItem::PresenceType).toInt(); int leftStatusType = sourceModel()->data(left, rosterItem::StatusType).toInt(); int rightPresenceType = sourceModel()->data(right, rosterItem::PresenceType).toInt(); int rightStatusType = sourceModel()->data(right, rosterItem::StatusType).toInt(); if(leftPresenceType == rightPresenceType) { if(leftStatusType == rightStatusType) { // based on display text int compare = left.data().toString().compare(right.data().toString(), Qt::CaseInsensitive); if(compare < 0) return true; else return false; } else { return comparisonWeightsPresenceStatusType(static_cast(leftStatusType)) < comparisonWeightsPresenceStatusType(static_cast(rightStatusType)); } } else return comparisonWeightsPresenceType(static_cast(leftPresenceType)) < comparisonWeightsPresenceType(static_cast(rightPresenceType)); } } bool rosterItemSortFilterProxyModel::filterAcceptsRow(int source_row, const QModelIndex& source_parent) const { if(!filterRegExp().isEmpty()) return QSortFilterProxyModel::filterAcceptsRow(source_row, source_parent); if(m_showOfflineContacts) return true; QModelIndex index = sourceModel()->index(source_row, 0, source_parent); int presenceType = sourceModel()->data(index, rosterItem::PresenceType).toInt(); if(presenceType == QXmppPresence::Available) return true; else return false; } void rosterItemSortFilterProxyModel::setShowOfflineContacts(bool showOfflineContacts) { m_showOfflineContacts = showOfflineContacts; invalidateFilter(); } void rosterItemSortFilterProxyModel::sortByName(bool sortByName) { m_sortByName = sortByName; invalidate(); } qxmpp-0.7.6/examples/GuiClient/rosterListView.cpp0000644000175000007640000000645012116723562022035 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "rosterListView.h" #include "rosterItem.h" #include #include #include rosterListView::rosterListView(QWidget* parent) : QListView(parent) , m_chat("Chat", this) , m_profile("View Profile", this) , m_removeContact("Remove", this) { bool check; Q_UNUSED(check); check = connect(this, SIGNAL(pressed(QModelIndex)), this, SLOT(mousePressed(QModelIndex))); Q_ASSERT(check); check = connect(this, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(doubleClicked(QModelIndex))); Q_ASSERT(check); check = connect(this, SIGNAL(clicked(QModelIndex)), this, SLOT(clicked(QModelIndex))); Q_ASSERT(check); check = connect(&m_chat, SIGNAL(triggered()), this, SLOT(showChatDialog_helper())); Q_ASSERT(check); check = connect(&m_profile, SIGNAL(triggered()), this, SLOT(showProfile_helper())); Q_ASSERT(check); check = connect(&m_removeContact, SIGNAL(triggered()), this, SLOT(removeContact_helper())); Q_ASSERT(check); } bool rosterListView::event(QEvent* e) { return QListView::event(e); } void rosterListView::mousePressed(const QModelIndex& index) { if(QApplication::mouseButtons() == Qt::RightButton) { QString bareJid = index.data().toString(); QMenu menu(this); menu.addAction(&m_chat); menu.setDefaultAction(&m_chat); menu.addAction(&m_profile); menu.addAction(&m_removeContact); menu.exec(QCursor::pos()); } } void rosterListView::doubleClicked(const QModelIndex& index) { Q_UNUSED(index); m_chat.trigger(); } void rosterListView::clicked(const QModelIndex& index) { Q_UNUSED(index); } QString rosterListView::selectedBareJid() { if(selectedIndexes().size() > 0) return selectedIndexes().at(0).data(rosterItem::BareJid).toString(); else return ""; } void rosterListView::showChatDialog_helper() { QString bareJid = selectedBareJid(); if(!bareJid.isEmpty()) emit showChatDialog(bareJid); } void rosterListView::showProfile_helper() { QString bareJid = selectedBareJid(); if(!bareJid.isEmpty()) emit showProfile(bareJid); } void rosterListView::keyPressEvent(QKeyEvent* event1) { if(event1->key() == Qt::Key_Return) { showChatDialog_helper(); } QListView::keyPressEvent(event1); } void rosterListView::removeContact_helper() { QString bareJid = selectedBareJid(); if(!bareJid.isEmpty()) emit removeContact(bareJid); } qxmpp-0.7.6/examples/GuiClient/chatDialog.ui0000644000175000007640000000423112116723562020715 0ustar sharkyjerryweb chatDialogClass 0 0 445 291 445 0 Dialog alternate-background-color: rgb(255, 255, 255); 0 6 0 0 0 background-color: rgb(255, 255, 255); 0 50 Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop 0 0 background-color: rgb(255, 255, 255); qxmpp-0.7.6/examples/GuiClient/aboutDialog.ui0000644000175000007640000000305112116723562021107 0ustar sharkyjerryweb aboutDialog 0 0 309 218 Dialog true Qt::Horizontal QDialogButtonBox::Cancel|QDialogButtonBox::Ok buttonBox accepted() aboutDialog accept() 248 254 157 274 buttonBox rejected() aboutDialog reject() 316 260 286 274 qxmpp-0.7.6/examples/GuiClient/vCardCache.h0000644000175000007640000000275212116723562020461 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef VCARDCACHE_H #define VCARDCACHE_H #include #include #include "QXmppVCardIq.h" class QImage; class QXmppClient; class vCardCache : public QObject { Q_OBJECT public: vCardCache(QXmppClient* client); bool isVCardAvailable(const QString& bareJid) const; void requestVCard(const QString& bareJid); QXmppVCardIq& getVCard(const QString& bareJid); QImage getAvatar(const QString& bareJid) const; void loadFromFile(); QByteArray getPhotoHash(const QString& bareJid) const; signals: void vCardReadyToUse(const QString& bareJid); public slots: void vCardReceived(const QXmppVCardIq&); private: void saveToFile(const QString& bareJid); QXmppClient* m_client; QMap m_mapBareJidVcard; }; #endif // VCARDCACHE_H qxmpp-0.7.6/examples/GuiClient/xmlConsoleDialog.cpp0000644000175000007640000000410612116723562022267 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "xmlConsoleDialog.h" #include "ui_xmlConsoleDialog.h" #include #include static QString s_colorHexSent("#02aa3f"); static QString s_colorHexReceived("#aa0000"); xmlConsoleDialog::xmlConsoleDialog(QWidget *parent) : QDialog(parent, Qt::Window), ui(new Ui::xmlConsoleDialog) { ui->setupUi(this); setWindowTitle("Debugging Console"); ui->label_legend->setText( QString("

Sent | Received

").arg(s_colorHexSent).arg(s_colorHexReceived)); } xmlConsoleDialog::~xmlConsoleDialog() { delete ui; } void xmlConsoleDialog::message(QXmppLogger::MessageType type, const QString& text) { if(!ui->checkBox_enable->isChecked()) return; QColor color; switch(type) { case QXmppLogger::ReceivedMessage: color = QColor(s_colorHexReceived); break; case QXmppLogger::SentMessage: color = QColor(s_colorHexSent); break; default: return; } QDomDocument doc; // Indent XML string bool isXml = doc.setContent(text); QString formattedText; QTextStream stream(&formattedText); doc.save(stream, 2); ui->textBrowser->setTextColor(color); if(isXml) ui->textBrowser->append(formattedText); else ui->textBrowser->append(text); } qxmpp-0.7.6/examples/GuiClient/chatDialog.cpp0000644000175000007640000000727012116723562021070 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "chatDialog.h" #include "ui_chatDialog.h" #include "chatGraphicsView.h" #include "chatGraphicsScene.h" #include "QXmppClient.h" #include #include chatDialog::chatDialog(QWidget *parent): QDialog(parent, Qt::Window), ui(new Ui::chatDialogClass), m_view(0), m_scene(0), m_pushButtonSend(0), m_client(0) { ui->setupUi(this); m_view = new chatGraphicsView(this); m_scene = new chatGraphicsScene(this); m_view->setChatGraphicsScene(m_scene); m_pushButtonSend = new QPushButton("Send", this); // m_pushButtonSend->setFixedHeight(); // m_pushButtonSend->setFixedWidth(); QRect rect = ui->lineEdit->geometry(); rect.setLeft(rect.right()); rect.setWidth(60); m_pushButtonSend->setGeometry(rect); ui->lineEdit->setFocus(); ui->verticalLayout->insertWidget(0, m_view); bool check = connect(m_pushButtonSend, SIGNAL(clicked(bool)), SLOT(sendMessage())); Q_ASSERT(check); Q_UNUSED(check); updateSendButtonGeomerty(); } void chatDialog::show() { QDialog::show(); } QString chatDialog::getBareJid() const { return m_bareJid; } QString chatDialog::getDisplayName() const { return m_displayName; } void chatDialog::setBareJid(const QString& str) { m_bareJid = str; } void chatDialog::setDisplayName(const QString& str) { m_displayName = str; setWindowTitle(QString("Chat with %1").arg(m_bareJid)); QFont font; font.setBold(true); QFontMetrics fontMetrics(font); QRect rect = fontMetrics.boundingRect(m_displayName); int width = rect.width(); if(m_scene) m_scene->setBoxStartLength(width); // ui->horizontalSpacer_2->changeSize(width+20, 10); ui->lineEdit->setFixedWidth(350 - width - 25); updateSendButtonGeomerty(); } void chatDialog::setQXmppClient(QXmppClient* client) { m_client = client; } void chatDialog::sendMessage() { if(m_client) m_client->sendMessage(getBareJid(), ui->lineEdit->text()); m_view->addMessage("Me", ui->lineEdit->text()); ui->lineEdit->clear(); } void chatDialog::messageReceived(const QString& msg) { m_view->addMessage(getDisplayName(), msg); } void chatDialog::keyPressEvent(QKeyEvent* event1) { ui->lineEdit->setFocus(); ui->lineEdit->event(event1); if(event1->key() == Qt::Key_Return) { m_pushButtonSend->click(); } else if(event1->key() == Qt::Key_Escape) { hide(); } } void chatDialog::paintEvent(QPaintEvent* event) { QDialog::paintEvent(event); QPainter p(this); p.setPen(Qt::gray); p.drawRect(rect().adjusted(5, 5, -6, -6)); } void chatDialog::resizeEvent(QResizeEvent *) { updateSendButtonGeomerty(); } void chatDialog::moveEvent(QMoveEvent *) { updateSendButtonGeomerty(); } void chatDialog::updateSendButtonGeomerty() { QRect rect = ui->lineEdit->geometry(); rect.setLeft(rect.right() + 6); rect.setWidth(60); QRect rect2 = rect; rect2.setHeight(25); rect2.moveCenter(rect.center()); m_pushButtonSend->setGeometry(rect2); } qxmpp-0.7.6/examples/GuiClient/rosterItem.h0000644000175000007640000000304012116723562020622 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef ROSTERITEM_H #define ROSTERITEM_H #include #include #include #include "QXmppPresence.h" class rosterItem : public QStandardItem { public: enum userRoles { StatusText = Qt::UserRole + 2, StatusType, PresenceType, BareJid, Avatar }; rosterItem(const QString& bareJid); void setAvatar(const QImage& image); void setPresence(const QXmppPresence &presence); void setName(const QString& name); QImage getAvatar(); QString getName(); }; class rosterItemDelegate : public QItemDelegate { public: rosterItemDelegate(); QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const; void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const; }; #endif // ROSTERITEM_H qxmpp-0.7.6/examples/GuiClient/statusTextWidget.cpp0000644000175000007640000001135112116723562022360 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "statusTextWidget.h" #include #include #include #include QSize statusLineEdit::sizeHint() const { QFont font; QFontMetrics fm(font); int width = fm.width(text()); if(width <= (160 - 8)) return QSize(width+8, 18); else return QSize(160, 18); } void statusLineEditButton::paintEvent(QPaintEvent* event) { Q_UNUSED(event); QPainter painter(this); QStyleOptionButton panel; initStyleOption(&panel); QRect r = style()->subElementRect(QStyle::SE_PushButtonFocusRect, &panel, this); QImage image(":/icons/resource/downArrow.png"); QRect rectDelta(0, 0, 7, 4); rectDelta.moveCenter(r.center()); painter.drawImage(rectDelta, image); } void statusLineEdit::focusInEvent(QFocusEvent* event) { QLineEdit::focusInEvent(event); QLineEdit::selectAll(); } void statusLineEdit::mousePressEvent(QMouseEvent* event) { QLineEdit::mousePressEvent(event); QLineEdit::selectAll(); } statusTextWidget::statusTextWidget(QWidget* parent) : QWidget(parent) , m_statusLineEdit(0) , m_statusButton(0) , m_clearStatusTextHistory("Clear Status Message", this) { bool check; Q_UNUSED(check); m_statusLineEdit = new statusLineEdit(this); QHBoxLayout* layout = new QHBoxLayout; layout->addWidget(m_statusLineEdit); layout->setSpacing(0); layout->setContentsMargins(0, 0, 0, 0); m_statusButton = new statusLineEditButton(this); layout->addWidget(m_statusButton); setLayout(layout); check = connect(m_statusButton, SIGNAL(clicked(bool)), SLOT(showMenu())); Q_ASSERT(check); check = connect(m_statusLineEdit, SIGNAL(textChanged(QString)), SLOT(textChanged())); Q_ASSERT(check); check = connect(m_statusLineEdit, SIGNAL(editingFinished()), SLOT(statusTextChanged_helper())); Q_ASSERT(check); check = connect(&m_clearStatusTextHistory, SIGNAL(triggered()), SLOT(clearStatusTextHistory())); Q_ASSERT(check); } void statusTextWidget::showMenu() { QMenu menu(this); int size = m_statusTextActionList.size(); for(int i = 0; i < size; ++i) { menu.addAction(m_statusTextActionList.at(size - 1 - i)); } menu.addSeparator(); menu.addAction(&m_clearStatusTextHistory); m_clearStatusTextHistory.setDisabled(size == 0); menu.exec(m_statusLineEdit->mapToGlobal(QPoint(0, m_statusLineEdit->height()))); } void statusTextWidget::textChanged() { m_statusLineEdit->updateGeometry(); } void statusTextWidget::statusTextChanged_helper() { addStatusTextToList(m_statusLineEdit->text()); emit statusTextChanged(m_statusLineEdit->text()); parentWidget()->setFocus(); } void statusTextWidget::setStatusText(const QString& statusText) { m_statusLineEdit->setText(statusText); } void statusTextWidget::addStatusTextToList(const QString& status) { for(int i = 0; i < m_statusTextActionList.size(); ++i) { if(m_statusTextActionList.at(i)->data().toString() == status) { QAction* action = m_statusTextActionList.takeAt(i); m_statusTextActionList.append(action); return; } } QAction* action = new QAction(status, this); action->setData(status); bool check = connect(action, SIGNAL(triggered()), SLOT(statusTextChanged_menuClick())); Q_ASSERT(check); Q_UNUSED(check); m_statusTextActionList.append(action); } void statusTextWidget::statusTextChanged_menuClick() { QAction* action = qobject_cast(sender()); if(action) { int i = 0; while(i < m_statusTextActionList.size() && action != m_statusTextActionList.at(i)) { ++i; } if(action == m_statusTextActionList.at(i)) { m_statusTextActionList.removeAt(i); m_statusTextActionList.append(action); } m_statusLineEdit->setText(action->data().toString()); emit statusTextChanged(action->data().toString()); } } void statusTextWidget::clearStatusTextHistory() { emit statusTextChanged(""); } qxmpp-0.7.6/examples/GuiClient/profileDialog.h0000644000175000007640000000353112116723562021252 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef PROFILEDIALOG_H #define PROFILEDIALOG_H #include #include #include "capabilitiesCache.h" namespace Ui { class profileDialog; } class QXmppClient; class QXmppVersionIq; class QXmppEntityTimeIq; class profileDialog : public QDialog { Q_OBJECT public: explicit profileDialog(QWidget *parent, const QString& bareJid, QXmppClient& client, capabilitiesCache& caps); ~profileDialog(); void setClientRef(QXmppClient& m_xmppClient); void setAvatar(const QImage&); void setBareJid(const QString&); void setFullName(const QString&); void setStatusText(const QString&); private slots: void versionReceived(const QXmppVersionIq&); void timeReceived(const QXmppEntityTimeIq&); private: void updateText(); QString getCapability(const QString& resource); private: Ui::profileDialog *ui; QString m_bareJid; QXmppClient& m_xmppClient; // reference to the active QXmppClient (No ownership) capabilitiesCache& m_caps; // reference to the active QXmppClient (No ownership) QMap m_versions; QMap m_time; }; #endif // PROFILEDIALOG_H qxmpp-0.7.6/examples/GuiClient/mainDialog.h0000644000175000007640000000704212116723562020537 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef MAINDIALOG_H #define MAINDIALOG_H #include #include #include #include #include "rosterItemModel.h" #include "rosterItemSortFilterProxyModel.h" #include "statusWidget.h" #include "vCardCache.h" #include "capabilitiesCache.h" #include "accountsCache.h" #include "xmlConsoleDialog.h" #include "QXmppClient.h" class chatDialog; class QKeyEvent; namespace Ui { class mainDialogClass; } class mainDialog : public QDialog { Q_OBJECT public: mainDialog(QWidget *parent = 0); protected: void keyPressEvent(QKeyEvent*); void closeEvent(QCloseEvent* event); private slots: void rosterChanged(const QString& bareJid); void rosterReceived(); void presenceChanged(const QString&, const QString&); void filterChanged(const QString& filter); void showChatDialog(const QString& bareJid); void messageReceived(const QXmppMessage& msg); void statusTextChanged(const QString&); void presenceTypeChanged(QXmppPresence::Type); void presenceStatusTypeChanged(QXmppPresence::AvailableStatusType); void signIn(); void cancelSignIn(); void showSignInPage(); void showSignInPageAfterUserDisconnection(); void showRosterPage(); void startConnection(); void updateStatusWidget(); void showLoginStatusWithProgress(const QString& msg); void showLoginStatus(const QString& msg); void showLoginStatusWithCounter(const QString& msg, int time); void updateVCard(const QString& bareJid); void avatarChanged(const QImage&); void showProfile(const QString& bareJid); void userNameCompleter_activated(const QString&); void addAccountToCache(); void presenceReceived(const QXmppPresence&); void errorClient(QXmppClient::Error); void action_addContact(); void action_removeContact(const QString& bareJid); void action_signOut(); void action_quit(); void action_trayIconActivated(QSystemTrayIcon::ActivationReason reason); void action_showXml(); void action_aboutDlg(); void action_settingsPressed(); private: void loadAccounts(); void createTrayIconAndMenu(); void createSettingsMenu(); void addPhotoHash(QXmppPresence&); chatDialog* getChatDialog(const QString& bareJid); Ui::mainDialogClass* ui; QXmppClient m_xmppClient; rosterItemModel m_rosterItemModel; rosterItemSortFilterProxyModel m_rosterItemSortFilterModel; statusWidget m_statusWidget; vCardCache m_vCardCache; capabilitiesCache m_capabilitiesCache; accountsCache m_accountsCache; // map of bare jids and respective chatdlg QMap m_chatDlgsList; #ifndef QT_NO_SYSTEMTRAYICON QSystemTrayIcon m_trayIcon; QMenu m_trayIconMenu; #endif QAction m_quitAction; QAction m_signOutAction; xmlConsoleDialog m_consoleDlg; QMenu* m_settingsMenu; }; #endif // MAINDIALOG_H qxmpp-0.7.6/examples/GuiClient/chatGraphicsScene.cpp0000644000175000007640000000473712116723562022414 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "chatGraphicsScene.h" #include "chatMsgGraphicsItem.h" #include "chatGraphicsView.h" chatGraphicsScene::chatGraphicsScene(QObject* parent) : QGraphicsScene(parent), m_verticalPosForNewMessage(0), m_verticalSpacing(5) { } void chatGraphicsScene::addMessage(const QString& user, const QString& message) { chatMsgGraphicsItem* item = new chatMsgGraphicsItem(); m_items.append(item); item->setName(user); item->setBoxStartLength(m_boxStartLength); item->setText(message); item->setViewWidth(350); // item->setViewWidth(views().at(0)->size().width()); item->setPos(0, m_verticalPosForNewMessage); int height = item->boundingRect().height(); m_verticalPosForNewMessage = m_verticalPosForNewMessage + height + m_verticalSpacing; addItem(item); QRectF rect = sceneRect(); rect.setHeight(m_verticalPosForNewMessage); setSceneRect(rect); } void chatGraphicsScene::setWidthResize(int newWidth, int oldWidth) { Q_UNUSED(newWidth); Q_UNUSED(oldWidth); // verticalReposition(); } void chatGraphicsScene::verticalReposition() { m_verticalPosForNewMessage = 0; chatMsgGraphicsItem* item = 0; for(int i = 0; i < m_items.size(); ++i) { item = m_items.at(i); item->setViewWidth(views().at(0)->size().width()); item->setPos(0, m_verticalPosForNewMessage); int height = item->boundingRect().height(); m_verticalPosForNewMessage = m_verticalPosForNewMessage + height + m_verticalSpacing; } QRectF rect = sceneRect(); if(item) { rect.setHeight(m_verticalPosForNewMessage); rect.setWidth(item->getMaxWidth() + item->getBoxStartLength() - 4); setSceneRect(rect); } } void chatGraphicsScene::setBoxStartLength(int length) { m_boxStartLength = length; } qxmpp-0.7.6/examples/GuiClient/statusWidget.h0000644000175000007640000000311712116723562021161 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef STATUSWIDGET_H #define STATUSWIDGET_H #include "ui_statusWidget.h" #include "QXmppPresence.h" /// Main Widget for the client's status/status text/avatar management class statusWidget : public QWidget, public Ui::statusWidgetClass { Q_OBJECT public: statusWidget(QWidget* parent = 0); void setDisplayName(const QString& name); void setStatusText(const QString& statusText); void setPresenceAndStatusType(QXmppPresence::Type presenceType, QXmppPresence::AvailableStatusType statusType); void setAvatar(const QImage&); private slots: void presenceMenuTriggered(); void avatarSelection(); signals: void statusTextChanged(const QString&); void presenceTypeChanged(QXmppPresence::Type); void presenceStatusTypeChanged(QXmppPresence::AvailableStatusType); void avatarChanged(const QImage&); }; #endif // STATUSWIDGET_H qxmpp-0.7.6/examples/GuiClient/accountsCache.cpp0000644000175000007640000000724112116723562021572 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "accountsCache.h" #include "utils.h" #include #include #include accountsCache::accountsCache(QObject *parent) : QObject(parent) { } QStringList accountsCache::getBareJids() { QStringList list; QDomElement element = m_accountsDocument.documentElement().firstChildElement("account"); while(!element.isNull()) { list << element.firstChildElement("bareJid").text(); element = element.nextSiblingElement("account"); } return list; } QString accountsCache::getPassword(const QString& bareJid) { QDomElement element = m_accountsDocument.documentElement().firstChildElement("account"); while(!element.isNull()) { if(element.firstChildElement("bareJid").text() == bareJid) { QByteArray passwdEncryptedBa = QByteArray::fromBase64( element.firstChildElement("password").text().toUtf8()); QString passwd = calculateXor(passwdEncryptedBa, bareJid.toUtf8()); return passwd; } element = element.nextSiblingElement("account"); } return ""; } void accountsCache::addAccount(const QString& bareJid, const QString& passwd) { if(m_accountsDocument.documentElement().isNull()) { m_accountsDocument.appendChild(m_accountsDocument.createElement("accounts")); } QDomElement element = m_accountsDocument.documentElement().firstChildElement("account"); while(!element.isNull()) { if(element.firstChildElement("bareJid").text() == bareJid) { m_accountsDocument.documentElement().removeChild(element); break; } element = element.nextSiblingElement("account"); } QDomElement newElement = m_accountsDocument.createElement("account"); QDomElement newElementBareJid = m_accountsDocument.createElement("bareJid"); newElementBareJid.appendChild(m_accountsDocument.createTextNode(bareJid)); newElement.appendChild(newElementBareJid); QDomElement newElementPasswd = m_accountsDocument.createElement("password"); newElementPasswd.appendChild(m_accountsDocument.createTextNode( calculateXor(passwd.toUtf8(), bareJid.toUtf8()).toBase64())); newElement.appendChild(newElementPasswd); m_accountsDocument.documentElement().appendChild(newElement); saveToFile(); } void accountsCache::loadFromFile() { QDir dirSettings(getSettingsDir()); if(dirSettings.exists()) { QFile file(getSettingsDir()+ "accounts.xml"); if(file.open(QIODevice::ReadOnly)) { m_accountsDocument.setContent(&file, true); } } } void accountsCache::saveToFile() { QDir dir; if(!dir.exists(getSettingsDir())) dir.mkpath(getSettingsDir()); QString fileAccounts = getSettingsDir() + "accounts.xml"; QFile file(fileAccounts); if(file.open(QIODevice::ReadWrite)) { QTextStream tstream(&file); m_accountsDocument.save(tstream, 2); file.close(); } } qxmpp-0.7.6/examples/GuiClient/signInStatusLabel.h0000644000175000007640000000252112116723562022063 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef SIGNINSTATUSLABEL_H #define SIGNINSTATUSLABEL_H #include #include class signInStatusLabel : public QLabel { Q_OBJECT public: enum Option { None = 0, WithProgressEllipsis, CountDown }; signInStatusLabel(QWidget* parent = 0); void setCustomText(const QString& text, signInStatusLabel::Option op = None, int countDown = 0); // QSize sizeHint() const; private slots: void timeout(); private: QTimer m_timer; signInStatusLabel::Option m_option; QString m_text; QString m_postfix; int m_countDown; }; #endif // SIGNINSTATUSLABEL_H qxmpp-0.7.6/examples/GuiClient/vCardCache.cpp0000644000175000007640000001010212116723562021000 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "vCardCache.h" #include "utils.h" #include "QXmppClient.h" #include "QXmppUtils.h" #include "QXmppVCardManager.h" #include #include #include vCardCache::vCardCache(QXmppClient* client) : QObject(client), m_client(client) { } void vCardCache::vCardReceived(const QXmppVCardIq& vcard) { QString from = vcard.from(); if(from.isEmpty() && m_client) from = m_client->configuration().jidBare(); m_mapBareJidVcard[from] = vcard; saveToFile(from); emit vCardReadyToUse(from); } bool vCardCache::isVCardAvailable(const QString& bareJid) const { return m_mapBareJidVcard.contains(bareJid); } // TODO don't request again, if it is already requested void vCardCache::requestVCard(const QString& bareJid) { if(m_client) m_client->vCardManager().requestVCard(bareJid); } //TODO not a good way to handle QXmppVCardIq& vCardCache::getVCard(const QString& bareJid) { return m_mapBareJidVcard[bareJid]; } void vCardCache::saveToFile(const QString& bareJid) { QDir dir; if(!dir.exists(getSettingsDir(m_client->configuration().jidBare()))) dir.mkpath(getSettingsDir(m_client->configuration().jidBare())); QDir dir2; if(!dir2.exists(getSettingsDir(m_client->configuration().jidBare())+ "vCards/")) dir2.mkpath(getSettingsDir(m_client->configuration().jidBare())+ "vCards/"); if(m_mapBareJidVcard.contains(bareJid)) { QString fileVCard = getSettingsDir(m_client->configuration().jidBare()) + "vCards/" + bareJid + ".xml"; QFile file(fileVCard); if(file.open(QIODevice::ReadWrite)) { QXmlStreamWriter stream(&file); stream.setAutoFormatting(true); stream.setAutoFormattingIndent(2); m_mapBareJidVcard[bareJid].toXml(&stream); file.close(); } } } void vCardCache::loadFromFile() { m_mapBareJidVcard.clear(); QDir dirVCards(getSettingsDir(m_client->configuration().jidBare())+ "vCards/"); if(dirVCards.exists()) { QStringList list = dirVCards.entryList(QStringList("*.xml")); foreach(QString fileName, list) { QFile file(getSettingsDir(m_client->configuration().jidBare())+ "vCards/" + fileName); QString bareJid = fileName; bareJid.chop(4); if(file.open(QIODevice::ReadOnly)) { QDomDocument doc; if(doc.setContent(&file, true)) { QXmppVCardIq vCardIq; vCardIq.parse(doc.documentElement()); m_mapBareJidVcard[bareJid] = vCardIq; QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents); } } } } } //TODO: this should return scaled image QImage vCardCache::getAvatar(const QString& bareJid) const { if(m_mapBareJidVcard.contains(bareJid)) return getImageFromByteArray(m_mapBareJidVcard[bareJid].photo()); else return QImage(); } QByteArray vCardCache::getPhotoHash(const QString& bareJid) const { if(!m_mapBareJidVcard.contains(bareJid)) return QByteArray(); if(m_mapBareJidVcard[bareJid].photo().isEmpty()) return QByteArray(); else return QCryptographicHash::hash(m_mapBareJidVcard[bareJid].photo(), QCryptographicHash::Sha1); } qxmpp-0.7.6/examples/GuiClient/resources.qrc0000644000175000007640000000102012116723562021031 0ustar sharkyjerryweb resource/green.png resource/orange.png resource/red.png resource/gray.png resource/avatar.png resource/searchIcon.png resource/downArrow.png resource/ajax-loader.gif resource/icon.png resource/settingsButton.png resource/addButton.png qxmpp-0.7.6/examples/GuiClient/utils.h0000644000175000007640000000256712116723562017642 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef CLIENTUTILS_H #define CLIENTUTILS_H #include "QXmppPresence.h" #include #include #include int comparisonWeightsPresenceStatusType(QXmppPresence::AvailableStatusType); int comparisonWeightsPresenceType(QXmppPresence::Type); QString presenceToStatusText(const QXmppPresence& presence); QString getSettingsDir(const QString& bareJid = ""); QString getSha1HashAsHex(const QByteArray& image); QImage getImageFromByteArray(const QByteArray& image); QString getImageType1(const QByteArray& image); bool isValidBareJid(const QString& bareJid); QByteArray calculateXor(const QByteArray& data, const QByteArray& key); #endif // CLIENTUTILS_H qxmpp-0.7.6/examples/GuiClient/statusToolButton.cpp0000644000175000007640000000417512116723562022407 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "statusToolButton.h" #include #include #include statusToolButton::statusToolButton(QWidget* parent) : QToolButton(parent) { setMinimumSize(QSize(20, 18)); } void statusToolButton::paintEvent(QPaintEvent* event) { Q_UNUSED(event); QPainter painter(this); if(underMouse()) { QStyleOptionToolButton panel; initStyleOption(&panel); style()->drawPrimitive(QStyle::PE_PanelButtonTool, &panel, &painter, this); } QRect r = rect(); QFont font; painter.setFont(font); painter.setPen(Qt::gray); QRect rectSize(0, 0, sizeHint().width(), sizeHint().height()); rectSize.moveCenter(r.center()); r = rectSize; r.adjust(0, 0, -1, -1); painter.setPen(Qt::black); painter.setBrush(Qt::black); r.moveLeft(r.left() + 3); font.setBold(true); painter.setFont(font); painter.drawText(r, Qt::AlignVCenter|Qt::TextSingleLine, text()); QImage image(":/icons/resource/downArrow.png"); QRect rectDelta(0, 0, 7, 4); rectDelta.moveRight(r.right() - 4); rectDelta.moveCenter(QPoint(rectDelta.center().x(), r.center().y())); painter.drawImage(rectDelta, image); } QSize statusToolButton::sizeHint() const { QFont font; font.setBold(true); QFontMetrics fm(font); int width = fm.width(text()); if(width <= (160 - 8 - 9)) return QSize(width+8+9, 18); else return QSize(160, 18); } qxmpp-0.7.6/examples/GuiClient/capabilitiesCache.cpp0000644000175000007640000001236712116723562022411 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "capabilitiesCache.h" #include "QXmppClient.h" #include "QXmppDiscoveryManager.h" #include #include #include #include capabilitiesCache::capabilitiesCache(QXmppClient* client) : QObject(client), m_client(client) { QXmppDiscoveryManager* ext = m_client->findExtension(); if(ext) { bool check = connect(ext, SIGNAL(infoReceived(QXmppDiscoveryIq)), SLOT(infoReceived(QXmppDiscoveryIq))); Q_ASSERT(check); Q_UNUSED(check); } } bool capabilitiesCache::isCapabilityAvailable(const QString& nodeVer) { return m_mapCapabilities.contains(nodeVer); } void capabilitiesCache::requestInfo(const QString& jid, const QString& node) { QXmppDiscoveryManager* ext = m_client->findExtension(); if(ext) { bool alreadyRequested = false; foreach(QString key, m_mapIdNodeVer.keys()) { if(m_mapIdNodeVer[key] == node) { alreadyRequested = true; break; } } if(!alreadyRequested) { QString id = ext->requestInfo(jid, node); m_mapIdNodeVer[id] = node; } } } void capabilitiesCache::infoReceived(const QXmppDiscoveryIq& discoIqRcv) { QXmppDiscoveryIq discoIq = discoIqRcv; if(discoIq.queryType() == QXmppDiscoveryIq::InfoQuery && discoIq.type() == QXmppIq::Result) { if(discoIq.queryNode().isEmpty()) { discoIq.setQueryNode(m_mapIdNodeVer[discoIq.id()]); m_mapIdNodeVer.remove(discoIq.id()); } discoIq.setTo(""); discoIq.setFrom(""); discoIq.setId(""); m_mapCapabilities[discoIq.queryNode()] = discoIq; saveToFile(discoIq.queryNode()); } } void capabilitiesCache::loadFromFile() { m_mapCapabilities.clear(); QDir dirCaps(getSettingsDir(m_client->configuration().jidBare())+ "capabilities/"); if(dirCaps.exists()) { QStringList list = dirCaps.entryList(QStringList("*.xml")); foreach(QString fileName, list) { QFile file(getSettingsDir(m_client->configuration().jidBare())+ "capabilities/" + fileName); if(file.open(QIODevice::ReadOnly)) { QDomDocument doc; if(doc.setContent(&file, true)) { QXmppDiscoveryIq discoIq; discoIq.parse(doc.documentElement()); m_mapCapabilities[discoIq.queryNode()] = discoIq; QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents); } } } } } void capabilitiesCache::saveToFile(const QString& nodeVer) { if(!m_mapCapabilities.contains(nodeVer)) return; QString fileName = getSha1HashAsHex(nodeVer.toUtf8()); QDir dir; if(!dir.exists(getSettingsDir(m_client->configuration().jidBare()))) dir.mkpath(getSettingsDir(m_client->configuration().jidBare())); QDir dir2; if(!dir2.exists(getSettingsDir(m_client->configuration().jidBare())+ "capabilities/")) dir2.mkpath(getSettingsDir(m_client->configuration().jidBare())+ "capabilities/"); QString fileCapability = getSettingsDir(m_client->configuration().jidBare()) + "capabilities/" + fileName + ".xml"; QFile file(fileCapability); if(file.open(QIODevice::ReadWrite)) { QXmlStreamWriter stream(&file); stream.setAutoFormatting(true); stream.setAutoFormattingIndent(2); m_mapCapabilities[nodeVer].toXml(&stream); file.close(); } } QStringList capabilitiesCache::getFeatures(const QString& nodeVer) { if(!m_mapCapabilities.contains(nodeVer)) return QStringList(); return m_mapCapabilities[nodeVer].features(); } QStringList capabilitiesCache::getIdentities(const QString& nodeVer) { if(!m_mapCapabilities.contains(nodeVer)) return QStringList(); QStringList idList; QList list = m_mapCapabilities[nodeVer].identities(); foreach(QXmppDiscoveryIq::Identity identity, list) { QStringList tmpList; if(!identity.name().isEmpty()) tmpList << identity.name(); if(!identity.category().isEmpty()) tmpList << identity.category(); if(!identity.type().isEmpty()) tmpList << identity.type(); if(!identity.language().isEmpty()) tmpList << identity.language(); idList << tmpList.join(" | "); } return idList; } qxmpp-0.7.6/examples/GuiClient/main.cpp0000644000175000007640000000214712116723562017753 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include #include "mainDialog.h" #include "utils.h" int main(int argc, char *argv[]) { QApplication a(argc, argv); QApplication::setOrganizationName("QXmpp"); QApplication::setApplicationName("GuiClient"); QDir dir; if(!dir.exists(getSettingsDir())) dir.mkpath(getSettingsDir()); mainDialog cw; cw.show(); cw.raise(); return a.exec(); } qxmpp-0.7.6/examples/GuiClient/searchLineEdit.cpp0000644000175000007640000000427112116723562021712 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "searchLineEdit.h" searchLineEdit::searchLineEdit(QWidget* parent):QLineEdit(parent) { setMinimumSize(QSize(20, 24)); setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); setStyleSheet(":enabled { padding-right: 20px; padding-left: 20px }"); clearButton = new searchClearButton(this); clearButton->setVisible(true); clearButton->setCursor(Qt::ArrowCursor); clearButton->setToolTip("Clear"); connect(clearButton, SIGNAL(clicked()), this, SLOT(clear())); } void searchLineEdit::paintEvent(QPaintEvent *e) { QLineEdit::paintEvent(e); QPainter painter(this); QImage image(":/icons/resource/searchIcon.png"); QRectF target(image.rect()); target.moveCenter(QPointF(target.center().x()+2, target.center().y()+3)); painter.drawImage(target, image, image.rect()); if (text().length() == 0 && (!hasFocus()) ) { painter.setPen(Qt::gray); QRect r = rect(); painter.drawText(24, r.height()/2+4, "Search Contacts"); } if(text().isEmpty()) clearButton->setVisible(false); else clearButton->setVisible(true); } void searchLineEdit::resizeEvent(QResizeEvent*) { clearButton->setParent(this); clearButton->setGeometry(QRect(width()-23, 0, 24, 24)); } void searchLineEdit::moveEvent(QMoveEvent*) { clearButton->setParent(this); clearButton->setGeometry(QRect(width()-23, 1, 24, 24)); } qxmpp-0.7.6/examples/GuiClient/mainDialog.cpp0000644000175000007640000006505012116723562021075 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "mainDialog.h" #include "ui_mainDialog.h" #include "utils.h" #include "profileDialog.h" #include "aboutDialog.h" #include "chatDialog.h" #include "QXmppPresence.h" #include "QXmppMessage.h" #include "QXmppUtils.h" #include "QXmppVCardManager.h" #include #include #include #include #include mainDialog::mainDialog(QWidget *parent): QDialog(parent, Qt::Window), ui(new Ui::mainDialogClass), m_rosterItemModel(this), m_rosterItemSortFilterModel(this), m_vCardCache(&m_xmppClient), m_capabilitiesCache(&m_xmppClient), m_accountsCache(this), #ifndef QT_NO_SYSTEMTRAYICON m_trayIcon(this), m_trayIconMenu(this), #endif m_quitAction("Quit", this), m_signOutAction("Sign out", this), m_settingsMenu(0) { bool check; Q_UNUSED(check); ui->setupUi(this); createTrayIconAndMenu(); createSettingsMenu(); ui->pushButton_cancel->setDisabled(true); ui->label_throbber->setMovie(new QMovie(":/icons/resource/ajax-loader.gif")); ui->label_throbber->movie()->start(); showSignInPage(); loadAccounts(); check = connect(ui->lineEdit_userName->completer(), SIGNAL(activated(QString)), this, SLOT(userNameCompleter_activated(QString))); Q_ASSERT(check); check = connect(&m_xmppClient.rosterManager(), SIGNAL(rosterReceived()), this, SLOT(rosterReceived())); Q_ASSERT(check); check = connect(&m_xmppClient.rosterManager(), SIGNAL(itemChanged(QString)), this, SLOT(rosterChanged(QString))); Q_ASSERT(check); check = connect(&m_xmppClient, SIGNAL(error(QXmppClient::Error)), this, SLOT(errorClient(QXmppClient::Error))); Q_ASSERT(check); check = connect(&m_xmppClient, SIGNAL(presenceReceived(QXmppPresence)), this, SLOT(presenceReceived(QXmppPresence))); Q_ASSERT(check); QXmppLogger::getLogger()->setLoggingType(QXmppLogger::SignalLogging); check = connect(&m_xmppClient.rosterManager(), SIGNAL(presenceChanged(QString,QString)), this, SLOT(presenceChanged(QString,QString))); Q_ASSERT(check); check = connect(ui->lineEdit_filter, SIGNAL(textChanged(QString)), this, SLOT(filterChanged(QString))); Q_ASSERT(check); check = connect(ui->listView, SIGNAL(showChatDialog(QString)), this, SLOT(showChatDialog(QString))); Q_ASSERT(check); check = connect(ui->listView, SIGNAL(showProfile(QString)), this, SLOT(showProfile(QString))); Q_ASSERT(check); check = connect(ui->listView, SIGNAL(removeContact(QString)), this, SLOT(action_removeContact(QString))); Q_ASSERT(check); check = connect(&m_xmppClient, SIGNAL(messageReceived(QXmppMessage)), SLOT(messageReceived(QXmppMessage))); Q_ASSERT(check); check = connect(ui->pushButton_signIn, SIGNAL(clicked(bool)), SLOT(signIn())); Q_ASSERT(check); check = connect(ui->pushButton_cancel, SIGNAL(clicked(bool)), SLOT(cancelSignIn())); Q_ASSERT(check); m_rosterItemSortFilterModel.setSourceModel(&m_rosterItemModel); ui->listView->setModel(&m_rosterItemSortFilterModel); m_rosterItemSortFilterModel.sort(0); rosterItemDelegate *delegate = new rosterItemDelegate(); ui->listView->setItemDelegate(delegate); ui->listView->setFocus(); ui->verticalLayout_3->insertWidget(0, &m_statusWidget); check = connect(&m_statusWidget, SIGNAL(statusTextChanged(QString)), SLOT(statusTextChanged(QString))); Q_ASSERT(check); check = connect(&m_statusWidget, SIGNAL(presenceTypeChanged(QXmppPresence::Type)), SLOT(presenceTypeChanged(QXmppPresence::Type))); Q_ASSERT(check); check = connect(&m_statusWidget, SIGNAL(presenceStatusTypeChanged(QXmppPresence::AvailableStatusType)), SLOT(presenceStatusTypeChanged(QXmppPresence::AvailableStatusType))); Q_ASSERT(check); check = connect(&m_statusWidget, SIGNAL(avatarChanged(QImage)), SLOT(avatarChanged(QImage))); Q_ASSERT(check); check = connect(&m_xmppClient, SIGNAL(connected()), SLOT(updateStatusWidget())); Q_ASSERT(check); check = connect(&m_xmppClient, SIGNAL(connected()), SLOT(showRosterPage())); Q_ASSERT(check); check = connect(&m_xmppClient, SIGNAL(connected()), SLOT(addAccountToCache())); Q_ASSERT(check); check = connect(&m_xmppClient, SIGNAL(disconnected()), SLOT(showSignInPageAfterUserDisconnection())); Q_ASSERT(check); check = connect(&m_xmppClient.vCardManager(), SIGNAL(vCardReceived(QXmppVCardIq)), &m_vCardCache, SLOT(vCardReceived(QXmppVCardIq))); Q_ASSERT(check); check = connect(&m_vCardCache, SIGNAL(vCardReadyToUse(QString)), SLOT(updateVCard(QString))); Q_ASSERT(check); check = connect(ui->pushButton_addContact, SIGNAL(clicked()), SLOT(action_addContact())); Q_ASSERT(check); check = connect(QXmppLogger::getLogger(), SIGNAL(message(QXmppLogger::MessageType,QString)), &m_consoleDlg, SLOT(message(QXmppLogger::MessageType,QString))); Q_ASSERT(check); check = connect(ui->pushButton_settings, SIGNAL(pressed()), SLOT(action_settingsPressed())); Q_ASSERT(check); } void mainDialog::rosterChanged(const QString& bareJid) { m_rosterItemModel.updateRosterEntry(bareJid, m_xmppClient.rosterManager(). getRosterEntry(bareJid)); // if available in cache, update it else based on presence it will request if not available if(m_vCardCache.isVCardAvailable(bareJid)) updateVCard(bareJid); } void mainDialog::rosterReceived() { QStringList list = m_xmppClient.rosterManager().getRosterBareJids(); QString bareJid; foreach(bareJid, list) rosterChanged(bareJid); } void mainDialog::presenceChanged(const QString& bareJid, const QString& resource) { if(bareJid == m_xmppClient.configuration().jidBare()) return; if(!m_rosterItemModel.getRosterItemFromBareJid(bareJid)) return; QString jid = bareJid + "/" + resource; QMap presences = m_xmppClient.rosterManager(). getAllPresencesForBareJid(bareJid); m_rosterItemModel.updatePresence(bareJid, presences); QXmppPresence& pre = presences[resource]; if(pre.type() == QXmppPresence::Available) { QString node = pre.capabilityNode(); QString ver = pre.capabilityVer().toBase64(); QStringList exts = pre.capabilityExt(); QString nodeVer = node + "#" + ver; if(!m_capabilitiesCache.isCapabilityAvailable(nodeVer)) m_capabilitiesCache.requestInfo(jid, nodeVer); foreach(QString ext, exts) { nodeVer = node + "#" + ext; if(!m_capabilitiesCache.isCapabilityAvailable(nodeVer)) m_capabilitiesCache.requestInfo(jid, nodeVer); } switch(pre.vCardUpdateType()) { case QXmppPresence::VCardUpdateNone: if(!m_vCardCache.isVCardAvailable(bareJid)) m_vCardCache.requestVCard(bareJid); case QXmppPresence::VCardUpdateNotReady: break; case QXmppPresence::VCardUpdateNoPhoto: case QXmppPresence::VCardUpdateValidPhoto: if(m_vCardCache.getPhotoHash(bareJid) != pre.photoHash()) m_vCardCache.requestVCard(bareJid); break; } } // QXmppPresence::Type presenceType = presences.begin().value().getType(); // if(!m_vCardCache.isVCardAvailable(bareJid) && // presenceType == QXmppPresence::Available) // { // m_rosterItemModel.updateAvatar(bareJid, // m_vCardCache.getVCard(bareJid).image); // } } void mainDialog::filterChanged(const QString& filter) { m_rosterItemSortFilterModel.setFilterRegExp(filter); // follow statement selects the first row ui->listView->selectionModel()->select(ui->listView->model()->index(0, 0), QItemSelectionModel::ClearAndSelect); } void mainDialog::keyPressEvent(QKeyEvent* event1) { if(ui->stackedWidget->currentIndex() == 0) // roster page { if(event1->matches(QKeySequence::Find) ||( event1->key() <= Qt::Key_9 && event1->key() >= Qt::Key_1) || (event1->key() <= Qt::Key_Z && event1->key() >= Qt::Key_At) || event1->key() == Qt::Key_Backspace) { ui->lineEdit_filter->setFocus(); ui->lineEdit_filter->event(event1); } else if(event1->key() == Qt::Key_Escape) { ui->lineEdit_filter->clear(); ui->listView->setFocus(); } else if(event1->key() == Qt::Key_Up || event1->key() == Qt::Key_Down || event1->key() == Qt::Key_PageUp || event1->key() == Qt::Key_PageDown) { ui->listView->setFocus(); ui->listView->event(event1); } else if(event1->key() == Qt::Key_Return && ui->listView->hasFocus()) { ui->listView->event(event1); } } // don't close on escape if(event1->key() == Qt::Key_Escape) { event1->ignore(); return; } // FIXME: I'm not sure what this is supposed to do, but it does not compile. #if 0 else if(minimize && e->modifiers() == Qt::ControlModifier && e->key() == Qt::Key_Period) { event1->ignore(); return; } #endif // don't close on escape if(ui->stackedWidget->currentIndex() == 1) // sign in page { QDialog::keyPressEvent(event1); return; } } chatDialog* mainDialog::getChatDialog(const QString& bareJid) { if(!m_chatDlgsList.contains(bareJid)) { m_chatDlgsList[bareJid] = new chatDialog(); m_chatDlgsList[bareJid]->setBareJid(bareJid); if(!m_rosterItemModel.getRosterItemFromBareJid(bareJid)) return 0; if(!m_rosterItemModel.getRosterItemFromBareJid(bareJid)-> getName().isEmpty()) m_chatDlgsList[bareJid]->setDisplayName(m_rosterItemModel. getRosterItemFromBareJid(bareJid)->getName()); else m_chatDlgsList[bareJid]->setDisplayName(QXmppUtils::jidToUser(bareJid)); m_chatDlgsList[bareJid]->setQXmppClient(&m_xmppClient); } return m_chatDlgsList[bareJid]; } void mainDialog::showChatDialog(const QString& bareJid) { if(!bareJid.isEmpty()) getChatDialog(bareJid)->show(); } void mainDialog::messageReceived(const QXmppMessage& msg) { if (msg.body().isEmpty()) return; chatDialog *dialog = getChatDialog(QXmppUtils::jidToBareJid(msg.from())); if (dialog) { dialog->show(); dialog->messageReceived(msg.body()); } } void mainDialog::statusTextChanged(const QString& status) { QXmppPresence presence = m_xmppClient.clientPresence(); presence.setStatusText(status); addPhotoHash(presence); m_xmppClient.setClientPresence(presence); } void mainDialog::presenceTypeChanged(QXmppPresence::Type presenceType) { if(presenceType == QXmppPresence::Unavailable) { m_xmppClient.disconnectFromServer(); } else if(presenceType == QXmppPresence::Available) { QXmppPresence newPresence = m_xmppClient.clientPresence(); newPresence.setType(presenceType); newPresence.setAvailableStatusType(QXmppPresence::Online); addPhotoHash(newPresence); m_xmppClient.setClientPresence(newPresence); } m_statusWidget.setStatusText( presenceToStatusText(m_xmppClient.clientPresence())); } void mainDialog::presenceStatusTypeChanged(QXmppPresence::AvailableStatusType statusType) { QXmppPresence presence = m_xmppClient.clientPresence(); presence.setType(QXmppPresence::Available); presence.setAvailableStatusType(statusType); addPhotoHash(presence); m_xmppClient.setClientPresence(presence); m_statusWidget.setStatusText( presenceToStatusText(m_xmppClient.clientPresence())); } void mainDialog::avatarChanged(const QImage& image) { QXmppVCardIq vcard; vcard.setType(QXmppIq::Set); QByteArray ba; QBuffer buffer(&ba); if(buffer.open(QIODevice::WriteOnly)) { if(image.save(&buffer, "PNG")) { vcard.setPhoto(ba); m_xmppClient.sendPacket(vcard); m_statusWidget.setAvatar(image); m_vCardCache.getVCard(m_xmppClient.configuration().jidBare()) = vcard; // update photo hash QXmppPresence presence = m_xmppClient.clientPresence(); addPhotoHash(presence); m_xmppClient.setClientPresence(presence); } } } void mainDialog::updateStatusWidget() { const QString bareJid = m_xmppClient.configuration().jidBare(); // initialise status widget updateVCard(bareJid); m_statusWidget.setStatusText(presenceToStatusText(m_xmppClient.clientPresence())); m_statusWidget.setPresenceAndStatusType(m_xmppClient.clientPresence().type(), m_xmppClient.clientPresence().availableStatusType()); // fetch own vCard m_vCardCache.requestVCard(bareJid); } void mainDialog::signIn() { ui->label_throbber->show(); ui->pushButton_signIn->setDisabled(true); ui->pushButton_cancel->setDisabled(false); ui->lineEdit_userName->setDisabled(true); ui->lineEdit_password->setDisabled(true); ui->checkBox_rememberPasswd->setDisabled(true); showLoginStatusWithProgress("Connecting"); QString bareJid = ui->lineEdit_userName->text(); QString passwd = ui->lineEdit_password->text(); m_xmppClient.configuration().setJid(bareJid); m_xmppClient.configuration().setPassword(passwd); m_rosterItemModel.clear(); m_vCardCache.loadFromFile(); m_capabilitiesCache.loadFromFile(); startConnection(); } void mainDialog::cancelSignIn() { if(!ui->checkBox_rememberPasswd->isChecked()) ui->lineEdit_password->setText(""); ui->label_throbber->hide(); m_xmppClient.disconnectFromServer(); showSignInPage(); showLoginStatus("Sign in cancelled"); addAccountToCache(); } void mainDialog::showSignInPage() { ui->label_throbber->hide(); ui->pushButton_signIn->setDisabled(false); ui->pushButton_cancel->setDisabled(true); ui->lineEdit_userName->setDisabled(false); ui->lineEdit_password->setDisabled(false); ui->checkBox_rememberPasswd->setDisabled(false); ui->stackedWidget->setCurrentIndex(1); } void mainDialog::showSignInPageAfterUserDisconnection() { if(!ui->checkBox_rememberPasswd->isChecked()) ui->lineEdit_password->setText(""); ui->label_throbber->hide(); showLoginStatus("Disconnected"); showSignInPage(); } void mainDialog::showRosterPage() { ui->stackedWidget->setCurrentIndex(0); } void mainDialog::startConnection() { // m_xmppClient.setClientPresence(QXmppPresence()); m_xmppClient.connectToServer(m_xmppClient.configuration()); } void mainDialog::showLoginStatus(const QString& msg) { ui->label_status->setCustomText(msg, signInStatusLabel::None); } void mainDialog::showLoginStatusWithProgress(const QString& msg) { ui->label_status->setCustomText(msg, signInStatusLabel::WithProgressEllipsis); } void mainDialog::showLoginStatusWithCounter(const QString& msg, int time) { ui->label_status->setCustomText(msg, signInStatusLabel::CountDown, time); } void mainDialog::updateVCard(const QString& bareJid) { // determine full name const QXmppVCardIq vCard = m_vCardCache.getVCard(bareJid); QString fullName = vCard.fullName(); if (fullName.isEmpty()) fullName = bareJid; // determine avatar QImage avatar = m_vCardCache.getAvatar(bareJid); if (avatar.isNull()) avatar = QImage(":/icons/resource/avatar.png"); if (bareJid == m_xmppClient.configuration().jidBare()) { // update our own information m_statusWidget.setAvatar(avatar); m_statusWidget.setDisplayName(fullName); } else { // update roster information m_rosterItemModel.updateAvatar(bareJid, avatar); m_rosterItemModel.updateName(bareJid, fullName); } } void mainDialog::showProfile(const QString& bareJid) { if(bareJid.isEmpty()) return; profileDialog dlg(this, bareJid, m_xmppClient, m_capabilitiesCache); dlg.setBareJid(bareJid); // TODO use original image if(!m_vCardCache.getAvatar(bareJid).isNull()) dlg.setAvatar(m_vCardCache.getAvatar(bareJid)); QStringList resources = m_xmppClient.rosterManager().getResources(bareJid); dlg.setFullName(m_vCardCache.getVCard(bareJid).fullName()); if(m_vCardCache.getVCard(bareJid).fullName().isEmpty()) dlg.setFullName(m_xmppClient.rosterManager().getRosterEntry(bareJid).name()); dlg.exec(); } void mainDialog::loadAccounts() { m_accountsCache.loadFromFile(); QStringList list = m_accountsCache.getBareJids(); QCompleter *completer = new QCompleter(list, this); completer->setCompletionMode(QCompleter::UnfilteredPopupCompletion); completer->setCaseSensitivity(Qt::CaseInsensitive); ui->lineEdit_userName->setCompleter(completer); if(!list.isEmpty()) { ui->lineEdit_userName->setText(list.last()); QString passwd = m_accountsCache.getPassword(list.last()); ui->lineEdit_password->setText(passwd); if(!passwd.isEmpty()) ui->checkBox_rememberPasswd->setChecked(true); } } void mainDialog::userNameCompleter_activated(const QString& user) { QString passwd = m_accountsCache.getPassword(user); ui->lineEdit_password->setText(passwd); if(!passwd.isEmpty()) ui->checkBox_rememberPasswd->setChecked(true); } void mainDialog::addAccountToCache() { QString bareJid = ui->lineEdit_userName->text(); QString passwd = ui->lineEdit_password->text(); if(!ui->checkBox_rememberPasswd->isChecked()) passwd = ""; m_accountsCache.addAccount(bareJid, passwd); } void mainDialog::action_signOut() { m_xmppClient.disconnectFromServer(); // update widget m_statusWidget.setStatusText( presenceToStatusText(m_xmppClient.clientPresence())); } void mainDialog::action_quit() { m_xmppClient.disconnectFromServer(); QApplication::quit(); } void mainDialog::createTrayIconAndMenu() { bool check; Q_UNUSED(check); check = connect(&m_quitAction, SIGNAL(triggered()), SLOT(action_quit())); Q_ASSERT(check); check = connect(&m_signOutAction, SIGNAL(triggered()), SLOT(action_signOut())); Q_ASSERT(check); #ifndef QT_NO_SYSTEMTRAYICON m_trayIcon.setIcon(QIcon(":/icons/resource/icon.png")); check = connect(&m_trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), SLOT(action_trayIconActivated(QSystemTrayIcon::ActivationReason))); Q_ASSERT(check); m_trayIconMenu.addAction(&m_signOutAction); m_trayIconMenu.addSeparator(); m_trayIconMenu.addAction(&m_quitAction); m_trayIcon.setContextMenu(&m_trayIconMenu); m_trayIcon.show(); #endif } void mainDialog::createSettingsMenu() { m_settingsMenu = new QMenu(ui->pushButton_settings); // ui->pushButton_settings->setMenu(m_settingsMenu); QAction* aboutDlg = new QAction("About", ui->pushButton_settings); connect(aboutDlg, SIGNAL(triggered()), SLOT(action_aboutDlg())); m_settingsMenu->addAction(aboutDlg); m_settingsMenu->addSeparator(); QAction* showXml = new QAction("Show XML Console...", ui->pushButton_settings); connect(showXml, SIGNAL(triggered()), SLOT(action_showXml())); m_settingsMenu->addAction(showXml); QMenu* viewMenu = new QMenu("View", ui->pushButton_settings); m_settingsMenu->addMenu(viewMenu); QAction* showOfflineContacts = new QAction("Show offline contacts", ui->pushButton_settings); showOfflineContacts->setCheckable(true); showOfflineContacts->setChecked(true); connect(showOfflineContacts, SIGNAL(triggered(bool)), &m_rosterItemSortFilterModel, SLOT(setShowOfflineContacts(bool))); viewMenu->addAction(showOfflineContacts); QAction* sortByName = new QAction("Sort by name", ui->pushButton_settings); sortByName->setCheckable(true); sortByName->setChecked(false); connect(sortByName, SIGNAL(triggered(bool)), &m_rosterItemSortFilterModel, SLOT(sortByName(bool))); viewMenu->addAction(sortByName); m_settingsMenu->addSeparator(); m_settingsMenu->addAction(&m_quitAction); } void mainDialog::closeEvent(QCloseEvent *event) { hide(); event->ignore(); } void mainDialog::action_trayIconActivated(QSystemTrayIcon::ActivationReason reason) { switch(reason) { case QSystemTrayIcon::Trigger: case QSystemTrayIcon::DoubleClick: show(); break; default: ; } } void mainDialog::action_addContact() { bool ok; QString bareJid = QInputDialog::getText(this, "Add a jabber contact", "Contact ID:", QLineEdit::Normal, "", &ok); if(!ok) return; if(!isValidBareJid(bareJid)) { QMessageBox::information(this, "Invalid ID", "Specified ID "+bareJid + " is invalid."); return; } if(ok && !bareJid.isEmpty()) { QXmppPresence subscribe; subscribe.setTo(bareJid); subscribe.setType(QXmppPresence::Subscribe); m_xmppClient.sendPacket(subscribe); } } void mainDialog::presenceReceived(const QXmppPresence& presence) { QString from = presence.from(); QString message; switch(presence.type()) { case QXmppPresence::Subscribe: { message = "%1 wants to subscribe"; int retButton = QMessageBox::question( this, "Contact Subscription", message.arg(from), QMessageBox::Yes, QMessageBox::No); switch(retButton) { case QMessageBox::Yes: { QXmppPresence subscribed; subscribed.setTo(from); subscribed.setType(QXmppPresence::Subscribed); m_xmppClient.sendPacket(subscribed); // reciprocal subscription QXmppPresence subscribe; subscribe.setTo(from); subscribe.setType(QXmppPresence::Subscribe); m_xmppClient.sendPacket(subscribe); } break; case QMessageBox::No: { QXmppPresence unsubscribed; unsubscribed.setTo(from); unsubscribed.setType(QXmppPresence::Unsubscribed); m_xmppClient.sendPacket(unsubscribed); } break; default: break; } return; } break; case QXmppPresence::Subscribed: message = "%1 accepted your request"; break; case QXmppPresence::Unsubscribe: message = "%1 unsubscribe"; break; case QXmppPresence::Unsubscribed: message = "%1 unsubscribed"; break; default: return; break; } if(message.isEmpty()) return; QMessageBox::information(this, "Contact Subscription", message.arg(from), QMessageBox::Ok); } void mainDialog::action_removeContact(const QString& bareJid) { if(!isValidBareJid(bareJid)) return; int answer = QMessageBox::question(this, "Remove contact", QString("Do you want to remove the contact %1").arg(bareJid), QMessageBox::Yes, QMessageBox::No); if(answer == QMessageBox::Yes) { QXmppRosterIq remove; remove.setType(QXmppIq::Set); QXmppRosterIq::Item itemRemove; itemRemove.setSubscriptionType(QXmppRosterIq::Item::Remove); itemRemove.setBareJid(bareJid); remove.addItem(itemRemove); m_xmppClient.sendPacket(remove); m_rosterItemModel.removeRosterEntry(bareJid); } } void mainDialog::errorClient(QXmppClient::Error error) { ui->label_throbber->hide(); showSignInPage(); switch(error) { case QXmppClient::SocketError: showLoginStatus("Socket error"); break; case QXmppClient::KeepAliveError: showLoginStatus("Keep alive error"); break; case QXmppClient::XmppStreamError: switch(m_xmppClient.xmppStreamError()) { case QXmppStanza::Error::NotAuthorized: showLoginStatus("Invalid password"); break; default: showLoginStatus("Stream error"); break; } break; default: break; } } void mainDialog::action_showXml() { m_consoleDlg.show(); } void mainDialog::addPhotoHash(QXmppPresence& pre) { QString clientBareJid = m_xmppClient.configuration().jidBare(); if(m_vCardCache.isVCardAvailable(clientBareJid)) { QByteArray hash = m_vCardCache.getPhotoHash(clientBareJid); if(hash.isEmpty()) pre.setVCardUpdateType(QXmppPresence::VCardUpdateNoPhoto); else pre.setVCardUpdateType(QXmppPresence::VCardUpdateValidPhoto); pre.setPhotoHash(hash); } else { pre.setVCardUpdateType(QXmppPresence::VCardUpdateNone); pre.setPhotoHash(QByteArray()); } } void mainDialog::action_aboutDlg() { aboutDialog abtDlg(this); abtDlg.exec(); } void mainDialog::action_settingsPressed() { m_settingsMenu->exec(ui->pushButton_settings->mapToGlobal(QPoint(0, ui->pushButton_settings->height()))); } qxmpp-0.7.6/examples/GuiClient/rosterItemSortFilterProxyModel.h0000644000175000007640000000242212116723562024666 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef ROSTERITEMSORTFILTERPROXYMODEL_H #define ROSTERITEMSORTFILTERPROXYMODEL_H #include class rosterItemSortFilterProxyModel : public QSortFilterProxyModel { Q_OBJECT public: rosterItemSortFilterProxyModel(QObject* parent = 0); public slots: void setShowOfflineContacts(bool); void sortByName(bool); private: bool lessThan(const QModelIndex &left, const QModelIndex &right) const; bool filterAcceptsRow(int, const QModelIndex&) const; bool m_showOfflineContacts; bool m_sortByName; }; #endif // ROSTERITEMSORTFILTERPROXYMODEL_H qxmpp-0.7.6/examples/GuiClient/rosterItemModel.h0000644000175000007640000000305412116723562021610 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef ROSTERITEMMODEL_H #define ROSTERITEMMODEL_H #include #include "rosterItem.h" #include "QXmppRosterManager.h" #include "QXmppPresence.h" class rosterItemModel : public QStandardItemModel { public: rosterItemModel(QObject* parent); rosterItem* getRosterItemFromBareJid(const QString& bareJid); void updatePresence(const QString& bareJid, const QMap& presences); void updateRosterEntry(const QString& bareJid, const QXmppRosterIq::Item& rosterEntry); void updateAvatar(const QString& bareJid, const QImage& image); void updateName(const QString& bareJid, const QString& name); void removeRosterEntry(const QString& bareJid); void clear(); private: rosterItem* getOrCreateItem(const QString& bareJid); QMap m_jidRosterItemMap; }; #endif // ROSTERITEMMODEL_H qxmpp-0.7.6/examples/GuiClient/profileDialog.cpp0000644000175000007640000001326112116723562021606 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "profileDialog.h" #include "ui_profileDialog.h" #include "utils.h" #include "QXmppClient.h" #include "QXmppVersionIq.h" #include "QXmppVersionManager.h" #include "QXmppRosterManager.h" #include "QXmppUtils.h" #include "QXmppEntityTimeManager.h" #include "QXmppEntityTimeIq.h" #include "QXmppConstants.h" profileDialog::profileDialog(QWidget *parent, const QString& bareJid, QXmppClient& client, capabilitiesCache& caps) : QDialog(parent, Qt::WindowTitleHint|Qt::WindowSystemMenuHint), ui(new Ui::profileDialog), m_bareJid(bareJid), m_xmppClient(client), m_caps(caps) { bool check; Q_UNUSED(check); ui->setupUi(this); check = connect(&m_xmppClient.versionManager(), SIGNAL(versionReceived(QXmppVersionIq)), SLOT(versionReceived(QXmppVersionIq))); Q_ASSERT(check); QXmppEntityTimeManager* timeManager = m_xmppClient.findExtension(); if(timeManager) { check = connect(timeManager, SIGNAL(timeReceived(QXmppEntityTimeIq)), SLOT(timeReceived(QXmppEntityTimeIq))); Q_ASSERT(check); } QStringList resources = m_xmppClient.rosterManager().getResources(bareJid); foreach(QString resource, resources) { QString jid = bareJid + "/" + resource; m_xmppClient.versionManager().requestVersion(jid); if(timeManager) timeManager->requestTime(jid); } updateText(); } profileDialog::~profileDialog() { delete ui; } void profileDialog::setAvatar(const QImage& image) { ui->label_avatar->setPixmap(QPixmap::fromImage(image)); } void profileDialog::setBareJid(const QString& bareJid) { ui->label_jid->setText(bareJid); setWindowTitle(bareJid); } void profileDialog::setFullName(const QString& fullName) { if(fullName.isEmpty()) ui->label_fullName->hide(); else ui->label_fullName->show(); ui->label_fullName->setText(fullName); } void profileDialog::setStatusText(const QString& status) { ui->label_status->setText(status); } void profileDialog::versionReceived(const QXmppVersionIq& ver) { m_versions[QXmppUtils::jidToResource(ver.from())] = ver; if(ver.type() == QXmppIq::Result) updateText(); } void profileDialog::timeReceived(const QXmppEntityTimeIq& time) { m_time[QXmppUtils::jidToResource(time.from())] = time; if(time.type() == QXmppIq::Result) updateText(); } void profileDialog::updateText() { QStringList resources = m_xmppClient.rosterManager().getResources(m_bareJid); QString statusText; for(int i = 0; i < resources.count(); ++i) { QString resource = resources.at(i); statusText += "Resource: " + resource; statusText += "
"; QXmppPresence presence = m_xmppClient.rosterManager().getPresence(m_bareJid, resource); statusText += "Status: " + presenceToStatusText(presence); statusText += "
"; if(m_versions.contains(resource)) { statusText += "Software: " + QString("%1 %2 %3"). arg(m_versions[resource].name()). arg(m_versions[resource].version()). arg(m_versions[resource].os()); statusText += "
"; } if(m_time.contains(resource)) { statusText += "Time: " + QString("utc=%1 [tzo=%2]"). arg(m_time[resource].utc().toString()). arg(QXmppUtils::timezoneOffsetToString(m_time[resource].tzo())); statusText += "
"; } statusText += getCapability(resource); if(i < resources.count() - 1) // skip for the last item statusText += "
"; } setStatusText(statusText); } QString profileDialog::getCapability(const QString& resource) { QMap presences = m_xmppClient.rosterManager(). getAllPresencesForBareJid(m_bareJid); QXmppPresence& pre = presences[resource]; QString nodeVer; QStringList resultFeatures; QStringList resultIdentities; QString node = pre.capabilityNode(); QString ver = pre.capabilityVer().toBase64(); QStringList exts = pre.capabilityExt(); nodeVer = node + "#" + ver; if(m_caps.isCapabilityAvailable(nodeVer)) { resultFeatures << m_caps.getFeatures(nodeVer); resultIdentities << m_caps.getIdentities(nodeVer); } foreach(QString ext, exts) { nodeVer = node + "#" + ext; if(m_caps.isCapabilityAvailable(nodeVer)) { resultFeatures << m_caps.getFeatures(nodeVer); resultIdentities << m_caps.getIdentities(nodeVer); } } resultIdentities.removeDuplicates(); resultFeatures.removeDuplicates(); QString result; result += "Disco Identities:
"; result += resultIdentities.join("
"); result += "
"; result += "Disco Features:
"; result += resultFeatures.join("
"); result += "
"; return result; } qxmpp-0.7.6/examples/examples.pri0000644000175000007640000000073112116723562016767 0ustar sharkyjerrywebinclude(../qxmpp.pri) TEMPLATE = app CONFIG += console QMAKE_LIBDIR += ../../src INCLUDEPATH += $$QXMPP_INCLUDEPATH LIBS += $$QXMPP_LIBS # Symbian packaging rules symbian { vendorinfo = \ "; Localised Vendor name" \ "%{\"QXmpp\"}" \ " " \ "; Unique Vendor name" \ ":\"QXmpp\"" \ " " examples_deployment.pkg_prerules += vendorinfo DEPLOYMENT += examples_deployment TARGET.CAPABILITY = "NetworkServices" } qxmpp-0.7.6/examples/example_2_rosterHandling/0000755000175000007640000000000012116723562021353 5ustar sharkyjerrywebqxmpp-0.7.6/examples/example_2_rosterHandling/example_2_rosterHandling.cpp0000644000175000007640000000456412116723562027007 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include "QXmppMessage.h" #include "QXmppRosterManager.h" #include "example_2_rosterHandling.h" xmppClient::xmppClient(QObject *parent) : QXmppClient(parent) { bool check; Q_UNUSED(check); check = connect(this, SIGNAL(connected()), SLOT(clientConnected())); Q_ASSERT(check); check = connect(&this->rosterManager(), SIGNAL(rosterReceived()), SLOT(rosterReceived())); Q_ASSERT(check); /// Then QXmppRoster::presenceChanged() is emitted whenever presence of someone /// in roster changes check = connect(&this->rosterManager(), SIGNAL(presenceChanged(QString,QString)), SLOT(presenceChanged(QString,QString))); Q_ASSERT(check); } xmppClient::~xmppClient() { } void xmppClient::clientConnected() { qDebug("example_2_rosterHandling:: CONNECTED"); } void xmppClient::rosterReceived() { qDebug("example_2_rosterHandling:: Roster received"); foreach (const QString &bareJid, rosterManager().getRosterBareJids()) { QString name = rosterManager().getRosterEntry(bareJid).name(); if(name.isEmpty()) name = "-"; qDebug("example_2_rosterHandling:: Roster received: %s [%s]", qPrintable(bareJid), qPrintable(name)); } } void xmppClient::presenceChanged(const QString& bareJid, const QString& resource) { qDebug("example_2_rosterHandling:: Presence changed %s/%s", qPrintable(bareJid), qPrintable(resource)); } int main(int argc, char *argv[]) { QCoreApplication app(argc, argv); xmppClient client; client.connectToServer("qxmpp.test1@qxmpp.org", "qxmpp123"); return app.exec(); } qxmpp-0.7.6/examples/example_2_rosterHandling/example_2_rosterHandling.h0000644000175000007640000000204712116723562026446 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef XMPPCLIENT_H #define XMPPCLIENT_H #include "QXmppClient.h" class xmppClient : public QXmppClient { Q_OBJECT public: xmppClient(QObject *parent = 0); ~xmppClient(); public slots: void clientConnected(); void rosterReceived(); void presenceChanged(const QString& bareJid, const QString& resource); }; #endif // XMPPCLIENT_H qxmpp-0.7.6/examples/example_2_rosterHandling/example_2_rosterHandling.pro0000644000175000007640000000024312116723562027013 0ustar sharkyjerrywebinclude(../examples.pri) TARGET = example_2_rosterHandling SOURCES += example_2_rosterHandling.cpp HEADERS += example_2_rosterHandling.h OTHER_FILES += README qxmpp-0.7.6/examples/example_2_rosterHandling/README0000644000175000007640000000010612116723562022230 0ustar sharkyjerrywebThis example demonstrates how to get the roster and presence updates. qxmpp-0.7.6/examples/example_0_connected/0000755000175000007640000000000012116723562020330 5ustar sharkyjerrywebqxmpp-0.7.6/examples/example_0_connected/example_0_connected.pro0000644000175000007640000000016212116723562024745 0ustar sharkyjerrywebinclude(../examples.pri) TARGET = example_0_connected SOURCES += example_0_connected.cpp OTHER_FILES += README qxmpp-0.7.6/examples/example_0_connected/example_0_connected.cpp0000644000175000007640000000227512116723562024736 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include "QXmppClient.h" #include "QXmppLogger.h" int main(int argc, char *argv[]) { QCoreApplication app(argc, argv); QXmppClient client; client.logger()->setLoggingType(QXmppLogger::StdoutLogging); // For jabber // client.connectToServer("username@jabber.org", "passwd"); // For google talk // client.connectToServer("username@gmail.com", "passwd"); client.connectToServer("qxmpp.test1@qxmpp.org", "qxmpp123"); return app.exec(); } qxmpp-0.7.6/examples/example_0_connected/README0000644000175000007640000000044412116723562021212 0ustar sharkyjerrywebThis example just connects to the xmpp server. And start receiving presences (updates) from the server. After running this example, you can see this user online, if it's added in your roster (friends list). Logging type has been set to stdout. You can see the progress on the command line. qxmpp-0.7.6/examples/example_4_callHandling/0000755000175000007640000000000012116723562020752 5ustar sharkyjerrywebqxmpp-0.7.6/examples/example_4_callHandling/example_4_callHandling.pro0000644000175000007640000000040212116723562026006 0ustar sharkyjerrywebinclude(../examples.pri) CONFIG += mobility MOBILITY += multimedia TARGET = example_4_callHandling SOURCES += example_4_callHandling.cpp HEADERS += example_4_callHandling.h # Symbian packaging rules symbian { TARGET.CAPABILITY = "UserEnvironment" } qxmpp-0.7.6/examples/example_4_callHandling/example_4_callHandling.cpp0000644000175000007640000001613512116723562026002 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Ian Reinhart Geiser * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include #include #include #include #include #include #include "QXmppCallManager.h" #include "QXmppJingleIq.h" #include "QXmppRtpChannel.h" #include "QXmppUtils.h" #include "example_4_callHandling.h" xmppClient::xmppClient(QObject *parent) : QXmppClient(parent) , m_turnPort(0) , m_turnFinished(false) { bool check; Q_UNUSED(check); // add QXmppCallManager extension callManager = new QXmppCallManager; addExtension(callManager); check = connect(this, SIGNAL(connected()), this, SLOT(slotConnected())); Q_ASSERT(check); check = connect(this, SIGNAL(presenceReceived(QXmppPresence)), this, SLOT(slotPresenceReceived(QXmppPresence))); Q_ASSERT(check); check = connect(callManager, SIGNAL(callReceived(QXmppCall*)), this, SLOT(slotCallReceived(QXmppCall*))); Q_ASSERT(check); check = connect(&m_dns, SIGNAL(finished()), this, SLOT(slotDnsLookupFinished())); Q_ASSERT(check); } void xmppClient::setRecipient(const QString &recipient) { m_recipient = recipient; } /// The audio mode of a call changed. void xmppClient::slotAudioModeChanged(QIODevice::OpenMode mode) { QXmppCall *call = qobject_cast(sender()); Q_ASSERT(call); QXmppRtpAudioChannel *channel = call->audioChannel(); // prepare audio format QAudioFormat format; format.setFrequency(channel->payloadType().clockrate()); format.setChannels(channel->payloadType().channels()); format.setSampleSize(16); format.setCodec("audio/pcm"); format.setByteOrder(QAudioFormat::LittleEndian); format.setSampleType(QAudioFormat::SignedInt); // the size in bytes of the audio buffers to/from sound devices // 160 ms seems to be the minimum to work consistently on Linux/Mac/Windows const int bufferSize = (format.frequency() * format.channels() * (format.sampleSize() / 8) * 160) / 1000; if (mode & QIODevice::ReadOnly) { // initialise audio output QAudioOutput *audioOutput = new QAudioOutput(format, this); audioOutput->setBufferSize(bufferSize); audioOutput->start(channel); } if (mode & QIODevice::WriteOnly) { // initialise audio input QAudioInput *audioInput = new QAudioInput(format, this); audioInput->setBufferSize(bufferSize); audioInput->start(channel); } } /// A call was received. void xmppClient::slotCallReceived(QXmppCall *call) { bool check; Q_UNUSED(check); qDebug() << "Got call from:" << call->jid(); check = connect(call, SIGNAL(stateChanged(QXmppCall::State)), this, SLOT(slotCallStateChanged(QXmppCall::State))); Q_ASSERT(check); check = connect(call, SIGNAL(audioModeChanged(QIODevice::OpenMode)), this, SLOT(slotAudioModeChanged(QIODevice::OpenMode))); Q_ASSERT(check); // accept call call->accept(); } /// A call changed state. void xmppClient::slotCallStateChanged(QXmppCall::State state) { if (state == QXmppCall::ActiveState) qDebug("Call active"); else if (state == QXmppCall::DisconnectingState) qDebug("Call disconnecting"); else if (state == QXmppCall::FinishedState) qDebug("Call finished"); } void xmppClient::slotConnected() { // lookup TURN server const QString domain = configuration().domain(); debug(QString("Looking up TURN server for domain %1").arg(domain)); m_dns.setType(QDnsLookup::SRV); m_dns.setName("_turn._udp." + domain); m_dns.lookup(); } /// The DNS SRV lookup for TURN completed. void xmppClient::slotDnsLookupFinished() { QString serverName; if (m_dns.error() == QDnsLookup::NoError && !m_dns.serviceRecords().isEmpty()) { m_turnPort = m_dns.serviceRecords().first().port(); QHostInfo::lookupHost(m_dns.serviceRecords().first().target(), this, SLOT(slotHostInfoFinished(QHostInfo))); } else { warning("Could not find STUN server for domain " + configuration().domain()); m_turnFinished = true; startCall(); } } void xmppClient::slotHostInfoFinished(const QHostInfo &hostInfo) { if (!hostInfo.addresses().isEmpty()) { info(QString("Found TURN server %1 port %2 for domain %3").arg(hostInfo.addresses().first().toString(), QString::number(m_turnPort), configuration().domain())); callManager->setTurnServer(hostInfo.addresses().first(), m_turnPort); callManager->setTurnUser(configuration().user()); callManager->setTurnPassword(configuration().password()); } m_turnFinished = true; startCall(); } /// A presence was received. void xmppClient::slotPresenceReceived(const QXmppPresence &presence) { // if we don't have a recipient, or if the presence is not from the recipient, // do nothing if (m_recipient.isEmpty() || QXmppUtils::jidToBareJid(presence.from()) != m_recipient || presence.type() != QXmppPresence::Available) return; // start the call and connect to the its signals m_recipientFullJid = presence.from(); startCall(); } void xmppClient::startCall() { bool check; Q_UNUSED(check); if (!m_turnFinished || m_recipientFullJid.isEmpty()) return; // start the call and connect to the its signals QXmppCall *call = callManager->call(m_recipientFullJid); check = connect(call, SIGNAL(stateChanged(QXmppCall::State)), this, SLOT(slotCallStateChanged(QXmppCall::State))); Q_ASSERT(check); check = connect(call, SIGNAL(audioModeChanged(QIODevice::OpenMode)), this, SLOT(slotAudioModeChanged(QIODevice::OpenMode))); Q_ASSERT(check); } int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); // we want one argument : "send" or "receive" if (argc != 2 || (strcmp(argv[1], "send") && strcmp(argv[1], "receive"))) { fprintf(stderr, "Usage: %s send|receive\n", argv[0]); return EXIT_FAILURE; } xmppClient client; client.logger()->setLoggingType(QXmppLogger::StdoutLogging); if (!strcmp(argv[1], "send")) { client.setRecipient("qxmpp.test2@qxmpp.org"); client.connectToServer("qxmpp.test1@qxmpp.org", "qxmpp123"); } else { client.connectToServer("qxmpp.test2@qxmpp.org", "qxmpp456"); } return a.exec(); } qxmpp-0.7.6/examples/example_4_callHandling/example_4_callHandling.h0000644000175000007640000000304412116723562025442 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Ian Reinhart Geiser * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef XMPPCLIENT_H #define XMPPCLIENT_H #include "QXmppCallManager.h" #include "QXmppClient.h" #include "qdnslookup.h" class QHostInfo; class xmppClient : public QXmppClient { Q_OBJECT public: xmppClient(QObject *parent = 0); void setRecipient(const QString &recipient); private slots: void slotAudioModeChanged(QIODevice::OpenMode mode); void slotCallReceived(QXmppCall *call); void slotCallStateChanged(QXmppCall::State state); void slotConnected(); void slotDnsLookupFinished(); void slotHostInfoFinished(const QHostInfo &hostInfo); void slotPresenceReceived(const QXmppPresence &presence); private: void startCall(); QXmppCallManager *callManager; QDnsLookup m_dns; QString m_recipient; QString m_recipientFullJid; quint16 m_turnPort; bool m_turnFinished; }; #endif // IBBCLIENT_H qxmpp-0.7.6/examples/example_5_rpcInterface/0000755000175000007640000000000012116723562021000 5ustar sharkyjerrywebqxmpp-0.7.6/examples/example_5_rpcInterface/remoteinterface.h0000644000175000007640000000055112116723562024326 0ustar sharkyjerryweb#ifndef REMOTEINTERFACE_H #define REMOTEINTERFACE_H #include "QXmppRpcManager.h" class RemoteInterface : public QXmppInvokable { Q_OBJECT public: RemoteInterface(QObject *parent = 0); bool isAuthorized( const QString &jid ) const; // RPC Interface public slots: QString echoString( const QString &message ); }; #endif // REMOTEINTERFACE_H qxmpp-0.7.6/examples/example_5_rpcInterface/example_5_rpcInterface.pro0000644000175000007640000000024512116723562026067 0ustar sharkyjerrywebinclude(../examples.pri) TARGET = example_5_rpcInterface SOURCES += main.cpp \ remoteinterface.cpp HEADERS += remoteinterface.h OTHER_FILES += README qxmpp-0.7.6/examples/example_5_rpcInterface/remoteinterface.cpp0000644000175000007640000000046512116723562024665 0ustar sharkyjerryweb#include "remoteinterface.h" RemoteInterface::RemoteInterface(QObject *parent) : QXmppInvokable(parent) { } bool RemoteInterface::isAuthorized( const QString &jid ) const { Q_UNUSED(jid); return true; } QString RemoteInterface::echoString(const QString& message) { return "Echo: " + message; } qxmpp-0.7.6/examples/example_5_rpcInterface/xmlrpctest.txt0000644000175000007640000000255612116723562023756 0ustar sharkyjerryweb client telnet Passw0rd RemoteInterface.echoString Test string RemoteInterface.badMethod Test string BadInterface.echoString Test string qxmpp-0.7.6/examples/example_5_rpcInterface/main.cpp0000644000175000007640000000245512116723562022436 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Manjeet Dahiya * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include "QXmppClient.h" #include "QXmppLogger.h" #include "QXmppRpcManager.h" #include "remoteinterface.h" int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); QXmppLogger::getLogger()->setLoggingType(QXmppLogger::StdoutLogging); QXmppClient client; // add RPC extension and register interface QXmppRpcManager *manager = new QXmppRpcManager; client.addExtension(manager); manager->addInvokableInterface(new RemoteInterface(&client)); client.connectToServer("qxmpp.test1@qxmpp.org", "qxmpp123"); return a.exec(); } qxmpp-0.7.6/AUTHORS0000644000175000007640000000051612116723562013670 0ustar sharkyjerrywebQXMPP AUTHORS ------------- Manjeet Dahiya * Initial author of QXmpp. Jeremy Lainé * Co-author of QXmpp. Ian Reinhart Geiser * Initial author of Jabber-RPC support. Georg Rudoy <0xd34df00d@gmail.com> * Author of receipts manager, extended stanza addressing. qxmpp-0.7.6/src/0000755000175000007640000000000012116723562013405 5ustar sharkyjerrywebqxmpp-0.7.6/src/client/0000755000175000007640000000000012116723562014663 5ustar sharkyjerrywebqxmpp-0.7.6/src/client/client.pri0000644000175000007640000000252512116723562016661 0ustar sharkyjerryweb# Header files INSTALL_HEADERS += \ client/QXmppArchiveManager.h \ client/QXmppBookmarkManager.h \ client/QXmppCallManager.h \ client/QXmppClient.h \ client/QXmppClientExtension.h \ client/QXmppConfiguration.h \ client/QXmppDiscoveryManager.h \ client/QXmppEntityTimeManager.h \ client/QXmppInvokable.h \ client/QXmppMessageReceiptManager.h \ client/QXmppMucManager.h \ client/QXmppOutgoingClient.h \ client/QXmppRemoteMethod.h \ client/QXmppRosterManager.h \ client/QXmppRpcManager.h \ client/QXmppTransferManager.h \ client/QXmppTransferManager_p.h \ client/QXmppVCardManager.h \ client/QXmppVersionManager.h # Source files SOURCES += \ client/QXmppDiscoveryManager.cpp \ client/QXmppArchiveManager.cpp \ client/QXmppBookmarkManager.cpp \ client/QXmppCallManager.cpp \ client/QXmppClient.cpp \ client/QXmppClientExtension.cpp \ client/QXmppConfiguration.cpp \ client/QXmppEntityTimeManager.cpp \ client/QXmppInvokable.cpp \ client/QXmppMessageReceiptManager.cpp \ client/QXmppMucManager.cpp \ client/QXmppOutgoingClient.cpp \ client/QXmppRemoteMethod.cpp \ client/QXmppRosterManager.cpp \ client/QXmppRpcManager.cpp \ client/QXmppTransferManager.cpp \ client/QXmppVCardManager.cpp \ client/QXmppVersionManager.cpp qxmpp-0.7.6/src/client/QXmppRemoteMethod.h0000644000175000007640000000301312116723562020413 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Ian Reinhart Geiser * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPREMOTEMETHOD_H #define QXMPPREMOTEMETHOD_H #include #include #include "QXmppRpcIq.h" class QXmppClient; struct QXmppRemoteMethodResult { QXmppRemoteMethodResult() : hasError(false), code(0) { } bool hasError; int code; QString errorMessage; QVariant result; }; class QXMPP_EXPORT QXmppRemoteMethod : public QObject { Q_OBJECT public: QXmppRemoteMethod(const QString &jid, const QString &method, const QVariantList &args, QXmppClient *client); QXmppRemoteMethodResult call( ); private slots: void gotError( const QXmppRpcErrorIq &iq ); void gotResult( const QXmppRpcResponseIq &iq ); signals: void callDone(); private: QXmppRpcInvokeIq m_payload; QXmppClient *m_client; QXmppRemoteMethodResult m_result; }; #endif // QXMPPREMOTEMETHOD_H qxmpp-0.7.6/src/client/QXmppEntityTimeManager.cpp0000644000175000007640000000432512116723562021747 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "QXmppEntityTimeManager.h" #include #include #include "QXmppClient.h" #include "QXmppConstants.h" #include "QXmppEntityTimeIq.h" #include "QXmppUtils.h" /// Request the time from an XMPP entity. /// /// \param jid QString QXmppEntityTimeManager::requestTime(const QString& jid) { QXmppEntityTimeIq request; request.setType(QXmppIq::Get); request.setTo(jid); if(client()->sendPacket(request)) return request.id(); else return QString(); } /// \cond QStringList QXmppEntityTimeManager::discoveryFeatures() const { return QStringList() << ns_entity_time; } bool QXmppEntityTimeManager::handleStanza(const QDomElement &element) { if(element.tagName() == "iq" && QXmppEntityTimeIq::isEntityTimeIq(element)) { QXmppEntityTimeIq entityTime; entityTime.parse(element); if(entityTime.type() == QXmppIq::Get) { // respond to query QXmppEntityTimeIq responseIq; responseIq.setType(QXmppIq::Result); responseIq.setId(entityTime.id()); responseIq.setTo(entityTime.from()); QDateTime currentTime = QDateTime::currentDateTime(); QDateTime utc = currentTime.toUTC(); responseIq.setUtc(utc); currentTime.setTimeSpec(Qt::UTC); responseIq.setTzo(utc.secsTo(currentTime)); client()->sendPacket(responseIq); } emit timeReceived(entityTime); return true; } return false; } /// \endcond qxmpp-0.7.6/src/client/QXmppOutgoingClient.cpp0000644000175000007640000005767412116723562021332 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Manjeet Dahiya * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include #include #include #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) #include #else #include "qdnslookup.h" #endif #include "QXmppConfiguration.h" #include "QXmppConstants.h" #include "QXmppIq.h" #include "QXmppLogger.h" #include "QXmppMessage.h" #include "QXmppPresence.h" #include "QXmppOutgoingClient.h" #include "QXmppStreamFeatures.h" #include "QXmppNonSASLAuth.h" #include "QXmppSasl_p.h" #include "QXmppUtils.h" // IQ types #include "QXmppBindIq.h" #include "QXmppPingIq.h" #include "QXmppSessionIq.h" #include #include #include #include #include #include #include #include class QXmppOutgoingClientPrivate { public: QXmppOutgoingClientPrivate(QXmppOutgoingClient *q); void connectToHost(const QString &host, quint16 port); // This object provides the configuration // required for connecting to the XMPP server. QXmppConfiguration config; QXmppStanza::Error::Condition xmppStreamError; // DNS QDnsLookup dns; // Stream QString streamId; QString streamFrom; QString streamVersion; // Redirection QString redirectHost; quint16 redirectPort; // Session QString bindId; QString sessionId; bool sessionAvailable; bool sessionStarted; // Authentication bool isAuthenticated; QString nonSASLAuthId; QXmppSaslClient *saslClient; // Timers QTimer *pingTimer; QTimer *timeoutTimer; private: QXmppOutgoingClient *q; }; QXmppOutgoingClientPrivate::QXmppOutgoingClientPrivate(QXmppOutgoingClient *qq) : redirectPort(0) , sessionAvailable(false) , isAuthenticated(false) , saslClient(0) , q(qq) { } void QXmppOutgoingClientPrivate::connectToHost(const QString &host, quint16 port) { q->info(QString("Connecting to %1:%2").arg(host, QString::number(port))); // override CA certificates if requested if (!config.caCertificates().isEmpty()) q->socket()->setCaCertificates(config.caCertificates()); // respect proxy q->socket()->setProxy(config.networkProxy()); #if (QT_VERSION >= QT_VERSION_CHECK(4, 8, 0)) // set the name the SSL certificate should match q->socket()->setPeerVerifyName(config.domain()); #endif // connect to host q->socket()->connectToHost(host, port); } /// Constructs an outgoing client stream. /// /// \param parent QXmppOutgoingClient::QXmppOutgoingClient(QObject *parent) : QXmppStream(parent), d(new QXmppOutgoingClientPrivate(this)) { bool check; Q_UNUSED(check); // initialise socket QSslSocket *socket = new QSslSocket(this); setSocket(socket); check = connect(socket, SIGNAL(disconnected()), this, SLOT(_q_socketDisconnected())); Q_ASSERT(check); check = connect(socket, SIGNAL(sslErrors(QList)), this, SLOT(socketSslErrors(QList))); Q_ASSERT(check); check = connect(socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(socketError(QAbstractSocket::SocketError))); Q_ASSERT(check); // DNS lookups check = connect(&d->dns, SIGNAL(finished()), this, SLOT(_q_dnsLookupFinished())); Q_ASSERT(check); // XEP-0199: XMPP Ping d->pingTimer = new QTimer(this); check = connect(d->pingTimer, SIGNAL(timeout()), this, SLOT(pingSend())); Q_ASSERT(check); d->timeoutTimer = new QTimer(this); d->timeoutTimer->setSingleShot(true); check = connect(d->timeoutTimer, SIGNAL(timeout()), this, SLOT(pingTimeout())); Q_ASSERT(check); check = connect(this, SIGNAL(connected()), this, SLOT(pingStart())); Q_ASSERT(check); check = connect(this, SIGNAL(disconnected()), this, SLOT(pingStop())); Q_ASSERT(check); } /// Destroys an outgoing client stream. QXmppOutgoingClient::~QXmppOutgoingClient() { delete d; } /// Returns a reference to the stream's configuration. QXmppConfiguration& QXmppOutgoingClient::configuration() { return d->config; } /// Attempts to connect to the XMPP server. void QXmppOutgoingClient::connectToHost() { // if an explicit host was provided, connect to it if (!d->config.host().isEmpty() && d->config.port()) { d->connectToHost(d->config.host(), d->config.port()); return; } // otherwise, lookup server const QString domain = configuration().domain(); debug(QString("Looking up server for domain %1").arg(domain)); d->dns.setName("_xmpp-client._tcp." + domain); d->dns.setType(QDnsLookup::SRV); d->dns.lookup(); } void QXmppOutgoingClient::_q_dnsLookupFinished() { if (d->dns.error() == QDnsLookup::NoError && !d->dns.serviceRecords().isEmpty()) { // take the first returned record d->connectToHost( d->dns.serviceRecords().first().target(), d->dns.serviceRecords().first().port()); } else { // as a fallback, use domain as the host name warning(QString("Lookup for domain %1 failed: %2") .arg(d->dns.name(), d->dns.errorString())); d->connectToHost(d->config.domain(), d->config.port()); } } /// Returns true if authentication has succeeded. bool QXmppOutgoingClient::isAuthenticated() const { return d->isAuthenticated; } /// Returns true if the socket is connected and a session has been started. bool QXmppOutgoingClient::isConnected() const { return QXmppStream::isConnected() && d->sessionStarted; } void QXmppOutgoingClient::_q_socketDisconnected() { debug("Socket disconnected"); d->isAuthenticated = false; if (!d->redirectHost.isEmpty() && d->redirectPort > 0) { d->connectToHost(d->redirectHost, d->redirectPort); d->redirectHost = QString(); d->redirectPort = 0; } else { emit disconnected(); } } void QXmppOutgoingClient::socketSslErrors(const QList & error) { warning("SSL errors"); for(int i = 0; i< error.count(); ++i) warning(error.at(i).errorString()); if (configuration().ignoreSslErrors()) socket()->ignoreSslErrors(); } void QXmppOutgoingClient::socketError(QAbstractSocket::SocketError socketError) { Q_UNUSED(socketError); emit error(QXmppClient::SocketError); } /// \cond void QXmppOutgoingClient::handleStart() { QXmppStream::handleStart(); // reset stream information d->streamId.clear(); d->streamFrom.clear(); d->streamVersion.clear(); // reset authentication step if (d->saslClient) { delete d->saslClient; d->saslClient = 0; } // reset session information d->bindId.clear(); d->sessionId.clear(); d->sessionAvailable = false; d->sessionStarted = false; // start stream QByteArray data = ""); sendData(data); } void QXmppOutgoingClient::handleStream(const QDomElement &streamElement) { if(d->streamId.isEmpty()) d->streamId = streamElement.attribute("id"); if (d->streamFrom.isEmpty()) d->streamFrom = streamElement.attribute("from"); if(d->streamVersion.isEmpty()) { d->streamVersion = streamElement.attribute("version"); // no version specified, signals XMPP Version < 1.0. // switch to old auth mechanism if enabled if(d->streamVersion.isEmpty() && configuration().useNonSASLAuthentication()) { sendNonSASLAuthQuery(); } } } void QXmppOutgoingClient::handleStanza(const QDomElement &nodeRecv) { // if we receive any kind of data, stop the timeout timer d->timeoutTimer->stop(); const QString ns = nodeRecv.namespaceURI(); // give client opportunity to handle stanza bool handled = false; emit elementReceived(nodeRecv, handled); if (handled) return; if(QXmppStreamFeatures::isStreamFeatures(nodeRecv)) { QXmppStreamFeatures features; features.parse(nodeRecv); if (!socket()->isEncrypted()) { // determine TLS mode to use const QXmppConfiguration::StreamSecurityMode localSecurity = configuration().streamSecurityMode(); const QXmppStreamFeatures::Mode remoteSecurity = features.tlsMode(); if (!socket()->supportsSsl() && (localSecurity == QXmppConfiguration::TLSRequired || remoteSecurity == QXmppStreamFeatures::Required)) { warning("Disconnecting as TLS is required, but SSL support is not available"); disconnectFromHost(); return; } if (localSecurity == QXmppConfiguration::TLSRequired && remoteSecurity == QXmppStreamFeatures::Disabled) { warning("Disconnecting as TLS is required, but not supported by the server"); disconnectFromHost(); return; } if (socket()->supportsSsl() && localSecurity != QXmppConfiguration::TLSDisabled && remoteSecurity != QXmppStreamFeatures::Disabled) { // enable TLS as it is support by both parties sendData(""); return; } } // handle authentication const bool nonSaslAvailable = features.nonSaslAuthMode() != QXmppStreamFeatures::Disabled; const bool saslAvailable = !features.authMechanisms().isEmpty(); if (saslAvailable && configuration().useSASLAuthentication()) { // supported and preferred SASL auth mechanisms QStringList supportedMechanisms = QXmppSaslClient::availableMechanisms(); const QString preferredMechanism = configuration().saslAuthMechanism(); if (configuration().facebookAppId().isEmpty() || configuration().facebookAccessToken().isEmpty()) supportedMechanisms.removeAll("X-FACEBOOK-PLATFORM"); if (configuration().windowsLiveAccessToken().isEmpty()) supportedMechanisms.removeAll("X-MESSENGER-OAUTH2"); if (configuration().googleAccessToken().isEmpty()) supportedMechanisms.removeAll("X-OAUTH2"); // determine SASL Authentication mechanism to use QStringList commonMechanisms; QString usedMechanism; foreach (const QString &mechanism, features.authMechanisms()) { if (supportedMechanisms.contains(mechanism)) commonMechanisms << mechanism; } if (commonMechanisms.isEmpty()) { warning("No supported SASL Authentication mechanism available"); disconnectFromHost(); return; } else if (!commonMechanisms.contains(preferredMechanism)) { info(QString("Desired SASL Auth mechanism '%1' is not available, selecting first available one").arg(preferredMechanism)); usedMechanism = commonMechanisms.first(); } else { usedMechanism = preferredMechanism; } d->saslClient = QXmppSaslClient::create(usedMechanism, this); if (!d->saslClient) { warning("SASL mechanism negotiation failed"); disconnectFromHost(); return; } info(QString("SASL mechanism '%1' selected").arg(d->saslClient->mechanism())); d->saslClient->setHost(d->config.domain()); d->saslClient->setServiceType("xmpp"); if (d->saslClient->mechanism() == "X-FACEBOOK-PLATFORM") { d->saslClient->setUsername(configuration().facebookAppId()); d->saslClient->setPassword(configuration().facebookAccessToken()); } else if (d->saslClient->mechanism() == "X-MESSENGER-OAUTH2") { d->saslClient->setPassword(configuration().windowsLiveAccessToken()); } else if (d->saslClient->mechanism() == "X-OAUTH2") { d->saslClient->setUsername(configuration().user()); d->saslClient->setPassword(configuration().googleAccessToken()); } else { d->saslClient->setUsername(configuration().user()); d->saslClient->setPassword(configuration().password()); } // send SASL auth request QByteArray response; if (!d->saslClient->respond(QByteArray(), response)) { warning("SASL initial response failed"); disconnectFromHost(); return; } sendPacket(QXmppSaslAuth(d->saslClient->mechanism(), response)); return; } else if(nonSaslAvailable && configuration().useNonSASLAuthentication()) { sendNonSASLAuthQuery(); return; } // store whether session is available d->sessionAvailable = (features.sessionMode() != QXmppStreamFeatures::Disabled); // check whether bind is available if (features.bindMode() != QXmppStreamFeatures::Disabled) { QXmppBindIq bind; bind.setType(QXmppIq::Set); bind.setResource(configuration().resource()); d->bindId = bind.id(); sendPacket(bind); return; } // check whether session is available if (d->sessionAvailable) { // start session if it is available QXmppSessionIq session; session.setType(QXmppIq::Set); session.setTo(configuration().domain()); d->sessionId = session.id(); sendPacket(session); } else { // otherwise we are done d->sessionStarted = true; emit connected(); } } else if(ns == ns_stream && nodeRecv.tagName() == "error") { // handle redirects QRegExp redirectRegex("([^:]+)(:[0-9]+)?"); if (redirectRegex.exactMatch(nodeRecv.firstChildElement("see-other-host").text())) { d->redirectHost = redirectRegex.cap(0); if (!redirectRegex.cap(2).isEmpty()) d->redirectPort = redirectRegex.cap(2).mid(1).toUShort(); else d->redirectPort = 5222; disconnectFromHost(); return; } if (!nodeRecv.firstChildElement("conflict").isNull()) d->xmppStreamError = QXmppStanza::Error::Conflict; else d->xmppStreamError = QXmppStanza::Error::UndefinedCondition; emit error(QXmppClient::XmppStreamError); } else if(ns == ns_tls) { if(nodeRecv.tagName() == "proceed") { debug("Starting encryption"); socket()->startClientEncryption(); return; } } else if(ns == ns_sasl) { if (!d->saslClient) { warning("SASL stanza received, but no mechanism selected"); return; } if(nodeRecv.tagName() == "success") { debug("Authenticated"); d->isAuthenticated = true; handleStart(); } else if(nodeRecv.tagName() == "challenge") { QXmppSaslChallenge challenge; challenge.parse(nodeRecv); QByteArray response; if (d->saslClient->respond(challenge.value(), response)) { sendPacket(QXmppSaslResponse(response)); } else { warning("Could not respond to SASL challenge"); disconnectFromHost(); } } else if(nodeRecv.tagName() == "failure") { QXmppSaslFailure failure; failure.parse(nodeRecv); if (failure.condition() == "not-authorized") d->xmppStreamError = QXmppStanza::Error::NotAuthorized; else d->xmppStreamError = QXmppStanza::Error::UndefinedCondition; emit error(QXmppClient::XmppStreamError); warning("Authentication failure"); disconnectFromHost(); } } else if(ns == ns_client) { if(nodeRecv.tagName() == "iq") { QDomElement element = nodeRecv.firstChildElement(); QString id = nodeRecv.attribute("id"); QString type = nodeRecv.attribute("type"); if(type.isEmpty()) warning("QXmppStream: iq type can't be empty"); if(id == d->sessionId) { QXmppSessionIq session; session.parse(nodeRecv); // xmpp connection made d->sessionStarted = true; emit connected(); } else if(QXmppBindIq::isBindIq(nodeRecv) && id == d->bindId) { QXmppBindIq bind; bind.parse(nodeRecv); // bind result if (bind.type() == QXmppIq::Result) { if (!bind.jid().isEmpty()) { QRegExp jidRegex("^([^@/]+)@([^@/]+)/(.+)$"); if (jidRegex.exactMatch(bind.jid())) { configuration().setUser(jidRegex.cap(1)); configuration().setDomain(jidRegex.cap(2)); configuration().setResource(jidRegex.cap(3)); } else { warning("Bind IQ received with invalid JID: " + bind.jid()); } } if (d->sessionAvailable) { // start session if it is available QXmppSessionIq session; session.setType(QXmppIq::Set); session.setTo(configuration().domain()); d->sessionId = session.id(); sendPacket(session); } else { // otherwise we are done d->sessionStarted = true; emit connected(); } } } // extensions // XEP-0078: Non-SASL Authentication else if(id == d->nonSASLAuthId && type == "result") { // successful Non-SASL Authentication debug("Authenticated (Non-SASL)"); d->isAuthenticated = true; // xmpp connection made d->sessionStarted = true; emit connected(); } else if(QXmppNonSASLAuthIq::isNonSASLAuthIq(nodeRecv)) { if(type == "result") { bool digest = !nodeRecv.firstChildElement("query"). firstChildElement("digest").isNull(); bool plain = !nodeRecv.firstChildElement("query"). firstChildElement("password").isNull(); bool plainText = false; if(plain && digest) { if(configuration().nonSASLAuthMechanism() == QXmppConfiguration::NonSASLDigest) plainText = false; else plainText = true; } else if(plain) plainText = true; else if(digest) plainText = false; else { warning("No supported Non-SASL Authentication mechanism available"); disconnectFromHost(); return; } sendNonSASLAuth(plainText); } } // XEP-0199: XMPP Ping else if(QXmppPingIq::isPingIq(nodeRecv)) { QXmppPingIq req; req.parse(nodeRecv); QXmppIq iq(QXmppIq::Result); iq.setId(req.id()); iq.setTo(req.from()); sendPacket(iq); } else { QXmppIq iqPacket; iqPacket.parse(nodeRecv); // if we didn't understant the iq, reply with error // except for "result" and "error" iqs if (type != "result" && type != "error") { QXmppIq iq(QXmppIq::Error); iq.setId(iqPacket.id()); iq.setTo(iqPacket.from()); QXmppStanza::Error error(QXmppStanza::Error::Cancel, QXmppStanza::Error::FeatureNotImplemented); iq.setError(error); sendPacket(iq); } else { emit iqReceived(iqPacket); } } } else if(nodeRecv.tagName() == "presence") { QXmppPresence presence; presence.parse(nodeRecv); // emit presence emit presenceReceived(presence); } else if(nodeRecv.tagName() == "message") { QXmppMessage message; message.parse(nodeRecv); // emit message emit messageReceived(message); } } } /// \endcond void QXmppOutgoingClient::pingStart() { const int interval = configuration().keepAliveInterval(); // start ping timer if (interval > 0) { d->pingTimer->setInterval(interval * 1000); d->pingTimer->start(); } } void QXmppOutgoingClient::pingStop() { // stop all timers d->pingTimer->stop(); d->timeoutTimer->stop(); } void QXmppOutgoingClient::pingSend() { // send ping packet QXmppPingIq ping; ping.setTo(configuration().domain()); sendPacket(ping); // start timeout timer const int timeout = configuration().keepAliveTimeout(); if (timeout > 0) { d->timeoutTimer->setInterval(timeout * 1000); d->timeoutTimer->start(); } } void QXmppOutgoingClient::pingTimeout() { warning("Ping timeout"); disconnectFromHost(); emit error(QXmppClient::KeepAliveError); } void QXmppOutgoingClient::sendNonSASLAuth(bool plainText) { QXmppNonSASLAuthIq authQuery; authQuery.setType(QXmppIq::Set); authQuery.setUsername(configuration().user()); if (plainText) authQuery.setPassword(configuration().password()); else authQuery.setDigest(d->streamId, configuration().password()); authQuery.setResource(configuration().resource()); d->nonSASLAuthId = authQuery.id(); sendPacket(authQuery); } void QXmppOutgoingClient::sendNonSASLAuthQuery() { QXmppNonSASLAuthIq authQuery; authQuery.setType(QXmppIq::Get); authQuery.setTo(d->streamFrom); // FIXME : why are we setting the username, XEP-0078 states we should // not attempt to guess the required fields? authQuery.setUsername(configuration().user()); sendPacket(authQuery); } /// Returns the type of the last XMPP stream error that occured. QXmppStanza::Error::Condition QXmppOutgoingClient::xmppStreamError() { return d->xmppStreamError; } qxmpp-0.7.6/src/client/QXmppBookmarkManager.cpp0000644000175000007640000001224312116723562021417 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include "QXmppBookmarkManager.h" #include "QXmppBookmarkSet.h" #include "QXmppClient.h" #include "QXmppConstants.h" #include "QXmppIq.h" #include "QXmppUtils.h" // The QXmppPrivateStorageIq class represents an XML private storage IQ // as defined by XEP-0049: Private XML Storage. // // FIXME: currently, we only handle bookmarks class QXmppPrivateStorageIq : public QXmppIq { public: QXmppBookmarkSet bookmarks() const; void setBookmarks(const QXmppBookmarkSet &bookmark); static bool isPrivateStorageIq(const QDomElement &element); protected: void parseElementFromChild(const QDomElement &element); void toXmlElementFromChild(QXmlStreamWriter *writer) const; private: QXmppBookmarkSet m_bookmarks; }; QXmppBookmarkSet QXmppPrivateStorageIq::bookmarks() const { return m_bookmarks; } void QXmppPrivateStorageIq::setBookmarks(const QXmppBookmarkSet &bookmarks) { m_bookmarks = bookmarks; } bool QXmppPrivateStorageIq::isPrivateStorageIq(const QDomElement &element) { const QDomElement queryElement = element.firstChildElement("query"); return queryElement.namespaceURI() == ns_private && QXmppBookmarkSet::isBookmarkSet(queryElement.firstChildElement()); } void QXmppPrivateStorageIq::parseElementFromChild(const QDomElement &element) { const QDomElement queryElement = element.firstChildElement("query"); m_bookmarks.parse(queryElement.firstChildElement()); } void QXmppPrivateStorageIq::toXmlElementFromChild(QXmlStreamWriter *writer) const { writer->writeStartElement("query"); writer->writeAttribute("xmlns", ns_private); m_bookmarks.toXml(writer); writer->writeEndElement(); } class QXmppBookmarkManagerPrivate { public: QXmppBookmarkSet bookmarks; QXmppBookmarkSet pendingBookmarks; QString pendingId; bool bookmarksReceived; }; /// Constructs a new bookmark manager. /// QXmppBookmarkManager::QXmppBookmarkManager() : d(new QXmppBookmarkManagerPrivate) { d->bookmarksReceived = false; } /// Destroys a bookmark manager. /// QXmppBookmarkManager::~QXmppBookmarkManager() { delete d; } /// Returns true if the bookmarks have been received from the server, /// false otherwise. /// bool QXmppBookmarkManager::areBookmarksReceived() const { return d->bookmarksReceived; } /// Returns the bookmarks stored on the server. /// /// Before calling this method, check that the bookmarks /// have indeed been received by calling areBookmarksReceived(). /// QXmppBookmarkSet QXmppBookmarkManager::bookmarks() const { return d->bookmarks; } /// Stores the bookmarks on the server. /// /// \param bookmarks bool QXmppBookmarkManager::setBookmarks(const QXmppBookmarkSet &bookmarks) { QXmppPrivateStorageIq iq; iq.setType(QXmppIq::Set); iq.setBookmarks(bookmarks); if (!client()->sendPacket(iq)) return false; d->pendingBookmarks = bookmarks; d->pendingId = iq.id(); return true; } /// \cond void QXmppBookmarkManager::setClient(QXmppClient *client) { bool check; Q_UNUSED(check); QXmppClientExtension::setClient(client); check = connect(client, SIGNAL(connected()), this, SLOT(slotConnected())); Q_ASSERT(check); check = connect(client, SIGNAL(disconnected()), this, SLOT(slotDisconnected())); Q_ASSERT(check); } bool QXmppBookmarkManager::handleStanza(const QDomElement &stanza) { if (stanza.tagName() == "iq") { if (QXmppPrivateStorageIq::isPrivateStorageIq(stanza)) { QXmppPrivateStorageIq iq; iq.parse(stanza); if (iq.type() == QXmppIq::Result) { d->bookmarks = iq.bookmarks(); d->bookmarksReceived = true; emit bookmarksReceived(d->bookmarks); } return true; } else if (!d->pendingId.isEmpty() && stanza.attribute("id") == d->pendingId) { QXmppIq iq; iq.parse(stanza); if (iq.type() == QXmppIq::Result) { d->bookmarks = d->pendingBookmarks; emit bookmarksReceived(d->bookmarks); } d->pendingId = QString(); return true; } } return false; } /// \endcond void QXmppBookmarkManager::slotConnected() { QXmppPrivateStorageIq iq; iq.setType(QXmppIq::Get); client()->sendPacket(iq); } void QXmppBookmarkManager::slotDisconnected() { d->bookmarks = QXmppBookmarkSet(); d->bookmarksReceived = false; } qxmpp-0.7.6/src/client/QXmppTransferManager.h0000644000175000007640000002302612116723562021104 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPTRANSFERMANAGER_H #define QXMPPTRANSFERMANAGER_H #include #include #include #include #include "QXmppClientExtension.h" class QTcpSocket; class QXmppByteStreamIq; class QXmppIbbCloseIq; class QXmppIbbDataIq; class QXmppIbbOpenIq; class QXmppIq; class QXmppStreamInitiationIq; class QXmppTransferFileInfoPrivate; class QXmppTransferJobPrivate; class QXmppTransferManager; class QXmppTransferManagerPrivate; class QXMPP_EXPORT QXmppTransferFileInfo { public: QXmppTransferFileInfo(); QXmppTransferFileInfo(const QXmppTransferFileInfo &other); ~QXmppTransferFileInfo(); QDateTime date() const; void setDate(const QDateTime &date); QByteArray hash() const; void setHash(const QByteArray &hash); QString name() const; void setName(const QString &name); QString description() const; void setDescription(const QString &description); qint64 size() const; void setSize(qint64 size); bool isNull() const; QXmppTransferFileInfo& operator=(const QXmppTransferFileInfo &other); bool operator==(const QXmppTransferFileInfo &other) const; /// \cond void parse(const QDomElement &element); void toXml(QXmlStreamWriter *writer) const; /// \endcond private: QSharedDataPointer d; }; /// \brief The QXmppTransferJob class represents a single file transfer job. /// /// \sa QXmppTransferManager /// class QXMPP_EXPORT QXmppTransferJob : public QXmppLoggable { Q_OBJECT Q_ENUMS(Direction Error State) Q_FLAGS(Method Methods) Q_PROPERTY(Direction direction READ direction CONSTANT) Q_PROPERTY(QUrl localFileUrl READ localFileUrl WRITE setLocalFileUrl NOTIFY localFileUrlChanged) Q_PROPERTY(QString jid READ jid CONSTANT) Q_PROPERTY(Method method READ method CONSTANT) Q_PROPERTY(State state READ state NOTIFY stateChanged) Q_PROPERTY(QString fileName READ fileName CONSTANT) Q_PROPERTY(qint64 fileSize READ fileSize CONSTANT) public: /// This enum is used to describe the direction of a transfer job. enum Direction { IncomingDirection, ///< The file is being received. OutgoingDirection, ///< The file is being sent. }; /// This enum is used to describe the type of error encountered by a transfer job. enum Error { NoError = 0, ///< No error occurred. AbortError, ///< The file transfer was aborted. FileAccessError, ///< An error was encountered trying to access a local file. FileCorruptError, ///< The file is corrupt: the file size or hash do not match. ProtocolError, ///< An error was encountered in the file transfer protocol. }; /// This enum is used to describe a transfer method. enum Method { NoMethod = 0, ///< No transfer method. InBandMethod = 1, ///< XEP-0047: In-Band Bytestreams SocksMethod = 2, ///< XEP-0065: SOCKS5 Bytestreams AnyMethod = 3, ///< Any supported transfer method. }; Q_DECLARE_FLAGS(Methods, Method) /// This enum is used to describe the state of a transfer job. enum State { OfferState = 0, ///< The transfer is being offered to the remote party. StartState = 1, ///< The transfer is being connected. TransferState = 2, ///< The transfer is ongoing. FinishedState = 3, ///< The transfer is finished. }; ~QXmppTransferJob(); QXmppTransferJob::Direction direction() const; QXmppTransferJob::Error error() const; QString jid() const; QXmppTransferJob::Method method() const; QString sid() const; qint64 speed() const; QXmppTransferJob::State state() const; // XEP-0096 : File transfer QXmppTransferFileInfo fileInfo() const; QUrl localFileUrl() const; void setLocalFileUrl(const QUrl &localFileUrl); /// \cond QDateTime fileDate() const; QByteArray fileHash() const; QString fileName() const; qint64 fileSize() const; /// \endcond signals: /// This signal is emitted when an error is encountered while /// processing the transfer job. void error(QXmppTransferJob::Error error); /// This signal is emitted when the transfer job is finished. /// /// You can determine if the job completed successfully by testing whether /// error() returns QXmppTransferJob::NoError. /// /// Note: Do not delete the job in the slot connected to this signal, /// instead use deleteLater(). void finished(); /// This signal is emitted when the local file URL changes. void localFileUrlChanged(const QUrl &localFileUrl); /// This signal is emitted to indicate the progress of this transfer job. void progress(qint64 done, qint64 total); /// This signal is emitted when the transfer job changes state. void stateChanged(QXmppTransferJob::State state); public slots: void abort(); void accept(const QString &filePath); void accept(QIODevice *output); private slots: void _q_terminated(); private: QXmppTransferJob(const QString &jid, QXmppTransferJob::Direction direction, QXmppClient *client, QObject *parent); void setState(QXmppTransferJob::State state); void terminate(QXmppTransferJob::Error error); QXmppTransferJobPrivate *const d; friend class QXmppTransferManager; friend class QXmppTransferManagerPrivate; friend class QXmppTransferIncomingJob; friend class QXmppTransferOutgoingJob; }; /// \brief The QXmppTransferManager class provides support for sending and /// receiving files. /// /// Stream initiation is performed as described in XEP-0095: Stream Initiation /// and XEP-0096: SI File Transfer. The actual file transfer is then performed /// using either XEP-0065: SOCKS5 Bytestreams or XEP-0047: In-Band Bytestreams. /// /// To make use of this manager, you need to instantiate it and load it into /// the QXmppClient instance as follows: /// /// \code /// QXmppTransferManager *manager = new QXmppTransferManager; /// client->addExtension(manager); /// \endcode /// /// \ingroup Managers class QXMPP_EXPORT QXmppTransferManager : public QXmppClientExtension { Q_OBJECT Q_PROPERTY(QString proxy READ proxy WRITE setProxy) Q_PROPERTY(bool proxyOnly READ proxyOnly WRITE setProxyOnly) Q_PROPERTY(QXmppTransferJob::Methods supportedMethods READ supportedMethods WRITE setSupportedMethods) public: QXmppTransferManager(); ~QXmppTransferManager(); QString proxy() const; void setProxy(const QString &proxyJid); bool proxyOnly() const; void setProxyOnly(bool proxyOnly); QXmppTransferJob::Methods supportedMethods() const; void setSupportedMethods(QXmppTransferJob::Methods methods); /// \cond QStringList discoveryFeatures() const; bool handleStanza(const QDomElement &element); /// \endcond signals: /// This signal is emitted when a new file transfer offer is received. /// /// To accept the transfer job, call the job's QXmppTransferJob::accept() method. /// To refuse the transfer job, call the job's QXmppTransferJob::abort() method. void fileReceived(QXmppTransferJob *job); /// This signal is emitted whenever a transfer job is started. void jobStarted(QXmppTransferJob *job); /// This signal is emitted whenever a transfer job is finished. /// /// \sa QXmppTransferJob::finished() void jobFinished(QXmppTransferJob *job); public slots: QXmppTransferJob *sendFile(const QString &jid, const QString &filePath, const QString &description = QString()); QXmppTransferJob *sendFile(const QString &jid, QIODevice *device, const QXmppTransferFileInfo &fileInfo, const QString &sid = QString()); protected: /// \cond void setClient(QXmppClient* client); /// \endcond private slots: void _q_iqReceived(const QXmppIq&); void _q_jobDestroyed(QObject *object); void _q_jobError(QXmppTransferJob::Error error); void _q_jobFinished(); void _q_jobStateChanged(QXmppTransferJob::State state); void _q_socksServerConnected(QTcpSocket *socket, const QString &hostName, quint16 port); private: QXmppTransferManagerPrivate *d; void byteStreamIqReceived(const QXmppByteStreamIq&); void byteStreamResponseReceived(const QXmppIq&); void byteStreamResultReceived(const QXmppByteStreamIq&); void byteStreamSetReceived(const QXmppByteStreamIq&); void ibbCloseIqReceived(const QXmppIbbCloseIq&); void ibbDataIqReceived(const QXmppIbbDataIq&); void ibbOpenIqReceived(const QXmppIbbOpenIq&); void ibbResponseReceived(const QXmppIq&); void streamInitiationIqReceived(const QXmppStreamInitiationIq&); void streamInitiationResultReceived(const QXmppStreamInitiationIq&); void streamInitiationSetReceived(const QXmppStreamInitiationIq&); void socksServerSendOffer(QXmppTransferJob *job); friend class QXmppTransferManagerPrivate; }; Q_DECLARE_OPERATORS_FOR_FLAGS(QXmppTransferJob::Methods) #endif qxmpp-0.7.6/src/client/QXmppRemoteMethod.cpp0000644000175000007640000000425312116723562020755 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Ian Reinhart Geiser * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "QXmppRemoteMethod.h" #include "QXmppClient.h" #include "QXmppUtils.h" #include #include #include QXmppRemoteMethod::QXmppRemoteMethod(const QString &jid, const QString &method, const QVariantList &args, QXmppClient *client) : QObject(client), m_client(client) { m_payload.setTo( jid ); m_payload.setFrom( client->configuration().jid() ); m_payload.setMethod( method ); m_payload.setArguments( args ); } QXmppRemoteMethodResult QXmppRemoteMethod::call( ) { // FIXME : spinning an event loop is a VERY bad idea, it can cause // us to lose incoming packets QEventLoop loop(this); connect( this, SIGNAL(callDone()), &loop, SLOT(quit())); QTimer::singleShot(30000,&loop, SLOT(quit())); // Timeout incase the other end hangs... m_client->sendPacket( m_payload ); loop.exec( QEventLoop::ExcludeUserInputEvents | QEventLoop::WaitForMoreEvents ); return m_result; } void QXmppRemoteMethod::gotError( const QXmppRpcErrorIq &iq ) { if ( iq.id() == m_payload.id() ) { m_result.hasError = true; m_result.errorMessage = iq.error().text(); m_result.code = iq.error().type(); emit callDone(); } } void QXmppRemoteMethod::gotResult( const QXmppRpcResponseIq &iq ) { if ( iq.id() == m_payload.id() ) { m_result.hasError = false; // FIXME: we don't handle multiple responses m_result.result = iq.values().first(); emit callDone(); } } qxmpp-0.7.6/src/client/QXmppOutgoingClient.h0000644000175000007640000000533312116723562020760 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Manjeet Dahiya * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPOUTGOINGCLIENT_H #define QXMPPOUTGOINGCLIENT_H #include "QXmppClient.h" #include "QXmppStanza.h" #include "QXmppStream.h" class QDomElement; class QSslError; class QXmppConfiguration; class QXmppPresence; class QXmppIq; class QXmppMessage; class QXmppOutgoingClientPrivate; /// \brief The QXmppOutgoingClient class represents an outgoing XMPP stream /// to an XMPP server. /// class QXMPP_EXPORT QXmppOutgoingClient : public QXmppStream { Q_OBJECT public: QXmppOutgoingClient(QObject *parent); ~QXmppOutgoingClient(); void connectToHost(); bool isAuthenticated() const; bool isConnected() const; QSslSocket *socket() const { return QXmppStream::socket(); }; QXmppStanza::Error::Condition xmppStreamError(); QXmppConfiguration& configuration(); signals: /// This signal is emitted when an error is encountered. void error(QXmppClient::Error); /// This signal is emitted when an element is received. void elementReceived(const QDomElement &element, bool &handled); /// This signal is emitted when a presence is received. void presenceReceived(const QXmppPresence&); /// This signal is emitted when a message is received. void messageReceived(const QXmppMessage&); /// This signal is emitted when an IQ is received. void iqReceived(const QXmppIq&); protected: /// \cond // Overridable methods virtual void handleStart(); virtual void handleStanza(const QDomElement &element); virtual void handleStream(const QDomElement &element); /// \endcond private slots: void _q_dnsLookupFinished(); void _q_socketDisconnected(); void socketError(QAbstractSocket::SocketError); void socketSslErrors(const QList&); void pingStart(); void pingStop(); void pingSend(); void pingTimeout(); private: void sendNonSASLAuth(bool plaintext); void sendNonSASLAuthQuery(); friend class QXmppOutgoingClientPrivate; QXmppOutgoingClientPrivate * const d; }; #endif // QXMPPOUTGOINGCLIENT_H qxmpp-0.7.6/src/client/QXmppVCardManager.cpp0000644000175000007640000000605712116723562020657 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "QXmppClient.h" #include "QXmppConstants.h" #include "QXmppUtils.h" #include "QXmppVCardIq.h" #include "QXmppVCardManager.h" class QXmppVCardManagerPrivate { public: QXmppVCardIq clientVCard; bool isClientVCardReceived; }; QXmppVCardManager::QXmppVCardManager() : d(new QXmppVCardManagerPrivate) { d->isClientVCardReceived = false; } QXmppVCardManager::~QXmppVCardManager() { delete d; } /// This function requests the server for vCard of the specified jid. /// Once received the signal vCardReceived() is emitted. /// /// \param jid Jid of the specific entry in the roster /// QString QXmppVCardManager::requestVCard(const QString& jid) { QXmppVCardIq request(jid); if(client()->sendPacket(request)) return request.id(); else return QString(); } /// Returns the vCard of the connected client. /// /// \return QXmppVCard /// const QXmppVCardIq& QXmppVCardManager::clientVCard() const { return d->clientVCard; } /// Sets the vCard of the connected client. /// /// \param clientVCard QXmppVCard /// void QXmppVCardManager::setClientVCard(const QXmppVCardIq& clientVCard) { d->clientVCard = clientVCard; d->clientVCard.setTo(""); d->clientVCard.setFrom(""); d->clientVCard.setType(QXmppIq::Set); client()->sendPacket(d->clientVCard); } /// This function requests the server for vCard of the connected user itself. /// Once received the signal clientVCardReceived() is emitted. Received vCard /// can be get using clientVCard(). QString QXmppVCardManager::requestClientVCard() { return requestVCard(); } /// Returns true if vCard of the connected client has been /// received else false. /// /// \return bool /// bool QXmppVCardManager::isClientVCardReceived() const { return d->isClientVCardReceived; } /// \cond QStringList QXmppVCardManager::discoveryFeatures() const { // XEP-0054: vcard-temp return QStringList() << ns_vcard; } bool QXmppVCardManager::handleStanza(const QDomElement &element) { if(element.tagName() == "iq" && QXmppVCardIq::isVCard(element)) { QXmppVCardIq vCardIq; vCardIq.parse(element); if (vCardIq.from().isEmpty()) { d->clientVCard = vCardIq; d->isClientVCardReceived = true; emit clientVCardReceived(); } emit vCardReceived(vCardIq); return true; } return false; } /// \endcond qxmpp-0.7.6/src/client/QXmppEntityTimeManager.h0000644000175000007640000000264512116723562021417 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPENTITYTIMEMANAGER_H #define QXMPPENTITYTIMEMANAGER_H #include "QXmppClientExtension.h" class QXmppEntityTimeIq; /// \brief The QXmppEntityTimeManager class provided the functionality to get /// the local time of an entity as defined by XEP-0202: Entity Time. /// /// \ingroup Managers class QXMPP_EXPORT QXmppEntityTimeManager : public QXmppClientExtension { Q_OBJECT public: QString requestTime(const QString& jid); /// \cond QStringList discoveryFeatures() const; bool handleStanza(const QDomElement &element); /// \endcond signals: /// \brief This signal is emitted when a time response is received. void timeReceived(const QXmppEntityTimeIq&); }; #endif // QXMPPENTITYTIMEMANAGER_H qxmpp-0.7.6/src/client/QXmppVersionManager.h0000644000175000007640000000340512116723562020744 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPVERSIONMANAGER_H #define QXMPPVERSIONMANAGER_H #include "QXmppClientExtension.h" class QXmppVersionIq; class QXmppVersionManagerPrivate; /// \brief The QXmppVersionManager class makes it possible to request for /// the software version of an entity as defined by XEP-0092: Software Version. /// /// \ingroup Managers class QXMPP_EXPORT QXmppVersionManager : public QXmppClientExtension { Q_OBJECT public: QXmppVersionManager(); ~QXmppVersionManager(); QString requestVersion(const QString& jid); void setClientName(const QString&); void setClientVersion(const QString&); void setClientOs(const QString&); QString clientName() const; QString clientVersion() const; QString clientOs() const; /// \cond QStringList discoveryFeatures() const; bool handleStanza(const QDomElement &element); /// \endcond signals: /// \brief This signal is emitted when a version response is received. void versionReceived(const QXmppVersionIq&); private: QXmppVersionManagerPrivate *d; }; #endif // QXMPPVERSIONMANAGER_H qxmpp-0.7.6/src/client/QXmppConfiguration.cpp0000644000175000007640000003424212116723562021171 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include #include "QXmppConfiguration.h" #include "QXmppUtils.h" class QXmppConfigurationPrivate : public QSharedData { public: QXmppConfigurationPrivate(); QString host; int port; QString user; QString password; QString domain; QString resource; // Facebook QString facebookAccessToken; QString facebookAppId; // Google QString googleAccessToken; // Windows Live QString windowsLiveAccessToken; // default is false bool autoAcceptSubscriptions; // default is true bool sendIntialPresence; // default is true bool sendRosterRequest; // interval in seconds, if zero won't ping int keepAliveInterval; // interval in seconds, if zero won't timeout int keepAliveTimeout; // will keep reconnecting if disconnected, default is true bool autoReconnectionEnabled; // which authentication systems to use (if any) bool useSASLAuthentication; bool useNonSASLAuthentication; // default is true bool ignoreSslErrors; QXmppConfiguration::StreamSecurityMode streamSecurityMode; QXmppConfiguration::NonSASLAuthMechanism nonSASLAuthMechanism; QString saslAuthMechanism; QNetworkProxy networkProxy; QList caCertificates; }; QXmppConfigurationPrivate::QXmppConfigurationPrivate() : port(5222) , resource("QXmpp") , autoAcceptSubscriptions(false) , sendIntialPresence(true) , sendRosterRequest(true) , keepAliveInterval(60) , keepAliveTimeout(20) , autoReconnectionEnabled(true) , useSASLAuthentication(true) , useNonSASLAuthentication(true) , ignoreSslErrors(true) , streamSecurityMode(QXmppConfiguration::TLSEnabled) , nonSASLAuthMechanism(QXmppConfiguration::NonSASLDigest) , saslAuthMechanism("DIGEST-MD5") { } /// Creates a QXmppConfiguration object. QXmppConfiguration::QXmppConfiguration() : d(new QXmppConfigurationPrivate) { } /// Creates a copy of \a other. QXmppConfiguration::QXmppConfiguration(const QXmppConfiguration &other) : d(other.d) { } /// Destructor, destroys the QXmppConfiguration object. /// QXmppConfiguration::~QXmppConfiguration() { } /// Assigns \a other to this QXmppConfiguration. QXmppConfiguration& QXmppConfiguration::operator=(const QXmppConfiguration &other) { d = other.d; return *this; } /// Sets the host name. /// /// \param host host name of the XMPP server where connection has to be made /// (e.g. "jabber.org" and "talk.google.com"). It can also be an IP address in /// the form of a string (e.g. "192.168.1.25"). /// void QXmppConfiguration::setHost(const QString& host) { d->host = host; } /// Sets the domain name. /// /// \param domain Domain name e.g. "gmail.com" and "jabber.org". /// \note host name and domain name can be different for google /// domain name is gmail.com and host name is talk.google.com /// void QXmppConfiguration::setDomain(const QString& domain) { d->domain = domain; } /// Sets the port number. /// /// \param port Port number at which the XMPP server is listening. The default /// value is 5222. /// void QXmppConfiguration::setPort(int port) { d->port = port; } /// Sets the username. /// /// \param user Username of the account at the specified XMPP server. It should /// be the name without the domain name. E.g. "qxmpp.test1" and not /// "qxmpp.test1@gmail.com" /// void QXmppConfiguration::setUser(const QString& user) { d->user = user; } /// Sets the password. /// /// \param password Password for the specified username /// void QXmppConfiguration::setPassword(const QString& password) { d->password = password; } /// Sets the resource identifier. /// /// Multiple resources (e.g., devices or locations) may connect simultaneously /// to a server on behalf of each authorized client, with each resource /// differentiated by the resource identifier of an XMPP address /// (e.g. node\@domain/home vs. node\@domain/work) /// /// The default value is "QXmpp". /// /// \param resource Resource identifier of the client in connection. void QXmppConfiguration::setResource(const QString& resource) { d->resource = resource; } /// Sets the JID. If a full JID (i.e. one with a resource) is given, calling /// this method will update the username, domain and resource. Otherwise, only /// the username and the domain will be updated. /// /// \param jid void QXmppConfiguration::setJid(const QString& jid) { d->user = QXmppUtils::jidToUser(jid); d->domain = QXmppUtils::jidToDomain(jid); const QString resource = QXmppUtils::jidToResource(jid); if (!resource.isEmpty()) d->resource = resource; } /// Returns the host name. /// /// \return host name /// QString QXmppConfiguration::host() const { return d->host; } /// Returns the domain name. /// /// \return domain name /// QString QXmppConfiguration::domain() const { return d->domain; } /// Returns the port number. /// /// \return port number /// int QXmppConfiguration::port() const { return d->port; } /// Returns the username. /// /// \return username /// QString QXmppConfiguration::user() const { return d->user; } /// Returns the password. /// /// \return password /// QString QXmppConfiguration::password() const { return d->password; } /// Returns the resource identifier. /// /// \return resource identifier /// QString QXmppConfiguration::resource() const { return d->resource; } /// Returns the jabber id (jid). /// /// \return jabber id (jid) /// (e.g. "qxmpp.test1@gmail.com/resource" or qxmpptest@jabber.org/QXmpp156) /// QString QXmppConfiguration::jid() const { if (d->user.isEmpty()) return d->domain; else return jidBare() + "/" + d->resource; } /// Returns the bare jabber id (jid), without the resource identifier. /// /// \return bare jabber id (jid) /// (e.g. "qxmpp.test1@gmail.com" or qxmpptest@jabber.org) /// QString QXmppConfiguration::jidBare() const { if (d->user.isEmpty()) return d->domain; else return d->user+"@"+d->domain; } /// Returns the access token used for X-FACEBOOK-PLATFORM authentication. QString QXmppConfiguration::facebookAccessToken() const { return d->facebookAccessToken; } /// Sets the access token used for X-FACEBOOK-PLATFORM authentication. /// /// This token is returned by Facebook at the end of the OAuth authentication /// process. /// /// \param accessToken void QXmppConfiguration::setFacebookAccessToken(const QString& accessToken) { d->facebookAccessToken = accessToken; } /// Returns the application ID used for X-FACEBOOK-PLATFORM authentication. QString QXmppConfiguration::facebookAppId() const { return d->facebookAppId; } /// Sets the application ID used for X-FACEBOOK-PLATFORM authentication. /// /// \param appId void QXmppConfiguration::setFacebookAppId(const QString& appId) { d->facebookAppId = appId; } /// Returns the access token used for X-OAUTH2 authentication. QString QXmppConfiguration::googleAccessToken() const { return d->googleAccessToken; } /// Sets the access token used for X-OAUTH2 authentication. /// /// This token is returned by Google at the end of the OAuth authentication /// process. /// /// \param accessToken void QXmppConfiguration::setGoogleAccessToken(const QString& accessToken) { d->googleAccessToken = accessToken; } /// Returns the access token used for X-MESSENGER-OAUTH2 authentication. QString QXmppConfiguration::windowsLiveAccessToken() const { return d->windowsLiveAccessToken; } /// Sets the access token used for X-MESSENGER-OAUTH2 authentication. /// /// This token is returned by Windows Live at the end of the OAuth authentication /// process. /// /// \param accessToken void QXmppConfiguration::setWindowsLiveAccessToken(const QString& accessToken) { d->windowsLiveAccessToken = accessToken; } /// Returns the auto-accept-subscriptions-request configuration. /// /// \return boolean value /// true means that auto-accept-subscriptions-request is enabled else disabled for false /// bool QXmppConfiguration::autoAcceptSubscriptions() const { return d->autoAcceptSubscriptions; } /// Sets the auto-accept-subscriptions-request configuration. /// /// \param value boolean value /// true means that auto-accept-subscriptions-request is enabled else disabled for false /// void QXmppConfiguration::setAutoAcceptSubscriptions(bool value) { d->autoAcceptSubscriptions = value; } /// Returns the auto-reconnect-on-disconnection-on-error configuration. /// /// \return boolean value /// true means that auto-reconnect is enabled else disabled for false /// bool QXmppConfiguration::autoReconnectionEnabled() const { return d->autoReconnectionEnabled; } /// Sets the auto-reconnect-on-disconnection-on-error configuration. /// /// \param value boolean value /// true means that auto-reconnect is enabled else disabled for false /// void QXmppConfiguration::setAutoReconnectionEnabled(bool value) { d->autoReconnectionEnabled = value; } /// Returns whether SSL errors (such as certificate validation errors) /// are to be ignored when connecting to the XMPP server. bool QXmppConfiguration::ignoreSslErrors() const { return d->ignoreSslErrors; } /// Specifies whether SSL errors (such as certificate validation errors) /// are to be ignored when connecting to an XMPP server. void QXmppConfiguration::setIgnoreSslErrors(bool value) { d->ignoreSslErrors = value; } /// Returns whether to make use of SASL authentication. bool QXmppConfiguration::useSASLAuthentication() const { return d->useSASLAuthentication; } /// Sets whether to make use of SASL authentication. void QXmppConfiguration::setUseSASLAuthentication(bool useSASL) { d->useSASLAuthentication = useSASL; } /// Returns whether to make use of non-SASL authentication. bool QXmppConfiguration::useNonSASLAuthentication() const { return d->useNonSASLAuthentication; } /// Sets whether to make use of non-SASL authentication. void QXmppConfiguration::setUseNonSASLAuthentication(bool useNonSASL) { d->useNonSASLAuthentication = useNonSASL; } /// Returns the specified security mode for the stream. The default value is /// QXmppConfiguration::TLSEnabled. /// \return StreamSecurityMode QXmppConfiguration::StreamSecurityMode QXmppConfiguration::streamSecurityMode() const { return d->streamSecurityMode; } /// Specifies the specified security mode for the stream. The default value is /// QXmppConfiguration::TLSEnabled. /// \param mode StreamSecurityMode void QXmppConfiguration::setStreamSecurityMode( QXmppConfiguration::StreamSecurityMode mode) { d->streamSecurityMode = mode; } /// Returns the Non-SASL authentication mechanism configuration. /// /// \return QXmppConfiguration::NonSASLAuthMechanism /// QXmppConfiguration::NonSASLAuthMechanism QXmppConfiguration::nonSASLAuthMechanism() const { return d->nonSASLAuthMechanism; } /// Hints the library the Non-SASL authentication mechanism to be used for authentication. /// /// \param mech QXmppConfiguration::NonSASLAuthMechanism /// void QXmppConfiguration::setNonSASLAuthMechanism( QXmppConfiguration::NonSASLAuthMechanism mech) { d->nonSASLAuthMechanism = mech; } /// Returns the preferred SASL authentication mechanism. /// /// Default value: "DIGEST-MD5" QString QXmppConfiguration::saslAuthMechanism() const { return d->saslAuthMechanism; } /// Sets the preferred SASL authentication \a mechanism. /// /// Valid values: "PLAIN", "DIGEST-MD5", "ANONYMOUS", "X-FACEBOOK-PLATFORM" void QXmppConfiguration::setSaslAuthMechanism(const QString &mechanism) { d->saslAuthMechanism = mechanism; } /// Specifies the network proxy used for the connection made by QXmppClient. /// The default value is QNetworkProxy::DefaultProxy that is the proxy is /// determined based on the application proxy set using /// QNetworkProxy::setApplicationProxy(). /// \param proxy QNetworkProxy void QXmppConfiguration::setNetworkProxy(const QNetworkProxy& proxy) { d->networkProxy = proxy; } /// Returns the specified network proxy. /// The default value is QNetworkProxy::DefaultProxy that is the proxy is /// determined based on the application proxy set using /// QNetworkProxy::setApplicationProxy(). /// \return QNetworkProxy QNetworkProxy QXmppConfiguration::networkProxy() const { return d->networkProxy; } /// Specifies the interval in seconds at which keep alive (ping) packets /// will be sent to the server. /// /// If set to zero, no keep alive packets will be sent. /// /// The default value is 60 seconds. void QXmppConfiguration::setKeepAliveInterval(int secs) { d->keepAliveInterval = secs; } /// Returns the keep alive interval in seconds. /// /// The default value is 60 seconds. int QXmppConfiguration::keepAliveInterval() const { return d->keepAliveInterval; } /// Specifies the maximum time in seconds to wait for a keep alive response /// from the server before considering we are disconnected. /// /// If set to zero or a value larger than the keep alive interval, /// no timeout will occur. /// /// The default value is 20 seconds. void QXmppConfiguration::setKeepAliveTimeout(int secs) { d->keepAliveTimeout = secs; } /// Returns the keep alive timeout in seconds. /// /// The default value is 20 seconds. int QXmppConfiguration::keepAliveTimeout() const { return d->keepAliveTimeout; } /// Specifies a list of trusted CA certificates. void QXmppConfiguration::setCaCertificates(const QList &caCertificates) { d->caCertificates = caCertificates; } /// Returns the a list of trusted CA certificates. QList QXmppConfiguration::caCertificates() const { return d->caCertificates; } qxmpp-0.7.6/src/client/QXmppClient.h0000644000175000007640000001753212116723562017250 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPCLIENT_H #define QXMPPCLIENT_H #include #include #include "QXmppConfiguration.h" #include "QXmppLogger.h" #include "QXmppPresence.h" class QXmppClientExtension; class QXmppClientPrivate; class QXmppPresence; class QXmppMessage; class QXmppIq; class QXmppStream; // managers class QXmppDiscoveryIq; class QXmppRosterManager; class QXmppVCardManager; class QXmppVersionManager; /// \defgroup Core /// \defgroup Managers /// \brief The QXmppClient class is the main class for using QXmpp. /// /// It provides the user all the required functionality to connect to the /// server and perform operations afterwards. /// /// This class will provide the handle/reference to QXmppRosterManager /// (roster management), QXmppVCardManager (vCard manager), and /// QXmppVersionManager (software version information). /// /// By default, the client will automatically try reconnecting to the server. /// You can change this a behaviour using /// QXmppConfiguration::setAutoReconnectionEnabled(). /// /// Not all the managers or extensions have been enabled by default. One can /// enable/disable the managers using the funtions addExtension() and /// removeExtension(). findExtension() can be used to find reference/pointer to /// particular instansiated and enabled manager. /// /// List of managers enabled by default: /// - QXmppRosterManager /// - QXmppVCardManager /// - QXmppVersionManager /// - QXmppDiscoveryManager /// - QXmppEntityTimeManager /// /// \ingroup Core class QXMPP_EXPORT QXmppClient : public QXmppLoggable { Q_OBJECT Q_ENUMS(Error State) Q_PROPERTY(QXmppLogger* logger READ logger WRITE setLogger NOTIFY loggerChanged) Q_PROPERTY(State state READ state NOTIFY stateChanged) public: /// An enumeration for type of error. /// Error could come due a TCP socket or XML stream or due to various stanzas. enum Error { NoError, ///< No error. SocketError, ///< Error due to TCP socket. KeepAliveError, ///< Error due to no response to a keep alive. XmppStreamError, ///< Error due to XML stream. }; /// This enumeration describes a client state. enum State { DisconnectedState, ///< Disconnected from the server. ConnectingState, ///< Trying to connect to the server. ConnectedState, ///< Connected to the server. }; QXmppClient(QObject *parent = 0); ~QXmppClient(); bool addExtension(QXmppClientExtension* extension); bool insertExtension(int index, QXmppClientExtension* extension); bool removeExtension(QXmppClientExtension* extension); QList extensions(); /// \brief Returns the extension which can be cast into type T*, or 0 /// if there is no such extension. /// /// Usage example: /// \code /// QXmppDiscoveryManager* ext = client->findExtension(); /// if(ext) /// { /// //extension found, do stuff... /// } /// \endcode /// template T* findExtension() { QList list = extensions(); for (int i = 0; i < list.size(); ++i) { T* extension = qobject_cast(list.at(i)); if(extension) return extension; } return 0; } void connectToServer(const QXmppConfiguration&, const QXmppPresence& initialPresence = QXmppPresence()); bool isAuthenticated() const; bool isConnected() const; QXmppPresence clientPresence() const; void setClientPresence(const QXmppPresence &presence); QXmppConfiguration &configuration(); QXmppLogger *logger() const; void setLogger(QXmppLogger *logger); QAbstractSocket::SocketError socketError(); State state() const; QXmppStanza::Error::Condition xmppStreamError(); QXmppRosterManager& rosterManager(); QXmppVCardManager& vCardManager(); QXmppVersionManager& versionManager(); signals: /// This signal is emitted when the client connects successfully to the XMPP /// server i.e. when a successful XMPP connection is established. /// XMPP Connection involves following sequential steps: /// - TCP socket connection /// - Client sends start stream /// - Server sends start stream /// - TLS negotiation (encryption) /// - Authentication /// - Resource binding /// - Session establishment /// /// After all these steps a successful XMPP connection is established and /// connected() signal is emitted. /// /// After the connected() signal is emitted QXmpp will send the roster request /// to the server. On receiving the roster, QXmpp will emit /// QXmppRosterManager::rosterReceived(). After this signal, QXmppRosterManager object gets /// populated and you can use rosterManager() to get the handle of QXmppRosterManager object. /// void connected(); /// This signal is emitted when the XMPP connection disconnects. /// void disconnected(); /// This signal is emitted when the XMPP connection encounters any error. /// The QXmppClient::Error parameter specifies the type of error occurred. /// It could be due to TCP socket or the xml stream or the stanza. /// Depending upon the type of error occurred use the respective get function to /// know the error. void error(QXmppClient::Error); /// This signal is emitted when the logger changes. void loggerChanged(QXmppLogger *logger); /// Notifies that an XMPP message stanza is received. The QXmppMessage /// parameter contains the details of the message sent to this client. /// In other words whenever someone sends you a message this signal is /// emitted. void messageReceived(const QXmppMessage &message); /// Notifies that an XMPP presence stanza is received. The QXmppPresence /// parameter contains the details of the presence sent to this client. /// This signal is emitted when someone login/logout or when someone's status /// changes Busy, Idle, Invisible etc. void presenceReceived(const QXmppPresence &presence); /// Notifies that an XMPP iq stanza is received. The QXmppIq /// parameter contains the details of the iq sent to this client. /// IQ stanzas provide a structured request-response mechanism. Roster /// management, setting-getting vCards etc is done using iq stanzas. void iqReceived(const QXmppIq &iq); /// This signal is emitted when the client state changes. void stateChanged(QXmppClient::State state); public slots: void connectToServer(const QString &jid, const QString &password); void disconnectFromServer(); bool sendPacket(const QXmppStanza&); void sendMessage(const QString& bareJid, const QString& message); private slots: void _q_elementReceived(const QDomElement &element, bool &handled); void _q_reconnect(); void _q_socketStateChanged(QAbstractSocket::SocketState state); void _q_streamConnected(); void _q_streamDisconnected(); void _q_streamError(QXmppClient::Error error); private: QXmppClientPrivate * const d; }; #endif // QXMPPCLIENT_H qxmpp-0.7.6/src/client/QXmppMucManager.cpp0000644000175000007640000004531312116723562020402 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include #include "QXmppClient.h" #include "QXmppConstants.h" #include "QXmppDiscoveryManager.h" #include "QXmppMessage.h" #include "QXmppMucIq.h" #include "QXmppMucManager.h" #include "QXmppUtils.h" class QXmppMucManagerPrivate { public: QMap rooms; }; class QXmppMucRoomPrivate { public: QString ownJid() const { return jid + "/" + nickName; } QXmppClient *client; QXmppDiscoveryManager *discoManager; QXmppMucRoom::Actions allowedActions; QString jid; QString name; QMap participants; QString password; QMap permissions; QSet permissionsQueue; QString nickName; QString subject; }; /// Constructs a new QXmppMucManager. QXmppMucManager::QXmppMucManager() { d = new QXmppMucManagerPrivate; } /// Destroys a QXmppMucManager. QXmppMucManager::~QXmppMucManager() { delete d; } /// Adds the given chat room to the set of managed rooms. /// /// \param roomJid QXmppMucRoom *QXmppMucManager::addRoom(const QString &roomJid) { QXmppMucRoom *room = d->rooms.value(roomJid); if (!room) { room = new QXmppMucRoom(client(), roomJid, this); d->rooms.insert(roomJid, room); connect(room, SIGNAL(destroyed(QObject*)), this, SLOT(_q_roomDestroyed(QObject*))); // emit signal emit roomAdded(room); } return room; } /// Returns the list of managed rooms. QList QXmppMucManager::rooms() const { return d->rooms.values(); } /// \cond QStringList QXmppMucManager::discoveryFeatures() const { // XEP-0045: Multi-User Chat return QStringList() << ns_muc << ns_muc_admin << ns_muc_owner << ns_muc_user << ns_conference; } bool QXmppMucManager::handleStanza(const QDomElement &element) { if (element.tagName() == "iq") { if (QXmppMucAdminIq::isMucAdminIq(element)) { QXmppMucAdminIq iq; iq.parse(element); QXmppMucRoom *room = d->rooms.value(iq.from()); if (room && iq.type() == QXmppIq::Result && room->d->permissionsQueue.remove(iq.id())) { foreach (const QXmppMucItem &item, iq.items()) { const QString jid = item.jid(); if (!room->d->permissions.contains(jid)) room->d->permissions.insert(jid, item); } if (room->d->permissionsQueue.isEmpty()) { emit room->permissionsReceived(room->d->permissions.values()); } } return true; } else if (QXmppMucOwnerIq::isMucOwnerIq(element)) { QXmppMucOwnerIq iq; iq.parse(element); QXmppMucRoom *room = d->rooms.value(iq.from()); if (room && iq.type() == QXmppIq::Result && !iq.form().isNull()) emit room->configurationReceived(iq.form()); return true; } } return false; } void QXmppMucManager::setClient(QXmppClient* client) { bool check; Q_UNUSED(check); QXmppClientExtension::setClient(client); check = connect(client, SIGNAL(messageReceived(QXmppMessage)), this, SLOT(_q_messageReceived(QXmppMessage))); Q_ASSERT(check); } /// \endcond void QXmppMucManager::_q_messageReceived(const QXmppMessage &msg) { if (msg.type() != QXmppMessage::Normal) return; // process room invitations const QString roomJid = msg.mucInvitationJid(); if (!roomJid.isEmpty() && (!d->rooms.contains(roomJid) || !d->rooms.value(roomJid)->isJoined())) { emit invitationReceived(roomJid, msg.from(), msg.mucInvitationReason()); } } void QXmppMucManager::_q_roomDestroyed(QObject *object) { const QString key = d->rooms.key(static_cast(object)); d->rooms.remove(key); } /// Constructs a new QXmppMucRoom. /// /// \param parent QXmppMucRoom::QXmppMucRoom(QXmppClient *client, const QString &jid, QObject *parent) : QObject(parent) { bool check; Q_UNUSED(check); d = new QXmppMucRoomPrivate; d->allowedActions = NoAction; d->client = client; d->discoManager = client->findExtension(); d->jid = jid; check = connect(d->client, SIGNAL(disconnected()), this, SLOT(_q_disconnected())); Q_ASSERT(check); check = connect(d->client, SIGNAL(messageReceived(QXmppMessage)), this, SLOT(_q_messageReceived(QXmppMessage))); Q_ASSERT(check); check = connect(d->client, SIGNAL(presenceReceived(QXmppPresence)), this, SLOT(_q_presenceReceived(QXmppPresence))); Q_ASSERT(check); if (d->discoManager) { check = connect(d->discoManager, SIGNAL(infoReceived(QXmppDiscoveryIq)), this, SLOT(_q_discoveryInfoReceived(QXmppDiscoveryIq))); Q_ASSERT(check); } // convenience signals for properties check = connect(this, SIGNAL(joined()), this, SIGNAL(isJoinedChanged())); Q_ASSERT(check); check = connect(this, SIGNAL(left()), this, SIGNAL(isJoinedChanged())); Q_ASSERT(check); } /// Destroys a QXmppMucRoom. QXmppMucRoom::~QXmppMucRoom() { delete d; } /// Returns the actions you are allowed to perform on the room. QXmppMucRoom::Actions QXmppMucRoom::allowedActions() const { return d->allowedActions; } /// Bans the specified user from the chat room. /// /// The specified \a jid is the Bare JID of the form "user@host". /// /// \return true if the request was sent, false otherwise bool QXmppMucRoom::ban(const QString &jid, const QString &reason) { if (!QXmppUtils::jidToResource(jid).isEmpty()) { qWarning("QXmppMucRoom::ban expects a bare JID"); return false; } QXmppMucItem item; item.setAffiliation(QXmppMucItem::OutcastAffiliation); item.setJid(jid); item.setReason(reason); QXmppMucAdminIq iq; iq.setType(QXmppIq::Set); iq.setTo(d->jid); iq.setItems(QList() << item); return d->client->sendPacket(iq); } /// Returns true if you are currently in the room. bool QXmppMucRoom::isJoined() const { return d->participants.contains(d->ownJid()); } /// Returns the chat room's bare JID. QString QXmppMucRoom::jid() const { return d->jid; } /// Joins the chat room. /// /// \return true if the request was sent, false otherwise bool QXmppMucRoom::join() { if (isJoined() || d->nickName.isEmpty()) return false; // reflect our current presence in the chat room QXmppPresence packet = d->client->clientPresence(); packet.setTo(d->ownJid()); packet.setType(QXmppPresence::Available); packet.setMucPassword(d->password); packet.setMucSupported(true); return d->client->sendPacket(packet); } /// Kicks the specified user from the chat room. /// /// The specified \a jid is the Occupant JID of the form "room@service/nick". /// /// \return true if the request was sent, false otherwise bool QXmppMucRoom::kick(const QString &jid, const QString &reason) { QXmppMucItem item; item.setNick(QXmppUtils::jidToResource(jid)); item.setRole(QXmppMucItem::NoRole); item.setReason(reason); QXmppMucAdminIq iq; iq.setType(QXmppIq::Set); iq.setTo(d->jid); iq.setItems(QList() << item); return d->client->sendPacket(iq); } /// Leaves the chat room. /// /// \param message An optional message. /// /// \return true if the request was sent, false otherwise bool QXmppMucRoom::leave(const QString &message) { QXmppPresence packet; packet.setTo(d->ownJid()); packet.setType(QXmppPresence::Unavailable); packet.setStatusText(message); return d->client->sendPacket(packet); } /// Returns the chat room's human-readable name. /// /// This name will only be available after the room has been joined. QString QXmppMucRoom::name() const { return d->name; } /// Returns your own nickname. QString QXmppMucRoom::nickName() const { return d->nickName; } /// Invites a user to the chat room. /// /// \param jid /// \param reason /// /// \return true if the request was sent, false otherwise bool QXmppMucRoom::sendInvitation(const QString &jid, const QString &reason) { QXmppMessage message; message.setTo(jid); message.setType(QXmppMessage::Normal); message.setMucInvitationJid(d->jid); message.setMucInvitationReason(reason); return d->client->sendPacket(message); } /// Sends a message to the room. /// /// \return true if the request was sent, false otherwise bool QXmppMucRoom::sendMessage(const QString &text) { QXmppMessage msg; msg.setTo(d->jid); msg.setType(QXmppMessage::GroupChat); msg.setBody(text); return d->client->sendPacket(msg); } /// Sets your own nickname. /// /// You need to set your nickname before calling join(). /// /// \param nickName void QXmppMucRoom::setNickName(const QString &nickName) { if (nickName == d->nickName) return; const bool wasJoined = isJoined(); d->nickName = nickName; emit nickNameChanged(nickName); // if we had already joined the room, request nickname change if (wasJoined) { QXmppPresence packet = d->client->clientPresence(); packet.setTo(d->ownJid()); packet.setType(QXmppPresence::Available); d->client->sendPacket(packet); } } /// Returns the "Full JID" of the given participant. /// /// The specified \a jid is the Occupant JID of the form "room@service/nick". QString QXmppMucRoom::participantFullJid(const QString &jid) const { if (d->participants.contains(jid)) return d->participants.value(jid).mucItem().jid(); else return QString(); } /// Returns the presence for the given participant. /// /// The specified \a jid is the Occupant JID of the form "room@service/nick". QXmppPresence QXmppMucRoom::participantPresence(const QString &jid) const { if (d->participants.contains(jid)) return d->participants.value(jid); QXmppPresence presence; presence.setFrom(jid); presence.setType(QXmppPresence::Unavailable); return presence; } /// Returns the list of participant JIDs. /// /// These JIDs are Occupant JIDs of the form "room@service/nick". QStringList QXmppMucRoom::participants() const { return d->participants.keys(); } /// Returns the chat room password. QString QXmppMucRoom::password() const { return d->password; } /// Sets the chat room password. /// /// \param password void QXmppMucRoom::setPassword(const QString &password) { d->password = password; } /// Returns the room's subject. QString QXmppMucRoom::subject() const { return d->subject; } /// Sets the chat room's subject. /// /// \param subject void QXmppMucRoom::setSubject(const QString &subject) { QXmppMessage msg; msg.setTo(d->jid); msg.setType(QXmppMessage::GroupChat); msg.setSubject(subject); d->client->sendPacket(msg); } /// Request the configuration form for the chat room. /// /// \return true if the request was sent, false otherwise /// /// \sa configurationReceived() bool QXmppMucRoom::requestConfiguration() { QXmppMucOwnerIq iq; iq.setTo(d->jid); return d->client->sendPacket(iq); } /// Send the configuration form for the chat room. /// /// \param form /// /// \return true if the request was sent, false otherwise bool QXmppMucRoom::setConfiguration(const QXmppDataForm &form) { QXmppMucOwnerIq iqPacket; iqPacket.setType(QXmppIq::Set); iqPacket.setTo(d->jid); iqPacket.setForm(form); return d->client->sendPacket(iqPacket); } /// Request the room's permissions. /// /// \return true if the request was sent, false otherwise /// /// \sa permissionsReceived() bool QXmppMucRoom::requestPermissions() { QList affiliations; affiliations << QXmppMucItem::OwnerAffiliation; affiliations << QXmppMucItem::AdminAffiliation; affiliations << QXmppMucItem::MemberAffiliation; affiliations << QXmppMucItem::OutcastAffiliation; d->permissions.clear(); d->permissionsQueue.clear(); foreach (QXmppMucItem::Affiliation affiliation, affiliations) { QXmppMucItem item; item.setAffiliation(affiliation); QXmppMucAdminIq iq; iq.setTo(d->jid); iq.setItems(QList() << item); if (!d->client->sendPacket(iq)) return false; d->permissionsQueue += iq.id(); } return true; } /// Sets the room's permissions. /// /// \param permissions /// /// \return true if the request was sent, false otherwise bool QXmppMucRoom::setPermissions(const QList &permissions) { QList items; // Process changed members foreach (const QXmppMucItem &item, permissions) { const QString jid = item.jid(); if (d->permissions.value(jid).affiliation() != item.affiliation()) items << item; d->permissions.remove(jid); } // Process deleted members foreach (const QString &jid, d->permissions.keys()) { QXmppMucItem item; item.setAffiliation(QXmppMucItem::NoAffiliation); item.setJid(jid); items << item; d->permissions.remove(jid); } // Don't send request if there are no changes if (items.isEmpty()) return false; QXmppMucAdminIq iq; iq.setTo(d->jid); iq.setType(QXmppIq::Set); iq.setItems(items); return d->client->sendPacket(iq); } void QXmppMucRoom::_q_disconnected() { const bool wasJoined = isJoined(); // clear chat room participants const QStringList removed = d->participants.keys(); d->participants.clear(); foreach (const QString &jid, removed) emit participantRemoved(jid); emit participantsChanged(); // update available actions if (d->allowedActions != NoAction) { d->allowedActions = NoAction; emit allowedActionsChanged(d->allowedActions); } // emit "left" signal if we had joined the room if (wasJoined) emit left(); } void QXmppMucRoom::_q_discoveryInfoReceived(const QXmppDiscoveryIq &iq) { if (iq.from() == d->jid) { QString name; foreach (const QXmppDiscoveryIq::Identity &identity, iq.identities()) { if (identity.category() == "conference") { name = identity.name(); break; } } if (name != d->name) { d->name = name; emit nameChanged(name); } } } void QXmppMucRoom::_q_messageReceived(const QXmppMessage &message) { if (QXmppUtils::jidToBareJid(message.from())!= d->jid) return; // handle message subject const QString subject = message.subject(); if (!subject.isEmpty()) { d->subject = subject; emit subjectChanged(subject); } emit messageReceived(message); } void QXmppMucRoom::_q_presenceReceived(const QXmppPresence &presence) { const QString jid = presence.from(); // if our own presence changes, reflect it in the chat room if (isJoined() && jid == d->client->configuration().jid()) { QXmppPresence packet = d->client->clientPresence(); packet.setTo(d->ownJid()); d->client->sendPacket(packet); } if (QXmppUtils::jidToBareJid(jid) != d->jid) return; if (presence.type() == QXmppPresence::Available) { const bool added = !d->participants.contains(jid); d->participants.insert(jid, presence); // refresh allowed actions if (jid == d->ownJid()) { QXmppMucItem mucItem = presence.mucItem(); Actions newActions = NoAction; // role if (mucItem.role() == QXmppMucItem::ModeratorRole) newActions |= (KickAction | SubjectAction); // affiliation if (mucItem.affiliation() == QXmppMucItem::OwnerAffiliation) newActions |= (ConfigurationAction | PermissionsAction | SubjectAction); else if (mucItem.affiliation() == QXmppMucItem::AdminAffiliation) newActions |= (PermissionsAction | SubjectAction); if (newActions != d->allowedActions) { d->allowedActions = newActions; emit allowedActionsChanged(d->allowedActions); } } if (added) { emit participantAdded(jid); emit participantsChanged(); if (jid == d->ownJid()) { // request room information if (d->discoManager) d->discoManager->requestInfo(d->jid); emit joined(); } } else { emit participantChanged(jid); } } else if (presence.type() == QXmppPresence::Unavailable) { if (d->participants.contains(jid)) { d->participants.insert(jid, presence); emit participantRemoved(jid); d->participants.remove(jid); emit participantsChanged(); // check whether this was our own presence if (jid == d->ownJid()) { // check whether we were kicked if (presence.mucStatusCodes().contains(307)) { const QString actor = presence.mucItem().actor(); const QString reason = presence.mucItem().reason(); emit kicked(actor, reason); } // clear chat room participants const QStringList removed = d->participants.keys(); d->participants.clear(); foreach (const QString &jid, removed) emit participantRemoved(jid); emit participantsChanged(); // update available actions if (d->allowedActions != NoAction) { d->allowedActions = NoAction; emit allowedActionsChanged(d->allowedActions); } // notify user we left the room emit left(); } } } else if (presence.type() == QXmppPresence::Error) { if (presence.isMucSupported()) { // emit error emit error(presence.error()); // notify the user we left the room emit left(); } } } qxmpp-0.7.6/src/client/QXmppClientExtension.h0000644000175000007640000000411212116723562021133 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPCLIENTEXTENSION_H #define QXMPPCLIENTEXTENSION_H #include "QXmppDiscoveryIq.h" #include "QXmppLogger.h" class QDomElement; class QStringList; class QXmppClient; class QXmppClientExtensionPrivate; class QXmppStream; /// \brief The QXmppClientExtension class is the base class for QXmppClient /// extensions. /// /// If you want to extend QXmppClient, for instance to support an IQ type /// which is not natively supported, you can subclass QXmppClientExtension /// and implement handleStanza(). You can then add your extension to the /// client instance using QXmppClient::addExtension(). /// /// \ingroup Core class QXMPP_EXPORT QXmppClientExtension : public QXmppLoggable { Q_OBJECT public: QXmppClientExtension(); virtual ~QXmppClientExtension(); virtual QStringList discoveryFeatures() const; virtual QList discoveryIdentities() const; /// \brief You need to implement this method to process incoming XMPP /// stanzas. /// /// You should return true if the stanza was handled and no further /// processing should occur, or false to let other extensions process /// the stanza. virtual bool handleStanza(const QDomElement &stanza) = 0; protected: QXmppClient *client(); virtual void setClient(QXmppClient *client); private: QXmppClientExtensionPrivate * const d; friend class QXmppClient; }; #endif qxmpp-0.7.6/src/client/QXmppDiscoveryManager.cpp0000644000175000007640000001745512116723562021633 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "QXmppDiscoveryManager.h" #include #include #include "QXmppClient.h" #include "QXmppConstants.h" #include "QXmppDataForm.h" #include "QXmppDiscoveryIq.h" #include "QXmppStream.h" #include "QXmppGlobal.h" class QXmppDiscoveryManagerPrivate { public: QString clientCapabilitiesNode; QString clientCategory; QString clientType; QString clientName; QXmppDataForm clientInfoForm; }; QXmppDiscoveryManager::QXmppDiscoveryManager() : d(new QXmppDiscoveryManagerPrivate) { d->clientCapabilitiesNode = "http://code.google.com/p/qxmpp"; d->clientCategory = "client"; d->clientType = "pc"; if (qApp->applicationName().isEmpty() && qApp->applicationVersion().isEmpty()) d->clientName = QString("%1 %2").arg("Based on QXmpp", QXmppVersion()); else d->clientName = QString("%1 %2").arg(qApp->applicationName(), qApp->applicationVersion()); } QXmppDiscoveryManager::~QXmppDiscoveryManager() { delete d; } /// Requests information from the specified XMPP entity. /// /// \param jid The target entity's JID. /// \param node The target node (optional). QString QXmppDiscoveryManager::requestInfo(const QString& jid, const QString& node) { QXmppDiscoveryIq request; request.setType(QXmppIq::Get); request.setQueryType(QXmppDiscoveryIq::InfoQuery); request.setTo(jid); if(!node.isEmpty()) request.setQueryNode(node); if(client()->sendPacket(request)) return request.id(); else return QString(); } /// Requests items from the specified XMPP entity. /// /// \param jid The target entity's JID. /// \param node The target node (optional). QString QXmppDiscoveryManager::requestItems(const QString& jid, const QString& node) { QXmppDiscoveryIq request; request.setType(QXmppIq::Get); request.setQueryType(QXmppDiscoveryIq::ItemsQuery); request.setTo(jid); if(!node.isEmpty()) request.setQueryNode(node); if(client()->sendPacket(request)) return request.id(); else return QString(); } /// Returns the client's full capabilities. QXmppDiscoveryIq QXmppDiscoveryManager::capabilities() { QXmppDiscoveryIq iq; iq.setType(QXmppIq::Result); iq.setQueryType(QXmppDiscoveryIq::InfoQuery); // features QStringList features; features << ns_data // XEP-0004: Data Forms << ns_rsm // XEP-0059: Result Set Management << ns_xhtml_im // XEP-0071: XHTML-IM << ns_chat_states // XEP-0085: Chat State Notifications << ns_capabilities // XEP-0115: Entity Capabilities << ns_ping // XEP-0199: XMPP Ping << ns_attention; // XEP-0224: Attention foreach(QXmppClientExtension* extension, client()->extensions()) { if(extension) features << extension->discoveryFeatures(); } iq.setFeatures(features); // identities QList identities; QXmppDiscoveryIq::Identity identity; identity.setCategory(clientCategory()); identity.setType(clientType()); identity.setName(clientName()); identities << identity; foreach(QXmppClientExtension* extension, client()->extensions()) { if(extension) identities << extension->discoveryIdentities(); } iq.setIdentities(identities); // extended information if (!d->clientInfoForm.isNull()) iq.setForm(d->clientInfoForm); return iq; } /// Sets the capabilities node of the local XMPP client. /// /// \param node void QXmppDiscoveryManager::setClientCapabilitiesNode(const QString &node) { d->clientCapabilitiesNode = node; } /// Sets the category of the local XMPP client. /// /// You can find a list of valid categories at: /// http://xmpp.org/registrar/disco-categories.html /// /// \param category void QXmppDiscoveryManager::setClientCategory(const QString& category) { d->clientCategory = category; } /// Sets the type of the local XMPP client. /// /// You can find a list of valid types at: /// http://xmpp.org/registrar/disco-categories.html /// /// \param type void QXmppDiscoveryManager::setClientType(const QString& type) { d->clientType = type; } /// Sets the name of the local XMPP client. /// /// \param name void QXmppDiscoveryManager::setClientName(const QString& name) { d->clientName = name; } /// Returns the capabilities node of the local XMPP client. /// /// By default this is "http://code.google.com/p/qxmpp". QString QXmppDiscoveryManager::clientCapabilitiesNode() const { return d->clientCapabilitiesNode; } /// Returns the category of the local XMPP client. /// /// By default this is "client". QString QXmppDiscoveryManager::clientCategory() const { return d->clientCategory; } /// Returns the type of the local XMPP client. /// /// By default this is "pc". QString QXmppDiscoveryManager::clientType() const { return d->clientType; } /// Returns the name of the local XMPP client. /// /// By default this is "Based on QXmpp x.y.z". QString QXmppDiscoveryManager::clientName() const { return d->clientName; } /// Returns the client's extended information form, as defined /// by XEP-0128 Service Discovery Extensions. QXmppDataForm QXmppDiscoveryManager::clientInfoForm() const { return d->clientInfoForm; } /// Sets the client's extended information form, as defined /// by XEP-0128 Service Discovery Extensions. void QXmppDiscoveryManager::setClientInfoForm(const QXmppDataForm &form) { d->clientInfoForm = form; } /// \cond QStringList QXmppDiscoveryManager::discoveryFeatures() const { return QStringList() << ns_disco_info; } bool QXmppDiscoveryManager::handleStanza(const QDomElement &element) { if (element.tagName() == "iq" && QXmppDiscoveryIq::isDiscoveryIq(element)) { QXmppDiscoveryIq receivedIq; receivedIq.parse(element); switch (receivedIq.type()) { case QXmppIq::Get: if (receivedIq.queryType() == QXmppDiscoveryIq::InfoQuery && (receivedIq.queryNode().isEmpty() || receivedIq.queryNode().startsWith(d->clientCapabilitiesNode))) { // respond to info queries for the client itself QXmppDiscoveryIq qxmppFeatures = capabilities(); qxmppFeatures.setId(receivedIq.id()); qxmppFeatures.setTo(receivedIq.from()); qxmppFeatures.setQueryNode(receivedIq.queryNode()); client()->sendPacket(qxmppFeatures); return true; } else { // let other managers handle other queries return false; } case QXmppIq::Result: case QXmppIq::Error: // handle all replies if (receivedIq.queryType() == QXmppDiscoveryIq::InfoQuery) { emit infoReceived(receivedIq); } else if (receivedIq.queryType() == QXmppDiscoveryIq::ItemsQuery) { emit itemsReceived(receivedIq); } return true; case QXmppIq::Set: // let other manager handle "set" IQs return false; } } return false; } /// \endcond qxmpp-0.7.6/src/client/QXmppMessageReceiptManager.cpp0000644000175000007640000000363212116723562022554 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Georg Rudoy * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "QXmppMessageReceiptManager.h" #include #include "QXmppConstants.h" #include "QXmppMessage.h" #include "QXmppClient.h" /// Constructs a QXmppMessageReceiptManager to handle incoming and outgoing /// message delivery receipts. QXmppMessageReceiptManager::QXmppMessageReceiptManager() : QXmppClientExtension() { } /// \cond QStringList QXmppMessageReceiptManager::discoveryFeatures() const { return QStringList(ns_message_receipts); } bool QXmppMessageReceiptManager::handleStanza(const QDomElement &stanza) { if (stanza.tagName() != "message") return false; QXmppMessage message; message.parse(stanza); // Handle receipts and cancel any further processing. if (!message.receiptId().isEmpty()) { emit messageDelivered(message.from(), message.receiptId()); return true; } // If requested, send a receipt. if (message.isReceiptRequested() && !message.from().isEmpty() && !message.id().isEmpty()) { QXmppMessage receipt; receipt.setTo(message.from()); receipt.setReceiptId(message.id()); client()->sendPacket(receipt); } // Continue processing. return false; } /// \endcond qxmpp-0.7.6/src/client/QXmppInvokable.h0000644000175000007640000000470412116723562017741 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Ian Reinhart Geiser * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPINVOKABLE_H #define QXMPPINVOKABLE_H #include #include #include #include #include #include "QXmppGlobal.h" /** This is the base class for all objects that will be invokable via RPC. All public slots of objects derived from this class will be exposed to the RPC interface. As a note for all methods, they can only understand types that QVariant knows about. @author Ian Reinhart Geiser */ class QXMPP_EXPORT QXmppInvokable : public QObject { Q_OBJECT public: QXmppInvokable( QObject *parent = 0 ); ~QXmppInvokable(); /** * Execute a method on an object. with a set of arguments. This method is reentrant, and the method * that is invoked will be done in a thread safe manner. It should be noted that while this method * is threadsafe and reentrant the side affects of the methods invoked may not be. */ QVariant dispatch( const QByteArray &method, const QList &args = QList() ); /** * Utility method to convert a QList to a list of types for type * checking. */ static QList paramTypes( const QList ¶ms ); /** * Reimplement this method to return a true if the invoking JID is allowed to execute the method. */ virtual bool isAuthorized( const QString &jid ) const = 0; public slots: /** * This provides a list of interfaces for introspection of the presented interface. */ QStringList interfaces() const; private: void buildMethodHash(); QHash m_methodHash; QReadWriteLock m_lock; }; #endif qxmpp-0.7.6/src/client/QXmppClient.cpp0000644000175000007640000004176512116723562017610 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include #include "QXmppClient.h" #include "QXmppClientExtension.h" #include "QXmppConstants.h" #include "QXmppLogger.h" #include "QXmppOutgoingClient.h" #include "QXmppMessage.h" #include "QXmppUtils.h" #include "QXmppRosterManager.h" #include "QXmppVCardManager.h" #include "QXmppVersionManager.h" #include "QXmppEntityTimeManager.h" #include "QXmppDiscoveryManager.h" #include "QXmppDiscoveryIq.h" class QXmppClientPrivate { public: QXmppClientPrivate(QXmppClient *qq); QXmppPresence clientPresence; ///< Current presence of the client QList extensions; QXmppLogger *logger; QXmppOutgoingClient *stream; ///< Pointer to the XMPP stream // reconnection bool receivedConflict; int reconnectionTries; QTimer *reconnectionTimer; void addProperCapability(QXmppPresence& presence); int getNextReconnectTime() const; private: QXmppClient *q; }; QXmppClientPrivate::QXmppClientPrivate(QXmppClient *qq) : clientPresence(QXmppPresence::Available) , logger(0) , stream(0) , receivedConflict(false) , reconnectionTries(0) , reconnectionTimer(0) , q(qq) { } void QXmppClientPrivate::addProperCapability(QXmppPresence& presence) { QXmppDiscoveryManager* ext = q->findExtension(); if(ext) { presence.setCapabilityHash("sha-1"); presence.setCapabilityNode(ext->clientCapabilitiesNode()); presence.setCapabilityVer(ext->capabilities().verificationString()); } } int QXmppClientPrivate::getNextReconnectTime() const { if (reconnectionTries < 5) return 10 * 1000; else if (reconnectionTries < 10) return 20 * 1000; else if (reconnectionTries < 15) return 40 * 1000; else return 60 * 1000; } /// \mainpage /// /// QXmpp is a cross-platform C++ XMPP client library based on the Qt /// framework. It tries to use Qt's programming conventions in order to ease /// the learning curve for new programmers. /// /// QXmpp based clients are built using QXmppClient instances which handle the /// establishment of the XMPP connection and provide a number of high-level /// "managers" to perform specific tasks. You can write your own managers to /// extend QXmpp by subclassing QXmppClientExtension. /// /// Main Class: /// - QXmppClient /// /// Managers to perform specific tasks: /// - QXmppRosterManager /// - QXmppVCardManager /// - QXmppTransferManager /// - QXmppMucManager /// - QXmppCallManager /// - QXmppArchiveManager /// - QXmppVersionManager /// - QXmppDiscoveryManager /// - QXmppEntityTimeManager /// /// XMPP stanzas: If you are interested in a more low-level API, you can refer to these /// classes. /// - QXmppIq /// - QXmppMessage /// - QXmppPresence /// ///

/// Project Details: /// /// Project Page: http://code.google.com/p/qxmpp/ ///
/// Report Issues: http://code.google.com/p/qxmpp/issues/ ///
/// New Releases: http://code.google.com/p/qxmpp/downloads/ /// /// Creates a QXmppClient object. /// \param parent is passed to the QObject's constructor. /// The default value is 0. QXmppClient::QXmppClient(QObject *parent) : QXmppLoggable(parent), d(new QXmppClientPrivate(this)) { bool check; Q_UNUSED(check); d->stream = new QXmppOutgoingClient(this); d->addProperCapability(d->clientPresence); check = connect(d->stream, SIGNAL(elementReceived(QDomElement,bool&)), this, SLOT(_q_elementReceived(QDomElement,bool&))); Q_ASSERT(check); check = connect(d->stream, SIGNAL(messageReceived(QXmppMessage)), this, SIGNAL(messageReceived(QXmppMessage))); Q_ASSERT(check); check = connect(d->stream, SIGNAL(presenceReceived(QXmppPresence)), this, SIGNAL(presenceReceived(QXmppPresence))); Q_ASSERT(check); check = connect(d->stream, SIGNAL(iqReceived(QXmppIq)), this, SIGNAL(iqReceived(QXmppIq))); Q_ASSERT(check); check = connect(d->stream->socket(), SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(_q_socketStateChanged(QAbstractSocket::SocketState))); Q_ASSERT(check); check = connect(d->stream, SIGNAL(connected()), this, SLOT(_q_streamConnected())); Q_ASSERT(check); check = connect(d->stream, SIGNAL(disconnected()), this, SLOT(_q_streamDisconnected())); Q_ASSERT(check); check = connect(d->stream, SIGNAL(error(QXmppClient::Error)), this, SLOT(_q_streamError(QXmppClient::Error))); Q_ASSERT(check); // reconnection d->reconnectionTimer = new QTimer(this); d->reconnectionTimer->setSingleShot(true); connect(d->reconnectionTimer, SIGNAL(timeout()), this, SLOT(_q_reconnect())); Q_ASSERT(check); // logging setLogger(QXmppLogger::getLogger()); addExtension(new QXmppRosterManager(this)); addExtension(new QXmppVCardManager); addExtension(new QXmppVersionManager); addExtension(new QXmppEntityTimeManager()); addExtension(new QXmppDiscoveryManager()); } /// Destructor, destroys the QXmppClient object. /// QXmppClient::~QXmppClient() { delete d; } /// Registers a new \a extension with the client. /// /// \param extension bool QXmppClient::addExtension(QXmppClientExtension* extension) { return insertExtension(d->extensions.size(), extension); } /// Registers a new \a extension with the client at the given \a index. /// /// \param index /// \param extension bool QXmppClient::insertExtension(int index, QXmppClientExtension *extension) { if (d->extensions.contains(extension)) { qWarning("Cannot add extension, it has already been added"); return false; } extension->setParent(this); extension->setClient(this); d->extensions.insert(index, extension); return true; } /// Unregisters the given extension from the client. If the extension /// is found, it will be destroyed. /// /// \param extension bool QXmppClient::removeExtension(QXmppClientExtension* extension) { if (d->extensions.contains(extension)) { d->extensions.removeAll(extension); delete extension; return true; } else { qWarning("Cannot remove extension, it was never added"); return false; } } /// Returns a list containing all the client's extensions. /// QList QXmppClient::extensions() { return d->extensions; } /// Returns a modifiable reference to the current configuration of QXmppClient. /// \return Reference to the QXmppClient's configuration for the connection. QXmppConfiguration& QXmppClient::configuration() { return d->stream->configuration(); } /// Attempts to connect to the XMPP server. Server details and other configurations /// are specified using the config parameter. Use signals connected(), error(QXmppClient::Error) /// and disconnected() to know the status of the connection. /// \param config Specifies the configuration object for connecting the XMPP server. /// This contains the host name, user, password etc. See QXmppConfiguration for details. /// \param initialPresence The initial presence which will be set for this user /// after establishing the session. The default value is QXmppPresence::Available void QXmppClient::connectToServer(const QXmppConfiguration& config, const QXmppPresence& initialPresence) { d->stream->configuration() = config; d->clientPresence = initialPresence; d->addProperCapability(d->clientPresence); d->stream->connectToHost(); } /// Overloaded function to simply connect to an XMPP server with a JID and password. /// /// \param jid JID for the account. /// \param password Password for the account. void QXmppClient::connectToServer(const QString &jid, const QString &password) { QXmppConfiguration config; config.setJid(jid); config.setPassword(password); connectToServer(config); } /// After successfully connecting to the server use this function to send /// stanzas to the server. This function can solely be used to send various kind /// of stanzas to the server. QXmppStanza is a parent class of all the stanzas /// QXmppMessage, QXmppPresence, QXmppIq, QXmppBind, QXmppRosterIq, QXmppSession /// and QXmppVCard. /// /// \return Returns true if the packet was sent, false otherwise. /// /// Following code snippet illustrates how to send a message using this function: /// \code /// QXmppMessage message(from, to, message); /// client.sendPacket(message); /// \endcode /// /// \param packet A valid XMPP stanza. It can be an iq, a message or a presence stanza. /// bool QXmppClient::sendPacket(const QXmppStanza& packet) { return d->stream->sendPacket(packet); } /// Disconnects the client and the current presence of client changes to /// QXmppPresence::Unavailable and status text changes to "Logged out". /// /// \note Make sure that the clientPresence is changed to /// QXmppPresence::Available, if you are again calling connectToServer() after /// calling the disconnectFromServer() function. /// void QXmppClient::disconnectFromServer() { // cancel reconnection d->reconnectionTimer->stop(); d->clientPresence.setType(QXmppPresence::Unavailable); d->clientPresence.setStatusText("Logged out"); if (d->stream->isConnected()) sendPacket(d->clientPresence); d->stream->disconnectFromHost(); } /// Returns true if the client has authenticated with the XMPP server. bool QXmppClient::isAuthenticated() const { return d->stream->isAuthenticated(); } /// Returns true if the client is connected to the XMPP server. /// bool QXmppClient::isConnected() const { return d->stream->isConnected(); } /// Returns the reference to QXmppRosterManager object of the client. /// \return Reference to the roster object of the connected client. Use this to /// get the list of friends in the roster and their presence information. /// QXmppRosterManager& QXmppClient::rosterManager() { return *findExtension(); } /// Utility function to send message to all the resources associated with the /// specified bareJid. If there are no resources available, that is the contact /// is offline or not present in the roster, it will still send a message to /// the bareJid. /// /// \param bareJid bareJid of the receiving entity /// \param message Message string to be sent. void QXmppClient::sendMessage(const QString& bareJid, const QString& message) { QStringList resources = rosterManager().getResources(bareJid); if(!resources.isEmpty()) { for(int i = 0; i < resources.size(); ++i) { sendPacket(QXmppMessage("", bareJid + "/" + resources.at(i), message)); } } else { sendPacket(QXmppMessage("", bareJid, message)); } } /// Returns the client's current state. QXmppClient::State QXmppClient::state() const { if (d->stream->isConnected()) return QXmppClient::ConnectedState; else if (d->stream->socket()->state() != QAbstractSocket::UnconnectedState && d->stream->socket()->state() != QAbstractSocket::ClosingState) return QXmppClient::ConnectingState; else return QXmppClient::DisconnectedState; } /// Returns the client's current presence. /// QXmppPresence QXmppClient::clientPresence() const { return d->clientPresence; } /// Changes the presence of the connected client. /// /// The connection to the server will be updated accordingly: /// /// \li If the presence type is QXmppPresence::Unavailable, the connection /// to the server will be closed. /// /// \li Otherwise, the connection to the server will be established /// as needed. /// /// \param presence QXmppPresence object /// void QXmppClient::setClientPresence(const QXmppPresence& presence) { d->clientPresence = presence; d->addProperCapability(d->clientPresence); if (presence.type() == QXmppPresence::Unavailable) { // cancel reconnection d->reconnectionTimer->stop(); // NOTE: we can't call disconnect() because it alters // the client presence if (d->stream->isConnected()) sendPacket(d->clientPresence); d->stream->disconnectFromHost(); } else if (d->stream->isConnected()) sendPacket(d->clientPresence); else connectToServer(d->stream->configuration(), presence); } /// Returns the socket error if error() is QXmppClient::SocketError. /// QAbstractSocket::SocketError QXmppClient::socketError() { return d->stream->socket()->error(); } /// Returns the XMPP stream error if QXmppClient::Error is QXmppClient::XmppStreamError. /// QXmppStanza::Error::Condition QXmppClient::xmppStreamError() { return d->stream->xmppStreamError(); } /// Returns the reference to QXmppVCardManager, implementation of XEP-0054. /// http://xmpp.org/extensions/xep-0054.html /// QXmppVCardManager& QXmppClient::vCardManager() { return *findExtension(); } /// Returns the reference to QXmppVersionManager, implementation of XEP-0092. /// http://xmpp.org/extensions/xep-0092.html /// QXmppVersionManager& QXmppClient::versionManager() { return *findExtension(); } /// Give extensions a chance to handle incoming stanzas. /// /// \param element /// \param handled void QXmppClient::_q_elementReceived(const QDomElement &element, bool &handled) { foreach (QXmppClientExtension *extension, d->extensions) { if (extension->handleStanza(element)) { handled = true; return; } } } void QXmppClient::_q_reconnect() { if (d->stream->configuration().autoReconnectionEnabled()) { debug("Reconnecting to server"); d->stream->connectToHost(); } } void QXmppClient::_q_socketStateChanged(QAbstractSocket::SocketState socketState) { Q_UNUSED(socketState); emit stateChanged(state()); } /// At connection establishment, send initial presence. void QXmppClient::_q_streamConnected() { d->receivedConflict = false; d->reconnectionTries = 0; // notify managers emit connected(); emit stateChanged(QXmppClient::ConnectedState); // send initial presence if (d->stream->isAuthenticated()) sendPacket(d->clientPresence); } void QXmppClient::_q_streamDisconnected() { // notify managers emit disconnected(); emit stateChanged(QXmppClient::DisconnectedState); } void QXmppClient::_q_streamError(QXmppClient::Error err) { if (d->stream->configuration().autoReconnectionEnabled()) { if (err == QXmppClient::XmppStreamError) { // if we receive a resource conflict, inhibit reconnection if (d->stream->xmppStreamError() == QXmppStanza::Error::Conflict) d->receivedConflict = true; } else if (err == QXmppClient::SocketError && !d->receivedConflict) { // schedule reconnect d->reconnectionTimer->start(d->getNextReconnectTime()); } else if (err == QXmppClient::KeepAliveError) { // if we got a keepalive error, reconnect in one second d->reconnectionTimer->start(1000); } } // notify managers emit error(err); } /// Returns the QXmppLogger associated with the current QXmppClient. QXmppLogger *QXmppClient::logger() const { return d->logger; } /// Sets the QXmppLogger associated with the current QXmppClient. void QXmppClient::setLogger(QXmppLogger *logger) { if (logger != d->logger) { if (d->logger) { disconnect(this, SIGNAL(logMessage(QXmppLogger::MessageType,QString)), d->logger, SLOT(log(QXmppLogger::MessageType,QString))); disconnect(this, SIGNAL(setGauge(QString,double)), d->logger, SLOT(setGauge(QString,double))); disconnect(this, SIGNAL(updateCounter(QString,qint64)), d->logger, SLOT(updateCounter(QString,qint64))); } d->logger = logger; if (d->logger) { connect(this, SIGNAL(logMessage(QXmppLogger::MessageType,QString)), d->logger, SLOT(log(QXmppLogger::MessageType,QString))); connect(this, SIGNAL(setGauge(QString,double)), d->logger, SLOT(setGauge(QString,double))); connect(this, SIGNAL(updateCounter(QString,qint64)), d->logger, SLOT(updateCounter(QString,qint64))); } emit loggerChanged(d->logger); } } qxmpp-0.7.6/src/client/QXmppDiscoveryManager.h0000644000175000007640000000445212116723562021271 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPDISCOVERYMANAGER_H #define QXMPPDISCOVERYMANAGER_H #include "QXmppClientExtension.h" class QXmppDataForm; class QXmppDiscoveryIq; class QXmppDiscoveryManagerPrivate; /// \brief The QXmppDiscoveryManager class makes it possible to discover information /// about other entities as defined by XEP-0030: Service Discovery. /// /// \ingroup Managers class QXMPP_EXPORT QXmppDiscoveryManager : public QXmppClientExtension { Q_OBJECT public: QXmppDiscoveryManager(); ~QXmppDiscoveryManager(); QXmppDiscoveryIq capabilities(); QString requestInfo(const QString& jid, const QString& node = ""); QString requestItems(const QString& jid, const QString& node = ""); QString clientCapabilitiesNode() const; void setClientCapabilitiesNode(const QString&); // http://xmpp.org/registrar/disco-categories.html#client QString clientCategory() const; void setClientCategory(const QString&); void setClientName(const QString&); QString clientName() const; QString clientType() const; void setClientType(const QString&); QXmppDataForm clientInfoForm() const; void setClientInfoForm(const QXmppDataForm &form); /// \cond QStringList discoveryFeatures() const; bool handleStanza(const QDomElement &element); /// \endcond signals: /// This signal is emitted when an information response is received. void infoReceived(const QXmppDiscoveryIq&); /// This signal is emitted when an items response is received. void itemsReceived(const QXmppDiscoveryIq&); private: QXmppDiscoveryManagerPrivate *d; }; #endif // QXMPPDISCOVERYMANAGER_H qxmpp-0.7.6/src/client/QXmppBookmarkManager.h0000644000175000007640000000330312116723562021061 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPBOOKMARKMANAGER_H #define QXMPPBOOKMARKMANAGER_H #include #include "QXmppClientExtension.h" class QXmppBookmarkManagerPrivate; class QXmppBookmarkSet; /// \brief The QXmppBookmarkManager class allows you to store and retrieve /// bookmarks as defined by XEP-0048: Bookmarks. /// class QXMPP_EXPORT QXmppBookmarkManager : public QXmppClientExtension { Q_OBJECT public: QXmppBookmarkManager(); ~QXmppBookmarkManager(); bool areBookmarksReceived() const; QXmppBookmarkSet bookmarks() const; bool setBookmarks(const QXmppBookmarkSet &bookmarks); /// \cond bool handleStanza(const QDomElement &stanza); /// \endcond signals: /// This signal is emitted when bookmarks are received. void bookmarksReceived(const QXmppBookmarkSet &bookmarks); protected: /// \cond void setClient(QXmppClient* client); /// \endcond private slots: void slotConnected(); void slotDisconnected(); private: QXmppBookmarkManagerPrivate * const d; }; #endif qxmpp-0.7.6/src/client/QXmppRosterManager.h0000644000175000007640000001170312116723562020575 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Manjeet Dahiya * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPROSTERMANAGER_H #define QXMPPROSTERMANAGER_H #include #include #include #include "QXmppClientExtension.h" #include "QXmppPresence.h" #include "QXmppRosterIq.h" class QXmppRosterManagerPrivate; /// \brief The QXmppRosterManager class provides access to a connected client's roster. /// /// \note It's object should not be created using it's constructor. Instead /// QXmppClient::rosterManager() should be used to get the reference of instantiated /// object this class. /// /// It stores all the Roster and Presence details of all the roster entries (that /// is all the bareJids) in the client's friend's list. It provides the /// functionality to get all the bareJids in the client's roster and Roster and /// Presence details of the same. /// /// After the successful xmpp connection that after the signal QXmppClient::connected() /// is emitted QXmpp requests for getting the roster. Once QXmpp receives the roster /// the signal QXmppRosterManager::rosterReceived() is emitted and after that user can /// use the functions of this class to get roster entries. /// /// Function QXmppRosterManager::isRosterReceived() tells whether the roster has been /// received or not. /// /// The itemAdded(), itemChanged() and itemRemoved() signals are emitted whenever roster /// entries are added, changed or removed. /// /// The presenceChanged() signal is emitted whenever the presence for a roster item changes. /// /// \ingroup Managers class QXMPP_EXPORT QXmppRosterManager : public QXmppClientExtension { Q_OBJECT public: QXmppRosterManager(QXmppClient* stream); ~QXmppRosterManager(); bool isRosterReceived() const; QStringList getRosterBareJids() const; QXmppRosterIq::Item getRosterEntry(const QString& bareJid) const; QStringList getResources(const QString& bareJid) const; QMap getAllPresencesForBareJid( const QString& bareJid) const; QXmppPresence getPresence(const QString& bareJid, const QString& resource) const; /// \cond bool handleStanza(const QDomElement &element); /// \endcond public slots: bool acceptSubscription(const QString &bareJid, const QString &reason = QString()); bool refuseSubscription(const QString &bareJid, const QString &reason = QString()); bool addItem(const QString &bareJid, const QString &name = QString(), const QSet &groups = QSet()); bool removeItem(const QString &bareJid); bool renameItem(const QString &bareJid, const QString &name); bool subscribe(const QString &bareJid, const QString &reason = QString()); bool unsubscribe(const QString &bareJid, const QString &reason = QString()); signals: /// This signal is emitted when the Roster IQ is received after a successful /// connection. That is the roster entries are empty before this signal is emitted. /// One should use getRosterBareJids() and getRosterEntry() only after /// this signal has been emitted. void rosterReceived(); /// This signal is emitted when the presence of a particular bareJid and resource changes. void presenceChanged(const QString& bareJid, const QString& resource); /// This signal is emitted when a contact asks to subscribe to your presence. /// /// You can either accept the request by calling acceptSubscription() or refuse it /// by calling refuseSubscription(). /// /// \note If you set QXmppConfiguration::autoAcceptSubscriptions() to true, this /// signal will not be emitted. void subscriptionReceived(const QString& bareJid); /// This signal is emitted when the roster entry of a particular bareJid is /// added as a result of roster push. void itemAdded(const QString& bareJid); /// This signal is emitted when the roster entry of a particular bareJid /// changes as a result of roster push. void itemChanged(const QString& bareJid); /// This signal is emitted when the roster entry of a particular bareJid is /// removed as a result of roster push. void itemRemoved(const QString& bareJid); private slots: void _q_connected(); void _q_disconnected(); void _q_presenceReceived(const QXmppPresence&); private: QXmppRosterManagerPrivate *d; }; #endif // QXMPPROSTER_H qxmpp-0.7.6/src/client/QXmppRpcManager.h0000644000175000007640000000576512116723562020056 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPRPCMANAGER_H #define QXMPPRPCMANAGER_H #include #include #include "QXmppClientExtension.h" #include "QXmppInvokable.h" #include "QXmppRemoteMethod.h" class QXmppRpcErrorIq; class QXmppRpcInvokeIq; class QXmppRpcResponseIq; /// \brief The QXmppRpcManager class make it possible to invoke remote methods /// and to expose local interfaces for remote procedure calls, as specified by /// XEP-0009: Jabber-RPC. /// /// To make use of this manager, you need to instantiate it and load it into /// the QXmppClient instance as follows: /// /// \code /// QXmppRpcManager *manager = new QXmppRpcManager; /// client->addExtension(manager); /// \endcode /// /// \note THIS API IS NOT FINALIZED YET /// /// \ingroup Managers class QXMPP_EXPORT QXmppRpcManager : public QXmppClientExtension { Q_OBJECT public: QXmppRpcManager(); void addInvokableInterface( QXmppInvokable *interface ); QXmppRemoteMethodResult callRemoteMethod( const QString &jid, const QString &interface, const QVariant &arg1 = QVariant(), const QVariant &arg2 = QVariant(), const QVariant &arg3 = QVariant(), const QVariant &arg4 = QVariant(), const QVariant &arg5 = QVariant(), const QVariant &arg6 = QVariant(), const QVariant &arg7 = QVariant(), const QVariant &arg8 = QVariant(), const QVariant &arg9 = QVariant(), const QVariant &arg10 = QVariant() ); /// \cond QStringList discoveryFeatures() const; virtual QList discoveryIdentities() const; bool handleStanza(const QDomElement &element); /// \endcond signals: /// \cond void rpcCallResponse(const QXmppRpcResponseIq& result); void rpcCallError(const QXmppRpcErrorIq &err); /// \endcond private: void invokeInterfaceMethod(const QXmppRpcInvokeIq &iq); QMap m_interfaces; }; #endif qxmpp-0.7.6/src/client/QXmppRpcManager.cpp0000644000175000007640000001304212116723562020374 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "QXmppClient.h" #include "QXmppConstants.h" #include "QXmppInvokable.h" #include "QXmppRemoteMethod.h" #include "QXmppRpcIq.h" #include "QXmppRpcManager.h" /// Constructs a QXmppRpcManager. QXmppRpcManager::QXmppRpcManager() { } /// Adds a local interface which can be queried using RPC. /// /// \param interface void QXmppRpcManager::addInvokableInterface( QXmppInvokable *interface ) { m_interfaces[ interface->metaObject()->className() ] = interface; } /// Invokes a remote interface using RPC. /// /// \param iq void QXmppRpcManager::invokeInterfaceMethod( const QXmppRpcInvokeIq &iq ) { QXmppStanza::Error error; const QStringList methodBits = iq.method().split('.'); if (methodBits.size() != 2) return; const QString interface = methodBits.first(); const QString method = methodBits.last(); QXmppInvokable *iface = m_interfaces.value(interface); if (iface) { if ( iface->isAuthorized( iq.from() ) ) { if ( iface->interfaces().contains(method) ) { QVariant result = iface->dispatch(method.toLatin1(), iq.arguments() ); QXmppRpcResponseIq resultIq; resultIq.setId(iq.id()); resultIq.setTo(iq.from()); resultIq.setValues(QVariantList() << result); client()->sendPacket( resultIq ); return; } else { error.setType(QXmppStanza::Error::Cancel); error.setCondition(QXmppStanza::Error::ItemNotFound); } } else { error.setType(QXmppStanza::Error::Auth); error.setCondition(QXmppStanza::Error::Forbidden); } } else { error.setType(QXmppStanza::Error::Cancel); error.setCondition(QXmppStanza::Error::ItemNotFound); } QXmppRpcErrorIq errorIq; errorIq.setId(iq.id()); errorIq.setTo(iq.from()); errorIq.setQuery(iq); errorIq.setError(error); client()->sendPacket(errorIq); } /// Calls a remote method using RPC with the specified arguments. /// /// \note This method blocks until the response is received, and it may /// cause XMPP stanzas to be lost! QXmppRemoteMethodResult QXmppRpcManager::callRemoteMethod( const QString &jid, const QString &interface, const QVariant &arg1, const QVariant &arg2, const QVariant &arg3, const QVariant &arg4, const QVariant &arg5, const QVariant &arg6, const QVariant &arg7, const QVariant &arg8, const QVariant &arg9, const QVariant &arg10 ) { QVariantList args; if( arg1.isValid() ) args << arg1; if( arg2.isValid() ) args << arg2; if( arg3.isValid() ) args << arg3; if( arg4.isValid() ) args << arg4; if( arg5.isValid() ) args << arg5; if( arg6.isValid() ) args << arg6; if( arg7.isValid() ) args << arg7; if( arg8.isValid() ) args << arg8; if( arg9.isValid() ) args << arg9; if( arg10.isValid() ) args << arg10; QXmppRemoteMethod method( jid, interface, args, client() ); connect(this, SIGNAL(rpcCallResponse(QXmppRpcResponseIq)), &method, SLOT(gotResult(QXmppRpcResponseIq))); connect(this, SIGNAL(rpcCallError(QXmppRpcErrorIq)), &method, SLOT(gotError(QXmppRpcErrorIq))); return method.call(); } /// \cond QStringList QXmppRpcManager::discoveryFeatures() const { // XEP-0009: Jabber-RPC return QStringList() << ns_rpc; } QList QXmppRpcManager::discoveryIdentities() const { QXmppDiscoveryIq::Identity identity; identity.setCategory("automation"); identity.setType("rpc"); return QList() << identity; } bool QXmppRpcManager::handleStanza(const QDomElement &element) { // XEP-0009: Jabber-RPC if (QXmppRpcInvokeIq::isRpcInvokeIq(element)) { QXmppRpcInvokeIq rpcIqPacket; rpcIqPacket.parse(element); invokeInterfaceMethod(rpcIqPacket); return true; } else if(QXmppRpcResponseIq::isRpcResponseIq(element)) { QXmppRpcResponseIq rpcResponseIq; rpcResponseIq.parse(element); emit rpcCallResponse(rpcResponseIq); return true; } else if(QXmppRpcErrorIq::isRpcErrorIq(element)) { QXmppRpcErrorIq rpcErrorIq; rpcErrorIq.parse(element); emit rpcCallError(rpcErrorIq); return true; } return false; } /// \endcond qxmpp-0.7.6/src/client/QXmppArchiveManager.cpp0000644000175000007640000001112412116723562021230 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include "QXmppArchiveIq.h" #include "QXmppArchiveManager.h" #include "QXmppClient.h" #include "QXmppConstants.h" /// \cond QStringList QXmppArchiveManager::discoveryFeatures() const { // XEP-0036: Message Archiving return QStringList() << ns_archive; } bool QXmppArchiveManager::handleStanza(const QDomElement &element) { if (element.tagName() != "iq") return false; // XEP-0136: Message Archiving if(QXmppArchiveChatIq::isArchiveChatIq(element)) { QXmppArchiveChatIq archiveIq; archiveIq.parse(element); emit archiveChatReceived(archiveIq.chat(), archiveIq.resultSetReply()); return true; } else if(QXmppArchiveListIq::isArchiveListIq(element)) { QXmppArchiveListIq archiveIq; archiveIq.parse(element); emit archiveListReceived(archiveIq.chats(), archiveIq.resultSetReply()); return true; } else if(QXmppArchivePrefIq::isArchivePrefIq(element)) { // TODO: handle preference iq QXmppArchivePrefIq archiveIq; archiveIq.parse(element); return true; } return false; } /// \endcond /// Retrieves the list of available collections. Once the results are /// received, the archiveListReceived() signal will be emitted. /// /// \param jid JID you want conversations with. /// \param start Optional start time. /// \param end Optional end time. /// \param rsm Optional Result Set Management query /// void QXmppArchiveManager::listCollections(const QString& jid, const QDateTime& start, const QDateTime& end, const QXmppResultSetQuery &rsm) { QXmppArchiveListIq packet; packet.setResultSetQuery(rsm); packet.setWith(jid); packet.setStart(start); packet.setEnd(end); client()->sendPacket(packet); } /// \overload /// Retrieves the list of available collections. Once the results are /// received, the archiveListReceived() signal will be emitted. /// /// \param jid JID you want conversations with. /// \param start Start time. /// \param end End time. /// \param max Maximum number of collections to list. /// void QXmppArchiveManager::listCollections(const QString &jid, const QDateTime &start, const QDateTime &end, int max) { QXmppResultSetQuery rsm; rsm.setMax(max); listCollections(jid, start, end, rsm); } /// Removes the specified collection(s). /// /// \param jid The JID of the collection /// \param start Optional start time. /// \param end Optional end time. /// void QXmppArchiveManager::removeCollections(const QString &jid, const QDateTime &start, const QDateTime &end) { QXmppArchiveRemoveIq packet; packet.setType(QXmppIq::Set); packet.setWith(jid); packet.setStart(start); packet.setEnd(end); client()->sendPacket(packet); } /// Retrieves the specified collection. Once the results are received, /// the archiveChatReceived() will be emitted. /// /// \param jid The JID of the collection /// \param start The start time of the collection. /// \param rsm Optional Result Set Management query /// void QXmppArchiveManager::retrieveCollection(const QString &jid, const QDateTime &start, const QXmppResultSetQuery &rsm) { QXmppArchiveRetrieveIq packet; packet.setResultSetQuery(rsm); packet.setStart(start); packet.setWith(jid); client()->sendPacket(packet); } /// \overload /// Retrieves the specified collection. Once the results are received, /// the archiveChatReceived() will be emitted. /// /// \param jid The JID of the collection /// \param start The start time of the collection. /// \param max Maximum number of messages to retrieve. /// void QXmppArchiveManager::retrieveCollection(const QString &jid, const QDateTime &start, int max) { QXmppResultSetQuery rsm; rsm.setMax(max); retrieveCollection(jid, start, rsm); } #if 0 void QXmppArchiveManager::getPreferences() { QXmppArchivePrefIq packet; client()->sendPacket(packet); } #endif qxmpp-0.7.6/src/client/QXmppClientExtension.cpp0000644000175000007640000000331412116723562021471 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include "QXmppClientExtension.h" class QXmppClientExtensionPrivate { public: QXmppClient *client; }; /// Constructs a QXmppClient extension. /// QXmppClientExtension::QXmppClientExtension() : d(new QXmppClientExtensionPrivate) { d->client = 0; } /// Destroys a QXmppClient extension. /// QXmppClientExtension::~QXmppClientExtension() { delete d; } /// Returns the discovery features to add to the client. /// QStringList QXmppClientExtension::discoveryFeatures() const { return QStringList(); } /// Returns the discovery identities to add to the client. /// QList QXmppClientExtension::discoveryIdentities() const { return QList(); } /// Returns the client which loaded this extension. /// QXmppClient *QXmppClientExtension::client() { return d->client; } /// Sets the client which loaded this extension. /// /// \param client void QXmppClientExtension::setClient(QXmppClient *client) { d->client = client; } qxmpp-0.7.6/src/client/QXmppMessageReceiptManager.h0000644000175000007640000000307412116723562022221 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Georg Rudoy * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPMESSAGERECEIPTMANAGER_H #define QXMPPMESSAGERECEIPTMANAGER_H #include "QXmppClientExtension.h" /// \brief The QXmppMessageReceiptManager class makes it possible to /// send and receive message delivery receipts as defined in /// XEP-0184: Message Delivery Receipts. /// /// \ingroup Managers class QXMPP_EXPORT QXmppMessageReceiptManager : public QXmppClientExtension { Q_OBJECT public: QXmppMessageReceiptManager(); /// \cond virtual QStringList discoveryFeatures() const; virtual bool handleStanza(const QDomElement &stanza); /// \endcond signals: /// This signal is emitted when receipt for the message with the /// given id is received. The id could be previously obtained by /// calling QXmppMessage::id(). void messageDelivered(const QString &jid, const QString &id); }; #endif // QXMPPMESSAGERECEIPTMANAGER_H qxmpp-0.7.6/src/client/QXmppArchiveManager.h0000644000175000007640000000532212116723562020700 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPARCHIVEMANAGER_H #define QXMPPARCHIVEMANAGER_H #include #include "QXmppClientExtension.h" #include "QXmppResultSet.h" class QXmppArchiveChat; class QXmppArchiveChatIq; class QXmppArchiveListIq; class QXmppArchivePrefIq; /// \brief The QXmppArchiveManager class makes it possible to access message /// archives as defined by XEP-0136: Message Archiving. /// /// To make use of this manager, you need to instantiate it and load it into /// the QXmppClient instance as follows: /// /// \code /// QXmppArchiveManager *manager = new QXmppArchiveManager; /// client->addExtension(manager); /// \endcode /// /// \note Few servers support message archiving. Check if the server in use supports /// this XEP. /// /// \ingroup Managers class QXMPP_EXPORT QXmppArchiveManager : public QXmppClientExtension { Q_OBJECT public: void listCollections(const QString &jid, const QDateTime &start = QDateTime(), const QDateTime &end = QDateTime(), const QXmppResultSetQuery &rsm = QXmppResultSetQuery()); void listCollections(const QString &jid, const QDateTime &start, const QDateTime &end, int max); void removeCollections(const QString &jid, const QDateTime &start = QDateTime(), const QDateTime &end = QDateTime()); void retrieveCollection(const QString &jid, const QDateTime &start, const QXmppResultSetQuery &rsm = QXmppResultSetQuery()); void retrieveCollection(const QString &jid, const QDateTime &start, int max); /// \cond QStringList discoveryFeatures() const; bool handleStanza(const QDomElement &element); /// \endcond signals: /// This signal is emitted when archive list is received /// after calling listCollections() void archiveListReceived(const QList&, const QXmppResultSetReply &rsm = QXmppResultSetReply()); /// This signal is emitted when archive chat is received /// after calling retrieveCollection() void archiveChatReceived(const QXmppArchiveChat&, const QXmppResultSetReply &rsm = QXmppResultSetReply()); }; #endif qxmpp-0.7.6/src/client/QXmppInvokable.cpp0000644000175000007640000001057712116723562020301 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Ian Reinhart Geiser * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "QXmppInvokable.h" #include #include #include #include /// Constructs a QXmppInvokable with the specified \a parent. /// /// \param parent QXmppInvokable::QXmppInvokable(QObject *parent) : QObject(parent) { } /// Destroys a QXmppInvokable. QXmppInvokable::~QXmppInvokable() { } QVariant QXmppInvokable::dispatch( const QByteArray & method, const QList< QVariant > & args ) { buildMethodHash(); if( !m_methodHash.contains(method)) return QVariant(); int idx = m_methodHash[method]; if( paramTypes( args) != metaObject()->method(idx).parameterTypes ()) return QVariant(); const char *typeName = metaObject()->method(idx).typeName(); int resultType = QMetaType::type(typeName); #if QT_VERSION >= 0x050000 void *result = QMetaType::create(resultType, 0); #else void *result = QMetaType::construct(resultType, 0); #endif QGenericReturnArgument ret( typeName, result ); QList genericArgs; QList::ConstIterator iter = args.begin(); while( iter != args.end()) { const void *data = iter->data(); const char *name = iter->typeName(); genericArgs << QGenericArgument(name,data); ++iter; } if( QMetaObject::invokeMethod ( this, method.constData(), ret, genericArgs.value(0, QGenericArgument() ), genericArgs.value(1, QGenericArgument() ), genericArgs.value(2, QGenericArgument() ), genericArgs.value(3, QGenericArgument() ), genericArgs.value(4, QGenericArgument() ), genericArgs.value(5, QGenericArgument() ), genericArgs.value(6, QGenericArgument() ), genericArgs.value(7, QGenericArgument() ), genericArgs.value(8, QGenericArgument() ), genericArgs.value(9, QGenericArgument() )) ) { QVariant returnValue( resultType, result); QMetaType::destroy(resultType, result); return returnValue; } else { qDebug("No such method '%s'", method.constData() ); return QVariant(); } } QList< QByteArray > QXmppInvokable::paramTypes( const QList< QVariant > & params ) { QList types; foreach( QVariant variant, params) types << variant.typeName(); return types; } void QXmppInvokable::buildMethodHash( ) { QWriteLocker locker(&m_lock); if( m_methodHash.size() > 0 ) return; int methodCount = metaObject()->methodCount (); for( int idx = 0; idx < methodCount; ++idx) { #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) QByteArray signature = metaObject()->method(idx).methodSignature(); #else QByteArray signature = metaObject()->method(idx).signature(); #endif m_methodHash[signature.left(signature.indexOf('('))] = idx; // qDebug() << metaObject()->method(idx).parameterTypes(); } } QStringList QXmppInvokable::interfaces( ) const { QStringList results; int methodCount = metaObject()->methodCount (); for( int idx = 0; idx < methodCount; ++idx) { if( metaObject()->method(idx).methodType() == QMetaMethod::Slot ) { #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) QByteArray signature = metaObject()->method(idx).methodSignature(); #else QByteArray signature = metaObject()->method(idx).signature(); #endif results << signature.left(signature.indexOf('(')); } } return results; } qxmpp-0.7.6/src/client/QXmppRosterManager.cpp0000644000175000007640000002711112116723562021130 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Manjeet Dahiya * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include "QXmppClient.h" #include "QXmppPresence.h" #include "QXmppRosterIq.h" #include "QXmppRosterManager.h" #include "QXmppUtils.h" class QXmppRosterManagerPrivate { public: QXmppRosterManagerPrivate(QXmppRosterManager *qq); // map of bareJid and its rosterEntry QMap entries; // map of resources of the jid and map of resources and presences QMap > presences; // flag to store that the roster has been populated bool isRosterReceived; // id of the initial roster request QString rosterReqId; private: QXmppRosterManager *q; }; QXmppRosterManagerPrivate::QXmppRosterManagerPrivate(QXmppRosterManager *qq) : isRosterReceived(false), q(qq) { } /// Constructs a roster manager. QXmppRosterManager::QXmppRosterManager(QXmppClient* client) { bool check; Q_UNUSED(check); d = new QXmppRosterManagerPrivate(this); check = connect(client, SIGNAL(connected()), this, SLOT(_q_connected())); Q_ASSERT(check); check = connect(client, SIGNAL(disconnected()), this, SLOT(_q_disconnected())); Q_ASSERT(check); check = connect(client, SIGNAL(presenceReceived(QXmppPresence)), this, SLOT(_q_presenceReceived(QXmppPresence))); Q_ASSERT(check); } QXmppRosterManager::~QXmppRosterManager() { delete d; } /// Accepts a subscription request. /// /// You can call this method in reply to the subscriptionRequest() signal. bool QXmppRosterManager::acceptSubscription(const QString &bareJid, const QString &reason) { QXmppPresence presence; presence.setTo(bareJid); presence.setType(QXmppPresence::Subscribed); presence.setStatusText(reason); return client()->sendPacket(presence); } /// Upon XMPP connection, request the roster. /// void QXmppRosterManager::_q_connected() { QXmppRosterIq roster; roster.setType(QXmppIq::Get); roster.setFrom(client()->configuration().jid()); d->rosterReqId = roster.id(); if (client()->isAuthenticated()) client()->sendPacket(roster); } void QXmppRosterManager::_q_disconnected() { d->entries.clear(); d->presences.clear(); d->isRosterReceived = false; } /// \cond bool QXmppRosterManager::handleStanza(const QDomElement &element) { if (element.tagName() != "iq" || !QXmppRosterIq::isRosterIq(element)) return false; // Security check: only server should send this iq // from() should be either empty or bareJid of the user const QString fromJid = element.attribute("from"); if (!fromJid.isEmpty() && QXmppUtils::jidToBareJid(fromJid) != client()->configuration().jidBare()) return false; QXmppRosterIq rosterIq; rosterIq.parse(element); bool isInitial = (d->rosterReqId == rosterIq.id()); switch(rosterIq.type()) { case QXmppIq::Set: { // send result iq QXmppIq returnIq(QXmppIq::Result); returnIq.setId(rosterIq.id()); client()->sendPacket(returnIq); // store updated entries and notify changes const QList items = rosterIq.items(); foreach (const QXmppRosterIq::Item &item, items) { const QString bareJid = item.bareJid(); if (item.subscriptionType() == QXmppRosterIq::Item::Remove) { if (d->entries.remove(bareJid)) { // notify the user that the item was removed emit itemRemoved(bareJid); } } else { const bool added = !d->entries.contains(bareJid); d->entries.insert(bareJid, item); if (added) { // notify the user that the item was added emit itemAdded(bareJid); } else { // notify the user that the item changed emit itemChanged(bareJid); } } } } break; case QXmppIq::Result: { const QList items = rosterIq.items(); foreach (const QXmppRosterIq::Item &item, items) { const QString bareJid = item.bareJid(); d->entries.insert(bareJid, item); } if (isInitial) { d->isRosterReceived = true; emit rosterReceived(); } break; } default: break; } return true; } /// \endcond void QXmppRosterManager::_q_presenceReceived(const QXmppPresence& presence) { const QString jid = presence.from(); const QString bareJid = QXmppUtils::jidToBareJid(jid); const QString resource = QXmppUtils::jidToResource(jid); if (bareJid.isEmpty()) return; switch(presence.type()) { case QXmppPresence::Available: d->presences[bareJid][resource] = presence; emit presenceChanged(bareJid, resource); break; case QXmppPresence::Unavailable: d->presences[bareJid].remove(resource); emit presenceChanged(bareJid, resource); break; case QXmppPresence::Subscribe: if (client()->configuration().autoAcceptSubscriptions()) { // accept subscription request acceptSubscription(bareJid); // ask for reciprocal subscription subscribe(bareJid); } else { emit subscriptionReceived(bareJid); } break; default: break; } } /// Refuses a subscription request. /// /// You can call this method in reply to the subscriptionRequest() signal. bool QXmppRosterManager::refuseSubscription(const QString &bareJid, const QString &reason) { QXmppPresence presence; presence.setTo(bareJid); presence.setType(QXmppPresence::Unsubscribed); presence.setStatusText(reason); return client()->sendPacket(presence); } /// Adds a new item to the roster without sending any subscription requests. /// /// As a result, the server will initiate a roster push, causing the /// itemAdded() or itemChanged() signal to be emitted. /// /// \param bareJid /// \param name Optional name for the item. /// \param groups Optional groups for the item. bool QXmppRosterManager::addItem(const QString &bareJid, const QString &name, const QSet &groups) { QXmppRosterIq::Item item; item.setBareJid(bareJid); item.setName(name); item.setGroups(groups); item.setSubscriptionType(QXmppRosterIq::Item::NotSet); QXmppRosterIq iq; iq.setType(QXmppIq::Set); iq.addItem(item); return client()->sendPacket(iq); } /// Removes a roster item and cancels subscriptions to and from the contact. /// /// As a result, the server will initiate a roster push, causing the /// itemRemoved() signal to be emitted. /// /// \param bareJid bool QXmppRosterManager::removeItem(const QString &bareJid) { QXmppRosterIq::Item item; item.setBareJid(bareJid); item.setSubscriptionType(QXmppRosterIq::Item::Remove); QXmppRosterIq iq; iq.setType(QXmppIq::Set); iq.addItem(item); return client()->sendPacket(iq); } /// Renames a roster item. /// /// As a result, the server will initiate a roster push, causing the /// itemChanged() signal to be emitted. /// /// \param bareJid /// \param name bool QXmppRosterManager::renameItem(const QString &bareJid, const QString &name) { if (!d->entries.contains(bareJid)) return false; QXmppRosterIq::Item item = d->entries.value(bareJid); item.setName(name); QXmppRosterIq iq; iq.setType(QXmppIq::Set); iq.addItem(item); return client()->sendPacket(iq); } /// Requests a subscription to the given contact. /// /// As a result, the server will initiate a roster push, causing the /// itemAdded() or itemChanged() signal to be emitted. bool QXmppRosterManager::subscribe(const QString &bareJid, const QString &reason) { QXmppPresence packet; packet.setTo(QXmppUtils::jidToBareJid(bareJid)); packet.setType(QXmppPresence::Subscribe); packet.setStatusText(reason); return client()->sendPacket(packet); } /// Removes a subscription to the given contact. /// /// As a result, the server will initiate a roster push, causing the /// itemChanged() signal to be emitted. bool QXmppRosterManager::unsubscribe(const QString &bareJid, const QString &reason) { QXmppPresence packet; packet.setTo(QXmppUtils::jidToBareJid(bareJid)); packet.setType(QXmppPresence::Unsubscribe); packet.setStatusText(reason); return client()->sendPacket(packet); } /// Function to get all the bareJids present in the roster. /// /// \return QStringList list of all the bareJids /// QStringList QXmppRosterManager::getRosterBareJids() const { return d->entries.keys(); } /// Returns the roster entry of the given bareJid. If the bareJid is not in the /// database and empty QXmppRosterIq::Item will be returned. /// /// \param bareJid as a QString /// QXmppRosterIq::Item QXmppRosterManager::getRosterEntry( const QString& bareJid) const { // will return blank entry if bareJid does'nt exist if(d->entries.contains(bareJid)) return d->entries.value(bareJid); else return QXmppRosterIq::Item(); } /// Get all the associated resources with the given bareJid. /// /// \param bareJid as a QString /// \return list of associated resources as a QStringList /// QStringList QXmppRosterManager::getResources(const QString& bareJid) const { if(d->presences.contains(bareJid)) return d->presences[bareJid].keys(); else return QStringList(); } /// Get all the presences of all the resources of the given bareJid. A bareJid /// can have multiple resources and each resource will have a presence /// associated with it. /// /// \param bareJid as a QString /// \return Map of resource and its respective presence QMap /// QMap QXmppRosterManager::getAllPresencesForBareJid( const QString& bareJid) const { if(d->presences.contains(bareJid)) return d->presences[bareJid]; else return QMap(); } /// Get the presence of the given resource of the given bareJid. /// /// \param bareJid as a QString /// \param resource as a QString /// \return QXmppPresence /// QXmppPresence QXmppRosterManager::getPresence(const QString& bareJid, const QString& resource) const { if(d->presences.contains(bareJid) && d->presences[bareJid].contains(resource)) return d->presences[bareJid][resource]; else { QXmppPresence presence; presence.setType(QXmppPresence::Unavailable); return presence; } } /// Function to check whether the roster has been received or not. /// /// \return true if roster received else false bool QXmppRosterManager::isRosterReceived() const { return d->isRosterReceived; } qxmpp-0.7.6/src/client/QXmppCallManager.cpp0000644000175000007640000006652512116723562020541 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include #include "QXmppCallManager.h" #include "QXmppClient.h" #include "QXmppConstants.h" #include "QXmppJingleIq.h" #include "QXmppRtpChannel.h" #include "QXmppStun.h" #include "QXmppUtils.h" static int typeId = qRegisterMetaType(); static const int RTP_COMPONENT = 1; static const int RTCP_COMPONENT = 2; static const QLatin1String AUDIO_MEDIA("audio"); static const QLatin1String VIDEO_MEDIA("video"); class QXmppCallPrivate { public: class Stream { public: QXmppRtpChannel *channel; QXmppIceConnection *connection; QString creator; QString media; QString name; }; QXmppCallPrivate(QXmppCall *qq); Stream *createStream(const QString &media); Stream *findStreamByMedia(const QString &media); Stream *findStreamByName(const QString &name); void handleAck(const QXmppIq &iq); bool handleDescription(QXmppCallPrivate::Stream *stream, const QXmppJingleIq::Content &content); void handleRequest(const QXmppJingleIq &iq); bool handleTransport(QXmppCallPrivate::Stream *stream, const QXmppJingleIq::Content &content); void setState(QXmppCall::State state); bool sendAck(const QXmppJingleIq &iq); bool sendInvite(); bool sendRequest(const QXmppJingleIq &iq); void terminate(QXmppJingleIq::Reason::Type reasonType); QXmppCall::Direction direction; QString jid; QString ownJid; QXmppCallManager *manager; QList requests; QString sid; QXmppCall::State state; // Media streams bool sendVideo; QList streams; QIODevice::OpenMode audioMode; QIODevice::OpenMode videoMode; private: QXmppCall *q; }; class QXmppCallManagerPrivate { public: QXmppCallManagerPrivate(QXmppCallManager *qq); QXmppCall *findCall(const QString &sid) const; QXmppCall *findCall(const QString &sid, QXmppCall::Direction direction) const; QList calls; QHostAddress stunHost; quint16 stunPort; QHostAddress turnHost; quint16 turnPort; QString turnUser; QString turnPassword; private: QXmppCallManager *q; }; QXmppCallPrivate::QXmppCallPrivate(QXmppCall *qq) : state(QXmppCall::ConnectingState), sendVideo(false), audioMode(QIODevice::NotOpen), videoMode(QIODevice::NotOpen), q(qq) { } QXmppCallPrivate::Stream *QXmppCallPrivate::findStreamByMedia(const QString &media) { foreach (Stream *stream, streams) if (stream->media == media) return stream; return 0; } QXmppCallPrivate::Stream *QXmppCallPrivate::findStreamByName(const QString &name) { foreach (Stream *stream, streams) if (stream->name == name) return stream; return 0; } void QXmppCallPrivate::handleAck(const QXmppIq &ack) { const QString id = ack.id(); for (int i = 0; i < requests.size(); ++i) { if (id == requests[i].id()) { // process acknowledgement const QXmppJingleIq request = requests.takeAt(i); q->debug(QString("Received ACK for packet %1").arg(id)); // handle termination if (request.action() == QXmppJingleIq::SessionTerminate) q->terminated(); return; } } } bool QXmppCallPrivate::handleDescription(QXmppCallPrivate::Stream *stream, const QXmppJingleIq::Content &content) { stream->channel->setRemotePayloadTypes(content.payloadTypes()); if (!(stream->channel->openMode() & QIODevice::ReadWrite)) { q->warning(QString("Remote party %1 did not provide any known %2 payloads for call %3").arg(jid, stream->media, sid)); return false; } q->updateOpenMode(); return true; } bool QXmppCallPrivate::handleTransport(QXmppCallPrivate::Stream *stream, const QXmppJingleIq::Content &content) { stream->connection->setRemoteUser(content.transportUser()); stream->connection->setRemotePassword(content.transportPassword()); foreach (const QXmppJingleCandidate &candidate, content.transportCandidates()) stream->connection->addRemoteCandidate(candidate); // perform ICE negotiation if (!content.transportCandidates().isEmpty()) stream->connection->connectToHost(); return true; } void QXmppCallPrivate::handleRequest(const QXmppJingleIq &iq) { if (iq.action() == QXmppJingleIq::SessionAccept) { if (direction == QXmppCall::IncomingDirection) { q->warning("Ignoring Session-Accept for an incoming call"); return; } // send ack sendAck(iq); // check content description and transport QXmppCallPrivate::Stream *stream = findStreamByName(iq.content().name()); if (!stream || !handleDescription(stream, iq.content()) || !handleTransport(stream, iq.content())) { // terminate call terminate(QXmppJingleIq::Reason::FailedApplication); return; } // check for call establishment setState(QXmppCall::ActiveState); } else if (iq.action() == QXmppJingleIq::SessionInfo) { // notify user QTimer::singleShot(0, q, SIGNAL(ringing())); } else if (iq.action() == QXmppJingleIq::SessionTerminate) { // send ack sendAck(iq); // terminate q->info(QString("Remote party %1 terminated call %2").arg(iq.from(), iq.sid())); q->terminated(); } else if (iq.action() == QXmppJingleIq::ContentAccept) { // send ack sendAck(iq); // check content description and transport QXmppCallPrivate::Stream *stream = findStreamByName(iq.content().name()); if (!stream || !handleDescription(stream, iq.content()) || !handleTransport(stream, iq.content())) { // FIXME: what action? return; } } else if (iq.action() == QXmppJingleIq::ContentAdd) { // send ack sendAck(iq); // check media stream does not exist yet QXmppCallPrivate::Stream *stream = findStreamByName(iq.content().name()); if (stream) return; // create media stream stream = createStream(iq.content().descriptionMedia()); if (!stream) return; stream->creator = iq.content().creator(); stream->name = iq.content().name(); // check content description if (!handleDescription(stream, iq.content()) || !handleTransport(stream, iq.content())) { QXmppJingleIq iq; iq.setTo(q->jid()); iq.setType(QXmppIq::Set); iq.setAction(QXmppJingleIq::ContentReject); iq.setSid(q->sid()); iq.reason().setType(QXmppJingleIq::Reason::FailedApplication); sendRequest(iq); delete stream; return; } streams << stream; // accept content QXmppJingleIq iq; iq.setTo(q->jid()); iq.setType(QXmppIq::Set); iq.setAction(QXmppJingleIq::ContentAccept); iq.setSid(q->sid()); iq.content().setCreator(stream->creator); iq.content().setName(stream->name); // description iq.content().setDescriptionMedia(stream->media); foreach (const QXmppJinglePayloadType &payload, stream->channel->localPayloadTypes()) iq.content().addPayloadType(payload); // transport iq.content().setTransportUser(stream->connection->localUser()); iq.content().setTransportPassword(stream->connection->localPassword()); foreach (const QXmppJingleCandidate &candidate, stream->connection->localCandidates()) iq.content().addTransportCandidate(candidate); sendRequest(iq); } else if (iq.action() == QXmppJingleIq::TransportInfo) { // send ack sendAck(iq); // check content transport QXmppCallPrivate::Stream *stream = findStreamByName(iq.content().name()); if (!stream || !handleTransport(stream, iq.content())) { // FIXME: what action? return; } } } QXmppCallPrivate::Stream *QXmppCallPrivate::createStream(const QString &media) { bool check; Q_UNUSED(check); Q_ASSERT(manager); Stream *stream = new Stream; stream->media = media; // RTP channel QObject *channelObject = 0; if (media == AUDIO_MEDIA) { QXmppRtpAudioChannel *audioChannel = new QXmppRtpAudioChannel(q); stream->channel = audioChannel; channelObject = audioChannel; } else if (media == VIDEO_MEDIA) { QXmppRtpVideoChannel *videoChannel = new QXmppRtpVideoChannel(q); stream->channel = videoChannel; channelObject = videoChannel; } else { q->warning(QString("Unsupported media type %1").arg(media)); delete stream; return 0; } // ICE connection stream->connection = new QXmppIceConnection(q); stream->connection->setIceControlling(direction == QXmppCall::OutgoingDirection); stream->connection->setStunServer(manager->d->stunHost, manager->d->stunPort); stream->connection->setTurnServer(manager->d->turnHost, manager->d->turnPort); stream->connection->setTurnUser(manager->d->turnUser); stream->connection->setTurnPassword(manager->d->turnPassword); stream->connection->addComponent(RTP_COMPONENT); stream->connection->addComponent(RTCP_COMPONENT); stream->connection->bind(QXmppIceComponent::discoverAddresses()); // connect signals check = QObject::connect(stream->connection, SIGNAL(localCandidatesChanged()), q, SLOT(localCandidatesChanged())); Q_ASSERT(check); check = QObject::connect(stream->connection, SIGNAL(connected()), q, SLOT(updateOpenMode())); Q_ASSERT(check); check = QObject::connect(q, SIGNAL(stateChanged(QXmppCall::State)), q, SLOT(updateOpenMode())); Q_ASSERT(check); check = QObject::connect(stream->connection, SIGNAL(disconnected()), q, SLOT(hangup())); Q_ASSERT(check); if (channelObject) { QXmppIceComponent *rtpComponent = stream->connection->component(RTP_COMPONENT); check = QObject::connect(rtpComponent, SIGNAL(datagramReceived(QByteArray)), channelObject, SLOT(datagramReceived(QByteArray))); Q_ASSERT(check); check = QObject::connect(channelObject, SIGNAL(sendDatagram(QByteArray)), rtpComponent, SLOT(sendDatagram(QByteArray))); Q_ASSERT(check); } return stream; } /// Sends an acknowledgement for a Jingle IQ. /// bool QXmppCallPrivate::sendAck(const QXmppJingleIq &iq) { QXmppIq ack; ack.setId(iq.id()); ack.setTo(iq.from()); ack.setType(QXmppIq::Result); return manager->client()->sendPacket(ack); } bool QXmppCallPrivate::sendInvite() { QXmppJingleIq iq; iq.setTo(jid); iq.setType(QXmppIq::Set); iq.setAction(QXmppJingleIq::SessionInitiate); iq.setInitiator(ownJid); iq.setSid(sid); // create audio stream QXmppCallPrivate::Stream *stream = findStreamByMedia(AUDIO_MEDIA); Q_ASSERT(stream); iq.content().setCreator(stream->creator); iq.content().setName(stream->name); iq.content().setSenders("both"); // description iq.content().setDescriptionMedia(stream->media); foreach (const QXmppJinglePayloadType &payload, stream->channel->localPayloadTypes()) iq.content().addPayloadType(payload); // transport iq.content().setTransportUser(stream->connection->localUser()); iq.content().setTransportPassword(stream->connection->localPassword()); foreach (const QXmppJingleCandidate &candidate, stream->connection->localCandidates()) iq.content().addTransportCandidate(candidate); return sendRequest(iq); } /// Sends a Jingle IQ and adds it to outstanding requests. /// bool QXmppCallPrivate::sendRequest(const QXmppJingleIq &iq) { requests << iq; return manager->client()->sendPacket(iq); } void QXmppCallPrivate::setState(QXmppCall::State newState) { if (state != newState) { state = newState; emit q->stateChanged(state); if (state == QXmppCall::ActiveState) emit q->connected(); else if (state == QXmppCall::FinishedState) emit q->finished(); } } /// Request graceful call termination void QXmppCallPrivate::terminate(QXmppJingleIq::Reason::Type reasonType) { if (state == QXmppCall::DisconnectingState || state == QXmppCall::FinishedState) return; // hangup call QXmppJingleIq iq; iq.setTo(jid); iq.setType(QXmppIq::Set); iq.setAction(QXmppJingleIq::SessionTerminate); iq.setSid(sid); iq.reason().setType(reasonType); sendRequest(iq); setState(QXmppCall::DisconnectingState); // schedule forceful termination in 5s QTimer::singleShot(5000, q, SLOT(terminated())); } QXmppCall::QXmppCall(const QString &jid, QXmppCall::Direction direction, QXmppCallManager *parent) : QXmppLoggable(parent) { d = new QXmppCallPrivate(this); d->direction = direction; d->jid = jid; d->ownJid = parent->client()->configuration().jid(); d->manager = parent; // create audio stream QXmppCallPrivate::Stream *stream = d->createStream(AUDIO_MEDIA); stream->creator = QLatin1String("initiator"); stream->name = QLatin1String("voice"); d->streams << stream; } QXmppCall::~QXmppCall() { foreach (QXmppCallPrivate::Stream *stream, d->streams) delete stream; delete d; } /// Call this method if you wish to accept an incoming call. /// void QXmppCall::accept() { if (d->direction == IncomingDirection && d->state == ConnectingState) { Q_ASSERT(d->streams.size() == 1); QXmppCallPrivate::Stream *stream = d->streams.first(); // accept incoming call QXmppJingleIq iq; iq.setTo(d->jid); iq.setType(QXmppIq::Set); iq.setAction(QXmppJingleIq::SessionAccept); iq.setResponder(d->ownJid); iq.setSid(d->sid); iq.content().setCreator(stream->creator); iq.content().setName(stream->name); // description iq.content().setDescriptionMedia(stream->media); foreach (const QXmppJinglePayloadType &payload, stream->channel->localPayloadTypes()) iq.content().addPayloadType(payload); // transport iq.content().setTransportUser(stream->connection->localUser()); iq.content().setTransportPassword(stream->connection->localPassword()); foreach (const QXmppJingleCandidate &candidate, stream->connection->localCandidates()) iq.content().addTransportCandidate(candidate); d->sendRequest(iq); // notify user d->manager->callStarted(this); // check for call establishment d->setState(QXmppCall::ActiveState); } } /// Returns the RTP channel for the audio data. /// /// It acts as a QIODevice so that you can read / write audio samples, for /// instance using a QAudioOutput and a QAudioInput. /// QXmppRtpAudioChannel *QXmppCall::audioChannel() const { QXmppCallPrivate::Stream *stream = d->findStreamByMedia(AUDIO_MEDIA); if (stream) return (QXmppRtpAudioChannel*)stream->channel; else return 0; } /// Returns the audio mode. QIODevice::OpenMode QXmppCall::audioMode() const { return d->audioMode; } /// Returns the RTP channel for the video data. /// QXmppRtpVideoChannel *QXmppCall::videoChannel() const { QXmppCallPrivate::Stream *stream = d->findStreamByMedia(VIDEO_MEDIA); if (stream) return (QXmppRtpVideoChannel*)stream->channel; else return 0; } /// Returns the video mode. QIODevice::OpenMode QXmppCall::videoMode() const { return d->videoMode; } void QXmppCall::terminated() { // close streams foreach (QXmppCallPrivate::Stream *stream, d->streams) { stream->channel->close(); stream->connection->close(); } // update state d->setState(QXmppCall::FinishedState); } /// Returns the call's direction. /// QXmppCall::Direction QXmppCall::direction() const { return d->direction; } /// Hangs up the call. /// void QXmppCall::hangup() { d->terminate(QXmppJingleIq::Reason::None); } /// Sends a transport-info to inform the remote party of new local candidates. /// void QXmppCall::localCandidatesChanged() { // find the stream QXmppIceConnection *conn = qobject_cast(sender()); QXmppCallPrivate::Stream *stream = 0; foreach (QXmppCallPrivate::Stream *ptr, d->streams) { if (ptr->connection == conn) { stream = ptr; break; } } if (!stream) return; QXmppJingleIq iq; iq.setTo(d->jid); iq.setType(QXmppIq::Set); iq.setAction(QXmppJingleIq::TransportInfo); iq.setSid(d->sid); iq.content().setCreator(stream->creator); iq.content().setName(stream->name); // transport iq.content().setTransportUser(stream->connection->localUser()); iq.content().setTransportPassword(stream->connection->localPassword()); foreach (const QXmppJingleCandidate &candidate, stream->connection->localCandidates()) iq.content().addTransportCandidate(candidate); d->sendRequest(iq); } /// Returns the remote party's JID. /// QString QXmppCall::jid() const { return d->jid; } void QXmppCall::updateOpenMode() { QXmppCallPrivate::Stream *stream; QIODevice::OpenMode mode; // determine audio mode mode = QIODevice::NotOpen; stream = d->findStreamByMedia(AUDIO_MEDIA); if (d->state == QXmppCall::ActiveState && stream && stream->connection->isConnected()) mode = stream->channel->openMode() & QIODevice::ReadWrite; if (mode != d->audioMode) { d->audioMode = mode; emit audioModeChanged(mode); } // determine video mode mode = QIODevice::NotOpen; stream = d->findStreamByMedia(VIDEO_MEDIA); if (d->state == QXmppCall::ActiveState && stream && stream->connection->isConnected()) { mode |= (stream->channel->openMode() & QIODevice::ReadOnly); if (d->sendVideo) mode |= (stream->channel->openMode() & QIODevice::WriteOnly); } if (mode != d->videoMode) { d->videoMode = mode; emit videoModeChanged(mode); } } /// Returns the call's session identifier. /// QString QXmppCall::sid() const { return d->sid; } /// Returns the call's state. /// /// \sa stateChanged() QXmppCall::State QXmppCall::state() const { return d->state; } /// Starts sending video to the remote party. void QXmppCall::startVideo() { if (d->state != QXmppCall::ActiveState) { warning("Cannot start video, call is not active"); return; } d->sendVideo = true; QXmppCallPrivate::Stream *stream = d->findStreamByMedia(VIDEO_MEDIA); if (stream) { updateOpenMode(); return; } // create video stream stream = d->createStream(VIDEO_MEDIA); stream->creator = (d->direction == QXmppCall::OutgoingDirection) ? QLatin1String("initiator") : QLatin1String("responder"); stream->name = QLatin1String("webcam"); d->streams << stream; // build request QXmppJingleIq iq; iq.setTo(d->jid); iq.setType(QXmppIq::Set); iq.setAction(QXmppJingleIq::ContentAdd); iq.setSid(d->sid); iq.content().setCreator(stream->creator); iq.content().setName(stream->name); iq.content().setSenders("both"); // description iq.content().setDescriptionMedia(stream->media); foreach (const QXmppJinglePayloadType &payload, stream->channel->localPayloadTypes()) iq.content().addPayloadType(payload); // transport iq.content().setTransportUser(stream->connection->localUser()); iq.content().setTransportPassword(stream->connection->localPassword()); foreach (const QXmppJingleCandidate &candidate, stream->connection->localCandidates()) iq.content().addTransportCandidate(candidate); d->sendRequest(iq); } /// Stops sending video to the remote party. void QXmppCall::stopVideo() { if (!d->sendVideo) return; d->sendVideo = false; QXmppCallPrivate::Stream *stream = d->findStreamByMedia(VIDEO_MEDIA); if (stream) updateOpenMode(); } QXmppCallManagerPrivate::QXmppCallManagerPrivate(QXmppCallManager *qq) : stunPort(0), turnPort(0), q(qq) { } QXmppCall *QXmppCallManagerPrivate::findCall(const QString &sid) const { foreach (QXmppCall *call, calls) if (call->sid() == sid) return call; return 0; } QXmppCall *QXmppCallManagerPrivate::findCall(const QString &sid, QXmppCall::Direction direction) const { foreach (QXmppCall *call, calls) if (call->sid() == sid && call->direction() == direction) return call; return 0; } /// Constructs a QXmppCallManager object to handle incoming and outgoing /// Voice-Over-IP calls. /// QXmppCallManager::QXmppCallManager() { d = new QXmppCallManagerPrivate(this); } /// Destroys the QXmppCallManager object. QXmppCallManager::~QXmppCallManager() { delete d; } /// \cond QStringList QXmppCallManager::discoveryFeatures() const { return QStringList() << ns_jingle // XEP-0166 : Jingle << ns_jingle_rtp // XEP-0167 : Jingle RTP Sessions << ns_jingle_rtp_audio << ns_jingle_rtp_video << ns_jingle_ice_udp; // XEP-0176 : Jingle ICE-UDP Transport Method } bool QXmppCallManager::handleStanza(const QDomElement &element) { if(element.tagName() == "iq") { // XEP-0166: Jingle if (QXmppJingleIq::isJingleIq(element)) { QXmppJingleIq jingleIq; jingleIq.parse(element); _q_jingleIqReceived(jingleIq); return true; } } return false; } void QXmppCallManager::setClient(QXmppClient *client) { bool check; Q_UNUSED(check); QXmppClientExtension::setClient(client); check = connect(client, SIGNAL(disconnected()), this, SLOT(_q_disconnected())); Q_ASSERT(check); check = connect(client, SIGNAL(iqReceived(QXmppIq)), this, SLOT(_q_iqReceived(QXmppIq))); Q_ASSERT(check); check = connect(client, SIGNAL(presenceReceived(QXmppPresence)), this, SLOT(_q_presenceReceived(QXmppPresence))); Q_ASSERT(check); } /// \endcond /// Initiates a new outgoing call to the specified recipient. /// /// \param jid QXmppCall *QXmppCallManager::call(const QString &jid) { bool check; Q_UNUSED(check); if (jid.isEmpty()) { warning("Refusing to call an empty jid"); return 0; } if (jid == client()->configuration().jid()) { warning("Refusing to call self"); return 0; } QXmppCall *call = new QXmppCall(jid, QXmppCall::OutgoingDirection, this); call->d->sid = QXmppUtils::generateStanzaHash(); // register call d->calls << call; check = connect(call, SIGNAL(destroyed(QObject*)), this, SLOT(_q_callDestroyed(QObject*))); Q_ASSERT(check); emit callStarted(call); call->d->sendInvite(); return call; } /// Sets the STUN server to use to determine server-reflexive addresses /// and ports. /// /// \param host The address of the STUN server. /// \param port The port of the STUN server. void QXmppCallManager::setStunServer(const QHostAddress &host, quint16 port) { d->stunHost = host; d->stunPort = port; } /// Sets the TURN server to use to relay packets in double-NAT configurations. /// /// \param host The address of the TURN server. /// \param port The port of the TURN server. void QXmppCallManager::setTurnServer(const QHostAddress &host, quint16 port) { d->turnHost = host; d->turnPort = port; } /// Sets the \a user used for authentication with the TURN server. /// /// \param user void QXmppCallManager::setTurnUser(const QString &user) { d->turnUser = user; } /// Sets the \a password used for authentication with the TURN server. /// /// \param password void QXmppCallManager::setTurnPassword(const QString &password) { d->turnPassword = password; } /// Handles call destruction. void QXmppCallManager::_q_callDestroyed(QObject *object) { d->calls.removeAll(static_cast(object)); } /// Handles disconnection from server. void QXmppCallManager::_q_disconnected() { foreach (QXmppCall *call, d->calls) call->d->terminate(QXmppJingleIq::Reason::Gone); } /// Handles acknowledgements. /// void QXmppCallManager::_q_iqReceived(const QXmppIq &ack) { if (ack.type() != QXmppIq::Result) return; // find request foreach (QXmppCall *call, d->calls) call->d->handleAck(ack); } /// Handles a Jingle IQ. /// void QXmppCallManager::_q_jingleIqReceived(const QXmppJingleIq &iq) { bool check; Q_UNUSED(check); if (iq.type() != QXmppIq::Set) return; if (iq.action() == QXmppJingleIq::SessionInitiate) { // build call QXmppCall *call = new QXmppCall(iq.from(), QXmppCall::IncomingDirection, this); call->d->sid = iq.sid(); QXmppCallPrivate::Stream *stream = call->d->findStreamByMedia(iq.content().descriptionMedia()); if (!stream) return; stream->creator = iq.content().creator(); stream->name = iq.content().name(); // send ack call->d->sendAck(iq); // check content description and transport if (!call->d->handleDescription(stream, iq.content()) || !call->d->handleTransport(stream, iq.content())) { // terminate call call->d->terminate(QXmppJingleIq::Reason::FailedApplication); call->terminated(); delete call; return; } // register call d->calls << call; check = connect(call, SIGNAL(destroyed(QObject*)), this, SLOT(_q_callDestroyed(QObject*))); Q_ASSERT(check); // send ringing indication QXmppJingleIq ringing; ringing.setTo(call->jid()); ringing.setType(QXmppIq::Set); ringing.setAction(QXmppJingleIq::SessionInfo); ringing.setSid(call->sid()); ringing.setRinging(true); call->d->sendRequest(ringing); // notify user emit callReceived(call); return; } else { // for all other requests, require a valid call QXmppCall *call = d->findCall(iq.sid()); if (!call) { warning(QString("Remote party %1 sent a request for an unknown call %2").arg(iq.from(), iq.sid())); return; } call->d->handleRequest(iq); } } /// Handles a presence. void QXmppCallManager::_q_presenceReceived(const QXmppPresence &presence) { if (presence.type() != QXmppPresence::Unavailable) return; foreach (QXmppCall *call, d->calls) { if (presence.from() == call->jid()) { // the remote party has gone away, terminate call call->d->terminate(QXmppJingleIq::Reason::Gone); } } } qxmpp-0.7.6/src/client/QXmppVersionManager.cpp0000644000175000007640000001030512116723562021274 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include #include "QXmppClient.h" #include "QXmppConstants.h" #include "QXmppGlobal.h" #include "QXmppVersionManager.h" #include "QXmppVersionIq.h" class QXmppVersionManagerPrivate { public: QString clientName; QString clientVersion; QString clientOs; }; QXmppVersionManager::QXmppVersionManager() : d(new QXmppVersionManagerPrivate) { d->clientName = qApp->applicationName(); if (d->clientName.isEmpty()) d->clientName = "Based on QXmpp"; #if defined(Q_OS_LINUX) d->clientOs = QString::fromLatin1("Linux"); #elif defined(Q_OS_MAC) d->clientOs = QString::fromLatin1("Mac OS"); #elif defined(Q_OS_SYMBIAN) d->clientOs = QString::fromLatin1("Symbian"); #elif defined(Q_OS_WIN) d->clientOs = QString::fromLatin1("Windows"); #endif d->clientVersion = qApp->applicationVersion(); if (d->clientVersion.isEmpty()) d->clientVersion = QXmppVersion(); } QXmppVersionManager::~QXmppVersionManager() { delete d; } /// Request version information from the specified XMPP entity. /// /// \param jid QString QXmppVersionManager::requestVersion(const QString& jid) { QXmppVersionIq request; request.setType(QXmppIq::Get); request.setTo(jid); if(client()->sendPacket(request)) return request.id(); else return QString(); } /// Sets the local XMPP client's name. /// /// \param name void QXmppVersionManager::setClientName(const QString& name) { d->clientName = name; } /// Sets the local XMPP client's version. /// /// \param version void QXmppVersionManager::setClientVersion(const QString& version) { d->clientVersion = version; } /// Sets the local XMPP client's operating system. /// /// \param os void QXmppVersionManager::setClientOs(const QString& os) { d->clientOs = os; } /// Returns the local XMPP client's name. /// /// By default this is set to the QApplication::applicationName(), or /// "Based on QXmpp" if not specified. QString QXmppVersionManager::clientName() const { return d->clientName; } /// Returns the local XMPP client's version. /// /// By default this is set to QApplication::applicationVersion(), or /// QXmpp's version if not specified. QString QXmppVersionManager::clientVersion() const { return d->clientVersion; } /// Returns the local XMPP client's operating system. /// /// By default this is "Linux", "Mac OS", "Symbian" or "Windows" depending /// on the platform QXmpp was compiled for. QString QXmppVersionManager::clientOs() const { return d->clientOs; } /// \cond QStringList QXmppVersionManager::discoveryFeatures() const { // XEP-0092: Software Version return QStringList() << ns_version; } bool QXmppVersionManager::handleStanza(const QDomElement &element) { if (element.tagName() == "iq" && QXmppVersionIq::isVersionIq(element)) { QXmppVersionIq versionIq; versionIq.parse(element); if (versionIq.type() == QXmppIq::Get) { // respond to query QXmppVersionIq responseIq; responseIq.setType(QXmppIq::Result); responseIq.setId(versionIq.id()); responseIq.setTo(versionIq.from()); responseIq.setName(clientName()); responseIq.setVersion(clientVersion()); responseIq.setOs(clientOs()); client()->sendPacket(responseIq); } else if (versionIq.type() == QXmppIq::Result) { // emit response emit versionReceived(versionIq); } return true; } return false; } /// \endcond qxmpp-0.7.6/src/client/QXmppMucManager.h0000644000175000007640000001564012116723562020047 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPMUCMANAGER_H #define QXMPPMUCMANAGER_H #include "QXmppClientExtension.h" #include "QXmppMucIq.h" #include "QXmppPresence.h" class QXmppDataForm; class QXmppDiscoveryIq; class QXmppMessage; class QXmppMucManagerPrivate; class QXmppMucRoom; class QXmppMucRoomPrivate; /// \brief The QXmppMucManager class makes it possible to interact with /// multi-user chat rooms as defined by XEP-0045: Multi-User Chat. /// /// To make use of this manager, you need to instantiate it and load it into /// the QXmppClient instance as follows: /// /// \code /// QXmppMucManager *manager = new QXmppMucManager; /// client->addExtension(manager); /// \endcode /// /// You can then join a room as follows: /// /// \code /// QXmppMucRoom *room = manager->addRoom("room@conference.example.com"); /// room->setNickName("mynick"); /// room->join(); /// \endcode /// /// \ingroup Managers class QXMPP_EXPORT QXmppMucManager : public QXmppClientExtension { Q_OBJECT Q_PROPERTY(QList rooms READ rooms NOTIFY roomAdded) public: QXmppMucManager(); ~QXmppMucManager(); QXmppMucRoom *addRoom(const QString &roomJid); QList rooms() const; /// \cond QStringList discoveryFeatures() const; bool handleStanza(const QDomElement &element); /// \endcond signals: /// This signal is emitted when an invitation to a chat room is received. void invitationReceived(const QString &roomJid, const QString &inviter, const QString &reason); /// This signal is emitted when a new room is managed. void roomAdded(QXmppMucRoom *room); protected: /// \cond void setClient(QXmppClient* client); /// \endcond private slots: void _q_messageReceived(const QXmppMessage &message); void _q_roomDestroyed(QObject *object); private: QXmppMucManagerPrivate *d; }; /// \brief The QXmppMucRoom class represents a multi-user chat room /// as defined by XEP-0045: Multi-User Chat. /// /// \sa QXmppMucManager class QXMPP_EXPORT QXmppMucRoom : public QObject { Q_OBJECT Q_FLAGS(Action Actions) Q_PROPERTY(QXmppMucRoom::Actions allowedActions READ allowedActions NOTIFY allowedActionsChanged) Q_PROPERTY(bool isJoined READ isJoined NOTIFY isJoinedChanged) Q_PROPERTY(QString jid READ jid CONSTANT) Q_PROPERTY(QString name READ name NOTIFY nameChanged) Q_PROPERTY(QString nickName READ nickName WRITE setNickName NOTIFY nickNameChanged) Q_PROPERTY(QStringList participants READ participants NOTIFY participantsChanged) Q_PROPERTY(QString password READ password WRITE setPassword) Q_PROPERTY(QString subject READ subject WRITE setSubject NOTIFY subjectChanged) public: /// This enum is used to describe chat room actions. enum Action { NoAction = 0, ///< no action SubjectAction = 1, ///< change the room's subject ConfigurationAction = 2, ///< change the room's configuration PermissionsAction = 4, ///< change the room's permissions KickAction = 8, ///< kick users from the room }; Q_DECLARE_FLAGS(Actions, Action) ~QXmppMucRoom(); Actions allowedActions() const; bool isJoined() const; QString jid() const; QString name() const; QString nickName() const; void setNickName(const QString &nickName); Q_INVOKABLE QString participantFullJid(const QString &jid) const; QXmppPresence participantPresence(const QString &jid) const; QStringList participants() const; QString password() const; void setPassword(const QString &password); QString subject() const; void setSubject(const QString &subject); signals: /// This signal is emitted when the allowed actions change. void allowedActionsChanged(QXmppMucRoom::Actions actions) const; /// This signal is emitted when the configuration form for the room is received. void configurationReceived(const QXmppDataForm &configuration); /// This signal is emitted when an error is encountered. void error(const QXmppStanza::Error &error); /// This signal is emitted once you have joined the room. void joined(); /// This signal is emitted if you get kicked from the room. void kicked(const QString &jid, const QString &reason); /// \cond void isJoinedChanged(); /// \endcond /// This signal is emitted once you have left the room. void left(); /// This signal is emitted when a message is received. void messageReceived(const QXmppMessage &message); /// This signal is emitted when the room's human-readable name changes. void nameChanged(const QString &name); /// This signal is emitted when your own nick name changes. void nickNameChanged(const QString &nickName); /// This signal is emitted when a participant joins the room. void participantAdded(const QString &jid); /// This signal is emitted when a participant changes. void participantChanged(const QString &jid); /// This signal is emitted when a participant leaves the room. void participantRemoved(const QString &jid); /// \cond void participantsChanged(); /// \endcond /// This signal is emitted when the room's permissions are received. void permissionsReceived(const QList &permissions); /// This signal is emitted when the room's subject changes. void subjectChanged(const QString &subject); public slots: bool ban(const QString &jid, const QString &reason); bool join(); bool kick(const QString &jid, const QString &reason); bool leave(const QString &message = QString()); bool requestConfiguration(); bool requestPermissions(); bool setConfiguration(const QXmppDataForm &form); bool setPermissions(const QList &permissions); bool sendInvitation(const QString &jid, const QString &reason); bool sendMessage(const QString &text); private slots: void _q_disconnected(); void _q_discoveryInfoReceived(const QXmppDiscoveryIq &iq); void _q_messageReceived(const QXmppMessage &message); void _q_presenceReceived(const QXmppPresence &presence); private: QXmppMucRoom(QXmppClient *client, const QString &jid, QObject *parent); QXmppMucRoomPrivate *d; friend class QXmppMucManager; }; Q_DECLARE_OPERATORS_FOR_FLAGS(QXmppMucRoom::Actions) #endif qxmpp-0.7.6/src/client/QXmppVCardManager.h0000644000175000007640000000531312116723562020316 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPVCARDMANAGER_H #define QXMPPVCARDMANAGER_H #include "QXmppClientExtension.h" class QXmppVCardIq; class QXmppVCardManagerPrivate; /// \brief The QXmppVCardManager class gets/sets XMPP vCards. It is an /// implementation of XEP-0054: vcard-temp. /// /// \note It's object should not be created using it's constructor. Instead /// QXmppClient::vCardManager() should be used to get the reference of instantiated /// object this class. /// /// Getting vCards of entries in Roster:
/// It doesn't store vCards of the JIDs in the roster of connected user. Instead /// client has to request for a particular vCard using requestVCard(). And connect to /// the signal vCardReceived() to get the requested vCard. /// /// Getting vCard of the connected client:
/// For getting the vCard of the connected user itself. Client can call requestClientVCard() /// and on the signal clientVCardReceived() it can get its vCard using clientVCard(). /// /// Setting vCard of the client:
/// Using setClientVCard() client can set its vCard. /// /// \note Client can't set/change vCards of roster entries. /// /// \ingroup Managers class QXMPP_EXPORT QXmppVCardManager : public QXmppClientExtension { Q_OBJECT public: QXmppVCardManager(); ~QXmppVCardManager(); QString requestVCard(const QString& bareJid = ""); const QXmppVCardIq& clientVCard() const; void setClientVCard(const QXmppVCardIq&); QString requestClientVCard(); bool isClientVCardReceived() const; /// \cond QStringList discoveryFeatures() const; bool handleStanza(const QDomElement &element); /// \endcond signals: /// This signal is emitted when the requested vCard is received /// after calling the requestVCard() function. void vCardReceived(const QXmppVCardIq&); /// This signal is emitted when the client's vCard is received /// after calling the requestClientVCard() function. void clientVCardReceived(); private: QXmppVCardManagerPrivate *d; }; #endif // QXMPPVCARDMANAGER_H qxmpp-0.7.6/src/client/QXmppCallManager.h0000644000175000007640000001430112116723562020167 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPCALLMANAGER_H #define QXMPPCALLMANAGER_H #include #include #include #include "QXmppClientExtension.h" #include "QXmppLogger.h" class QHostAddress; class QXmppCallPrivate; class QXmppCallManager; class QXmppCallManagerPrivate; class QXmppIq; class QXmppJingleCandidate; class QXmppJingleIq; class QXmppJinglePayloadType; class QXmppPresence; class QXmppRtpAudioChannel; class QXmppRtpVideoChannel; /// \brief The QXmppCall class represents a Voice-Over-IP call to a remote party. /// /// To get the QIODevice from which you can read / write audio samples, call /// audioChannel(). /// /// \note THIS API IS NOT FINALIZED YET class QXMPP_EXPORT QXmppCall : public QXmppLoggable { Q_OBJECT Q_ENUMS(Direction State) Q_FLAGS(QIODevice::OpenModeFlag QIODevice::OpenMode) Q_PROPERTY(Direction direction READ direction CONSTANT) Q_PROPERTY(QString jid READ jid CONSTANT) Q_PROPERTY(State state READ state NOTIFY stateChanged) Q_PROPERTY(QIODevice::OpenMode audioMode READ audioMode NOTIFY audioModeChanged) Q_PROPERTY(QIODevice::OpenMode videoMode READ videoMode NOTIFY videoModeChanged) public: /// This enum is used to describe the direction of a call. enum Direction { IncomingDirection, ///< The call is incoming. OutgoingDirection, ///< The call is outgoing. }; /// This enum is used to describe the state of a call. enum State { ConnectingState = 0, ///< The call is being connected. ActiveState = 1, ///< The call is active. DisconnectingState = 2, ///< The call is being disconnected. FinishedState = 3, ///< The call is finished. }; ~QXmppCall(); QXmppCall::Direction direction() const; QString jid() const; QString sid() const; QXmppCall::State state() const; QXmppRtpAudioChannel *audioChannel() const; QIODevice::OpenMode audioMode() const; QXmppRtpVideoChannel *videoChannel() const; QIODevice::OpenMode videoMode() const; signals: /// \brief This signal is emitted when a call is connected. /// /// Once this signal is emitted, you can connect a QAudioOutput and /// QAudioInput to the call. You can determine the appropriate clockrate /// and the number of channels by calling payloadType(). void connected(); /// \brief This signal is emitted when a call is finished. /// /// Note: Do not delete the call in the slot connected to this signal, /// instead use deleteLater(). void finished(); /// \brief This signal is emitted when the remote party is ringing. void ringing(); /// \brief This signal is emitted when the call state changes. void stateChanged(QXmppCall::State state); /// \brief This signal is emitted when the audio channel changes. void audioModeChanged(QIODevice::OpenMode mode); /// \brief This signal is emitted when the video channel changes. void videoModeChanged(QIODevice::OpenMode mode); public slots: void accept(); void hangup(); void startVideo(); void stopVideo(); private slots: void localCandidatesChanged(); void terminated(); void updateOpenMode(); private: QXmppCall(const QString &jid, QXmppCall::Direction direction, QXmppCallManager *parent); QXmppCallPrivate *d; friend class QXmppCallManager; friend class QXmppCallManagerPrivate; friend class QXmppCallPrivate; }; /// \brief The QXmppCallManager class provides support for making and /// receiving voice calls. /// /// Session initiation is performed as described by XEP-0166: Jingle, /// XEP-0167: Jingle RTP Sessions and XEP-0176: Jingle ICE-UDP Transport /// Method. /// /// The data stream is connected using Interactive Connectivity Establishment /// (RFC 5245) and data is transferred using Real Time Protocol (RFC 3550) /// packets. /// /// To make use of this manager, you need to instantiate it and load it into /// the QXmppClient instance as follows: /// /// \code /// QXmppCallManager *manager = new QXmppCallManager; /// client->addExtension(manager); /// \endcode /// /// \ingroup Managers class QXMPP_EXPORT QXmppCallManager : public QXmppClientExtension { Q_OBJECT public: QXmppCallManager(); ~QXmppCallManager(); void setStunServer(const QHostAddress &host, quint16 port = 3478); void setTurnServer(const QHostAddress &host, quint16 port = 3478); void setTurnUser(const QString &user); void setTurnPassword(const QString &password); /// \cond QStringList discoveryFeatures() const; bool handleStanza(const QDomElement &element); /// \endcond signals: /// This signal is emitted when a new incoming call is received. /// /// To accept the call, invoke the call's QXmppCall::accept() method. /// To refuse the call, invoke the call's QXmppCall::hangup() method. void callReceived(QXmppCall *call); /// This signal is emitted when a call (incoming or outgoing) is started. void callStarted(QXmppCall *call); public slots: QXmppCall *call(const QString &jid); protected: /// \cond void setClient(QXmppClient* client); /// \endcond private slots: void _q_callDestroyed(QObject *object); void _q_disconnected(); void _q_iqReceived(const QXmppIq &iq); void _q_jingleIqReceived(const QXmppJingleIq &iq); void _q_presenceReceived(const QXmppPresence &presence); private: QXmppCallManagerPrivate *d; friend class QXmppCall; friend class QXmppCallPrivate; friend class QXmppCallManagerPrivate; }; Q_DECLARE_METATYPE(QXmppCall::State) #endif qxmpp-0.7.6/src/client/QXmppTransferManager.cpp0000644000175000007640000013563012116723562021444 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include #include #include #include #include #include #include #include #include #include "QXmppByteStreamIq.h" #include "QXmppClient.h" #include "QXmppConstants.h" #include "QXmppIbbIq.h" #include "QXmppSocks.h" #include "QXmppStreamInitiationIq_p.h" #include "QXmppStun.h" #include "QXmppTransferManager.h" #include "QXmppTransferManager_p.h" #include "QXmppUtils.h" // time to try to connect to a SOCKS host (7 seconds) const int socksTimeout = 7000; static QString streamHash(const QString &sid, const QString &initiatorJid, const QString &targetJid) { QCryptographicHash hash(QCryptographicHash::Sha1); QString str = sid + initiatorJid + targetJid; hash.addData(str.toLatin1()); return hash.result().toHex(); } class QXmppTransferFileInfoPrivate : public QSharedData { public: QXmppTransferFileInfoPrivate(); QDateTime date; QByteArray hash; QString name; QString description; qint64 size; }; QXmppTransferFileInfoPrivate::QXmppTransferFileInfoPrivate() : size(0) { } QXmppTransferFileInfo::QXmppTransferFileInfo() : d(new QXmppTransferFileInfoPrivate) { } QXmppTransferFileInfo::QXmppTransferFileInfo(const QXmppTransferFileInfo &other) : d(other.d) { } QXmppTransferFileInfo::~QXmppTransferFileInfo() { } QDateTime QXmppTransferFileInfo::date() const { return d->date; } void QXmppTransferFileInfo::setDate(const QDateTime &date) { d->date = date; } QByteArray QXmppTransferFileInfo::hash() const { return d->hash; } void QXmppTransferFileInfo::setHash(const QByteArray &hash) { d->hash = hash; } QString QXmppTransferFileInfo::name() const { return d->name; } void QXmppTransferFileInfo::setName(const QString &name) { d->name = name; } QString QXmppTransferFileInfo::description() const { return d->description; } void QXmppTransferFileInfo::setDescription(const QString &description) { d->description = description; } qint64 QXmppTransferFileInfo::size() const { return d->size; } void QXmppTransferFileInfo::setSize(qint64 size) { d->size = size; } bool QXmppTransferFileInfo::isNull() const { return d->date.isNull() && d->description.isEmpty() && d->hash.isEmpty() && d->name.isEmpty() && d->size == 0; } QXmppTransferFileInfo& QXmppTransferFileInfo::operator=(const QXmppTransferFileInfo &other) { d = other.d; return *this; } bool QXmppTransferFileInfo::operator==(const QXmppTransferFileInfo &other) const { return other.d->size == d->size && other.d->hash == d->hash && other.d->name == d->name; } void QXmppTransferFileInfo::parse(const QDomElement &element) { d->date = QXmppUtils::datetimeFromString(element.attribute("date")); d->hash = QByteArray::fromHex(element.attribute("hash").toLatin1()); d->name = element.attribute("name"); d->size = element.attribute("size").toLongLong(); d->description = element.firstChildElement("desc").text(); } void QXmppTransferFileInfo::toXml(QXmlStreamWriter *writer) const { writer->writeStartElement("file"); writer->writeAttribute("xmlns", ns_stream_initiation_file_transfer); if (d->date.isValid()) writer->writeAttribute("date", QXmppUtils::datetimeToString(d->date)); if (!d->hash.isEmpty()) writer->writeAttribute("hash", d->hash.toHex()); if (!d->name.isEmpty()) writer->writeAttribute("name", d->name); if (d->size > 0) writer->writeAttribute("size", QString::number(d->size)); if (!d->description.isEmpty()) writer->writeTextElement("desc", d->description); writer->writeEndElement(); } class QXmppTransferJobPrivate { public: QXmppTransferJobPrivate(); int blockSize; QXmppClient *client; QXmppTransferJob::Direction direction; qint64 done; QXmppTransferJob::Error error; QCryptographicHash hash; QIODevice *iodevice; QString offerId; QString jid; QUrl localFileUrl; QString sid; QXmppTransferJob::Method method; QString mimeType; QString requestId; QXmppTransferJob::State state; QTime transferStart; // file meta-data QXmppTransferFileInfo fileInfo; // for in-band bytestreams int ibbSequence; // for socks5 bytestreams QTcpSocket *socksSocket; QXmppByteStreamIq::StreamHost socksProxy; }; QXmppTransferJobPrivate::QXmppTransferJobPrivate() : blockSize(16384), client(0), done(0), error(QXmppTransferJob::NoError), hash(QCryptographicHash::Md5), iodevice(0), method(QXmppTransferJob::NoMethod), state(QXmppTransferJob::OfferState), ibbSequence(0), socksSocket(0) { } QXmppTransferJob::QXmppTransferJob(const QString &jid, QXmppTransferJob::Direction direction, QXmppClient *client, QObject *parent) : QXmppLoggable(parent), d(new QXmppTransferJobPrivate) { d->client = client; d->direction = direction; d->jid = jid; } QXmppTransferJob::~QXmppTransferJob() { delete d; } /// Call this method if you wish to abort on ongoing transfer job. /// void QXmppTransferJob::abort() { terminate(AbortError); } /// Call this method if you wish to accept an incoming transfer job. /// void QXmppTransferJob::accept(const QString &filePath) { if (d->direction == IncomingDirection && d->state == OfferState && !d->iodevice) { QFile *file = new QFile(filePath, this); if (!file->open(QIODevice::WriteOnly)) { warning(QString("Could not write to %1").arg(filePath)); abort(); return; } d->iodevice = file; setLocalFileUrl(QUrl::fromLocalFile(filePath)); setState(QXmppTransferJob::StartState); } } /// Call this method if you wish to accept an incoming transfer job. /// void QXmppTransferJob::accept(QIODevice *iodevice) { if (d->direction == IncomingDirection && d->state == OfferState && !d->iodevice) { d->iodevice = iodevice; setState(QXmppTransferJob::StartState); } } /// Returns the job's transfer direction. /// QXmppTransferJob::Direction QXmppTransferJob::direction() const { return d->direction; } /// Returns the last error that was encountered. /// QXmppTransferJob::Error QXmppTransferJob::error() const { return d->error; } /// Returns the remote party's JID. /// QString QXmppTransferJob::jid() const { return d->jid; } /// Returns the local file URL. /// QUrl QXmppTransferJob::localFileUrl() const { return d->localFileUrl; } /// Sets the local file URL. /// /// \note You do not need to call this method if you called accept() /// with a file path. void QXmppTransferJob::setLocalFileUrl(const QUrl &localFileUrl) { if (localFileUrl != d->localFileUrl) { d->localFileUrl = localFileUrl; emit localFileUrlChanged(localFileUrl); } } /// Returns meta-data about the file being transferred. /// QXmppTransferFileInfo QXmppTransferJob::fileInfo() const { return d->fileInfo; } /// \cond QDateTime QXmppTransferJob::fileDate() const { return d->fileInfo.date(); } QByteArray QXmppTransferJob::fileHash() const { return d->fileInfo.hash(); } QString QXmppTransferJob::fileName() const { return d->fileInfo.name(); } qint64 QXmppTransferJob::fileSize() const { return d->fileInfo.size(); } /// \endcond /// Returns the job's transfer method. /// QXmppTransferJob::Method QXmppTransferJob::method() const { return d->method; } /// Returns the job's session identifier. /// QString QXmppTransferJob::sid() const { return d->sid; } /// Returns the job's transfer speed in bytes per second. /// /// If the transfer has not started yet or is already finished, returns 0. /// qint64 QXmppTransferJob::speed() const { qint64 elapsed = d->transferStart.elapsed(); if (d->state != QXmppTransferJob::TransferState || !elapsed) return 0; return (d->done * 1000.0) / elapsed; } /// Returns the job's state. /// QXmppTransferJob::State QXmppTransferJob::state() const { return d->state; } void QXmppTransferJob::setState(QXmppTransferJob::State state) { if (d->state != state) { d->state = state; if (d->state == QXmppTransferJob::TransferState) d->transferStart.start(); emit stateChanged(d->state); } } void QXmppTransferJob::_q_terminated() { emit stateChanged(d->state); if (d->error != NoError) emit error(d->error); emit finished(); } void QXmppTransferJob::terminate(QXmppTransferJob::Error cause) { if (d->state == FinishedState) return; // change state d->error = cause; d->state = FinishedState; // close IO device if (d->iodevice) d->iodevice->close(); // close socket if (d->socksSocket) { d->socksSocket->flush(); d->socksSocket->close(); } // emit signals later QTimer::singleShot(0, this, SLOT(_q_terminated())); } /// \cond QXmppTransferIncomingJob::QXmppTransferIncomingJob(const QString& jid, QXmppClient* client, QObject* parent) : QXmppTransferJob(jid, IncomingDirection, client, parent) , m_candidateClient(0) , m_candidateTimer(0) { } void QXmppTransferIncomingJob::checkData() { if ((d->fileInfo.size() && d->done != d->fileInfo.size()) || (!d->fileInfo.hash().isEmpty() && d->hash.result() != d->fileInfo.hash())) terminate(QXmppTransferJob::FileCorruptError); else terminate(QXmppTransferJob::NoError); } void QXmppTransferIncomingJob::connectToNextHost() { bool check; Q_UNUSED(check); if (m_streamCandidates.isEmpty()) { // could not connect to any stream host QXmppByteStreamIq response; response.setId(m_streamOfferId); response.setTo(m_streamOfferFrom); QXmppStanza::Error error(QXmppStanza::Error::Cancel, QXmppStanza::Error::ItemNotFound); error.setCode(404); response.setType(QXmppIq::Error); response.setError(error); d->client->sendPacket(response); terminate(QXmppTransferJob::ProtocolError); return; } // try next host m_candidateHost = m_streamCandidates.takeFirst(); info(QString("Connecting to streamhost: %1 (%2 %3)").arg( m_candidateHost.jid(), m_candidateHost.host(), QString::number(m_candidateHost.port()))); const QString hostName = streamHash(d->sid, d->jid, d->client->configuration().jid()); // try to connect to stream host m_candidateClient = new QXmppSocksClient(m_candidateHost.host(), m_candidateHost.port(), this); m_candidateTimer = new QTimer(this); check = connect(m_candidateClient, SIGNAL(disconnected()), this, SLOT(_q_candidateDisconnected())); Q_ASSERT(check); check = connect(m_candidateClient, SIGNAL(ready()), this, SLOT(_q_candidateReady())); Q_ASSERT(check); check = connect(m_candidateTimer, SIGNAL(timeout()), this, SLOT(_q_candidateDisconnected())); Q_ASSERT(check); m_candidateTimer->setSingleShot(true); m_candidateTimer->start(socksTimeout); m_candidateClient->connectToHost(hostName, 0); } void QXmppTransferIncomingJob::connectToHosts(const QXmppByteStreamIq &iq) { bool check; Q_UNUSED(check); m_streamCandidates = iq.streamHosts(); m_streamOfferId = iq.id(); m_streamOfferFrom = iq.from(); connectToNextHost(); } bool QXmppTransferIncomingJob::writeData(const QByteArray &data) { const qint64 written = d->iodevice->write(data); if (written < 0) return false; d->done += written; if (!d->fileInfo.hash().isEmpty()) d->hash.addData(data); progress(d->done, d->fileInfo.size()); return true; } void QXmppTransferIncomingJob::_q_candidateReady() { bool check; Q_UNUSED(check); if (!m_candidateClient) return; info(QString("Connected to streamhost: %1 (%2 %3)").arg( m_candidateHost.jid(), m_candidateHost.host(), QString::number(m_candidateHost.port()))); setState(QXmppTransferJob::TransferState); d->socksSocket = m_candidateClient; m_candidateClient = 0; m_candidateTimer->deleteLater(); m_candidateTimer = 0; check = connect(d->socksSocket, SIGNAL(readyRead()), this, SLOT(_q_receiveData())); Q_ASSERT(check); check = connect(d->socksSocket, SIGNAL(disconnected()), this, SLOT(_q_disconnected())); Q_ASSERT(check); QXmppByteStreamIq ackIq; ackIq.setId(m_streamOfferId); ackIq.setTo(m_streamOfferFrom); ackIq.setType(QXmppIq::Result); ackIq.setSid(d->sid); ackIq.setStreamHostUsed(m_candidateHost.jid()); d->client->sendPacket(ackIq); } void QXmppTransferIncomingJob::_q_candidateDisconnected() { if (!m_candidateClient) return; warning(QString("Failed to connect to streamhost: %1 (%2 %3)").arg( m_candidateHost.jid(), m_candidateHost.host(), QString::number(m_candidateHost.port()))); m_candidateClient->deleteLater(); m_candidateClient = 0; m_candidateTimer->deleteLater(); m_candidateTimer = 0; // try next host connectToNextHost(); } void QXmppTransferIncomingJob::_q_disconnected() { if (d->state == QXmppTransferJob::FinishedState) return; checkData(); } void QXmppTransferIncomingJob::_q_receiveData() { if (d->state != QXmppTransferJob::TransferState) return; // receive data block if (d->direction == QXmppTransferJob::IncomingDirection) { writeData(d->socksSocket->readAll()); // if we have received all the data, stop here if (fileSize() && d->done >= fileSize()) checkData(); } } QXmppTransferOutgoingJob::QXmppTransferOutgoingJob(const QString& jid, QXmppClient* client, QObject* parent) : QXmppTransferJob(jid, OutgoingDirection, client, parent) { } void QXmppTransferOutgoingJob::connectToProxy() { bool check; Q_UNUSED(check); info(QString("Connecting to proxy: %1 (%2 %3)").arg( d->socksProxy.jid(), d->socksProxy.host(), QString::number(d->socksProxy.port()))); const QString hostName = streamHash(d->sid, d->client->configuration().jid(), d->jid); QXmppSocksClient *socksClient = new QXmppSocksClient(d->socksProxy.host(), d->socksProxy.port(), this); check = connect(socksClient, SIGNAL(disconnected()), this, SLOT(_q_disconnected())); Q_ASSERT(check); check = connect(socksClient, SIGNAL(ready()), this, SLOT(_q_proxyReady())); Q_ASSERT(check); d->socksSocket = socksClient; socksClient->connectToHost(hostName, 0); } void QXmppTransferOutgoingJob::startSending() { bool check; Q_UNUSED(check); setState(QXmppTransferJob::TransferState); check = connect(d->socksSocket, SIGNAL(bytesWritten(qint64)), this, SLOT(_q_sendData())); Q_ASSERT(check); check = connect(d->iodevice, SIGNAL(readyRead()), this, SLOT(_q_sendData())); Q_ASSERT(check); _q_sendData(); } void QXmppTransferOutgoingJob::_q_disconnected() { if (d->state == QXmppTransferJob::FinishedState) return; if (fileSize() && d->done != fileSize()) terminate(QXmppTransferJob::ProtocolError); else terminate(QXmppTransferJob::NoError); } void QXmppTransferOutgoingJob::_q_proxyReady() { // activate stream QXmppByteStreamIq streamIq; streamIq.setType(QXmppIq::Set); streamIq.setFrom(d->client->configuration().jid()); streamIq.setTo(d->socksProxy.jid()); streamIq.setSid(d->sid); streamIq.setActivate(d->jid); d->requestId = streamIq.id(); d->client->sendPacket(streamIq); } void QXmppTransferOutgoingJob::_q_sendData() { if (d->state != QXmppTransferJob::TransferState) return; // don't saturate the outgoing socket if (d->socksSocket->bytesToWrite() > 2 * d->blockSize) return; // check whether we have written the whole file if (d->fileInfo.size() && d->done >= d->fileInfo.size()) { if (!d->socksSocket->bytesToWrite()) terminate(QXmppTransferJob::NoError); return; } char *buffer = new char[d->blockSize]; qint64 length = d->iodevice->read(buffer, d->blockSize); if (length < 0) { delete [] buffer; terminate(QXmppTransferJob::FileAccessError); return; } if (length > 0) { d->socksSocket->write(buffer, length); delete [] buffer; d->done += length; emit progress(d->done, fileSize()); } } /// \endcond class QXmppTransferManagerPrivate { public: QXmppTransferManagerPrivate(QXmppTransferManager *qq); QXmppTransferIncomingJob *getIncomingJobByRequestId(const QString &jid, const QString &id); QXmppTransferIncomingJob *getIncomingJobBySid(const QString &jid, const QString &sid); QXmppTransferOutgoingJob *getOutgoingJobByRequestId(const QString &jid, const QString &id); int ibbBlockSize; QList jobs; QString proxy; bool proxyOnly; QXmppSocksServer *socksServer; QXmppTransferJob::Methods supportedMethods; private: QXmppTransferJob *getJobByRequestId(QXmppTransferJob::Direction direction, const QString &jid, const QString &id); QXmppTransferManager *q; }; QXmppTransferManagerPrivate::QXmppTransferManagerPrivate(QXmppTransferManager *qq) : ibbBlockSize(4096) , proxyOnly(false) , socksServer(0) , supportedMethods(QXmppTransferJob::AnyMethod) , q(qq) { } QXmppTransferJob* QXmppTransferManagerPrivate::getJobByRequestId(QXmppTransferJob::Direction direction, const QString &jid, const QString &id) { foreach (QXmppTransferJob *job, jobs) if (job->d->direction == direction && job->d->jid == jid && job->d->requestId == id) return job; return 0; } QXmppTransferIncomingJob *QXmppTransferManagerPrivate::getIncomingJobByRequestId(const QString &jid, const QString &id) { return static_cast(getJobByRequestId(QXmppTransferJob::IncomingDirection, jid, id)); } QXmppTransferIncomingJob* QXmppTransferManagerPrivate::getIncomingJobBySid(const QString &jid, const QString &sid) { foreach (QXmppTransferJob *job, jobs) if (job->d->direction == QXmppTransferJob::IncomingDirection && job->d->jid == jid && job->d->sid == sid) return static_cast(job); return 0; } QXmppTransferOutgoingJob *QXmppTransferManagerPrivate::getOutgoingJobByRequestId(const QString &jid, const QString &id) { return static_cast(getJobByRequestId(QXmppTransferJob::OutgoingDirection, jid, id)); } /// Constructs a QXmppTransferManager to handle incoming and outgoing /// file transfers. QXmppTransferManager::QXmppTransferManager() { bool check; Q_UNUSED(check); d = new QXmppTransferManagerPrivate(this); // start SOCKS server d->socksServer = new QXmppSocksServer(this); check = connect(d->socksServer, SIGNAL(newConnection(QTcpSocket*,QString,quint16)), this, SLOT(_q_socksServerConnected(QTcpSocket*,QString,quint16))); Q_ASSERT(check); if (!d->socksServer->listen()) { qWarning("QXmppSocksServer could not start listening"); } } QXmppTransferManager::~QXmppTransferManager() { delete d; } void QXmppTransferManager::byteStreamIqReceived(const QXmppByteStreamIq &iq) { // handle IQ from proxy foreach (QXmppTransferJob *job, d->jobs) { if (job->d->socksProxy.jid() == iq.from() && job->d->requestId == iq.id()) { if (iq.type() == QXmppIq::Result && iq.streamHosts().size() > 0) { job->d->socksProxy = iq.streamHosts().first(); socksServerSendOffer(job); return; } } } if (iq.type() == QXmppIq::Result) byteStreamResultReceived(iq); else if (iq.type() == QXmppIq::Set) byteStreamSetReceived(iq); } /// Handle a response to a bystream set, i.e. after we informed the remote party /// that we connected to a stream host. void QXmppTransferManager::byteStreamResponseReceived(const QXmppIq &iq) { QXmppTransferJob *job = d->getIncomingJobByRequestId(iq.from(), iq.id()); if (!job || job->method() != QXmppTransferJob::SocksMethod || job->state() != QXmppTransferJob::StartState) return; if (iq.type() == QXmppIq::Error) job->terminate(QXmppTransferJob::ProtocolError); } /// Handle a bytestream result, i.e. after the remote party has connected to /// a stream host. void QXmppTransferManager::byteStreamResultReceived(const QXmppByteStreamIq &iq) { bool check; Q_UNUSED(check); QXmppTransferOutgoingJob *job = d->getOutgoingJobByRequestId(iq.from(), iq.id()); if (!job || job->method() != QXmppTransferJob::SocksMethod || job->state() != QXmppTransferJob::StartState) return; // check the stream host if (iq.streamHostUsed() == job->d->socksProxy.jid()) { job->connectToProxy(); return; } // direction connection, start sending data if (!job->d->socksSocket) { warning("Client says they connected to our SOCKS server, but they did not"); job->terminate(QXmppTransferJob::ProtocolError); return; } check = connect(job->d->socksSocket, SIGNAL(disconnected()), job, SLOT(_q_disconnected())); Q_ASSERT(check); job->startSending(); } /// Handle a bytestream set, i.e. an invitation from the remote party to connect /// to a stream host. void QXmppTransferManager::byteStreamSetReceived(const QXmppByteStreamIq &iq) { bool check; Q_UNUSED(check); QXmppIq response; response.setId(iq.id()); response.setTo(iq.from()); QXmppTransferIncomingJob *job = d->getIncomingJobBySid(iq.from(), iq.sid()); if (!job || job->method() != QXmppTransferJob::SocksMethod || job->state() != QXmppTransferJob::StartState) { // the stream is unknown QXmppStanza::Error error(QXmppStanza::Error::Auth, QXmppStanza::Error::NotAcceptable); error.setCode(406); response.setType(QXmppIq::Error); response.setError(error); client()->sendPacket(response); return; } job->connectToHosts(iq); } /// \cond QStringList QXmppTransferManager::discoveryFeatures() const { return QStringList() << ns_ibb // XEP-0047: In-Band Bytestreams << ns_bytestreams // XEP-0065: SOCKS5 Bytestreams << ns_stream_initiation // XEP-0095: Stream Initiation << ns_stream_initiation_file_transfer; // XEP-0096: SI File Transfer } bool QXmppTransferManager::handleStanza(const QDomElement &element) { if (element.tagName() != "iq") return false; // XEP-0047 In-Band Bytestreams if(QXmppIbbCloseIq::isIbbCloseIq(element)) { QXmppIbbCloseIq ibbCloseIq; ibbCloseIq.parse(element); ibbCloseIqReceived(ibbCloseIq); return true; } else if(QXmppIbbDataIq::isIbbDataIq(element)) { QXmppIbbDataIq ibbDataIq; ibbDataIq.parse(element); ibbDataIqReceived(ibbDataIq); return true; } else if(QXmppIbbOpenIq::isIbbOpenIq(element)) { QXmppIbbOpenIq ibbOpenIq; ibbOpenIq.parse(element); ibbOpenIqReceived(ibbOpenIq); return true; } // XEP-0065: SOCKS5 Bytestreams else if(QXmppByteStreamIq::isByteStreamIq(element)) { QXmppByteStreamIq byteStreamIq; byteStreamIq.parse(element); byteStreamIqReceived(byteStreamIq); return true; } // XEP-0095: Stream Initiation else if(QXmppStreamInitiationIq::isStreamInitiationIq(element)) { QXmppStreamInitiationIq siIq; siIq.parse(element); streamInitiationIqReceived(siIq); return true; } return false; } void QXmppTransferManager::setClient(QXmppClient *client) { bool check; Q_UNUSED(check); QXmppClientExtension::setClient(client); // XEP-0047: In-Band Bytestreams check = connect(client, SIGNAL(iqReceived(QXmppIq)), this, SLOT(_q_iqReceived(QXmppIq))); Q_ASSERT(check); } /// \endcond void QXmppTransferManager::ibbCloseIqReceived(const QXmppIbbCloseIq &iq) { QXmppIq response; response.setTo(iq.from()); response.setId(iq.id()); QXmppTransferIncomingJob *job = d->getIncomingJobBySid(iq.from(), iq.sid()); if (!job || job->method() != QXmppTransferJob::InBandMethod) { // the job is unknown, cancel it QXmppStanza::Error error(QXmppStanza::Error::Cancel, QXmppStanza::Error::ItemNotFound); response.setType(QXmppIq::Error); response.setError(error); client()->sendPacket(response); return; } // acknowledge the packet response.setType(QXmppIq::Result); client()->sendPacket(response); // check received data job->checkData(); } void QXmppTransferManager::ibbDataIqReceived(const QXmppIbbDataIq &iq) { QXmppIq response; response.setTo(iq.from()); response.setId(iq.id()); QXmppTransferIncomingJob *job = d->getIncomingJobBySid(iq.from(), iq.sid()); if (!job || job->method() != QXmppTransferJob::InBandMethod || job->state() != QXmppTransferJob::TransferState) { // the job is unknown, cancel it QXmppStanza::Error error(QXmppStanza::Error::Cancel, QXmppStanza::Error::ItemNotFound); response.setType(QXmppIq::Error); response.setError(error); client()->sendPacket(response); return; } if (iq.sequence() != job->d->ibbSequence) { // the packet is out of sequence QXmppStanza::Error error(QXmppStanza::Error::Cancel, QXmppStanza::Error::UnexpectedRequest); response.setType(QXmppIq::Error); response.setError(error); client()->sendPacket(response); return; } // write data job->writeData(iq.payload()); job->d->ibbSequence++; // acknowledge the packet response.setType(QXmppIq::Result); client()->sendPacket(response); } void QXmppTransferManager::ibbOpenIqReceived(const QXmppIbbOpenIq &iq) { QXmppIq response; response.setTo(iq.from()); response.setId(iq.id()); QXmppTransferJob *job = d->getIncomingJobBySid(iq.from(), iq.sid()); if (!job || job->method() != QXmppTransferJob::InBandMethod) { // the job is unknown, cancel it QXmppStanza::Error error(QXmppStanza::Error::Cancel, QXmppStanza::Error::ItemNotFound); response.setType(QXmppIq::Error); response.setError(error); client()->sendPacket(response); return; } if (iq.blockSize() > d->ibbBlockSize) { // we prefer a smaller block size QXmppStanza::Error error(QXmppStanza::Error::Modify, QXmppStanza::Error::ResourceConstraint); response.setType(QXmppIq::Error); response.setError(error); client()->sendPacket(response); return; } job->d->blockSize = iq.blockSize(); job->setState(QXmppTransferJob::TransferState); // accept transfer response.setType(QXmppIq::Result); client()->sendPacket(response); } void QXmppTransferManager::ibbResponseReceived(const QXmppIq &iq) { QXmppTransferJob *job = d->getOutgoingJobByRequestId(iq.from(), iq.id()); if (!job || job->method() != QXmppTransferJob::InBandMethod || job->state() == QXmppTransferJob::FinishedState) return; // if the IO device is closed, do nothing if (!job->d->iodevice->isOpen()) return; if (iq.type() == QXmppIq::Result) { const QByteArray buffer = job->d->iodevice->read(job->d->blockSize); job->setState(QXmppTransferJob::TransferState); if (buffer.size()) { // send next data block QXmppIbbDataIq dataIq; dataIq.setTo(job->d->jid); dataIq.setSid(job->d->sid); dataIq.setSequence(job->d->ibbSequence++); dataIq.setPayload(buffer); job->d->requestId = dataIq.id(); client()->sendPacket(dataIq); job->d->done += buffer.size(); job->progress(job->d->done, job->fileSize()); } else { // close the bytestream QXmppIbbCloseIq closeIq; closeIq.setTo(job->d->jid); closeIq.setSid(job->d->sid); job->d->requestId = closeIq.id(); client()->sendPacket(closeIq); job->terminate(QXmppTransferJob::NoError); } } else if (iq.type() == QXmppIq::Error) { // close the bytestream QXmppIbbCloseIq closeIq; closeIq.setTo(job->d->jid); closeIq.setSid(job->d->sid); job->d->requestId = closeIq.id(); client()->sendPacket(closeIq); job->terminate(QXmppTransferJob::ProtocolError); } } void QXmppTransferManager::_q_iqReceived(const QXmppIq &iq) { bool check; Q_UNUSED(check); foreach (QXmppTransferJob *ptr, d->jobs) { // handle IQ from proxy if (ptr->direction() == QXmppTransferJob::OutgoingDirection && ptr->d->socksProxy.jid() == iq.from() && ptr->d->requestId == iq.id()) { QXmppTransferOutgoingJob *job = static_cast(ptr); if (job->d->socksSocket) { // proxy connection activation result if (iq.type() == QXmppIq::Result) { // proxy stream activated, start sending data job->startSending(); } else if (iq.type() == QXmppIq::Error) { // proxy stream not activated, terminate warning("Could not activate SOCKS5 proxy bytestream"); job->terminate(QXmppTransferJob::ProtocolError); } } else { // we could not get host/port from proxy, procede without a proxy if (iq.type() == QXmppIq::Error) socksServerSendOffer(job); } return; } // handle IQ from peer else if (ptr->d->jid == iq.from() && ptr->d->requestId == iq.id()) { QXmppTransferJob *job = ptr; if (job->direction() == QXmppTransferJob::OutgoingDirection && job->method() == QXmppTransferJob::InBandMethod) { ibbResponseReceived(iq); return; } else if (job->direction() == QXmppTransferJob::IncomingDirection && job->method() == QXmppTransferJob::SocksMethod) { byteStreamResponseReceived(iq); return; } else if (job->direction() == QXmppTransferJob::OutgoingDirection && iq.type() == QXmppIq::Error) { // remote party cancelled stream initiation job->terminate(QXmppTransferJob::AbortError); return; } } } } void QXmppTransferManager::_q_jobDestroyed(QObject *object) { d->jobs.removeAll(static_cast(object)); } void QXmppTransferManager::_q_jobError(QXmppTransferJob::Error error) { QXmppTransferJob *job = qobject_cast(sender()); if (!job || !d->jobs.contains(job)) return; if (job->direction() == QXmppTransferJob::OutgoingDirection && job->method() == QXmppTransferJob::InBandMethod && error == QXmppTransferJob::AbortError) { // close the bytestream QXmppIbbCloseIq closeIq; closeIq.setTo(job->d->jid); closeIq.setSid(job->d->sid); job->d->requestId = closeIq.id(); client()->sendPacket(closeIq); } } void QXmppTransferManager::_q_jobFinished() { QXmppTransferJob *job = qobject_cast(sender()); if (!job || !d->jobs.contains(job)) return; emit jobFinished(job); } void QXmppTransferManager::_q_jobStateChanged(QXmppTransferJob::State state) { bool check; Q_UNUSED(check); QXmppTransferJob *job = qobject_cast(sender()); if (!job || !d->jobs.contains(job)) return; if (job->direction() != QXmppTransferJob::IncomingDirection) return; // disconnect from the signal disconnect(job, SIGNAL(stateChanged(QXmppTransferJob::State)), this, SLOT(_q_jobStateChanged(QXmppTransferJob::State))); // the job was refused by the local party if (state != QXmppTransferJob::StartState || !job->d->iodevice || !job->d->iodevice->isWritable()) { QXmppStanza::Error error(QXmppStanza::Error::Cancel, QXmppStanza::Error::Forbidden); error.setCode(403); QXmppIq response; response.setTo(job->jid()); response.setId(job->d->offerId); response.setType(QXmppIq::Error); response.setError(error); client()->sendPacket(response); job->terminate(QXmppTransferJob::AbortError); return; } // the job was accepted by the local party check = connect(job, SIGNAL(error(QXmppTransferJob::Error)), this, SLOT(_q_jobError(QXmppTransferJob::Error))); Q_ASSERT(check); QXmppDataForm form; form.setType(QXmppDataForm::Submit); QXmppDataForm::Field methodField(QXmppDataForm::Field::ListSingleField); methodField.setKey("stream-method"); if (job->method() == QXmppTransferJob::InBandMethod) methodField.setValue(ns_ibb); else if (job->method() == QXmppTransferJob::SocksMethod) methodField.setValue(ns_bytestreams); form.setFields(QList() << methodField); QXmppStreamInitiationIq response; response.setTo(job->jid()); response.setId(job->d->offerId); response.setType(QXmppIq::Result); response.setProfile(QXmppStreamInitiationIq::FileTransfer); response.setFeatureForm(form); client()->sendPacket(response); // notify user emit jobStarted(job); } /// Send file to a remote party. /// /// The remote party will be given the choice to accept or refuse the transfer. /// QXmppTransferJob *QXmppTransferManager::sendFile(const QString &jid, const QString &filePath, const QString &description) { if (jid.isEmpty()) { warning("Refusing to send file to an empty jid"); return 0; } QFileInfo info(filePath); QXmppTransferFileInfo fileInfo; fileInfo.setDate(info.lastModified()); fileInfo.setName(info.fileName()); fileInfo.setSize(info.size()); fileInfo.setDescription(description); // open file QIODevice *device = new QFile(filePath); if (!device->open(QIODevice::ReadOnly)) { warning(QString("Could not read from %1").arg(filePath)); delete device; device = 0; } // hash file if (device && !device->isSequential()) { QCryptographicHash hash(QCryptographicHash::Md5); QByteArray buffer; while (device->bytesAvailable()) { buffer = device->read(16384); hash.addData(buffer); } device->reset(); fileInfo.setHash(hash.result()); } // create job QXmppTransferJob *job = sendFile(jid, device, fileInfo); job->setLocalFileUrl(filePath); return job; } /// Send file to a remote party. /// /// The remote party will be given the choice to accept or refuse the transfer. /// QXmppTransferJob *QXmppTransferManager::sendFile(const QString &jid, QIODevice *device, const QXmppTransferFileInfo &fileInfo, const QString &sid) { bool check; Q_UNUSED(check); if (jid.isEmpty()) { warning("Refusing to send file to an empty jid"); return 0; } QXmppTransferOutgoingJob *job = new QXmppTransferOutgoingJob(jid, client(), this); if (sid.isEmpty()) job->d->sid = QXmppUtils::generateStanzaHash(); else job->d->sid = sid; job->d->fileInfo = fileInfo; job->d->iodevice = device; if (device) device->setParent(job); // check file is open if (!device || !device->isReadable()) { job->terminate(QXmppTransferJob::FileAccessError); return job; } // check we support some methods if (!d->supportedMethods) { job->terminate(QXmppTransferJob::ProtocolError); return job; } // collect supported stream methods QXmppDataForm form; form.setType(QXmppDataForm::Form); QXmppDataForm::Field methodField(QXmppDataForm::Field::ListSingleField); methodField.setKey("stream-method"); if (d->supportedMethods & QXmppTransferJob::InBandMethod) methodField.setOptions(methodField.options() << qMakePair(QString(), QString::fromLatin1(ns_ibb))); if (d->supportedMethods & QXmppTransferJob::SocksMethod) methodField.setOptions(methodField.options() << qMakePair(QString(), QString::fromLatin1(ns_bytestreams))); form.setFields(QList() << methodField); // start job d->jobs.append(job); check = connect(job, SIGNAL(destroyed(QObject*)), this, SLOT(_q_jobDestroyed(QObject*))); Q_ASSERT(check); check = connect(job, SIGNAL(error(QXmppTransferJob::Error)), this, SLOT(_q_jobError(QXmppTransferJob::Error))); Q_ASSERT(check); check = connect(job, SIGNAL(finished()), this, SLOT(_q_jobFinished())); Q_ASSERT(check); QXmppStreamInitiationIq request; request.setType(QXmppIq::Set); request.setTo(jid); request.setProfile(QXmppStreamInitiationIq::FileTransfer); request.setFileInfo(job->d->fileInfo); request.setFeatureForm(form); request.setSiId(job->d->sid); job->d->requestId = request.id(); client()->sendPacket(request); // notify user emit jobStarted(job); return job; } void QXmppTransferManager::_q_socksServerConnected(QTcpSocket *socket, const QString &hostName, quint16 port) { const QString ownJid = client()->configuration().jid(); foreach (QXmppTransferJob *job, d->jobs) { if (hostName == streamHash(job->d->sid, ownJid, job->jid()) && port == 0) { job->d->socksSocket = socket; return; } } warning("QXmppSocksServer got a connection for a unknown stream"); socket->close(); } void QXmppTransferManager::socksServerSendOffer(QXmppTransferJob *job) { const QString ownJid = client()->configuration().jid(); QList streamHosts; // discover local IPs if (!d->proxyOnly) { foreach (const QHostAddress &address, QXmppIceComponent::discoverAddresses()) { QXmppByteStreamIq::StreamHost streamHost; streamHost.setJid(ownJid); streamHost.setHost(address.toString()); streamHost.setPort(d->socksServer->serverPort()); streamHosts.append(streamHost); } } // add proxy if (!job->d->socksProxy.jid().isEmpty()) streamHosts.append(job->d->socksProxy); // check we have some stream hosts if (!streamHosts.size()) { warning("Could not determine local stream hosts"); job->terminate(QXmppTransferJob::ProtocolError); return; } // send offer QXmppByteStreamIq streamIq; streamIq.setType(QXmppIq::Set); streamIq.setTo(job->d->jid); streamIq.setSid(job->d->sid); streamIq.setStreamHosts(streamHosts); job->d->requestId = streamIq.id(); client()->sendPacket(streamIq); } void QXmppTransferManager::streamInitiationIqReceived(const QXmppStreamInitiationIq &iq) { if (iq.type() == QXmppIq::Result) streamInitiationResultReceived(iq); else if (iq.type() == QXmppIq::Set) streamInitiationSetReceived(iq); } // The remote party has accepted an outgoing transfer. void QXmppTransferManager::streamInitiationResultReceived(const QXmppStreamInitiationIq &iq) { QXmppTransferJob *job = d->getOutgoingJobByRequestId(iq.from(), iq.id()); if (!job || job->state() != QXmppTransferJob::OfferState) return; foreach (const QXmppDataForm::Field &field, iq.featureForm().fields()) { if (field.key() == "stream-method") { if ((field.value().toString() == ns_ibb) && (d->supportedMethods & QXmppTransferJob::InBandMethod)) job->d->method = QXmppTransferJob::InBandMethod; else if ((field.value().toString() == ns_bytestreams) && (d->supportedMethods & QXmppTransferJob::SocksMethod)) job->d->method = QXmppTransferJob::SocksMethod; } } // remote party accepted stream initiation job->setState(QXmppTransferJob::StartState); if (job->method() == QXmppTransferJob::InBandMethod) { // lower block size for IBB job->d->blockSize = d->ibbBlockSize; QXmppIbbOpenIq openIq; openIq.setTo(job->d->jid); openIq.setSid(job->d->sid); openIq.setBlockSize(job->d->blockSize); job->d->requestId = openIq.id(); client()->sendPacket(openIq); } else if (job->method() == QXmppTransferJob::SocksMethod) { if (!d->proxy.isEmpty()) { job->d->socksProxy.setJid(d->proxy); // query proxy QXmppByteStreamIq streamIq; streamIq.setType(QXmppIq::Get); streamIq.setTo(job->d->socksProxy.jid()); streamIq.setSid(job->d->sid); job->d->requestId = streamIq.id(); client()->sendPacket(streamIq); } else { socksServerSendOffer(job); } } else { warning("QXmppTransferManager received an unsupported method"); job->terminate(QXmppTransferJob::ProtocolError); } } void QXmppTransferManager::streamInitiationSetReceived(const QXmppStreamInitiationIq &iq) { bool check; Q_UNUSED(check); QXmppIq response; response.setTo(iq.from()); response.setId(iq.id()); // check we support the profile if (iq.profile() != QXmppStreamInitiationIq::FileTransfer) { // FIXME : we should add: // QXmppStanza::Error error(QXmppStanza::Error::Cancel, QXmppStanza::Error::BadRequest); error.setCode(400); response.setType(QXmppIq::Error); response.setError(error); client()->sendPacket(response); return; } // check there is a receiver connected to the fileReceived() signal if (!receivers(SIGNAL(fileReceived(QXmppTransferJob*)))) { QXmppStanza::Error error(QXmppStanza::Error::Cancel, QXmppStanza::Error::Forbidden); error.setCode(403); response.setType(QXmppIq::Error); response.setError(error); client()->sendPacket(response); return; } // check the stream type QXmppTransferIncomingJob *job = new QXmppTransferIncomingJob(iq.from(), client(), this); int offeredMethods = QXmppTransferJob::NoMethod; job->d->offerId = iq.id(); job->d->sid = iq.siId(); job->d->mimeType = iq.mimeType(); job->d->fileInfo = iq.fileInfo(); foreach (const QXmppDataForm::Field &field, iq.featureForm().fields()) { if (field.key() == "stream-method") { QPair option; foreach (option, field.options()) { if (option.second == ns_ibb) offeredMethods = offeredMethods | QXmppTransferJob::InBandMethod; else if (option.second == ns_bytestreams) offeredMethods = offeredMethods | QXmppTransferJob::SocksMethod; } } } // select a method supported by both parties int sharedMethods = (offeredMethods & d->supportedMethods); if (sharedMethods & QXmppTransferJob::SocksMethod) job->d->method = QXmppTransferJob::SocksMethod; else if (sharedMethods & QXmppTransferJob::InBandMethod) job->d->method = QXmppTransferJob::InBandMethod; else { // FIXME : we should add: // QXmppStanza::Error error(QXmppStanza::Error::Cancel, QXmppStanza::Error::BadRequest); error.setCode(400); response.setType(QXmppIq::Error); response.setError(error); client()->sendPacket(response); delete job; return; } // register job d->jobs.append(job); check = connect(job, SIGNAL(destroyed(QObject*)), this, SLOT(_q_jobDestroyed(QObject*))); Q_ASSERT(check); check = connect(job, SIGNAL(finished()), this, SLOT(_q_jobFinished())); Q_ASSERT(check); check = connect(job, SIGNAL(stateChanged(QXmppTransferJob::State)), this, SLOT(_q_jobStateChanged(QXmppTransferJob::State))); Q_ASSERT(check); // allow user to accept or decline the job emit fileReceived(job); } /// Return the JID of the bytestream proxy to use for /// outgoing transfers. /// QString QXmppTransferManager::proxy() const { return d->proxy; } /// Set the JID of the SOCKS5 bytestream proxy to use for /// outgoing transfers. /// /// If you set a proxy, when you send a file the proxy will /// be offered to the recipient in addition to your own IP /// addresses. /// void QXmppTransferManager::setProxy(const QString &proxyJid) { d->proxy = proxyJid; } /// Return whether the proxy will systematically be used for /// outgoing SOCKS5 bytestream transfers. /// bool QXmppTransferManager::proxyOnly() const { return d->proxyOnly; } /// Set whether the proxy should systematically be used for /// outgoing SOCKS5 bytestream transfers. /// /// \note If you set this to true and do not provide a proxy /// using setProxy(), your outgoing transfers will fail! /// void QXmppTransferManager::setProxyOnly(bool proxyOnly) { d->proxyOnly = proxyOnly; } /// Return the supported stream methods. /// /// The methods are a combination of zero or more QXmppTransferJob::Method. /// QXmppTransferJob::Methods QXmppTransferManager::supportedMethods() const { return d->supportedMethods; } /// Set the supported stream methods. This allows you to selectively /// enable or disable stream methods (In-Band or SOCKS5 bytestreams). /// /// The methods argument is a combination of zero or more /// QXmppTransferJob::Method. /// void QXmppTransferManager::setSupportedMethods(QXmppTransferJob::Methods methods) { d->supportedMethods = methods; } qxmpp-0.7.6/src/client/QXmppTransferManager_p.h0000644000175000007640000000421112116723562021416 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPTRANSFERMANAGER_P_H #define QXMPPTRANSFERMANAGER_P_H #include "QXmppByteStreamIq.h" #include "QXmppTransferManager.h" // // W A R N I N G // ------------- // // This file is not part of the QXmpp API. It exists for the convenience // of the QXmppTransferManager class. This header file may change from // version to version without notice, or even be removed. // // We mean it. // class QTimer; class QXmppSocksClient; class QXmppTransferIncomingJob : public QXmppTransferJob { Q_OBJECT public: QXmppTransferIncomingJob(const QString &jid, QXmppClient *client, QObject *parent); void checkData(); void connectToHosts(const QXmppByteStreamIq &iq); bool writeData(const QByteArray &data); private slots: void _q_candidateDisconnected(); void _q_candidateReady(); void _q_disconnected(); void _q_receiveData(); private: void connectToNextHost(); QXmppByteStreamIq::StreamHost m_candidateHost; QXmppSocksClient *m_candidateClient; QTimer *m_candidateTimer; QList m_streamCandidates; QString m_streamOfferId; QString m_streamOfferFrom; }; class QXmppTransferOutgoingJob : public QXmppTransferJob { Q_OBJECT public: QXmppTransferOutgoingJob(const QString &jid, QXmppClient *client, QObject *parent); void connectToProxy(); void startSending(); private slots: void _q_disconnected(); void _q_proxyReady(); void _q_sendData(); }; #endif qxmpp-0.7.6/src/client/QXmppConfiguration.h0000644000175000007640000001132212116723562020630 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPCONFIGURATION_H #define QXMPPCONFIGURATION_H #include #include #include "QXmppGlobal.h" class QNetworkProxy; class QSslCertificate; class QXmppConfigurationPrivate; /// \brief The QXmppConfiguration class holds configuration options. /// /// It can be passed to QXmppClient to specify the options when connecting to /// an XMPP server. /// /// It is a container of all the settings, configuration required for /// connecting to an XMPP server. E.g. server name, username, port, type /// of authentication mechanism, type of security used by stream (encryption), /// etc.. /// class QXMPP_EXPORT QXmppConfiguration { public: /// An enumeration for type of the Security Mode that is stream is encrypted or not. /// The server may or may not have TLS feature. Server may force the encryption. /// Depending upon all this user can specify following options. enum StreamSecurityMode { TLSEnabled = 0, ///< Encryption is used if available (default) TLSDisabled, ///< No encryption is server allows TLSRequired ///< Encryption is a must otherwise connection would not ///< be established }; /// An enumeration for various Non-SASL authentication mechanisms available. /// The server may or may not allow QXmppConfiguration::Plain mechanism. So /// specifying the mechanism is just a hint to the library. enum NonSASLAuthMechanism { NonSASLPlain = 0,///< Plain NonSASLDigest ///< Digest (default) }; /// An enumeration for various SASL authentication mechanisms available. /// The server may or may not allow any particular mechanism. So depending /// upon the availability of mechanisms on the server the library will choose /// a mechanism. QXmppConfiguration(); QXmppConfiguration(const QXmppConfiguration &other); ~QXmppConfiguration(); QXmppConfiguration& operator=(const QXmppConfiguration &other); QString host() const; void setHost(const QString&); QString domain() const; void setDomain(const QString&); int port() const; void setPort(int); QString user() const; void setUser(const QString&); QString password() const; void setPassword(const QString&); QString resource() const; void setResource(const QString&); QString jid() const; void setJid(const QString &jid); QString jidBare() const; QString facebookAccessToken() const; void setFacebookAccessToken(const QString&); QString facebookAppId() const; void setFacebookAppId(const QString&); QString googleAccessToken() const; void setGoogleAccessToken(const QString &accessToken); QString windowsLiveAccessToken() const; void setWindowsLiveAccessToken(const QString &accessToken); bool autoAcceptSubscriptions() const; void setAutoAcceptSubscriptions(bool); bool autoReconnectionEnabled() const; void setAutoReconnectionEnabled(bool); bool useSASLAuthentication() const; void setUseSASLAuthentication(bool); bool useNonSASLAuthentication() const; void setUseNonSASLAuthentication(bool); bool ignoreSslErrors() const; void setIgnoreSslErrors(bool); QXmppConfiguration::StreamSecurityMode streamSecurityMode() const; void setStreamSecurityMode(QXmppConfiguration::StreamSecurityMode mode); QXmppConfiguration::NonSASLAuthMechanism nonSASLAuthMechanism() const; void setNonSASLAuthMechanism(QXmppConfiguration::NonSASLAuthMechanism); QString saslAuthMechanism() const; void setSaslAuthMechanism(const QString &mechanism); QNetworkProxy networkProxy() const; void setNetworkProxy(const QNetworkProxy& proxy); int keepAliveInterval() const; void setKeepAliveInterval(int secs); int keepAliveTimeout() const; void setKeepAliveTimeout(int secs); QList caCertificates() const; void setCaCertificates(const QList &); private: QSharedDataPointer d; }; #endif // QXMPPCONFIGURATION_H qxmpp-0.7.6/src/base/0000755000175000007640000000000012116723562014317 5ustar sharkyjerrywebqxmpp-0.7.6/src/base/QXmppMessage.h0000644000175000007640000000624012116723562017044 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPMESSAGE_H #define QXMPPMESSAGE_H #include #include "QXmppStanza.h" class QXmppMessagePrivate; /// \brief The QXmppMessage class represents an XMPP message. /// /// \ingroup Stanzas /// class QXMPP_EXPORT QXmppMessage : public QXmppStanza { public: /// This enum described a message type. enum Type { Error = 0, Normal, Chat, GroupChat, Headline }; /// This enum describes a chat state as defined by /// XEP-0085 : Chat State Notifications. enum State { None = 0, ///< The message does not contain any chat state information. Active, ///< User is actively participating in the chat session. Inactive, ///< User has not been actively participating in the chat session. Gone, ///< User has effectively ended their participation in the chat session. Composing, ///< User is composing a message. Paused, ///< User had been composing but now has stopped. }; QXmppMessage(const QString& from = "", const QString& to = "", const QString& body = "", const QString& thread = ""); QXmppMessage(const QXmppMessage &other); ~QXmppMessage(); QXmppMessage& operator=(const QXmppMessage &other); QString body() const; void setBody(const QString&); bool isAttentionRequested() const; void setAttentionRequested(bool requested); bool isReceiptRequested() const; void setReceiptRequested(bool requested); QString mucInvitationJid() const; void setMucInvitationJid(const QString &jid); QString mucInvitationPassword() const; void setMucInvitationPassword(const QString &password); QString mucInvitationReason() const; void setMucInvitationReason(const QString &reason); QString receiptId() const; void setReceiptId(const QString &id); QDateTime stamp() const; void setStamp(const QDateTime &stamp); QXmppMessage::State state() const; void setState(QXmppMessage::State); QString subject() const; void setSubject(const QString&); QString thread() const; void setThread(const QString&); QXmppMessage::Type type() const; void setType(QXmppMessage::Type); QString xhtml() const; void setXhtml(const QString &xhtml); /// \cond void parse(const QDomElement &element); void toXml(QXmlStreamWriter *writer) const; /// \endcond private: QSharedDataPointer d; }; #endif // QXMPPMESSAGE_H qxmpp-0.7.6/src/base/QXmppVersionIq.h0000644000175000007640000000277612116723562017411 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPVERSIONIQ_H #define QXMPPVERSIONIQ_H #include "QXmppIq.h" /// \brief The QXmppVersionIq class represents an IQ for conveying a software /// version as defined by XEP-0092: Software Version. /// /// \ingroup Stanzas class QXMPP_EXPORT QXmppVersionIq : public QXmppIq { public: QString name() const; void setName(const QString &name); QString os() const; void setOs(const QString &os); QString version() const; void setVersion(const QString &version); /// \cond static bool isVersionIq(const QDomElement &element); /// \endcond protected: /// \cond void parseElementFromChild(const QDomElement &element); void toXmlElementFromChild(QXmlStreamWriter *writer) const; /// \endcond private: QString m_name; QString m_os; QString m_version; }; #endif qxmpp-0.7.6/src/base/QXmppConstants.cpp0000644000175000007640000001161112116723562017765 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "QXmppConstants.h" const char* ns_stream = "http://etherx.jabber.org/streams"; const char* ns_client = "jabber:client"; const char* ns_server = "jabber:server"; const char* ns_roster = "jabber:iq:roster"; const char* ns_tls = "urn:ietf:params:xml:ns:xmpp-tls"; const char* ns_sasl = "urn:ietf:params:xml:ns:xmpp-sasl"; const char* ns_bind = "urn:ietf:params:xml:ns:xmpp-bind"; const char* ns_session = "urn:ietf:params:xml:ns:xmpp-session"; const char* ns_stanza = "urn:ietf:params:xml:ns:xmpp-stanzas"; // XEP-0009: Jabber-RPC const char* ns_rpc = "jabber:iq:rpc"; // XEP-0020: Feature Negotiation const char* ns_feature_negotiation = "http://jabber.org/protocol/feature-neg"; // XEP-0030: Service Discovery const char* ns_disco_info = "http://jabber.org/protocol/disco#info"; const char* ns_disco_items = "http://jabber.org/protocol/disco#items"; // XEP-0033: Extended Stanza Addressing const char* ns_extended_addressing = "http://jabber.org/protocol/address"; // XEP-0045: Multi-User Chat const char* ns_muc = "http://jabber.org/protocol/muc"; const char* ns_muc_admin = "http://jabber.org/protocol/muc#admin"; const char* ns_muc_owner = "http://jabber.org/protocol/muc#owner"; const char* ns_muc_user = "http://jabber.org/protocol/muc#user"; // XEP-0047: In-Band Bytestreams const char* ns_ibb = "http://jabber.org/protocol/ibb"; // XEP-0049: Private XML Storage const char* ns_private = "jabber:iq:private"; // XEP-0054: vcard-temp const char* ns_vcard = "vcard-temp"; // XEP-0059: Result Set Management const char* ns_rsm = "http://jabber.org/protocol/rsm"; // XEP-0065: SOCKS5 Bytestreams const char* ns_bytestreams = "http://jabber.org/protocol/bytestreams"; // XEP-0071: XHTML-IM const char *ns_xhtml_im = "http://jabber.org/protocol/xhtml-im"; // XEP-0077: In-Band Registration const char* ns_register = "jabber:iq:register"; // XEP-0078: Non-SASL Authentication const char* ns_auth = "jabber:iq:auth"; const char* ns_authFeature = "http://jabber.org/features/iq-auth"; // XEP-0085: Chat State Notifications const char* ns_chat_states = "http://jabber.org/protocol/chatstates"; // XEP-0091: Legacy Delayed Delivery const char* ns_legacy_delayed_delivery = "jabber:x:delay"; // XEP-0092: Software Version const char* ns_version = "jabber:iq:version"; const char* ns_data = "jabber:x:data"; // XEP-0095: Stream Initiation const char* ns_stream_initiation = "http://jabber.org/protocol/si"; const char* ns_stream_initiation_file_transfer = "http://jabber.org/protocol/si/profile/file-transfer"; // XEP-0108: User Activity const char* ns_activity = "http://jabber.org/protocol/activity"; // XEP-0115: Entity Capabilities const char* ns_capabilities = "http://jabber.org/protocol/caps"; // XEP-0136: Message Archiving const char* ns_archive = "urn:xmpp:archive"; // XEP-0138: Stream Compression const char* ns_compress = "http://jabber.org/protocol/compress"; const char* ns_compressFeature = "http://jabber.org/features/compress"; // XEP-0145: Annotations const char* ns_rosternotes = "storage:rosternotes"; // XEP-0153: vCard-Based Avatars const char* ns_vcard_update = "vcard-temp:x:update"; // XEP-0158: CAPTCHA Forms const char* ns_captcha = "urn:xmpp:captcha"; // XEP-0166: Jingle const char* ns_jingle = "urn:xmpp:jingle:1"; const char* ns_jingle_raw_udp = "urn:xmpp:jingle:transports:raw-udp:1"; const char* ns_jingle_ice_udp = "urn:xmpp:jingle:transports:ice-udp:1"; const char* ns_jingle_rtp = "urn:xmpp:jingle:apps:rtp:1"; const char* ns_jingle_rtp_audio = "urn:xmpp:jingle:apps:rtp:audio"; const char* ns_jingle_rtp_video = "urn:xmpp:jingle:apps:rtp:video"; // XEP-0184: Message Receipts const char* ns_message_receipts = "urn:xmpp:receipts"; // XEP-0199: XMPP Ping const char* ns_ping = "urn:xmpp:ping"; // XEP-0202: Entity Time const char* ns_entity_time = "urn:xmpp:time"; // XEP-0203: Delayed Delivery const char* ns_delayed_delivery = "urn:xmpp:delay"; // XEP-0220: Server Dialback const char* ns_server_dialback = "jabber:server:dialback"; // XEP-0221: Data Forms Media Element const char* ns_media_element = "urn:xmpp:media-element"; // XEP-0224: Attention const char* ns_attention = "urn:xmpp:attention:0"; // XEP-0231: Bits of Binary const char* ns_bob = "urn:xmpp:bob"; // XEP-0249: Direct MUC Invitations const char* ns_conference = "jabber:x:conference"; qxmpp-0.7.6/src/base/QXmppPresence.cpp0000644000175000007640000003361012116723562017560 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "QXmppPresence.h" #include "QXmppUtils.h" #include #include #include #include "QXmppConstants.h" static const char* presence_types[] = { "error", "", "unavailable", "subscribe", "subscribed", "unsubscribe", "unsubscribed", "probe" }; static const char* presence_shows[] = { "", "away", "xa", "dnd", "chat", "invisible" }; class QXmppPresencePrivate : public QSharedData { public: QXmppPresence::AvailableStatusType availableStatusType; QXmppPresence::Type type; QXmppPresence::Status status; /// XEP-0153: vCard-Based Avatars /// photoHash: the SHA1 hash of the avatar image data itself (not the base64-encoded version) /// in accordance with RFC 3174 QByteArray photoHash; QXmppPresence::VCardUpdateType vCardUpdateType; // XEP-0115: Entity Capabilities QString capabilityHash; QString capabilityNode; QByteArray capabilityVer; // Legacy XEP-0115: Entity Capabilities QStringList capabilityExt; // XEP-0045: Multi-User Chat QXmppMucItem mucItem; QString mucPassword; QList mucStatusCodes; bool mucSupported; }; /// Constructs a QXmppPresence. /// /// \param type QXmppPresence::QXmppPresence(QXmppPresence::Type type) : d(new QXmppPresencePrivate) { d->type = type; d->mucSupported = false; d->vCardUpdateType = VCardUpdateNone; } /// Constructs a copy of \a other. QXmppPresence::QXmppPresence(const QXmppPresence &other) : QXmppStanza(other) , d(other.d) { } /// Destroys a QXmppPresence. QXmppPresence::~QXmppPresence() { } /// Assigns \a other to this presence. QXmppPresence &QXmppPresence::operator=(const QXmppPresence &other) { QXmppStanza::operator=(other); d = other.d; return *this; } /// Returns the availability status type, for instance busy or away. /// /// This will not tell you whether a contact is connected, check whether /// type() is QXmppPresence::Available instead. QXmppPresence::AvailableStatusType QXmppPresence::availableStatusType() const { return static_cast(d->status.type()); } /// Sets the availability status type, for instance busy or away. void QXmppPresence::setAvailableStatusType(AvailableStatusType type) { d->status.setType(static_cast(type)); } /// Returns the priority level of the resource. int QXmppPresence::priority() const { return d->status.priority(); } /// Sets the \a priority level of the resource. void QXmppPresence::setPriority(int priority) { d->status.setPriority(priority); } /// Returns the status text, a textual description of the user's status. QString QXmppPresence::statusText() const { return d->status.statusText(); } /// Sets the status text, a textual description of the user's status. /// /// \param statusText The status text, for example "Gone fishing". void QXmppPresence::setStatusText(const QString& statusText) { d->status.setStatusText(statusText); } /// Returns the presence type. /// /// You can use this method to determine the action which needs to be /// taken in response to receiving the presence. For instance, if the type is /// QXmppPresence::Available or QXmppPresence::Unavailable, you could update /// the icon representing a contact's availability. QXmppPresence::Type QXmppPresence::type() const { return d->type; } /// Sets the presence type. /// /// \param type void QXmppPresence::setType(QXmppPresence::Type type) { d->type = type; } /// \cond void QXmppPresence::parse(const QDomElement &element) { QXmppStanza::parse(element); const QString type = element.attribute("type"); for (int i = Error; i <= Probe; i++) { if (type == presence_types[i]) { d->type = static_cast(i); break; } } d->status.parse(element); QXmppElementList extensions; QDomElement xElement = element.firstChildElement(); d->vCardUpdateType = VCardUpdateNone; while(!xElement.isNull()) { // XEP-0045: Multi-User Chat if(xElement.namespaceURI() == ns_muc) { d->mucSupported = true; d->mucPassword = xElement.firstChildElement("password").text(); } else if(xElement.namespaceURI() == ns_muc_user) { QDomElement itemElement = xElement.firstChildElement("item"); d->mucItem.parse(itemElement); QDomElement statusElement = xElement.firstChildElement("status"); d->mucStatusCodes.clear(); while (!statusElement.isNull()) { d->mucStatusCodes << statusElement.attribute("code").toInt(); statusElement = statusElement.nextSiblingElement("status"); } } // XEP-0153: vCard-Based Avatars else if(xElement.namespaceURI() == ns_vcard_update) { QDomElement photoElement = xElement.firstChildElement("photo"); if(!photoElement.isNull()) { d->photoHash = QByteArray::fromHex(photoElement.text().toLatin1()); if(d->photoHash.isEmpty()) d->vCardUpdateType = VCardUpdateNoPhoto; else d->vCardUpdateType = VCardUpdateValidPhoto; } else { d->photoHash = QByteArray(); d->vCardUpdateType = VCardUpdateNotReady; } } // XEP-0115: Entity Capabilities else if(xElement.tagName() == "c" && xElement.namespaceURI() == ns_capabilities) { d->capabilityNode = xElement.attribute("node"); d->capabilityVer = QByteArray::fromBase64(xElement.attribute("ver").toLatin1()); d->capabilityHash = xElement.attribute("hash"); d->capabilityExt = xElement.attribute("ext").split(" ", QString::SkipEmptyParts); } else if (xElement.tagName() == "addresses") { } else if (xElement.tagName() == "error") { } else if (xElement.tagName() == "show") { } else if (xElement.tagName() == "status") { } else if (xElement.tagName() == "priority") { } else { // other extensions extensions << QXmppElement(xElement); } xElement = xElement.nextSiblingElement(); } setExtensions(extensions); } void QXmppPresence::toXml(QXmlStreamWriter *xmlWriter) const { xmlWriter->writeStartElement("presence"); helperToXmlAddAttribute(xmlWriter,"xml:lang", lang()); helperToXmlAddAttribute(xmlWriter,"id", id()); helperToXmlAddAttribute(xmlWriter,"to", to()); helperToXmlAddAttribute(xmlWriter,"from", from()); helperToXmlAddAttribute(xmlWriter,"type", presence_types[d->type]); d->status.toXml(xmlWriter); error().toXml(xmlWriter); // XEP-0045: Multi-User Chat if(d->mucSupported) { xmlWriter->writeStartElement("x"); xmlWriter->writeAttribute("xmlns", ns_muc); if (!d->mucPassword.isEmpty()) xmlWriter->writeTextElement("password", d->mucPassword); xmlWriter->writeEndElement(); } if(!d->mucItem.isNull() || !d->mucStatusCodes.isEmpty()) { xmlWriter->writeStartElement("x"); xmlWriter->writeAttribute("xmlns", ns_muc_user); if (!d->mucItem.isNull()) d->mucItem.toXml(xmlWriter); foreach (int code, d->mucStatusCodes) { xmlWriter->writeStartElement("status"); xmlWriter->writeAttribute("code", QString::number(code)); xmlWriter->writeEndElement(); } xmlWriter->writeEndElement(); } // XEP-0153: vCard-Based Avatars if(d->vCardUpdateType != VCardUpdateNone) { xmlWriter->writeStartElement("x"); xmlWriter->writeAttribute("xmlns", ns_vcard_update); switch(d->vCardUpdateType) { case VCardUpdateNoPhoto: helperToXmlAddTextElement(xmlWriter, "photo", ""); break; case VCardUpdateValidPhoto: helperToXmlAddTextElement(xmlWriter, "photo", d->photoHash.toHex()); break; case VCardUpdateNotReady: break; default: break; } xmlWriter->writeEndElement(); } if(!d->capabilityNode.isEmpty() && !d->capabilityVer.isEmpty() && !d->capabilityHash.isEmpty()) { xmlWriter->writeStartElement("c"); xmlWriter->writeAttribute("xmlns", ns_capabilities); helperToXmlAddAttribute(xmlWriter, "hash", d->capabilityHash); helperToXmlAddAttribute(xmlWriter, "node", d->capabilityNode); helperToXmlAddAttribute(xmlWriter, "ver", d->capabilityVer.toBase64()); xmlWriter->writeEndElement(); } // other extensions QXmppStanza::extensionsToXml(xmlWriter); xmlWriter->writeEndElement(); } /// \endcond /// Returns the photo-hash of the VCardUpdate. /// /// \return QByteArray QByteArray QXmppPresence::photoHash() const { return d->photoHash; } /// Sets the photo-hash of the VCardUpdate. /// /// \param photoHash as QByteArray void QXmppPresence::setPhotoHash(const QByteArray& photoHash) { d->photoHash = photoHash; } /// Returns the type of VCardUpdate /// /// \return VCardUpdateType QXmppPresence::VCardUpdateType QXmppPresence::vCardUpdateType() const { return d->vCardUpdateType; } /// Sets the type of VCardUpdate /// /// \param type VCardUpdateType void QXmppPresence::setVCardUpdateType(VCardUpdateType type) { d->vCardUpdateType = type; } /// XEP-0115: Entity Capabilities QString QXmppPresence::capabilityHash() const { return d->capabilityHash; } /// XEP-0115: Entity Capabilities void QXmppPresence::setCapabilityHash(const QString& hash) { d->capabilityHash = hash; } /// XEP-0115: Entity Capabilities QString QXmppPresence::capabilityNode() const { return d->capabilityNode; } /// XEP-0115: Entity Capabilities void QXmppPresence::setCapabilityNode(const QString& node) { d->capabilityNode = node; } /// XEP-0115: Entity Capabilities QByteArray QXmppPresence::capabilityVer() const { return d->capabilityVer; } /// XEP-0115: Entity Capabilities void QXmppPresence::setCapabilityVer(const QByteArray& ver) { d->capabilityVer = ver; } /// Legacy XEP-0115: Entity Capabilities QStringList QXmppPresence::capabilityExt() const { return d->capabilityExt; } /// Returns the MUC item. QXmppMucItem QXmppPresence::mucItem() const { return d->mucItem; } /// Sets the MUC item. /// /// \param item void QXmppPresence::setMucItem(const QXmppMucItem &item) { d->mucItem = item; } /// Returns the password used to join a MUC room. QString QXmppPresence::mucPassword() const { return d->mucPassword; } /// Sets the password used to join a MUC room. void QXmppPresence::setMucPassword(const QString &password) { d->mucPassword = password; } /// Returns the MUC status codes. QList QXmppPresence::mucStatusCodes() const { return d->mucStatusCodes; } /// Sets the MUC status codes. /// /// \param codes void QXmppPresence::setMucStatusCodes(const QList &codes) { d->mucStatusCodes = codes; } /// Returns true if the sender has indicated MUC support. bool QXmppPresence::isMucSupported() const { return d->mucSupported; } /// Sets whether MUC is \a supported. void QXmppPresence::setMucSupported(bool supported) { d->mucSupported = supported; } /// \cond const QXmppPresence::Status& QXmppPresence::status() const { return d->status; } QXmppPresence::Status& QXmppPresence::status() { return d->status; } void QXmppPresence::setStatus(const QXmppPresence::Status& status) { d->status = status; } QXmppPresence::Status::Status(QXmppPresence::Status::Type type, const QString statusText, int priority) : m_type(type), m_statusText(statusText), m_priority(priority) { } QXmppPresence::Status::Type QXmppPresence::Status::type() const { return m_type; } void QXmppPresence::Status::setType(QXmppPresence::Status::Type type) { m_type = type; } QString QXmppPresence::Status::statusText() const { return m_statusText; } void QXmppPresence::Status::setStatusText(const QString& str) { m_statusText = str; } int QXmppPresence::Status::priority() const { return m_priority; } void QXmppPresence::Status::setPriority(int priority) { m_priority = priority; } void QXmppPresence::Status::parse(const QDomElement &element) { const QString show = element.firstChildElement("show").text(); for (int i = Online; i <= Invisible; i++) { if (show == presence_shows[i]) { m_type = static_cast(i); break; } } m_statusText = element.firstChildElement("status").text(); m_priority = element.firstChildElement("priority").text().toInt(); } void QXmppPresence::Status::toXml(QXmlStreamWriter *xmlWriter) const { const QString show = presence_shows[m_type]; if (!show.isEmpty()) helperToXmlAddTextElement(xmlWriter, "show", show); if (!m_statusText.isEmpty()) helperToXmlAddTextElement(xmlWriter, "status", m_statusText); if (m_priority != 0) helperToXmlAddTextElement(xmlWriter, "priority", QString::number(m_priority)); } /// \endcond qxmpp-0.7.6/src/base/QXmppVCardIq.cpp0000644000175000007640000004614412116723562017313 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include #include "QXmppVCardIq.h" #include "QXmppUtils.h" #include "QXmppConstants.h" static QString getImageType(const QByteArray &contents) { if (contents.startsWith("\x89PNG\x0d\x0a\x1a\x0a")) return "image/png"; else if (contents.startsWith("\x8aMNG")) return "video/x-mng"; else if (contents.startsWith("GIF8")) return "image/gif"; else if (contents.startsWith("BM")) return "image/bmp"; else if (contents.contains("/* XPM */")) return "image/x-xpm"; else if (contents.contains("country; } /// Sets the country. void QXmppVCardAddress::setCountry(const QString &country) { d->country = country; } /// Returns the locality. QString QXmppVCardAddress::locality() const { return d->locality; } /// Sets the locality. void QXmppVCardAddress::setLocality(const QString &locality) { d->locality = locality; } /// Returns the postcode. QString QXmppVCardAddress::postcode() const { return d->postcode; } /// Sets the postcode. void QXmppVCardAddress::setPostcode(const QString &postcode) { d->postcode = postcode; } /// Returns the region. QString QXmppVCardAddress::region() const { return d->region; } /// Sets the region. void QXmppVCardAddress::setRegion(const QString ®ion) { d->region = region; } /// Returns the street address. QString QXmppVCardAddress::street() const { return d->street; } /// Sets the street address. void QXmppVCardAddress::setStreet(const QString &street) { d->street = street; } /// Returns the address type, which is a combination of TypeFlag. QXmppVCardAddress::Type QXmppVCardAddress::type() const { return d->type; } /// Sets the address \a type, which is a combination of TypeFlag. void QXmppVCardAddress::setType(QXmppVCardAddress::Type type) { d->type = type; } /// \cond void QXmppVCardAddress::parse(const QDomElement &element) { if (!element.firstChildElement("HOME").isNull()) d->type |= Home; if (!element.firstChildElement("WORK").isNull()) d->type |= Work; if (!element.firstChildElement("POSTAL").isNull()) d->type |= Postal; if (!element.firstChildElement("PREF").isNull()) d->type |= Preferred; d->country = element.firstChildElement("CTRY").text(); d->locality = element.firstChildElement("LOCALITY").text(); d->postcode = element.firstChildElement("PCODE").text(); d->region = element.firstChildElement("REGION").text(); d->street = element.firstChildElement("STREET").text(); } void QXmppVCardAddress::toXml(QXmlStreamWriter *writer) const { writer->writeStartElement("ADR"); if (d->type & Home) writer->writeEmptyElement("HOME"); if (d->type & Work) writer->writeEmptyElement("WORK"); if (d->type & Postal) writer->writeEmptyElement("POSTAL"); if (d->type & Preferred) writer->writeEmptyElement("PREF"); if (!d->country.isEmpty()) writer->writeTextElement("CTRY", d->country); if (!d->locality.isEmpty()) writer->writeTextElement("LOCALITY", d->locality); if (!d->postcode.isEmpty()) writer->writeTextElement("PCODE", d->postcode); if (!d->region.isEmpty()) writer->writeTextElement("REGION", d->region); if (!d->street.isEmpty()) writer->writeTextElement("STREET", d->street); writer->writeEndElement(); } /// \endcond class QXmppVCardEmailPrivate : public QSharedData { public: QXmppVCardEmailPrivate() : type(QXmppVCardEmail::None) {}; QString address; QXmppVCardEmail::Type type; }; /// Constructs an empty e-mail address. QXmppVCardEmail::QXmppVCardEmail() : d(new QXmppVCardEmailPrivate) { } /// Constructs a copy of \a other. QXmppVCardEmail::QXmppVCardEmail(const QXmppVCardEmail &other) : d(other.d) { } QXmppVCardEmail::~QXmppVCardEmail() { } /// Assigns \a other to this e-mail address. QXmppVCardEmail& QXmppVCardEmail::operator=(const QXmppVCardEmail &other) { d = other.d; return *this; } /// Returns the e-mail address. QString QXmppVCardEmail::address() const { return d->address; } /// Sets the e-mail \a address. void QXmppVCardEmail::setAddress(const QString &address) { d->address = address; } /// Returns the e-mail type, which is a combination of TypeFlag. QXmppVCardEmail::Type QXmppVCardEmail::type() const { return d->type; } /// Sets the e-mail \a type, which is a combination of TypeFlag. void QXmppVCardEmail::setType(QXmppVCardEmail::Type type) { d->type = type; } /// \cond void QXmppVCardEmail::parse(const QDomElement &element) { if (!element.firstChildElement("HOME").isNull()) d->type |= Home; if (!element.firstChildElement("WORK").isNull()) d->type |= Work; if (!element.firstChildElement("INTERNET").isNull()) d->type |= Internet; if (!element.firstChildElement("PREF").isNull()) d->type |= Preferred; if (!element.firstChildElement("X400").isNull()) d->type |= X400; d->address = element.firstChildElement("USERID").text(); } void QXmppVCardEmail::toXml(QXmlStreamWriter *writer) const { writer->writeStartElement("EMAIL"); if (d->type & Home) writer->writeEmptyElement("HOME"); if (d->type & Work) writer->writeEmptyElement("WORK"); if (d->type & Internet) writer->writeEmptyElement("INTERNET"); if (d->type & Preferred) writer->writeEmptyElement("PREF"); if (d->type & X400) writer->writeEmptyElement("X400"); writer->writeTextElement("USERID", d->address); writer->writeEndElement(); } /// \endcond class QXmppVCardPhonePrivate : public QSharedData { public: QXmppVCardPhonePrivate() : type(QXmppVCardPhone::None) {}; QString number; QXmppVCardPhone::Type type; }; /// Constructs an empty phone number. QXmppVCardPhone::QXmppVCardPhone() : d(new QXmppVCardPhonePrivate) { } /// Constructs a copy of \a other. QXmppVCardPhone::QXmppVCardPhone(const QXmppVCardPhone &other) : d(other.d) { } QXmppVCardPhone::~QXmppVCardPhone() { } /// Assigns \a other to this phone number. QXmppVCardPhone& QXmppVCardPhone::operator=(const QXmppVCardPhone &other) { d = other.d; return *this; } /// Returns the phone number. QString QXmppVCardPhone::number() const { return d->number; } /// Sets the phone \a number. void QXmppVCardPhone::setNumber(const QString &number) { d->number = number; } /// Returns the phone number type, which is a combination of TypeFlag. QXmppVCardPhone::Type QXmppVCardPhone::type() const { return d->type; } /// Sets the phone number \a type, which is a combination of TypeFlag. void QXmppVCardPhone::setType(QXmppVCardPhone::Type type) { d->type = type; } /// \cond void QXmppVCardPhone::parse(const QDomElement &element) { if (!element.firstChildElement("HOME").isNull()) d->type |= Home; if (!element.firstChildElement("WORK").isNull()) d->type |= Work; if (!element.firstChildElement("VOICE").isNull()) d->type |= Voice; if (!element.firstChildElement("FAX").isNull()) d->type |= Fax; if (!element.firstChildElement("PAGER").isNull()) d->type |= Pager; if (!element.firstChildElement("MSG").isNull()) d->type |= Messaging; if (!element.firstChildElement("CELL").isNull()) d->type |= Cell; if (!element.firstChildElement("VIDEO").isNull()) d->type |= Video; if (!element.firstChildElement("BBS").isNull()) d->type |= BBS; if (!element.firstChildElement("MODEM").isNull()) d->type |= Modem; if (!element.firstChildElement("ISDN").isNull()) d->type |= ISDN; if (!element.firstChildElement("PCS").isNull()) d->type |= PCS; if (!element.firstChildElement("PREF").isNull()) d->type |= Preferred; d->number = element.firstChildElement("NUMBER").text(); } void QXmppVCardPhone::toXml(QXmlStreamWriter *writer) const { writer->writeStartElement("PHONE"); if (d->type & Home) writer->writeEmptyElement("HOME"); if (d->type & Work) writer->writeEmptyElement("WORK"); if (d->type & Voice) writer->writeEmptyElement("VOICE"); if (d->type & Fax) writer->writeEmptyElement("FAX"); if (d->type & Pager) writer->writeEmptyElement("PAGER"); if (d->type & Messaging) writer->writeEmptyElement("MSG"); if (d->type & Cell) writer->writeEmptyElement("CELL"); if (d->type & Video) writer->writeEmptyElement("VIDEO"); if (d->type & BBS) writer->writeEmptyElement("BBS"); if (d->type & Modem) writer->writeEmptyElement("MODEM"); if (d->type & ISDN) writer->writeEmptyElement("ISDN"); if (d->type & PCS) writer->writeEmptyElement("PCS"); if (d->type & Preferred) writer->writeEmptyElement("PREF"); writer->writeTextElement("NUMBER", d->number); writer->writeEndElement(); } /// \endcond class QXmppVCardIqPrivate : public QSharedData { public: QDate birthday; QString description; QString firstName; QString fullName; QString lastName; QString middleName; QString nickName; QString url; // not as 64 base QByteArray photo; QString photoType; QList addresses; QList emails; QList phones; }; /// Constructs a QXmppVCardIq for the specified recipient. /// /// \param jid QXmppVCardIq::QXmppVCardIq(const QString& jid) : QXmppIq() , d(new QXmppVCardIqPrivate) { // for self jid should be empty setTo(jid); } /// Constructs a copy of \a other. QXmppVCardIq::QXmppVCardIq(const QXmppVCardIq &other) : QXmppIq(other) , d(other.d) { } QXmppVCardIq::~QXmppVCardIq() { } /// Assigns \a other to this vCard IQ. QXmppVCardIq& QXmppVCardIq::operator=(const QXmppVCardIq &other) { QXmppIq::operator=(other); d = other.d; return *this; } /// Returns the date of birth of the individual associated with the vCard. /// QDate QXmppVCardIq::birthday() const { return d->birthday; } /// Sets the date of birth of the individual associated with the vCard. /// /// \param birthday void QXmppVCardIq::setBirthday(const QDate &birthday) { d->birthday = birthday; } /// Returns the free-form descriptive text. QString QXmppVCardIq::description() const { return d->description; } /// Sets the free-form descriptive text. void QXmppVCardIq::setDescription(const QString &description) { d->description = description; } /// Returns the email address. /// QString QXmppVCardIq::email() const { if (d->emails.isEmpty()) return QString(); else return d->emails.first().address(); } /// Sets the email address. /// /// \param email void QXmppVCardIq::setEmail(const QString &email) { QXmppVCardEmail first; first.setAddress(email); first.setType(QXmppVCardEmail::Internet); d->emails = QList() << first; } /// Returns the first name. /// QString QXmppVCardIq::firstName() const { return d->firstName; } /// Sets the first name. /// /// \param firstName void QXmppVCardIq::setFirstName(const QString &firstName) { d->firstName = firstName; } /// Returns the full name. /// QString QXmppVCardIq::fullName() const { return d->fullName; } /// Sets the full name. /// /// \param fullName void QXmppVCardIq::setFullName(const QString &fullName) { d->fullName = fullName; } /// Returns the last name. /// QString QXmppVCardIq::lastName() const { return d->lastName; } /// Sets the last name. /// /// \param lastName void QXmppVCardIq::setLastName(const QString &lastName) { d->lastName = lastName; } /// Returns the middle name. /// QString QXmppVCardIq::middleName() const { return d->middleName; } /// Sets the middle name. /// /// \param middleName void QXmppVCardIq::setMiddleName(const QString &middleName) { d->middleName = middleName; } /// Returns the nickname. /// QString QXmppVCardIq::nickName() const { return d->nickName; } /// Sets the nickname. /// /// \param nickName void QXmppVCardIq::setNickName(const QString &nickName) { d->nickName = nickName; } /// Returns the URL associated with the vCard. It can represent the user's /// homepage or a location at which you can find real-time information about /// the vCard. QString QXmppVCardIq::url() const { return d->url; } /// Sets the URL associated with the vCard. It can represent the user's /// homepage or a location at which you can find real-time information about /// the vCard. /// /// \param url void QXmppVCardIq::setUrl(const QString& url) { d->url = url; } /// Returns the photo's binary contents. /// /// If you want to use the photo as a QImage you can use: /// /// \code /// QBuffer buffer; /// buffer.setData(myCard.photo()); /// buffer.open(QIODevice::ReadOnly); /// QImageReader imageReader(&buffer); /// QImage myImage = imageReader.read(); /// \endcode QByteArray QXmppVCardIq::photo() const { return d->photo; } /// Sets the photo's binary contents. void QXmppVCardIq::setPhoto(const QByteArray& photo) { d->photo = photo; } /// Returns the photo's MIME type. QString QXmppVCardIq::photoType() const { return d->photoType; } /// Sets the photo's MIME type. void QXmppVCardIq::setPhotoType(const QString& photoType) { d->photoType = photoType; } /// Returns the addresses. QList QXmppVCardIq::addresses() const { return d->addresses; } /// Sets the addresses. void QXmppVCardIq::setAddresses(const QList &addresses) { d->addresses = addresses; } /// Returns the e-mail addresses. QList QXmppVCardIq::emails() const { return d->emails; } /// Sets the e-mail addresses. void QXmppVCardIq::setEmails(const QList &emails) { d->emails = emails; } /// Returns the phone numbers. QList QXmppVCardIq::phones() const { return d->phones; } /// Sets the phone numbers. void QXmppVCardIq::setPhones(const QList &phones) { d->phones = phones; } /// \cond bool QXmppVCardIq::isVCard(const QDomElement &nodeRecv) { return nodeRecv.firstChildElement("vCard").namespaceURI() == ns_vcard; } void QXmppVCardIq::parseElementFromChild(const QDomElement& nodeRecv) { // vCard QDomElement cardElement = nodeRecv.firstChildElement("vCard"); d->birthday = QDate::fromString(cardElement.firstChildElement("BDAY").text(), "yyyy-MM-dd"); d->description = cardElement.firstChildElement("DESC").text(); d->fullName = cardElement.firstChildElement("FN").text(); d->nickName = cardElement.firstChildElement("NICKNAME").text(); QDomElement nameElement = cardElement.firstChildElement("N"); d->firstName = nameElement.firstChildElement("GIVEN").text(); d->lastName = nameElement.firstChildElement("FAMILY").text(); d->middleName = nameElement.firstChildElement("MIDDLE").text(); d->url = cardElement.firstChildElement("URL").text(); QDomElement photoElement = cardElement.firstChildElement("PHOTO"); QByteArray base64data = photoElement. firstChildElement("BINVAL").text().toLatin1(); d->photo = QByteArray::fromBase64(base64data); d->photoType = photoElement.firstChildElement("TYPE").text(); QDomElement child = cardElement.firstChildElement(); while (!child.isNull()) { if (child.tagName() == "ADR") { QXmppVCardAddress address; address.parse(child); d->addresses << address; } else if (child.tagName() == "EMAIL") { QXmppVCardEmail email; email.parse(child); d->emails << email; } else if (child.tagName() == "PHONE") { QXmppVCardPhone phone; phone.parse(child); d->phones << phone; } child = child.nextSiblingElement(); } } void QXmppVCardIq::toXmlElementFromChild(QXmlStreamWriter *writer) const { writer->writeStartElement("vCard"); writer->writeAttribute("xmlns", ns_vcard); foreach (const QXmppVCardAddress &address, d->addresses) address.toXml(writer); if (d->birthday.isValid()) helperToXmlAddTextElement(writer, "BDAY", d->birthday.toString("yyyy-MM-dd")); if (!d->description.isEmpty()) helperToXmlAddTextElement(writer, "DESC", d->description); foreach (const QXmppVCardEmail &email, d->emails) email.toXml(writer); if (!d->fullName.isEmpty()) helperToXmlAddTextElement(writer, "FN", d->fullName); if(!d->nickName.isEmpty()) helperToXmlAddTextElement(writer, "NICKNAME", d->nickName); if (!d->firstName.isEmpty() || !d->lastName.isEmpty() || !d->middleName.isEmpty()) { writer->writeStartElement("N"); if (!d->firstName.isEmpty()) helperToXmlAddTextElement(writer, "GIVEN", d->firstName); if (!d->lastName.isEmpty()) helperToXmlAddTextElement(writer, "FAMILY", d->lastName); if (!d->middleName.isEmpty()) helperToXmlAddTextElement(writer, "MIDDLE", d->middleName); writer->writeEndElement(); } foreach (const QXmppVCardPhone &phone, d->phones) phone.toXml(writer); if(!photo().isEmpty()) { writer->writeStartElement("PHOTO"); QString photoType = d->photoType; if (photoType.isEmpty()) photoType = getImageType(d->photo); helperToXmlAddTextElement(writer, "TYPE", photoType); helperToXmlAddTextElement(writer, "BINVAL", d->photo.toBase64()); writer->writeEndElement(); } if (!d->url.isEmpty()) helperToXmlAddTextElement(writer, "URL", d->url); writer->writeEndElement(); } /// \endcond qxmpp-0.7.6/src/base/qdnslookup_symbian.cpp0000644000175000007640000000661312116723562020752 0ustar sharkyjerryweb/**************************************************************************** ** ** Copyright (C) 2012 Jeremy Lainé ** Contact: http://www.qt-project.org/ ** ** This file is part of the QtNetwork module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage ** This file may be used under the terms of the GNU Lesser General Public ** License version 2.1 as published by the Free Software Foundation and ** appearing in the file LICENSE.LGPL included in the packaging of this ** file. Please review the following information to ensure the GNU Lesser ** General Public License version 2.1 requirements will be met: ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain additional ** rights. These rights are described in the Nokia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU General ** Public License version 3.0 as published by the Free Software Foundation ** and appearing in the file LICENSE.GPL included in the packaging of this ** file. Please review the following information to ensure the GNU General ** Public License version 3.0 requirements will be met: ** http://www.gnu.org/copyleft/gpl.html. ** ** Other Usage ** Alternatively, this file may be used in accordance with the terms and ** conditions contained in a signed written agreement between you and Nokia. ** ** ** ** ** ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #include "qdnslookup_p.h" #include #include #include #include QT_BEGIN_NAMESPACE void QDnsLookupRunnable::query(const int requestType, const QByteArray &requestName, QDnsLookupReply *reply) { RHostResolver dnsResolver; RSocketServ dnsSocket; // Initialise resolver. TInt err = dnsSocket.Connect(); err = dnsResolver.Open(dnsSocket, KAfInet, KProtocolInetUdp); if (err != KErrNone) { reply->error = QDnsLookup::ResolverError; reply->errorString = QLatin1String("RHostResolver::Open failed"); return; } // Perform DNS query. TDnsQueryBuf dnsQuery; TDnsRespSRVBuf dnsResponse; dnsQuery().SetClass(KDnsRRClassIN); TPtrC8 queryPtr(reinterpret_cast(requestName.constData()), requestName.size()); dnsQuery().SetData(queryPtr); dnsQuery().SetType(requestType); err = dnsResolver.Query(dnsQuery, dnsResponse); if (err != KErrNone) { reply->error = QDnsLookup::NotFoundError; reply->errorString = QLatin1String("RHostResolver::Query failed"); return; } // Extract results. while (err == KErrNone) { const QByteArray aceName((const char*)dnsResponse().Target().Ptr(), dnsResponse().Target().Length()); QDnsServiceRecord record; record.d->name = QUrl::fromAce(requestName); record.d->target = QUrl::fromAce(aceName); record.d->port = dnsResponse().Port(); record.d->priority = dnsResponse().Priority(); record.d->timeToLive = dnsResponse().RRTtl(); record.d->weight = dnsResponse().Weight(); reply->serviceRecords.append(record); err = dnsResolver.QueryGetNext(dnsResponse); } } QT_END_NAMESPACE qxmpp-0.7.6/src/base/QXmppNonSASLAuth.h0000644000175000007640000000305212116723562017515 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXmppNonSASLAuth_H #define QXmppNonSASLAuth_H #include "QXmppIq.h" class QXMPP_EXPORT QXmppNonSASLAuthIq : public QXmppIq { public: QXmppNonSASLAuthIq(); QString username() const; void setUsername(const QString &username); QByteArray digest() const; void setDigest(const QString &streamId, const QString &password); QString password() const; void setPassword(const QString &password); QString resource() const; void setResource(const QString &resource); static bool isNonSASLAuthIq(const QDomElement &element); protected: /// \cond void parseElementFromChild(const QDomElement &element); void toXmlElementFromChild(QXmlStreamWriter *writer) const; /// \endcond private: QString m_username; QByteArray m_digest; QString m_password; QString m_resource; }; #endif // QXmppNonSASLAuth_H qxmpp-0.7.6/src/base/QXmppEntityTimeIq.cpp0000644000175000007640000000437312116723562020405 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "QXmppEntityTimeIq.h" #include #include "QXmppConstants.h" #include "QXmppUtils.h" /// Returns the timezone offset in seconds. /// int QXmppEntityTimeIq::tzo() const { return m_tzo; } /// Sets the timezone offset in seconds. /// /// \param tzo void QXmppEntityTimeIq::setTzo(int tzo) { m_tzo = tzo; } /// Returns the date/time in Coordinated Universal Time (UTC). /// QDateTime QXmppEntityTimeIq::utc() const { return m_utc; } /// Sets the date/time in Coordinated Universal Time (UTC). /// /// \param utc void QXmppEntityTimeIq::setUtc(const QDateTime &utc) { m_utc = utc; } /// \cond bool QXmppEntityTimeIq::isEntityTimeIq(const QDomElement &element) { QDomElement timeElement = element.firstChildElement("time"); return timeElement.namespaceURI() == ns_entity_time; } void QXmppEntityTimeIq::parseElementFromChild(const QDomElement &element) { QDomElement timeElement = element.firstChildElement("time"); m_tzo = QXmppUtils::timezoneOffsetFromString(timeElement.firstChildElement("tzo").text()); m_utc = QXmppUtils::datetimeFromString(timeElement.firstChildElement("utc").text()); } void QXmppEntityTimeIq::toXmlElementFromChild(QXmlStreamWriter *writer) const { writer->writeStartElement("time"); writer->writeAttribute("xmlns", ns_entity_time); if(m_utc.isValid()) { helperToXmlAddTextElement(writer, "tzo", QXmppUtils::timezoneOffsetToString(m_tzo)); helperToXmlAddTextElement(writer, "utc", QXmppUtils::datetimeToString(m_utc)); } writer->writeEndElement(); } /// \endcond qxmpp-0.7.6/src/base/QXmppStreamFeatures.cpp0000644000175000007640000001244612116723562020752 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include "QXmppConstants.h" #include "QXmppStreamFeatures.h" QXmppStreamFeatures::QXmppStreamFeatures() : m_bindMode(Disabled), m_sessionMode(Disabled), m_nonSaslAuthMode(Disabled), m_tlsMode(Disabled) { } QXmppStreamFeatures::Mode QXmppStreamFeatures::bindMode() const { return m_bindMode; } void QXmppStreamFeatures::setBindMode(QXmppStreamFeatures::Mode mode) { m_bindMode = mode; } QXmppStreamFeatures::Mode QXmppStreamFeatures::sessionMode() const { return m_sessionMode; } void QXmppStreamFeatures::setSessionMode(Mode mode) { m_sessionMode = mode; } QXmppStreamFeatures::Mode QXmppStreamFeatures::nonSaslAuthMode() const { return m_nonSaslAuthMode; } void QXmppStreamFeatures::setNonSaslAuthMode(QXmppStreamFeatures::Mode mode) { m_nonSaslAuthMode = mode; } QStringList QXmppStreamFeatures::authMechanisms() const { return m_authMechanisms; } void QXmppStreamFeatures::setAuthMechanisms(const QStringList &mechanisms) { m_authMechanisms = mechanisms; } QStringList QXmppStreamFeatures::compressionMethods() const { return m_compressionMethods; } void QXmppStreamFeatures::setCompressionMethods(const QStringList &methods) { m_compressionMethods = methods; } QXmppStreamFeatures::Mode QXmppStreamFeatures::tlsMode() const { return m_tlsMode; } void QXmppStreamFeatures::setTlsMode(QXmppStreamFeatures::Mode mode) { m_tlsMode = mode; } /// \cond bool QXmppStreamFeatures::isStreamFeatures(const QDomElement &element) { return element.namespaceURI() == ns_stream && element.tagName() == "features"; } static QXmppStreamFeatures::Mode readFeature(const QDomElement &element, const char *tagName, const char *tagNs) { QDomElement subElement = element.firstChildElement(tagName); if (subElement.namespaceURI() == tagNs) { if (!subElement.firstChildElement("required").isNull()) return QXmppStreamFeatures::Required; else return QXmppStreamFeatures::Enabled; } else { return QXmppStreamFeatures::Disabled; } } void QXmppStreamFeatures::parse(const QDomElement &element) { m_bindMode = readFeature(element, "bind", ns_bind); m_sessionMode = readFeature(element, "session", ns_session); m_nonSaslAuthMode = readFeature(element, "auth", ns_authFeature); m_tlsMode = readFeature(element, "starttls", ns_tls); // parse advertised compression methods QDomElement compression = element.firstChildElement("compression"); if (compression.namespaceURI() == ns_compressFeature) { QDomElement subElement = compression.firstChildElement("method"); while(!subElement.isNull()) { m_compressionMethods << subElement.text(); subElement = subElement.nextSiblingElement("method"); } } // parse advertised SASL Authentication mechanisms QDomElement mechs = element.firstChildElement("mechanisms"); if (mechs.namespaceURI() == ns_sasl) { QDomElement subElement = mechs.firstChildElement("mechanism"); while(!subElement.isNull()) { m_authMechanisms << subElement.text(); subElement = subElement.nextSiblingElement("mechanism"); } } } static void writeFeature(QXmlStreamWriter *writer, const char *tagName, const char *tagNs, QXmppStreamFeatures::Mode mode) { if (mode != QXmppStreamFeatures::Disabled) { writer->writeStartElement(tagName); writer->writeAttribute("xmlns", tagNs); if (mode == QXmppStreamFeatures::Required) writer->writeEmptyElement("required"); writer->writeEndElement(); } } void QXmppStreamFeatures::toXml(QXmlStreamWriter *writer) const { writer->writeStartElement("stream:features"); writeFeature(writer, "bind", ns_bind, m_bindMode); writeFeature(writer, "session", ns_session, m_sessionMode); writeFeature(writer, "auth", ns_authFeature, m_nonSaslAuthMode); writeFeature(writer, "starttls", ns_tls, m_tlsMode); if (!m_compressionMethods.isEmpty()) { writer->writeStartElement("compression"); writer->writeAttribute("xmlns", ns_compressFeature); foreach (const QString &method, m_compressionMethods) writer->writeTextElement("method", method); writer->writeEndElement(); } if (!m_authMechanisms.isEmpty()) { writer->writeStartElement("mechanisms"); writer->writeAttribute("xmlns", ns_sasl); foreach (const QString &mechanism, m_authMechanisms) writer->writeTextElement("mechanism", mechanism); writer->writeEndElement(); } writer->writeEndElement(); } /// \endcond qxmpp-0.7.6/src/base/QXmppPingIq.h0000644000175000007640000000172112116723562016646 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPPINGIQ_H #define QXMPPPINGIQ_H #include "QXmppIq.h" class QXMPP_EXPORT QXmppPingIq : public QXmppIq { public: QXmppPingIq(); void toXmlElementFromChild(QXmlStreamWriter *writer) const; static bool isPingIq(const QDomElement &element); }; #endif qxmpp-0.7.6/src/base/QXmppRpcIq.h0000644000175000007640000000605012116723562016475 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Ian Reinhart Geiser * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPRPCIQ_H #define QXMPPRPCIQ_H #include "QXmppIq.h" #include class QXMPP_EXPORT QXmppRpcMarshaller { public: static void marshall( QXmlStreamWriter *writer, const QVariant &value); static QVariant demarshall(const QDomElement &elem, QStringList &errors); }; /// \brief The QXmppRpcResponseIq class represents an IQ used to carry /// an RPC response as specified by XEP-0009: Jabber-RPC. /// /// \ingroup Stanzas class QXMPP_EXPORT QXmppRpcResponseIq : public QXmppIq { public: QXmppRpcResponseIq(); int faultCode() const; void setFaultCode(int faultCode); QString faultString() const; void setFaultString(const QString &faultString); QVariantList values() const; void setValues(const QVariantList &values); /// \cond static bool isRpcResponseIq(const QDomElement &element); /// \endcond protected: /// \cond void parseElementFromChild(const QDomElement &element); void toXmlElementFromChild(QXmlStreamWriter *writer) const; /// \endcond private: int m_faultCode; QString m_faultString; QVariantList m_values; }; /// \brief The QXmppRpcInvokeIq class represents an IQ used to carry /// an RPC invocation as specified by XEP-0009: Jabber-RPC. /// /// \ingroup Stanzas class QXMPP_EXPORT QXmppRpcInvokeIq : public QXmppIq { public: QXmppRpcInvokeIq(); QString method() const; void setMethod( const QString &method ); QVariantList arguments() const; void setArguments(const QVariantList &arguments); /// \cond static bool isRpcInvokeIq(const QDomElement &element); /// \endcond protected: /// \cond void parseElementFromChild(const QDomElement &element); void toXmlElementFromChild(QXmlStreamWriter *writer) const; /// \endcond private: QVariantList m_arguments; QString m_method; friend class QXmppRpcErrorIq; }; class QXMPP_EXPORT QXmppRpcErrorIq : public QXmppIq { public: QXmppRpcErrorIq(); QXmppRpcInvokeIq query() const; void setQuery(const QXmppRpcInvokeIq &query); /// \cond static bool isRpcErrorIq(const QDomElement &element); /// \endcond protected: /// \cond void parseElementFromChild(const QDomElement &element); void toXmlElementFromChild(QXmlStreamWriter *writer) const; /// \endcond private: QXmppRpcInvokeIq m_query; }; #endif // QXMPPRPCIQ_H qxmpp-0.7.6/src/base/QXmppDataForm.cpp0000644000175000007640000003721412116723562017515 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include #include #include #include "QXmppConstants.h" #include "QXmppDataForm.h" #include "QXmppUtils.h" struct field_type { QXmppDataForm::Field::Type type; const char *str; }; static field_type field_types[] = { {QXmppDataForm::Field::BooleanField, "boolean"}, {QXmppDataForm::Field::FixedField, "fixed"}, {QXmppDataForm::Field::HiddenField, "hidden"}, {QXmppDataForm::Field::JidMultiField, "jid-multi"}, {QXmppDataForm::Field::JidSingleField, "jid-single"}, {QXmppDataForm::Field::ListMultiField, "list-multi"}, {QXmppDataForm::Field::ListSingleField, "list-single"}, {QXmppDataForm::Field::TextMultiField, "text-multi"}, {QXmppDataForm::Field::TextPrivateField, "text-private"}, {QXmppDataForm::Field::TextSingleField, "text-single"}, {static_cast(-1), NULL}, }; class QXmppDataFormMediaPrivate : public QSharedData { public: QSize size; QList > uris; }; /// Constructs an empty QXmppDataForm::Media. QXmppDataForm::Media::Media() : d(new QXmppDataFormMediaPrivate) { } /// Constructs a copy of \a other. QXmppDataForm::Media::Media(const QXmppDataForm::Media &other) : d(other.d) { } /// Destroys the media. QXmppDataForm::Media::~Media() { } /// Assigns \a other to this media. QXmppDataForm::Media& QXmppDataForm::Media::operator=(const QXmppDataForm::Media &other) { d = other.d; return *this; } /// Returns media's height. int QXmppDataForm::Media::height() const { return d->size.height(); } /// Sets media's \a height. void QXmppDataForm::Media::setHeight(int height) { d->size.setHeight(height); } /// Returns media's width. int QXmppDataForm::Media::width() const { return d->size.width(); } /// Sets media's \a width. void QXmppDataForm::Media::setWidth(int width) { d->size.setWidth(width); } /// Returns media's uris. QList< QPair< QString, QString > > QXmppDataForm::Media::uris() const { return d->uris; } /// Sets media's \a uris. void QXmppDataForm::Media::setUris(const QList< QPair< QString, QString > > &uris) { d->uris = uris; } /// Returns true if no media tag present. bool QXmppDataForm::Media::isNull() const { return d->uris.empty(); } class QXmppDataFormFieldPrivate : public QSharedData { public: QXmppDataFormFieldPrivate(); QString description; QString key; QString label; QXmppDataForm::Media media; QList > options; bool required; QXmppDataForm::Field::Type type; QVariant value; }; QXmppDataFormFieldPrivate::QXmppDataFormFieldPrivate() : required(false) , type(QXmppDataForm::Field::TextSingleField) { } /// Constructs a QXmppDataForm::Field of the specified \a type. QXmppDataForm::Field::Field(QXmppDataForm::Field::Type type) : d(new QXmppDataFormFieldPrivate) { d->type = type; } /// Constructs a copy of \a other. QXmppDataForm::Field::Field(const QXmppDataForm::Field &other) : d(other.d) { } /// Destroys the form field. QXmppDataForm::Field::~Field() { } /// Assigns \a other to this field. QXmppDataForm::Field& QXmppDataForm::Field::operator=(const QXmppDataForm::Field &other) { d = other.d; return *this; } /// Returns the field's description. QString QXmppDataForm::Field::description() const { return d->description; } /// Sets the field's description. /// /// \param description void QXmppDataForm::Field::setDescription(const QString &description) { d->description = description; } /// Returns the field's key. QString QXmppDataForm::Field::key() const { return d->key; } /// Sets the field's key. /// /// \param key void QXmppDataForm::Field::setKey(const QString &key) { d->key = key; } /// Returns the field's label. QString QXmppDataForm::Field::label() const { return d->label; } /// Sets the field's label. /// /// \param label void QXmppDataForm::Field::setLabel(const QString &label) { d->label = label; } /// Returns the field's media. QXmppDataForm::Media QXmppDataForm::Field::media() const { return d->media; } /// Sets the field's \a media. void QXmppDataForm::Field::setMedia(const QXmppDataForm::Media &media) { d->media = media; } /// Returns the field's options. QList > QXmppDataForm::Field::options() const { return d->options; } /// Sets the field's options. /// /// \param options void QXmppDataForm::Field::setOptions(const QList > &options) { d->options = options; } /// Returns true if the field is required, false otherwise. bool QXmppDataForm::Field::isRequired() const { return d->required; } /// Set to true if the field is required, false otherwise. /// /// \param required void QXmppDataForm::Field::setRequired(bool required) { d->required = required; } /// Returns the field's type. QXmppDataForm::Field::Type QXmppDataForm::Field::type() const { return d->type; } /// Sets the field's type. /// /// \param type void QXmppDataForm::Field::setType(QXmppDataForm::Field::Type type) { d->type = type; } /// Returns the field's value. QVariant QXmppDataForm::Field::value() const { return d->value; } /// Sets the field's value. /// /// \param value void QXmppDataForm::Field::setValue(const QVariant &value) { d->value = value; } class QXmppDataFormPrivate : public QSharedData { public: QXmppDataFormPrivate(); QString instructions; QList fields; QString title; QXmppDataForm::Type type; }; QXmppDataFormPrivate::QXmppDataFormPrivate() : type(QXmppDataForm::None) { } /// Constructs a QXmppDataForm of the specified \a type. QXmppDataForm::QXmppDataForm(QXmppDataForm::Type type) : d(new QXmppDataFormPrivate) { d->type = type; } /// Constructs a copy of \a other. QXmppDataForm::QXmppDataForm(const QXmppDataForm &other) : d(other.d) { } /// Destroys the form. QXmppDataForm::~QXmppDataForm() { } /// Assigns \a other to this form. QXmppDataForm& QXmppDataForm::operator=(const QXmppDataForm &other) { d = other.d; return *this; } /// Returns the form's fields. QList QXmppDataForm::fields() const { return d->fields; } /// Returns the form's fields by reference. QList &QXmppDataForm::fields() { return d->fields; } /// Sets the form's fields. /// /// \param fields void QXmppDataForm::setFields(const QList &fields) { d->fields = fields; } /// Returns the form's instructions. QString QXmppDataForm::instructions() const { return d->instructions; } /// Sets the form's instructions. /// /// \param instructions void QXmppDataForm::setInstructions(const QString &instructions) { d->instructions = instructions; } /// Returns the form's title. QString QXmppDataForm::title() const { return d->title; } /// Sets the form's title. /// /// \param title void QXmppDataForm::setTitle(const QString &title) { d->title = title; } /// Returns the form's type. QXmppDataForm::Type QXmppDataForm::type() const { return d->type; } /// Sets the form's type. /// /// \param type void QXmppDataForm::setType(QXmppDataForm::Type type) { d->type = type; } /// Returns true if the form has an unknown type. bool QXmppDataForm::isNull() const { return d->type == QXmppDataForm::None; } /// \cond void QXmppDataForm::parse(const QDomElement &element) { if (element.isNull()) return; /* form type */ const QString typeStr = element.attribute("type"); if (typeStr == "form") d->type = QXmppDataForm::Form; else if (typeStr == "submit") d->type = QXmppDataForm::Submit; else if (typeStr == "cancel") d->type = QXmppDataForm::Cancel; else if (typeStr == "result") d->type = QXmppDataForm::Result; else { qWarning() << "Unknown form type" << typeStr; return; } /* form properties */ d->title = element.firstChildElement("title").text(); d->instructions = element.firstChildElement("instructions").text(); QDomElement fieldElement = element.firstChildElement("field"); while (!fieldElement.isNull()) { QXmppDataForm::Field field; /* field type */ QXmppDataForm::Field::Type type = QXmppDataForm::Field::TextSingleField; const QString typeStr = fieldElement.attribute("type"); struct field_type *ptr; for (ptr = field_types; ptr->str; ptr++) { if (typeStr == ptr->str) { type = ptr->type; break; } } field.setType(type); /* field attributes */ field.setLabel(fieldElement.attribute("label")); field.setKey(fieldElement.attribute("var")); /* field value(s) */ if (type == QXmppDataForm::Field::BooleanField) { const QString valueStr = fieldElement.firstChildElement("value").text(); field.setValue(valueStr == "1" || valueStr == "true"); } else if (type == QXmppDataForm::Field::ListMultiField || type == QXmppDataForm::Field::JidMultiField || type == QXmppDataForm::Field::TextMultiField) { QStringList values; QDomElement valueElement = fieldElement.firstChildElement("value"); while (!valueElement.isNull()) { values.append(valueElement.text()); valueElement = valueElement.nextSiblingElement("value"); } field.setValue(values); } else { field.setValue(fieldElement.firstChildElement("value").text()); } /* field media */ QDomElement mediaElement = fieldElement.firstChildElement("media"); if (!mediaElement.isNull()) { Media media; media.setHeight(mediaElement.attribute("height", "-1").toInt()); media.setWidth(mediaElement.attribute("width", "-1").toInt()); QList > uris; QDomElement uriElement = mediaElement.firstChildElement("uri"); while (!uriElement.isNull()) { uris.append(QPair(uriElement.attribute("type"), uriElement.text())); uriElement = uriElement.nextSiblingElement("uri"); } media.setUris(uris); field.setMedia(media); } /* field options */ if (type == QXmppDataForm::Field::ListMultiField || type == QXmppDataForm::Field::ListSingleField) { QList > options; QDomElement optionElement = fieldElement.firstChildElement("option"); while (!optionElement.isNull()) { options.append(QPair(optionElement.attribute("label"), optionElement.firstChildElement("value").text())); optionElement = optionElement.nextSiblingElement("option"); } field.setOptions(options); } /* other properties */ field.setDescription(fieldElement.firstChildElement("description").text()); field.setRequired(!fieldElement.firstChildElement("required").isNull()); d->fields.append(field); fieldElement = fieldElement.nextSiblingElement("field"); } } void QXmppDataForm::toXml(QXmlStreamWriter *writer) const { if (isNull()) return; writer->writeStartElement("x"); writer->writeAttribute("xmlns", ns_data); /* form type */ QString typeStr; if (d->type == QXmppDataForm::Form) typeStr = "form"; else if (d->type == QXmppDataForm::Submit) typeStr = "submit"; else if (d->type == QXmppDataForm::Cancel) typeStr = "cancel"; else if (d->type == QXmppDataForm::Result) typeStr = "result"; writer->writeAttribute("type", typeStr); /* form properties */ if (!d->title.isEmpty()) writer->writeTextElement("title", d->title); if (!d->instructions.isEmpty()) writer->writeTextElement("instructions", d->instructions); foreach (const QXmppDataForm::Field &field, d->fields) { writer->writeStartElement("field"); /* field type */ const QXmppDataForm::Field::Type type = field.type(); QString typeStr; struct field_type *ptr; for (ptr = field_types; ptr->str; ptr++) { if (type == ptr->type) { typeStr = ptr->str; break; } } writer->writeAttribute("type", typeStr); /* field attributes */ helperToXmlAddAttribute(writer, "label", field.label()); helperToXmlAddAttribute(writer, "var", field.key()); /* field value(s) */ if (type == QXmppDataForm::Field::BooleanField) { helperToXmlAddTextElement(writer, "value", field.value().toBool() ? "1" : "0"); } else if (type == QXmppDataForm::Field::ListMultiField || type == QXmppDataForm::Field::JidMultiField || type == QXmppDataForm::Field::TextMultiField) { foreach (const QString &value, field.value().toStringList()) helperToXmlAddTextElement(writer, "value", value); } else if (!field.value().isNull()) { helperToXmlAddTextElement(writer, "value", field.value().toString()); } /* field media */ Media media = field.media(); if (!media.isNull()) { writer->writeStartElement("media"); helperToXmlAddAttribute(writer, "xmlns", ns_media_element); if (media.height() > 0) helperToXmlAddAttribute(writer, "height", QString::number(media.height())); if (media.width() > 0) helperToXmlAddAttribute(writer, "width", QString::number(media.width())); QPair uri; foreach(uri, media.uris()) { writer->writeStartElement("uri"); helperToXmlAddAttribute(writer, "type", uri.first); writer->writeCharacters(uri.second); writer->writeEndElement(); } writer->writeEndElement(); } /* field options */ if (type == QXmppDataForm::Field::ListMultiField || type == QXmppDataForm::Field::ListSingleField) { QPair option; foreach (option, field.options()) { writer->writeStartElement("option"); helperToXmlAddAttribute(writer, "label", option.first); helperToXmlAddTextElement(writer, "value", option.second); writer->writeEndElement(); } } /* other properties */ if (!field.description().isEmpty()) helperToXmlAddTextElement(writer, "description", field.description()); if (field.isRequired()) helperToXmlAddTextElement(writer, "required", ""); writer->writeEndElement(); } writer->writeEndElement(); } /// \endcond qxmpp-0.7.6/src/base/QXmppEntityTimeIq.h0000644000175000007640000000244212116723562020045 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPENTITYTIMEIQ_H #define QXMPPENTITYTIMEIQ_H #include #include "QXmppIq.h" /// \ingroup Stanzas class QXMPP_EXPORT QXmppEntityTimeIq : public QXmppIq { public: int tzo() const; void setTzo(int tzo); QDateTime utc() const; void setUtc(const QDateTime &utc); static bool isEntityTimeIq(const QDomElement &element); protected: /// \cond void parseElementFromChild(const QDomElement &element); void toXmlElementFromChild(QXmlStreamWriter *writer) const; /// \endcond private: int m_tzo; QDateTime m_utc; }; #endif //QXMPPENTITYTIMEIQ_H qxmpp-0.7.6/src/base/QXmppRpcIq.cpp0000644000175000007640000003040512116723562017031 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Ian Reinhart Geiser * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include #include #include #include #include "QXmppConstants.h" #include "QXmppRpcIq.h" #include "QXmppUtils.h" void QXmppRpcMarshaller::marshall(QXmlStreamWriter *writer, const QVariant &value) { writer->writeStartElement("value"); switch( value.type() ) { case QVariant::Int: case QVariant::UInt: case QVariant::LongLong: case QVariant::ULongLong: writer->writeTextElement("i4", value.toString()); break; case QVariant::Double: writer->writeTextElement("double", value.toString()); break; case QVariant::Bool: writer->writeTextElement("boolean", value.toBool() ? "1" : "0"); break; case QVariant::Date: writer->writeTextElement("dateTime.iso8601", value.toDate().toString( Qt::ISODate ) ); break; case QVariant::DateTime: writer->writeTextElement("dateTime.iso8601", value.toDateTime().toString( Qt::ISODate ) ); break; case QVariant::Time: writer->writeTextElement("dateTime.iso8601", value.toTime().toString( Qt::ISODate ) ); break; case QVariant::StringList: case QVariant::List: { writer->writeStartElement("array"); writer->writeStartElement("data"); foreach(const QVariant &item, value.toList()) marshall(writer, item); writer->writeEndElement(); writer->writeEndElement(); break; } case QVariant::Map: { writer->writeStartElement("struct"); QMap map = value.toMap(); QMap::ConstIterator index = map.begin(); while( index != map.end() ) { writer->writeStartElement("member"); writer->writeTextElement("name", index.key()); marshall( writer, *index ); writer->writeEndElement(); ++index; } writer->writeEndElement(); break; } case QVariant::ByteArray: { writer->writeTextElement("base64", value.toByteArray().toBase64() ); break; } default: { if (value.isNull()) writer->writeEmptyElement("nil"); else if( value.canConvert(QVariant::String) ) { writer->writeTextElement("string", value.toString() ); } break; } } writer->writeEndElement(); } QVariant QXmppRpcMarshaller::demarshall(const QDomElement &elem, QStringList &errors) { if ( elem.tagName().toLower() != "value" ) { errors << "Bad param value"; return QVariant(); } if ( !elem.firstChild().isElement() ) { return QVariant( elem.text() ); } const QDomElement typeData = elem.firstChild().toElement(); const QString typeName = typeData.tagName().toLower(); if (typeName == "nil") { return QVariant(); } if ( typeName == "string" ) { return QVariant( typeData.text() ); } else if (typeName == "int" || typeName == "i4" ) { bool ok = false; QVariant val( typeData.text().toInt( &ok ) ); if (ok) return val; errors << "I was looking for an integer but data was courupt"; return QVariant(); } else if( typeName == "double" ) { bool ok = false; QVariant val( typeData.text().toDouble( &ok ) ); if (ok) return val; errors << "I was looking for an double but data was corrupt"; } else if( typeName == "boolean" ) return QVariant( typeData.text() == "1" || typeData.text().toLower() == "true" ); else if( typeName == "datetime" || typeName == "datetime.iso8601" ) return QVariant( QDateTime::fromString( typeData.text(), Qt::ISODate ) ); else if( typeName == "array" ) { QVariantList arr; QDomElement valueNode = typeData.firstChildElement("data").firstChildElement(); while (!valueNode.isNull() && errors.isEmpty()) { arr.append(demarshall(valueNode, errors)); valueNode = valueNode.nextSiblingElement(); } return QVariant( arr ); } else if( typeName == "struct" ) { QMap stct; QDomNode valueNode = typeData.firstChild(); while(!valueNode.isNull() && errors.isEmpty()) { const QDomElement memberNode = valueNode.toElement().elementsByTagName("name").item(0).toElement(); const QDomElement dataNode = valueNode.toElement().elementsByTagName("value").item(0).toElement(); stct[ memberNode.text() ] = demarshall(dataNode, errors); valueNode = valueNode.nextSibling(); } return QVariant(stct); } else if( typeName == "base64" ) { QVariant returnVariant; QByteArray dest; QByteArray src = typeData.text().toLatin1(); return QVariant(QByteArray::fromBase64(src)); } errors << QString( "Cannot handle type %1").arg(typeName); return QVariant(); } QXmppRpcErrorIq::QXmppRpcErrorIq() : QXmppIq( QXmppIq::Error ) { } QXmppRpcInvokeIq QXmppRpcErrorIq::query() const { return m_query; } void QXmppRpcErrorIq::setQuery(const QXmppRpcInvokeIq &query) { m_query = query; } /// \cond bool QXmppRpcErrorIq::isRpcErrorIq(const QDomElement &element) { QString type = element.attribute("type"); QDomElement errorElement = element.firstChildElement("error"); QDomElement queryElement = element.firstChildElement("query"); return (type == "error") && !errorElement.isNull() && queryElement.namespaceURI() == ns_rpc; } void QXmppRpcErrorIq::parseElementFromChild(const QDomElement &element) { m_query.parseElementFromChild(element); } void QXmppRpcErrorIq::toXmlElementFromChild(QXmlStreamWriter *writer) const { m_query.toXmlElementFromChild(writer); } /// \endcond QXmppRpcResponseIq::QXmppRpcResponseIq() : QXmppIq(QXmppIq::Result), m_faultCode(0) { } /// Returns the fault code. /// int QXmppRpcResponseIq::faultCode() const { return m_faultCode; } /// Sets the fault code. /// /// \param faultCode void QXmppRpcResponseIq::setFaultCode(int faultCode) { m_faultCode = faultCode; } /// Returns the fault string. /// QString QXmppRpcResponseIq::faultString() const { return m_faultString; } /// Sets the fault string. /// /// \param faultString void QXmppRpcResponseIq::setFaultString(const QString& faultString) { m_faultString = faultString; } /// Returns the response values. /// QVariantList QXmppRpcResponseIq::values() const { return m_values; } /// Sets the response values. /// /// \param values void QXmppRpcResponseIq::setValues(const QVariantList &values) { m_values = values; } /// \cond bool QXmppRpcResponseIq::isRpcResponseIq(const QDomElement &element) { QString type = element.attribute("type"); QDomElement dataElement = element.firstChildElement("query"); return dataElement.namespaceURI() == ns_rpc && type == "result"; } void QXmppRpcResponseIq::parseElementFromChild(const QDomElement &element) { QDomElement queryElement = element.firstChildElement("query"); QDomElement methodElement = queryElement.firstChildElement("methodResponse"); const QDomElement contents = methodElement.firstChildElement(); if( contents.tagName().toLower() == "params") { QDomNode param = contents.firstChildElement("param"); while (!param.isNull()) { QStringList errors; const QVariant value = QXmppRpcMarshaller::demarshall(param.firstChildElement("value"), errors); if (!errors.isEmpty()) break; m_values << value; param = param.nextSiblingElement("param"); } } else if( contents.tagName().toLower() == "fault") { QStringList errors; const QDomElement errElement = contents.firstChildElement("value"); const QVariant error = QXmppRpcMarshaller::demarshall(errElement, errors); if (!errors.isEmpty()) return; m_faultCode = error.toMap()["faultCode"].toInt(); m_faultString = error.toMap()["faultString"].toString(); } } void QXmppRpcResponseIq::toXmlElementFromChild(QXmlStreamWriter *writer) const { writer->writeStartElement("query"); writer->writeAttribute("xmlns", ns_rpc); writer->writeStartElement("methodResponse"); if (m_faultCode) { writer->writeStartElement("fault"); QMap fault; fault["faultCode"] = m_faultCode; fault["faultString"] = m_faultString; QXmppRpcMarshaller::marshall(writer, fault); writer->writeEndElement(); } else if (!m_values.isEmpty()) { writer->writeStartElement("params"); foreach (const QVariant &arg, m_values) { writer->writeStartElement("param"); QXmppRpcMarshaller::marshall(writer, arg); writer->writeEndElement(); } writer->writeEndElement(); } writer->writeEndElement(); writer->writeEndElement(); } /// \endcond QXmppRpcInvokeIq::QXmppRpcInvokeIq() : QXmppIq(QXmppIq::Set) { } /// Returns the method arguments. /// QVariantList QXmppRpcInvokeIq::arguments() const { return m_arguments; } /// Sets the method arguments. /// /// \param arguments void QXmppRpcInvokeIq::setArguments(const QVariantList &arguments) { m_arguments = arguments; } /// Returns the method name. /// QString QXmppRpcInvokeIq::method() const { return m_method; } /// Sets the method name. /// /// \param method void QXmppRpcInvokeIq::setMethod(const QString &method) { m_method = method; } /// \cond bool QXmppRpcInvokeIq::isRpcInvokeIq(const QDomElement &element) { QString type = element.attribute("type"); QDomElement dataElement = element.firstChildElement("query"); return dataElement.namespaceURI() == ns_rpc && type == "set"; } void QXmppRpcInvokeIq::parseElementFromChild(const QDomElement &element) { QDomElement queryElement = element.firstChildElement("query"); QDomElement methodElement = queryElement.firstChildElement("methodCall"); m_method = methodElement.firstChildElement("methodName").text(); const QDomElement methodParams = methodElement.firstChildElement("params"); m_arguments.clear(); if( !methodParams.isNull() ) { QDomNode param = methodParams.firstChildElement("param"); while (!param.isNull()) { QStringList errors; QVariant arg = QXmppRpcMarshaller::demarshall(param.firstChildElement("value"), errors); if (!errors.isEmpty()) break; m_arguments << arg; param = param.nextSiblingElement("param"); } } } void QXmppRpcInvokeIq::toXmlElementFromChild(QXmlStreamWriter *writer) const { writer->writeStartElement("query"); writer->writeAttribute("xmlns", ns_rpc); writer->writeStartElement("methodCall"); writer->writeTextElement("methodName", m_method); if (!m_arguments.isEmpty()) { writer->writeStartElement("params"); foreach(const QVariant &arg, m_arguments) { writer->writeStartElement("param"); QXmppRpcMarshaller::marshall(writer, arg); writer->writeEndElement(); } writer->writeEndElement(); } writer->writeEndElement(); writer->writeEndElement(); } /// \endcond qxmpp-0.7.6/src/base/QXmppStream.h0000644000175000007640000000422512116723562016714 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Manjeet Dahiya * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPSTREAM_H #define QXMPPSTREAM_H #include #include #include "QXmppLogger.h" class QDomElement; class QSslSocket; class QXmppStanza; class QXmppStreamPrivate; /// \brief The QXmppStream class is the base class for all XMPP streams. /// class QXMPP_EXPORT QXmppStream : public QXmppLoggable { Q_OBJECT public: QXmppStream(QObject *parent); ~QXmppStream(); virtual bool isConnected() const; bool sendPacket(const QXmppStanza&); signals: /// This signal is emitted when the stream is connected. void connected(); /// This signal is emitted when the stream is disconnected. void disconnected(); protected: // Access to underlying socket QSslSocket *socket() const; void setSocket(QSslSocket *socket); // Overridable methods virtual void handleStart(); /// Handles an incoming XMPP stanza. /// /// \param element virtual void handleStanza(const QDomElement &element) = 0; /// Handles an incoming XMPP stream start. /// /// \param element virtual void handleStream(const QDomElement &element) = 0; public slots: virtual void disconnectFromHost(); virtual bool sendData(const QByteArray&); private slots: void _q_socketConnected(); void _q_socketEncrypted(); void _q_socketError(QAbstractSocket::SocketError error); void _q_socketReadyRead(); private: QXmppStreamPrivate * const d; }; #endif // QXMPPSTREAM_H qxmpp-0.7.6/src/base/QXmppBookmarkSet.h0000644000175000007640000000456612116723562017712 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPBOOKMARKSET_H #define QXMPPBOOKMARKSET_H #include #include #include "QXmppStanza.h" /// \brief The QXmppBookmarkConference class represents a bookmark for a conference room, /// as defined by XEP-0048: Bookmarks. /// class QXMPP_EXPORT QXmppBookmarkConference { public: QXmppBookmarkConference(); bool autoJoin() const; void setAutoJoin(bool autoJoin); QString jid() const; void setJid(const QString &jid); QString name() const; void setName(const QString &name); QString nickName() const; void setNickName(const QString &nickName); private: bool m_autoJoin; QString m_jid; QString m_name; QString m_nickName; }; /// \brief The QXmppBookmarkUrl class represents a bookmark for a web page, /// as defined by XEP-0048: Bookmarks. /// class QXMPP_EXPORT QXmppBookmarkUrl { public: QString name() const; void setName(const QString &name); QUrl url() const; void setUrl(const QUrl &url); private: QString m_name; QUrl m_url; }; /// \brief The QXmppbookmarkSets class represents a set of bookmarks, as defined /// by XEP-0048: Bookmarks. /// class QXMPP_EXPORT QXmppBookmarkSet { public: QList conferences() const; void setConferences(const QList &conferences); QList urls() const; void setUrls(const QList &urls); /// \cond static bool isBookmarkSet(const QDomElement &element); void parse(const QDomElement &element); void toXml(QXmlStreamWriter *writer) const; /// \endcond private: QList m_conferences; QList m_urls; }; #endif qxmpp-0.7.6/src/base/QXmppSasl.cpp0000644000175000007640000005174212116723562016724 0ustar sharkyjerryweb/* * Copyright (C) 2008-2013 The QXmpp developers * * Authors: * Manjeet Dahiya * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include #include #include #if QT_VERSION >= 0x050000 #include #else #include #endif #include "QXmppSasl_p.h" #include "QXmppUtils.h" const char *ns_xmpp_sasl = "urn:ietf:params:xml:ns:xmpp-sasl"; static QByteArray forcedNonce; // Calculate digest response for use with XMPP/SASL. static QByteArray calculateDigest(const QByteArray &method, const QByteArray &digestUri, const QByteArray &secret, const QByteArray &nonce, const QByteArray &cnonce, const QByteArray &nc) { const QByteArray A1 = secret + ':' + nonce + ':' + cnonce; const QByteArray A2 = method + ':' + digestUri; QByteArray HA1 = QCryptographicHash::hash(A1, QCryptographicHash::Md5).toHex(); QByteArray HA2 = QCryptographicHash::hash(A2, QCryptographicHash::Md5).toHex(); const QByteArray KD = HA1 + ':' + nonce + ':' + nc + ':' + cnonce + ":auth:" + HA2; return QCryptographicHash::hash(KD, QCryptographicHash::Md5).toHex(); } static QByteArray generateNonce() { if (!forcedNonce.isEmpty()) return forcedNonce; QByteArray nonce = QXmppUtils::generateRandomBytes(32); // The random data can the '=' char is not valid as it is a delimiter, // so to be safe, base64 the nonce return nonce.toBase64(); } QXmppSaslAuth::QXmppSaslAuth(const QString &mechanism, const QByteArray &value) : m_mechanism(mechanism) , m_value(value) { } QString QXmppSaslAuth::mechanism() const { return m_mechanism; } void QXmppSaslAuth::setMechanism(const QString &mechanism) { m_mechanism = mechanism; } QByteArray QXmppSaslAuth::value() const { return m_value; } void QXmppSaslAuth::setValue(const QByteArray &value) { m_value = value; } void QXmppSaslAuth::parse(const QDomElement &element) { m_mechanism = element.attribute("mechanism"); m_value = QByteArray::fromBase64(element.text().toLatin1()); } void QXmppSaslAuth::toXml(QXmlStreamWriter *writer) const { writer->writeStartElement("auth"); writer->writeAttribute("xmlns", ns_xmpp_sasl); writer->writeAttribute("mechanism", m_mechanism); if (!m_value.isEmpty()) writer->writeCharacters(m_value.toBase64()); writer->writeEndElement(); } QXmppSaslChallenge::QXmppSaslChallenge(const QByteArray &value) : m_value(value) { } QByteArray QXmppSaslChallenge::value() const { return m_value; } void QXmppSaslChallenge::setValue(const QByteArray &value) { m_value = value; } void QXmppSaslChallenge::parse(const QDomElement &element) { m_value = QByteArray::fromBase64(element.text().toLatin1()); } void QXmppSaslChallenge::toXml(QXmlStreamWriter *writer) const { writer->writeStartElement("challenge"); writer->writeAttribute("xmlns", ns_xmpp_sasl); if (!m_value.isEmpty()) writer->writeCharacters(m_value.toBase64()); writer->writeEndElement(); } QXmppSaslFailure::QXmppSaslFailure(const QString &condition) : m_condition(condition) { } QString QXmppSaslFailure::condition() const { return m_condition; } void QXmppSaslFailure::setCondition(const QString &condition) { m_condition = condition; } void QXmppSaslFailure::parse(const QDomElement &element) { m_condition = element.firstChildElement().tagName(); } void QXmppSaslFailure::toXml(QXmlStreamWriter *writer) const { writer->writeStartElement("failure"); writer->writeAttribute("xmlns", ns_xmpp_sasl); if (!m_condition.isEmpty()) writer->writeEmptyElement(m_condition); writer->writeEndElement(); } QXmppSaslResponse::QXmppSaslResponse(const QByteArray &value) : m_value(value) { } QByteArray QXmppSaslResponse::value() const { return m_value; } void QXmppSaslResponse::setValue(const QByteArray &value) { m_value = value; } void QXmppSaslResponse::parse(const QDomElement &element) { m_value = QByteArray::fromBase64(element.text().toLatin1()); } void QXmppSaslResponse::toXml(QXmlStreamWriter *writer) const { writer->writeStartElement("response"); writer->writeAttribute("xmlns", ns_xmpp_sasl); if (!m_value.isEmpty()) writer->writeCharacters(m_value.toBase64()); writer->writeEndElement(); } QXmppSaslSuccess::QXmppSaslSuccess() { } void QXmppSaslSuccess::parse(const QDomElement &element) { Q_UNUSED(element); } void QXmppSaslSuccess::toXml(QXmlStreamWriter *writer) const { writer->writeStartElement("success"); writer->writeAttribute("xmlns", ns_xmpp_sasl); writer->writeEndElement(); } class QXmppSaslClientPrivate { public: QString host; QString serviceType; QString username; QString password; }; QXmppSaslClient::QXmppSaslClient(QObject *parent) : QXmppLoggable(parent) , d(new QXmppSaslClientPrivate) { } QXmppSaslClient::~QXmppSaslClient() { delete d; } /// Returns a list of supported mechanisms. QStringList QXmppSaslClient::availableMechanisms() { return QStringList() << "PLAIN" << "DIGEST-MD5" << "ANONYMOUS" << "X-FACEBOOK-PLATFORM" << "X-MESSENGER-OAUTH2" << "X-OAUTH2"; } /// Creates an SASL client for the given mechanism. QXmppSaslClient* QXmppSaslClient::create(const QString &mechanism, QObject *parent) { if (mechanism == "PLAIN") { return new QXmppSaslClientPlain(parent); } else if (mechanism == "DIGEST-MD5") { return new QXmppSaslClientDigestMd5(parent); } else if (mechanism == "ANONYMOUS") { return new QXmppSaslClientAnonymous(parent); } else if (mechanism == "X-FACEBOOK-PLATFORM") { return new QXmppSaslClientFacebook(parent); } else if (mechanism == "X-MESSENGER-OAUTH2") { return new QXmppSaslClientWindowsLive(parent); } else if (mechanism == "X-OAUTH2") { return new QXmppSaslClientGoogle(parent); } else { return 0; } } /// Returns the host. QString QXmppSaslClient::host() const { return d->host; } /// Sets the host. void QXmppSaslClient::setHost(const QString &host) { d->host = host; } /// Returns the service type, e.g. "xmpp". QString QXmppSaslClient::serviceType() const { return d->serviceType; } /// Sets the service type, e.g. "xmpp". void QXmppSaslClient::setServiceType(const QString &serviceType) { d->serviceType = serviceType; } /// Returns the username. QString QXmppSaslClient::username() const { return d->username; } /// Sets the username. void QXmppSaslClient::setUsername(const QString &username) { d->username = username; } /// Returns the password. QString QXmppSaslClient::password() const { return d->password; } /// Sets the password. void QXmppSaslClient::setPassword(const QString &password) { d->password = password; } QXmppSaslClientAnonymous::QXmppSaslClientAnonymous(QObject *parent) : QXmppSaslClient(parent) , m_step(0) { } QString QXmppSaslClientAnonymous::mechanism() const { return "ANONYMOUS"; } bool QXmppSaslClientAnonymous::respond(const QByteArray &challenge, QByteArray &response) { Q_UNUSED(challenge); if (m_step == 0) { response = QByteArray(); m_step++; return true; } else { warning("QXmppSaslClientAnonymous : Invalid step"); return false; } } QXmppSaslClientDigestMd5::QXmppSaslClientDigestMd5(QObject *parent) : QXmppSaslClient(parent) , m_nc("00000001") , m_step(0) { m_cnonce = generateNonce(); } QString QXmppSaslClientDigestMd5::mechanism() const { return "DIGEST-MD5"; } bool QXmppSaslClientDigestMd5::respond(const QByteArray &challenge, QByteArray &response) { Q_UNUSED(challenge); const QByteArray digestUri = QString("%1/%2").arg(serviceType(), host()).toUtf8(); if (m_step == 0) { response = QByteArray(); m_step++; return true; } else if (m_step == 1) { const QMap input = QXmppSaslDigestMd5::parseMessage(challenge); if (!input.contains("nonce")) { warning("QXmppSaslClientDigestMd5 : Invalid input on step 1"); return false; } // determine realm const QByteArray realm = input.value("realm"); // determine quality of protection const QList qops = input.value("qop", "auth").split(','); if (!qops.contains("auth")) { warning("QXmppSaslClientDigestMd5 : Invalid quality of protection"); return false; } m_nonce = input.value("nonce"); m_secret = QCryptographicHash::hash( username().toUtf8() + ":" + realm + ":" + password().toUtf8(), QCryptographicHash::Md5); // Build response QMap output; output["username"] = username().toUtf8(); if (!realm.isEmpty()) output["realm"] = realm; output["nonce"] = m_nonce; output["qop"] = "auth"; output["cnonce"] = m_cnonce; output["nc"] = m_nc; output["digest-uri"] = digestUri; output["response"] = calculateDigest("AUTHENTICATE", digestUri, m_secret, m_nonce, m_cnonce, m_nc); output["charset"] = "utf-8"; response = QXmppSaslDigestMd5::serializeMessage(output); m_step++; return true; } else if (m_step == 2) { const QMap input = QXmppSaslDigestMd5::parseMessage(challenge); // check new challenge if (input.value("rspauth") != calculateDigest(QByteArray(), digestUri, m_secret, m_nonce, m_cnonce, m_nc)) { warning("QXmppSaslClientDigestMd5 : Invalid challenge on step 2"); return false; } response = QByteArray(); m_step++; return true; } else { warning("QXmppSaslClientDigestMd5 : Invalid step"); return false; } } QXmppSaslClientFacebook::QXmppSaslClientFacebook(QObject *parent) : QXmppSaslClient(parent) , m_step(0) { } QString QXmppSaslClientFacebook::mechanism() const { return "X-FACEBOOK-PLATFORM"; } bool QXmppSaslClientFacebook::respond(const QByteArray &challenge, QByteArray &response) { if (m_step == 0) { // no initial response response = QByteArray(); m_step++; return true; } else if (m_step == 1) { // parse request #if QT_VERSION >= 0x050000 QUrlQuery requestUrl(challenge); #else QUrl requestUrl; requestUrl.setEncodedQuery(challenge); #endif if (!requestUrl.hasQueryItem("method") || !requestUrl.hasQueryItem("nonce")) { warning("QXmppSaslClientFacebook : Invalid challenge, nonce or method missing"); return false; } // build response #if QT_VERSION >= 0x050000 QUrlQuery responseUrl; #else QUrl responseUrl; #endif responseUrl.addQueryItem("access_token", password()); responseUrl.addQueryItem("api_key", username()); responseUrl.addQueryItem("call_id", 0); responseUrl.addQueryItem("method", requestUrl.queryItemValue("method")); responseUrl.addQueryItem("nonce", requestUrl.queryItemValue("nonce")); responseUrl.addQueryItem("v", "1.0"); #if QT_VERSION >= 0x050000 response = responseUrl.query().toUtf8(); #else response = responseUrl.encodedQuery(); #endif m_step++; return true; } else { warning("QXmppSaslClientFacebook : Invalid step"); return false; } } QXmppSaslClientGoogle::QXmppSaslClientGoogle(QObject *parent) : QXmppSaslClient(parent) , m_step(0) { } QString QXmppSaslClientGoogle::mechanism() const { return "X-OAUTH2"; } bool QXmppSaslClientGoogle::respond(const QByteArray &challenge, QByteArray &response) { Q_UNUSED(challenge); if (m_step == 0) { // send initial response response = QString('\0' + username() + '\0' + password()).toUtf8(); m_step++; return true; } else { warning("QXmppSaslClientGoogle : Invalid step"); return false; } } QXmppSaslClientPlain::QXmppSaslClientPlain(QObject *parent) : QXmppSaslClient(parent) , m_step(0) { } QString QXmppSaslClientPlain::mechanism() const { return "PLAIN"; } bool QXmppSaslClientPlain::respond(const QByteArray &challenge, QByteArray &response) { Q_UNUSED(challenge); if (m_step == 0) { response = QString('\0' + username() + '\0' + password()).toUtf8(); m_step++; return true; } else { warning("QXmppSaslClientPlain : Invalid step"); return false; } } QXmppSaslClientWindowsLive::QXmppSaslClientWindowsLive(QObject *parent) : QXmppSaslClient(parent) , m_step(0) { } QString QXmppSaslClientWindowsLive::mechanism() const { return "X-MESSENGER-OAUTH2"; } bool QXmppSaslClientWindowsLive::respond(const QByteArray &challenge, QByteArray &response) { Q_UNUSED(challenge); if (m_step == 0) { // send initial response response = QByteArray::fromBase64(password().toLatin1()); m_step++; return true; } else { warning("QXmppSaslClientWindowsLive : Invalid step"); return false; } } class QXmppSaslServerPrivate { public: QString username; QString password; QByteArray passwordDigest; QString realm; }; QXmppSaslServer::QXmppSaslServer(QObject *parent) : QXmppLoggable(parent) , d(new QXmppSaslServerPrivate) { } QXmppSaslServer::~QXmppSaslServer() { delete d; } /// Creates an SASL server for the given mechanism. QXmppSaslServer* QXmppSaslServer::create(const QString &mechanism, QObject *parent) { if (mechanism == "PLAIN") { return new QXmppSaslServerPlain(parent); } else if (mechanism == "DIGEST-MD5") { return new QXmppSaslServerDigestMd5(parent); } else if (mechanism == "ANONYMOUS") { return new QXmppSaslServerAnonymous(parent); } else { return 0; } } /// Returns the username. QString QXmppSaslServer::username() const { return d->username; } /// Sets the username. void QXmppSaslServer::setUsername(const QString &username) { d->username = username; } /// Returns the password. QString QXmppSaslServer::password() const { return d->password; } /// Sets the password. void QXmppSaslServer::setPassword(const QString &password) { d->password = password; } /// Returns the password digest. QByteArray QXmppSaslServer::passwordDigest() const { return d->passwordDigest; } /// Sets the password digest. void QXmppSaslServer::setPasswordDigest(const QByteArray &digest) { d->passwordDigest = digest; } /// Returns the realm. QString QXmppSaslServer::realm() const { return d->realm; } /// Sets the realm. void QXmppSaslServer::setRealm(const QString &realm) { d->realm = realm; } QXmppSaslServerAnonymous::QXmppSaslServerAnonymous(QObject *parent) : QXmppSaslServer(parent) , m_step(0) { } QString QXmppSaslServerAnonymous::mechanism() const { return "ANONYMOUS"; } QXmppSaslServer::Response QXmppSaslServerAnonymous::respond(const QByteArray &request, QByteArray &response) { Q_UNUSED(request); if (m_step == 0) { m_step++; response = QByteArray(); return Succeeded; } else { warning("QXmppSaslServerAnonymous : Invalid step"); return Failed; } } QXmppSaslServerDigestMd5::QXmppSaslServerDigestMd5(QObject *parent) : QXmppSaslServer(parent) , m_step(0) { m_nonce = generateNonce(); } QString QXmppSaslServerDigestMd5::mechanism() const { return "DIGEST-MD5"; } QXmppSaslServer::Response QXmppSaslServerDigestMd5::respond(const QByteArray &request, QByteArray &response) { if (m_step == 0) { QMap output; output["nonce"] = m_nonce; if (!realm().isEmpty()) output["realm"] = realm().toUtf8(); output["qop"] = "auth"; output["charset"] = "utf-8"; output["algorithm"] = "md5-sess"; m_step++; response = QXmppSaslDigestMd5::serializeMessage(output); return Challenge; } else if (m_step == 1) { const QMap input = QXmppSaslDigestMd5::parseMessage(request); const QByteArray realm = input.value("realm"); const QByteArray digestUri = input.value("digest-uri"); if (input.value("qop") != "auth") { warning("QXmppSaslServerDigestMd5 : Invalid quality of protection"); return Failed; } setUsername(QString::fromUtf8(input.value("username"))); if (password().isEmpty() && passwordDigest().isEmpty()) return InputNeeded; m_nc = input.value("nc"); m_cnonce = input.value("cnonce"); if (!password().isEmpty()) { m_secret = QCryptographicHash::hash( username().toUtf8() + ":" + realm + ":" + password().toUtf8(), QCryptographicHash::Md5); } else { m_secret = passwordDigest(); } if (input.value("response") != calculateDigest("AUTHENTICATE", digestUri, m_secret, m_nonce, m_cnonce, m_nc)) return Failed; QMap output; output["rspauth"] = calculateDigest(QByteArray(), digestUri, m_secret, m_nonce, m_cnonce, m_nc); m_step++; response = QXmppSaslDigestMd5::serializeMessage(output); return Challenge; } else if (m_step == 2) { m_step++; response = QByteArray(); return Succeeded; } else { warning("QXmppSaslServerDigestMd5 : Invalid step"); return Failed; } } QXmppSaslServerPlain::QXmppSaslServerPlain(QObject *parent) : QXmppSaslServer(parent) , m_step(0) { } QString QXmppSaslServerPlain::mechanism() const { return "PLAIN"; } QXmppSaslServer::Response QXmppSaslServerPlain::respond(const QByteArray &request, QByteArray &response) { if (m_step == 0) { if (request.isEmpty()) { response = QByteArray(); return Challenge; } QList auth = request.split('\0'); if (auth.size() != 3) { warning("QXmppSaslServerPlain : Invalid input"); return Failed; } setUsername(QString::fromUtf8(auth[1])); setPassword(QString::fromUtf8(auth[2])); m_step++; response = QByteArray(); return InputNeeded; } else { warning("QXmppSaslServerPlain : Invalid step"); return Failed; } } void QXmppSaslDigestMd5::setNonce(const QByteArray &nonce) { forcedNonce = nonce; } QMap QXmppSaslDigestMd5::parseMessage(const QByteArray &ba) { QMap map; int startIndex = 0; int pos = 0; while ((pos = ba.indexOf("=", startIndex)) >= 0) { // key get name and skip equals const QByteArray key = ba.mid(startIndex, pos - startIndex).trimmed(); pos++; // check whether string is quoted if (ba.at(pos) == '"') { // skip opening quote pos++; int endPos = ba.indexOf('"', pos); // skip quoted quotes while (endPos >= 0 && ba.at(endPos - 1) == '\\') endPos = ba.indexOf('"', endPos + 1); if (endPos < 0) { qWarning("Unfinished quoted string"); return map; } // unquote QByteArray value = ba.mid(pos, endPos - pos); value.replace("\\\"", "\""); value.replace("\\\\", "\\"); map[key] = value; // skip closing quote and comma startIndex = endPos + 2; } else { // non-quoted string int endPos = ba.indexOf(',', pos); if (endPos < 0) endPos = ba.size(); map[key] = ba.mid(pos, endPos - pos); // skip comma startIndex = endPos + 1; } } return map; } QByteArray QXmppSaslDigestMd5::serializeMessage(const QMap &map) { QByteArray ba; foreach (const QByteArray &key, map.keys()) { if (!ba.isEmpty()) ba.append(','); ba.append(key + "="); QByteArray value = map[key]; const char *separators = "()<>@,;:\\\"/[]?={} \t"; bool quote = false; for (const char *c = separators; *c; c++) { if (value.contains(*c)) { quote = true; break; } } if (quote) { value.replace("\\", "\\\\"); value.replace("\"", "\\\""); ba.append("\"" + value + "\""); } else ba.append(value); } return ba; } qxmpp-0.7.6/src/base/QXmppRtpChannel.h0000644000175000007640000002162112116723562017516 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPRTPCHANNEL_H #define QXMPPRTPCHANNEL_H #include #include #include "QXmppJingleIq.h" #include "QXmppLogger.h" class QXmppCodec; class QXmppJinglePayloadType; class QXmppRtpAudioChannelPrivate; class QXmppRtpVideoChannelPrivate; /// \brief The QXmppRtpPacket class represents an RTP packet. /// class QXMPP_EXPORT QXmppRtpPacket { public: bool decode(const QByteArray &ba); QByteArray encode() const; QString toString() const; /// RTP version. quint8 version; /// Marker flag. bool marker; /// Payload type. quint8 type; /// Synchronization source. quint32 ssrc; /// Contributing sources. QList csrc; /// Sequence number. quint16 sequence; /// Timestamp. quint32 stamp; /// Raw payload data. QByteArray payload; }; class QXMPP_EXPORT QXmppRtpChannel { public: QXmppRtpChannel(); /// Closes the RTP channel. virtual void close() = 0; /// Returns the mode in which the channel has been opened. virtual QIODevice::OpenMode openMode() const = 0; QList localPayloadTypes(); void setRemotePayloadTypes(const QList &remotePayloadTypes); protected: /// \cond virtual void payloadTypesChanged() = 0; QList m_incomingPayloadTypes; QList m_outgoingPayloadTypes; bool m_outgoingPayloadNumbered; /// \endcond }; /// \brief The QXmppRtpAudioChannel class represents an RTP audio channel to a remote party. /// /// It acts as a QIODevice so that you can read / write audio samples, for /// instance using a QAudioOutput and a QAudioInput. /// /// \note THIS API IS NOT FINALIZED YET class QXMPP_EXPORT QXmppRtpAudioChannel : public QIODevice, public QXmppRtpChannel { Q_OBJECT Q_ENUMS(Tone) public: /// This enum is used to describe a DTMF tone. enum Tone { Tone_0 = 0, ///< Tone for the 0 key. Tone_1, ///< Tone for the 1 key. Tone_2, ///< Tone for the 2 key. Tone_3, ///< Tone for the 3 key. Tone_4, ///< Tone for the 4 key. Tone_5, ///< Tone for the 5 key. Tone_6, ///< Tone for the 6 key. Tone_7, ///< Tone for the 7 key. Tone_8, ///< Tone for the 8 key. Tone_9, ///< Tone for the 9 key. Tone_Star, ///< Tone for the * key. Tone_Pound, ///< Tone for the # key. Tone_A, ///< Tone for the A key. Tone_B, ///< Tone for the B key. Tone_C, ///< Tone for the C key. Tone_D ///< Tone for the D key. }; QXmppRtpAudioChannel(QObject *parent = 0); ~QXmppRtpAudioChannel(); qint64 bytesAvailable() const; void close(); bool isSequential() const; QIODevice::OpenMode openMode() const; QXmppJinglePayloadType payloadType() const; qint64 pos() const; bool seek(qint64 pos); signals: /// \brief This signal is emitted when a datagram needs to be sent. void sendDatagram(const QByteArray &ba); /// \brief This signal is emitted to send logging messages. void logMessage(QXmppLogger::MessageType type, const QString &msg); public slots: void datagramReceived(const QByteArray &ba); void startTone(QXmppRtpAudioChannel::Tone tone); void stopTone(QXmppRtpAudioChannel::Tone tone); protected: /// \cond void debug(const QString &message) { emit logMessage(QXmppLogger::DebugMessage, qxmpp_loggable_trace(message)); } void warning(const QString &message) { emit logMessage(QXmppLogger::WarningMessage, qxmpp_loggable_trace(message)); } void logReceived(const QString &message) { emit logMessage(QXmppLogger::ReceivedMessage, qxmpp_loggable_trace(message)); } void logSent(const QString &message) { emit logMessage(QXmppLogger::SentMessage, qxmpp_loggable_trace(message)); } void payloadTypesChanged(); qint64 readData(char * data, qint64 maxSize); qint64 writeData(const char * data, qint64 maxSize); /// \endcond private slots: void emitSignals(); void writeDatagram(); private: friend class QXmppRtpAudioChannelPrivate; QXmppRtpAudioChannelPrivate * d; }; /// \brief The QXmppVideoFrame class provides a representation of a frame of video data. /// /// \note THIS API IS NOT FINALIZED YET class QXMPP_EXPORT QXmppVideoFrame { public: /// This enum describes a pixel format. enum PixelFormat { Format_Invalid = 0, ///< The frame is invalid. Format_RGB32 = 3, ///< The frame stored using a 32-bit RGB format (0xffRRGGBB). Format_RGB24 = 4, ///< The frame is stored using a 24-bit RGB format (8-8-8). Format_YUV420P = 18, ///< The frame is stored using an 8-bit per component planar ///< YUV format with the U and V planes horizontally and ///< vertically sub-sampled, i.e. the height and width of the ///< U and V planes are half that of the Y plane. Format_UYVY = 20, ///< The frame is stored using an 8-bit per component packed ///< YUV format with the U and V planes horizontally ///< sub-sampled (U-Y-V-Y), i.e. two horizontally adjacent ///< pixels are stored as a 32-bit macropixel which has a Y ///< value for each pixel and common U and V values. Format_YUYV = 21, ///< The frame is stored using an 8-bit per component packed ///< YUV format with the U and V planes horizontally ///< sub-sampled (Y-U-Y-V), i.e. two horizontally adjacent ///< pixels are stored as a 32-bit macropixel which has a Y ///< value for each pixel and common U and V values. }; QXmppVideoFrame(); QXmppVideoFrame(int bytes, const QSize &size, int bytesPerLine, PixelFormat format); uchar *bits(); const uchar *bits() const; int bytesPerLine() const; int height() const; bool isValid() const; int mappedBytes() const; PixelFormat pixelFormat() const; QSize size() const; int width() const; private: int m_bytesPerLine; QByteArray m_data; int m_height; int m_mappedBytes; PixelFormat m_pixelFormat; int m_width; }; class QXMPP_EXPORT QXmppVideoFormat { public: int frameHeight() const { return m_frameSize.height(); } int frameWidth() const { return m_frameSize.width(); } qreal frameRate() const { return m_frameRate; } void setFrameRate(qreal frameRate) { m_frameRate = frameRate; } QSize frameSize() const { return m_frameSize; } void setFrameSize(const QSize &frameSize) { m_frameSize = frameSize; } QXmppVideoFrame::PixelFormat pixelFormat() const { return m_pixelFormat; } void setPixelFormat(QXmppVideoFrame::PixelFormat pixelFormat) { m_pixelFormat = pixelFormat; } private: qreal m_frameRate; QSize m_frameSize; QXmppVideoFrame::PixelFormat m_pixelFormat; }; /// \brief The QXmppRtpVideoChannel class represents an RTP video channel to a remote party. /// /// \note THIS API IS NOT FINALIZED YET class QXMPP_EXPORT QXmppRtpVideoChannel : public QXmppLoggable, public QXmppRtpChannel { Q_OBJECT public: QXmppRtpVideoChannel(QObject *parent = 0); ~QXmppRtpVideoChannel(); void close(); QIODevice::OpenMode openMode() const; // incoming stream QXmppVideoFormat decoderFormat() const; QList readFrames(); // outgoing stream QXmppVideoFormat encoderFormat() const; void setEncoderFormat(const QXmppVideoFormat &format); void writeFrame(const QXmppVideoFrame &frame); signals: /// \brief This signal is emitted when a datagram needs to be sent. void sendDatagram(const QByteArray &ba); public slots: void datagramReceived(const QByteArray &ba); protected: /// \cond void payloadTypesChanged(); /// \endcond private: friend class QXmppRtpVideoChannelPrivate; QXmppRtpVideoChannelPrivate * d; }; #endif qxmpp-0.7.6/src/base/QXmppIq.cpp0000644000175000007640000000566312116723562016374 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "QXmppUtils.h" #include "QXmppIq.h" #include #include static const char* iq_types[] = { "error", "get", "set", "result" }; class QXmppIqPrivate : public QSharedData { public: QXmppIq::Type type; }; /// Constructs a QXmppIq with the specified \a type. /// /// \param type QXmppIq::QXmppIq(QXmppIq::Type type) : QXmppStanza() , d(new QXmppIqPrivate) { d->type = type; generateAndSetNextId(); } /// Constructs a copy of \a other. QXmppIq::QXmppIq(const QXmppIq &other) : QXmppStanza(other) , d(other.d) { } QXmppIq::~QXmppIq() { } /// Assigns \a other to this IQ. QXmppIq& QXmppIq::operator=(const QXmppIq &other) { QXmppStanza::operator=(other); d = other.d; return *this; } /// Returns the IQ's type. /// QXmppIq::Type QXmppIq::type() const { return d->type; } /// Sets the IQ's type. /// /// \param type void QXmppIq::setType(QXmppIq::Type type) { d->type = type; } /// \cond void QXmppIq::parse(const QDomElement &element) { QXmppStanza::parse(element); const QString type = element.attribute("type"); for (int i = Error; i <= Result; i++) { if (type == iq_types[i]) { d->type = static_cast(i); break; } } parseElementFromChild(element); } void QXmppIq::parseElementFromChild(const QDomElement &element) { QXmppElementList extensions; QDomElement itemElement = element.firstChildElement(); while (!itemElement.isNull()) { extensions.append(QXmppElement(itemElement)); itemElement = itemElement.nextSiblingElement(); } setExtensions(extensions); } void QXmppIq::toXml( QXmlStreamWriter *xmlWriter ) const { xmlWriter->writeStartElement("iq"); helperToXmlAddAttribute(xmlWriter, "id", id()); helperToXmlAddAttribute(xmlWriter, "to", to()); helperToXmlAddAttribute(xmlWriter, "from", from()); helperToXmlAddAttribute(xmlWriter, "type", iq_types[d->type]); toXmlElementFromChild(xmlWriter); error().toXml(xmlWriter); xmlWriter->writeEndElement(); } void QXmppIq::toXmlElementFromChild( QXmlStreamWriter *writer ) const { foreach (const QXmppElement &extension, extensions()) extension.toXml(writer); } /// \endcond qxmpp-0.7.6/src/base/QXmppSocks.cpp0000644000175000007640000002101312116723562017070 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include #include #include #include "QXmppSocks.h" const static char SocksVersion = 5; enum AuthenticationMethod { NoAuthentication = 0, GSSAPI = 1, UsernamePassword = 2, }; enum Command { ConnectCommand = 1, BindCommand = 2, AssociateCommand = 3, }; enum AddressType { IPv4Address = 1, DomainName = 3, IPv6Address = 4, }; enum ReplyType { Succeeded = 0, SocksFailure = 1, ConnectionNotAllowed = 2, NetworkUnreachable = 3, HostUnreachable = 4, ConnectionRefused = 5, TtlExpired = 6, CommandNotSupported = 7, AddressTypeNotSupported = 8, }; enum State { ConnectState = 0, CommandState = 1, ReadyState = 2, }; static QByteArray encodeHostAndPort(quint8 type, const QByteArray &host, quint16 port) { QByteArray buffer; QDataStream stream(&buffer, QIODevice::WriteOnly); // set host name quint8 hostLength = host.size(); stream << type; stream << hostLength; stream.writeRawData(host.constData(), hostLength); // set port stream << port; return buffer; } static bool parseHostAndPort(const QByteArray buffer, quint8 &type, QByteArray &host, quint16 &port) { if (buffer.size() < 4) return false; QDataStream stream(buffer); // get host name quint8 hostLength; stream >> type; stream >> hostLength; if (buffer.size() < hostLength + 4) { qWarning("Invalid host length"); return false; } host.resize(hostLength); stream.readRawData(host.data(), hostLength); // get port stream >> port; return true; } QXmppSocksClient::QXmppSocksClient(const QString &proxyHost, quint16 proxyPort, QObject *parent) : QTcpSocket(parent), m_proxyHost(proxyHost), m_proxyPort(proxyPort), m_step(ConnectState) { connect(this, SIGNAL(connected()), this, SLOT(slotConnected())); connect(this, SIGNAL(readyRead()), this, SLOT(slotReadyRead())); } void QXmppSocksClient::connectToHost(const QString &hostName, quint16 hostPort) { m_hostName = hostName; m_hostPort = hostPort; QTcpSocket::connectToHost(m_proxyHost, m_proxyPort); } void QXmppSocksClient::slotConnected() { m_step = ConnectState; // disconnect from signal disconnect(this, SIGNAL(connected()), this, SLOT(slotConnected())); // send connect to server QByteArray buffer; buffer.resize(3); buffer[0] = SocksVersion; buffer[1] = 0x01; // number of methods buffer[2] = NoAuthentication; write(buffer); } void QXmppSocksClient::slotReadyRead() { if (m_step == ConnectState) { m_step++; // receive connect to server response QByteArray buffer = readAll(); if (buffer.size() != 2 || buffer.at(0) != SocksVersion || buffer.at(1) != NoAuthentication) { qWarning("QXmppSocksClient received an invalid response during handshake"); close(); return; } // send CONNECT command buffer.resize(3); buffer[0] = SocksVersion; buffer[1] = ConnectCommand; buffer[2] = 0x00; // reserved buffer.append(encodeHostAndPort( DomainName, m_hostName.toLatin1(), m_hostPort)); write(buffer); } else if (m_step == CommandState) { m_step++; // disconnect from signal disconnect(this, SIGNAL(readyRead()), this, SLOT(slotReadyRead())); // receive CONNECT response QByteArray buffer = readAll(); if (buffer.size() < 6 || buffer.at(0) != SocksVersion || buffer.at(1) != Succeeded || buffer.at(2) != 0) { qWarning("QXmppSocksClient received an invalid response to CONNECT command"); close(); return; } // parse host quint8 hostType; QByteArray hostName; quint16 hostPort; if (!parseHostAndPort(buffer.mid(3), hostType, hostName, hostPort)) { qWarning("QXmppSocksClient could not parse type/host/port"); close(); return; } // FIXME : what do we do with the resulting name / port? // notify of connection emit ready(); } } QXmppSocksServer::QXmppSocksServer(QObject *parent) : QObject(parent) { m_server = new QTcpServer(this); connect(m_server, SIGNAL(newConnection()), this, SLOT(slotNewConnection())); m_server_v6 = new QTcpServer(this); connect(m_server_v6, SIGNAL(newConnection()), this, SLOT(slotNewConnection())); } void QXmppSocksServer::close() { m_server->close(); m_server_v6->close(); } bool QXmppSocksServer::listen(quint16 port) { if (!m_server->listen(QHostAddress::Any, port)) return false; // FIXME: this fails on Linux if /proc/sys/net/ipv6/bindv6only is 0 m_server_v6->listen(QHostAddress::AnyIPv6, m_server->serverPort()); return true; } quint16 QXmppSocksServer::serverPort() const { return m_server->serverPort(); } void QXmppSocksServer::slotNewConnection() { QTcpServer *server = qobject_cast(sender()); if (!server) return; QTcpSocket *socket = server->nextPendingConnection(); if (!socket) return; // register socket m_states.insert(socket, ConnectState); connect(socket, SIGNAL(readyRead()), this, SLOT(slotReadyRead())); } void QXmppSocksServer::slotReadyRead() { QTcpSocket *socket = qobject_cast(sender()); if (!socket || !m_states.contains(socket)) return; if (m_states.value(socket) == ConnectState) { m_states.insert(socket, CommandState); // receive connect to server request QByteArray buffer = socket->readAll(); if (buffer.size() < 3 || buffer.at(0) != SocksVersion || buffer.at(1) + 2 != buffer.size()) { qWarning("QXmppSocksServer received invalid handshake"); socket->close(); return; } // check authentication method bool foundMethod = false; for (int i = 2; i < buffer.size(); i++) { if (buffer.at(i) == NoAuthentication) { foundMethod = true; break; } } if (!foundMethod) { qWarning("QXmppSocksServer received bad authentication method"); socket->close(); return; } // send connect to server response buffer.resize(2); buffer[0] = SocksVersion; buffer[1] = NoAuthentication; socket->write(buffer); } else if (m_states.value(socket) == CommandState) { m_states.insert(socket, ReadyState); // disconnect from signals disconnect(socket, SIGNAL(readyRead()), this, SLOT(slotReadyRead())); // receive command QByteArray buffer = socket->readAll(); if (buffer.size() < 4 || buffer.at(0) != SocksVersion || buffer.at(1) != ConnectCommand || buffer.at(2) != 0x00) { qWarning("QXmppSocksServer received an invalid command"); socket->close(); return; } // parse host quint8 hostType; QByteArray hostName; quint16 hostPort; if (!parseHostAndPort(buffer.mid(3), hostType, hostName, hostPort)) { qWarning("QXmppSocksServer could not parse type/host/port"); socket->close(); return; } // notify of connection emit newConnection(socket, hostName, hostPort); // send response buffer.resize(3); buffer[0] = SocksVersion; buffer[1] = Succeeded; buffer[2] = 0x00; buffer.append(encodeHostAndPort( DomainName, hostName, hostPort)); socket->write(buffer); } } qxmpp-0.7.6/src/base/qdnslookup.cpp0000644000175000007640000005501012116723562017223 0ustar sharkyjerryweb/**************************************************************************** ** ** Copyright (C) 2012 Jeremy Lainé ** Contact: http://www.qt-project.org/ ** ** This file is part of the QtNetwork module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage ** This file may be used under the terms of the GNU Lesser General Public ** License version 2.1 as published by the Free Software Foundation and ** appearing in the file LICENSE.LGPL included in the packaging of this ** file. Please review the following information to ensure the GNU Lesser ** General Public License version 2.1 requirements will be met: ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain additional ** rights. These rights are described in the Nokia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU General ** Public License version 3.0 as published by the Free Software Foundation ** and appearing in the file LICENSE.GPL included in the packaging of this ** file. Please review the following information to ensure the GNU General ** Public License version 3.0 requirements will be met: ** http://www.gnu.org/copyleft/gpl.html. ** ** Other Usage ** Alternatively, this file may be used in accordance with the terms and ** conditions contained in a signed written agreement between you and Nokia. ** ** ** ** ** ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #include "qdnslookup.h" #include "qdnslookup_p.h" #include #include #include #include #include QT_BEGIN_NAMESPACE Q_GLOBAL_STATIC(QDnsLookupThreadPool, theDnsLookupThreadPool); Q_GLOBAL_STATIC(QThreadStorage, theDnsLookupSeedStorage); static bool qt_qdnsmailexchangerecord_less_than(const QDnsMailExchangeRecord &r1, const QDnsMailExchangeRecord &r2) { // Lower numbers are more preferred than higher ones. return r1.preference() < r2.preference(); } /*! Sorts a list of QDnsMailExchangeRecord objects according to RFC 5321. */ static void qt_qdnsmailexchangerecord_sort(QList &records) { // If we have no more than one result, we are done. if (records.size() <= 1) return; // Order the records by preference. qSort(records.begin(), records.end(), qt_qdnsmailexchangerecord_less_than); int i = 0; while (i < records.size()) { // Determine the slice of records with the current preference. QList slice; const quint16 slicePreference = records[i].preference(); for (int j = i; j < records.size(); ++j) { if (records[j].preference() != slicePreference) break; slice << records[j]; } // Randomize the slice of records. while (!slice.isEmpty()) { const unsigned int pos = qrand() % slice.size(); records[i++] = slice.takeAt(pos); } } } static bool qt_qdnsservicerecord_less_than(const QDnsServiceRecord &r1, const QDnsServiceRecord &r2) { // Order by priority, or if the priorities are equal, // put zero weight records first. return r1.priority() < r2.priority() || (r1.priority() == r2.priority() && r1.weight() == 0 && r2.weight() > 0); } /*! Sorts a list of QDnsServiceRecord objects according to RFC 2782. */ static void qt_qdnsservicerecord_sort(QList &records) { // If we have no more than one result, we are done. if (records.size() <= 1) return; // Order the records by priority, and for records with an equal // priority, put records with a zero weight first. qSort(records.begin(), records.end(), qt_qdnsservicerecord_less_than); int i = 0; while (i < records.size()) { // Determine the slice of records with the current priority. QList slice; const quint16 slicePriority = records[i].priority(); unsigned int sliceWeight = 0; for (int j = i; j < records.size(); ++j) { if (records[j].priority() != slicePriority) break; sliceWeight += records[j].weight(); slice << records[j]; } #ifdef QDNSLOOKUP_DEBUG qDebug("qt_qdnsservicerecord_sort() : priority %i (size: %i, total weight: %i)", slicePriority, slice.size(), sliceWeight); #endif // Order the slice of records. while (!slice.isEmpty()) { const unsigned int weightThreshold = qrand() % (sliceWeight + 1); unsigned int summedWeight = 0; for (int j = 0; j < slice.size(); ++j) { summedWeight += slice[j].weight(); if (summedWeight >= weightThreshold) { #ifdef QDNSLOOKUP_DEBUG qDebug("qt_qdnsservicerecord_sort() : adding %s %i (weight: %i)", qPrintable(slice[j].target()), slice[j].port(), slice[j].weight()); #endif // Adjust the slice weight and take the current record. sliceWeight -= slice[j].weight(); records[i++] = slice.takeAt(j); break; } } } } } /*! \class QDnsLookup \brief The QDnsLookup class represents a DNS lookup. \inmodule QtNetwork \ingroup network QDnsLookup uses the mechanisms provided by the operating system to perform DNS lookups. To perform a lookup you need to specify a \l name and \l type then invoke the \l{QDnsLookup::lookup()}{lookup()} slot. The \l{QDnsLookup::finished()}{finished()} signal will be emitted upon completion. For example, you can determine which servers an XMPP chat client should connect to for a given domain with: \snippet doc/src/snippets/code/src_network_kernel_qdnslookup.cpp 0 Once the request finishes you can handle the results with: \snippet doc/src/snippets/code/src_network_kernel_qdnslookup.cpp 1 \note If you simply want to find the IP address(es) associated with a host name, or the host name associated with an IP address you should use QHostInfo instead. */ /*! \enum QDnsLookup::Error Indicates all possible error conditions found during the processing of the DNS lookup. \value NoError no error condition. \value ResolverError there was an error initializing the system's DNS resolver. \value OperationCancelledError the lookup was aborted using the abort() method. \value InvalidRequestError the requested DNS lookup was invalid. \value InvalidReplyError the reply returned by the server was invalid. \value ServerFailureError the server encountered an internal failure while processing the request (SERVFAIL). \value ServerRefusedError the server refused to process the request for security or policy reasons (REFUSED). \value NotFoundError the requested domain name does not exist (NXDOMAIN). */ /*! \enum QDnsLookup::Type Indicates the type of DNS lookup that was performed. \value A IPv4 address records. \value AAAA IPv6 address records. \value ANY any records. \value CNAME canonical name records. \value MX mail exchange records. \value NS name server records. \value PTR pointer records. \value SRV service records. \value TXT text records. */ /*! \fn void QDnsLookup::finished() This signal is emitted when the reply has finished processing. */ /*! \fn void QDnsLookup::nameChanged(const QString &name) This signal is emitted when the lookup \l name changes. \a name is the new lookup name. */ /*! \fn void QDnsLookup::typeChanged(Type type) This signal is emitted when the lookup \l type changes. \a type is the new lookup type. */ /*! Constructs a QDnsLookup object and sets \a parent as the parent object. The \l type property will default to QDnsLookup::A. */ QDnsLookup::QDnsLookup(QObject *parent) : QObject(parent) , d_ptr(new QDnsLookupPrivate(this)) { qRegisterMetaType(); } /*! Constructs a QDnsLookup object for the given \a type and \a name and sets \a parent as the parent object. */ QDnsLookup::QDnsLookup(Type type, const QString &name, QObject *parent) : QObject(parent) , d_ptr(new QDnsLookupPrivate(this)) { Q_D(QDnsLookup); qRegisterMetaType(); d->name = name; d->type = type; } /*! Destroys the QDnsLookup object. It is safe to delete a QDnsLookup object even if it is not finished, you will simply never receive its results. */ QDnsLookup::~QDnsLookup() { } /*! \property QDnsLookup::error \brief the type of error that occurred if the DNS lookup failed, or NoError. */ QDnsLookup::Error QDnsLookup::error() const { return d_func()->reply.error; } /*! \property QDnsLookup::errorString \brief a human-readable description of the error if the DNS lookup failed. */ QString QDnsLookup::errorString() const { return d_func()->reply.errorString; } /*! \property QDnsLookup::finished \brief whether the reply has finished or was aborted. */ bool QDnsLookup::isFinished() const { return d_func()->isFinished; } /*! \property QDnsLookup::name \brief the name to lookup. \note The name will be encoded using IDNA, which means it's unsuitable for querying SRV records compatible with the DNS-SD specification. */ QString QDnsLookup::name() const { return d_func()->name; } void QDnsLookup::setName(const QString &name) { Q_D(QDnsLookup); if (name != d->name) { d->name = name; emit nameChanged(name); } } /*! \property QDnsLookup::type \brief the type of DNS lookup. */ QDnsLookup::Type QDnsLookup::type() const { return d_func()->type; } void QDnsLookup::setType(Type type) { Q_D(QDnsLookup); if (type != d->type) { d->type = type; emit typeChanged(type); } } /*! Returns the list of canonical name records associated with this lookup. */ QList QDnsLookup::canonicalNameRecords() const { return d_func()->reply.canonicalNameRecords; } /*! Returns the list of host address records associated with this lookup. */ QList QDnsLookup::hostAddressRecords() const { return d_func()->reply.hostAddressRecords; } /*! Returns the list of mail exchange records associated with this lookup. The records are sorted according to \l{http://www.rfc-editor.org/rfc/rfc5321.txt}{RFC 5321}, so if you use them to connect to servers, you should try them in the order they are listed. */ QList QDnsLookup::mailExchangeRecords() const { return d_func()->reply.mailExchangeRecords; } /*! Returns the list of name server records associated with this lookup. */ QList QDnsLookup::nameServerRecords() const { return d_func()->reply.nameServerRecords; } /*! Returns the list of pointer records associated with this lookup. */ QList QDnsLookup::pointerRecords() const { return d_func()->reply.pointerRecords; } /*! Returns the list of service records associated with this lookup. The records are sorted according to \l{http://www.rfc-editor.org/rfc/rfc2782.txt}{RFC 2782}, so if you use them to connect to servers, you should try them in the order they are listed. */ QList QDnsLookup::serviceRecords() const { return d_func()->reply.serviceRecords; } /*! Returns the list of text records associated with this lookup. */ QList QDnsLookup::textRecords() const { return d_func()->reply.textRecords; } /*! Aborts the DNS lookup operation. If the lookup is already finished, does nothing. */ void QDnsLookup::abort() { Q_D(QDnsLookup); if (d->runnable) { d->runnable = 0; d->reply = QDnsLookupReply(); d->reply.error = QDnsLookup::OperationCancelledError; d->reply.errorString = tr("Operation cancelled"); d->isFinished = true; emit finished(); } } /*! Performs the DNS lookup. The \l{QDnsLookup::finished()}{finished()} signal is emitted upon completion. */ void QDnsLookup::lookup() { Q_D(QDnsLookup); d->isFinished = false; d->reply = QDnsLookupReply(); d->runnable = new QDnsLookupRunnable(d->type, QUrl::toAce(d->name)); connect(d->runnable, SIGNAL(finished(QDnsLookupReply)), this, SLOT(_q_lookupFinished(QDnsLookupReply)), Qt::BlockingQueuedConnection); theDnsLookupThreadPool()->start(d->runnable); } /*! \class QDnsDomainNameRecord \brief The QDnsDomainNameRecord class stores information about a domain name record. \inmodule QtNetwork \ingroup network When performing a name server lookup, zero or more records will be returned. Each record is represented by a QDnsDomainNameRecord instance. \sa QDnsLookup */ /*! Constructs an empty domain name record object. */ QDnsDomainNameRecord::QDnsDomainNameRecord() : d(new QDnsDomainNameRecordPrivate) { } /*! Constructs a copy of \a other. */ QDnsDomainNameRecord::QDnsDomainNameRecord(const QDnsDomainNameRecord &other) : d(other.d) { } /*! Destroys a domain name record. */ QDnsDomainNameRecord::~QDnsDomainNameRecord() { } /*! Returns the name for this record. */ QString QDnsDomainNameRecord::name() const { return d->name; } /*! Returns the duration in seconds for which this record is valid. */ quint32 QDnsDomainNameRecord::timeToLive() const { return d->timeToLive; } /*! Returns the value for this domain name record. */ QString QDnsDomainNameRecord::value() const { return d->value; } /*! Assigns the data of the \a other object to this record object, and returns a reference to it. */ QDnsDomainNameRecord &QDnsDomainNameRecord::operator=(const QDnsDomainNameRecord &other) { d = other.d; return *this; } /*! \class QDnsHostAddressRecord \brief The QDnsHostAddressRecord class stores information about a host address record. \inmodule QtNetwork \ingroup network When performing an address lookup, zero or more records will be returned. Each record is represented by a QDnsHostAddressRecord instance. \sa QDnsLookup */ /*! Constructs an empty host address record object. */ QDnsHostAddressRecord::QDnsHostAddressRecord() : d(new QDnsHostAddressRecordPrivate) { } /*! Constructs a copy of \a other. */ QDnsHostAddressRecord::QDnsHostAddressRecord(const QDnsHostAddressRecord &other) : d(other.d) { } /*! Destroys a host address record. */ QDnsHostAddressRecord::~QDnsHostAddressRecord() { } /*! Returns the name for this record. */ QString QDnsHostAddressRecord::name() const { return d->name; } /*! Returns the duration in seconds for which this record is valid. */ quint32 QDnsHostAddressRecord::timeToLive() const { return d->timeToLive; } /*! Returns the value for this host address record. */ QHostAddress QDnsHostAddressRecord::value() const { return d->value; } /*! Assigns the data of the \a other object to this record object, and returns a reference to it. */ QDnsHostAddressRecord &QDnsHostAddressRecord::operator=(const QDnsHostAddressRecord &other) { d = other.d; return *this; } /*! \class QDnsMailExchangeRecord \brief The QDnsMailExchangeRecord class stores information about a DNS MX record. \inmodule QtNetwork \ingroup network When performing a lookup on a service, zero or more records will be returned. Each record is represented by a QDnsMailExchangeRecord instance. The meaning of the fields is defined in \l{http://www.rfc-editor.org/rfc/rfc1035.txt}{RFC 1035}. \sa QDnsLookup */ /*! Constructs an empty mail exchange record object. */ QDnsMailExchangeRecord::QDnsMailExchangeRecord() : d(new QDnsMailExchangeRecordPrivate) { } /*! Constructs a copy of \a other. */ QDnsMailExchangeRecord::QDnsMailExchangeRecord(const QDnsMailExchangeRecord &other) : d(other.d) { } /*! Destroys a mail exchange record. */ QDnsMailExchangeRecord::~QDnsMailExchangeRecord() { } /*! Returns the domain name of the mail exchange for this record. */ QString QDnsMailExchangeRecord::exchange() const { return d->exchange; } /*! Returns the name for this record. */ QString QDnsMailExchangeRecord::name() const { return d->name; } /*! Returns the preference for this record. */ quint16 QDnsMailExchangeRecord::preference() const { return d->preference; } /*! Returns the duration in seconds for which this record is valid. */ quint32 QDnsMailExchangeRecord::timeToLive() const { return d->timeToLive; } /*! Assigns the data of the \a other object to this record object, and returns a reference to it. */ QDnsMailExchangeRecord &QDnsMailExchangeRecord::operator=(const QDnsMailExchangeRecord &other) { d = other.d; return *this; } /*! \class QDnsServiceRecord \brief The QDnsServiceRecord class stores information about a DNS SRV record. \inmodule QtNetwork \ingroup network When performing a lookup on a service, zero or more records will be returned. Each record is represented by a QDnsServiceRecord instance. The meaning of the fields is defined in \l{http://www.rfc-editor.org/rfc/rfc2782.txt}{RFC 2782}. \sa QDnsLookup */ /*! Constructs an empty service record object. */ QDnsServiceRecord::QDnsServiceRecord() : d(new QDnsServiceRecordPrivate) { } /*! Constructs a copy of \a other. */ QDnsServiceRecord::QDnsServiceRecord(const QDnsServiceRecord &other) : d(other.d) { } /*! Destroys a service record. */ QDnsServiceRecord::~QDnsServiceRecord() { } /*! Returns the name for this record. */ QString QDnsServiceRecord::name() const { return d->name; } /*! Returns the port on the target host for this service record. */ quint16 QDnsServiceRecord::port() const { return d->port; } /*! Returns the priority for this service record. A client must attempt to contact the target host with the lowest-numbered priority. */ quint16 QDnsServiceRecord::priority() const { return d->priority; } /*! Returns the domain name of the target host for this service record. */ QString QDnsServiceRecord::target() const { return d->target; } /*! Returns the duration in seconds for which this record is valid. */ quint32 QDnsServiceRecord::timeToLive() const { return d->timeToLive; } /*! Returns the weight for this service record. The weight field specifies a relative weight for entries with the same priority. Entries with higher weights should be selected with a higher probability. */ quint16 QDnsServiceRecord::weight() const { return d->weight; } /*! Assigns the data of the \a other object to this record object, and returns a reference to it. */ QDnsServiceRecord &QDnsServiceRecord::operator=(const QDnsServiceRecord &other) { d = other.d; return *this; } /*! \class QDnsTextRecord \brief The QDnsTextRecord class stores information about a DNS TXT record. \inmodule QtNetwork \ingroup network When performing a text lookup, zero or more records will be returned. Each record is represented by a QDnsTextRecord instance. The meaning of the fields is defined in \l{http://www.rfc-editor.org/rfc/rfc1035.txt}{RFC 1035}. \sa QDnsLookup */ /*! Constructs an empty text record object. */ QDnsTextRecord::QDnsTextRecord() : d(new QDnsTextRecordPrivate) { } /*! Constructs a copy of \a other. */ QDnsTextRecord::QDnsTextRecord(const QDnsTextRecord &other) : d(other.d) { } /*! Destroys a text record. */ QDnsTextRecord::~QDnsTextRecord() { } /*! Returns the name for this text record. */ QString QDnsTextRecord::name() const { return d->name; } /*! Returns the duration in seconds for which this record is valid. */ quint32 QDnsTextRecord::timeToLive() const { return d->timeToLive; } /*! Returns the values for this text record. */ QList QDnsTextRecord::values() const { return d->values; } /*! Assigns the data of the \a other object to this record object, and returns a reference to it. */ QDnsTextRecord &QDnsTextRecord::operator=(const QDnsTextRecord &other) { d = other.d; return *this; } void QDnsLookupPrivate::_q_lookupFinished(const QDnsLookupReply &_reply) { Q_Q(QDnsLookup); if (runnable == q->sender()) { #ifdef QDNSLOOKUP_DEBUG qDebug("DNS reply for %s: %i (%s)", qPrintable(name), _reply.error, qPrintable(_reply.errorString)); #endif reply = _reply; runnable = 0; isFinished = true; emit q->finished(); } } void QDnsLookupRunnable::run() { QDnsLookupReply reply; // Validate input. if (requestName.isEmpty()) { reply.error = QDnsLookup::InvalidRequestError; reply.errorString = tr("Invalid domain name"); emit finished(reply); return; } // Perform request. query(requestType, requestName, &reply); // Sort results. if (!theDnsLookupSeedStorage()->hasLocalData()) { qsrand(QTime(0,0,0).msecsTo(QTime::currentTime()) ^ reinterpret_cast(this)); theDnsLookupSeedStorage()->setLocalData(new bool(true)); } qt_qdnsmailexchangerecord_sort(reply.mailExchangeRecords); qt_qdnsservicerecord_sort(reply.serviceRecords); emit finished(reply); } QDnsLookupThreadPool::QDnsLookupThreadPool() : signalsConnected(false) { // Run up to 5 lookups in parallel. setMaxThreadCount(5); } void QDnsLookupThreadPool::start(QRunnable *runnable) { // Ensure threads complete at application destruction. if (!signalsConnected) { QMutexLocker signalsLocker(&signalsMutex); if (!signalsConnected) { QCoreApplication *app = QCoreApplication::instance(); if (!app) { qWarning("QDnsLookup requires a QCoreApplication"); delete runnable; return; } moveToThread(app->thread()); connect(app, SIGNAL(destroyed()), SLOT(_q_applicationDestroyed()), Qt::DirectConnection); signalsConnected = true; } } QThreadPool::start(runnable); } void QDnsLookupThreadPool::_q_applicationDestroyed() { waitForDone(); signalsConnected = false; } QT_END_NAMESPACE qxmpp-0.7.6/src/base/QXmppStanza.h0000644000175000007640000001225612116723562016724 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Manjeet Dahiya * Jeremy Lainé * Georg Rudoy * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPSTANZA_H #define QXMPPSTANZA_H #include #include #include // forward declarations of QXmlStream* classes will not work on Mac, we need to // include the whole header. // See http://lists.trolltech.com/qt-interest/2008-07/thread00798-0.html // for an explanation. #include #include "QXmppElement.h" class QXmppExtendedAddressPrivate; /// \brief Represents an extended address as defined by XEP-0033: Extended Stanza Addressing. /// /// Extended addresses maybe of different types: some are defined by XEP-0033, /// others are defined in separate XEPs (for instance XEP-0146: Remote Controlling Clients). /// That is why the "type" property is a string rather than an enumerated type. class QXMPP_EXPORT QXmppExtendedAddress { public: QXmppExtendedAddress(); QXmppExtendedAddress(const QXmppExtendedAddress&); ~QXmppExtendedAddress(); QXmppExtendedAddress& operator=(const QXmppExtendedAddress&); QString description() const; void setDescription(const QString &description); QString jid() const; void setJid(const QString &jid); QString type() const; void setType(const QString &type); bool isDelivered() const; void setDelivered(bool); bool isValid() const; /// \cond void parse(const QDomElement &element); void toXml(QXmlStreamWriter *writer) const; /// \endcond private: QSharedDataPointer d; }; class QXmppStanzaPrivate; /// \defgroup Stanzas /// \brief The QXmppStanza class is the base class for all XMPP stanzas. /// /// \ingroup Stanzas class QXMPP_EXPORT QXmppStanza { public: class QXMPP_EXPORT Error { public: enum Type { Cancel, Continue, Modify, Auth, Wait }; enum Condition { BadRequest, Conflict, FeatureNotImplemented, Forbidden, Gone, InternalServerError, ItemNotFound, JidMalformed, NotAcceptable, NotAllowed, NotAuthorized, PaymentRequired, RecipientUnavailable, Redirect, RegistrationRequired, RemoteServerNotFound, RemoteServerTimeout, ResourceConstraint, ServiceUnavailable, SubscriptionRequired, UndefinedCondition, UnexpectedRequest }; Error(); Error(Type type, Condition cond, const QString& text=""); Error(const QString& type, const QString& cond, const QString& text=""); int code() const; void setCode(int code); QString text() const; void setText(const QString& text); Condition condition() const; void setCondition(Condition cond); void setType(Type type); Type type() const; /// \cond void parse(const QDomElement &element); void toXml(QXmlStreamWriter *writer) const; /// \endcond private: QString getConditionStr() const; void setConditionFromStr(const QString& cond); QString getTypeStr() const; void setTypeFromStr(const QString& type); int m_code; Type m_type; Condition m_condition; QString m_text; }; QXmppStanza(const QString& from = QString(), const QString& to = QString()); QXmppStanza(const QXmppStanza &other); virtual ~QXmppStanza(); QXmppStanza& operator=(const QXmppStanza &other); QString to() const; void setTo(const QString&); QString from() const; void setFrom(const QString&); QString id() const; void setId(const QString&); QString lang() const; void setLang(const QString&); QXmppStanza::Error error() const; void setError(const QXmppStanza::Error& error); QXmppElementList extensions() const; void setExtensions(const QXmppElementList &elements); QList extendedAddresses() const; void setExtendedAddresses(const QList &extendedAddresses); /// \cond virtual void parse(const QDomElement &element); virtual void toXml(QXmlStreamWriter *writer) const = 0; protected: void extensionsToXml(QXmlStreamWriter *writer) const; void generateAndSetNextId(); /// \endcond private: QSharedDataPointer d; static uint s_uniqeIdNo; }; #endif // QXMPPSTANZA_H qxmpp-0.7.6/src/base/qdnslookup_p.h0000644000175000007640000001155412116723562017214 0ustar sharkyjerryweb/**************************************************************************** ** ** Copyright (C) 2012 Jeremy Lainé ** Contact: http://www.qt-project.org/ ** ** This file is part of the QtNetwork module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage ** This file may be used under the terms of the GNU Lesser General Public ** License version 2.1 as published by the Free Software Foundation and ** appearing in the file LICENSE.LGPL included in the packaging of this ** file. Please review the following information to ensure the GNU Lesser ** General Public License version 2.1 requirements will be met: ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain additional ** rights. These rights are described in the Nokia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU General ** Public License version 3.0 as published by the Free Software Foundation ** and appearing in the file LICENSE.GPL included in the packaging of this ** file. Please review the following information to ensure the GNU General ** Public License version 3.0 requirements will be met: ** http://www.gnu.org/copyleft/gpl.html. ** ** Other Usage ** Alternatively, this file may be used in accordance with the terms and ** conditions contained in a signed written agreement between you and Nokia. ** ** ** ** ** ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #ifndef QDNSLOOKUP_P_H #define QDNSLOOKUP_P_H // // W A R N I N G // ------------- // // This file is not part of the Qt API. It exists for the convenience // of the QDnsLookup class. This header file may change from // version to version without notice, or even be removed. // // We mean it. // #include #include #include #include #include #include #include "qdnslookup.h" QT_BEGIN_NAMESPACE //#define QDNSLOOKUP_DEBUG class QDnsLookupRunnable; class QDnsLookupReply { public: QDnsLookupReply() : error(QDnsLookup::NoError) { } QDnsLookup::Error error; QString errorString; QList canonicalNameRecords; QList hostAddressRecords; QList mailExchangeRecords; QList nameServerRecords; QList pointerRecords; QList serviceRecords; QList textRecords; }; class QDnsLookupPrivate { public: QDnsLookupPrivate(QDnsLookup *qq) : isFinished(false) , type(QDnsLookup::A) , runnable(0) , q_ptr(qq) { } void _q_lookupFinished(const QDnsLookupReply &reply); bool isFinished; QString name; QDnsLookup::Type type; QDnsLookupReply reply; QDnsLookupRunnable *runnable; QDnsLookup *q_ptr; Q_DECLARE_PUBLIC(QDnsLookup) }; class QDnsLookupRunnable : public QObject, public QRunnable { Q_OBJECT public: QDnsLookupRunnable(QDnsLookup::Type type, const QByteArray &name) : requestType(type) , requestName(name) { } void run(); signals: void finished(const QDnsLookupReply &reply); private: static void query(const int requestType, const QByteArray &requestName, QDnsLookupReply *reply); QDnsLookup::Type requestType; QByteArray requestName; }; class QDnsLookupThreadPool : public QThreadPool { Q_OBJECT public: QDnsLookupThreadPool(); void start(QRunnable *runnable); private slots: void _q_applicationDestroyed(); private: QMutex signalsMutex; bool signalsConnected; }; class QDnsRecordPrivate : public QSharedData { public: QDnsRecordPrivate() : timeToLive(0) { } QString name; quint32 timeToLive; }; class QDnsDomainNameRecordPrivate : public QDnsRecordPrivate { public: QDnsDomainNameRecordPrivate() { } QString value; }; class QDnsHostAddressRecordPrivate : public QDnsRecordPrivate { public: QDnsHostAddressRecordPrivate() { } QHostAddress value; }; class QDnsMailExchangeRecordPrivate : public QDnsRecordPrivate { public: QDnsMailExchangeRecordPrivate() : preference(0) { } QString exchange; quint16 preference; }; class QDnsServiceRecordPrivate : public QDnsRecordPrivate { public: QDnsServiceRecordPrivate() : port(0), priority(0), weight(0) { } QString target; quint16 port; quint16 priority; quint16 weight; }; class QDnsTextRecordPrivate : public QDnsRecordPrivate { public: QDnsTextRecordPrivate() { } QList values; }; QT_END_NAMESPACE Q_DECLARE_METATYPE(QDnsLookupReply) #endif // QDNSLOOKUP_P_H qxmpp-0.7.6/src/base/QXmppPresence.h0000644000175000007640000001405512116723562017227 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPPRESENCE_H #define QXMPPPRESENCE_H #include "QXmppStanza.h" #include "QXmppMucIq.h" class QXmppPresencePrivate; /// \brief The QXmppPresence class represents an XMPP presence stanza. /// /// \ingroup Stanzas class QXMPP_EXPORT QXmppPresence : public QXmppStanza { public: /// This enum is used to describe a presence type. enum Type { Error = 0, ///< An error has occurred regarding processing or delivery of a previously-sent presence stanza. Available, ///< Signals that the sender is online and available for communication. Unavailable, ///< Signals that the sender is no longer available for communication. Subscribe, ///< The sender wishes to subscribe to the recipient's presence. Subscribed, ///< The sender has allowed the recipient to receive their presence. Unsubscribe, ///< The sender is unsubscribing from another entity's presence. Unsubscribed, ///< The subscription request has been denied or a previously-granted subscription has been cancelled. Probe ///< A request for an entity's current presence; SHOULD be generated only by a server on behalf of a user. }; /// This enum is used to describe an availability status. enum AvailableStatusType { Online = 0, ///< The entity or resource is online. Away, ///< The entity or resource is temporarily away. XA, ///< The entity or resource is away for an extended period. DND, ///< The entity or resource is busy ("Do Not Disturb"). Chat, ///< The entity or resource is actively interested in chatting. Invisible ///< obsolete XEP-0018: Invisible Presence }; /// This enum is used to describe vCard updates as defined by /// XEP-0153: vCard-Based Avatars enum VCardUpdateType { VCardUpdateNone = 0, ///< Protocol is not supported VCardUpdateNoPhoto, ///< User is not using any image VCardUpdateValidPhoto, ///< User is advertising an image VCardUpdateNotReady ///< User is not ready to advertise an image /// \note This enables recipients to distinguish between the absence of an image /// (empty photo element) and mere support for the protocol (empty update child). }; /// \cond // deprecated since 0.6.2 class QXMPP_EXPORT Status { public: /// This enum is used to describe an availability status. enum Type { Online = 0, ///< The entity or resource is online. Away, ///< The entity or resource is temporarily away. XA, ///< The entity or resource is away for an extended period. DND, ///< The entity or resource is busy ("Do Not Disturb"). Chat, ///< The entity or resource is actively interested in chatting. Invisible ///< obsolete XEP-0018: Invisible Presence }; Status(QXmppPresence::Status::Type type = QXmppPresence::Status::Online, const QString statusText = "", int priority = 0); QXmppPresence::Status::Type type() const; void setType(QXmppPresence::Status::Type); QString statusText() const; void setStatusText(const QString&); int priority() const; void setPriority(int); void parse(const QDomElement &element); void toXml(QXmlStreamWriter *writer) const; private: QXmppPresence::Status::Type m_type; QString m_statusText; int m_priority; }; QXmppPresence::Status Q_DECL_DEPRECATED &status(); const QXmppPresence::Status Q_DECL_DEPRECATED &status() const; void Q_DECL_DEPRECATED setStatus(const QXmppPresence::Status&); /// \endcond QXmppPresence(QXmppPresence::Type type = QXmppPresence::Available); QXmppPresence(const QXmppPresence &other); ~QXmppPresence(); QXmppPresence& operator=(const QXmppPresence &other); AvailableStatusType availableStatusType() const; void setAvailableStatusType(AvailableStatusType type); int priority() const; void setPriority(int priority); QXmppPresence::Type type() const; void setType(QXmppPresence::Type); QString statusText() const; void setStatusText(const QString& statusText); /// \cond void parse(const QDomElement &element); void toXml(QXmlStreamWriter *writer) const; /// \endcond // XEP-0045: Multi-User Chat QXmppMucItem mucItem() const; void setMucItem(const QXmppMucItem &item); QString mucPassword() const; void setMucPassword(const QString &password); QList mucStatusCodes() const; void setMucStatusCodes(const QList &codes); bool isMucSupported() const; void setMucSupported(bool supported); /// XEP-0153: vCard-Based Avatars QByteArray photoHash() const; void setPhotoHash(const QByteArray&); VCardUpdateType vCardUpdateType() const; void setVCardUpdateType(VCardUpdateType type); // XEP-0115: Entity Capabilities QString capabilityHash() const; void setCapabilityHash(const QString&); QString capabilityNode() const; void setCapabilityNode(const QString&); QByteArray capabilityVer() const; void setCapabilityVer(const QByteArray&); QStringList capabilityExt() const; private: QSharedDataPointer d; }; #endif // QXMPPPRESENCE_H qxmpp-0.7.6/src/base/QXmppUtils.cpp0000644000175000007640000002431312116723562017114 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Manjeet Dahiya * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include #include #include #include #include #include #include #include #include #include "QXmppUtils.h" #include "QXmppLogger.h" // adapted from public domain source by Ross Williams and Eric Durbin // FIXME : is this valid for big-endian machines? static quint32 crctable[256] = { 0x00000000L, 0x77073096L, 0xEE0E612CL, 0x990951BAL, 0x076DC419L, 0x706AF48FL, 0xE963A535L, 0x9E6495A3L, 0x0EDB8832L, 0x79DCB8A4L, 0xE0D5E91EL, 0x97D2D988L, 0x09B64C2BL, 0x7EB17CBDL, 0xE7B82D07L, 0x90BF1D91L, 0x1DB71064L, 0x6AB020F2L, 0xF3B97148L, 0x84BE41DEL, 0x1ADAD47DL, 0x6DDDE4EBL, 0xF4D4B551L, 0x83D385C7L, 0x136C9856L, 0x646BA8C0L, 0xFD62F97AL, 0x8A65C9ECL, 0x14015C4FL, 0x63066CD9L, 0xFA0F3D63L, 0x8D080DF5L, 0x3B6E20C8L, 0x4C69105EL, 0xD56041E4L, 0xA2677172L, 0x3C03E4D1L, 0x4B04D447L, 0xD20D85FDL, 0xA50AB56BL, 0x35B5A8FAL, 0x42B2986CL, 0xDBBBC9D6L, 0xACBCF940L, 0x32D86CE3L, 0x45DF5C75L, 0xDCD60DCFL, 0xABD13D59L, 0x26D930ACL, 0x51DE003AL, 0xC8D75180L, 0xBFD06116L, 0x21B4F4B5L, 0x56B3C423L, 0xCFBA9599L, 0xB8BDA50FL, 0x2802B89EL, 0x5F058808L, 0xC60CD9B2L, 0xB10BE924L, 0x2F6F7C87L, 0x58684C11L, 0xC1611DABL, 0xB6662D3DL, 0x76DC4190L, 0x01DB7106L, 0x98D220BCL, 0xEFD5102AL, 0x71B18589L, 0x06B6B51FL, 0x9FBFE4A5L, 0xE8B8D433L, 0x7807C9A2L, 0x0F00F934L, 0x9609A88EL, 0xE10E9818L, 0x7F6A0DBBL, 0x086D3D2DL, 0x91646C97L, 0xE6635C01L, 0x6B6B51F4L, 0x1C6C6162L, 0x856530D8L, 0xF262004EL, 0x6C0695EDL, 0x1B01A57BL, 0x8208F4C1L, 0xF50FC457L, 0x65B0D9C6L, 0x12B7E950L, 0x8BBEB8EAL, 0xFCB9887CL, 0x62DD1DDFL, 0x15DA2D49L, 0x8CD37CF3L, 0xFBD44C65L, 0x4DB26158L, 0x3AB551CEL, 0xA3BC0074L, 0xD4BB30E2L, 0x4ADFA541L, 0x3DD895D7L, 0xA4D1C46DL, 0xD3D6F4FBL, 0x4369E96AL, 0x346ED9FCL, 0xAD678846L, 0xDA60B8D0L, 0x44042D73L, 0x33031DE5L, 0xAA0A4C5FL, 0xDD0D7CC9L, 0x5005713CL, 0x270241AAL, 0xBE0B1010L, 0xC90C2086L, 0x5768B525L, 0x206F85B3L, 0xB966D409L, 0xCE61E49FL, 0x5EDEF90EL, 0x29D9C998L, 0xB0D09822L, 0xC7D7A8B4L, 0x59B33D17L, 0x2EB40D81L, 0xB7BD5C3BL, 0xC0BA6CADL, 0xEDB88320L, 0x9ABFB3B6L, 0x03B6E20CL, 0x74B1D29AL, 0xEAD54739L, 0x9DD277AFL, 0x04DB2615L, 0x73DC1683L, 0xE3630B12L, 0x94643B84L, 0x0D6D6A3EL, 0x7A6A5AA8L, 0xE40ECF0BL, 0x9309FF9DL, 0x0A00AE27L, 0x7D079EB1L, 0xF00F9344L, 0x8708A3D2L, 0x1E01F268L, 0x6906C2FEL, 0xF762575DL, 0x806567CBL, 0x196C3671L, 0x6E6B06E7L, 0xFED41B76L, 0x89D32BE0L, 0x10DA7A5AL, 0x67DD4ACCL, 0xF9B9DF6FL, 0x8EBEEFF9L, 0x17B7BE43L, 0x60B08ED5L, 0xD6D6A3E8L, 0xA1D1937EL, 0x38D8C2C4L, 0x4FDFF252L, 0xD1BB67F1L, 0xA6BC5767L, 0x3FB506DDL, 0x48B2364BL, 0xD80D2BDAL, 0xAF0A1B4CL, 0x36034AF6L, 0x41047A60L, 0xDF60EFC3L, 0xA867DF55L, 0x316E8EEFL, 0x4669BE79L, 0xCB61B38CL, 0xBC66831AL, 0x256FD2A0L, 0x5268E236L, 0xCC0C7795L, 0xBB0B4703L, 0x220216B9L, 0x5505262FL, 0xC5BA3BBEL, 0xB2BD0B28L, 0x2BB45A92L, 0x5CB36A04L, 0xC2D7FFA7L, 0xB5D0CF31L, 0x2CD99E8BL, 0x5BDEAE1DL, 0x9B64C2B0L, 0xEC63F226L, 0x756AA39CL, 0x026D930AL, 0x9C0906A9L, 0xEB0E363FL, 0x72076785L, 0x05005713L, 0x95BF4A82L, 0xE2B87A14L, 0x7BB12BAEL, 0x0CB61B38L, 0x92D28E9BL, 0xE5D5BE0DL, 0x7CDCEFB7L, 0x0BDBDF21L, 0x86D3D2D4L, 0xF1D4E242L, 0x68DDB3F8L, 0x1FDA836EL, 0x81BE16CDL, 0xF6B9265BL, 0x6FB077E1L, 0x18B74777L, 0x88085AE6L, 0xFF0F6A70L, 0x66063BCAL, 0x11010B5CL, 0x8F659EFFL, 0xF862AE69L, 0x616BFFD3L, 0x166CCF45L, 0xA00AE278L, 0xD70DD2EEL, 0x4E048354L, 0x3903B3C2L, 0xA7672661L, 0xD06016F7L, 0x4969474DL, 0x3E6E77DBL, 0xAED16A4AL, 0xD9D65ADCL, 0x40DF0B66L, 0x37D83BF0L, 0xA9BCAE53L, 0xDEBB9EC5L, 0x47B2CF7FL, 0x30B5FFE9L, 0xBDBDF21CL, 0xCABAC28AL, 0x53B39330L, 0x24B4A3A6L, 0xBAD03605L, 0xCDD70693L, 0x54DE5729L, 0x23D967BFL, 0xB3667A2EL, 0xC4614AB8L, 0x5D681B02L, 0x2A6F2B94L, 0xB40BBE37L, 0xC30C8EA1L, 0x5A05DF1BL, 0x2D02EF8DL }; /// Parses a date-time from a string according to /// XEP-0082: XMPP Date and Time Profiles. QDateTime QXmppUtils::datetimeFromString(const QString &str) { QRegExp tzRe("(Z|([+-])([0-9]{2}):([0-9]{2}))"); int tzPos = tzRe.indexIn(str, 19); if (str.size() < 20 || tzPos < 0) return QDateTime(); // process date and time QDateTime dt = QDateTime::fromString(str.left(19), "yyyy-MM-ddThh:mm:ss"); dt.setTimeSpec(Qt::UTC); // process milliseconds if (tzPos > 20 && str.at(19) == '.') { QString millis = (str.mid(20, tzPos - 20) + "000").left(3); dt = dt.addMSecs(millis.toInt()); } // process time zone if (tzRe.cap(1) != "Z") { int offset = tzRe.cap(3).toInt() * 3600 + tzRe.cap(4).toInt() * 60; if (tzRe.cap(2) == "+") dt = dt.addSecs(-offset); else dt = dt.addSecs(offset); } return dt; } /// Serializes a date-time to a string according to /// XEP-0082: XMPP Date and Time Profiles. QString QXmppUtils::datetimeToString(const QDateTime &dt) { QDateTime utc = dt.toUTC(); if (utc.time().msec()) return utc.toString("yyyy-MM-ddThh:mm:ss.zzzZ"); else return utc.toString("yyyy-MM-ddThh:mm:ssZ"); } /// Parses a timezone offset (in seconds) from a string according to /// XEP-0082: XMPP Date and Time Profiles. int QXmppUtils::timezoneOffsetFromString(const QString &str) { QRegExp tzRe("(Z|([+-])([0-9]{2}):([0-9]{2}))"); if (!tzRe.exactMatch(str)) return 0; // No offset from UTC if (tzRe.cap(1) == "Z") return 0; // Calculate offset const int offset = tzRe.cap(3).toInt() * 3600 + tzRe.cap(4).toInt() * 60; if (tzRe.cap(2) == "-") return -offset; else return offset; } /// Serializes a timezone offset (in seconds) to a string according to /// XEP-0082: XMPP Date and Time Profiles. QString QXmppUtils::timezoneOffsetToString(int secs) { if (!secs) return QString::fromLatin1("Z"); const QTime tzoTime = QTime(0, 0, 0).addSecs(qAbs(secs)); return (secs < 0 ? "-" : "+") + tzoTime.toString("hh:mm"); } /// Returns the domain for the given \a jid. QString QXmppUtils::jidToDomain(const QString &jid) { return jidToBareJid(jid).split("@").last(); } /// Returns the resource for the given \a jid. QString QXmppUtils::jidToResource(const QString& jid) { const int pos = jid.indexOf(QChar('/')); if (pos < 0) return QString(); return jid.mid(pos+1); } /// Returns the user for the given \a jid. QString QXmppUtils::jidToUser(const QString &jid) { const int pos = jid.indexOf(QChar('@')); if (pos < 0) return QString(); return jid.left(pos); } /// Returns the bare jid (i.e. without resource) for the given \a jid. QString QXmppUtils::jidToBareJid(const QString& jid) { const int pos = jid.indexOf(QChar('/')); if (pos < 0) return jid; return jid.left(pos); } /// Calculates the CRC32 checksum for the given input. quint32 QXmppUtils::generateCrc32(const QByteArray &in) { quint32 result = 0xffffffff; for(int n = 0; n < in.size(); ++n) result = (result >> 8) ^ (crctable[(result & 0xff) ^ (quint8)in[n]]); return result ^= 0xffffffff; } static QByteArray generateHmac(QCryptographicHash::Algorithm algorithm, const QByteArray &key, const QByteArray &text) { QCryptographicHash hasher(algorithm); const int B = 64; QByteArray kpad = key + QByteArray(B - key.size(), 0); QByteArray ba; for (int i = 0; i < B; ++i) ba += kpad[i] ^ 0x5c; QByteArray tmp; for (int i = 0; i < B; ++i) tmp += kpad[i] ^ 0x36; hasher.addData(tmp); hasher.addData(text); ba += hasher.result(); hasher.reset(); hasher.addData(ba); return hasher.result(); } /// Generates the MD5 HMAC for the given \a key and \a text. QByteArray QXmppUtils::generateHmacMd5(const QByteArray &key, const QByteArray &text) { return generateHmac(QCryptographicHash::Md5, key, text); } /// Generates the SHA1 HMAC for the given \a key and \a text. QByteArray QXmppUtils::generateHmacSha1(const QByteArray &key, const QByteArray &text) { return generateHmac(QCryptographicHash::Sha1, key, text); } /// Generates a random integer x between 0 and N-1. /// /// \param N int QXmppUtils::generateRandomInteger(int N) { Q_ASSERT(N > 0 && N <= RAND_MAX); int val; while (N <= (val = qrand() / (RAND_MAX/N))) {}; return val; } /// Returns a random byte array of the specified size. /// /// \param length QByteArray QXmppUtils::generateRandomBytes(int length) { QByteArray bytes(length, 'm'); for (int i = 0; i < length; ++i) bytes[i] = (char)generateRandomInteger(256); return bytes; } /// Returns a random alphanumerical string of the specified size. /// /// \param length QString QXmppUtils::generateStanzaHash(int length) { const QString somechars = "1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; const int N = somechars.size(); QString hashResult; for ( int idx = 0; idx < length; ++idx ) hashResult += somechars[generateRandomInteger(N)]; return hashResult; } void helperToXmlAddAttribute(QXmlStreamWriter* stream, const QString& name, const QString& value) { if(!value.isEmpty()) stream->writeAttribute(name,value); } void helperToXmlAddTextElement(QXmlStreamWriter* stream, const QString& name, const QString& value) { if(!value.isEmpty()) stream->writeTextElement( name, value); else stream->writeEmptyElement(name); } qxmpp-0.7.6/src/base/QXmppRegisterIq.h0000644000175000007640000000350312116723562017535 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPREGISTERIQ_H #define QXMPPREGISTERIQ_H #include "QXmppDataForm.h" #include "QXmppIq.h" /// \brief The QXmppRegisterIq class represents a registration IQ /// as defined by XEP-0077: In-Band Registration. /// /// It is used to create an account on the server. /// /// \ingroup Stanzas class QXMPP_EXPORT QXmppRegisterIq : public QXmppIq { public: QString email() const; void setEmail(const QString &email); QXmppDataForm form() const; void setForm(const QXmppDataForm &form); QString instructions() const; void setInstructions(const QString &instructions); QString password() const; void setPassword(const QString &username); QString username() const; void setUsername(const QString &username); /// \cond static bool isRegisterIq(const QDomElement &element); /// \endcond protected: /// \cond void parseElementFromChild(const QDomElement &element); void toXmlElementFromChild(QXmlStreamWriter *writer) const; /// \endcond private: QXmppDataForm m_form; QString m_email; QString m_instructions; QString m_password; QString m_username; }; #endif qxmpp-0.7.6/src/base/QXmppResultSet.h0000644000175000007640000000426712116723562017421 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Olivier Goffart * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPRESULTSET_H #define QXMPPRESULTSET_H #include #include "QXmppStanza.h" /// \brief The QXmppResultSetQuery class represents a set element in a query /// as defined by XEP-0059: Result Set Management. class QXMPP_EXPORT QXmppResultSetQuery { public: QXmppResultSetQuery(); int max() const; void setMax(int max); int index() const; void setIndex(int index); QString before() const; void setBefore(const QString &before ); QString after() const; void setAfter(const QString &after ); bool isNull() const; /// \cond void parse(const QDomElement &element); void toXml(QXmlStreamWriter *writer) const; /// \endcond private: int m_index; int m_max; QString m_after; QString m_before; }; /// \brief The QXmppResultSetReply class represents a set element in a reply /// as defined by XEP-0059: Result Set Management. class QXMPP_EXPORT QXmppResultSetReply { public: QXmppResultSetReply(); QString first() const; void setFirst(const QString &first ); QString last() const; void setLast(const QString &last ); int count() const; void setCount(int count); int index() const; void setIndex(int index); bool isNull() const; /// \cond void parse(const QDomElement &element); void toXml(QXmlStreamWriter *writer) const; /// \endcond private: int m_count; int m_index; QString m_first; QString m_last; }; #endif // QXMPPRESULTSET_H qxmpp-0.7.6/src/base/QXmppPubSubIq.cpp0000644000175000007640000001317112116723562017506 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include "QXmppConstants.h" #include "QXmppPubSubIq.h" #include "QXmppUtils.h" static const char *ns_pubsub = "http://jabber.org/protocol/pubsub"; static const char *pubsub_queries[] = { "affiliations", "default", "items", "publish", "retract", "subscribe", "subscription", "subscriptions", "unsubscribe", }; /// Returns the ID of the PubSub item. /// QString QXmppPubSubItem::id() const { return m_id; } /// Sets the ID of the PubSub item. /// /// \param id void QXmppPubSubItem::setId(const QString &id) { m_id = id; } /// Returns the contents of the PubSub item. /// QXmppElement QXmppPubSubItem::contents() const { return m_contents; } /// Sets the contents of the PubSub item. /// /// \param contents void QXmppPubSubItem::setContents(const QXmppElement &contents) { m_contents = contents; } /// \cond void QXmppPubSubItem::parse(const QDomElement &element) { m_id = element.attribute("id"); m_contents = QXmppElement(element.firstChildElement()); } void QXmppPubSubItem::toXml(QXmlStreamWriter *writer) const { writer->writeStartElement("item"); helperToXmlAddAttribute(writer, "id", m_id); m_contents.toXml(writer); writer->writeEndElement(); } /// \endcond /// Returns the PubSub queryType for this IQ. /// QXmppPubSubIq::QueryType QXmppPubSubIq::queryType() const { return m_queryType; } /// Sets the PubSub queryType for this IQ. /// /// \param queryType void QXmppPubSubIq::setQueryType(QXmppPubSubIq::QueryType queryType) { m_queryType = queryType; } /// Returns the JID being queried. /// QString QXmppPubSubIq::queryJid() const { return m_queryJid; } /// Sets the JID being queried. /// /// \param queryJid void QXmppPubSubIq::setQueryJid(const QString &queryJid) { m_queryJid = queryJid; } /// Returns the node being queried. /// QString QXmppPubSubIq::queryNode() const { return m_queryNode; } /// Sets the node being queried. /// /// \param queryNode void QXmppPubSubIq::setQueryNode(const QString &queryNode) { m_queryNode = queryNode; } /// Returns the subscription ID. /// QString QXmppPubSubIq::subscriptionId() const { return m_subscriptionId; } /// Sets the subscription ID. /// /// \param subscriptionId void QXmppPubSubIq::setSubscriptionId(const QString &subscriptionId) { m_subscriptionId = subscriptionId; } /// Returns the IQ's items. /// QList QXmppPubSubIq::items() const { return m_items; } /// Sets the IQ's items. /// /// \param items void QXmppPubSubIq::setItems(const QList &items) { m_items = items; } /// \cond bool QXmppPubSubIq::isPubSubIq(const QDomElement &element) { const QDomElement pubSubElement = element.firstChildElement("pubsub"); return pubSubElement.namespaceURI() == ns_pubsub; } void QXmppPubSubIq::parseElementFromChild(const QDomElement &element) { const QDomElement pubSubElement = element.firstChildElement("pubsub"); const QDomElement queryElement = pubSubElement.firstChildElement(); // determine query type const QString tagName = queryElement.tagName(); for (int i = ItemsQuery; i <= SubscriptionsQuery; i++) { if (tagName == pubsub_queries[i]) { m_queryType = static_cast(i); break; } } m_queryJid = queryElement.attribute("jid"); m_queryNode = queryElement.attribute("node"); // parse contents QDomElement childElement; switch (m_queryType) { case QXmppPubSubIq::ItemsQuery: case QXmppPubSubIq::PublishQuery: childElement = queryElement.firstChildElement("item"); while (!childElement.isNull()) { QXmppPubSubItem item; item.parse(childElement); m_items << item; childElement = childElement.nextSiblingElement("item"); } break; case QXmppPubSubIq::SubscriptionQuery: m_subscriptionId = queryElement.attribute("subid"); m_subscriptionType = queryElement.attribute("subscription"); break; default: break; } } void QXmppPubSubIq::toXmlElementFromChild(QXmlStreamWriter *writer) const { writer->writeStartElement("pubsub"); writer->writeAttribute("xmlns", ns_pubsub); // write query type writer->writeStartElement(pubsub_queries[m_queryType]); helperToXmlAddAttribute(writer, "jid", m_queryJid); helperToXmlAddAttribute(writer, "node", m_queryNode); // write contents switch (m_queryType) { case QXmppPubSubIq::ItemsQuery: case QXmppPubSubIq::PublishQuery: foreach (const QXmppPubSubItem &item, m_items) item.toXml(writer); break; case QXmppPubSubIq::SubscriptionQuery: helperToXmlAddAttribute(writer, "subid", m_subscriptionId); helperToXmlAddAttribute(writer, "subscription", m_subscriptionType); break; default: break; } writer->writeEndElement(); writer->writeEndElement(); } /// \endcond qxmpp-0.7.6/src/base/qdnslookup.h0000644000175000007640000001425012116723562016671 0ustar sharkyjerryweb/**************************************************************************** ** ** Copyright (C) 2012 Jeremy Lainé ** Contact: http://www.qt-project.org/ ** ** This file is part of the QtNetwork module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage ** This file may be used under the terms of the GNU Lesser General Public ** License version 2.1 as published by the Free Software Foundation and ** appearing in the file LICENSE.LGPL included in the packaging of this ** file. Please review the following information to ensure the GNU Lesser ** General Public License version 2.1 requirements will be met: ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain additional ** rights. These rights are described in the Nokia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU General ** Public License version 3.0 as published by the Free Software Foundation ** and appearing in the file LICENSE.GPL included in the packaging of this ** file. Please review the following information to ensure the GNU General ** Public License version 3.0 requirements will be met: ** http://www.gnu.org/copyleft/gpl.html. ** ** Other Usage ** Alternatively, this file may be used in accordance with the terms and ** conditions contained in a signed written agreement between you and Nokia. ** ** ** ** ** ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #ifndef QDNSLOOKUP_H #define QDNSLOOKUP_H #include #include #include #include #include #include "QXmppGlobal.h" QT_BEGIN_HEADER QT_BEGIN_NAMESPACE QT_MODULE(Network) class QHostAddress; class QDnsLookupPrivate; class QDnsDomainNameRecordPrivate; class QDnsHostAddressRecordPrivate; class QDnsMailExchangeRecordPrivate; class QDnsServiceRecordPrivate; class QDnsTextRecordPrivate; class QXMPP_EXPORT QDnsDomainNameRecord { public: QDnsDomainNameRecord(); QDnsDomainNameRecord(const QDnsDomainNameRecord &other); ~QDnsDomainNameRecord(); QString name() const; quint32 timeToLive() const; QString value() const; QDnsDomainNameRecord &operator=(const QDnsDomainNameRecord &other); private: QSharedDataPointer d; friend class QDnsLookupRunnable; }; class QXMPP_EXPORT QDnsHostAddressRecord { public: QDnsHostAddressRecord(); QDnsHostAddressRecord(const QDnsHostAddressRecord &other); ~QDnsHostAddressRecord(); QString name() const; quint32 timeToLive() const; QHostAddress value() const; QDnsHostAddressRecord &operator=(const QDnsHostAddressRecord &other); private: QSharedDataPointer d; friend class QDnsLookupRunnable; }; class QXMPP_EXPORT QDnsMailExchangeRecord { public: QDnsMailExchangeRecord(); QDnsMailExchangeRecord(const QDnsMailExchangeRecord &other); ~QDnsMailExchangeRecord(); QString exchange() const; QString name() const; quint16 preference() const; quint32 timeToLive() const; QDnsMailExchangeRecord &operator=(const QDnsMailExchangeRecord &other); private: QSharedDataPointer d; friend class QDnsLookupRunnable; }; class QXMPP_EXPORT QDnsServiceRecord { public: QDnsServiceRecord(); QDnsServiceRecord(const QDnsServiceRecord &other); ~QDnsServiceRecord(); QString name() const; quint16 port() const; quint16 priority() const; QString target() const; quint32 timeToLive() const; quint16 weight() const; QDnsServiceRecord &operator=(const QDnsServiceRecord &other); private: QSharedDataPointer d; friend class QDnsLookupRunnable; }; class QXMPP_EXPORT QDnsTextRecord { public: QDnsTextRecord(); QDnsTextRecord(const QDnsTextRecord &other); ~QDnsTextRecord(); QString name() const; quint32 timeToLive() const; QList values() const; QDnsTextRecord &operator=(const QDnsTextRecord &other); private: QSharedDataPointer d; friend class QDnsLookupRunnable; }; class QXMPP_EXPORT QDnsLookup : public QObject { Q_OBJECT Q_ENUMS(Error Type) Q_PROPERTY(Error error READ error NOTIFY finished) Q_PROPERTY(QString errorString READ errorString NOTIFY finished) Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) Q_PROPERTY(Type type READ type WRITE setType NOTIFY typeChanged) public: enum Error { NoError = 0, ResolverError, OperationCancelledError, InvalidRequestError, InvalidReplyError, ServerFailureError, ServerRefusedError, NotFoundError }; enum Type { A = 1, AAAA = 28, ANY = 255, CNAME = 5, MX = 15, NS = 2, PTR = 12, SRV = 33, TXT = 16 }; QDnsLookup(QObject *parent = 0); QDnsLookup(Type type, const QString &name, QObject *parent = 0); ~QDnsLookup(); Error error() const; QString errorString() const; bool isFinished() const; QString name() const; void setName(const QString &name); Type type() const; void setType(QDnsLookup::Type); QList canonicalNameRecords() const; QList hostAddressRecords() const; QList mailExchangeRecords() const; QList nameServerRecords() const; QList pointerRecords() const; QList serviceRecords() const; QList textRecords() const; public Q_SLOTS: void abort(); void lookup(); Q_SIGNALS: void finished(); void nameChanged(const QString &name); void typeChanged(Type type); private: QDnsLookupPrivate *d_ptr; Q_DECLARE_PRIVATE(QDnsLookup) Q_PRIVATE_SLOT(d_func(), void _q_lookupFinished(const QDnsLookupReply &reply)) }; QT_END_NAMESPACE QT_END_HEADER #include "qdnslookup_p.h" #endif // QDNSLOOKUP_H qxmpp-0.7.6/src/base/QXmppBindIq.cpp0000644000175000007640000000416312116723562017163 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Manjeet Dahiya * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include #include #include "QXmppBindIq.h" #include "QXmppUtils.h" #include "QXmppConstants.h" /// Returns the bound JID. /// QString QXmppBindIq::jid() const { return m_jid; } /// Sets the bound JID. /// /// \param jid void QXmppBindIq::setJid(const QString& jid) { m_jid = jid; } /// Returns the requested resource. /// QString QXmppBindIq::resource() const { return m_resource; } /// Sets the requested resource. /// /// \param resource void QXmppBindIq::setResource(const QString& resource) { m_resource = resource; } /// \cond bool QXmppBindIq::isBindIq(const QDomElement &element) { QDomElement bindElement = element.firstChildElement("bind"); return (bindElement.namespaceURI() == ns_bind); } void QXmppBindIq::parseElementFromChild(const QDomElement &element) { QDomElement bindElement = element.firstChildElement("bind"); m_jid = bindElement.firstChildElement("jid").text(); m_resource = bindElement.firstChildElement("resource").text(); } void QXmppBindIq::toXmlElementFromChild(QXmlStreamWriter *writer) const { writer->writeStartElement("bind"); writer->writeAttribute("xmlns", ns_bind); if (!m_jid.isEmpty()) helperToXmlAddTextElement(writer, "jid", m_jid); if (!m_resource.isEmpty()) helperToXmlAddTextElement(writer, "resource", m_resource); writer->writeEndElement(); } /// \endcond qxmpp-0.7.6/src/base/QXmppBookmarkSet.cpp0000644000175000007640000001261312116723562020235 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include "QXmppBookmarkSet.h" #include "QXmppUtils.h" static const char *ns_bookmarks = "storage:bookmarks"; /// Constructs a new conference room bookmark. /// QXmppBookmarkConference::QXmppBookmarkConference() : m_autoJoin(false) { } /// Returns whether the client should automatically join the conference room /// on login. /// bool QXmppBookmarkConference::autoJoin() const { return m_autoJoin; } /// Sets whether the client should automatically join the conference room /// on login. /// /// \param autoJoin void QXmppBookmarkConference::setAutoJoin(bool autoJoin) { m_autoJoin = autoJoin; } /// Returns the JID of the conference room. /// QString QXmppBookmarkConference::jid() const { return m_jid; } /// Sets the JID of the conference room. /// /// \param jid void QXmppBookmarkConference::setJid(const QString &jid) { m_jid = jid; } /// Returns the friendly name for the bookmark. /// QString QXmppBookmarkConference::name() const { return m_name; } /// Sets the friendly name for the bookmark. /// /// \param name void QXmppBookmarkConference::setName(const QString &name) { m_name = name; } /// Returns the preferred nickname for the conference room. /// QString QXmppBookmarkConference::nickName() const { return m_nickName; } /// Sets the preferred nickname for the conference room. /// /// \param nickName void QXmppBookmarkConference::setNickName(const QString &nickName) { m_nickName = nickName; } /// Returns the friendly name for the bookmark. /// QString QXmppBookmarkUrl::name() const { return m_name; } /// Sets the friendly name for the bookmark. /// /// \param name void QXmppBookmarkUrl::setName(const QString &name) { m_name = name; } /// Returns the URL for the web page. /// QUrl QXmppBookmarkUrl::url() const { return m_url; } /// Sets the URL for the web page. /// /// \param url void QXmppBookmarkUrl::setUrl(const QUrl &url) { m_url = url; } /// Returns the conference rooms bookmarks in this bookmark set. /// QList QXmppBookmarkSet::conferences() const { return m_conferences; } /// Sets the conference rooms bookmarks in this bookmark set. /// /// \param conferences void QXmppBookmarkSet::setConferences(const QList &conferences) { m_conferences = conferences; } /// Returns the web page bookmarks in this bookmark set. /// QList QXmppBookmarkSet::urls() const { return m_urls; } /// Sets the web page bookmarks in this bookmark set. /// /// \param urls void QXmppBookmarkSet::setUrls(const QList &urls) { m_urls = urls; } /// \cond bool QXmppBookmarkSet::isBookmarkSet(const QDomElement &element) { return element.tagName() == "storage" && element.namespaceURI() == ns_bookmarks; } void QXmppBookmarkSet::parse(const QDomElement &element) { QDomElement childElement = element.firstChildElement(); while (!childElement.isNull()) { if (childElement.tagName() == "conference") { QXmppBookmarkConference conference; conference.setAutoJoin(childElement.attribute("autojoin") == "true" || childElement.attribute("autojoin") == "1"); conference.setJid(childElement.attribute("jid")); conference.setName(childElement.attribute("name")); conference.setNickName(childElement.firstChildElement("nick").text()); m_conferences << conference; } else if (childElement.tagName() == "url") { QXmppBookmarkUrl url; url.setName(childElement.attribute("name")); url.setUrl(childElement.attribute("url")); m_urls << url; } childElement = childElement.nextSiblingElement(); } } void QXmppBookmarkSet::toXml(QXmlStreamWriter *writer) const { writer->writeStartElement("storage"); writer->writeAttribute("xmlns", ns_bookmarks); foreach (const QXmppBookmarkConference &conference, m_conferences) { writer->writeStartElement("conference"); if (conference.autoJoin()) helperToXmlAddAttribute(writer, "autojoin", "true"); helperToXmlAddAttribute(writer, "jid", conference.jid()); helperToXmlAddAttribute(writer, "name", conference.name()); if (!conference.nickName().isEmpty()) helperToXmlAddTextElement(writer, "nick", conference.nickName()); writer->writeEndElement(); } foreach (const QXmppBookmarkUrl &url, m_urls) { writer->writeStartElement("url"); helperToXmlAddAttribute(writer, "name", url.name()); helperToXmlAddAttribute(writer, "url", url.url().toString()); writer->writeEndElement(); } writer->writeEndElement(); } /// \endcond qxmpp-0.7.6/src/base/QXmppGlobal.h0000644000175000007640000000300112116723562016650 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPGLOBAL_H #define QXMPPGLOBAL_H #include #if defined(QXMPP_STATIC) # define QXMPP_EXPORT #else # if defined(QXMPP_BUILD) # define QXMPP_EXPORT Q_DECL_EXPORT # else # define QXMPP_EXPORT Q_DECL_IMPORT # endif #endif #if defined(QXMPP_AUTOTEST_INTERNAL) # define QXMPP_AUTOTEST_EXPORT QXMPP_EXPORT #else # define QXMPP_AUTOTEST_EXPORT #endif /// This macro expands a numeric value of the form 0xMMNNPP (MM = /// major, NN = minor, PP = patch) that specifies QXmpp's version /// number. For example, if you compile your application against /// QXmpp 1.2.3, the QXMPP_VERSION macro will expand to 0x010203. /// /// You can use QXMPP_VERSION to use the latest QXmpp features where /// available. /// #define QXMPP_VERSION 0x000706 QXMPP_EXPORT QString QXmppVersion(); #endif //QXMPPGLOBAL_H qxmpp-0.7.6/src/base/QXmppMucIq.cpp0000644000175000007640000001746112116723562017040 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include "QXmppConstants.h" #include "QXmppMucIq.h" #include "QXmppUtils.h" QXmppMucItem::QXmppMucItem() : m_affiliation(QXmppMucItem::UnspecifiedAffiliation), m_role(QXmppMucItem::UnspecifiedRole) { } /// Returns true if the current item is null. bool QXmppMucItem::isNull() const { return m_actor.isEmpty() && m_affiliation == UnspecifiedAffiliation && m_jid.isEmpty() && m_nick.isEmpty() && m_reason.isEmpty() && m_role == UnspecifiedRole; } /// Returns the actor for this item, for instance the admin who kicked /// a user out of a room. QString QXmppMucItem::actor() const { return m_actor; } /// Sets the \a actor for this item, for instance the admin who kicked /// a user out of a room. void QXmppMucItem::setActor(const QString &actor) { m_actor = actor; } /// Returns the user's affiliation, i.e. long-lived permissions. QXmppMucItem::Affiliation QXmppMucItem::affiliation() const { return m_affiliation; } /// \cond QXmppMucItem::Affiliation QXmppMucItem::affiliationFromString(const QString &affiliationStr) { if (affiliationStr == "owner") return QXmppMucItem::OwnerAffiliation; else if (affiliationStr == "admin") return QXmppMucItem::AdminAffiliation; else if (affiliationStr == "member") return QXmppMucItem::MemberAffiliation; else if (affiliationStr == "outcast") return QXmppMucItem::OutcastAffiliation; else if (affiliationStr == "none") return QXmppMucItem::NoAffiliation; else return QXmppMucItem::UnspecifiedAffiliation; } QString QXmppMucItem::affiliationToString(Affiliation affiliation) { switch (affiliation) { case QXmppMucItem::OwnerAffiliation: return "owner"; case QXmppMucItem::AdminAffiliation: return "admin"; case QXmppMucItem::MemberAffiliation: return "member"; case QXmppMucItem::OutcastAffiliation: return "outcast"; case QXmppMucItem::NoAffiliation: return "none"; default: return QString(); } } /// \endcond /// Sets the user's affiliation, i.e. long-lived permissions. /// /// \param affiliation void QXmppMucItem::setAffiliation(Affiliation affiliation) { m_affiliation = affiliation; } /// Returns the user's real JID. QString QXmppMucItem::jid() const { return m_jid; } /// Sets the user's real JID. /// /// \param jid void QXmppMucItem::setJid(const QString &jid) { m_jid = jid; } /// Returns the user's nickname. QString QXmppMucItem::nick() const { return m_nick; } /// Sets the user's nickname. /// /// \param nick void QXmppMucItem::setNick(const QString &nick) { m_nick = nick; } /// Returns the reason for this item, for example the reason for kicking /// a user out of a room. QString QXmppMucItem::reason() const { return m_reason; } /// Sets the \a reason for this item, for example the reason for kicking /// a user out of a room. void QXmppMucItem::setReason(const QString &reason) { m_reason = reason; } /// Returns the user's role, i.e. short-lived permissions. QXmppMucItem::Role QXmppMucItem::role() const { return m_role; } /// \cond QXmppMucItem::Role QXmppMucItem::roleFromString(const QString &roleStr) { if (roleStr == "moderator") return QXmppMucItem::ModeratorRole; else if (roleStr == "participant") return QXmppMucItem::ParticipantRole; else if (roleStr == "visitor") return QXmppMucItem::VisitorRole; else if (roleStr == "none") return QXmppMucItem::NoRole; else return QXmppMucItem::UnspecifiedRole; } QString QXmppMucItem::roleToString(Role role) { switch (role) { case QXmppMucItem::ModeratorRole: return "moderator"; case QXmppMucItem::ParticipantRole: return "participant"; case QXmppMucItem::VisitorRole: return "visitor"; case QXmppMucItem::NoRole: return "none"; default: return QString(); } } /// \endcond /// Sets the user's role, i.e. short-lived permissions. /// /// \param role void QXmppMucItem::setRole(Role role) { m_role = role; } /// \cond void QXmppMucItem::parse(const QDomElement &element) { m_affiliation = QXmppMucItem::affiliationFromString(element.attribute("affiliation").toLower()); m_jid = element.attribute("jid"); m_nick = element.attribute("nick"); m_role = QXmppMucItem::roleFromString(element.attribute("role").toLower()); m_actor = element.firstChildElement("actor").attribute("jid"); m_reason = element.firstChildElement("reason").text(); } void QXmppMucItem::toXml(QXmlStreamWriter *writer) const { writer->writeStartElement("item"); helperToXmlAddAttribute(writer, "affiliation", affiliationToString(m_affiliation)); helperToXmlAddAttribute(writer, "jid", m_jid); helperToXmlAddAttribute(writer, "nick", m_nick); helperToXmlAddAttribute(writer, "role", roleToString(m_role)); if (!m_actor.isEmpty()) { writer->writeStartElement("actor"); helperToXmlAddAttribute(writer, "jid", m_actor); writer->writeEndElement(); } if (!m_reason.isEmpty()) helperToXmlAddTextElement(writer, "reason", m_reason); writer->writeEndElement(); } /// \endcond /// Returns the IQ's items. QList QXmppMucAdminIq::items() const { return m_items; } /// Sets the IQ's items. /// /// \param items void QXmppMucAdminIq::setItems(const QList &items) { m_items = items; } /// \cond bool QXmppMucAdminIq::isMucAdminIq(const QDomElement &element) { QDomElement queryElement = element.firstChildElement("query"); return (queryElement.namespaceURI() == ns_muc_admin); } void QXmppMucAdminIq::parseElementFromChild(const QDomElement &element) { QDomElement queryElement = element.firstChildElement("query"); QDomElement child = queryElement.firstChildElement("item"); while (!child.isNull()) { QXmppMucItem item; item.parse(child); m_items << item; child = child.nextSiblingElement("item"); } } void QXmppMucAdminIq::toXmlElementFromChild(QXmlStreamWriter *writer) const { writer->writeStartElement("query"); writer->writeAttribute("xmlns", ns_muc_admin); foreach (const QXmppMucItem &item, m_items) item.toXml(writer); writer->writeEndElement(); } /// \endcond /// Returns the IQ's data form. QXmppDataForm QXmppMucOwnerIq::form() const { return m_form; } /// Sets the IQ's data form. /// /// \param form void QXmppMucOwnerIq::setForm(const QXmppDataForm &form) { m_form = form; } /// \cond bool QXmppMucOwnerIq::isMucOwnerIq(const QDomElement &element) { QDomElement queryElement = element.firstChildElement("query"); return (queryElement.namespaceURI() == ns_muc_owner); } void QXmppMucOwnerIq::parseElementFromChild(const QDomElement &element) { QDomElement queryElement = element.firstChildElement("query"); m_form.parse(queryElement.firstChildElement("x")); } void QXmppMucOwnerIq::toXmlElementFromChild(QXmlStreamWriter *writer) const { writer->writeStartElement("query"); writer->writeAttribute("xmlns", ns_muc_owner); m_form.toXml(writer); writer->writeEndElement(); } /// \endcond qxmpp-0.7.6/src/base/QXmppStream.cpp0000644000175000007640000001363212116723562017251 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Manjeet Dahiya * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "QXmppConstants.h" #include "QXmppLogger.h" #include "QXmppStanza.h" #include "QXmppStream.h" #include "QXmppUtils.h" #include #include #include #include #include #include #include #include static bool randomSeeded = false; static const QByteArray streamRootElementEnd = "
"; class QXmppStreamPrivate { public: QXmppStreamPrivate(); QByteArray dataBuffer; QSslSocket* socket; // stream state QByteArray streamStart; }; QXmppStreamPrivate::QXmppStreamPrivate() : socket(0) { } /// Constructs a base XMPP stream. /// /// \param parent QXmppStream::QXmppStream(QObject *parent) : QXmppLoggable(parent), d(new QXmppStreamPrivate) { // Make sure the random number generator is seeded if (!randomSeeded) { qsrand(QTime(0,0,0).msecsTo(QTime::currentTime()) ^ reinterpret_cast(this)); randomSeeded = true; } } /// Destroys a base XMPP stream. QXmppStream::~QXmppStream() { delete d; } /// Disconnects from the remote host. /// void QXmppStream::disconnectFromHost() { sendData(streamRootElementEnd); if (d->socket) { d->socket->flush(); d->socket->disconnectFromHost(); } } /// Handles a stream start event, which occurs when the underlying transport /// becomes ready (socket connected, encryption started). /// /// If you redefine handleStart(), make sure to call the base class's method. void QXmppStream::handleStart() { d->dataBuffer.clear(); d->streamStart.clear(); } /// Returns true if the stream is connected. /// bool QXmppStream::isConnected() const { return d->socket && d->socket->state() == QAbstractSocket::ConnectedState; } /// Sends raw data to the peer. /// /// \param data bool QXmppStream::sendData(const QByteArray &data) { logSent(QString::fromUtf8(data)); if (!d->socket || d->socket->state() != QAbstractSocket::ConnectedState) return false; return d->socket->write(data) == data.size(); } /// Sends an XMPP packet to the peer. /// /// \param packet bool QXmppStream::sendPacket(const QXmppStanza &packet) { // prepare packet QByteArray data; QXmlStreamWriter xmlStream(&data); packet.toXml(&xmlStream); // send packet return sendData(data); } /// Returns the QSslSocket used for this stream. /// QSslSocket *QXmppStream::socket() const { return d->socket; } /// Sets the QSslSocket used for this stream. /// void QXmppStream::setSocket(QSslSocket *socket) { bool check; Q_UNUSED(check); d->socket = socket; if (!d->socket) return; // socket events check = connect(socket, SIGNAL(connected()), this, SLOT(_q_socketConnected())); Q_ASSERT(check); check = connect(socket, SIGNAL(encrypted()), this, SLOT(_q_socketEncrypted())); Q_ASSERT(check); check = connect(socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(_q_socketError(QAbstractSocket::SocketError))); check = connect(socket, SIGNAL(readyRead()), this, SLOT(_q_socketReadyRead())); Q_ASSERT(check); } void QXmppStream::_q_socketConnected() { info(QString("Socket connected to %1 %2").arg( d->socket->peerAddress().toString(), QString::number(d->socket->peerPort()))); handleStart(); } void QXmppStream::_q_socketEncrypted() { debug("Socket encrypted"); handleStart(); } void QXmppStream::_q_socketError(QAbstractSocket::SocketError socketError) { Q_UNUSED(socketError); warning(QString("Socket error: " + socket()->errorString())); } void QXmppStream::_q_socketReadyRead() { d->dataBuffer.append(d->socket->readAll()); // handle whitespace pings if (!d->dataBuffer.isEmpty() && d->dataBuffer.trimmed().isEmpty()) { d->dataBuffer.clear(); handleStanza(QDomElement()); } // FIXME : maybe these QRegExps could be static? QRegExp startStreamRegex("^(<\\?xml.*\\?>)?\\s*"); startStreamRegex.setMinimal(true); QRegExp endStreamRegex("
$"); endStreamRegex.setMinimal(true); // check whether we need to add stream start / end elements QByteArray completeXml = d->dataBuffer; const QString strData = QString::fromUtf8(d->dataBuffer); bool streamStart = false; if (d->streamStart.isEmpty() && strData.contains(startStreamRegex)) streamStart = true; else completeXml.prepend(d->streamStart); if (!strData.contains(endStreamRegex)) completeXml.append(streamRootElementEnd); // check whether we have a valid XML document QDomDocument doc; if (!doc.setContent(completeXml, true)) return; // remove data from buffer logReceived(strData); d->dataBuffer.clear(); if (streamStart) d->streamStart = startStreamRegex.cap(0).toUtf8(); // process stream start if (streamStart) handleStream(doc.documentElement()); // process stanzas QDomElement nodeRecv = doc.documentElement().firstChildElement(); while (!nodeRecv.isNull()) { handleStanza(nodeRecv); nodeRecv = nodeRecv.nextSiblingElement(); } } qxmpp-0.7.6/src/base/QXmppJingleIq.cpp0000644000175000007640000004742112116723562017523 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include "QXmppConstants.h" #include "QXmppJingleIq.h" #include "QXmppUtils.h" static const char* ns_jingle_rtp_info = "urn:xmpp:jingle:apps:rtp:info:1"; static const char* jingle_actions[] = { "content-accept", "content-add", "content-modify", "content-reject", "content-remove", "description-info", "security-info", "session-accept", "session-info", "session-initiate", "session-terminate", "transport-accept", "transport-info", "transport-reject", "transport-replace", }; static const char* jingle_reasons[] = { "", "alternative-session", "busy", "cancel", "connectivity-error", "decline", "expired", "failed-application", "failed-transport", "general-error", "gone", "incompatible-parameters", "media-error", "security-error", "success", "timeout", "unsupported-applications", "unsupported-transports", }; QXmppJingleIq::Content::Content() { } QString QXmppJingleIq::Content::creator() const { return m_creator; } void QXmppJingleIq::Content::setCreator(const QString &creator) { m_creator = creator; } QString QXmppJingleIq::Content::name() const { return m_name; } void QXmppJingleIq::Content::setName(const QString &name) { m_name = name; } QString QXmppJingleIq::Content::senders() const { return m_senders; } void QXmppJingleIq::Content::setSenders(const QString &senders) { m_senders = senders; } QString QXmppJingleIq::Content::descriptionMedia() const { return m_descriptionMedia; } void QXmppJingleIq::Content::setDescriptionMedia(const QString &media) { m_descriptionMedia = media; } void QXmppJingleIq::Content::addPayloadType(const QXmppJinglePayloadType &payload) { m_descriptionType = ns_jingle_rtp; m_payloadTypes << payload; } QList QXmppJingleIq::Content::payloadTypes() const { return m_payloadTypes; } void QXmppJingleIq::Content::setPayloadTypes(const QList &payloadTypes) { m_descriptionType = payloadTypes.isEmpty() ? QString() : ns_jingle_rtp; m_payloadTypes = payloadTypes; } void QXmppJingleIq::Content::addTransportCandidate(const QXmppJingleCandidate &candidate) { m_transportType = ns_jingle_ice_udp; m_transportCandidates << candidate; } QList QXmppJingleIq::Content::transportCandidates() const { return m_transportCandidates; } QString QXmppJingleIq::Content::transportUser() const { return m_transportUser; } void QXmppJingleIq::Content::setTransportUser(const QString &user) { m_transportUser = user; } QString QXmppJingleIq::Content::transportPassword() const { return m_transportPassword; } void QXmppJingleIq::Content::setTransportPassword(const QString &password) { m_transportPassword = password; } /// \cond void QXmppJingleIq::Content::parse(const QDomElement &element) { m_creator = element.attribute("creator"); m_disposition = element.attribute("disposition"); m_name = element.attribute("name"); m_senders = element.attribute("senders"); // description QDomElement descriptionElement = element.firstChildElement("description"); m_descriptionType = descriptionElement.namespaceURI(); m_descriptionMedia = descriptionElement.attribute("media"); QDomElement child = descriptionElement.firstChildElement("payload-type"); while (!child.isNull()) { QXmppJinglePayloadType payload; payload.parse(child); m_payloadTypes << payload; child = child.nextSiblingElement("payload-type"); } // transport QDomElement transportElement = element.firstChildElement("transport"); m_transportType = transportElement.namespaceURI(); m_transportUser = transportElement.attribute("ufrag"); m_transportPassword = transportElement.attribute("pwd"); child = transportElement.firstChildElement("candidate"); while (!child.isNull()) { QXmppJingleCandidate candidate; candidate.parse(child); m_transportCandidates << candidate; child = child.nextSiblingElement("candidate"); } } void QXmppJingleIq::Content::toXml(QXmlStreamWriter *writer) const { if (m_creator.isEmpty() || m_name.isEmpty()) return; writer->writeStartElement("content"); helperToXmlAddAttribute(writer, "creator", m_creator); helperToXmlAddAttribute(writer, "disposition", m_disposition); helperToXmlAddAttribute(writer, "name", m_name); helperToXmlAddAttribute(writer, "senders", m_senders); // description if (!m_descriptionType.isEmpty() || !m_payloadTypes.isEmpty()) { writer->writeStartElement("description"); writer->writeAttribute("xmlns", m_descriptionType); helperToXmlAddAttribute(writer, "media", m_descriptionMedia); foreach (const QXmppJinglePayloadType &payload, m_payloadTypes) payload.toXml(writer); writer->writeEndElement(); } // transport if (!m_transportType.isEmpty() || !m_transportCandidates.isEmpty()) { writer->writeStartElement("transport"); writer->writeAttribute("xmlns", m_transportType); helperToXmlAddAttribute(writer, "ufrag", m_transportUser); helperToXmlAddAttribute(writer, "pwd", m_transportPassword); foreach (const QXmppJingleCandidate &candidate, m_transportCandidates) candidate.toXml(writer); writer->writeEndElement(); } writer->writeEndElement(); } /// \endcond QXmppJingleIq::Reason::Reason() : m_type(None) { } QString QXmppJingleIq::Reason::text() const { return m_text; } void QXmppJingleIq::Reason::setText(const QString &text) { m_text = text; } QXmppJingleIq::Reason::Type QXmppJingleIq::Reason::type() const { return m_type; } void QXmppJingleIq::Reason::setType(QXmppJingleIq::Reason::Type type) { m_type = type; } /// \cond void QXmppJingleIq::Reason::parse(const QDomElement &element) { m_text = element.firstChildElement("text").text(); for (int i = AlternativeSession; i <= UnsupportedTransports; i++) { if (!element.firstChildElement(jingle_reasons[i]).isNull()) { m_type = static_cast(i); break; } } } void QXmppJingleIq::Reason::toXml(QXmlStreamWriter *writer) const { if (m_type < AlternativeSession || m_type > UnsupportedTransports) return; writer->writeStartElement("reason"); if (!m_text.isEmpty()) helperToXmlAddTextElement(writer, "text", m_text); writer->writeEmptyElement(jingle_reasons[m_type]); writer->writeEndElement(); } /// \endcond /// Constructs a QXmppJingleIq. QXmppJingleIq::QXmppJingleIq() : m_ringing(false) { } /// Returns the Jingle IQ's action. QXmppJingleIq::Action QXmppJingleIq::action() const { return m_action; } /// Sets the Jingle IQ's action. /// /// \param action void QXmppJingleIq::setAction(QXmppJingleIq::Action action) { m_action = action; } /// Returns the session initiator. QString QXmppJingleIq::initiator() const { return m_initiator; } /// Sets the session initiator. /// /// \param initiator void QXmppJingleIq::setInitiator(const QString &initiator) { m_initiator = initiator; } /// Returns the session responder. QString QXmppJingleIq::responder() const { return m_responder; } /// Sets the session responder. /// /// \param responder void QXmppJingleIq::setResponder(const QString &responder) { m_responder = responder; } /// Returns the session ID. QString QXmppJingleIq::sid() const { return m_sid; } /// Sets the session ID. /// /// \param sid void QXmppJingleIq::setSid(const QString &sid) { m_sid = sid; } /// Returns true if the call is ringing. bool QXmppJingleIq::ringing() const { return m_ringing; } /// Set to true if the call is ringing. /// /// \param ringing void QXmppJingleIq::setRinging(bool ringing) { m_ringing = ringing; } /// \cond bool QXmppJingleIq::isJingleIq(const QDomElement &element) { QDomElement jingleElement = element.firstChildElement("jingle"); return (jingleElement.namespaceURI() == ns_jingle); } void QXmppJingleIq::parseElementFromChild(const QDomElement &element) { QDomElement jingleElement = element.firstChildElement("jingle"); const QString action = jingleElement.attribute("action"); for (int i = ContentAccept; i <= TransportReplace; i++) { if (action == jingle_actions[i]) { m_action = static_cast(i); break; } } m_initiator = jingleElement.attribute("initiator"); m_responder = jingleElement.attribute("responder"); m_sid = jingleElement.attribute("sid"); // content QDomElement contentElement = jingleElement.firstChildElement("content"); m_content.parse(contentElement); QDomElement reasonElement = jingleElement.firstChildElement("reason"); m_reason.parse(reasonElement); // ringing QDomElement ringingElement = jingleElement.firstChildElement("ringing"); m_ringing = (ringingElement.namespaceURI() == ns_jingle_rtp_info); } void QXmppJingleIq::toXmlElementFromChild(QXmlStreamWriter *writer) const { writer->writeStartElement("jingle"); writer->writeAttribute("xmlns", ns_jingle); helperToXmlAddAttribute(writer, "action", jingle_actions[m_action]); helperToXmlAddAttribute(writer, "initiator", m_initiator); helperToXmlAddAttribute(writer, "responder", m_responder); helperToXmlAddAttribute(writer, "sid", m_sid); m_content.toXml(writer); m_reason.toXml(writer); // ringing if (m_ringing) { writer->writeStartElement("ringing"); writer->writeAttribute("xmlns", ns_jingle_rtp_info); writer->writeEndElement(); } writer->writeEndElement(); } /// \endcond QXmppJingleCandidate::QXmppJingleCandidate() : m_component(0), m_foundation(0), m_generation(0), m_network(0), m_port(0), m_priority(0), m_type(HostType) { } /// Returns the candidate's component ID. int QXmppJingleCandidate::component() const { return m_component; } /// Sets the candidates's component ID. /// /// \param component void QXmppJingleCandidate::setComponent(int component) { m_component = component; } /// Returns the candidate's foundation. int QXmppJingleCandidate::foundation() const { return m_foundation; } /// Sets the candidate's foundation. /// /// \param foundation void QXmppJingleCandidate::setFoundation(int foundation) { m_foundation = foundation; } /// Returns the candidate's host address. /// QHostAddress QXmppJingleCandidate::host() const { return m_host; } /// Sets the candidate's host address. /// /// \param host void QXmppJingleCandidate::setHost(const QHostAddress &host) { m_host = host; } /// Returns the candidate's unique identifier. /// QString QXmppJingleCandidate::id() const { return m_id; } /// Sets the candidate's unique identifier. /// /// \param id void QXmppJingleCandidate::setId(const QString &id) { m_id = id; } /// Returns the network index (starting at 0) the candidate is on. /// int QXmppJingleCandidate::network() const { return m_network; } /// Sets the network index (starting at 0) the candidate is on. /// /// \param network void QXmppJingleCandidate::setNetwork(int network) { m_network = network; } /// Returns the candidate's port number. /// quint16 QXmppJingleCandidate::port() const { return m_port; } /// Sets the candidate's port number. /// /// \param port void QXmppJingleCandidate::setPort(quint16 port) { m_port = port; } /// Returns the candidate's priority. /// int QXmppJingleCandidate::priority() const { return m_priority; } /// Sets the candidate's priority. /// /// \param priority void QXmppJingleCandidate::setPriority(int priority) { m_priority = priority; } /// Returns the candidate's protocol (e.g. "udp"). /// QString QXmppJingleCandidate::protocol() const { return m_protocol; } /// Sets the candidate's protocol (e.g. "udp"). /// /// \param protocol void QXmppJingleCandidate::setProtocol(const QString &protocol) { m_protocol = protocol; } /// Returns the candidate type (e.g. "host"). /// QXmppJingleCandidate::Type QXmppJingleCandidate::type() const { return m_type; } /// Sets the candidate type (e.g. "host"). /// /// \param type void QXmppJingleCandidate::setType(QXmppJingleCandidate::Type type) { m_type = type; } /// Returns true if the host address or port are empty. /// bool QXmppJingleCandidate::isNull() const { return m_host.isNull() || !m_port; } /// \cond void QXmppJingleCandidate::parse(const QDomElement &element) { m_component = element.attribute("component").toInt(); m_foundation = element.attribute("foundation").toInt(); m_generation = element.attribute("generation").toInt(); m_host = QHostAddress(element.attribute("ip")); m_id = element.attribute("id"); m_network = element.attribute("network").toInt(); m_port = element.attribute("port").toInt(); m_priority = element.attribute("priority").toInt(); m_protocol = element.attribute("protocol"); m_type = typeFromString(element.attribute("type")); } void QXmppJingleCandidate::toXml(QXmlStreamWriter *writer) const { writer->writeStartElement("candidate"); helperToXmlAddAttribute(writer, "component", QString::number(m_component)); helperToXmlAddAttribute(writer, "foundation", QString::number(m_foundation)); helperToXmlAddAttribute(writer, "generation", QString::number(m_generation)); helperToXmlAddAttribute(writer, "id", m_id); helperToXmlAddAttribute(writer, "ip", m_host.toString()); helperToXmlAddAttribute(writer, "network", QString::number(m_network)); helperToXmlAddAttribute(writer, "port", QString::number(m_port)); helperToXmlAddAttribute(writer, "priority", QString::number(m_priority)); helperToXmlAddAttribute(writer, "protocol", m_protocol); helperToXmlAddAttribute(writer, "type", typeToString(m_type)); writer->writeEndElement(); } QXmppJingleCandidate::Type QXmppJingleCandidate::typeFromString(const QString &typeStr, bool *ok) { QXmppJingleCandidate::Type type; if (typeStr == "host") type = HostType; else if (typeStr == "prflx") type = PeerReflexiveType; else if (typeStr == "srflx") type = ServerReflexiveType; else if (typeStr == "relay") type = RelayedType; else { qWarning() << "Unknown candidate type" << typeStr; if (ok) *ok = false; return HostType; } if (ok) *ok = true; return type; } QString QXmppJingleCandidate::typeToString(QXmppJingleCandidate::Type type) { QString typeStr; switch (type) { case HostType: typeStr = "host"; break; case PeerReflexiveType: typeStr = "prflx"; break; case ServerReflexiveType: typeStr = "srflx"; break; case RelayedType: typeStr = "relay"; break; } return typeStr; } /// \endcond QXmppJinglePayloadType::QXmppJinglePayloadType() : m_channels(1), m_clockrate(0), m_id(0), m_maxptime(0), m_ptime(0) { } /// Returns the number of channels (e.g. 1 for mono, 2 for stereo). /// unsigned char QXmppJinglePayloadType::channels() const { return m_channels; } /// Sets the number of channels (e.g. 1 for mono, 2 for stereo). /// /// \param channels void QXmppJinglePayloadType::setChannels(unsigned char channels) { m_channels = channels; } /// Returns the clockrate in Hz, i.e. the number of samples per second. /// unsigned int QXmppJinglePayloadType::clockrate() const { return m_clockrate; } /// Sets the clockrate in Hz, i.e. the number of samples per second. /// /// \param clockrate void QXmppJinglePayloadType::setClockrate(unsigned int clockrate) { m_clockrate = clockrate; } /// Returns the payload type identifier. /// unsigned char QXmppJinglePayloadType::id() const { return m_id; } /// Sets the payload type identifier. /// void QXmppJinglePayloadType::setId(unsigned char id) { Q_ASSERT(id <= 127); m_id = id; } /// Returns the maximum packet time in milliseconds. /// unsigned int QXmppJinglePayloadType::maxptime() const { return m_maxptime; } /// Sets the maximum packet type in milliseconds. /// /// \param maxptime void QXmppJinglePayloadType::setMaxptime(unsigned int maxptime) { m_maxptime = maxptime; } /// Returns the payload type name. /// QString QXmppJinglePayloadType::name() const { return m_name; } /// Sets the payload type name. /// /// \param name void QXmppJinglePayloadType::setName(const QString &name) { m_name = name; } /// Returns the payload parameters. QMap QXmppJinglePayloadType::parameters() const { return m_parameters; } /// Sets the payload parameters. void QXmppJinglePayloadType::setParameters(const QMap ¶meters) { m_parameters = parameters; } /// Returns the packet time in milliseconds (20 by default). /// unsigned int QXmppJinglePayloadType::ptime() const { return m_ptime ? m_ptime : 20; } /// Sets the packet time in milliseconds (20 by default). /// /// \param ptime void QXmppJinglePayloadType::setPtime(unsigned int ptime) { m_ptime = ptime; } /// \cond void QXmppJinglePayloadType::parse(const QDomElement &element) { m_id = element.attribute("id").toInt(); m_name = element.attribute("name"); m_channels = element.attribute("channels").toInt(); if (!m_channels) m_channels = 1; m_clockrate = element.attribute("clockrate").toInt(); m_maxptime = element.attribute("maxptime").toInt(); m_ptime = element.attribute("ptime").toInt(); QDomElement child = element.firstChildElement("parameter"); while (!child.isNull()) { m_parameters.insert(child.attribute("name"), child.attribute("value")); child = child.nextSiblingElement("parameter"); } } void QXmppJinglePayloadType::toXml(QXmlStreamWriter *writer) const { writer->writeStartElement("payload-type"); helperToXmlAddAttribute(writer, "id", QString::number(m_id)); helperToXmlAddAttribute(writer, "name", m_name); if (m_channels > 1) helperToXmlAddAttribute(writer, "channels", QString::number(m_channels)); if (m_clockrate > 0) helperToXmlAddAttribute(writer, "clockrate", QString::number(m_clockrate)); if (m_maxptime > 0) helperToXmlAddAttribute(writer, "maxptime", QString::number(m_maxptime)); if (m_ptime > 0) helperToXmlAddAttribute(writer, "ptime", QString::number(m_ptime)); foreach (const QString &key, m_parameters.keys()) { writer->writeStartElement("parameter"); writer->writeAttribute("name", key); writer->writeAttribute("value", m_parameters.value(key)); writer->writeEndElement(); } writer->writeEndElement(); } /// \endcond /// Returns true if this QXmppJinglePayloadType and \a other refer to the same payload type. /// /// \param other bool QXmppJinglePayloadType::operator==(const QXmppJinglePayloadType &other) const { // FIXME : what to do with m_ptime and m_maxptime? if (m_id <= 95) return other.m_id == m_id && other.m_clockrate == m_clockrate; else return other.m_channels == m_channels && other.m_clockrate == m_clockrate && other.m_name.toLower() == m_name.toLower(); } qxmpp-0.7.6/src/base/QXmppArchiveIq.h0000644000175000007640000001375712116723562017346 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPARCHIVEIQ_H #define QXMPPARCHIVEIQ_H #include "QXmppIq.h" #include "QXmppResultSet.h" #include /// \brief The QXmppArchiveMessage class represents an archived message /// as defined by XEP-0136: Message Archiving. class QXMPP_EXPORT QXmppArchiveMessage { public: QXmppArchiveMessage(); QString body() const; void setBody(const QString &body); QDateTime date() const; void setDate(const QDateTime &date); bool isReceived() const; void setReceived(bool isReceived); private: QString m_body; QDateTime m_date; bool m_received; }; /// \brief The QXmppArchiveChat class represents an archived conversation /// as defined by XEP-0136: Message Archiving. class QXMPP_EXPORT QXmppArchiveChat { public: QXmppArchiveChat(); QList messages() const; void setMessages(const QList &messages); QDateTime start() const; void setStart(const QDateTime &start); QString subject() const; void setSubject(const QString &subject); QString thread() const; void setThread(const QString &thread); int version() const; void setVersion(int version); QString with() const; void setWith(const QString &with); /// \cond void parse(const QDomElement &element); void toXml(QXmlStreamWriter *writer, const QXmppResultSetReply &rsm = QXmppResultSetReply()) const; /// \endcond private: QList m_messages; QDateTime m_start; QString m_subject; QString m_thread; int m_version; QString m_with; }; /// \brief Represents an archive chat as defined by XEP-0136: Message Archiving. /// /// It is used to get chat as a QXmppArchiveChat. /// /// \ingroup Stanzas class QXMPP_EXPORT QXmppArchiveChatIq : public QXmppIq { public: QXmppArchiveChat chat() const; void setChat(const QXmppArchiveChat &chat); QXmppResultSetReply resultSetReply() const; void setResultSetReply(const QXmppResultSetReply &rsm); /// \cond static bool isArchiveChatIq(const QDomElement &element); protected: void parseElementFromChild(const QDomElement &element); void toXmlElementFromChild(QXmlStreamWriter *writer) const; /// \endcond private: QXmppArchiveChat m_chat; QXmppResultSetReply m_rsmReply; }; /// \brief Represents an archive list as defined by XEP-0136: Message Archiving. /// /// \ingroup Stanzas class QXMPP_EXPORT QXmppArchiveListIq : public QXmppIq { public: QXmppArchiveListIq(); QList chats() const; void setChats(const QList &chats); QString with() const; void setWith( const QString &with ); QDateTime start() const; void setStart(const QDateTime &start ); QDateTime end() const; void setEnd(const QDateTime &end ); QXmppResultSetQuery resultSetQuery() const; void setResultSetQuery(const QXmppResultSetQuery &rsm); QXmppResultSetReply resultSetReply() const; void setResultSetReply(const QXmppResultSetReply &rsm); /// \cond static bool isArchiveListIq(const QDomElement &element); /// \endcond protected: /// \cond void parseElementFromChild(const QDomElement &element); void toXmlElementFromChild(QXmlStreamWriter *writer) const; /// \endcond private: QString m_with; QDateTime m_start; QDateTime m_end; QList m_chats; QXmppResultSetQuery m_rsmQuery; QXmppResultSetReply m_rsmReply; }; /// \brief Represents an archive remove IQ as defined by XEP-0136: Message Archiving. /// /// \ingroup Stanzas class QXMPP_EXPORT QXmppArchiveRemoveIq : public QXmppIq { public: QString with() const; void setWith( const QString &with ); QDateTime start() const; void setStart(const QDateTime &start ); QDateTime end() const; void setEnd(const QDateTime &end ); /// \cond static bool isArchiveRemoveIq(const QDomElement &element); protected: void parseElementFromChild(const QDomElement &element); void toXmlElementFromChild(QXmlStreamWriter *writer) const; /// \endcond private: QString m_with; QDateTime m_start; QDateTime m_end; }; /// \brief Represents an archive retrieve IQ as defined by XEP-0136: Message Archiving. /// /// \ingroup Stanzas class QXMPP_EXPORT QXmppArchiveRetrieveIq : public QXmppIq { public: QXmppArchiveRetrieveIq(); QDateTime start() const; void setStart(const QDateTime &start); QString with() const; void setWith(const QString &with); QXmppResultSetQuery resultSetQuery() const; void setResultSetQuery(const QXmppResultSetQuery &rsm); /// \cond static bool isArchiveRetrieveIq(const QDomElement &element); protected: void parseElementFromChild(const QDomElement &element); void toXmlElementFromChild(QXmlStreamWriter *writer) const; /// \endcond private: QString m_with; QDateTime m_start; QXmppResultSetQuery m_rsmQuery; }; /// \brief Represents an archive preference IQ as defined by XEP-0136: Message Archiving. /// /// \ingroup Stanzas class QXMPP_EXPORT QXmppArchivePrefIq : public QXmppIq { public: /// \cond static bool isArchivePrefIq(const QDomElement &element); protected: void parseElementFromChild(const QDomElement &element); void toXmlElementFromChild(QXmlStreamWriter *writer) const; /// \endcond }; #endif // QXMPPARCHIVEIQ_H qxmpp-0.7.6/src/base/QXmppLogger.cpp0000644000175000007640000001443312116723562017235 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Manjeet Dahiya * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include #include #include #include #include #include "QXmppLogger.h" QXmppLogger* QXmppLogger::m_logger = 0; static const char *typeName(QXmppLogger::MessageType type) { switch (type) { case QXmppLogger::DebugMessage: return "DEBUG"; case QXmppLogger::InformationMessage: return "INFO"; case QXmppLogger::WarningMessage: return "WARNING"; case QXmppLogger::ReceivedMessage: return "RECEIVED"; case QXmppLogger::SentMessage: return "SENT"; default: return ""; } } static QString formatted(QXmppLogger::MessageType type, const QString& text) { return QDateTime::currentDateTime().toString() + " " + QString::fromLatin1(typeName(type)) + " " + text; } static void relaySignals(QXmppLoggable *from, QXmppLoggable *to) { QObject::connect(from, SIGNAL(logMessage(QXmppLogger::MessageType,QString)), to, SIGNAL(logMessage(QXmppLogger::MessageType,QString))); QObject::connect(from, SIGNAL(setGauge(QString,double)), to, SIGNAL(setGauge(QString,double))); QObject::connect(from, SIGNAL(updateCounter(QString,qint64)), to, SIGNAL(updateCounter(QString,qint64))); } /// Constructs a new QXmppLoggable. /// /// \param parent QXmppLoggable::QXmppLoggable(QObject *parent) : QObject(parent) { QXmppLoggable *logParent = qobject_cast(parent); if (logParent) { relaySignals(this, logParent); } } /// \cond void QXmppLoggable::childEvent(QChildEvent *event) { QXmppLoggable *child = qobject_cast(event->child()); if (!child) return; if (event->added()) { relaySignals(child, this); } else if (event->removed()) { disconnect(child, SIGNAL(logMessage(QXmppLogger::MessageType,QString)), this, SIGNAL(logMessage(QXmppLogger::MessageType,QString))); disconnect(child, SIGNAL(setGauge(QString,double)), this, SIGNAL(setGauge(QString,double))); disconnect(child, SIGNAL(updateCounter(QString,qint64)), this, SIGNAL(updateCounter(QString,qint64))); } } /// \endcond class QXmppLoggerPrivate { public: QXmppLoggerPrivate(QXmppLogger *qq); QXmppLogger::LoggingType loggingType; QFile *logFile; QString logFilePath; QXmppLogger::MessageTypes messageTypes; private: QXmppLogger *q; }; QXmppLoggerPrivate::QXmppLoggerPrivate(QXmppLogger *qq) : loggingType(QXmppLogger::NoLogging), logFile(0), logFilePath("QXmppClientLog.log"), messageTypes(QXmppLogger::AnyMessage), q(qq) { } /// Constructs a new QXmppLogger. /// /// \param parent QXmppLogger::QXmppLogger(QObject *parent) : QObject(parent) { d = new QXmppLoggerPrivate(this); // make it possible to pass QXmppLogger::MessageType between threads qRegisterMetaType< QXmppLogger::MessageType >("QXmppLogger::MessageType"); } QXmppLogger::~QXmppLogger() { delete d; } /// Returns the default logger. /// QXmppLogger* QXmppLogger::getLogger() { if(!m_logger) m_logger = new QXmppLogger(); return m_logger; } /// Returns the handler for logging messages. /// QXmppLogger::LoggingType QXmppLogger::loggingType() { return d->loggingType; } /// Sets the handler for logging messages. /// /// \param type void QXmppLogger::setLoggingType(QXmppLogger::LoggingType type) { if (d->loggingType != type) { d->loggingType = type; reopen(); } } /// Returns the types of messages to log. /// QXmppLogger::MessageTypes QXmppLogger::messageTypes() { return d->messageTypes; } /// Sets the types of messages to log. /// /// \param types void QXmppLogger::setMessageTypes(QXmppLogger::MessageTypes types) { d->messageTypes = types; } /// Add a logging message. /// /// \param type /// \param text void QXmppLogger::log(QXmppLogger::MessageType type, const QString& text) { // filter messages if (!d->messageTypes.testFlag(type)) return; switch(d->loggingType) { case QXmppLogger::FileLogging: if (!d->logFile) { d->logFile = new QFile(d->logFilePath); d->logFile->open(QIODevice::WriteOnly | QIODevice::Append); } QTextStream(d->logFile) << formatted(type, text) << "\n"; break; case QXmppLogger::StdoutLogging: std::cout << qPrintable(formatted(type, text)) << std::endl; break; case QXmppLogger::SignalLogging: emit message(type, text); break; default: break; } } /// Sets the given \a gauge to \a value. /// /// NOTE: the base implementation does nothing. void QXmppLogger::setGauge(const QString &gauge, double value) { Q_UNUSED(gauge); Q_UNUSED(value); } /// Updates the given \a counter by \a amount. /// /// NOTE: the base implementation does nothing. void QXmppLogger::updateCounter(const QString &counter, qint64 amount) { Q_UNUSED(counter); Q_UNUSED(amount); } /// Returns the path to which logging messages should be written. /// /// \sa loggingType() QString QXmppLogger::logFilePath() { return d->logFilePath; } /// Sets the path to which logging messages should be written. /// /// \param path /// /// \sa setLoggingType() void QXmppLogger::setLogFilePath(const QString &path) { if (d->logFilePath != path) { d->logFilePath = path; reopen(); } } /// If logging to a file, causes the file to be re-opened. /// void QXmppLogger::reopen() { if (d->logFile) { delete d->logFile; d->logFile = 0; } } qxmpp-0.7.6/src/base/QXmppNonSASLAuth.cpp0000644000175000007640000000557112116723562020060 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include #include #include "QXmppConstants.h" #include "QXmppNonSASLAuth.h" #include "QXmppUtils.h" QXmppNonSASLAuthIq::QXmppNonSASLAuthIq() : QXmppIq(QXmppIq::Set) { } QString QXmppNonSASLAuthIq::username() const { return m_username; } void QXmppNonSASLAuthIq::setUsername( const QString &username ) { m_username = username; } QByteArray QXmppNonSASLAuthIq::digest() const { return m_digest; } void QXmppNonSASLAuthIq::setDigest(const QString &streamId, const QString &password) { m_digest = QCryptographicHash::hash(streamId.toUtf8() + password.toUtf8(), QCryptographicHash::Sha1); } QString QXmppNonSASLAuthIq::password() const { return m_password; } void QXmppNonSASLAuthIq::setPassword( const QString &password ) { m_password = password; } QString QXmppNonSASLAuthIq::resource() const { return m_resource; } void QXmppNonSASLAuthIq::setResource(const QString &resource) { m_resource = resource; } /// \cond bool QXmppNonSASLAuthIq::isNonSASLAuthIq(const QDomElement &element) { QDomElement queryElement = element.firstChildElement("query"); return queryElement.namespaceURI() == ns_auth; } void QXmppNonSASLAuthIq::parseElementFromChild(const QDomElement &element) { QDomElement queryElement = element.firstChildElement("query"); m_username = queryElement.firstChildElement("username").text(); m_password = queryElement.firstChildElement("password").text(); m_digest = QByteArray::fromHex(queryElement.firstChildElement("digest").text().toLatin1()); m_resource = queryElement.firstChildElement("resource").text(); } void QXmppNonSASLAuthIq::toXmlElementFromChild(QXmlStreamWriter *writer) const { writer->writeStartElement("query"); writer->writeAttribute("xmlns", ns_auth); if (!m_username.isEmpty()) writer->writeTextElement("username", m_username); if (!m_digest.isEmpty()) writer->writeTextElement("digest", m_digest.toHex()); if (!m_password.isEmpty()) writer->writeTextElement("password", m_password); if (!m_resource.isEmpty()) writer->writeTextElement("resource", m_resource); writer->writeEndElement(); } /// \endcond qxmpp-0.7.6/src/base/QXmppArchiveIq.cpp0000644000175000007640000003463712116723562017701 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include "QXmppArchiveIq.h" #include "QXmppConstants.h" #include "QXmppUtils.h" QXmppArchiveMessage::QXmppArchiveMessage() : m_received(false) { } /// Returns the archived message's body. QString QXmppArchiveMessage::body() const { return m_body; } /// Sets the archived message's body. /// /// \param body void QXmppArchiveMessage::setBody(const QString &body) { m_body = body; } /// Returns the archived message's date. QDateTime QXmppArchiveMessage::date() const { return m_date; } //// Sets the archived message's date. /// /// \param date void QXmppArchiveMessage::setDate(const QDateTime &date) { m_date = date; } /// Returns true if the archived message was received, false if it was sent. bool QXmppArchiveMessage::isReceived() const { return m_received; } /// Set to true if the archived message was received, false if it was sent. /// /// \param isReceived void QXmppArchiveMessage::setReceived(bool isReceived) { m_received = isReceived; } QXmppArchiveChat::QXmppArchiveChat() : m_version(0) { } /// \cond void QXmppArchiveChat::parse(const QDomElement &element) { m_with = element.attribute("with"); m_start = QXmppUtils::datetimeFromString(element.attribute("start")); m_subject = element.attribute("subject"); m_thread = element.attribute("thread"); m_version = element.attribute("version").toInt(); QDateTime timeAccu = m_start; QDomElement child = element.firstChildElement(); while (!child.isNull()) { if ((child.tagName() == "from") || (child.tagName() == "to")) { QXmppArchiveMessage message; message.setBody(child.firstChildElement("body").text()); timeAccu = timeAccu.addSecs(child.attribute("secs").toInt()); message.setDate(timeAccu); message.setReceived(child.tagName() == "from"); m_messages << message; } child = child.nextSiblingElement(); } } void QXmppArchiveChat::toXml(QXmlStreamWriter *writer, const QXmppResultSetReply &rsm) const { writer->writeStartElement("chat"); writer->writeAttribute("xmlns", ns_archive); helperToXmlAddAttribute(writer, "with", m_with); if (m_start.isValid()) helperToXmlAddAttribute(writer, "start", QXmppUtils::datetimeToString(m_start)); helperToXmlAddAttribute(writer, "subject", m_subject); helperToXmlAddAttribute(writer, "thread", m_thread); if (m_version) helperToXmlAddAttribute(writer, "version", QString::number(m_version)); QDateTime prevTime = m_start; foreach (const QXmppArchiveMessage &message, m_messages) { writer->writeStartElement(message.isReceived() ? "from" : "to"); helperToXmlAddAttribute(writer, "secs", QString::number(prevTime.secsTo(message.date()))); writer->writeTextElement("body", message.body()); writer->writeEndElement(); prevTime = message.date(); } if (!rsm.isNull()) rsm.toXml(writer); writer->writeEndElement(); } /// \endcond /// Returns the conversation's messages. QList QXmppArchiveChat::messages() const { return m_messages; } /// Sets the conversation's messages. void QXmppArchiveChat::setMessages(const QList &messages) { m_messages = messages; } /// Returns the start of this conversation. QDateTime QXmppArchiveChat::start() const { return m_start; } /// Sets the start of this conversation. void QXmppArchiveChat::setStart(const QDateTime &start) { m_start = start; } /// Returns the conversation's subject. QString QXmppArchiveChat::subject() const { return m_subject; } /// Sets the conversation's subject. void QXmppArchiveChat::setSubject(const QString &subject) { m_subject = subject; } /// Returns the conversation's thread. QString QXmppArchiveChat::thread() const { return m_thread; } /// Sets the conversation's thread. void QXmppArchiveChat::setThread(const QString &thread) { m_thread = thread; } /// Returns the conversation's version. int QXmppArchiveChat::version() const { return m_version; } /// Sets the conversation's version. void QXmppArchiveChat::setVersion(int version) { m_version = version; } /// Returns the JID of the remote party. QString QXmppArchiveChat::with() const { return m_with; } /// Sets the JID of the remote party. void QXmppArchiveChat::setWith(const QString &with) { m_with = with; } /// Returns the chat conversation carried by this IQ. QXmppArchiveChat QXmppArchiveChatIq::chat() const { return m_chat; } /// Sets the chat conversation carried by this IQ. void QXmppArchiveChatIq::setChat(const QXmppArchiveChat &chat) { m_chat = chat; } /// Returns the result set management reply. /// /// This is used for paging through messages. QXmppResultSetReply QXmppArchiveChatIq::resultSetReply() const { return m_rsmReply; } /// Sets the result set management reply. /// /// This is used for paging through messages. void QXmppArchiveChatIq::setResultSetReply(const QXmppResultSetReply& rsm) { m_rsmReply = rsm; } /// \cond bool QXmppArchiveChatIq::isArchiveChatIq(const QDomElement &element) { QDomElement chatElement = element.firstChildElement("chat"); return !chatElement.attribute("with").isEmpty(); //return (chatElement.namespaceURI() == ns_archive); } void QXmppArchiveChatIq::parseElementFromChild(const QDomElement &element) { QDomElement chatElement = element.firstChildElement("chat"); m_chat.parse(chatElement); m_rsmReply.parse(chatElement); } void QXmppArchiveChatIq::toXmlElementFromChild(QXmlStreamWriter *writer) const { m_chat.toXml(writer, m_rsmReply); } /// \endcond /// Constructs a QXmppArchiveListIq. QXmppArchiveListIq::QXmppArchiveListIq() : QXmppIq(QXmppIq::Get) { } /// Returns the list of chat conversations. QList QXmppArchiveListIq::chats() const { return m_chats; } /// Sets the list of chat conversations. void QXmppArchiveListIq::setChats(const QList &chats) { m_chats = chats; } /// Returns the JID which archived conversations must match. /// QString QXmppArchiveListIq::with() const { return m_with; } /// Sets the JID which archived conversations must match. /// /// \param with void QXmppArchiveListIq::setWith(const QString &with) { m_with = with; } /// Returns the start date/time for the archived conversations. /// QDateTime QXmppArchiveListIq::start() const { return m_start; } /// Sets the start date/time for the archived conversations. /// /// \param start void QXmppArchiveListIq::setStart(const QDateTime &start) { m_start = start; } /// Returns the end date/time for the archived conversations. /// QDateTime QXmppArchiveListIq::end() const { return m_end; } /// Sets the end date/time for the archived conversations. /// /// \param end void QXmppArchiveListIq::setEnd(const QDateTime &end) { m_end = end; } /// Returns the result set management query. /// /// This is used for paging through conversations. QXmppResultSetQuery QXmppArchiveListIq::resultSetQuery() const { return m_rsmQuery; } /// Sets the result set management query. /// /// This is used for paging through conversations. void QXmppArchiveListIq::setResultSetQuery(const QXmppResultSetQuery& rsm) { m_rsmQuery = rsm; } /// Returns the result set management reply. /// /// This is used for paging through conversations. QXmppResultSetReply QXmppArchiveListIq::resultSetReply() const { return m_rsmReply; } /// Sets the result set management reply. /// /// This is used for paging through conversations. void QXmppArchiveListIq::setResultSetReply(const QXmppResultSetReply& rsm) { m_rsmReply = rsm; } /// \cond bool QXmppArchiveListIq::isArchiveListIq(const QDomElement &element) { QDomElement listElement = element.firstChildElement("list"); return (listElement.namespaceURI() == ns_archive); } void QXmppArchiveListIq::parseElementFromChild(const QDomElement &element) { QDomElement listElement = element.firstChildElement("list"); m_with = listElement.attribute("with"); m_start = QXmppUtils::datetimeFromString(listElement.attribute("start")); m_end = QXmppUtils::datetimeFromString(listElement.attribute("end")); m_rsmQuery.parse(listElement); m_rsmReply.parse(listElement); QDomElement child = listElement.firstChildElement(); while (!child.isNull()) { if (child.tagName() == "chat") { QXmppArchiveChat chat; chat.parse(child); m_chats << chat; } child = child.nextSiblingElement(); } } void QXmppArchiveListIq::toXmlElementFromChild(QXmlStreamWriter *writer) const { writer->writeStartElement("list"); writer->writeAttribute("xmlns", ns_archive); if (!m_with.isEmpty()) helperToXmlAddAttribute(writer, "with", m_with); if (m_start.isValid()) helperToXmlAddAttribute(writer, "start", QXmppUtils::datetimeToString(m_start)); if (m_end.isValid()) helperToXmlAddAttribute(writer, "end", QXmppUtils::datetimeToString(m_end)); if (!m_rsmQuery.isNull()) m_rsmQuery.toXml(writer); else if (!m_rsmReply.isNull()) m_rsmReply.toXml(writer); foreach (const QXmppArchiveChat &chat, m_chats) chat.toXml(writer); writer->writeEndElement(); } bool QXmppArchivePrefIq::isArchivePrefIq(const QDomElement &element) { QDomElement prefElement = element.firstChildElement("pref"); return (prefElement.namespaceURI() == ns_archive); } void QXmppArchivePrefIq::parseElementFromChild(const QDomElement &element) { QDomElement queryElement = element.firstChildElement("pref"); Q_UNUSED(queryElement); } void QXmppArchivePrefIq::toXmlElementFromChild(QXmlStreamWriter *writer) const { writer->writeStartElement("pref"); writer->writeAttribute("xmlns", ns_archive); writer->writeEndElement(); } /// \endcond /// Returns the JID which archived conversations must match. /// QString QXmppArchiveRemoveIq::with() const { return m_with; } /// Sets the JID which archived conversations must match. /// /// \param with void QXmppArchiveRemoveIq::setWith(const QString &with) { m_with = with; } /// Returns the start date/time for the archived conversations. /// QDateTime QXmppArchiveRemoveIq::start() const { return m_start; } /// Sets the start date/time for the archived conversations. /// /// \param start void QXmppArchiveRemoveIq::setStart(const QDateTime &start) { m_start = start; } /// Returns the end date/time for the archived conversations. /// QDateTime QXmppArchiveRemoveIq::end() const { return m_end; } /// Sets the end date/time for the archived conversations. /// /// \param end void QXmppArchiveRemoveIq::setEnd(const QDateTime &end) { m_end = end; } /// \cond bool QXmppArchiveRemoveIq::isArchiveRemoveIq(const QDomElement &element) { QDomElement retrieveElement = element.firstChildElement("remove"); return (retrieveElement.namespaceURI() == ns_archive); } void QXmppArchiveRemoveIq::parseElementFromChild(const QDomElement &element) { QDomElement listElement = element.firstChildElement("remove"); m_with = listElement.attribute("with"); m_start = QXmppUtils::datetimeFromString(listElement.attribute("start")); m_end = QXmppUtils::datetimeFromString(listElement.attribute("end")); } void QXmppArchiveRemoveIq::toXmlElementFromChild(QXmlStreamWriter *writer) const { writer->writeStartElement("remove"); writer->writeAttribute("xmlns", ns_archive); if (!m_with.isEmpty()) helperToXmlAddAttribute(writer, "with", m_with); if (m_start.isValid()) helperToXmlAddAttribute(writer, "start", QXmppUtils::datetimeToString(m_start)); if (m_end.isValid()) helperToXmlAddAttribute(writer, "end", QXmppUtils::datetimeToString(m_end)); writer->writeEndElement(); } /// \endcond QXmppArchiveRetrieveIq::QXmppArchiveRetrieveIq() : QXmppIq(QXmppIq::Get) { } /// Returns the start date/time for the archived conversations. /// QDateTime QXmppArchiveRetrieveIq::start() const { return m_start; } /// Sets the start date/time for the archived conversations. /// /// \param start void QXmppArchiveRetrieveIq::setStart(const QDateTime &start) { m_start = start; } /// Returns the JID which archived conversations must match. /// QString QXmppArchiveRetrieveIq::with() const { return m_with; } /// Sets the JID which archived conversations must match. /// /// \param with void QXmppArchiveRetrieveIq::setWith(const QString &with) { m_with = with; } /// Returns the result set management query. /// /// This is used for paging through messages. QXmppResultSetQuery QXmppArchiveRetrieveIq::resultSetQuery() const { return m_rsmQuery; } /// Sets the result set management query. /// /// This is used for paging through messages. void QXmppArchiveRetrieveIq::setResultSetQuery(const QXmppResultSetQuery& rsm) { m_rsmQuery = rsm; } /// \cond bool QXmppArchiveRetrieveIq::isArchiveRetrieveIq(const QDomElement &element) { QDomElement retrieveElement = element.firstChildElement("retrieve"); return (retrieveElement.namespaceURI() == ns_archive); } void QXmppArchiveRetrieveIq::parseElementFromChild(const QDomElement &element) { QDomElement retrieveElement = element.firstChildElement("retrieve"); m_with = retrieveElement.attribute("with"); m_start = QXmppUtils::datetimeFromString(retrieveElement.attribute("start")); m_rsmQuery.parse(retrieveElement); } void QXmppArchiveRetrieveIq::toXmlElementFromChild(QXmlStreamWriter *writer) const { writer->writeStartElement("retrieve"); writer->writeAttribute("xmlns", ns_archive); helperToXmlAddAttribute(writer, "with", m_with); helperToXmlAddAttribute(writer, "start", QXmppUtils::datetimeToString(m_start)); if (!m_rsmQuery.isNull()) m_rsmQuery.toXml(writer); writer->writeEndElement(); } /// \endcond qxmpp-0.7.6/src/base/QXmppPingIq.cpp0000644000175000007640000000240212116723562017176 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "QXmppConstants.h" #include "QXmppPingIq.h" #include "QXmppUtils.h" #include QXmppPingIq::QXmppPingIq() : QXmppIq(QXmppIq::Get) { } bool QXmppPingIq::isPingIq(const QDomElement &element) { QDomElement pingElement = element.firstChildElement("ping"); return (element.attribute("type") == "get" && pingElement.namespaceURI() == ns_ping); } void QXmppPingIq::toXmlElementFromChild(QXmlStreamWriter *writer) const { writer->writeStartElement("ping"); writer->writeAttribute("xmlns", ns_ping); writer->writeEndElement(); } qxmpp-0.7.6/src/base/QXmppCodec.cpp0000644000175000007640000011146512116723562017036 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ /* * G.711 based on reference implementation by Sun Microsystems, Inc. */ #include #include #include #include "QXmppCodec_p.h" #include "QXmppRtpChannel.h" #include #ifdef QXMPP_USE_SPEEX #include #endif #ifdef QXMPP_USE_THEORA #include #include #endif #ifdef QXMPP_USE_VPX #define VPX_CODEC_DISABLE_COMPAT 1 #include #include #include #include #endif #define BIAS (0x84) /* Bias for linear code. */ #define CLIP 8159 #define SIGN_BIT (0x80) /* Sign bit for a A-law byte. */ #define QUANT_MASK (0xf) /* Quantization field mask. */ #define NSEGS (8) /* Number of A-law segments. */ #define SEG_SHIFT (4) /* Left shift for segment number. */ #define SEG_MASK (0x70) /* Segment field mask. */ enum FragmentType { NoFragment = 0, StartFragment, MiddleFragment, EndFragment, }; static qint16 seg_aend[8] = {0x1F, 0x3F, 0x7F, 0xFF, 0x1FF, 0x3FF, 0x7FF, 0xFFF}; static qint16 seg_uend[8] = {0x3F, 0x7F, 0xFF, 0x1FF, 0x3FF, 0x7FF, 0xFFF, 0x1FFF}; static qint16 search(qint16 val, qint16 *table, qint16 size) { qint16 i; for (i = 0; i < size; i++) { if (val <= *table++) return (i); } return (size); } /* * linear2alaw() - Convert a 16-bit linear PCM value to 8-bit A-law * * Accepts a 16-bit integer and encodes it as A-law data. * * Linear Input Code Compressed Code * ------------------------ --------------- * 0000000wxyza 000wxyz * 0000001wxyza 001wxyz * 000001wxyzab 010wxyz * 00001wxyzabc 011wxyz * 0001wxyzabcd 100wxyz * 001wxyzabcde 101wxyz * 01wxyzabcdef 110wxyz * 1wxyzabcdefg 111wxyz * * For further information see John C. Bellamy's Digital Telephony, 1982, * John Wiley & Sons, pps 98-111 and 472-476. */ static quint8 linear2alaw(qint16 pcm_val) { qint16 mask; qint16 seg; quint8 aval; pcm_val = pcm_val >> 3; if (pcm_val >= 0) { mask = 0xD5; /* sign (7th) bit = 1 */ } else { mask = 0x55; /* sign bit = 0 */ pcm_val = -pcm_val - 1; } /* Convert the scaled magnitude to segment number. */ seg = search(pcm_val, seg_aend, 8); /* Combine the sign, segment, and quantization bits. */ if (seg >= 8) /* out of range, return maximum value. */ return (quint8) (0x7F ^ mask); else { aval = (quint8) seg << SEG_SHIFT; if (seg < 2) aval |= (pcm_val >> 1) & QUANT_MASK; else aval |= (pcm_val >> seg) & QUANT_MASK; return (aval ^ mask); } } /* * alaw2linear() - Convert an A-law value to 16-bit linear PCM * */ static qint16 alaw2linear(quint8 a_val) { qint16 t; qint16 seg; a_val ^= 0x55; t = (a_val & QUANT_MASK) << 4; seg = ((qint16)a_val & SEG_MASK) >> SEG_SHIFT; switch (seg) { case 0: t += 8; break; case 1: t += 0x108; break; default: t += 0x108; t <<= seg - 1; } return ((a_val & SIGN_BIT) ? t : -t); } /* * linear2ulaw() - Convert a linear PCM value to u-law * * In order to simplify the encoding process, the original linear magnitude * is biased by adding 33 which shifts the encoding range from (0 - 8158) to * (33 - 8191). The result can be seen in the following encoding table: * * Biased Linear Input Code Compressed Code * ------------------------ --------------- * 00000001wxyza 000wxyz * 0000001wxyzab 001wxyz * 000001wxyzabc 010wxyz * 00001wxyzabcd 011wxyz * 0001wxyzabcde 100wxyz * 001wxyzabcdef 101wxyz * 01wxyzabcdefg 110wxyz * 1wxyzabcdefgh 111wxyz * * Each biased linear code has a leading 1 which identifies the segment * number. The value of the segment number is equal to 7 minus the number * of leading 0's. The quantization interval is directly available as the * four bits wxyz. * The trailing bits (a - h) are ignored. * * Ordinarily the complement of the resulting code word is used for * transmission, and so the code word is complemented before it is returned. * * For further information see John C. Bellamy's Digital Telephony, 1982, * John Wiley & Sons, pps 98-111 and 472-476. */ static quint8 linear2ulaw(qint16 pcm_val) { qint16 mask; qint16 seg; quint8 uval; /* Get the sign and the magnitude of the value. */ pcm_val = pcm_val >> 2; if (pcm_val < 0) { pcm_val = -pcm_val; mask = 0x7F; } else { mask = 0xFF; } if (pcm_val > CLIP) pcm_val = CLIP; /* clip the magnitude */ pcm_val += (BIAS >> 2); /* Convert the scaled magnitude to segment number. */ seg = search(pcm_val, seg_uend, 8); /* * Combine the sign, segment, quantization bits; * and complement the code word. */ if (seg >= 8) /* out of range, return maximum value. */ return (quint8) (0x7F ^ mask); else { uval = (quint8) (seg << 4) | ((pcm_val >> (seg + 1)) & 0xF); return (uval ^ mask); } } /* * ulaw2linear() - Convert a u-law value to 16-bit linear PCM * * First, a biased linear code is derived from the code word. An unbiased * output can then be obtained by subtracting 33 from the biased code. * * Note that this function expects to be passed the complement of the * original code word. This is in keeping with ISDN conventions. */ static qint16 ulaw2linear(quint8 u_val) { qint16 t; /* Complement to obtain normal u-law value. */ u_val = ~u_val; /* * Extract and bias the quantization bits. Then * shift up by the segment number and subtract out the bias. */ t = ((u_val & QUANT_MASK) << 3) + BIAS; t <<= ((unsigned)u_val & SEG_MASK) >> SEG_SHIFT; return ((u_val & SIGN_BIT) ? (BIAS - t) : (t - BIAS)); } QXmppCodec::~QXmppCodec() { } QXmppVideoDecoder::~QXmppVideoDecoder() { } QXmppVideoEncoder::~QXmppVideoEncoder() { } QXmppG711aCodec::QXmppG711aCodec(int clockrate) { m_frequency = clockrate; } qint64 QXmppG711aCodec::encode(QDataStream &input, QDataStream &output) { qint64 samples = 0; qint16 pcm; while (!input.atEnd()) { input >> pcm; output << linear2alaw(pcm); ++samples; } return samples; } qint64 QXmppG711aCodec::decode(QDataStream &input, QDataStream &output) { qint64 samples = 0; quint8 g711; while (!input.atEnd()) { input >> g711; output << alaw2linear(g711); ++samples; } return samples; } QXmppG711uCodec::QXmppG711uCodec(int clockrate) { m_frequency = clockrate; } qint64 QXmppG711uCodec::encode(QDataStream &input, QDataStream &output) { qint64 samples = 0; qint16 pcm; while (!input.atEnd()) { input >> pcm; output << linear2ulaw(pcm); ++samples; } return samples; } qint64 QXmppG711uCodec::decode(QDataStream &input, QDataStream &output) { qint64 samples = 0; quint8 g711; while (!input.atEnd()) { input >> g711; output << ulaw2linear(g711); ++samples; } return samples; } #ifdef QXMPP_USE_SPEEX QXmppSpeexCodec::QXmppSpeexCodec(int clockrate) { const SpeexMode *mode = &speex_nb_mode; if (clockrate == 32000) mode = &speex_uwb_mode; else if (clockrate == 16000) mode = &speex_wb_mode; else if (clockrate == 8000) mode = &speex_nb_mode; else qWarning() << "QXmppSpeexCodec got invalid clockrate" << clockrate; // encoder encoder_bits = new SpeexBits; speex_bits_init(encoder_bits); encoder_state = speex_encoder_init(mode); // decoder decoder_bits = new SpeexBits; speex_bits_init(decoder_bits); decoder_state = speex_decoder_init(mode); // get frame size in samples speex_encoder_ctl(encoder_state, SPEEX_GET_FRAME_SIZE, &frame_samples); } QXmppSpeexCodec::~QXmppSpeexCodec() { delete encoder_bits; delete decoder_bits; } qint64 QXmppSpeexCodec::encode(QDataStream &input, QDataStream &output) { QByteArray pcm_buffer(frame_samples * 2, 0); const int length = input.readRawData(pcm_buffer.data(), pcm_buffer.size()); if (length != pcm_buffer.size()) { qWarning() << "Read only read" << length << "bytes"; return 0; } speex_bits_reset(encoder_bits); speex_encode_int(encoder_state, (short*)pcm_buffer.data(), encoder_bits); QByteArray speex_buffer(speex_bits_nbytes(encoder_bits), 0); speex_bits_write(encoder_bits, speex_buffer.data(), speex_buffer.size()); output.writeRawData(speex_buffer.data(), speex_buffer.size()); return frame_samples; } qint64 QXmppSpeexCodec::decode(QDataStream &input, QDataStream &output) { const int length = input.device()->bytesAvailable(); QByteArray speex_buffer(length, 0); input.readRawData(speex_buffer.data(), speex_buffer.size()); speex_bits_read_from(decoder_bits, speex_buffer.data(), speex_buffer.size()); QByteArray pcm_buffer(frame_samples * 2, 0); speex_decode_int(decoder_state, decoder_bits, (short*)pcm_buffer.data()); output.writeRawData(pcm_buffer.data(), pcm_buffer.size()); return frame_samples; } #endif #ifdef QXMPP_USE_THEORA class QXmppTheoraDecoderPrivate { public: bool decodeFrame(const QByteArray &buffer, QXmppVideoFrame *frame); th_comment comment; th_info info; th_setup_info *setup_info; th_dec_ctx *ctx; QByteArray packetBuffer; }; bool QXmppTheoraDecoderPrivate::decodeFrame(const QByteArray &buffer, QXmppVideoFrame *frame) { if (!ctx) return false; ogg_packet packet; packet.packet = (unsigned char*) buffer.data(); packet.bytes = buffer.size(); packet.b_o_s = 1; packet.e_o_s = 0; packet.granulepos = -1; packet.packetno = 0; if (th_decode_packetin(ctx, &packet, 0) != 0) { qWarning("Theora packet could not be decoded"); return false; } th_ycbcr_buffer ycbcr_buffer; if (th_decode_ycbcr_out(ctx, ycbcr_buffer) != 0) { qWarning("Theora packet has no Y'CbCr"); return false; } if (info.pixel_fmt == TH_PF_420) { if (!frame->isValid()) { const int bytes = ycbcr_buffer[0].stride * ycbcr_buffer[0].height + ycbcr_buffer[1].stride * ycbcr_buffer[1].height + ycbcr_buffer[2].stride * ycbcr_buffer[2].height; *frame = QXmppVideoFrame(bytes, QSize(ycbcr_buffer[0].width, ycbcr_buffer[0].height), ycbcr_buffer[0].stride, QXmppVideoFrame::Format_YUV420P); } uchar *output = frame->bits(); for (int i = 0; i < 3; ++i) { const int length = ycbcr_buffer[i].stride * ycbcr_buffer[i].height; memcpy(output, ycbcr_buffer[i].data, length); output += length; } return true; } else if (info.pixel_fmt == TH_PF_422) { if (!frame->isValid()) { const int bytes = ycbcr_buffer[0].width * ycbcr_buffer[0].height * 2; *frame = QXmppVideoFrame(bytes, QSize(ycbcr_buffer[0].width, ycbcr_buffer[0].height), ycbcr_buffer[0].width * 2, QXmppVideoFrame::Format_YUYV); } // YUV 4:2:2 packing const int width = ycbcr_buffer[0].width; const int height = ycbcr_buffer[0].height; const int y_stride = ycbcr_buffer[0].stride; const int c_stride = ycbcr_buffer[1].stride; const uchar *y_row = ycbcr_buffer[0].data; const uchar *cb_row = ycbcr_buffer[1].data; const uchar *cr_row = ycbcr_buffer[2].data; uchar *output = frame->bits(); for (int y = 0; y < height; ++y) { const uchar *y_ptr = y_row; const uchar *cb_ptr = cb_row; const uchar *cr_ptr = cr_row; for (int x = 0; x < width; x += 2) { *(output++) = *(y_ptr++); *(output++) = *(cb_ptr++); *(output++) = *(y_ptr++); *(output++) = *(cr_ptr++); } y_row += y_stride; cb_row += c_stride; cr_row += c_stride; } return true; } else { qWarning("Theora decoder received an unsupported frame format"); return false; } } QXmppTheoraDecoder::QXmppTheoraDecoder() { d = new QXmppTheoraDecoderPrivate; th_comment_init(&d->comment); th_info_init(&d->info); d->setup_info = 0; d->ctx = 0; } QXmppTheoraDecoder::~QXmppTheoraDecoder() { th_comment_clear(&d->comment); th_info_clear(&d->info); if (d->setup_info) th_setup_free(d->setup_info); if (d->ctx) th_decode_free(d->ctx); delete d; } QXmppVideoFormat QXmppTheoraDecoder::format() const { QXmppVideoFormat format; format.setFrameSize(QSize(d->info.frame_width, d->info.frame_height)); if (d->info.pixel_fmt == TH_PF_420) format.setPixelFormat(QXmppVideoFrame::Format_YUV420P); else if (d->info.pixel_fmt == TH_PF_422) format.setPixelFormat(QXmppVideoFrame::Format_YUYV); else format.setPixelFormat(QXmppVideoFrame::Format_Invalid); if (d->info.fps_denominator > 0) format.setFrameRate(qreal(d->info.fps_numerator) / qreal(d->info.fps_denominator)); return format; } QList QXmppTheoraDecoder::handlePacket(const QXmppRtpPacket &packet) { QList frames; // theora deframing: draft-ietf-avt-rtp-theora-00 QDataStream stream(packet.payload); quint32 theora_header; stream >> theora_header; quint32 theora_ident = (theora_header >> 8) & 0xffffff; Q_UNUSED(theora_ident); quint8 theora_frag = (theora_header & 0xc0) >> 6; quint8 theora_type = (theora_header & 0x30) >> 4; quint8 theora_packets = (theora_header & 0x0f); //qDebug("ident: 0x%08x, F: %d, TDT: %d, packets: %d", theora_ident, theora_frag, theora_type, theora_packets); // We only handle raw theora data if (theora_type != 0) return frames; QXmppVideoFrame frame; quint16 packetLength; if (theora_frag == NoFragment) { // unfragmented packet(s) for (int i = 0; i < theora_packets; ++i) { stream >> packetLength; if (packetLength > stream.device()->bytesAvailable()) { qWarning("Theora unfragmented packet has an invalid length"); return frames; } d->packetBuffer.resize(packetLength); stream.readRawData(d->packetBuffer.data(), packetLength); if (d->decodeFrame(d->packetBuffer, &frame)) frames << frame; d->packetBuffer.resize(0); } } else { // fragments stream >> packetLength; if (packetLength > stream.device()->bytesAvailable()) { qWarning("Theora packet has an invalid length"); return frames; } int pos; if (theora_frag == StartFragment) { // start fragment pos = 0; d->packetBuffer.resize(packetLength); } else { // continuation or end fragment pos = d->packetBuffer.size(); d->packetBuffer.resize(pos + packetLength); } stream.readRawData(d->packetBuffer.data() + pos, packetLength); if (theora_frag == EndFragment) { // end fragment if (d->decodeFrame(d->packetBuffer, &frame)) frames << frame; d->packetBuffer.resize(0); } } return frames; } bool QXmppTheoraDecoder::setParameters(const QMap ¶meters) { QByteArray config = QByteArray::fromBase64(parameters.value("configuration").toLatin1()); QDataStream stream(config); const QIODevice *device = stream.device(); if (device->bytesAvailable() < 4) { qWarning("Theora configuration is too small"); return false; } // Process packed headers int done = 0; quint32 header_count; stream >> header_count; for (quint32 i = 0; i < header_count; ++i) { if (device->bytesAvailable() < 6) { qWarning("Theora configuration is too small"); return false; } QByteArray ident(3, 0); quint16 length; quint8 h_count; stream.readRawData(ident.data(), ident.size()); stream >> length; stream >> h_count; #ifdef QXMPP_DEBUG_THEORA qDebug("Theora packed header %u ident=%s bytes=%u count=%u", i, ident.toHex().data(), length, h_count); #endif // get header sizes QList h_sizes; for (int h = 0; h < h_count; ++h) { quint16 h_size = 0; quint8 b; do { if (device->bytesAvailable() < 1) { qWarning("Theora configuration is too small"); return false; } stream >> b; h_size = (h_size << 7) | (b & 0x7f); } while (b & 0x80); h_sizes << h_size; #ifdef QXMPP_DEBUG_THEORA qDebug("Theora header %d size %u", h_sizes.size() - 1, h_sizes.last()); #endif length -= h_size; } h_sizes << length; #ifdef QXMPP_DEBUG_THEORA qDebug("Theora header %d size %u", h_sizes.size() - 1, h_sizes.last()); #endif // decode headers ogg_packet packet; packet.b_o_s = 1; packet.e_o_s = 0; packet.granulepos = -1; packet.packetno = 0; foreach (int h_size, h_sizes) { if (device->bytesAvailable() < h_size) { qWarning("Theora configuration is too small"); return false; } packet.packet = (unsigned char*) (config.data() + device->pos()); packet.bytes = h_size; int ret = th_decode_headerin(&d->info, &d->comment, &d->setup_info, &packet); if (ret < 0) { qWarning("Theora header could not be decoded"); return false; } done += ret; stream.skipRawData(h_size); } } // check for completion if (done < 3) { qWarning("Theora configuration did not contain enough headers"); return false; } #ifdef QXMPP_DEBUG_THEORA qDebug("Theora frame_width %i, frame_height %i, colorspace %i, pixel_fmt: %i, target_bitrate: %i, quality: %i, keyframe_granule_shift: %i", d->info.frame_width, d->info.frame_height, d->info.colorspace, d->info.pixel_fmt, d->info.target_bitrate, d->info.quality, d->info.keyframe_granule_shift); #endif if (d->info.pixel_fmt != TH_PF_420 && d->info.pixel_fmt != TH_PF_422) { qWarning("Theora frames have an unsupported pixel format %d", d->info.pixel_fmt); return false; } if (d->ctx) th_decode_free(d->ctx); d->ctx = th_decode_alloc(&d->info, d->setup_info); if (!d->ctx) { qWarning("Theora decoder could not be allocated"); return false; } return true; } class QXmppTheoraEncoderPrivate { public: void writeFragment(QDataStream &stream, FragmentType frag_type, quint8 theora_packets, const char *data, quint16 length); th_comment comment; th_info info; th_setup_info *setup_info; th_enc_ctx *ctx; th_ycbcr_buffer ycbcr_buffer; QByteArray buffer; QByteArray configuration; QByteArray ident; }; void QXmppTheoraEncoderPrivate::writeFragment(QDataStream &stream, FragmentType frag_type, quint8 theora_packets, const char *data, quint16 length) { // theora framing: draft-ietf-avt-rtp-theora-00 const quint8 theora_type = 0; // raw data stream.writeRawData(ident.constData(), ident.size()); stream << quint8(((frag_type << 6) & 0xc0) | ((theora_type << 4) & 0x30) | (theora_packets & 0x0f)); stream << quint16(length); stream.writeRawData(data, length); } QXmppTheoraEncoder::QXmppTheoraEncoder() { d = new QXmppTheoraEncoderPrivate; d->ident = QByteArray("\xc3\x45\xae"); th_comment_init(&d->comment); th_info_init(&d->info); d->setup_info = 0; d->ctx = 0; } QXmppTheoraEncoder::~QXmppTheoraEncoder() { th_comment_clear(&d->comment); th_info_clear(&d->info); if (d->setup_info) th_setup_free(d->setup_info); if (d->ctx) th_encode_free(d->ctx); delete d; } bool QXmppTheoraEncoder::setFormat(const QXmppVideoFormat &format) { const QXmppVideoFrame::PixelFormat pixelFormat = format.pixelFormat(); if ((pixelFormat != QXmppVideoFrame::Format_YUV420P) && (pixelFormat != QXmppVideoFrame::Format_YUYV)) { qWarning("Theora encoder does not support the given format"); return false; } d->info.frame_width = format.frameSize().width(); d->info.frame_height = format.frameSize().height(); d->info.pic_height = format.frameSize().height(); d->info.pic_width = format.frameSize().width(); d->info.pic_x = 0; d->info.pic_y = 0; d->info.colorspace = TH_CS_UNSPECIFIED; d->info.target_bitrate = 0; d->info.quality = 48; d->info.keyframe_granule_shift = 6; // FIXME: how do we handle floating point frame rates? d->info.fps_numerator = format.frameRate(); d->info.fps_denominator = 1; if (pixelFormat == QXmppVideoFrame::Format_YUV420P) { d->info.pixel_fmt = TH_PF_420; d->ycbcr_buffer[0].width = d->info.frame_width; d->ycbcr_buffer[0].height = d->info.frame_height; d->ycbcr_buffer[1].width = d->ycbcr_buffer[0].width / 2; d->ycbcr_buffer[1].height = d->ycbcr_buffer[0].height / 2; d->ycbcr_buffer[2].width = d->ycbcr_buffer[1].width; d->ycbcr_buffer[2].height = d->ycbcr_buffer[1].height; } else if (pixelFormat == QXmppVideoFrame::Format_YUYV) { d->info.pixel_fmt = TH_PF_422; d->buffer.resize(d->info.frame_width * d->info.frame_height * 2); d->ycbcr_buffer[0].width = d->info.frame_width; d->ycbcr_buffer[0].height = d->info.frame_height; d->ycbcr_buffer[0].stride = d->info.frame_width; d->ycbcr_buffer[0].data = (uchar*) d->buffer.data(); d->ycbcr_buffer[1].width = d->ycbcr_buffer[0].width / 2; d->ycbcr_buffer[1].height = d->ycbcr_buffer[0].height; d->ycbcr_buffer[1].stride = d->ycbcr_buffer[0].stride / 2; d->ycbcr_buffer[1].data = d->ycbcr_buffer[0].data + d->ycbcr_buffer[0].stride * d->ycbcr_buffer[0].height; d->ycbcr_buffer[2].width = d->ycbcr_buffer[1].width; d->ycbcr_buffer[2].height = d->ycbcr_buffer[1].height; d->ycbcr_buffer[2].stride = d->ycbcr_buffer[1].stride; d->ycbcr_buffer[2].data = d->ycbcr_buffer[1].data + d->ycbcr_buffer[1].stride * d->ycbcr_buffer[1].height; } // create encoder if (d->ctx) { th_encode_free(d->ctx); d->ctx = 0; } d->ctx = th_encode_alloc(&d->info); if (!d->ctx) { qWarning("Theora encoder could not be allocated"); return false; } // fetch headers QList headers; ogg_packet packet; while (th_encode_flushheader(d->ctx, &d->comment, &packet) > 0) headers << QByteArray((const char*)packet.packet, packet.bytes); // store configuration d->configuration.clear(); QDataStream stream(&d->configuration, QIODevice::WriteOnly); stream << quint32(1); quint16 length = 0; foreach (const QByteArray &header, headers) length += header.size(); quint8 h_count = headers.size() - 1; stream.writeRawData(d->ident.constData(), d->ident.size()); stream << length; stream << h_count; #ifdef QXMPP_DEBUG_THEORA qDebug("Theora packed header %u ident=%s bytes=%u count=%u", 0, d->ident.toHex().data(), length, h_count); #endif // write header sizes for (int h = 0; h < h_count; ++h) { quint16 h_size = headers[h].size(); do { quint8 b = (h_size & 0x7f); h_size >>= 7; if (h_size) b |= 0x80; stream << b; } while (h_size); } // write headers for (int h = 0; h < headers.size(); ++h) { #ifdef QXMPP_DEBUG_THEORA qDebug("Header %d size %d", h, headers[h].size()); #endif stream.writeRawData(headers[h].data(), headers[h].size()); } return true; } QList QXmppTheoraEncoder::handleFrame(const QXmppVideoFrame &frame) { QList packets; const int PACKET_MAX = 1388; if (!d->ctx) return packets; if (d->info.pixel_fmt == TH_PF_420) { d->ycbcr_buffer[0].stride = frame.bytesPerLine(); d->ycbcr_buffer[0].data = (unsigned char*) frame.bits(); d->ycbcr_buffer[1].stride = d->ycbcr_buffer[0].stride / 2; d->ycbcr_buffer[1].data = d->ycbcr_buffer[0].data + d->ycbcr_buffer[0].stride * d->ycbcr_buffer[0].height; d->ycbcr_buffer[2].stride = d->ycbcr_buffer[1].stride; d->ycbcr_buffer[2].data = d->ycbcr_buffer[1].data + d->ycbcr_buffer[1].stride * d->ycbcr_buffer[1].height; } else if (d->info.pixel_fmt == TH_PF_422) { // YUV 4:2:2 unpacking const int width = frame.width(); const int height = frame.height(); const int stride = frame.bytesPerLine(); const uchar *row = frame.bits(); uchar *y_out = d->ycbcr_buffer[0].data; uchar *cb_out = d->ycbcr_buffer[1].data; uchar *cr_out = d->ycbcr_buffer[2].data; for (int y = 0; y < height; ++y) { const uchar *ptr = row; for (int x = 0; x < width; x += 2) { *(y_out++) = *(ptr++); *(cb_out++) = *(ptr++); *(y_out++) = *(ptr++); *(cr_out++) = *(ptr++); } row += stride; } } else { qWarning("Theora encoder received an unsupported frame format"); return packets; } if (th_encode_ycbcr_in(d->ctx, d->ycbcr_buffer) != 0) { qWarning("Theora encoder could not handle frame"); return packets; } QByteArray payload; ogg_packet packet; while (th_encode_packetout(d->ctx, 0, &packet) > 0) { #ifdef QXMPP_DEBUG_THEORA qDebug("Theora encoded packet %d bytes", packet.bytes); #endif QDataStream stream(&payload, QIODevice::WriteOnly); const char *data = (const char*) packet.packet; int size = packet.bytes; if (size <= PACKET_MAX) { // no fragmentation stream.device()->reset(); payload.resize(0); d->writeFragment(stream, NoFragment, 1, data, size); packets << payload; } else { // fragmentation FragmentType frag_type = StartFragment; while (size) { const int length = qMin(PACKET_MAX, size); stream.device()->reset(); payload.resize(0); d->writeFragment(stream, frag_type, 0, data, length); data += length; size -= length; frag_type = (size > PACKET_MAX) ? MiddleFragment : EndFragment; packets << payload; } } } return packets; } QMap QXmppTheoraEncoder::parameters() const { QMap params; if (d->ctx) { params.insert("delivery-method", "inline"); params.insert("configuration", d->configuration.toBase64()); } return params; } #endif #ifdef QXMPP_USE_VPX class QXmppVpxDecoderPrivate { public: bool decodeFrame(const QByteArray &buffer, QXmppVideoFrame *frame); vpx_codec_ctx_t codec; QByteArray packetBuffer; }; bool QXmppVpxDecoderPrivate::decodeFrame(const QByteArray &buffer, QXmppVideoFrame *frame) { if (vpx_codec_decode(&codec, (const uint8_t*)buffer.constData(), buffer.size(), NULL, 0) != VPX_CODEC_OK) { qWarning("Vpx packet could not be decoded: %s", vpx_codec_error_detail(&codec)); return false; } vpx_codec_iter_t iter = NULL; vpx_image_t *img; while ((img = vpx_codec_get_frame(&codec, &iter))) { if (img->fmt == VPX_IMG_FMT_I420) { if (!frame->isValid()) { const int bytes = img->d_w * img->d_h * 3 / 2; *frame = QXmppVideoFrame(bytes, QSize(img->d_w, img->d_h), img->d_w, QXmppVideoFrame::Format_YUV420P); } uchar *output = frame->bits(); for (int i = 0; i < 3; ++i) { uchar *input = img->planes[i]; const int div = (i == 0) ? 1 : 2; for (unsigned int y = 0; y < img->d_h / div; ++y) { memcpy(output, input, img->d_w / div); input += img->stride[i]; output += img->d_w / div; } } } else { qWarning("Vpx decoder received an unsupported frame format: %d", img->fmt); } } return true; } QXmppVpxDecoder::QXmppVpxDecoder() { d = new QXmppVpxDecoderPrivate; if (vpx_codec_dec_init(&d->codec, vpx_codec_vp8_dx(), NULL, 0) != VPX_CODEC_OK) { qWarning("Vpx decoder could not be initialised"); } } QXmppVpxDecoder::~QXmppVpxDecoder() { vpx_codec_destroy(&d->codec); delete d; } QXmppVideoFormat QXmppVpxDecoder::format() const { QXmppVideoFormat format; format.setFrameRate(15.0); format.setFrameSize(QSize(320, 240)); format.setPixelFormat(QXmppVideoFrame::Format_YUV420P); return format; } QList QXmppVpxDecoder::handlePacket(const QXmppRtpPacket &packet) { QList frames; // vp8 deframing: http://tools.ietf.org/html/draft-westin-payload-vp8-00 QDataStream stream(packet.payload); quint8 vpx_header; stream >> vpx_header; const bool have_id = (vpx_header & 0x10) != 0; const quint8 frag_type = (vpx_header & 0x6) >> 1; if (have_id) { qWarning("Vpx decoder does not support pictureId yet"); return frames; } const int packetLength = packet.payload.size() - 1; #ifdef QXMPP_DEBUG_VPX qDebug("Vpx fragment FI: %d, size %d", frag_type, packetLength); #endif QXmppVideoFrame frame; if (frag_type == NoFragment) { // unfragmented packet if (d->decodeFrame(packet.payload.mid(1), &frame)) frames << frame; d->packetBuffer.resize(0); } else { // fragments if (frag_type == StartFragment) { // start fragment d->packetBuffer = packet.payload.mid(1); } else { // continuation or end fragment const int packetPos = d->packetBuffer.size(); d->packetBuffer.resize(packetPos + packetLength); stream.readRawData(d->packetBuffer.data() + packetPos, packetLength); } if (frag_type == EndFragment) { // end fragment if (d->decodeFrame(d->packetBuffer, &frame)) frames << frame; d->packetBuffer.resize(0); } } return frames; } bool QXmppVpxDecoder::setParameters(const QMap ¶meters) { return true; } class QXmppVpxEncoderPrivate { public: void writeFragment(QDataStream &stream, FragmentType frag_type, const char *data, quint16 length); vpx_codec_ctx_t codec; vpx_codec_enc_cfg_t cfg; vpx_image_t *imageBuffer; int frameCount; }; void QXmppVpxEncoderPrivate::writeFragment(QDataStream &stream, FragmentType frag_type, const char *data, quint16 length) { // vp8 framing: http://tools.ietf.org/html/draft-westin-payload-vp8-00 #ifdef QXMPP_DEBUG_VPX qDebug("Vpx encoder writing packet frag: %i, size: %u", frag_type, length); #endif stream << quint8(((frag_type << 1) & 0x6) | (frag_type == NoFragment || frag_type == StartFragment)); stream.writeRawData(data, length); } QXmppVpxEncoder::QXmppVpxEncoder() { d = new QXmppVpxEncoderPrivate; d->frameCount = 0; d->imageBuffer = 0; vpx_codec_enc_config_default(vpx_codec_vp8_cx(), &d->cfg, 0); } QXmppVpxEncoder::~QXmppVpxEncoder() { vpx_codec_destroy(&d->codec); if (d->imageBuffer) vpx_img_free(d->imageBuffer); delete d; } bool QXmppVpxEncoder::setFormat(const QXmppVideoFormat &format) { const QXmppVideoFrame::PixelFormat pixelFormat = format.pixelFormat(); if (pixelFormat != QXmppVideoFrame::Format_YUYV) { qWarning("Vpx encoder does not support the given format"); return false; } d->cfg.rc_target_bitrate = format.frameSize().width() * format.frameSize().height() * d->cfg.rc_target_bitrate / d->cfg.g_w / d->cfg.g_h; d->cfg.g_w = format.frameSize().width(); d->cfg.g_h = format.frameSize().height(); if (vpx_codec_enc_init(&d->codec, vpx_codec_vp8_cx(), &d->cfg, 0) != VPX_CODEC_OK) { qWarning("Vpx encoder could not be initialised"); return false; } d->imageBuffer = vpx_img_alloc(NULL, VPX_IMG_FMT_I420, format.frameSize().width(), format.frameSize().height(), 1); return true; } QList QXmppVpxEncoder::handleFrame(const QXmppVideoFrame &frame) { const int PACKET_MAX = 1388; QList packets; // try to encode frame if (frame.pixelFormat() == QXmppVideoFrame::Format_YUYV) { // YUYV -> YUV420P const int width = frame.width(); const int height = frame.height(); const int stride = frame.bytesPerLine(); const uchar *row = frame.bits(); uchar *y_row = d->imageBuffer->planes[VPX_PLANE_Y]; uchar *cb_row = d->imageBuffer->planes[VPX_PLANE_U]; uchar *cr_row = d->imageBuffer->planes[VPX_PLANE_V]; for (int y = 0; y < height; y += 2) { // odd row const uchar *ptr = row; uchar *y_out = y_row; uchar *cb_out = cb_row; uchar *cr_out = cr_row; for (int x = 0; x < width; x += 2) { *(y_out++) = *(ptr++); *(cb_out++) = *(ptr++); *(y_out++) = *(ptr++); *(cr_out++) = *(ptr++); } row += stride; y_row += d->imageBuffer->stride[VPX_PLANE_Y]; cb_row += d->imageBuffer->stride[VPX_PLANE_U]; cr_row += d->imageBuffer->stride[VPX_PLANE_V]; // even row ptr = row; y_out = y_row; for (int x = 0; x < width; x += 2) { *(y_out++) = *(ptr++); ptr++; *(y_out++) = *(ptr++); ptr++; } row += stride; y_row += d->imageBuffer->stride[VPX_PLANE_Y]; } } else { qWarning("Vpx encoder does not support the given format"); return packets; } if (vpx_codec_encode(&d->codec, d->imageBuffer, d->frameCount, 1, 0, VPX_DL_REALTIME) != VPX_CODEC_OK) { qWarning("Vpx encoder could not handle frame: %s", vpx_codec_error_detail(&d->codec)); return packets; } // extract data QByteArray payload; vpx_codec_iter_t iter = NULL; const vpx_codec_cx_pkt_t *pkt; while ((pkt = vpx_codec_get_cx_data(&d->codec, &iter))) { if (pkt->kind == VPX_CODEC_CX_FRAME_PKT) { #ifdef QXMPP_DEBUG_VPX qDebug("Vpx encoded packet %lu bytes", pkt->data.frame.sz); #endif QDataStream stream(&payload, QIODevice::WriteOnly); const char *data = (const char*) pkt->data.frame.buf; int size = pkt->data.frame.sz; if (size <= PACKET_MAX) { // no fragmentation stream.device()->reset(); payload.resize(0); d->writeFragment(stream, NoFragment, data, size); packets << payload; } else { // fragmentation FragmentType frag_type = StartFragment; while (size) { const int length = qMin(PACKET_MAX, size); stream.device()->reset(); payload.resize(0); d->writeFragment(stream, frag_type, data, length); data += length; size -= length; frag_type = (size > PACKET_MAX) ? MiddleFragment : EndFragment; packets << payload; } } } } d->frameCount++; return packets; } QMap QXmppVpxEncoder::parameters() const { return QMap(); } #endif qxmpp-0.7.6/src/base/QXmppStun.h0000644000175000007640000002660312116723562016416 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPSTUN_H #define QXMPPSTUN_H #include #include "QXmppLogger.h" #include "QXmppJingleIq.h" class QDataStream; class QUdpSocket; class QTimer; /// \internal /// /// The QXmppStunMessage class represents a STUN message. /// class QXMPP_EXPORT QXmppStunMessage { public: enum MethodType { Binding = 0x1, SharedSecret = 0x2, Allocate = 0x3, Refresh = 0x4, Send = 0x6, Data = 0x7, CreatePermission = 0x8, ChannelBind = 0x9, }; enum ClassType { Request = 0x000, Indication = 0x010, Response = 0x100, Error = 0x110, }; QXmppStunMessage(); quint32 cookie() const; void setCookie(quint32 cookie); QByteArray id() const; void setId(const QByteArray &id); quint16 messageClass() const; quint16 messageMethod() const; quint16 type() const; void setType(quint16 type); // attributes quint32 changeRequest() const; void setChangeRequest(quint32 changeRequest); quint16 channelNumber() const; void setChannelNumber(quint16 channelNumber); QByteArray data() const; void setData(const QByteArray &data); quint32 lifetime() const; void setLifetime(quint32 changeRequest); QByteArray nonce() const; void setNonce(const QByteArray &nonce); quint32 priority() const; void setPriority(quint32 priority); QString realm() const; void setRealm(const QString &realm); QByteArray reservationToken() const; void setReservationToken(const QByteArray &reservationToken); quint8 requestedTransport() const; void setRequestedTransport(quint8 requestedTransport); QString software() const; void setSoftware(const QString &software); QString username() const; void setUsername(const QString &username); QByteArray encode(const QByteArray &key = QByteArray(), bool addFingerprint = true) const; bool decode(const QByteArray &buffer, const QByteArray &key = QByteArray(), QStringList *errors = 0); QString toString() const; static quint16 peekType(const QByteArray &buffer, quint32 &cookie, QByteArray &id); // attributes int errorCode; QString errorPhrase; QByteArray iceControlling; QByteArray iceControlled; QHostAddress changedHost; quint16 changedPort; QHostAddress mappedHost; quint16 mappedPort; QHostAddress otherHost; quint16 otherPort; QHostAddress sourceHost; quint16 sourcePort; QHostAddress xorMappedHost; quint16 xorMappedPort; QHostAddress xorPeerHost; quint16 xorPeerPort; QHostAddress xorRelayedHost; quint16 xorRelayedPort; bool useCandidate; private: quint32 m_cookie; QByteArray m_id; quint16 m_type; // attributes QSet m_attributes; quint32 m_changeRequest; quint16 m_channelNumber; QByteArray m_data; quint32 m_lifetime; QByteArray m_nonce; quint32 m_priority; QString m_realm; quint8 m_requestedTransport; QByteArray m_reservationToken; QString m_software; QString m_username; }; /// \internal /// /// The QXmppStunTransaction class represents a STUN transaction. /// class QXMPP_EXPORT QXmppStunTransaction : public QXmppLoggable { Q_OBJECT public: QXmppStunTransaction(const QXmppStunMessage &request, QObject *parent); QXmppStunMessage request() const; QXmppStunMessage response() const; signals: void finished(); void writeStun(const QXmppStunMessage &request); public slots: void readStun(const QXmppStunMessage &response); private slots: void retry(); private: QXmppStunMessage m_request; QXmppStunMessage m_response; QTimer *m_retryTimer; int m_tries; }; /// \internal /// /// The QXmppTurnAllocation class represents a TURN allocation as defined /// by RFC 5766 Traversal Using Relays around NAT (TURN). /// class QXMPP_EXPORT QXmppTurnAllocation : public QXmppLoggable { Q_OBJECT public: enum AllocationState { UnconnectedState, ConnectingState, ConnectedState, ClosingState, }; QXmppTurnAllocation(QObject *parent = 0); ~QXmppTurnAllocation(); QHostAddress relayedHost() const; quint16 relayedPort() const; AllocationState state() const; void setServer(const QHostAddress &host, quint16 port = 3478); void setUser(const QString &user); void setPassword(const QString &password); qint64 writeDatagram(const QByteArray &data, const QHostAddress &host, quint16 port); signals: /// \brief This signal is emitted once TURN allocation succeeds. void connected(); /// \brief This signal is emitted when a data packet is received. void datagramReceived(const QByteArray &data, const QHostAddress &host, quint16 port); /// \brief This signal is emitted when TURN allocation fails. void disconnected(); public slots: void connectToHost(); void disconnectFromHost(); private slots: void readyRead(); void refresh(); void refreshChannels(); void transactionFinished(); void writeStun(const QXmppStunMessage &message); private: void handleDatagram(const QByteArray &datagram, const QHostAddress &host, quint16 port); void setState(AllocationState state); QUdpSocket *socket; QTimer *m_timer; QTimer *m_channelTimer; QString m_password; QString m_username; QHostAddress m_relayedHost; quint16 m_relayedPort; QHostAddress m_turnHost; quint16 m_turnPort; // channels typedef QPair Address; quint16 m_channelNumber; QMap m_channels; // state quint32 m_lifetime; QByteArray m_key; QString m_realm; QByteArray m_nonce; AllocationState m_state; QList m_transactions; }; /// \brief The QXmppIceComponent class represents a piece of a media stream /// requiring a single transport address, as defined by RFC 5245 /// (Interactive Connectivity Establishment). class QXMPP_EXPORT QXmppIceComponent : public QXmppLoggable { Q_OBJECT public: QXmppIceComponent(QObject *parent=0); ~QXmppIceComponent(); void setIceControlling(bool controlling); void setStunServer(const QHostAddress &host, quint16 port); void setTurnServer(const QHostAddress &host, quint16 port); void setTurnUser(const QString &user); void setTurnPassword(const QString &password); QList localCandidates() const; void setLocalUser(const QString &user); void setLocalPassword(const QString &password); int component() const; void setComponent(int component); bool addRemoteCandidate(const QXmppJingleCandidate &candidate); void setRemoteUser(const QString &user); void setRemotePassword(const QString &password); bool isConnected() const; void setSockets(QList sockets); static QList discoverAddresses(); static QList reservePorts(const QList &addresses, int count, QObject *parent = 0); public slots: void close(); void connectToHost(); qint64 sendDatagram(const QByteArray &datagram); private slots: void checkCandidates(); void checkStun(); void handleDatagram(const QByteArray &datagram, const QHostAddress &host, quint16 port, QUdpSocket *socket = 0); void readyRead(); void turnConnected(); signals: /// \brief This signal is emitted once ICE negotiation succeeds. void connected(); /// \brief This signal is emitted when a data packet is received. void datagramReceived(const QByteArray &datagram); /// \brief This signal is emitted when the list of local candidates changes. void localCandidatesChanged(); private: class Pair { public: Pair(int component, bool controlling); quint64 priority() const; QString toString() const; QIODevice::OpenMode checked; QXmppJingleCandidate remote; QXmppJingleCandidate reflexive; QByteArray transaction; QUdpSocket *socket; private: int m_component; bool m_controlling; }; Pair *addRemoteCandidate(QUdpSocket *socket, const QHostAddress &host, quint16 port, quint32 priority); qint64 writeStun(const QXmppStunMessage &message, QXmppIceComponent::Pair *pair); int m_component; QList m_localCandidates; QString m_localUser; QString m_localPassword; Pair *m_activePair; Pair *m_fallbackPair; bool m_iceControlling; QList m_pairs; quint32 m_peerReflexivePriority; QString m_remoteUser; QString m_remotePassword; QList m_sockets; QTimer *m_timer; // STUN server QByteArray m_stunId; QHostAddress m_stunHost; quint16 m_stunPort; QTimer *m_stunTimer; int m_stunTries; // TURN server QXmppTurnAllocation *m_turnAllocation; bool m_turnConfigured; }; /// \brief The QXmppIceConnection class represents a set of UDP sockets /// capable of performing Interactive Connectivity Establishment (RFC 5245). /// class QXMPP_EXPORT QXmppIceConnection : public QXmppLoggable { Q_OBJECT public: QXmppIceConnection(QObject *parent = 0); QXmppIceComponent *component(int component); void addComponent(int component); void setIceControlling(bool controlling); QList localCandidates() const; QString localUser() const; void setLocalUser(const QString &user); QString localPassword() const; void setLocalPassword(const QString &password); void addRemoteCandidate(const QXmppJingleCandidate &candidate); void setRemoteUser(const QString &user); void setRemotePassword(const QString &password); void setStunServer(const QHostAddress &host, quint16 port = 3478); void setTurnServer(const QHostAddress &host, quint16 port = 3478); void setTurnUser(const QString &user); void setTurnPassword(const QString &password); bool bind(const QList &addresses); bool isConnected() const; signals: /// \brief This signal is emitted once ICE negotiation succeeds. void connected(); /// \brief This signal is emitted when ICE negotiation fails. void disconnected(); /// \brief This signal is emitted when the list of local candidates changes. void localCandidatesChanged(); public slots: void close(); void connectToHost(); private slots: void slotConnected(); void slotTimeout(); private: QTimer *m_connectTimer; bool m_iceControlling; QMap m_components; QString m_localUser; QString m_localPassword; QHostAddress m_stunHost; quint16 m_stunPort; QHostAddress m_turnHost; quint16 m_turnPort; QString m_turnUser; QString m_turnPassword; }; #endif qxmpp-0.7.6/src/base/QXmppSessionIq.cpp0000644000175000007640000000237512116723562017735 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Manjeet Dahiya * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include #include "QXmppSessionIq.h" #include "QXmppConstants.h" #include "QXmppUtils.h" /// \cond bool QXmppSessionIq::isSessionIq(const QDomElement &element) { QDomElement sessionElement = element.firstChildElement("session"); return (sessionElement.namespaceURI() == ns_session); } void QXmppSessionIq::toXmlElementFromChild(QXmlStreamWriter *writer) const { writer->writeStartElement("session");; writer->writeAttribute("xmlns", ns_session); writer->writeEndElement(); } /// \endcond qxmpp-0.7.6/src/base/QXmppVersionIq.cpp0000644000175000007640000000470512116723562017736 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include "QXmppConstants.h" #include "QXmppUtils.h" #include "QXmppVersionIq.h" /// Returns the name of the software. /// QString QXmppVersionIq::name() const { return m_name; } /// Sets the name of the software. /// /// \param name void QXmppVersionIq::setName(const QString &name) { m_name = name; } /// Returns the operating system. /// QString QXmppVersionIq::os() const { return m_os; } /// Sets the operating system. /// /// \param os void QXmppVersionIq::setOs(const QString &os) { m_os = os; } /// Returns the software version. /// QString QXmppVersionIq::version() const { return m_version; } /// Sets the software version. /// /// \param version void QXmppVersionIq::setVersion(const QString &version) { m_version = version; } /// \cond bool QXmppVersionIq::isVersionIq(const QDomElement &element) { QDomElement queryElement = element.firstChildElement("query"); return queryElement.namespaceURI() == ns_version; } void QXmppVersionIq::parseElementFromChild(const QDomElement &element) { QDomElement queryElement = element.firstChildElement("query"); m_name = queryElement.firstChildElement("name").text(); m_os = queryElement.firstChildElement("os").text(); m_version = queryElement.firstChildElement("version").text(); } void QXmppVersionIq::toXmlElementFromChild(QXmlStreamWriter *writer) const { writer->writeStartElement("query"); writer->writeAttribute("xmlns", ns_version); if (!m_name.isEmpty()) helperToXmlAddTextElement(writer, "name", m_name); if (!m_os.isEmpty()) helperToXmlAddTextElement(writer, "os", m_os); if (!m_version.isEmpty()) helperToXmlAddTextElement(writer, "version", m_version); writer->writeEndElement(); } /// \endcond qxmpp-0.7.6/src/base/QXmppByteStreamIq.cpp0000644000175000007640000001126212116723562020364 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include "QXmppByteStreamIq.h" #include "QXmppConstants.h" #include "QXmppUtils.h" QString QXmppByteStreamIq::StreamHost::host() const { return m_host; } void QXmppByteStreamIq::StreamHost::setHost(const QString &host) { m_host = host; } QString QXmppByteStreamIq::StreamHost::jid() const { return m_jid; } void QXmppByteStreamIq::StreamHost::setJid(const QString &jid) { m_jid = jid; } quint16 QXmppByteStreamIq::StreamHost::port() const { return m_port; } void QXmppByteStreamIq::StreamHost::setPort(quint16 port) { m_port = port; } QString QXmppByteStreamIq::StreamHost::zeroconf() const { return m_zeroconf; } void QXmppByteStreamIq::StreamHost::setZeroconf(const QString &zeroconf) { m_zeroconf = zeroconf; } QXmppByteStreamIq::Mode QXmppByteStreamIq::mode() const { return m_mode; } void QXmppByteStreamIq::setMode(QXmppByteStreamIq::Mode mode) { m_mode = mode; } QString QXmppByteStreamIq::sid() const { return m_sid; } void QXmppByteStreamIq::setSid(const QString &sid) { m_sid = sid; } QString QXmppByteStreamIq::activate() const { return m_activate; } void QXmppByteStreamIq::setActivate(const QString &activate) { m_activate = activate; } QList QXmppByteStreamIq::streamHosts() const { return m_streamHosts; } void QXmppByteStreamIq::setStreamHosts(const QList &streamHosts) { m_streamHosts = streamHosts; } QString QXmppByteStreamIq::streamHostUsed() const { return m_streamHostUsed; } void QXmppByteStreamIq::setStreamHostUsed(const QString &jid) { m_streamHostUsed = jid; } /// \cond bool QXmppByteStreamIq::isByteStreamIq(const QDomElement &element) { return element.firstChildElement("query").namespaceURI() == ns_bytestreams; } void QXmppByteStreamIq::parseElementFromChild(const QDomElement &element) { QDomElement queryElement = element.firstChildElement("query"); m_sid = queryElement.attribute("sid"); const QString modeStr = queryElement.attribute("mode"); if (modeStr == "tcp") m_mode = Tcp; else if (modeStr == "udp") m_mode = Udp; else m_mode = None; QDomElement hostElement = queryElement.firstChildElement("streamhost"); while (!hostElement.isNull()) { StreamHost streamHost; streamHost.setHost(hostElement.attribute("host")); streamHost.setJid(hostElement.attribute("jid")); streamHost.setPort(hostElement.attribute("port").toInt()); streamHost.setZeroconf(hostElement.attribute("zeroconf")); m_streamHosts.append(streamHost); hostElement = hostElement.nextSiblingElement("streamhost"); } m_activate = queryElement.firstChildElement("activate").text(); m_streamHostUsed = queryElement.firstChildElement("streamhost-used").attribute("jid"); } void QXmppByteStreamIq::toXmlElementFromChild(QXmlStreamWriter *writer) const { writer->writeStartElement("query"); writer->writeAttribute("xmlns", ns_bytestreams); helperToXmlAddAttribute(writer, "sid", m_sid); QString modeStr; if (m_mode == Tcp) modeStr = "tcp"; else if (m_mode == Udp) modeStr = "udp"; helperToXmlAddAttribute(writer, "mode", modeStr); foreach (const StreamHost& streamHost, m_streamHosts) { writer->writeStartElement("streamhost"); helperToXmlAddAttribute(writer, "host", streamHost.host()); helperToXmlAddAttribute(writer, "jid", streamHost.jid()); helperToXmlAddAttribute(writer, "port", QString::number(streamHost.port())); helperToXmlAddAttribute(writer, "zeroconf", streamHost.zeroconf()); writer->writeEndElement(); } if (!m_activate.isEmpty()) helperToXmlAddTextElement(writer, "activate", m_activate); if (!m_streamHostUsed.isEmpty()) { writer->writeStartElement("streamhost-used"); helperToXmlAddAttribute(writer, "jid", m_streamHostUsed); writer->writeEndElement(); } writer->writeEndElement(); } /// \endcond qxmpp-0.7.6/src/base/qdnslookup_unix.cpp0000644000175000007640000003013312116723562020265 0ustar sharkyjerryweb/**************************************************************************** ** ** Copyright (C) 2012 Jeremy Lainé ** Contact: http://www.qt-project.org/ ** ** This file is part of the QtNetwork module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage ** This file may be used under the terms of the GNU Lesser General Public ** License version 2.1 as published by the Free Software Foundation and ** appearing in the file LICENSE.LGPL included in the packaging of this ** file. Please review the following information to ensure the GNU Lesser ** General Public License version 2.1 requirements will be met: ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain additional ** rights. These rights are described in the Nokia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU General ** Public License version 3.0 as published by the Free Software Foundation ** and appearing in the file LICENSE.GPL included in the packaging of this ** file. Please review the following information to ensure the GNU General ** Public License version 3.0 requirements will be met: ** http://www.gnu.org/copyleft/gpl.html. ** ** Other Usage ** Alternatively, this file may be used in accordance with the terms and ** conditions contained in a signed written agreement between you and Nokia. ** ** ** ** ** ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #include "qdnslookup_p.h" #include #include #include #include #include #include #include #include #include QT_BEGIN_NAMESPACE static QMutex local_res_mutex; typedef int (*dn_expand_proto)(const unsigned char *, const unsigned char *, const unsigned char *, char *, int); static dn_expand_proto local_dn_expand = 0; typedef void (*res_nclose_proto)(res_state); static res_nclose_proto local_res_nclose = 0; typedef int (*res_ninit_proto)(res_state); static res_ninit_proto local_res_ninit = 0; typedef int (*res_nquery_proto)(res_state, const char *, int, int, unsigned char *, int); static res_nquery_proto local_res_nquery = 0; // Custom deleter to close resolver state. struct QDnsLookupStateDeleter { static inline void cleanup(struct __res_state *pointer) { local_res_nclose(pointer); } }; static void resolveLibrary() { QLibrary lib(QLatin1String("resolv")); if (!lib.load()) return; local_dn_expand = dn_expand_proto(lib.resolve("__dn_expand")); if (!local_dn_expand) local_dn_expand = dn_expand_proto(lib.resolve("dn_expand")); local_res_nclose = res_nclose_proto(lib.resolve("__res_nclose")); if (!local_res_nclose) local_res_nclose = res_nclose_proto(lib.resolve("res_9_nclose")); if (!local_res_nclose) local_res_nclose = res_nclose_proto(lib.resolve("res_nclose")); local_res_ninit = res_ninit_proto(lib.resolve("__res_ninit")); if (!local_res_ninit) local_res_ninit = res_ninit_proto(lib.resolve("res_9_ninit")); if (!local_res_ninit) local_res_ninit = res_ninit_proto(lib.resolve("res_ninit")); local_res_nquery = res_nquery_proto(lib.resolve("__res_nquery")); if (!local_res_nquery) local_res_nquery = res_nquery_proto(lib.resolve("res_9_nquery")); if (!local_res_nquery) local_res_nquery = res_nquery_proto(lib.resolve("res_nquery")); } void QDnsLookupRunnable::query(const int requestType, const QByteArray &requestName, QDnsLookupReply *reply) { // Load dn_expand, res_ninit and res_nquery on demand. static volatile bool triedResolve = false; if (!triedResolve) { QMutexLocker locker(&local_res_mutex); if (!triedResolve) { resolveLibrary(); triedResolve = true; } } // If dn_expand, res_ninit or res_nquery is missing, fail. if (!local_dn_expand || !local_res_nclose || !local_res_ninit || !local_res_nquery) { reply->error = QDnsLookup::ResolverError; reply->errorString = tr("Resolver functions not found"); return; } // Initialize state. struct __res_state state; memset(&state, 0, sizeof(state)); if (local_res_ninit(&state) < 0) { reply->error = QDnsLookup::ResolverError; reply->errorString = tr("Resolver initialization failed"); return; } #ifdef QDNSLOOKUP_DEBUG state.options |= RES_DEBUG; #endif QScopedPointer state_ptr(&state); // Perform DNS query. unsigned char response[PACKETSZ]; memset(response, 0, sizeof(response)); const int responseLength = local_res_nquery(&state, requestName, C_IN, requestType, response, sizeof(response)); // Check the response header. HEADER *header = (HEADER*)response; const int answerCount = ntohs(header->ancount); switch (header->rcode) { case NOERROR: break; case FORMERR: reply->error = QDnsLookup::InvalidRequestError; reply->errorString = tr("Server could not process query"); return; case SERVFAIL: reply->error = QDnsLookup::ServerFailureError; reply->errorString = tr("Server failure"); return; case NXDOMAIN: reply->error = QDnsLookup::NotFoundError; reply->errorString = tr("Non existent domain"); return; case REFUSED: reply->error = QDnsLookup::ServerRefusedError; reply->errorString = tr("Server refused to answer"); return; default: reply->error = QDnsLookup::InvalidReplyError; reply->errorString = tr("Invalid reply received"); return; } // Check the reply is valid. if (responseLength < int(sizeof(HEADER))) { reply->error = QDnsLookup::InvalidReplyError; reply->errorString = tr("Invalid reply received"); return; } // Skip the query host, type (2 bytes) and class (2 bytes). char host[PACKETSZ], answer[PACKETSZ]; unsigned char *p = response + sizeof(HEADER); int status = local_dn_expand(response, response + responseLength, p, host, sizeof(host)); if (status < 0) { reply->error = QDnsLookup::InvalidReplyError; reply->errorString = tr("Could not expand domain name"); return; } p += status + 4; // Extract results. int answerIndex = 0; while ((p < response + responseLength) && (answerIndex < answerCount)) { status = local_dn_expand(response, response + responseLength, p, host, sizeof(host)); if (status < 0) { reply->error = QDnsLookup::InvalidReplyError; reply->errorString = tr("Could not expand domain name"); return; } const QString name = QUrl::fromAce(host); p += status; const quint16 type = (p[0] << 8) | p[1]; p += 2; // RR type p += 2; // RR class const quint32 ttl = (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3]; p += 4; const quint16 size = (p[0] << 8) | p[1]; p += 2; if (type == QDnsLookup::A) { if (size != 4) { reply->error = QDnsLookup::InvalidReplyError; reply->errorString = tr("Invalid IPv4 address record"); return; } const quint32 addr = (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3]; QDnsHostAddressRecord record; record.d->name = name; record.d->timeToLive = ttl; record.d->value = QHostAddress(addr); reply->hostAddressRecords.append(record); } else if (type == QDnsLookup::AAAA) { if (size != 16) { reply->error = QDnsLookup::InvalidReplyError; reply->errorString = tr("Invalid IPv6 address record"); return; } QDnsHostAddressRecord record; record.d->name = name; record.d->timeToLive = ttl; record.d->value = QHostAddress(p); reply->hostAddressRecords.append(record); } else if (type == QDnsLookup::CNAME) { status = local_dn_expand(response, response + responseLength, p, answer, sizeof(answer)); if (status < 0) { reply->error = QDnsLookup::InvalidReplyError; reply->errorString = tr("Invalid canonical name record"); return; } QDnsDomainNameRecord record; record.d->name = name; record.d->timeToLive = ttl; record.d->value = QUrl::fromAce(answer); reply->canonicalNameRecords.append(record); } else if (type == QDnsLookup::NS) { status = local_dn_expand(response, response + responseLength, p, answer, sizeof(answer)); if (status < 0) { reply->error = QDnsLookup::InvalidReplyError; reply->errorString = tr("Invalid name server record"); return; } QDnsDomainNameRecord record; record.d->name = name; record.d->timeToLive = ttl; record.d->value = QUrl::fromAce(answer); reply->nameServerRecords.append(record); } else if (type == QDnsLookup::PTR) { status = local_dn_expand(response, response + responseLength, p, answer, sizeof(answer)); if (status < 0) { reply->error = QDnsLookup::InvalidReplyError; reply->errorString = tr("Invalid pointer record"); return; } QDnsDomainNameRecord record; record.d->name = name; record.d->timeToLive = ttl; record.d->value = QUrl::fromAce(answer); reply->pointerRecords.append(record); } else if (type == QDnsLookup::MX) { const quint16 preference = (p[0] << 8) | p[1]; status = local_dn_expand(response, response + responseLength, p + 2, answer, sizeof(answer)); if (status < 0) { reply->error = QDnsLookup::InvalidReplyError; reply->errorString = tr("Invalid mail exchange record"); return; } QDnsMailExchangeRecord record; record.d->exchange = QUrl::fromAce(answer); record.d->name = name; record.d->preference = preference; record.d->timeToLive = ttl; reply->mailExchangeRecords.append(record); } else if (type == QDnsLookup::SRV) { const quint16 priority = (p[0] << 8) | p[1]; const quint16 weight = (p[2] << 8) | p[3]; const quint16 port = (p[4] << 8) | p[5]; status = local_dn_expand(response, response + responseLength, p + 6, answer, sizeof(answer)); if (status < 0) { reply->error = QDnsLookup::InvalidReplyError; reply->errorString = tr("Invalid service record"); return; } QDnsServiceRecord record; record.d->name = name; record.d->target = QUrl::fromAce(answer); record.d->port = port; record.d->priority = priority; record.d->timeToLive = ttl; record.d->weight = weight; reply->serviceRecords.append(record); } else if (type == QDnsLookup::TXT) { unsigned char *txt = p; QDnsTextRecord record; record.d->name = name; record.d->timeToLive = ttl; while (txt < p + size) { const unsigned char length = *txt; txt++; if (txt + length > p + size) { reply->error = QDnsLookup::InvalidReplyError; reply->errorString = tr("Invalid text record"); return; } record.d->values << QByteArray((char*)txt, length); txt += length; } reply->textRecords.append(record); } p += size; answerIndex++; } } QT_END_NAMESPACE qxmpp-0.7.6/src/base/QXmppConstants.h0000644000175000007640000000717312116723562017442 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPCONSTANTS_H #define QXMPPCONSTANTS_H extern const char* ns_stream; extern const char* ns_client; extern const char* ns_server; extern const char* ns_roster; extern const char* ns_tls; extern const char* ns_sasl; extern const char* ns_bind; extern const char* ns_session; extern const char* ns_stanza; // XEP-0009: Jabber-RPC extern const char* ns_rpc; // XEP-0020: Feature Negotiation extern const char* ns_feature_negotiation; // XEP-0030: Service Discovery extern const char* ns_disco_info; extern const char* ns_disco_items; // XEP-0033: Extended Stanza Addressing extern const char* ns_extended_addressing; // XEP-0045: Multi-User Chat extern const char* ns_muc; extern const char* ns_muc_admin; extern const char* ns_muc_owner; extern const char* ns_muc_user; // XEP-0047: In-Band Bytestreams extern const char* ns_ibb; // XEP-0049: Private XML Storage extern const char* ns_private; // XEP-0054: vcard-temp extern const char* ns_vcard; // XEP-0059: Result Set Management extern const char* ns_rsm; // XEP-0065: SOCKS5 Bytestreams extern const char* ns_bytestreams; // XEP-0071: XHTML-IM extern const char *ns_xhtml_im; // XEP-0077: In-Band Registration extern const char* ns_register; // XEP-0078: Non-SASL Authentication extern const char* ns_auth; extern const char* ns_authFeature; // XEP-0085: Chat State Notifications extern const char* ns_chat_states; // XEP-0091: Legacy Delayed Delivery extern const char* ns_legacy_delayed_delivery; // XEP-0092: Software Version extern const char* ns_version; extern const char* ns_data; // XEP-0095: Stream Initiation extern const char* ns_stream_initiation; extern const char* ns_stream_initiation_file_transfer; // XEP-0108: User Activity extern const char* ns_activity; // XEP-0115: Entity Capabilities extern const char* ns_capabilities; // XEP-0136: Message Archiving extern const char* ns_archive; // XEP-0138: Stream Compression extern const char* ns_compress; extern const char* ns_compressFeature; // XEP-0145: Annotations extern const char* ns_rosternotes; // XEP-0153: vCard-Based Avatars extern const char* ns_vcard_update; // XEP-0158: CAPTCHA Forms extern const char* ns_captcha; // XEP-0166: Jingle extern const char* ns_jingle; extern const char* ns_jingle_ice_udp; extern const char* ns_jingle_raw_udp; extern const char* ns_jingle_rtp; extern const char* ns_jingle_rtp_audio; extern const char* ns_jingle_rtp_video; // XEP-0184: Message Receipts extern const char* ns_message_receipts; // XEP-0199: XMPP Ping extern const char* ns_ping; // XEP-0202: Entity Time extern const char* ns_entity_time; // XEP-0203: Delayed Delivery extern const char* ns_delayed_delivery; // XEP-0220: Server Dialback extern const char* ns_server_dialback; // XEP-0221: Data Forms Media Element extern const char* ns_media_element; // XEP-0224: Attention extern const char* ns_attention; // XEP-0231: Bits of Binary extern const char* ns_bob; // XEP-0249: Direct MUC Invitations extern const char* ns_conference; #endif // QXMPPCONSTANTS_H qxmpp-0.7.6/src/base/QXmppStun.cpp0000644000175000007640000022440512116723562016751 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #define QXMPP_DEBUG_STUN #include #include #include #include #include #include "QXmppStun.h" #include "QXmppUtils.h" #define ID_SIZE 12 #define STUN_RTO_INTERVAL 500 #define STUN_RTO_MAX 7 static const quint32 STUN_MAGIC = 0x2112A442; static const quint16 STUN_HEADER = 20; static const quint8 STUN_IPV4 = 0x01; static const quint8 STUN_IPV6 = 0x02; enum AttributeType { MappedAddress = 0x0001, // RFC5389 ChangeRequest = 0x0003, // RFC5389 SourceAddress = 0x0004, // RFC5389 ChangedAddress = 0x0005, // RFC5389 Username = 0x0006, // RFC5389 MessageIntegrity = 0x0008, // RFC5389 ErrorCode = 0x0009, // RFC5389 ChannelNumber = 0x000c, // RFC5766 : TURN Lifetime = 0x000d, // RFC5766 : TURN XorPeerAddress = 0x0012, // RFC5766 : TURN DataAttr = 0x0013, // RFC5766 : TURN Realm = 0x0014, // RFC5389 Nonce = 0x0015, // RFC5389 XorRelayedAddress= 0x0016, // RFC5766 : TURN EvenPort = 0x0018, // RFC5766 : TURN RequestedTransport=0x0019, // RFC5766 : TURN XorMappedAddress = 0x0020, // RFC5389 ReservationToken = 0x0022, // RFC5766 : TURN Priority = 0x0024, // RFC5245 UseCandidate = 0x0025, // RFC5245 Software = 0x8022, // RFC5389 Fingerprint = 0x8028, // RFC5389 IceControlled = 0x8029, // RFC5245 IceControlling = 0x802a, // RFC5245 OtherAddress = 0x802c, // RFC5780 }; // FIXME : we need to set local preference to discriminate between // multiple IP addresses static quint32 candidatePriority(const QXmppJingleCandidate &candidate, int localPref = 65535) { int typePref; switch (candidate.type()) { case QXmppJingleCandidate::HostType: typePref = 126; break; case QXmppJingleCandidate::PeerReflexiveType: typePref = 110; break; case QXmppJingleCandidate::ServerReflexiveType: typePref = 100; break; default: typePref = 0; } return (1 << 24) * typePref + \ (1 << 8) * localPref + \ (256 - candidate.component()); } static bool isIPv6LinkLocalAddress(const QHostAddress &addr) { if (addr.protocol() != QAbstractSocket::IPv6Protocol) return false; Q_IPV6ADDR ipv6addr = addr.toIPv6Address(); return (((ipv6addr[0] << 8) + ipv6addr[1]) & 0xffc0) == 0xfe80; } static bool decodeAddress(QDataStream &stream, quint16 a_length, QHostAddress &address, quint16 &port, const QByteArray &xorId = QByteArray()) { if (a_length < 4) return false; quint8 reserved, protocol; quint16 rawPort; stream >> reserved; stream >> protocol; stream >> rawPort; if (xorId.isEmpty()) port = rawPort; else port = rawPort ^ (STUN_MAGIC >> 16); if (protocol == STUN_IPV4) { if (a_length != 8) return false; quint32 addr; stream >> addr; if (xorId.isEmpty()) address = QHostAddress(addr); else address = QHostAddress(addr ^ STUN_MAGIC); } else if (protocol == STUN_IPV6) { if (a_length != 20) return false; Q_IPV6ADDR addr; stream.readRawData((char*)&addr, sizeof(addr)); if (!xorId.isEmpty()) { QByteArray xpad; QDataStream(&xpad, QIODevice::WriteOnly) << STUN_MAGIC; xpad += xorId; for (int i = 0; i < 16; i++) addr[i] ^= xpad[i]; } address = QHostAddress(addr); } else { return false; } return true; } static void encodeAddress(QDataStream &stream, quint16 type, const QHostAddress &address, quint16 port, const QByteArray &xorId = QByteArray()) { const quint8 reserved = 0; if (address.protocol() == QAbstractSocket::IPv4Protocol) { stream << type; stream << quint16(8); stream << reserved; stream << quint8(STUN_IPV4); quint32 addr = address.toIPv4Address(); if (!xorId.isEmpty()) { port ^= (STUN_MAGIC >> 16); addr ^= STUN_MAGIC; } stream << port; stream << addr; } else if (address.protocol() == QAbstractSocket::IPv6Protocol) { stream << type; stream << quint16(20); stream << reserved; stream << quint8(STUN_IPV6); Q_IPV6ADDR addr = address.toIPv6Address(); if (!xorId.isEmpty()) { port ^= (STUN_MAGIC >> 16); QByteArray xpad; QDataStream(&xpad, QIODevice::WriteOnly) << STUN_MAGIC; xpad += xorId; for (int i = 0; i < 16; i++) addr[i] ^= xpad[i]; } stream << port; stream.writeRawData((char*)&addr, sizeof(addr)); } else { qWarning("Cannot write STUN attribute for unknown IP version"); } } static void addAddress(QDataStream &stream, quint16 type, const QHostAddress &host, quint16 port, const QByteArray &xorId = QByteArray()) { if (port && !host.isNull() && (host.protocol() == QAbstractSocket::IPv4Protocol || host.protocol() == QAbstractSocket::IPv6Protocol)) { encodeAddress(stream, type, host, port, xorId); } } static void encodeString(QDataStream &stream, quint16 type, const QString &string) { const QByteArray utf8string = string.toUtf8(); stream << type; stream << quint16(utf8string.size()); stream.writeRawData(utf8string.data(), utf8string.size()); if (utf8string.size() % 4) { const QByteArray padding(4 - (utf8string.size() % 4), 0); stream.writeRawData(padding.data(), padding.size()); } } static void setBodyLength(QByteArray &buffer, qint16 length) { QDataStream stream(&buffer, QIODevice::WriteOnly); stream.device()->seek(2); stream << length; } /// Constructs a new QXmppStunMessage. QXmppStunMessage::QXmppStunMessage() : errorCode(0), changedPort(0), mappedPort(0), otherPort(0), sourcePort(0), xorMappedPort(0), xorPeerPort(0), xorRelayedPort(0), useCandidate(false), m_cookie(STUN_MAGIC), m_type(0), m_changeRequest(0), m_channelNumber(0), m_lifetime(0), m_priority(0) { m_id = QByteArray(ID_SIZE, 0); } quint32 QXmppStunMessage::cookie() const { return m_cookie; } void QXmppStunMessage::setCookie(quint32 cookie) { m_cookie = cookie; } QByteArray QXmppStunMessage::id() const { return m_id; } void QXmppStunMessage::setId(const QByteArray &id) { Q_ASSERT(id.size() == ID_SIZE); m_id = id; } quint16 QXmppStunMessage::messageClass() const { return m_type & 0x0110; } quint16 QXmppStunMessage::messageMethod() const { return m_type & 0x3eef; } quint16 QXmppStunMessage::type() const { return m_type; } void QXmppStunMessage::setType(quint16 type) { m_type = type; } /// Returns the CHANGE-REQUEST attribute, indicating whether to change /// the IP and / or port from which the response is sent. quint32 QXmppStunMessage::changeRequest() const { return m_changeRequest; } /// Sets the CHANGE-REQUEST attribute, indicating whether to change /// the IP and / or port from which the response is sent. /// /// \param changeRequest void QXmppStunMessage::setChangeRequest(quint32 changeRequest) { m_changeRequest = changeRequest; m_attributes << ChangeRequest; } /// Returns the CHANNEL-NUMBER attribute. quint16 QXmppStunMessage::channelNumber() const { return m_channelNumber; } /// Sets the CHANNEL-NUMBER attribute. /// /// \param channelNumber void QXmppStunMessage::setChannelNumber(quint16 channelNumber) { m_channelNumber = channelNumber; m_attributes << ChannelNumber; } /// Returns the DATA attribute. QByteArray QXmppStunMessage::data() const { return m_data; } /// Sets the DATA attribute. void QXmppStunMessage::setData(const QByteArray &data) { m_data = data; m_attributes << DataAttr; } /// Returns the LIFETIME attribute, indicating the duration in seconds for /// which the server will maintain an allocation. quint32 QXmppStunMessage::lifetime() const { return m_lifetime; } /// Sets the LIFETIME attribute, indicating the duration in seconds for /// which the server will maintain an allocation. /// /// \param lifetime void QXmppStunMessage::setLifetime(quint32 lifetime) { m_lifetime = lifetime; m_attributes << Lifetime; } /// Returns the NONCE attribute. QByteArray QXmppStunMessage::nonce() const { return m_nonce; } /// Sets the NONCE attribute. /// /// \param nonce void QXmppStunMessage::setNonce(const QByteArray &nonce) { m_nonce = nonce; m_attributes << Nonce; } /// Returns the PRIORITY attribute, the priority that would be assigned to /// a peer reflexive candidate discovered during the ICE check. quint32 QXmppStunMessage::priority() const { return m_priority; } /// Sets the PRIORITY attribute, the priority that would be assigned to /// a peer reflexive candidate discovered during the ICE check. /// /// \param priority void QXmppStunMessage::setPriority(quint32 priority) { m_priority = priority; m_attributes << Priority; } /// Returns the REALM attribute. QString QXmppStunMessage::realm() const { return m_realm; } /// Sets the REALM attribute. /// /// \param realm void QXmppStunMessage::setRealm(const QString &realm) { m_realm = realm; m_attributes << Realm; } /// Returns the REQUESTED-TRANSPORT attribute. quint8 QXmppStunMessage::requestedTransport() const { return m_requestedTransport; } /// Sets the REQUESTED-TRANSPORT attribute. /// /// \param requestedTransport void QXmppStunMessage::setRequestedTransport(quint8 requestedTransport) { m_requestedTransport = requestedTransport; m_attributes << RequestedTransport; } /// Returns the RESERVATION-TOKEN attribute. QByteArray QXmppStunMessage::reservationToken() const { return m_reservationToken; } /// Sets the RESERVATION-TOKEN attribute. /// /// \param reservationToken void QXmppStunMessage::setReservationToken(const QByteArray &reservationToken) { m_reservationToken = reservationToken; m_reservationToken.resize(8); m_attributes << ReservationToken; } /// Returns the SOFTWARE attribute, containing a textual description of the /// software being used. QString QXmppStunMessage::software() const { return m_software; } /// Sets the SOFTWARE attribute, containing a textual description of the /// software being used. /// /// \param software void QXmppStunMessage::setSoftware(const QString &software) { m_software = software; m_attributes << Software; } /// Returns the USERNAME attribute, containing the username to use for /// authentication. QString QXmppStunMessage::username() const { return m_username; } /// Sets the USERNAME attribute, containing the username to use for /// authentication. /// /// \param username void QXmppStunMessage::setUsername(const QString &username) { m_username = username; m_attributes << Username; } /// Decodes a QXmppStunMessage and checks its integrity using the given key. /// /// \param buffer /// \param key /// \param errors bool QXmppStunMessage::decode(const QByteArray &buffer, const QByteArray &key, QStringList *errors) { QStringList silent; if (!errors) errors = &silent; if (buffer.size() < STUN_HEADER) { *errors << QLatin1String("Received a truncated STUN packet"); return false; } // parse STUN header QDataStream stream(buffer); quint16 length; stream >> m_type; stream >> length; stream >> m_cookie; stream.readRawData(m_id.data(), m_id.size()); if (length != buffer.size() - STUN_HEADER) { *errors << QLatin1String("Received an invalid STUN packet"); return false; } // parse STUN attributes int done = 0; bool after_integrity = false; while (done < length) { quint16 a_type, a_length; stream >> a_type; stream >> a_length; const int pad_length = 4 * ((a_length + 3) / 4) - a_length; // only FINGERPRINT is allowed after MESSAGE-INTEGRITY if (after_integrity && a_type != Fingerprint) { *errors << QString("Skipping attribute %1 after MESSAGE-INTEGRITY").arg(QString::number(a_type)); stream.skipRawData(a_length + pad_length); done += 4 + a_length + pad_length; continue; } if (a_type == Priority) { // PRIORITY if (a_length != sizeof(m_priority)) return false; stream >> m_priority; m_attributes << Priority; } else if (a_type == ErrorCode) { // ERROR-CODE if (a_length < 4) return false; quint16 reserved; quint8 errorCodeHigh, errorCodeLow; stream >> reserved; stream >> errorCodeHigh; stream >> errorCodeLow; errorCode = errorCodeHigh * 100 + errorCodeLow; QByteArray phrase(a_length - 4, 0); stream.readRawData(phrase.data(), phrase.size()); errorPhrase = QString::fromUtf8(phrase); } else if (a_type == UseCandidate) { // USE-CANDIDATE if (a_length != 0) return false; useCandidate = true; } else if (a_type == ChannelNumber) { // CHANNEL-NUMBER if (a_length != 4) return false; stream >> m_channelNumber; stream.skipRawData(2); m_attributes << ChannelNumber; } else if (a_type == DataAttr) { // DATA m_data.resize(a_length); stream.readRawData(m_data.data(), m_data.size()); m_attributes << DataAttr; } else if (a_type == Lifetime) { // LIFETIME if (a_length != sizeof(m_lifetime)) return false; stream >> m_lifetime; m_attributes << Lifetime; } else if (a_type == Nonce) { // NONCE m_nonce.resize(a_length); stream.readRawData(m_nonce.data(), m_nonce.size()); m_attributes << Nonce; } else if (a_type == Realm) { // REALM QByteArray utf8Realm(a_length, 0); stream.readRawData(utf8Realm.data(), utf8Realm.size()); m_realm = QString::fromUtf8(utf8Realm); m_attributes << Realm; } else if (a_type == RequestedTransport) { // REQUESTED-TRANSPORT if (a_length != 4) return false; stream >> m_requestedTransport; stream.skipRawData(3); m_attributes << RequestedTransport; } else if (a_type == ReservationToken) { // RESERVATION-TOKEN if (a_length != 8) return false; m_reservationToken.resize(a_length); stream.readRawData(m_reservationToken.data(), m_reservationToken.size()); m_attributes << ReservationToken; } else if (a_type == Software) { // SOFTWARE QByteArray utf8Software(a_length, 0); stream.readRawData(utf8Software.data(), utf8Software.size()); m_software = QString::fromUtf8(utf8Software); m_attributes << Software; } else if (a_type == Username) { // USERNAME QByteArray utf8Username(a_length, 0); stream.readRawData(utf8Username.data(), utf8Username.size()); m_username = QString::fromUtf8(utf8Username); m_attributes << Username; } else if (a_type == MappedAddress) { // MAPPED-ADDRESS if (!decodeAddress(stream, a_length, mappedHost, mappedPort)) { *errors << QLatin1String("Bad MAPPED-ADDRESS"); return false; } } else if (a_type == ChangeRequest) { // CHANGE-REQUEST if (a_length != sizeof(m_changeRequest)) return false; stream >> m_changeRequest; m_attributes << ChangeRequest; } else if (a_type == SourceAddress) { // SOURCE-ADDRESS if (!decodeAddress(stream, a_length, sourceHost, sourcePort)) { *errors << QLatin1String("Bad SOURCE-ADDRESS"); return false; } } else if (a_type == ChangedAddress) { // CHANGED-ADDRESS if (!decodeAddress(stream, a_length, changedHost, changedPort)) { *errors << QLatin1String("Bad CHANGED-ADDRESS"); return false; } } else if (a_type == OtherAddress) { // OTHER-ADDRESS if (!decodeAddress(stream, a_length, otherHost, otherPort)) { *errors << QLatin1String("Bad OTHER-ADDRESS"); return false; } } else if (a_type == XorMappedAddress) { // XOR-MAPPED-ADDRESS if (!decodeAddress(stream, a_length, xorMappedHost, xorMappedPort, m_id)) { *errors << QLatin1String("Bad XOR-MAPPED-ADDRESS"); return false; } } else if (a_type == XorPeerAddress) { // XOR-PEER-ADDRESS if (!decodeAddress(stream, a_length, xorPeerHost, xorPeerPort, m_id)) { *errors << QLatin1String("Bad XOR-PEER-ADDRESS"); return false; } } else if (a_type == XorRelayedAddress) { // XOR-RELAYED-ADDRESS if (!decodeAddress(stream, a_length, xorRelayedHost, xorRelayedPort, m_id)) { *errors << QLatin1String("Bad XOR-RELAYED-ADDRESS"); return false; } } else if (a_type == MessageIntegrity) { // MESSAGE-INTEGRITY if (a_length != 20) return false; QByteArray integrity(20, 0); stream.readRawData(integrity.data(), integrity.size()); // check HMAC-SHA1 if (!key.isEmpty()) { QByteArray copy = buffer.left(STUN_HEADER + done); setBodyLength(copy, done + 24); if (integrity != QXmppUtils::generateHmacSha1(key, copy)) { *errors << QLatin1String("Bad message integrity"); return false; } } // from here onwards, only FINGERPRINT is allowed after_integrity = true; } else if (a_type == Fingerprint) { // FINGERPRINT if (a_length != 4) return false; quint32 fingerprint; stream >> fingerprint; // check CRC32 QByteArray copy = buffer.left(STUN_HEADER + done); setBodyLength(copy, done + 8); const quint32 expected = QXmppUtils::generateCrc32(copy) ^ 0x5354554eL; if (fingerprint != expected) { *errors << QLatin1String("Bad fingerprint"); return false; } // stop parsing, no more attributes are allowed return true; } else if (a_type == IceControlling) { /// ICE-CONTROLLING if (a_length != 8) return false; iceControlling.resize(a_length); stream.readRawData(iceControlling.data(), iceControlling.size()); } else if (a_type == IceControlled) { /// ICE-CONTROLLED if (a_length != 8) return false; iceControlled.resize(a_length); stream.readRawData(iceControlled.data(), iceControlled.size()); } else { // Unknown attribute stream.skipRawData(a_length); *errors << QString("Skipping unknown attribute %1").arg(QString::number(a_type)); } stream.skipRawData(pad_length); done += 4 + a_length + pad_length; } return true; } /// Encodes the current QXmppStunMessage, optionally calculating the /// message integrity attribute using the given key. /// /// \param key /// \param addFingerprint QByteArray QXmppStunMessage::encode(const QByteArray &key, bool addFingerprint) const { QByteArray buffer; QDataStream stream(&buffer, QIODevice::WriteOnly); // encode STUN header quint16 length = 0; stream << m_type; stream << length; stream << m_cookie; stream.writeRawData(m_id.data(), m_id.size()); // MAPPED-ADDRESS addAddress(stream, MappedAddress, mappedHost, mappedPort); // CHANGE-REQUEST if (m_attributes.contains(ChangeRequest)) { stream << quint16(ChangeRequest); stream << quint16(sizeof(m_changeRequest)); stream << m_changeRequest; } // SOURCE-ADDRESS addAddress(stream, SourceAddress, sourceHost, sourcePort); // CHANGED-ADDRESS addAddress(stream, ChangedAddress, changedHost, changedPort); // OTHER-ADDRESS addAddress(stream, OtherAddress, otherHost, otherPort); // XOR-MAPPED-ADDRESS addAddress(stream, XorMappedAddress, xorMappedHost, xorMappedPort, m_id); // XOR-PEER-ADDRESS addAddress(stream, XorPeerAddress, xorPeerHost, xorPeerPort, m_id); // XOR-RELAYED-ADDRESS addAddress(stream, XorRelayedAddress, xorRelayedHost, xorRelayedPort, m_id); // ERROR-CODE if (errorCode) { const quint16 reserved = 0; const quint8 errorCodeHigh = errorCode / 100; const quint8 errorCodeLow = errorCode % 100; const QByteArray phrase = errorPhrase.toUtf8(); stream << quint16(ErrorCode); stream << quint16(phrase.size() + 4); stream << reserved; stream << errorCodeHigh; stream << errorCodeLow; stream.writeRawData(phrase.data(), phrase.size()); if (phrase.size() % 4) { const QByteArray padding(4 - (phrase.size() % 4), 0); stream.writeRawData(padding.data(), padding.size()); } } // PRIORITY if (m_attributes.contains(Priority)) { stream << quint16(Priority); stream << quint16(sizeof(m_priority)); stream << m_priority; } // USE-CANDIDATE if (useCandidate) { stream << quint16(UseCandidate); stream << quint16(0); } // CHANNEL-NUMBER if (m_attributes.contains(ChannelNumber)) { stream << quint16(ChannelNumber); stream << quint16(4); stream << m_channelNumber; stream << quint16(0); } // DATA if (m_attributes.contains(DataAttr)) { stream << quint16(DataAttr); stream << quint16(m_data.size()); stream.writeRawData(m_data.data(), m_data.size()); if (m_data.size() % 4) { const QByteArray padding(4 - (m_data.size() % 4), 0); stream.writeRawData(padding.data(), padding.size()); } } // LIFETIME if (m_attributes.contains(Lifetime)) { stream << quint16(Lifetime); stream << quint16(sizeof(m_lifetime)); stream << m_lifetime; } // NONCE if (m_attributes.contains(Nonce)) { stream << quint16(Nonce); stream << quint16(m_nonce.size()); stream.writeRawData(m_nonce.data(), m_nonce.size()); } // REALM if (m_attributes.contains(Realm)) encodeString(stream, Realm, m_realm); // REQUESTED-TRANSPORT if (m_attributes.contains(RequestedTransport)) { const QByteArray reserved(3, 0); stream << quint16(RequestedTransport); stream << quint16(4); stream << m_requestedTransport; stream.writeRawData(reserved.data(), reserved.size()); } // RESERVATION-TOKEN if (m_attributes.contains(ReservationToken)) { stream << quint16(ReservationToken); stream << quint16(m_reservationToken.size()); stream.writeRawData(m_reservationToken.data(), m_reservationToken.size()); } // SOFTWARE if (m_attributes.contains(Software)) encodeString(stream, Software, m_software); // USERNAME if (m_attributes.contains(Username)) encodeString(stream, Username, m_username); // ICE-CONTROLLING or ICE-CONTROLLED if (!iceControlling.isEmpty()) { stream << quint16(IceControlling); stream << quint16(iceControlling.size()); stream.writeRawData(iceControlling.data(), iceControlling.size()); } else if (!iceControlled.isEmpty()) { stream << quint16(IceControlled); stream << quint16(iceControlled.size()); stream.writeRawData(iceControlled.data(), iceControlled.size()); } // set body length setBodyLength(buffer, buffer.size() - STUN_HEADER); // MESSAGE-INTEGRITY if (!key.isEmpty()) { setBodyLength(buffer, buffer.size() - STUN_HEADER + 24); QByteArray integrity = QXmppUtils::generateHmacSha1(key, buffer); stream << quint16(MessageIntegrity); stream << quint16(integrity.size()); stream.writeRawData(integrity.data(), integrity.size()); } // FINGERPRINT if (addFingerprint) { setBodyLength(buffer, buffer.size() - STUN_HEADER + 8); quint32 fingerprint = QXmppUtils::generateCrc32(buffer) ^ 0x5354554eL; stream << quint16(Fingerprint); stream << quint16(sizeof(fingerprint)); stream << fingerprint; } return buffer; } /// If the given packet looks like a STUN message, returns the message /// type, otherwise returns 0. /// /// \param buffer /// \param cookie /// \param id quint16 QXmppStunMessage::peekType(const QByteArray &buffer, quint32 &cookie, QByteArray &id) { if (buffer.size() < STUN_HEADER) return 0; // parse STUN header QDataStream stream(buffer); quint16 type; quint16 length; stream >> type; stream >> length; stream >> cookie; if (length != buffer.size() - STUN_HEADER) return 0; id.resize(ID_SIZE); stream.readRawData(id.data(), id.size()); return type; } QString QXmppStunMessage::toString() const { QStringList dumpLines; QString typeName; switch (messageMethod()) { case Binding: typeName = "Binding"; break; case SharedSecret: typeName = "Shared Secret"; break; case Allocate: typeName = "Allocate"; break; case Refresh: typeName = "Refresh"; break; case Send: typeName = "Send"; break; case Data: typeName = "Data"; break; case CreatePermission: typeName = "CreatePermission"; break; case ChannelBind: typeName = "ChannelBind"; break; default: typeName = "Unknown"; break; } switch (messageClass()) { case Request: typeName += " Request"; break; case Indication: typeName += " Indication"; break; case Response: typeName += " Response"; break; case Error: typeName += " Error"; break; default: break; } dumpLines << QString(" type %1 (%2)") .arg(typeName) .arg(QString::number(m_type)); dumpLines << QString(" id %1").arg(QString::fromLatin1(m_id.toHex())); // attributes if (m_attributes.contains(ChannelNumber)) dumpLines << QString(" * CHANNEL-NUMBER %1").arg(QString::number(m_channelNumber)); if (errorCode) dumpLines << QString(" * ERROR-CODE %1 %2") .arg(QString::number(errorCode), errorPhrase); if (m_attributes.contains(Lifetime)) dumpLines << QString(" * LIFETIME %1").arg(QString::number(m_lifetime)); if (m_attributes.contains(Nonce)) dumpLines << QString(" * NONCE %1").arg(QString::fromLatin1(m_nonce)); if (m_attributes.contains(Realm)) dumpLines << QString(" * REALM %1").arg(m_realm); if (m_attributes.contains(RequestedTransport)) dumpLines << QString(" * REQUESTED-TRANSPORT 0x%1").arg(QString::number(m_requestedTransport, 16)); if (m_attributes.contains(ReservationToken)) dumpLines << QString(" * RESERVATION-TOKEN %1").arg(QString::fromLatin1(m_reservationToken.toHex())); if (m_attributes.contains(Software)) dumpLines << QString(" * SOFTWARE %1").arg(m_software); if (m_attributes.contains(Username)) dumpLines << QString(" * USERNAME %1").arg(m_username); if (mappedPort) dumpLines << QString(" * MAPPED-ADDRESS %1 %2") .arg(mappedHost.toString(), QString::number(mappedPort)); if (m_attributes.contains(ChangeRequest)) dumpLines << QString(" * CHANGE-REQUEST %1") .arg(QString::number(m_changeRequest)); if (sourcePort) dumpLines << QString(" * SOURCE-ADDRESS %1 %2") .arg(sourceHost.toString(), QString::number(sourcePort)); if (changedPort) dumpLines << QString(" * CHANGED-ADDRESS %1 %2") .arg(changedHost.toString(), QString::number(changedPort)); if (otherPort) dumpLines << QString(" * OTHER-ADDRESS %1 %2") .arg(otherHost.toString(), QString::number(otherPort)); if (xorMappedPort) dumpLines << QString(" * XOR-MAPPED-ADDRESS %1 %2") .arg(xorMappedHost.toString(), QString::number(xorMappedPort)); if (xorPeerPort) dumpLines << QString(" * XOR-PEER-ADDRESS %1 %2") .arg(xorPeerHost.toString(), QString::number(xorPeerPort)); if (xorRelayedPort) dumpLines << QString(" * XOR-RELAYED-ADDRESS %1 %2") .arg(xorRelayedHost.toString(), QString::number(xorRelayedPort)); if (m_attributes.contains(Priority)) dumpLines << QString(" * PRIORITY %1").arg(QString::number(m_priority)); if (!iceControlling.isEmpty()) dumpLines << QString(" * ICE-CONTROLLING %1") .arg(QString::fromLatin1(iceControlling.toHex())); if (!iceControlled.isEmpty()) dumpLines << QString(" * ICE-CONTROLLED %1") .arg(QString::fromLatin1(iceControlled.toHex())); return dumpLines.join("\n"); } /// Constructs a new QXmppStunTransaction. /// /// \param request /// \param receiver QXmppStunTransaction::QXmppStunTransaction(const QXmppStunMessage &request, QObject *receiver) : QXmppLoggable(receiver), m_request(request), m_tries(0) { bool check; Q_UNUSED(check); check = connect(this, SIGNAL(writeStun(QXmppStunMessage)), receiver, SLOT(writeStun(QXmppStunMessage))); Q_ASSERT(check); check = connect(this, SIGNAL(finished()), receiver, SLOT(transactionFinished())); Q_ASSERT(check); // RTO timer m_retryTimer = new QTimer(this); m_retryTimer->setSingleShot(true); check = connect(m_retryTimer, SIGNAL(timeout()), this, SLOT(retry())); // send packet immediately m_tries++; emit writeStun(m_request); m_retryTimer->start(STUN_RTO_INTERVAL); } void QXmppStunTransaction::readStun(const QXmppStunMessage &response) { if (response.messageClass() == QXmppStunMessage::Error || response.messageClass() == QXmppStunMessage::Response) { m_response = response; emit finished(); } } /// Returns the STUN request. QXmppStunMessage QXmppStunTransaction::request() const { return m_request; } /// Returns the STUN response. QXmppStunMessage QXmppStunTransaction::response() const { return m_response; } void QXmppStunTransaction::retry() { if (m_tries >= STUN_RTO_MAX) { m_response.setType(QXmppStunMessage::Error); m_response.errorPhrase = QLatin1String("Request timed out"); emit finished(); return; } // resend request m_tries++; emit writeStun(m_request); m_retryTimer->start(2 * m_retryTimer->interval()); } /// Constructs a new QXmppTurnAllocation. /// /// \param parent QXmppTurnAllocation::QXmppTurnAllocation(QObject *parent) : QXmppLoggable(parent), m_relayedPort(0), m_turnPort(0), m_channelNumber(0x4000), m_lifetime(600), m_state(UnconnectedState) { bool check; Q_UNUSED(check); socket = new QUdpSocket(this); check = connect(socket, SIGNAL(readyRead()), this, SLOT(readyRead())); Q_ASSERT(check); m_timer = new QTimer(this); m_timer->setSingleShot(true); check = connect(m_timer, SIGNAL(timeout()), this, SLOT(refresh())); Q_ASSERT(check); // channels are valid 600s, we refresh every 500s m_channelTimer = new QTimer(this); m_channelTimer->setInterval(500 * 1000); check = connect(m_channelTimer, SIGNAL(timeout()), this, SLOT(refreshChannels())); Q_ASSERT(check); } /// Destroys the TURN allocation. QXmppTurnAllocation::~QXmppTurnAllocation() { if (m_state == ConnectedState) disconnectFromHost(); } /// Allocates the TURN allocation. void QXmppTurnAllocation::connectToHost() { if (m_state != UnconnectedState) return; // start listening for UDP if (socket->state() == QAbstractSocket::UnconnectedState) { if (!socket->bind()) { warning("Could not start listening for TURN"); return; } } // send allocate request QXmppStunMessage request; request.setType(QXmppStunMessage::Allocate | QXmppStunMessage::Request); request.setId(QXmppUtils::generateRandomBytes(12)); request.setLifetime(m_lifetime); request.setRequestedTransport(0x11); m_transactions << new QXmppStunTransaction(request, this); // update state setState(ConnectingState); } /// Releases the TURN allocation. void QXmppTurnAllocation::disconnectFromHost() { m_channelTimer->stop(); m_timer->stop(); // clear channels and any outstanding transactions m_channels.clear(); foreach (QXmppStunTransaction *transaction, m_transactions) delete transaction; m_transactions.clear(); // end allocation if (m_state == ConnectedState) { QXmppStunMessage request; request.setType(QXmppStunMessage::Refresh | QXmppStunMessage::Request); request.setId(QXmppUtils::generateRandomBytes(12)); request.setNonce(m_nonce); request.setRealm(m_realm); request.setUsername(m_username); request.setLifetime(0); m_transactions << new QXmppStunTransaction(request, this); setState(ClosingState); } else { setState(UnconnectedState); } } void QXmppTurnAllocation::readyRead() { QByteArray buffer; QHostAddress remoteHost; quint16 remotePort; while (socket->hasPendingDatagrams()) { const qint64 size = socket->pendingDatagramSize(); buffer.resize(size); socket->readDatagram(buffer.data(), buffer.size(), &remoteHost, &remotePort); handleDatagram(buffer, remoteHost, remotePort); } } void QXmppTurnAllocation::handleDatagram(const QByteArray &buffer, const QHostAddress &remoteHost, quint16 remotePort) { // demultiplex channel data if (buffer.size() >= 4 && (buffer[0] & 0xc0) == 0x40) { QDataStream stream(buffer); quint16 channel, length; stream >> channel; stream >> length; if (m_state == ConnectedState && m_channels.contains(channel) && length <= buffer.size() - 4) { emit datagramReceived(buffer.mid(4, length), m_channels[channel].first, m_channels[channel].second); } return; } // parse STUN message QXmppStunMessage message; QStringList errors; if (!message.decode(buffer, QByteArray(), &errors)) { foreach (const QString &error, errors) warning(error); return; } #ifdef QXMPP_DEBUG_STUN logReceived(QString("TURN packet from %1 port %2\n%3").arg( remoteHost.toString(), QString::number(remotePort), message.toString())); #endif // find transaction foreach (QXmppStunTransaction *transaction, m_transactions) { if (transaction->request().id() == message.id() && transaction->request().messageMethod() == message.messageMethod()) { transaction->readStun(message); return; } } } /// Refresh allocation. void QXmppTurnAllocation::refresh() { QXmppStunMessage request; request.setType(QXmppStunMessage::Refresh | QXmppStunMessage::Request); request.setId(QXmppUtils::generateRandomBytes(12)); request.setNonce(m_nonce); request.setRealm(m_realm); request.setUsername(m_username); m_transactions << new QXmppStunTransaction(request, this); } /// Refresh channel bindings. void QXmppTurnAllocation::refreshChannels() { foreach (quint16 channel, m_channels.keys()) { QXmppStunMessage request; request.setType(QXmppStunMessage::ChannelBind | QXmppStunMessage::Request); request.setId(QXmppUtils::generateRandomBytes(12)); request.setNonce(m_nonce); request.setRealm(m_realm); request.setUsername(m_username); request.setChannelNumber(channel); request.xorPeerHost = m_channels[channel].first; request.xorPeerPort = m_channels[channel].second; m_transactions << new QXmppStunTransaction(request, this); } } /// Returns the relayed host address, i.e. the address on the server /// used to communicate with peers. QHostAddress QXmppTurnAllocation::relayedHost() const { return m_relayedHost; } /// Returns the relayed port, i.e. the port on the server used to communicate /// with peers. quint16 QXmppTurnAllocation::relayedPort() const { return m_relayedPort; } /// Sets the password used to authenticate with the TURN server. /// /// \param password void QXmppTurnAllocation::setPassword(const QString &password) { m_password = password; } /// Sets the TURN server to use. /// /// \param host The address of the TURN server. /// \param port The port of the TURN server. void QXmppTurnAllocation::setServer(const QHostAddress &host, quint16 port) { m_turnHost = host; m_turnPort = port; } /// Sets the \a user used for authentication with the TURN server. /// /// \param user void QXmppTurnAllocation::setUser(const QString &user) { m_username = user; } /// Returns the current state of the allocation. /// QXmppTurnAllocation::AllocationState QXmppTurnAllocation::state() const { return m_state; } void QXmppTurnAllocation::setState(AllocationState state) { if (state == m_state) return; m_state = state; if (m_state == ConnectedState) { emit connected(); } else if (m_state == UnconnectedState) { m_timer->stop(); emit disconnected(); } } void QXmppTurnAllocation::transactionFinished() { QXmppStunTransaction *transaction = qobject_cast(sender()); if (!transaction || !m_transactions.removeAll(transaction)) return; transaction->deleteLater(); // handle authentication const QXmppStunMessage reply = transaction->response(); if (reply.messageClass() == QXmppStunMessage::Error && reply.errorCode == 401 && (reply.nonce() != m_nonce && reply.realm() != m_realm)) { // update long-term credentials m_nonce = reply.nonce(); m_realm = reply.realm(); QCryptographicHash hash(QCryptographicHash::Md5); hash.addData((m_username + ":" + m_realm + ":" + m_password).toUtf8()); m_key = hash.result(); // retry request QXmppStunMessage request(transaction->request()); request.setId(QXmppUtils::generateRandomBytes(12)); request.setNonce(m_nonce); request.setRealm(m_realm); request.setUsername(m_username); m_transactions << new QXmppStunTransaction(request, this); return; } const quint16 method = transaction->request().messageMethod(); if (method == QXmppStunMessage::Allocate) { if (reply.messageClass() == QXmppStunMessage::Error) { warning(QString("Allocation failed: %1 %2").arg( QString::number(reply.errorCode), reply.errorPhrase)); setState(UnconnectedState); return; } if (reply.xorRelayedHost.isNull() || reply.xorRelayedHost.protocol() != QAbstractSocket::IPv4Protocol || !reply.xorRelayedPort) { warning("Allocation did not yield a valid relayed address"); setState(UnconnectedState); return; } // store relayed address m_relayedHost = reply.xorRelayedHost; m_relayedPort = reply.xorRelayedPort; // schedule refresh m_lifetime = reply.lifetime(); m_timer->start((m_lifetime - 60) * 1000); setState(ConnectedState); } else if (method == QXmppStunMessage::ChannelBind) { if (reply.messageClass() == QXmppStunMessage::Error) { warning(QString("ChannelBind failed: %1 %2").arg( QString::number(reply.errorCode), reply.errorPhrase)); // remove channel m_channels.remove(transaction->request().channelNumber()); if (m_channels.isEmpty()) m_channelTimer->stop(); return; } } else if (method == QXmppStunMessage::Refresh) { if (reply.messageClass() == QXmppStunMessage::Error) { warning(QString("Refresh failed: %1 %2").arg( QString::number(reply.errorCode), reply.errorPhrase)); setState(UnconnectedState); return; } if (m_state == ClosingState) { setState(UnconnectedState); return; } // schedule refresh m_lifetime = reply.lifetime(); m_timer->start((m_lifetime - 60) * 1000); } } qint64 QXmppTurnAllocation::writeDatagram(const QByteArray &data, const QHostAddress &host, quint16 port) { if (m_state != ConnectedState) return -1; const Address addr = qMakePair(host, port); quint16 channel = m_channels.key(addr); if (!channel) { channel = m_channelNumber++; m_channels.insert(channel, addr); // bind channel QXmppStunMessage request; request.setType(QXmppStunMessage::ChannelBind | QXmppStunMessage::Request); request.setId(QXmppUtils::generateRandomBytes(12)); request.setNonce(m_nonce); request.setRealm(m_realm); request.setUsername(m_username); request.setChannelNumber(channel); request.xorPeerHost = host; request.xorPeerPort = port; m_transactions << new QXmppStunTransaction(request, this); // schedule refresh if (!m_channelTimer->isActive()) m_channelTimer->start(); } // send data QByteArray channelData; channelData.reserve(4 + data.size()); QDataStream stream(&channelData, QIODevice::WriteOnly); stream << channel; stream << quint16(data.size()); stream.writeRawData(data.data(), data.size()); if (socket->writeDatagram(channelData, m_turnHost, m_turnPort) == channelData.size()) return data.size(); else return -1; } void QXmppTurnAllocation::writeStun(const QXmppStunMessage &message) { socket->writeDatagram(message.encode(m_key), m_turnHost, m_turnPort); #ifdef QXMPP_DEBUG_STUN logSent(QString("TURN packet to %1 port %2\n%3").arg( m_turnHost.toString(), QString::number(m_turnPort), message.toString())); #endif } QXmppIceComponent::Pair::Pair(int component, bool controlling) : checked(QIODevice::NotOpen), socket(0), m_component(component), m_controlling(controlling) { transaction = QXmppUtils::generateRandomBytes(ID_SIZE); } quint64 QXmppIceComponent::Pair::priority() const { QXmppJingleCandidate local; local.setComponent(m_component); local.setType(socket ? QXmppJingleCandidate::HostType : QXmppJingleCandidate::RelayedType); local.setPriority(candidatePriority(local)); // see RFC 5245 - 5.7.2. Computing Pair Priority and Ordering Pairs const quint32 G = m_controlling ? local.priority() : remote.priority(); const quint32 D = m_controlling ? remote.priority() : local.priority(); return (quint64(1) << 32) * qMin(G, D) + 2 * qMax(G, D) + (G > D ? 1 : 0); } QString QXmppIceComponent::Pair::toString() const { QString str = QString("%1 port %2").arg(remote.host().toString(), QString::number(remote.port())); if (socket) str += QString(" (local %1 port %2)").arg(socket->localAddress().toString(), QString::number(socket->localPort())); else str += QString(" (relayed)"); if (!reflexive.host().isNull() && reflexive.port()) str += QString(" (reflexive %1 port %2)").arg(reflexive.host().toString(), QString::number(reflexive.port())); return str; } /// Constructs a new QXmppIceComponent. /// /// \param parent QXmppIceComponent::QXmppIceComponent(QObject *parent) : QXmppLoggable(parent), m_component(0), m_activePair(0), m_fallbackPair(0), m_iceControlling(false), m_peerReflexivePriority(0), m_stunPort(0), m_stunTries(0), m_turnConfigured(false) { bool check; Q_UNUSED(check); m_localUser = QXmppUtils::generateStanzaHash(4); m_localPassword = QXmppUtils::generateStanzaHash(22); m_timer = new QTimer(this); m_timer->setInterval(500); check = connect(m_timer, SIGNAL(timeout()), this, SLOT(checkCandidates())); Q_ASSERT(check); m_stunTimer = new QTimer(this); m_stunTimer->setInterval(500); check = connect(m_stunTimer, SIGNAL(timeout()), this, SLOT(checkStun())); Q_ASSERT(check); m_turnAllocation = new QXmppTurnAllocation(this); check = connect(m_turnAllocation, SIGNAL(connected()), this, SLOT(turnConnected())); Q_ASSERT(check); check = connect(m_turnAllocation, SIGNAL(datagramReceived(QByteArray,QHostAddress,quint16)), this, SLOT(handleDatagram(QByteArray,QHostAddress,quint16))); Q_ASSERT(check); } /// Destroys the QXmppIceComponent. QXmppIceComponent::~QXmppIceComponent() { foreach (Pair *pair, m_pairs) delete pair; } /// Returns the component id for the current socket, e.g. 1 for RTP /// and 2 for RTCP. int QXmppIceComponent::component() const { return m_component; } /// Sets the component id for the current socket, e.g. 1 for RTP /// and 2 for RTCP. /// /// \param component void QXmppIceComponent::setComponent(int component) { m_component = component; // calculate peer-reflexive candidate priority // see RFC 5245 - 7.1.2.1. PRIORITY and USE-CANDIDATE QXmppJingleCandidate reflexive; reflexive.setComponent(m_component); reflexive.setType(QXmppJingleCandidate::PeerReflexiveType); m_peerReflexivePriority = candidatePriority(reflexive); setObjectName(QString("STUN(%1)").arg(QString::number(m_component))); } void QXmppIceComponent::checkCandidates() { debug("Checking remote candidates"); foreach (Pair *pair, m_pairs) { if (m_remoteUser.isEmpty()) continue; // send a binding request QXmppStunMessage message; message.setId(pair->transaction); message.setType(QXmppStunMessage::Binding | QXmppStunMessage::Request); message.setPriority(m_peerReflexivePriority); message.setUsername(QString("%1:%2").arg(m_remoteUser, m_localUser)); if (m_iceControlling) { message.iceControlling = QByteArray(8, 0); message.useCandidate = true; } else { message.iceControlled = QByteArray(8, 0); } writeStun(message, pair); } } void QXmppIceComponent::checkStun() { if (m_stunHost.isNull() || !m_stunPort || m_stunTries > 10) { m_stunTimer->stop(); return; } // Send a request to STUN server to determine server-reflexive candidate foreach (QUdpSocket *socket, m_sockets) { QXmppStunMessage msg; msg.setType(QXmppStunMessage::Binding | QXmppStunMessage::Request); msg.setId(m_stunId); #ifdef QXMPP_DEBUG_STUN logSent(QString("STUN packet to %1 port %2\n%3").arg(m_stunHost.toString(), QString::number(m_stunPort), msg.toString())); #endif socket->writeDatagram(msg.encode(), m_stunHost, m_stunPort); } m_stunTries++; } /// Stops ICE connectivity checks and closes the underlying sockets. void QXmppIceComponent::close() { foreach (QUdpSocket *socket, m_sockets) socket->close(); m_turnAllocation->disconnectFromHost(); m_timer->stop(); m_stunTimer->stop(); m_activePair = 0; } /// Starts ICE connectivity checks. void QXmppIceComponent::connectToHost() { if (m_activePair) return; checkCandidates(); m_timer->start(); } /// Returns true if ICE negotiation completed, false otherwise. bool QXmppIceComponent::isConnected() const { return m_activePair != 0; } /// Sets whether the local party has the ICE controlling role. void QXmppIceComponent::setIceControlling(bool controlling) { m_iceControlling = controlling; } /// Returns the list of local candidates. QList QXmppIceComponent::localCandidates() const { return m_localCandidates; } /// Sets the local user fragment. /// /// \param user void QXmppIceComponent::setLocalUser(const QString &user) { m_localUser = user; } /// Sets the local password. /// /// \param password void QXmppIceComponent::setLocalPassword(const QString &password) { m_localPassword = password; } /// Adds a remote STUN candidate. bool QXmppIceComponent::addRemoteCandidate(const QXmppJingleCandidate &candidate) { if (candidate.component() != m_component || (candidate.type() != QXmppJingleCandidate::HostType && candidate.type() != QXmppJingleCandidate::RelayedType && candidate.type() != QXmppJingleCandidate::ServerReflexiveType) || candidate.protocol() != "udp" || (candidate.host().protocol() != QAbstractSocket::IPv4Protocol && candidate.host().protocol() != QAbstractSocket::IPv6Protocol)) return false; foreach (Pair *pair, m_pairs) if (pair->remote.host() == candidate.host() && pair->remote.port() == candidate.port()) return false; foreach (QUdpSocket *socket, m_sockets) { // do not pair IPv4 with IPv6 or global with link-local addresses if (socket->localAddress().protocol() != candidate.host().protocol() || isIPv6LinkLocalAddress(socket->localAddress()) != isIPv6LinkLocalAddress(candidate.host())) continue; Pair *pair = new Pair(m_component, m_iceControlling); pair->remote = candidate; if (isIPv6LinkLocalAddress(pair->remote.host())) { QHostAddress remoteHost = pair->remote.host(); remoteHost.setScopeId(socket->localAddress().scopeId()); pair->remote.setHost(remoteHost); } pair->socket = socket; m_pairs << pair; if (!m_fallbackPair) m_fallbackPair = pair; } // only use relaying for IPv4 candidates if (m_turnConfigured && candidate.host().protocol() == QAbstractSocket::IPv4Protocol) { Pair *pair = new Pair(m_component, m_iceControlling); pair->remote = candidate; pair->socket = 0; m_pairs << pair; } return true; } /// Adds a discovered peer-reflexive STUN candidate. QXmppIceComponent::Pair *QXmppIceComponent::addRemoteCandidate(QUdpSocket *socket, const QHostAddress &host, quint16 port, quint32 priority) { foreach (Pair *pair, m_pairs) if (pair->remote.host() == host && pair->remote.port() == port && pair->socket == socket) return pair; QXmppJingleCandidate candidate; candidate.setComponent(m_component); candidate.setHost(host); candidate.setId(QXmppUtils::generateStanzaHash(10)); candidate.setPort(port); candidate.setPriority(priority); candidate.setProtocol("udp"); candidate.setType(QXmppJingleCandidate::PeerReflexiveType); Pair *pair = new Pair(m_component, m_iceControlling); pair->remote = candidate; pair->socket = socket; m_pairs << pair; debug(QString("Added candidate %1").arg(pair->toString())); return pair; } /// Sets the remote user fragment. /// /// \param user void QXmppIceComponent::setRemoteUser(const QString &user) { m_remoteUser = user; } /// Sets the remote password. /// /// \param password void QXmppIceComponent::setRemotePassword(const QString &password) { m_remotePassword = password; } /// Sets the list of sockets to use for this component. /// /// \param sockets void QXmppIceComponent::setSockets(QList sockets) { // clear previous candidates and sockets m_localCandidates.clear(); foreach (QUdpSocket *socket, m_sockets) delete socket; m_sockets.clear(); // store candidates int foundation = 0; foreach (QUdpSocket *socket, sockets) { socket->setParent(this); connect(socket, SIGNAL(readyRead()), this, SLOT(readyRead())); QXmppJingleCandidate candidate; candidate.setComponent(m_component); candidate.setFoundation(foundation++); // remove scope ID from IPv6 non-link local addresses QHostAddress addr(socket->localAddress()); if (addr.protocol() == QAbstractSocket::IPv6Protocol && !isIPv6LinkLocalAddress(addr)) { addr.setScopeId(QString()); } candidate.setHost(addr); candidate.setId(QXmppUtils::generateStanzaHash(10)); candidate.setPort(socket->localPort()); candidate.setProtocol("udp"); candidate.setType(QXmppJingleCandidate::HostType); candidate.setPriority(candidatePriority(candidate)); m_sockets << socket; m_localCandidates << candidate; } // start STUN checks if (!m_stunHost.isNull() && m_stunPort) { m_stunTries = 0; checkStun(); m_stunTimer->start(); } // connect to TURN server if (m_turnConfigured) m_turnAllocation->connectToHost(); } /// Sets the STUN server to use to determine server-reflexive addresses /// and ports. /// /// \param host The address of the STUN server. /// \param port The port of the STUN server. void QXmppIceComponent::setStunServer(const QHostAddress &host, quint16 port) { m_stunHost = host; m_stunPort = port; m_stunId = QXmppUtils::generateRandomBytes(ID_SIZE); } /// Sets the TURN server to use to relay packets in double-NAT configurations. /// /// \param host The address of the TURN server. /// \param port The port of the TURN server. void QXmppIceComponent::setTurnServer(const QHostAddress &host, quint16 port) { m_turnAllocation->setServer(host, port); m_turnConfigured = !host.isNull() && port; } /// Sets the \a user used for authentication with the TURN server. /// /// \param user void QXmppIceComponent::setTurnUser(const QString &user) { m_turnAllocation->setUser(user); } /// Sets the \a password used for authentication with the TURN server. /// /// \param password void QXmppIceComponent::setTurnPassword(const QString &password) { m_turnAllocation->setPassword(password); } void QXmppIceComponent::readyRead() { QUdpSocket *socket = qobject_cast(sender()); if (!socket) return; QByteArray buffer; QHostAddress remoteHost; quint16 remotePort; while (socket->hasPendingDatagrams()) { const qint64 size = socket->pendingDatagramSize(); buffer.resize(size); socket->readDatagram(buffer.data(), buffer.size(), &remoteHost, &remotePort); handleDatagram(buffer, remoteHost, remotePort, socket); } } void QXmppIceComponent::handleDatagram(const QByteArray &buffer, const QHostAddress &remoteHost, quint16 remotePort, QUdpSocket *socket) { // if this is not a STUN message, emit it quint32 messageCookie; QByteArray messageId; quint16 messageType = QXmppStunMessage::peekType(buffer, messageCookie, messageId); if (!messageType || messageCookie != STUN_MAGIC) { // use this as an opportunity to flag a potential pair foreach (Pair *pair, m_pairs) { if (pair->remote.host() == remoteHost && pair->remote.port() == remotePort) { m_fallbackPair = pair; break; } } emit datagramReceived(buffer); return; } // determine password to use QString messagePassword; if (messageId != m_stunId) { messagePassword = (messageType & 0xFF00) ? m_remotePassword : m_localPassword; if (messagePassword.isEmpty()) return; } // parse STUN message QXmppStunMessage message; QStringList errors; if (!message.decode(buffer, messagePassword.toUtf8(), &errors)) { foreach (const QString &error, errors) warning(error); return; } #ifdef QXMPP_DEBUG_STUN logReceived(QString("STUN packet from %1 port %2\n%3").arg( remoteHost.toString(), QString::number(remotePort), message.toString())); #endif // check how to handle message if (message.id() == m_stunId) { m_stunTimer->stop(); // determine server-reflexive address QHostAddress reflexiveHost; quint16 reflexivePort = 0; if (!message.xorMappedHost.isNull() && message.xorMappedPort != 0) { reflexiveHost = message.xorMappedHost; reflexivePort = message.xorMappedPort; } else if (!message.mappedHost.isNull() && message.mappedPort != 0) { reflexiveHost = message.mappedHost; reflexivePort = message.mappedPort; } else { warning("STUN server did not provide a reflexive address"); return; } // check whether this candidates is already known foreach (const QXmppJingleCandidate &candidate, m_localCandidates) { if (candidate.host() == reflexiveHost && candidate.port() == reflexivePort && candidate.type() == QXmppJingleCandidate::ServerReflexiveType) return; } // add the new local candidate debug(QString("Adding server-reflexive candidate %1 port %2").arg(reflexiveHost.toString(), QString::number(reflexivePort))); QXmppJingleCandidate candidate; candidate.setComponent(m_component); candidate.setHost(reflexiveHost); candidate.setId(QXmppUtils::generateStanzaHash(10)); candidate.setPort(reflexivePort); candidate.setProtocol("udp"); candidate.setType(QXmppJingleCandidate::ServerReflexiveType); candidate.setPriority(candidatePriority(candidate)); m_localCandidates << candidate; emit localCandidatesChanged(); return; } // process message from peer Pair *pair = 0; if (message.type() == (QXmppStunMessage::Binding | QXmppStunMessage::Request)) { // add remote candidate pair = addRemoteCandidate(socket, remoteHost, remotePort, message.priority()); // send a binding response QXmppStunMessage response; response.setId(message.id()); response.setType(QXmppStunMessage::Binding | QXmppStunMessage::Response); response.setUsername(message.username()); response.xorMappedHost = pair->remote.host(); response.xorMappedPort = pair->remote.port(); writeStun(response, pair); // update state if (m_iceControlling || message.useCandidate) { debug(QString("ICE reverse check complete %1").arg(pair->toString())); pair->checked |= QIODevice::ReadOnly; } if (!m_iceControlling && !m_activePair && !m_remoteUser.isEmpty()) { // send a triggered connectivity test QXmppStunMessage message; message.setId(pair->transaction); message.setType(QXmppStunMessage::Binding | QXmppStunMessage::Request); message.setPriority(m_peerReflexivePriority); message.setUsername(QString("%1:%2").arg(m_remoteUser, m_localUser)); message.iceControlled = QByteArray(8, 0); writeStun(message, pair); } } else if (message.type() == (QXmppStunMessage::Binding | QXmppStunMessage::Response)) { // find the pair for this transaction foreach (Pair *ptr, m_pairs) { if (ptr->transaction == message.id()) { pair = ptr; break; } } if (!pair) { debug(QString("Unknown transaction %1").arg(QString::fromLatin1(message.id().toHex()))); return; } // store peer-reflexive address pair->reflexive.setHost(message.xorMappedHost); pair->reflexive.setPort(message.xorMappedPort); #if 0 // send a binding indication QXmppStunMessage indication; indication.setId(QXmppUtils::generateRandomBytes(ID_SIZE)); indication.setType(BindingIndication); m_socket->writeStun(indication, pair); #endif // outgoing media can flow debug(QString("ICE forward check complete %1").arg(pair->toString())); pair->checked |= QIODevice::WriteOnly; } // signal completion if (pair && pair->checked == QIODevice::ReadWrite) { m_timer->stop(); if (!m_activePair || pair->priority() > m_activePair->priority()) { info(QString("ICE pair selected %1 (priority: %2)").arg( pair->toString(), QString::number(pair->priority()))); const bool wasConnected = (m_activePair != 0); m_activePair = pair; if (!wasConnected) emit connected(); } } } void QXmppIceComponent::turnConnected() { // add the new local candidate debug(QString("Adding relayed candidate %1 port %2").arg( m_turnAllocation->relayedHost().toString(), QString::number(m_turnAllocation->relayedPort()))); QXmppJingleCandidate candidate; candidate.setComponent(m_component); candidate.setHost(m_turnAllocation->relayedHost()); candidate.setId(QXmppUtils::generateStanzaHash(10)); candidate.setPort(m_turnAllocation->relayedPort()); candidate.setProtocol("udp"); candidate.setType(QXmppJingleCandidate::RelayedType); candidate.setPriority(candidatePriority(candidate)); m_localCandidates << candidate; emit localCandidatesChanged(); } static QList reservePort(const QList &addresses, quint16 port, QObject *parent) { QList sockets; foreach (const QHostAddress &address, addresses) { QUdpSocket *socket = new QUdpSocket(parent); sockets << socket; if (!socket->bind(address, port)) { for (int i = 0; i < sockets.size(); ++i) delete sockets[i]; sockets.clear(); break; } } return sockets; } /// Returns the list of local network addresses. QList QXmppIceComponent::discoverAddresses() { QList addresses; foreach (const QNetworkInterface &interface, QNetworkInterface::allInterfaces()) { if (!(interface.flags() & QNetworkInterface::IsRunning) || interface.flags() & QNetworkInterface::IsLoopBack) continue; foreach (const QNetworkAddressEntry &entry, interface.addressEntries()) { QHostAddress ip = entry.ip(); if ((ip.protocol() != QAbstractSocket::IPv4Protocol && ip.protocol() != QAbstractSocket::IPv6Protocol) || entry.netmask().isNull()) continue; // FIXME: for now skip IPv6 link-local addresses, seems to upset // clients such as empathy if (isIPv6LinkLocalAddress(ip)) { ip.setScopeId(interface.name()); continue; } addresses << ip; } } return addresses; } /// Tries to bind \a count UDP sockets on each of the given \a addresses. /// /// The port numbers are chosen so that they are consecutive, starting at /// an even port. This makes them suitable for RTP/RTCP sockets pairs. /// /// \param addresses The network address on which to bind the sockets. /// \param count The number of ports to reserve. /// \param parent The parent object for the sockets. QList QXmppIceComponent::reservePorts(const QList &addresses, int count, QObject *parent) { QList sockets; if (addresses.isEmpty() || !count) return sockets; const int expectedSize = addresses.size() * count; quint16 port = 49152; while (sockets.size() != expectedSize) { // reserve first port (even number) if (port % 2) port++; QList socketChunk; while (socketChunk.isEmpty() && port <= 65536 - count) { socketChunk = reservePort(addresses, port, parent); if (socketChunk.isEmpty()) port += 2; } if (socketChunk.isEmpty()) return sockets; // reserve other ports sockets << socketChunk; for (int i = 1; i < count; ++i) { socketChunk = reservePort(addresses, ++port, parent); if (socketChunk.isEmpty()) break; sockets << socketChunk; } // cleanup if we failed if (sockets.size() != expectedSize) { for (int i = 0; i < sockets.size(); ++i) delete sockets[i]; sockets.clear(); } } return sockets; } /// Sends a data packet to the remote party. /// /// \param datagram qint64 QXmppIceComponent::sendDatagram(const QByteArray &datagram) { Pair *pair = m_activePair ? m_activePair : m_fallbackPair; if (!pair) return -1; if (pair->socket) return pair->socket->writeDatagram(datagram, pair->remote.host(), pair->remote.port()); else if (m_turnAllocation->state() == QXmppTurnAllocation::ConnectedState) return m_turnAllocation->writeDatagram(datagram, pair->remote.host(), pair->remote.port()); else return -1; } /// Sends a STUN packet to the remote party. qint64 QXmppIceComponent::writeStun(const QXmppStunMessage &message, QXmppIceComponent::Pair *pair) { qint64 ret; const QString messagePassword = (message.type() & 0xFF00) ? m_localPassword : m_remotePassword; if (pair->socket) ret = pair->socket->writeDatagram( message.encode(messagePassword.toUtf8()), pair->remote.host(), pair->remote.port()); else if (m_turnAllocation->state() == QXmppTurnAllocation::ConnectedState) ret = m_turnAllocation->writeDatagram( message.encode(messagePassword.toUtf8()), pair->remote.host(), pair->remote.port()); else return -1; #ifdef QXMPP_DEBUG_STUN logSent(QString("Sent to %1\n%2").arg(pair->toString(), message.toString())); #endif return ret; } /// Constructs a new ICE connection. /// /// \param parent QXmppIceConnection::QXmppIceConnection(QObject *parent) : QXmppLoggable(parent), m_iceControlling(false), m_stunPort(0) { bool check; m_localUser = QXmppUtils::generateStanzaHash(4); m_localPassword = QXmppUtils::generateStanzaHash(22); // timer to limit connection time to 30 seconds m_connectTimer = new QTimer(this); m_connectTimer->setInterval(30000); m_connectTimer->setSingleShot(true); check = connect(m_connectTimer, SIGNAL(timeout()), this, SLOT(slotTimeout())); Q_ASSERT(check); Q_UNUSED(check); } /// Returns the given component of this ICE connection. /// /// \param component QXmppIceComponent *QXmppIceConnection::component(int component) { return m_components.value(component); } /// Adds a component to this ICE connection, for instance 1 for RTP /// or 2 for RTCP. /// /// \param component void QXmppIceConnection::addComponent(int component) { bool check; Q_UNUSED(check); if (m_components.contains(component)) { warning(QString("Already have component %1").arg(QString::number(component))); return; } QXmppIceComponent *socket = new QXmppIceComponent(this); socket->setComponent(component); socket->setIceControlling(m_iceControlling); socket->setLocalUser(m_localUser); socket->setLocalPassword(m_localPassword); socket->setStunServer(m_stunHost, m_stunPort); socket->setTurnServer(m_turnHost, m_turnPort); socket->setTurnUser(m_turnUser); socket->setTurnPassword(m_turnPassword); check = connect(socket, SIGNAL(localCandidatesChanged()), this, SIGNAL(localCandidatesChanged())); Q_ASSERT(check); check = connect(socket, SIGNAL(connected()), this, SLOT(slotConnected())); Q_ASSERT(check); m_components[component] = socket; } /// Adds a candidate for one of the remote components. /// /// \param candidate void QXmppIceConnection::addRemoteCandidate(const QXmppJingleCandidate &candidate) { QXmppIceComponent *socket = m_components.value(candidate.component()); if (!socket) { warning(QString("Not adding candidate for unknown component %1").arg( QString::number(candidate.component()))); return; } socket->addRemoteCandidate(candidate); } /// Binds the local sockets to the specified addresses. /// /// \param addresses The addresses on which to listen. bool QXmppIceConnection::bind(const QList &addresses) { // reserve ports QList sockets = QXmppIceComponent::reservePorts(addresses, m_components.size()); if (sockets.isEmpty() && !addresses.isEmpty()) return false; // assign sockets QList keys = m_components.keys(); qSort(keys); int s = 0; foreach (int k, keys) { m_components[k]->setSockets(sockets.mid(s, addresses.size())); s += addresses.size(); } return true; } /// Closes the ICE connection. void QXmppIceConnection::close() { m_connectTimer->stop(); foreach (QXmppIceComponent *socket, m_components.values()) socket->close(); } /// Starts ICE connectivity checks. void QXmppIceConnection::connectToHost() { if (isConnected() || m_connectTimer->isActive()) return; foreach (QXmppIceComponent *socket, m_components.values()) socket->connectToHost(); m_connectTimer->start(); } /// Returns true if ICE negotiation completed, false otherwise. bool QXmppIceConnection::isConnected() const { foreach (QXmppIceComponent *socket, m_components.values()) if (!socket->isConnected()) return false; return true; } /// Sets whether the local party has the ICE controlling role. void QXmppIceConnection::setIceControlling(bool controlling) { m_iceControlling = controlling; foreach (QXmppIceComponent *socket, m_components.values()) socket->setIceControlling(controlling); } /// Returns the list of local HOST CANDIDATES candidates by iterating /// over the available network interfaces. QList QXmppIceConnection::localCandidates() const { QList candidates; foreach (QXmppIceComponent *socket, m_components.values()) candidates += socket->localCandidates(); return candidates; } /// Returns the local user fragment. QString QXmppIceConnection::localUser() const { return m_localUser; } /// Sets the local user fragment. /// /// You do not usually need to call this as one is automatically generated. /// /// \param user void QXmppIceConnection::setLocalUser(const QString &user) { m_localUser = user; foreach (QXmppIceComponent *socket, m_components.values()) socket->setLocalUser(user); } /// Returns the local password. QString QXmppIceConnection::localPassword() const { return m_localPassword; } /// Sets the local password. /// /// You do not usually need to call this as one is automatically generated. /// /// \param password void QXmppIceConnection::setLocalPassword(const QString &password) { m_localPassword = password; foreach (QXmppIceComponent *socket, m_components.values()) socket->setLocalPassword(password); } /// Sets the remote user fragment. /// /// \param user void QXmppIceConnection::setRemoteUser(const QString &user) { foreach (QXmppIceComponent *socket, m_components.values()) socket->setRemoteUser(user); } /// Sets the remote password. /// /// \param password void QXmppIceConnection::setRemotePassword(const QString &password) { foreach (QXmppIceComponent *socket, m_components.values()) socket->setRemotePassword(password); } /// Sets the STUN server to use to determine server-reflexive addresses /// and ports. /// /// \param host The address of the STUN server. /// \param port The port of the STUN server. void QXmppIceConnection::setStunServer(const QHostAddress &host, quint16 port) { m_stunHost = host; m_stunPort = port; foreach (QXmppIceComponent *socket, m_components.values()) socket->setStunServer(host, port); } /// Sets the TURN server to use to relay packets in double-NAT configurations. /// /// \param host The address of the TURN server. /// \param port The port of the TURN server. void QXmppIceConnection::setTurnServer(const QHostAddress &host, quint16 port) { m_turnHost = host; m_turnPort = port; foreach (QXmppIceComponent *socket, m_components.values()) socket->setTurnServer(host, port); } /// Sets the \a user used for authentication with the TURN server. /// /// \param user void QXmppIceConnection::setTurnUser(const QString &user) { m_turnUser = user; foreach (QXmppIceComponent *socket, m_components.values()) socket->setTurnUser(user); } /// Sets the \a password used for authentication with the TURN server. /// /// \param password void QXmppIceConnection::setTurnPassword(const QString &password) { m_turnPassword = password; foreach (QXmppIceComponent *socket, m_components.values()) socket->setTurnPassword(password); } void QXmppIceConnection::slotConnected() { foreach (QXmppIceComponent *socket, m_components.values()) if (!socket->isConnected()) return; info(QString("ICE negotiation completed")); m_connectTimer->stop(); emit connected(); } void QXmppIceConnection::slotTimeout() { warning(QString("ICE negotiation timed out")); foreach (QXmppIceComponent *socket, m_components.values()) socket->close(); emit disconnected(); } qxmpp-0.7.6/src/base/QXmppStreamFeatures.h0000644000175000007640000000342412116723562020413 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPSTREAMFEATURES_H #define QXMPPSTREAMFEATURES_H #include "QXmppStanza.h" class QXMPP_EXPORT QXmppStreamFeatures : public QXmppStanza { public: QXmppStreamFeatures(); enum Mode { Disabled = 0, Enabled, Required }; Mode bindMode() const; void setBindMode(Mode mode); Mode sessionMode() const; void setSessionMode(Mode mode); Mode nonSaslAuthMode() const; void setNonSaslAuthMode(Mode mode); QStringList authMechanisms() const; void setAuthMechanisms(const QStringList &mechanisms); QStringList compressionMethods() const; void setCompressionMethods(const QStringList &methods); Mode tlsMode() const; void setTlsMode(Mode mode); /// \cond void parse(const QDomElement &element); void toXml(QXmlStreamWriter *writer) const; /// \endcond static bool isStreamFeatures(const QDomElement &element); private: Mode m_bindMode; Mode m_sessionMode; Mode m_nonSaslAuthMode; Mode m_tlsMode; QStringList m_authMechanisms; QStringList m_compressionMethods; }; #endif qxmpp-0.7.6/src/base/QXmppPubSubIq.h0000644000175000007640000000523612116723562017156 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPPUBSUBIQ_H #define QXMPPPUBSUBIQ_H #include "QXmppIq.h" /// \brief The QXmppPubSubItem class represents a publish-subscribe item /// as defined by XEP-0060: Publish-Subscribe. /// class QXMPP_EXPORT QXmppPubSubItem { public: QString id() const; void setId(const QString &id); QXmppElement contents() const; void setContents(const QXmppElement &contents); /// \cond void parse(const QDomElement &element); void toXml(QXmlStreamWriter *writer) const; /// \endcond private: QString m_id; QXmppElement m_contents; }; /// \brief The QXmppPubSubIq class represents an IQ used for the /// publish-subscribe mechanisms defined by XEP-0060: Publish-Subscribe. /// /// \ingroup Stanzas class QXMPP_EXPORT QXmppPubSubIq : public QXmppIq { public: /// This enum is used to describe a publish-subscribe query type. enum QueryType { AffiliationsQuery, DefaultQuery, ItemsQuery, PublishQuery, RetractQuery, SubscribeQuery, SubscriptionQuery, SubscriptionsQuery, UnsubscribeQuery, }; QXmppPubSubIq::QueryType queryType() const; void setQueryType(QXmppPubSubIq::QueryType queryType); QString queryJid() const; void setQueryJid(const QString &jid); QString queryNode() const; void setQueryNode(const QString &node); QList items() const; void setItems(const QList &items); QString subscriptionId() const; void setSubscriptionId(const QString &id); /// \cond static bool isPubSubIq(const QDomElement &element); /// \endcond protected: /// \cond void parseElementFromChild(const QDomElement&); void toXmlElementFromChild(QXmlStreamWriter *writer) const; /// \endcond private: QXmppPubSubIq::QueryType m_queryType; QString m_queryJid; QString m_queryNode; QList m_items; QString m_subscriptionId; QString m_subscriptionType; }; #endif qxmpp-0.7.6/src/base/QXmppDiscoveryIq.cpp0000644000175000007640000002243612116723562020261 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include #include "QXmppConstants.h" #include "QXmppDiscoveryIq.h" #include "QXmppUtils.h" static bool identityLessThan(const QXmppDiscoveryIq::Identity &i1, const QXmppDiscoveryIq::Identity &i2) { if (i1.category() < i2.category()) return true; else if (i1.category() > i2.category()) return false; if (i1.type() < i2.type()) return true; else if (i1.type() > i2.type()) return false; if (i1.language() < i2.language()) return true; else if (i1.language() > i2.language()) return false; if (i1.name() < i2.name()) return true; else if (i1.name() > i2.name()) return false; return false; } QString QXmppDiscoveryIq::Identity::category() const { return m_category; } void QXmppDiscoveryIq::Identity::setCategory(const QString &category) { m_category = category; } QString QXmppDiscoveryIq::Identity::language() const { return m_language; } void QXmppDiscoveryIq::Identity::setLanguage(const QString &language) { m_language = language; } QString QXmppDiscoveryIq::Identity::name() const { return m_name; } void QXmppDiscoveryIq::Identity::setName(const QString &name) { m_name = name; } QString QXmppDiscoveryIq::Identity::type() const { return m_type; } void QXmppDiscoveryIq::Identity::setType(const QString &type) { m_type = type; } QString QXmppDiscoveryIq::Item::jid() const { return m_jid; } void QXmppDiscoveryIq::Item::setJid(const QString &jid) { m_jid = jid; } QString QXmppDiscoveryIq::Item::name() const { return m_name; } void QXmppDiscoveryIq::Item::setName(const QString &name) { m_name = name; } QString QXmppDiscoveryIq::Item::node() const { return m_node; } void QXmppDiscoveryIq::Item::setNode(const QString &node) { m_node = node; } QStringList QXmppDiscoveryIq::features() const { return m_features; } void QXmppDiscoveryIq::setFeatures(const QStringList &features) { m_features = features; } QList QXmppDiscoveryIq::identities() const { return m_identities; } void QXmppDiscoveryIq::setIdentities(const QList &identities) { m_identities = identities; } QList QXmppDiscoveryIq::items() const { return m_items; } void QXmppDiscoveryIq::setItems(const QList &items) { m_items = items; } /// Returns the QXmppDataForm for this IQ, as defined by /// XEP-0128: Service Discovery Extensions. /// QXmppDataForm QXmppDiscoveryIq::form() const { return m_form; } /// Sets the QXmppDataForm for this IQ, as define by /// XEP-0128: Service Discovery Extensions. /// /// \param form /// void QXmppDiscoveryIq::setForm(const QXmppDataForm &form) { m_form = form; } QString QXmppDiscoveryIq::queryNode() const { return m_queryNode; } void QXmppDiscoveryIq::setQueryNode(const QString &node) { m_queryNode = node; } enum QXmppDiscoveryIq::QueryType QXmppDiscoveryIq::queryType() const { return m_queryType; } void QXmppDiscoveryIq::setQueryType(enum QXmppDiscoveryIq::QueryType type) { m_queryType = type; } /// Calculate the verification string for XEP-0115 : Entity Capabilities QByteArray QXmppDiscoveryIq::verificationString() const { QString S; QList sortedIdentities = m_identities; qSort(sortedIdentities.begin(), sortedIdentities.end(), identityLessThan); QStringList sortedFeatures = m_features; qSort(sortedFeatures); sortedFeatures.removeDuplicates(); foreach (const QXmppDiscoveryIq::Identity &identity, sortedIdentities) S += QString("%1/%2/%3/%4<").arg(identity.category(), identity.type(), identity.language(), identity.name()); foreach (const QString &feature, sortedFeatures) S += feature + QLatin1String("<"); if (!m_form.isNull()) { QMap fieldMap; foreach (const QXmppDataForm::Field &field, m_form.fields()) { fieldMap.insert(field.key(), field); } if (fieldMap.contains("FORM_TYPE")) { const QXmppDataForm::Field field = fieldMap.take("FORM_TYPE"); S += field.value().toString() + QLatin1String("<"); QStringList keys = fieldMap.keys(); qSort(keys); foreach (const QString &key, keys) { const QXmppDataForm::Field field = fieldMap.value(key); S += key + QLatin1String("<"); if (field.value().canConvert()) { QStringList list = field.value().toStringList(); list.sort(); S += list.join(QLatin1String("<")); } else { S += field.value().toString(); } S += QLatin1String("<"); } } else { qWarning("QXmppDiscoveryIq form does not contain FORM_TYPE"); } } QCryptographicHash hasher(QCryptographicHash::Sha1); hasher.addData(S.toUtf8()); return hasher.result(); } /// \cond bool QXmppDiscoveryIq::isDiscoveryIq(const QDomElement &element) { QDomElement queryElement = element.firstChildElement("query"); return (queryElement.namespaceURI() == ns_disco_info || queryElement.namespaceURI() == ns_disco_items); } void QXmppDiscoveryIq::parseElementFromChild(const QDomElement &element) { QDomElement queryElement = element.firstChildElement("query"); m_queryNode = queryElement.attribute("node"); if (queryElement.namespaceURI() == ns_disco_items) m_queryType = ItemsQuery; else m_queryType = InfoQuery; QDomElement itemElement = queryElement.firstChildElement(); while (!itemElement.isNull()) { if (itemElement.tagName() == "feature") { m_features.append(itemElement.attribute("var")); } else if (itemElement.tagName() == "identity") { QXmppDiscoveryIq::Identity identity; identity.setLanguage(itemElement.attribute("xml:lang")); identity.setCategory(itemElement.attribute("category")); identity.setName(itemElement.attribute("name")); identity.setType(itemElement.attribute("type")); // FIXME: for some reason the language does not found, // so we are forced to use QDomNamedNodeMap QDomNamedNodeMap m(itemElement.attributes()); for (int i = 0; i < m.size(); ++i) { if (m.item(i).nodeName() == "xml:lang") { identity.setLanguage(m.item(i).nodeValue()); break; } } m_identities.append(identity); } else if (itemElement.tagName() == "item") { QXmppDiscoveryIq::Item item; item.setJid(itemElement.attribute("jid")); item.setName(itemElement.attribute("name")); item.setNode(itemElement.attribute("node")); m_items.append(item); } else if (itemElement.tagName() == "x" && itemElement.namespaceURI() == ns_data) { m_form.parse(itemElement); } itemElement = itemElement.nextSiblingElement(); } } void QXmppDiscoveryIq::toXmlElementFromChild(QXmlStreamWriter *writer) const { writer->writeStartElement("query"); writer->writeAttribute("xmlns", m_queryType == InfoQuery ? ns_disco_info : ns_disco_items); helperToXmlAddAttribute(writer, "node", m_queryNode); if (m_queryType == InfoQuery) { foreach (const QXmppDiscoveryIq::Identity& identity, m_identities) { writer->writeStartElement("identity"); helperToXmlAddAttribute(writer, "xml:lang", identity.language()); helperToXmlAddAttribute(writer, "category", identity.category()); helperToXmlAddAttribute(writer, "name", identity.name()); helperToXmlAddAttribute(writer, "type", identity.type()); writer->writeEndElement(); } foreach (const QString &feature, m_features) { writer->writeStartElement("feature"); helperToXmlAddAttribute(writer, "var", feature); writer->writeEndElement(); } } else { foreach (const QXmppDiscoveryIq::Item& item, m_items) { writer->writeStartElement("item"); helperToXmlAddAttribute(writer, "jid", item.jid()); helperToXmlAddAttribute(writer, "name", item.name()); helperToXmlAddAttribute(writer, "node", item.node()); writer->writeEndElement(); } } m_form.toXml(writer); writer->writeEndElement(); } /// \endcond qxmpp-0.7.6/src/base/QXmppStreamInitiationIq_p.h0000644000175000007640000000414312116723562021554 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPSTREAMINITIATIONIQ_P_H #define QXMPPSTREAMINITIATIONIQ_P_H #include #include "QXmppDataForm.h" #include "QXmppIq.h" #include "QXmppTransferManager.h" // // W A R N I N G // ------------- // // This file is not part of the QXmpp API. It exists for the convenience // of the QXmppTransferManager class. // // This header file may change from version to version without notice, // or even be removed. // // We mean it. // class QXMPP_AUTOTEST_EXPORT QXmppStreamInitiationIq : public QXmppIq { public: enum Profile { None = 0, FileTransfer, }; QXmppDataForm featureForm() const; void setFeatureForm(const QXmppDataForm &form); QXmppTransferFileInfo fileInfo() const; void setFileInfo(const QXmppTransferFileInfo &info); QString mimeType() const; void setMimeType(const QString &mimeType); QXmppStreamInitiationIq::Profile profile() const; void setProfile(QXmppStreamInitiationIq::Profile profile); QString siId() const; void setSiId(const QString &id); static bool isStreamInitiationIq(const QDomElement &element); protected: /// \cond void parseElementFromChild(const QDomElement &element); void toXmlElementFromChild(QXmlStreamWriter *writer) const; /// \endcond private: QXmppDataForm m_featureForm; QXmppTransferFileInfo m_fileInfo; QString m_mimeType; Profile m_profile; QString m_siId; }; #endif qxmpp-0.7.6/src/base/QXmppStreamInitiationIq.cpp0000644000175000007640000000704712116723562021576 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include "QXmppConstants.h" #include "QXmppStreamInitiationIq_p.h" #include "QXmppUtils.h" QXmppDataForm QXmppStreamInitiationIq::featureForm() const { return m_featureForm; } void QXmppStreamInitiationIq::setFeatureForm(const QXmppDataForm &form) { m_featureForm = form; } QXmppTransferFileInfo QXmppStreamInitiationIq::fileInfo() const { return m_fileInfo; } void QXmppStreamInitiationIq::setFileInfo(const QXmppTransferFileInfo &fileInfo) { m_fileInfo = fileInfo; } QString QXmppStreamInitiationIq::mimeType() const { return m_mimeType; } void QXmppStreamInitiationIq::setMimeType(const QString &mimeType) { m_mimeType = mimeType; } QXmppStreamInitiationIq::Profile QXmppStreamInitiationIq::profile() const { return m_profile; } void QXmppStreamInitiationIq::setProfile(QXmppStreamInitiationIq::Profile profile) { m_profile = profile; } QString QXmppStreamInitiationIq::siId() const { return m_siId; } void QXmppStreamInitiationIq::setSiId(const QString &id) { m_siId = id; } /// \cond bool QXmppStreamInitiationIq::isStreamInitiationIq(const QDomElement &element) { QDomElement siElement = element.firstChildElement("si"); return (siElement.namespaceURI() == ns_stream_initiation); } void QXmppStreamInitiationIq::parseElementFromChild(const QDomElement &element) { QDomElement siElement = element.firstChildElement("si"); m_siId = siElement.attribute("id"); m_mimeType = siElement.attribute("mime-type"); if (siElement.attribute("profile") == ns_stream_initiation_file_transfer) m_profile = FileTransfer; else m_profile = None; QDomElement itemElement = siElement.firstChildElement(); while (!itemElement.isNull()) { if (itemElement.tagName() == "feature" && itemElement.namespaceURI() == ns_feature_negotiation) { m_featureForm.parse(itemElement.firstChildElement()); } else if (itemElement.tagName() == "file" && itemElement.namespaceURI() == ns_stream_initiation_file_transfer) { m_fileInfo.parse(itemElement); } itemElement = itemElement.nextSiblingElement(); } } void QXmppStreamInitiationIq::toXmlElementFromChild(QXmlStreamWriter *writer) const { writer->writeStartElement("si"); writer->writeAttribute("xmlns", ns_stream_initiation); helperToXmlAddAttribute(writer, "id", m_siId); helperToXmlAddAttribute(writer, "mime-type", m_mimeType); if (m_profile == FileTransfer) helperToXmlAddAttribute(writer, "profile", ns_stream_initiation_file_transfer); if (!m_fileInfo.isNull()) m_fileInfo.toXml(writer); if (!m_featureForm.isNull()) { writer->writeStartElement("feature"); writer->writeAttribute("xmlns", ns_feature_negotiation); m_featureForm.toXml(writer); writer->writeEndElement(); } writer->writeEndElement(); } /// \endcond qxmpp-0.7.6/src/base/QXmppSasl_p.h0000644000175000007640000001702612116723562016705 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Manjeet Dahiya * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPSASL_P_H #define QXMPPSASL_P_H #include #include #include "QXmppGlobal.h" #include "QXmppLogger.h" #include "QXmppStanza.h" class QXmppSaslClientPrivate; class QXmppSaslServerPrivate; // // W A R N I N G // ------------- // // This file is not part of the QXmpp API. It exists for the convenience // of the QXmppIncomingClient and QXmppOutgoingClient classes. // // This header file may change from version to version without notice, // or even be removed. // // We mean it. // class QXMPP_AUTOTEST_EXPORT QXmppSaslClient : public QXmppLoggable { public: QXmppSaslClient(QObject *parent = 0); virtual ~QXmppSaslClient(); QString host() const; void setHost(const QString &host); QString serviceType() const; void setServiceType(const QString &serviceType); QString username() const; void setUsername(const QString &username); QString password() const; void setPassword(const QString &password); virtual QString mechanism() const = 0; virtual bool respond(const QByteArray &challenge, QByteArray &response) = 0; static QStringList availableMechanisms(); static QXmppSaslClient* create(const QString &mechanism, QObject *parent = 0); private: QXmppSaslClientPrivate *d; }; class QXMPP_AUTOTEST_EXPORT QXmppSaslServer : public QXmppLoggable { public: enum Response { Challenge = 0, Succeeded = 1, Failed = 2, InputNeeded = 3 }; QXmppSaslServer(QObject *parent = 0); virtual ~QXmppSaslServer(); QString username() const; void setUsername(const QString &username); QString password() const; void setPassword(const QString &password); QByteArray passwordDigest() const; void setPasswordDigest(const QByteArray &digest); QString realm() const; void setRealm(const QString &realm); virtual QString mechanism() const = 0; virtual Response respond(const QByteArray &challenge, QByteArray &response) = 0; static QXmppSaslServer* create(const QString &mechanism, QObject *parent = 0); private: QXmppSaslServerPrivate *d; }; class QXMPP_AUTOTEST_EXPORT QXmppSaslDigestMd5 { public: static void setNonce(const QByteArray &nonce); // message parsing and serialization static QMap parseMessage(const QByteArray &ba); static QByteArray serializeMessage(const QMap &map); }; class QXMPP_AUTOTEST_EXPORT QXmppSaslAuth : public QXmppStanza { public: QXmppSaslAuth(const QString &mechanism = QString(), const QByteArray &value = QByteArray()); QString mechanism() const; void setMechanism(const QString &mechanism); QByteArray value() const; void setValue(const QByteArray &value); /// \cond void parse(const QDomElement &element); void toXml(QXmlStreamWriter *writer) const; /// \endcond private: QString m_mechanism; QByteArray m_value; }; class QXMPP_AUTOTEST_EXPORT QXmppSaslChallenge : public QXmppStanza { public: QXmppSaslChallenge(const QByteArray &value = QByteArray()); QByteArray value() const; void setValue(const QByteArray &value); /// \cond void parse(const QDomElement &element); void toXml(QXmlStreamWriter *writer) const; /// \endcond private: QByteArray m_value; }; class QXMPP_AUTOTEST_EXPORT QXmppSaslFailure : public QXmppStanza { public: QXmppSaslFailure(const QString &condition = QString()); QString condition() const; void setCondition(const QString &condition); /// \cond void parse(const QDomElement &element); void toXml(QXmlStreamWriter *writer) const; /// \endcond private: QString m_condition; }; class QXMPP_AUTOTEST_EXPORT QXmppSaslResponse : public QXmppStanza { public: QXmppSaslResponse(const QByteArray &value = QByteArray()); QByteArray value() const; void setValue(const QByteArray &value); /// \cond void parse(const QDomElement &element); void toXml(QXmlStreamWriter *writer) const; /// \endcond private: QByteArray m_value; }; class QXMPP_AUTOTEST_EXPORT QXmppSaslSuccess : public QXmppStanza { public: QXmppSaslSuccess(); /// \cond void parse(const QDomElement &element); void toXml(QXmlStreamWriter *writer) const; /// \endcond }; class QXmppSaslClientAnonymous : public QXmppSaslClient { public: QXmppSaslClientAnonymous(QObject *parent = 0); QString mechanism() const; bool respond(const QByteArray &challenge, QByteArray &response); private: int m_step; }; class QXmppSaslClientDigestMd5 : public QXmppSaslClient { public: QXmppSaslClientDigestMd5(QObject *parent = 0); QString mechanism() const; bool respond(const QByteArray &challenge, QByteArray &response); private: QByteArray m_cnonce; QByteArray m_nc; QByteArray m_nonce; QByteArray m_secret; int m_step; }; class QXmppSaslClientFacebook : public QXmppSaslClient { public: QXmppSaslClientFacebook(QObject *parent = 0); QString mechanism() const; bool respond(const QByteArray &challenge, QByteArray &response); private: int m_step; }; class QXmppSaslClientGoogle : public QXmppSaslClient { public: QXmppSaslClientGoogle(QObject *parent = 0); QString mechanism() const; bool respond(const QByteArray &challenge, QByteArray &response); private: int m_step; }; class QXmppSaslClientPlain : public QXmppSaslClient { public: QXmppSaslClientPlain(QObject *parent = 0); QString mechanism() const; bool respond(const QByteArray &challenge, QByteArray &response); private: int m_step; }; class QXmppSaslClientWindowsLive : public QXmppSaslClient { public: QXmppSaslClientWindowsLive(QObject *parent = 0); QString mechanism() const; bool respond(const QByteArray &challenge, QByteArray &response); private: int m_step; }; class QXmppSaslServerAnonymous : public QXmppSaslServer { public: QXmppSaslServerAnonymous(QObject *parent = 0); QString mechanism() const; Response respond(const QByteArray &challenge, QByteArray &response); private: int m_step; }; class QXmppSaslServerDigestMd5 : public QXmppSaslServer { public: QXmppSaslServerDigestMd5(QObject *parent = 0); QString mechanism() const; Response respond(const QByteArray &challenge, QByteArray &response); private: QByteArray m_cnonce; QByteArray m_nc; QByteArray m_nonce; QByteArray m_secret; int m_step; }; class QXmppSaslServerFacebook : public QXmppSaslServer { public: QXmppSaslServerFacebook(QObject *parent = 0); QString mechanism() const; Response respond(const QByteArray &challenge, QByteArray &response); private: int m_step; }; class QXmppSaslServerPlain : public QXmppSaslServer { public: QXmppSaslServerPlain(QObject *parent = 0); QString mechanism() const; Response respond(const QByteArray &challenge, QByteArray &response); private: int m_step; }; #endif qxmpp-0.7.6/src/base/qdnslookup_stub.cpp0000644000175000007640000000377712116723562020275 0ustar sharkyjerryweb/**************************************************************************** ** ** Copyright (C) 2012 Jeremy Lainé ** Contact: http://www.qt-project.org/ ** ** This file is part of the QtNetwork module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage ** This file may be used under the terms of the GNU Lesser General Public ** License version 2.1 as published by the Free Software Foundation and ** appearing in the file LICENSE.LGPL included in the packaging of this ** file. Please review the following information to ensure the GNU Lesser ** General Public License version 2.1 requirements will be met: ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain additional ** rights. These rights are described in the Nokia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU General ** Public License version 3.0 as published by the Free Software Foundation ** and appearing in the file LICENSE.GPL included in the packaging of this ** file. Please review the following information to ensure the GNU General ** Public License version 3.0 requirements will be met: ** http://www.gnu.org/copyleft/gpl.html. ** ** Other Usage ** Alternatively, this file may be used in accordance with the terms and ** conditions contained in a signed written agreement between you and Nokia. ** ** ** ** ** ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #include "qdnslookup_p.h" QT_BEGIN_NAMESPACE void QDnsLookupRunnable::query(const int requestType, const QByteArray &requestName, QDnsLookupReply *reply) { Q_UNUSED(requestType); Q_UNUSED(requestName); reply->error = QDnsLookup::ResolverError; reply->errorString = QLatin1String("QDnsLookup is not implemented for this platform"); } QT_END_NAMESPACE qxmpp-0.7.6/src/base/QXmppByteStreamIq.h0000644000175000007640000000431012116723562020025 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPBYTESTREAMIQ_H #define QXMPPBYTESTREAMIQ_H #include "QXmppIq.h" #include class QXMPP_EXPORT QXmppByteStreamIq : public QXmppIq { public: enum Mode { None = 0, Tcp, Udp, }; class QXMPP_EXPORT StreamHost { public: QString jid() const; void setJid(const QString &jid); QString host() const; void setHost(const QString &host); quint16 port() const; void setPort(quint16 port); QString zeroconf() const; void setZeroconf(const QString &zeroconf); private: QString m_host; QString m_jid; quint16 m_port; QString m_zeroconf; }; QXmppByteStreamIq::Mode mode() const; void setMode(QXmppByteStreamIq::Mode mode); QString sid() const; void setSid(const QString &sid); QString activate() const; void setActivate(const QString &activate); QList streamHosts() const; void setStreamHosts(const QList &streamHosts); QString streamHostUsed() const; void setStreamHostUsed(const QString &jid); static bool isByteStreamIq(const QDomElement &element); protected: /// \cond void parseElementFromChild(const QDomElement &element); void toXmlElementFromChild(QXmlStreamWriter *writer) const; /// \endcond private: Mode m_mode; QString m_sid; QString m_activate; QList m_streamHosts; QString m_streamHostUsed; }; #endif qxmpp-0.7.6/src/base/QXmppUtils.h0000644000175000007640000000452312116723562016562 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Manjeet Dahiya * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPUTILS_H #define QXMPPUTILS_H // forward declarations of QXmlStream* classes will not work on Mac, we need to // include the whole header. // See http://lists.trolltech.com/qt-interest/2008-07/thread00798-0.html // for an explanation. #include #include "QXmppGlobal.h" class QByteArray; class QDateTime; class QDomElement; class QString; class QStringList; /// \brief The QXmppUtils class contains static utility functions. /// class QXMPP_EXPORT QXmppUtils { public: // XEP-0082: XMPP Date and Time Profiles 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); static QString jidToResource(const QString& jid); static QString jidToUser(const QString& jid); static QString jidToBareJid(const QString& jid); static quint32 generateCrc32(const QByteArray &input); static QByteArray generateHmacMd5(const QByteArray &key, const QByteArray &text); static QByteArray generateHmacSha1(const QByteArray &key, const QByteArray &text); static int generateRandomInteger(int N); static QByteArray generateRandomBytes(int length); static QString generateStanzaHash(int length=32); }; void helperToXmlAddAttribute(QXmlStreamWriter* stream, const QString& name, const QString& value); void helperToXmlAddTextElement(QXmlStreamWriter* stream, const QString& name, const QString& value); #endif // QXMPPUTILS_H qxmpp-0.7.6/src/base/QXmppRosterIq.cpp0000644000175000007640000001376712116723562017577 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Manjeet Dahiya * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include #include "QXmppRosterIq.h" #include "QXmppConstants.h" #include "QXmppUtils.h" /// Adds an item to the roster IQ. /// /// \param item void QXmppRosterIq::addItem(const Item& item) { m_items.append(item); } /// Returns the roster IQ's items. QList QXmppRosterIq::items() const { return m_items; } /// \cond bool QXmppRosterIq::isRosterIq(const QDomElement &element) { return (element.firstChildElement("query").namespaceURI() == ns_roster); } void QXmppRosterIq::parseElementFromChild(const QDomElement &element) { QDomElement itemElement = element. firstChildElement("query"). firstChildElement("item"); while(!itemElement.isNull()) { QXmppRosterIq::Item item; item.parse(itemElement); m_items.append(item); itemElement = itemElement.nextSiblingElement(); } } void QXmppRosterIq::toXmlElementFromChild(QXmlStreamWriter *writer) const { writer->writeStartElement("query"); writer->writeAttribute( "xmlns", ns_roster); for(int i = 0; i < m_items.count(); ++i) m_items.at(i).toXml(writer); writer->writeEndElement(); } /// \endcond /// Constructs a new roster entry. QXmppRosterIq::Item::Item() : m_type(NotSet) { } /// Returns the bareJid of the roster entry. /// /// \return bareJid as a QString /// QString QXmppRosterIq::Item::bareJid() const { return m_bareJid; } /// Sets the bareJid of the roster entry. /// /// \param bareJid as a QString /// void QXmppRosterIq::Item::setBareJid(const QString &bareJid) { m_bareJid = bareJid; } /// Returns the groups of the roster entry. /// /// \return QSet list of all the groups /// QSet QXmppRosterIq::Item::groups() const { return m_groups; } /// Sets the groups of the roster entry. /// /// \param groups list of all the groups as a QSet /// void QXmppRosterIq::Item::setGroups(const QSet& groups) { m_groups = groups; } /// Returns the name of the roster entry. /// /// \return name as a QString /// QString QXmppRosterIq::Item::name() const { return m_name; } /// Sets the name of the roster entry. /// /// \param name as a QString /// void QXmppRosterIq::Item::setName(const QString &name) { m_name = name; } /// Returns the subscription status of the roster entry. It is the "ask" /// attribute in the Roster IQ stanza. Its value can be "subscribe" or "unsubscribe" /// or empty. /// /// \return subscription status as a QString /// /// QString QXmppRosterIq::Item::subscriptionStatus() const { return m_subscriptionStatus; } /// Sets the subscription status of the roster entry. It is the "ask" /// attribute in the Roster IQ stanza. Its value can be "subscribe" or "unsubscribe" /// or empty. /// /// \param status as a QString /// void QXmppRosterIq::Item::setSubscriptionStatus(const QString &status) { m_subscriptionStatus = status; } /// Returns the subscription type of the roster entry. /// QXmppRosterIq::Item::SubscriptionType QXmppRosterIq::Item::subscriptionType() const { return m_type; } /// Sets the subscription type of the roster entry. /// /// \param type /// void QXmppRosterIq::Item::setSubscriptionType(SubscriptionType type) { m_type = type; } QString QXmppRosterIq::Item::getSubscriptionTypeStr() const { switch(m_type) { case NotSet: return ""; case None: return "none"; case Both: return "both"; case From: return "from"; case To: return "to"; case Remove: return "remove"; default: { qWarning("QXmppRosterIq::Item::getTypeStr(): invalid type"); return ""; } } } void QXmppRosterIq::Item::setSubscriptionTypeFromStr(const QString& type) { if(type == "") setSubscriptionType(NotSet); else if(type == "none") setSubscriptionType(None); else if(type == "both") setSubscriptionType(Both); else if(type == "from") setSubscriptionType(From); else if(type == "to") setSubscriptionType(To); else if(type == "remove") setSubscriptionType(Remove); else qWarning("QXmppRosterIq::Item::setTypeFromStr(): invalid type"); } /// \cond void QXmppRosterIq::Item::parse(const QDomElement &element) { m_name = element.attribute("name"); m_bareJid = element.attribute("jid"); setSubscriptionTypeFromStr(element.attribute("subscription")); setSubscriptionStatus(element.attribute("ask")); QDomElement groupElement = element.firstChildElement("group"); while(!groupElement.isNull()) { m_groups << groupElement.text(); groupElement = groupElement.nextSiblingElement("group"); } } void QXmppRosterIq::Item::toXml(QXmlStreamWriter *writer) const { writer->writeStartElement("item"); helperToXmlAddAttribute(writer,"jid", m_bareJid); helperToXmlAddAttribute(writer,"name", m_name); helperToXmlAddAttribute(writer,"subscription", getSubscriptionTypeStr()); helperToXmlAddAttribute(writer, "ask", subscriptionStatus()); QSet::const_iterator i = m_groups.constBegin(); while(i != m_groups.constEnd()) { helperToXmlAddTextElement(writer,"group", *i); ++i; } writer->writeEndElement(); } /// \endcond qxmpp-0.7.6/src/base/QXmppResultSet.cpp0000644000175000007640000001475012116723562017752 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Olivier Goffart * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "QXmppConstants.h" #include "QXmppResultSet.h" #include "QXmppUtils.h" #include #include QXmppResultSetQuery::QXmppResultSetQuery() : m_index(-1) , m_max(-1) {} /// Returns the maximum number of results. /// /// \note -1 means no limit, 0 means no results are wanted. /// int QXmppResultSetQuery::max() const { return m_max; } /// Sets the maximum number of results. /// /// \note -1 means no limit, 0 means no results are wanted. void QXmppResultSetQuery::setMax(int max) { m_max = max; } /// Returns the index for the first element in the page. /// /// This is used for retrieving pages out of order. int QXmppResultSetQuery::index() const { return m_index; } /// Sets the index for the first element in the page. /// /// This is used for retrieving pages out of order. void QXmppResultSetQuery::setIndex(int index) { m_index=index; } /// Returns the UID of the first result in the next page. /// /// This is used for for paging backwards through results. QString QXmppResultSetQuery::before() const { return m_before; } /// Sets the UID of the first result in the next page. /// /// This is used for for paging backwards through results. void QXmppResultSetQuery::setBefore(const QString& before) { m_before=before; } /// Returns the UID of the last result in the previous page. /// /// This is used for for paging forwards through results. QString QXmppResultSetQuery::after() const { return m_after; } /// Sets the UID of the last result in the previous page. /// /// This is used for for paging forwards through results. void QXmppResultSetQuery::setAfter(const QString& after) { m_after=after; } /// Returns true if no result set information is present. bool QXmppResultSetQuery::isNull() const { return m_max == -1 && m_index == -1 && m_after.isNull() && m_before.isNull(); } /// \cond void QXmppResultSetQuery::parse(const QDomElement& element) { QDomElement setElement = (element.tagName() == "set") ? element : element.firstChildElement("set"); if (setElement.namespaceURI() == ns_rsm) { bool ok = false; m_max = setElement.firstChildElement("max").text().toInt(&ok); if (!ok) m_max = -1; m_after = setElement.firstChildElement("after").text(); m_before = setElement.firstChildElement("before").text(); m_index = setElement.firstChildElement("index").text().toInt(&ok); if (!ok) m_index = -1; } } void QXmppResultSetQuery::toXml(QXmlStreamWriter* writer) const { if (isNull()) return; writer->writeStartElement("set"); writer->writeAttribute("xmlns", ns_rsm); if (m_max >= 0) helperToXmlAddTextElement(writer, "max", QString::number(m_max)); if (!m_after.isNull()) helperToXmlAddTextElement(writer, "after", m_after); if (!m_before.isNull()) helperToXmlAddTextElement(writer, "before", m_before); if (m_index >= 0) helperToXmlAddTextElement(writer, "index", QString::number(m_index)); writer->writeEndElement(); } /// \endcond QXmppResultSetReply::QXmppResultSetReply() : m_count(-1) , m_index(-1) {} /// Returns the UID of the first result in the page. QString QXmppResultSetReply::first() const { return m_first; } /// Sets the UID of the first result in the page. void QXmppResultSetReply::setFirst(const QString& first) { m_first=first; } /// Returns the UID of the last result in the page. QString QXmppResultSetReply::last() const { return m_last; } /// Sets the UID of the last result in the page. void QXmppResultSetReply::setLast(const QString& last) { m_last=last; } /// Returns the total number of items in the set. /// /// \note This may be an approximate count. int QXmppResultSetReply::count() const { return m_count; } /// Sets the total number of items in the set. /// /// \note This may be an approximate count. void QXmppResultSetReply::setCount(int count) { m_count = count; } /// Returns the index for the first result in the page. /// /// This is used for retrieving pages out of order. /// /// \note This may be an approximate index. int QXmppResultSetReply::index() const { return m_index; } /// Sets the index for the first result in the page. /// /// This is used for retrieving pages out of order. /// /// \note This may be an approximate index. void QXmppResultSetReply::setIndex(int index) { m_index = index; } /// Returns true if no result set information is present. bool QXmppResultSetReply::isNull() const { return m_count == -1 && m_index == -1 && m_first.isNull() && m_last.isNull(); } /// \cond void QXmppResultSetReply::parse(const QDomElement& element) { QDomElement setElement = (element.tagName() == "set") ? element : element.firstChildElement("set"); if (setElement.namespaceURI() == ns_rsm) { m_count = setElement.firstChildElement("count").text().toInt(); QDomElement firstElem = setElement.firstChildElement("first"); m_first = firstElem.text(); bool ok = false; m_index = firstElem.attribute("index").toInt(&ok); if(!ok) m_index = -1; m_last = setElement.firstChildElement("last").text(); } } void QXmppResultSetReply::toXml(QXmlStreamWriter* writer) const { if (isNull()) return; writer->writeStartElement("set"); writer->writeAttribute("xmlns", ns_rsm); if (!m_first.isNull() || m_index >= 0) { writer->writeStartElement("first"); if (m_index >= 0) writer->writeAttribute("index", QString::number(m_index)); writer->writeCharacters(m_first); writer->writeEndElement(); } if (!m_last.isNull()) helperToXmlAddTextElement(writer, "last", m_last); if (m_count >= 0) helperToXmlAddTextElement(writer, "count", QString::number(m_count)); writer->writeEndElement(); } /// \endcond qxmpp-0.7.6/src/base/QXmppStanza.cpp0000644000175000007640000003423712116723562017262 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Manjeet Dahiya * Jeremy Lainé * Georg Rudoy * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "QXmppStanza.h" #include "QXmppUtils.h" #include "QXmppConstants.h" #include #include uint QXmppStanza::s_uniqeIdNo = 0; class QXmppExtendedAddressPrivate : public QSharedData { public: bool delivered; QString description; QString jid; QString type; }; /// Constructs an empty extended address. QXmppExtendedAddress::QXmppExtendedAddress() : d(new QXmppExtendedAddressPrivate()) { d->delivered = false; } /// Constructs a copy of other. /// /// \param other /// QXmppExtendedAddress::QXmppExtendedAddress(const QXmppExtendedAddress &other) : d(other.d) { } QXmppExtendedAddress::~QXmppExtendedAddress() { } /// Assigns the other address to this one. /// /// \param other /// QXmppExtendedAddress& QXmppExtendedAddress::operator=(const QXmppExtendedAddress& other) { d = other.d; return *this; } /// Returns the human-readable description of the address. QString QXmppExtendedAddress::description() const { return d->description; } /// Sets the human-readable \a description of the address. void QXmppExtendedAddress::setDescription(const QString &description) { d->description = description; } /// Returns the JID of the address. QString QXmppExtendedAddress::jid() const { return d->jid; } /// Sets the JID of the address. void QXmppExtendedAddress::setJid(const QString &jid) { d->jid = jid; } /// Returns the type of the address. QString QXmppExtendedAddress::type() const { return d->type; } /// Sets the \a type of the address. void QXmppExtendedAddress::setType(const QString &type) { d->type = type; } /// Returns whether the stanza has been delivered to this address. bool QXmppExtendedAddress::isDelivered() const { return d->delivered; } /// Sets whether the stanza has been \a delivered to this address. void QXmppExtendedAddress::setDelivered(bool delivered) { d->delivered = delivered; } /// Checks whether this address is valid. The extended address is considered /// to be valid if at least type and JID fields are non-empty. bool QXmppExtendedAddress::isValid() const { return !d->type.isEmpty() && !d->jid.isEmpty(); } /// \cond void QXmppExtendedAddress::parse(const QDomElement &element) { d->delivered = element.attribute("delivered") == "true"; d->description = element.attribute("desc"); d->jid = element.attribute("jid"); d->type = element.attribute("type"); } void QXmppExtendedAddress::toXml(QXmlStreamWriter *xmlWriter) const { xmlWriter->writeStartElement("address"); if (d->delivered) xmlWriter->writeAttribute("delivered", "true"); if (!d->description.isEmpty()) xmlWriter->writeAttribute("desc", d->description); xmlWriter->writeAttribute("jid", d->jid); xmlWriter->writeAttribute("type", d->type); xmlWriter->writeEndElement(); } /// \endcond QXmppStanza::Error::Error(): m_code(0), m_type(static_cast(-1)), m_condition(static_cast(-1)) { } QXmppStanza::Error::Error(Type type, Condition cond, const QString& text): m_code(0), m_type(type), m_condition(cond), m_text(text) { } QXmppStanza::Error::Error(const QString& type, const QString& cond, const QString& text): m_code(0), m_text(text) { setTypeFromStr(type); setConditionFromStr(cond); } QString QXmppStanza::Error::text() const { return m_text; } void QXmppStanza::Error::setText(const QString& text) { m_text = text; } int QXmppStanza::Error::code() const { return m_code; } void QXmppStanza::Error::setCode(int code) { m_code = code; } QXmppStanza::Error::Condition QXmppStanza::Error::condition() const { return m_condition; } void QXmppStanza::Error::setCondition(QXmppStanza::Error::Condition cond) { m_condition = cond; } QXmppStanza::Error::Type QXmppStanza::Error::type() const { return m_type; } void QXmppStanza::Error::setType(QXmppStanza::Error::Type type) { m_type = type; } /// \cond QString QXmppStanza::Error::getTypeStr() const { switch(m_type) { case Cancel: return "cancel"; case Continue: return "continue"; case Modify: return "modify"; case Auth: return "auth"; case Wait: return "wait"; default: return ""; } } QString QXmppStanza::Error::getConditionStr() const { switch(m_condition) { case BadRequest: return "bad-request"; case Conflict: return "conflict"; case FeatureNotImplemented: return "feature-not-implemented"; case Forbidden: return "forbidden"; case Gone: return "gone"; case InternalServerError: return "internal-server-error"; case ItemNotFound: return "item-not-found"; case JidMalformed: return "jid-malformed"; case NotAcceptable: return "not-acceptable"; case NotAllowed: return "not-allowed"; case NotAuthorized: return "not-authorized"; case PaymentRequired: return "payment-required"; case RecipientUnavailable: return "recipient-unavailable"; case Redirect: return "redirect"; case RegistrationRequired: return "registration-required"; case RemoteServerNotFound: return "remote-server-not-found"; case RemoteServerTimeout: return "remote-server-timeout"; case ResourceConstraint: return "resource-constraint"; case ServiceUnavailable: return "service-unavailable"; case SubscriptionRequired: return "subscription-required"; case UndefinedCondition: return "undefined-condition"; case UnexpectedRequest: return "unexpected-request"; default: return ""; } } void QXmppStanza::Error::setTypeFromStr(const QString& type) { if(type == "cancel") setType(Cancel); else if(type == "continue") setType(Continue); else if(type == "modify") setType(Modify); else if(type == "auth") setType(Auth); else if(type == "wait") setType(Wait); else setType(static_cast(-1)); } void QXmppStanza::Error::setConditionFromStr(const QString& type) { if(type == "bad-request") setCondition(BadRequest); else if(type == "conflict") setCondition(Conflict); else if(type == "feature-not-implemented") setCondition(FeatureNotImplemented); else if(type == "forbidden") setCondition(Forbidden); else if(type == "gone") setCondition(Gone); else if(type == "internal-server-error") setCondition(InternalServerError); else if(type == "item-not-found") setCondition(ItemNotFound); else if(type == "jid-malformed") setCondition(JidMalformed); else if(type == "not-acceptable") setCondition(NotAcceptable); else if(type == "not-allowed") setCondition(NotAllowed); else if(type == "not-authorized") setCondition(NotAuthorized); else if(type == "payment-required") setCondition(PaymentRequired); else if(type == "recipient-unavailable") setCondition(RecipientUnavailable); else if(type == "redirect") setCondition(Redirect); else if(type == "registration-required") setCondition(RegistrationRequired); else if(type == "remote-server-not-found") setCondition(RemoteServerNotFound); else if(type == "remote-server-timeout") setCondition(RemoteServerTimeout); else if(type == "resource-constraint") setCondition(ResourceConstraint); else if(type == "service-unavailable") setCondition(ServiceUnavailable); else if(type == "subscription-required") setCondition(SubscriptionRequired); else if(type == "undefined-condition") setCondition(UndefinedCondition); else if(type == "unexpected-request") setCondition(UnexpectedRequest); else setCondition(static_cast(-1)); } void QXmppStanza::Error::parse(const QDomElement &errorElement) { setCode(errorElement.attribute("code").toInt()); setTypeFromStr(errorElement.attribute("type")); QString text; QString cond; QDomElement element = errorElement.firstChildElement(); while(!element.isNull()) { if(element.tagName() == "text") text = element.text(); else if(element.namespaceURI() == ns_stanza) { cond = element.tagName(); } element = element.nextSiblingElement(); } setConditionFromStr(cond); setText(text); } void QXmppStanza::Error::toXml( QXmlStreamWriter *writer ) const { QString cond = getConditionStr(); QString type = getTypeStr(); if(cond.isEmpty() && type.isEmpty()) return; writer->writeStartElement("error"); helperToXmlAddAttribute(writer, "type", type); if (m_code > 0) helperToXmlAddAttribute(writer, "code", QString::number(m_code)); if(!cond.isEmpty()) { writer->writeStartElement(cond); writer->writeAttribute("xmlns", ns_stanza); writer->writeEndElement(); } if(!m_text.isEmpty()) { writer->writeStartElement("text"); writer->writeAttribute("xml:lang", "en"); writer->writeAttribute("xmlns", ns_stanza); writer->writeCharacters(m_text); writer->writeEndElement(); } writer->writeEndElement(); } /// \endcond class QXmppStanzaPrivate : public QSharedData { public: QString to; QString from; QString id; QString lang; QXmppStanza::Error error; QXmppElementList extensions; QList extendedAddresses; }; /// Constructs a QXmppStanza with the specified sender and recipient. /// /// \param from /// \param to QXmppStanza::QXmppStanza(const QString& from, const QString& to) : d(new QXmppStanzaPrivate) { d->to = to; d->from = from; } /// Constructs a copy of \a other. QXmppStanza::QXmppStanza(const QXmppStanza &other) : d(other.d) { } /// Destroys a QXmppStanza. QXmppStanza::~QXmppStanza() { } /// Assigns \a other to this stanza. QXmppStanza& QXmppStanza::operator=(const QXmppStanza &other) { d = other.d; return *this; } /// Returns the stanza's recipient JID. /// QString QXmppStanza::to() const { return d->to; } /// Sets the stanza's recipient JID. /// /// \param to void QXmppStanza::setTo(const QString& to) { d->to = to; } /// Returns the stanza's sender JID. QString QXmppStanza::from() const { return d->from; } /// Sets the stanza's sender JID. /// /// \param from void QXmppStanza::setFrom(const QString& from) { d->from = from; } /// Returns the stanza's identifier. QString QXmppStanza::id() const { return d->id; } /// Sets the stanza's identifier. /// /// \param id void QXmppStanza::setId(const QString& id) { d->id = id; } /// Returns the stanza's language. QString QXmppStanza::lang() const { return d->lang; } /// Sets the stanza's language. /// /// \param lang void QXmppStanza::setLang(const QString& lang) { d->lang = lang; } /// Returns the stanza's error. QXmppStanza::Error QXmppStanza::error() const { return d->error; } /// Sets the stanza's error. /// /// \param error void QXmppStanza::setError(const QXmppStanza::Error& error) { d->error = error; } /// Returns the stanza's "extensions". /// /// Extensions are XML elements which are not handled internally by QXmpp. QXmppElementList QXmppStanza::extensions() const { return d->extensions; } /// Sets the stanza's "extensions". /// /// \param extensions void QXmppStanza::setExtensions(const QXmppElementList &extensions) { d->extensions = extensions; } /// Returns the stanza's extended addresses as defined by /// XEP-0033: Extended Stanza Addressing. QList QXmppStanza::extendedAddresses() const { return d->extendedAddresses; } /// Sets the stanza's extended addresses as defined by /// XEP-0033: Extended Stanza Addressing. void QXmppStanza::setExtendedAddresses(const QList &addresses) { d->extendedAddresses = addresses; } /// \cond void QXmppStanza::generateAndSetNextId() { // get back ++s_uniqeIdNo; d->id = "qxmpp" + QString::number(s_uniqeIdNo); } void QXmppStanza::parse(const QDomElement &element) { d->from = element.attribute("from"); d->to = element.attribute("to"); d->id = element.attribute("id"); d->lang = element.attribute("lang"); QDomElement errorElement = element.firstChildElement("error"); if(!errorElement.isNull()) d->error.parse(errorElement); // XEP-0033: Extended Stanza Addressing QDomElement addressElement = element.firstChildElement("addresses").firstChildElement("address"); while (!addressElement.isNull()) { QXmppExtendedAddress address; address.parse(addressElement); if (address.isValid()) d->extendedAddresses << address; addressElement = addressElement.nextSiblingElement("address"); } } void QXmppStanza::extensionsToXml(QXmlStreamWriter *xmlWriter) const { // XEP-0033: Extended Stanza Addressing if (!d->extendedAddresses.isEmpty()) { xmlWriter->writeStartElement("addresses"); xmlWriter->writeAttribute("xmlns", ns_extended_addressing); foreach (const QXmppExtendedAddress &address, d->extendedAddresses) address.toXml(xmlWriter); xmlWriter->writeEndElement(); } // other extensions foreach (const QXmppElement &extension, d->extensions) extension.toXml(xmlWriter); } /// \endcond qxmpp-0.7.6/src/base/QXmppRtpChannel.cpp0000644000175000007640000007103112116723562020051 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include #include #include #include "QXmppCodec_p.h" #include "QXmppJingleIq.h" #include "QXmppRtpChannel.h" #ifndef M_PI #define M_PI 3.14159265358979323846264338327950288 #endif //#define QXMPP_DEBUG_RTP //#define QXMPP_DEBUG_RTP_BUFFER #define SAMPLE_BYTES 2 const quint8 RTP_VERSION = 0x02; /// Parses an RTP packet. /// /// \param ba bool QXmppRtpPacket::decode(const QByteArray &ba) { if (ba.isEmpty()) return false; // fixed header quint8 tmp; QDataStream stream(ba); stream >> tmp; version = (tmp >> 6); const quint8 cc = (tmp >> 1) & 0xf; const int hlen = 12 + 4 * cc; if (version != RTP_VERSION || ba.size() < hlen) return false; stream >> tmp; marker = (tmp >> 7); type = tmp & 0x7f; stream >> sequence; stream >> stamp; stream >> ssrc; // contributing source IDs csrc.clear(); quint32 src; for (int i = 0; i < cc; ++i) { stream >> src; csrc << src; } // retrieve payload payload = ba.right(ba.size() - hlen); return true; } /// Encodes an RTP packet. QByteArray QXmppRtpPacket::encode() const { Q_ASSERT(csrc.size() < 16); // fixed header QByteArray ba; ba.resize(payload.size() + 12 + 4 * csrc.size()); QDataStream stream(&ba, QIODevice::WriteOnly); stream << quint8(((version & 0x3) << 6) | ((csrc.size() & 0xf) << 1)); stream << quint8((type & 0x7f) | (marker << 7)); stream << sequence; stream << stamp; stream << ssrc; // contributing source ids foreach (const quint32 &src, csrc) stream << src; stream.writeRawData(payload.constData(), payload.size()); return ba; } /// Returns a string representation of the RTP header. QString QXmppRtpPacket::toString() const { return QString("RTP packet seq %1 stamp %2 marker %3 type %4 size %5").arg( QString::number(sequence), QString::number(stamp), QString::number(marker), QString::number(type), QString::number(payload.size())); } /// Creates a new RTP channel. QXmppRtpChannel::QXmppRtpChannel() : m_outgoingPayloadNumbered(false) { } /// Returns the local payload types. /// QList QXmppRtpChannel::localPayloadTypes() { m_outgoingPayloadNumbered = true; return m_outgoingPayloadTypes; } /// Sets the remote payload types. /// /// \param remotePayloadTypes void QXmppRtpChannel::setRemotePayloadTypes(const QList &remotePayloadTypes) { QList commonOutgoingTypes; QList commonIncomingTypes; foreach (const QXmppJinglePayloadType &incomingType, remotePayloadTypes) { // check we support this payload type int outgoingIndex = m_outgoingPayloadTypes.indexOf(incomingType); if (outgoingIndex < 0) continue; QXmppJinglePayloadType outgoingType = m_outgoingPayloadTypes[outgoingIndex]; // be kind and try to adopt the other agent's numbering if (!m_outgoingPayloadNumbered && outgoingType.id() > 95) { outgoingType.setId(incomingType.id()); } commonIncomingTypes << incomingType; commonOutgoingTypes << outgoingType; } if (commonOutgoingTypes.isEmpty()) { qWarning("QXmppRtpChannel could not negociate a common codec"); return; } m_incomingPayloadTypes = commonIncomingTypes; m_outgoingPayloadTypes = commonOutgoingTypes; m_outgoingPayloadNumbered = true; // call hook payloadTypesChanged(); } enum CodecId { G711u = 0, GSM = 3, G723 = 4, G711a = 8, G722 = 9, L16Stereo = 10, L16Mono = 11, G728 = 15, G729 = 18, }; struct ToneInfo { QXmppRtpAudioChannel::Tone tone; quint32 incomingStart; quint32 outgoingStart; bool finished; }; static QPair toneFreqs(QXmppRtpAudioChannel::Tone tone) { switch (tone) { case QXmppRtpAudioChannel::Tone_1: return qMakePair(697, 1209); case QXmppRtpAudioChannel::Tone_2: return qMakePair(697, 1336); case QXmppRtpAudioChannel::Tone_3: return qMakePair(697, 1477); case QXmppRtpAudioChannel::Tone_A: return qMakePair(697, 1633); case QXmppRtpAudioChannel::Tone_4: return qMakePair(770, 1209); case QXmppRtpAudioChannel::Tone_5: return qMakePair(770, 1336); case QXmppRtpAudioChannel::Tone_6: return qMakePair(770, 1477); case QXmppRtpAudioChannel::Tone_B: return qMakePair(770, 1633); case QXmppRtpAudioChannel::Tone_7: return qMakePair(852, 1209); case QXmppRtpAudioChannel::Tone_8: return qMakePair(852, 1336); case QXmppRtpAudioChannel::Tone_9: return qMakePair(852, 1477); case QXmppRtpAudioChannel::Tone_C: return qMakePair(852, 1633); case QXmppRtpAudioChannel::Tone_Star: return qMakePair(941, 1209); case QXmppRtpAudioChannel::Tone_0: return qMakePair(941, 1336); case QXmppRtpAudioChannel::Tone_Pound: return qMakePair(941, 1477); case QXmppRtpAudioChannel::Tone_D: return qMakePair(941, 1633); } return qMakePair(0, 0); } QByteArray renderTone(QXmppRtpAudioChannel::Tone tone, int clockrate, quint32 clockTick, qint64 samples) { QPair tf = toneFreqs(tone); const float clockMult = 2.0 * M_PI / float(clockrate); QByteArray chunk; chunk.reserve(samples * SAMPLE_BYTES); QDataStream output(&chunk, QIODevice::WriteOnly); output.setByteOrder(QDataStream::LittleEndian); for (quint32 i = 0; i < samples; ++i) { quint16 val = 16383.0 * (sin(clockMult * clockTick * tf.first) + sin(clockMult * clockTick * tf.second)); output << val; clockTick++; } return chunk; } class QXmppRtpAudioChannelPrivate { public: QXmppRtpAudioChannelPrivate(QXmppRtpAudioChannel *qq); QXmppCodec *codecForPayloadType(const QXmppJinglePayloadType &payloadType); // signals bool signalsEmitted; qint64 writtenSinceLastEmit; // RTP QHostAddress remoteHost; quint16 remotePort; QByteArray incomingBuffer; bool incomingBuffering; QMap incomingCodecs; int incomingMinimum; int incomingMaximum; // position of the head of the incoming buffer, in bytes qint64 incomingPos; quint16 incomingSequence; QByteArray outgoingBuffer; quint16 outgoingChunk; QXmppCodec *outgoingCodec; bool outgoingMarker; bool outgoingPayloadNumbered; quint16 outgoingSequence; quint32 outgoingStamp; QTimer *outgoingTimer; QList outgoingTones; QXmppJinglePayloadType outgoingTonesType; quint32 outgoingSsrc; QXmppJinglePayloadType payloadType; private: QXmppRtpAudioChannel *q; }; QXmppRtpAudioChannelPrivate::QXmppRtpAudioChannelPrivate(QXmppRtpAudioChannel *qq) : signalsEmitted(false), writtenSinceLastEmit(0), incomingBuffering(true), incomingMinimum(0), incomingMaximum(0), incomingPos(0), incomingSequence(0), outgoingCodec(0), outgoingMarker(true), outgoingPayloadNumbered(false), outgoingSequence(1), outgoingStamp(0), outgoingSsrc(0), q(qq) { qRegisterMetaType("QXmppRtpAudioChannel::Tone"); outgoingSsrc = qrand(); } /// Returns the audio codec for the given payload type. /// QXmppCodec *QXmppRtpAudioChannelPrivate::codecForPayloadType(const QXmppJinglePayloadType &payloadType) { if (payloadType.id() == G711u) return new QXmppG711uCodec(payloadType.clockrate()); else if (payloadType.id() == G711a) return new QXmppG711aCodec(payloadType.clockrate()); #ifdef QXMPP_USE_SPEEX else if (payloadType.name().toLower() == "speex") return new QXmppSpeexCodec(payloadType.clockrate()); #endif return 0; } /// Constructs a new RTP audio channel with the given \a parent. QXmppRtpAudioChannel::QXmppRtpAudioChannel(QObject *parent) : QIODevice(parent) { d = new QXmppRtpAudioChannelPrivate(this); QXmppLoggable *logParent = qobject_cast(parent); if (logParent) { connect(this, SIGNAL(logMessage(QXmppLogger::MessageType,QString)), logParent, SIGNAL(logMessage(QXmppLogger::MessageType,QString))); } d->outgoingTimer = new QTimer(this); connect(d->outgoingTimer, SIGNAL(timeout()), this, SLOT(writeDatagram())); // set supported codecs QXmppJinglePayloadType payload; #ifdef QXMPP_USE_SPEEX payload.setId(96); payload.setChannels(1); payload.setName("speex"); payload.setClockrate(8000); m_outgoingPayloadTypes << payload; #endif payload.setId(G711u); payload.setChannels(1); payload.setName("PCMU"); payload.setClockrate(8000); m_outgoingPayloadTypes << payload; payload.setId(G711a); payload.setChannels(1); payload.setName("PCMA"); payload.setClockrate(8000); m_outgoingPayloadTypes << payload; QMap parameters; parameters.insert("events", "0-15"); payload.setId(101); payload.setChannels(1); payload.setName("telephone-event"); payload.setClockrate(8000); payload.setParameters(parameters); m_outgoingPayloadTypes << payload; } /// Destroys an RTP audio channel. /// QXmppRtpAudioChannel::~QXmppRtpAudioChannel() { foreach (QXmppCodec *codec, d->incomingCodecs) delete codec; if (d->outgoingCodec) delete d->outgoingCodec; delete d; } /// Returns the number of bytes that are available for reading. qint64 QXmppRtpAudioChannel::bytesAvailable() const { return QIODevice::bytesAvailable() + d->incomingBuffer.size(); } /// Closes the RTP audio channel. void QXmppRtpAudioChannel::close() { d->outgoingTimer->stop(); QIODevice::close(); } /// Processes an incoming RTP packet. /// /// \param ba void QXmppRtpAudioChannel::datagramReceived(const QByteArray &ba) { QXmppRtpPacket packet; if (!packet.decode(ba)) return; #ifdef QXMPP_DEBUG_RTP logReceived(packet.toString()); #endif // check sequence number #if 0 if (d->incomingSequence && packet.sequence != d->incomingSequence + 1) warning(QString("RTP packet seq %1 is out of order, previous was %2") .arg(QString::number(packet.sequence)) .arg(QString::number(d->incomingSequence))); #endif d->incomingSequence = packet.sequence; // get or create codec QXmppCodec *codec = 0; if (!d->incomingCodecs.contains(packet.type)) { foreach (const QXmppJinglePayloadType &payload, m_incomingPayloadTypes) { if (packet.type == payload.id()) { codec = d->codecForPayloadType(payload); break; } } if (codec) d->incomingCodecs.insert(packet.type, codec); else warning(QString("Could not find codec for RTP type %1").arg(QString::number(packet.type))); } else { codec = d->incomingCodecs.value(packet.type); } if (!codec) return; // determine packet's position in the buffer (in bytes) qint64 packetOffset = 0; if (!d->incomingBuffer.isEmpty()) { packetOffset = packet.stamp * SAMPLE_BYTES - d->incomingPos; if (packetOffset < 0) { #ifdef QXMPP_DEBUG_RTP_BUFFER warning(QString("RTP packet stamp %1 is too old, buffer start is %2") .arg(QString::number(packet.stamp)) .arg(QString::number(d->incomingPos))); #endif return; } } else { d->incomingPos = packet.stamp * SAMPLE_BYTES + (d->incomingPos % SAMPLE_BYTES); } // allocate space for new packet // FIXME: this is wrong, we want the decoded data size! qint64 packetLength = packet.payload.size(); if (packetOffset + packetLength > d->incomingBuffer.size()) d->incomingBuffer += QByteArray(packetOffset + packetLength - d->incomingBuffer.size(), 0); QDataStream input(packet.payload); QDataStream output(&d->incomingBuffer, QIODevice::WriteOnly); output.device()->seek(packetOffset); output.setByteOrder(QDataStream::LittleEndian); codec->decode(input, output); // check whether we are running late if (d->incomingBuffer.size() > d->incomingMaximum) { qint64 droppedSize = d->incomingBuffer.size() - d->incomingMinimum; const int remainder = droppedSize % SAMPLE_BYTES; if (remainder) droppedSize -= remainder; #ifdef QXMPP_DEBUG_RTP_BUFFER warning(QString("Incoming RTP buffer is too full, dropping %1 bytes") .arg(QString::number(droppedSize))); #endif d->incomingBuffer.remove(0, droppedSize); d->incomingPos += droppedSize; } // check whether we have filled the initial buffer if (d->incomingBuffer.size() >= d->incomingMinimum) d->incomingBuffering = false; if (!d->incomingBuffering) emit readyRead(); } void QXmppRtpAudioChannel::emitSignals() { emit bytesWritten(d->writtenSinceLastEmit); d->writtenSinceLastEmit = 0; d->signalsEmitted = false; } /// Returns true, as the RTP channel is a sequential device. /// bool QXmppRtpAudioChannel::isSequential() const { return true; } /// Returns the mode in which the channel has been opened. QIODevice::OpenMode QXmppRtpAudioChannel::openMode() const { return QIODevice::openMode(); } /// Returns the RTP channel's payload type. /// /// You can use this to determine the QAudioFormat to use with your /// QAudioInput/QAudioOutput. QXmppJinglePayloadType QXmppRtpAudioChannel::payloadType() const { return d->payloadType; } /// \cond qint64 QXmppRtpAudioChannel::readData(char * data, qint64 maxSize) { // if we are filling the buffer, return empty samples if (d->incomingBuffering) { // FIXME: if we are asked for a non-integer number of samples, // we will return junk on next read as we don't increment d->incomingPos memset(data, 0, maxSize); return maxSize; } qint64 readSize = qMin(maxSize, qint64(d->incomingBuffer.size())); memcpy(data, d->incomingBuffer.constData(), readSize); d->incomingBuffer.remove(0, readSize); if (readSize < maxSize) { #ifdef QXMPP_DEBUG_RTP debug(QString("QXmppRtpAudioChannel::readData missing %1 bytes").arg(QString::number(maxSize - readSize))); #endif memset(data + readSize, 0, maxSize - readSize); } // add local DTMF echo if (!d->outgoingTones.isEmpty()) { const int headOffset = d->incomingPos % SAMPLE_BYTES; const int samples = (headOffset + maxSize + SAMPLE_BYTES - 1) / SAMPLE_BYTES; const QByteArray chunk = renderTone( d->outgoingTones[0].tone, d->payloadType.clockrate(), d->incomingPos / SAMPLE_BYTES - d->outgoingTones[0].incomingStart, samples); memcpy(data, chunk.constData() + headOffset, maxSize); } d->incomingPos += maxSize; return maxSize; } void QXmppRtpAudioChannel::payloadTypesChanged() { // delete incoming codecs foreach (QXmppCodec *codec, d->incomingCodecs) delete codec; d->incomingCodecs.clear(); // delete outgoing codec if (d->outgoingCodec) { delete d->outgoingCodec; d->outgoingCodec = 0; } // create outgoing codec foreach (const QXmppJinglePayloadType &outgoingType, m_outgoingPayloadTypes) { // check for telephony events if (outgoingType.name() == "telephone-event") { d->outgoingTonesType = outgoingType; } else if (!d->outgoingCodec) { QXmppCodec *codec = d->codecForPayloadType(outgoingType); if (codec) { d->payloadType = outgoingType; d->outgoingCodec = codec; } } } // size in bytes of an decoded packet d->outgoingChunk = SAMPLE_BYTES * d->payloadType.ptime() * d->payloadType.clockrate() / 1000; d->outgoingTimer->setInterval(d->payloadType.ptime()); d->incomingMinimum = d->outgoingChunk * 5; d->incomingMaximum = d->outgoingChunk * 15; open(QIODevice::ReadWrite | QIODevice::Unbuffered); } /// \endcond /// Returns the position in the received audio data. qint64 QXmppRtpAudioChannel::pos() const { return d->incomingPos; } /// Seeks in the received audio data. /// /// Seeking backwards will result in empty samples being added at the start /// of the buffer. /// /// \param pos bool QXmppRtpAudioChannel::seek(qint64 pos) { qint64 delta = pos - d->incomingPos; if (delta < 0) d->incomingBuffer.prepend(QByteArray(-delta, 0)); else d->incomingBuffer.remove(0, delta); d->incomingPos = pos; return true; } /// Starts sending the specified DTMF tone. /// /// \param tone void QXmppRtpAudioChannel::startTone(QXmppRtpAudioChannel::Tone tone) { ToneInfo info; info.tone = tone; info.incomingStart = d->incomingPos / SAMPLE_BYTES; info.outgoingStart = d->outgoingStamp; info.finished = false; d->outgoingTones << info; } /// Stops sending the specified DTMF tone. /// /// \param tone void QXmppRtpAudioChannel::stopTone(QXmppRtpAudioChannel::Tone tone) { for (int i = 0; i < d->outgoingTones.size(); ++i) { if (d->outgoingTones[i].tone == tone) { d->outgoingTones[i].finished = true; break; } } } /// \cond qint64 QXmppRtpAudioChannel::writeData(const char * data, qint64 maxSize) { if (!d->outgoingCodec) { warning("QXmppRtpAudioChannel::writeData before codec was set"); return -1; } d->outgoingBuffer += QByteArray::fromRawData(data, maxSize); // start sending audio chunks if (!d->outgoingTimer->isActive()) d->outgoingTimer->start(); return maxSize; } /// \endcond void QXmppRtpAudioChannel::writeDatagram() { // read audio chunk QByteArray chunk; if (d->outgoingBuffer.size() < d->outgoingChunk) { #ifdef QXMPP_DEBUG_RTP_BUFFER warning("Outgoing RTP buffer is starved"); #endif chunk = QByteArray(d->outgoingChunk, 0); } else { chunk = d->outgoingBuffer.left(d->outgoingChunk); d->outgoingBuffer.remove(0, d->outgoingChunk); } bool sendAudio = true; if (!d->outgoingTones.isEmpty()) { const quint32 packetTicks = (d->payloadType.clockrate() * d->payloadType.ptime()) / 1000; const ToneInfo info = d->outgoingTones[0]; if (d->outgoingTonesType.id()) { // send RFC 2833 DTMF QXmppRtpPacket packet; packet.version = RTP_VERSION; packet.marker = (info.outgoingStart == d->outgoingStamp); packet.type = d->outgoingTonesType.id(); packet.sequence = d->outgoingSequence; packet.stamp = info.outgoingStart; packet.ssrc = d->outgoingSsrc; QDataStream output(&packet.payload, QIODevice::WriteOnly); output << quint8(info.tone); output << quint8(info.finished ? 0x80 : 0x00); output << quint16(d->outgoingStamp + packetTicks - info.outgoingStart); #ifdef QXMPP_DEBUG_RTP logSent(packet.toString()); #endif emit sendDatagram(packet.encode()); d->outgoingSequence++; d->outgoingStamp += packetTicks; sendAudio = false; } else { // generate in-band DTMF chunk = renderTone(info.tone, d->payloadType.clockrate(), d->outgoingStamp - info.outgoingStart, packetTicks); } // if the tone is finished, remove it if (info.finished) d->outgoingTones.removeFirst(); } if (sendAudio) { // send audio data QXmppRtpPacket packet; packet.version = RTP_VERSION; if (d->outgoingMarker) { packet.marker = true; d->outgoingMarker = false; } else { packet.marker = false; } packet.type = d->payloadType.id(); packet.sequence = d->outgoingSequence; packet.stamp = d->outgoingStamp; packet.ssrc = d->outgoingSsrc; // encode audio chunk QDataStream input(chunk); input.setByteOrder(QDataStream::LittleEndian); QDataStream output(&packet.payload, QIODevice::WriteOnly); const qint64 packetTicks = d->outgoingCodec->encode(input, output); #ifdef QXMPP_DEBUG_RTP logSent(packet.toString()); #endif emit sendDatagram(packet.encode()); d->outgoingSequence++; d->outgoingStamp += packetTicks; } // queue signals d->writtenSinceLastEmit += chunk.size(); if (!d->signalsEmitted && !signalsBlocked()) { d->signalsEmitted = true; QMetaObject::invokeMethod(this, "emitSignals", Qt::QueuedConnection); } } /** Constructs a null video frame. */ QXmppVideoFrame::QXmppVideoFrame() : m_bytesPerLine(0), m_height(0), m_mappedBytes(0), m_pixelFormat(Format_Invalid), m_width(0) { } /** Constructs a video frame of the given pixel format and size in pixels. * * @param bytes * @param size * @param bytesPerLine * @param format */ QXmppVideoFrame::QXmppVideoFrame(int bytes, const QSize &size, int bytesPerLine, PixelFormat format) : m_bytesPerLine(bytesPerLine), m_height(size.height()), m_mappedBytes(bytes), m_pixelFormat(format), m_width(size.width()) { m_data.resize(bytes); } /// Returns a pointer to the start of the frame data buffer. uchar *QXmppVideoFrame::bits() { return (uchar*)m_data.data(); } /// Returns a pointer to the start of the frame data buffer. const uchar *QXmppVideoFrame::bits() const { return (const uchar*)m_data.constData(); } /// Returns the number of bytes in a scan line. int QXmppVideoFrame::bytesPerLine() const { return m_bytesPerLine; } /// Returns the height of a video frame. int QXmppVideoFrame::height() const { return m_height; } /// Returns true if the frame is valid. bool QXmppVideoFrame::isValid() const { return m_pixelFormat != Format_Invalid && m_height > 0 && m_width > 0 && m_mappedBytes > 0; } /// Returns the number of bytes occupied by the mapped frame data. int QXmppVideoFrame::mappedBytes() const { return m_mappedBytes; } /// Returns the color format of a video frame. QXmppVideoFrame::PixelFormat QXmppVideoFrame::pixelFormat() const { return m_pixelFormat; } /// Returns the size of a video frame. QSize QXmppVideoFrame::size() const { return QSize(m_width, m_height); } /// Returns the width of a video frame. int QXmppVideoFrame::width() const { return m_width; } class QXmppRtpVideoChannelPrivate { public: QXmppRtpVideoChannelPrivate(); QMap decoders; QXmppVideoEncoder *encoder; QList frames; // local QXmppVideoFormat outgoingFormat; quint8 outgoingId; quint16 outgoingSequence; quint32 outgoingStamp; quint32 outgoingSsrc; }; QXmppRtpVideoChannelPrivate::QXmppRtpVideoChannelPrivate() : encoder(0), outgoingId(0), outgoingSequence(1), outgoingStamp(0), outgoingSsrc(0) { outgoingSsrc = qrand(); } /// Constructs a new RTP video channel with the given \a parent. QXmppRtpVideoChannel::QXmppRtpVideoChannel(QObject *parent) : QXmppLoggable(parent) { d = new QXmppRtpVideoChannelPrivate; d->outgoingFormat.setFrameRate(15.0); d->outgoingFormat.setFrameSize(QSize(320, 240)); d->outgoingFormat.setPixelFormat(QXmppVideoFrame::Format_YUYV); // set supported codecs QXmppVideoEncoder *encoder; QXmppJinglePayloadType payload; Q_UNUSED(encoder); Q_UNUSED(payload); #ifdef QXMPP_USE_VPX encoder = new QXmppVpxEncoder; encoder->setFormat(d->outgoingFormat); payload.setId(96); payload.setName("vp8"); payload.setClockrate(90000); payload.setParameters(encoder->parameters()); m_outgoingPayloadTypes << payload; delete encoder; #endif #ifdef QXMPP_USE_THEORA encoder = new QXmppTheoraEncoder; encoder->setFormat(d->outgoingFormat); payload.setId(97); payload.setName("theora"); payload.setClockrate(90000); payload.setParameters(encoder->parameters()); m_outgoingPayloadTypes << payload; delete encoder; #endif } QXmppRtpVideoChannel::~QXmppRtpVideoChannel() { foreach (QXmppVideoDecoder *decoder, d->decoders) delete decoder; if (d->encoder) delete d->encoder; delete d; } /// Closes the RTP video channel. void QXmppRtpVideoChannel::close() { } /// Processes an incoming RTP video packet. /// /// \param ba void QXmppRtpVideoChannel::datagramReceived(const QByteArray &ba) { QXmppRtpPacket packet; if (!packet.decode(ba)) return; #ifdef QXMPP_DEBUG_RTP logReceived(packet.toString()); #endif // get codec QXmppVideoDecoder *decoder = d->decoders.value(packet.type); if (!decoder) return; d->frames << decoder->handlePacket(packet); } /// Returns the video format used by the encoder. QXmppVideoFormat QXmppRtpVideoChannel::decoderFormat() const { if (d->decoders.isEmpty()) return QXmppVideoFormat(); const int key = d->decoders.keys().first(); return d->decoders.value(key)->format(); } /// Returns the video format used by the encoder. QXmppVideoFormat QXmppRtpVideoChannel::encoderFormat() const { return d->outgoingFormat; } /// Sets the video format used by the encoder. void QXmppRtpVideoChannel::setEncoderFormat(const QXmppVideoFormat &format) { if (d->encoder && !d->encoder->setFormat(format)) return; d->outgoingFormat = format; } /// Returns the mode in which the channel has been opened. QIODevice::OpenMode QXmppRtpVideoChannel::openMode() const { QIODevice::OpenMode mode = QIODevice::NotOpen; if (!d->decoders.isEmpty()) mode |= QIODevice::ReadOnly; if (d->encoder) mode |= QIODevice::WriteOnly; return mode; } /// \cond void QXmppRtpVideoChannel::payloadTypesChanged() { // refresh decoders foreach (QXmppVideoDecoder *decoder, d->decoders) delete decoder; d->decoders.clear(); foreach (const QXmppJinglePayloadType &payload, m_incomingPayloadTypes) { QXmppVideoDecoder *decoder = 0; if (false) {} #ifdef QXMPP_USE_THEORA else if (payload.name().toLower() == "theora") decoder = new QXmppTheoraDecoder; #endif #ifdef QXMPP_USE_VPX else if (payload.name().toLower() == "vp8") decoder = new QXmppVpxDecoder; #endif if (decoder) { decoder->setParameters(payload.parameters()); d->decoders.insert(payload.id(), decoder); } } // refresh encoder if (d->encoder) { delete d->encoder; d->encoder = 0; } foreach (const QXmppJinglePayloadType &payload, m_outgoingPayloadTypes) { QXmppVideoEncoder *encoder = 0; if (false) {} #ifdef QXMPP_USE_THEORA else if (payload.name().toLower() == "theora") encoder = new QXmppTheoraEncoder; #endif #ifdef QXMPP_USE_VPX else if (payload.name().toLower() == "vp8") { encoder = new QXmppVpxEncoder; } #endif if (encoder) { encoder->setFormat(d->outgoingFormat); d->encoder = encoder; d->outgoingId = payload.id(); break; } } } /// \endcond /// Decodes buffered RTP packets and returns a list of video frames. QList QXmppRtpVideoChannel::readFrames() { const QList frames = d->frames; d->frames.clear(); return frames; } /// Encodes a video \a frame and sends RTP packets. void QXmppRtpVideoChannel::writeFrame(const QXmppVideoFrame &frame) { if (!d->encoder) { warning("QXmppRtpVideoChannel::writeFrame before codec was set"); return; } QXmppRtpPacket packet; packet.version = RTP_VERSION; packet.marker = false; packet.type = d->outgoingId; packet.ssrc = d->outgoingSsrc; foreach (const QByteArray &payload, d->encoder->handleFrame(frame)) { packet.sequence = d->outgoingSequence++; packet.stamp = d->outgoingStamp; packet.payload = payload; #ifdef QXMPP_DEBUG_RTP logSent(packet.toString()); #endif emit sendDatagram(packet.encode()); } d->outgoingStamp += 1; } qxmpp-0.7.6/src/base/QXmppSessionIq.h0000644000175000007640000000230212116723562017370 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPSESSIONIQ_H #define QXMPPSESSIONIQ_H #include "QXmppIq.h" /// \brief The QXmppSessionIq class represents an IQ used for session /// establishment as defined by RFC 3921. /// /// \ingroup Stanzas class QXMPP_EXPORT QXmppSessionIq : public QXmppIq { public: /// \cond static bool isSessionIq(const QDomElement &element); /// \endcond private: /// \cond void toXmlElementFromChild(QXmlStreamWriter *writer) const; /// \endcond }; #endif // QXMPPSESSION_H qxmpp-0.7.6/src/base/qdnslookup_win.cpp0000644000175000007640000001371112116723562020102 0ustar sharkyjerryweb/**************************************************************************** ** ** Copyright (C) 2012 Jeremy Lainé ** Contact: http://www.qt-project.org/ ** ** This file is part of the QtNetwork module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage ** This file may be used under the terms of the GNU Lesser General Public ** License version 2.1 as published by the Free Software Foundation and ** appearing in the file LICENSE.LGPL included in the packaging of this ** file. Please review the following information to ensure the GNU Lesser ** General Public License version 2.1 requirements will be met: ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain additional ** rights. These rights are described in the Nokia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU General ** Public License version 3.0 as published by the Free Software Foundation ** and appearing in the file LICENSE.GPL included in the packaging of this ** file. Please review the following information to ensure the GNU General ** Public License version 3.0 requirements will be met: ** http://www.gnu.org/copyleft/gpl.html. ** ** Other Usage ** Alternatively, this file may be used in accordance with the terms and ** conditions contained in a signed written agreement between you and Nokia. ** ** ** ** ** ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #include #include "qdnslookup_p.h" #include #include #include #include #include QT_BEGIN_NAMESPACE void QDnsLookupRunnable::query(const int requestType, const QByteArray &requestName, QDnsLookupReply *reply) { // Perform DNS query. PDNS_RECORD dns_records = 0; const DNS_STATUS status = DnsQuery_UTF8(requestName, requestType, DNS_QUERY_STANDARD, NULL, &dns_records, NULL); switch (status) { case ERROR_SUCCESS: break; case DNS_ERROR_RCODE_FORMAT_ERROR: reply->error = QDnsLookup::InvalidRequestError; reply->errorString = tr("Server could not process query"); return; case DNS_ERROR_RCODE_SERVER_FAILURE: reply->error = QDnsLookup::ServerFailureError; reply->errorString = tr("Server failure"); return; case DNS_ERROR_RCODE_NAME_ERROR: reply->error = QDnsLookup::NotFoundError; reply->errorString = tr("Non existent domain"); return; case DNS_ERROR_RCODE_REFUSED: reply->error = QDnsLookup::ServerRefusedError; reply->errorString = tr("Server refused to answer"); return; default: reply->error = QDnsLookup::InvalidReplyError; reply->errorString = tr("Invalid reply received"); return; } // Extract results. for (PDNS_RECORD ptr = dns_records; ptr != NULL; ptr = ptr->pNext) { const QString name = QUrl::fromAce((char*)ptr->pName); if (ptr->wType == QDnsLookup::A) { QDnsHostAddressRecord record; record.d->name = name; record.d->timeToLive = ptr->dwTtl; record.d->value = QHostAddress(ntohl(ptr->Data.A.IpAddress)); reply->hostAddressRecords.append(record); } else if (ptr->wType == QDnsLookup::AAAA) { Q_IPV6ADDR addr; memcpy(&addr, &ptr->Data.AAAA.Ip6Address, sizeof(Q_IPV6ADDR)); QDnsHostAddressRecord record; record.d->name = name; record.d->timeToLive = ptr->dwTtl; record.d->value = QHostAddress(addr); reply->hostAddressRecords.append(record); } else if (ptr->wType == QDnsLookup::CNAME) { QDnsDomainNameRecord record; record.d->name = name; record.d->timeToLive = ptr->dwTtl; record.d->value = QUrl::fromAce((char*)ptr->Data.Cname.pNameHost); reply->canonicalNameRecords.append(record); } else if (ptr->wType == QDnsLookup::MX) { QDnsMailExchangeRecord record; record.d->name = name; record.d->exchange = QUrl::fromAce((char*)ptr->Data.Mx.pNameExchange); record.d->preference = ptr->Data.Mx.wPreference; record.d->timeToLive = ptr->dwTtl; reply->mailExchangeRecords.append(record); } else if (ptr->wType == QDnsLookup::NS) { QDnsDomainNameRecord record; record.d->name = name; record.d->timeToLive = ptr->dwTtl; record.d->value = QUrl::fromAce((char*)ptr->Data.Ns.pNameHost); reply->nameServerRecords.append(record); } else if (ptr->wType == QDnsLookup::PTR) { QDnsDomainNameRecord record; record.d->name = name; record.d->timeToLive = ptr->dwTtl; record.d->value = QUrl::fromAce((char*)ptr->Data.Ptr.pNameHost); reply->pointerRecords.append(record); } else if (ptr->wType == QDnsLookup::SRV) { QDnsServiceRecord record; record.d->name = name; record.d->target = QUrl::fromAce((char*)ptr->Data.Srv.pNameTarget); record.d->port = ptr->Data.Srv.wPort; record.d->priority = ptr->Data.Srv.wPriority; record.d->timeToLive = ptr->dwTtl; record.d->weight = ptr->Data.Srv.wWeight; reply->serviceRecords.append(record); } else if (ptr->wType == QDnsLookup::TXT) { QDnsTextRecord record; record.d->name = name; record.d->timeToLive = ptr->dwTtl; for (unsigned int i = 0; i < ptr->Data.Txt.dwStringCount; ++i) { record.d->values << QByteArray((char*)ptr->Data.Txt.pStringArray[i]); } reply->textRecords.append(record); } } DnsRecordListFree(dns_records, DnsFreeRecordList); } QT_END_NAMESPACE qxmpp-0.7.6/src/base/QXmppVCardIq.h0000644000175000007640000001351512116723562016754 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPVCARDIQ_H #define QXMPPVCARDIQ_H #include "QXmppIq.h" #include #include #include class QXmppVCardAddressPrivate; class QXmppVCardEmailPrivate; class QXmppVCardPhonePrivate; class QXmppVCardIqPrivate; /// \brief Represent a vCard address. class QXMPP_EXPORT QXmppVCardAddress { public: /// \brief Describes e-mail address types. enum TypeFlag { None = 0x0, Home = 0x1, Work = 0x2, Postal = 0x4, Preferred = 0x8 }; Q_DECLARE_FLAGS(Type, TypeFlag) QXmppVCardAddress(); QXmppVCardAddress(const QXmppVCardAddress &other); ~QXmppVCardAddress(); QXmppVCardAddress& operator=(const QXmppVCardAddress &other); QString country() const; void setCountry(const QString &country); QString locality() const; void setLocality(const QString &locality); QString postcode() const; void setPostcode(const QString &postcode); QString region() const; void setRegion(const QString ®ion); QString street() const; void setStreet(const QString &street); Type type() const; void setType(Type type); /// \cond void parse(const QDomElement &element); void toXml(QXmlStreamWriter *stream) const; /// \endcond private: QSharedDataPointer d; }; /// \brief Represents a vCard e-mail address. class QXMPP_EXPORT QXmppVCardEmail { public: /// \brief Describes e-mail address types. enum TypeFlag { None = 0x0, Home = 0x1, Work = 0x2, Internet = 0x4, Preferred = 0x8, X400 = 0x10 }; Q_DECLARE_FLAGS(Type, TypeFlag) QXmppVCardEmail(); QXmppVCardEmail(const QXmppVCardEmail &other); ~QXmppVCardEmail(); QXmppVCardEmail& operator=(const QXmppVCardEmail &other); QString address() const; void setAddress(const QString &address); Type type() const; void setType(Type type); /// \cond void parse(const QDomElement &element); void toXml(QXmlStreamWriter *stream) const; /// \endcond private: QSharedDataPointer d; }; /// \brief Represents a vCard phone number. class QXMPP_EXPORT QXmppVCardPhone { public: /// \brief Describes phone number types. enum TypeFlag { None = 0x0, Home = 0x1, Work = 0x2, Voice = 0x4, Fax = 0x8, Pager = 0x10, Messaging = 0x20, Cell = 0x40, Video = 0x80, BBS = 0x100, Modem = 0x200, ISDN = 0x400, PCS = 0x800, Preferred = 0x1000 }; Q_DECLARE_FLAGS(Type, TypeFlag) QXmppVCardPhone(); QXmppVCardPhone(const QXmppVCardPhone &other); ~QXmppVCardPhone(); QXmppVCardPhone& operator=(const QXmppVCardPhone &other); QString number() const; void setNumber(const QString &number); Type type() const; void setType(Type type); /// \cond void parse(const QDomElement &element); void toXml(QXmlStreamWriter *stream) const; /// \endcond private: QSharedDataPointer d; }; /// \brief Represents the XMPP vCard. /// /// The functions names are self explanatory. /// Look at QXmppVCardManager and XEP-0054: vcard-temp for more details. /// /// There are many field of XMPP vCard which are not present in /// this class. File a issue for the same. We will add the requested /// field to this class. /// class QXMPP_EXPORT QXmppVCardIq : public QXmppIq { public: QXmppVCardIq(const QString& bareJid = ""); QXmppVCardIq(const QXmppVCardIq &other); ~QXmppVCardIq(); QXmppVCardIq& operator=(const QXmppVCardIq &other); QDate birthday() const; void setBirthday(const QDate &birthday); QString description() const; void setDescription(const QString &description); QString email() const; void setEmail(const QString&); QString firstName() const; void setFirstName(const QString&); QString fullName() const; void setFullName(const QString&); QString lastName() const; void setLastName(const QString&); QString middleName() const; void setMiddleName(const QString&); QString nickName() const; void setNickName(const QString&); QByteArray photo() const; void setPhoto(const QByteArray&); QString photoType() const; void setPhotoType(const QString &type); QString url() const; void setUrl(const QString&); QList addresses() const; void setAddresses(const QList &addresses); QList emails() const; void setEmails(const QList &emails); QList phones() const; void setPhones(const QList &phones); /// \cond static bool isVCard(const QDomElement &element); /// \endcond protected: /// \cond void parseElementFromChild(const QDomElement&); void toXmlElementFromChild(QXmlStreamWriter *writer) const; /// \endcond private: QSharedDataPointer d; }; #endif // QXMPPVCARDIQ_H qxmpp-0.7.6/src/base/QXmppBindIq.h0000644000175000007640000000263712116723562016634 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Manjeet Dahiya * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPBINDIQ_H #define QXMPPBINDIQ_H #include "QXmppIq.h" /// \brief The QXmppBindIq class represents an IQ used for resource /// binding as defined by RFC 3921. /// /// \ingroup Stanzas class QXMPP_EXPORT QXmppBindIq : public QXmppIq { public: QString jid() const; void setJid(const QString&); QString resource() const; void setResource(const QString&); /// \cond static bool isBindIq(const QDomElement &element); /// \endcond protected: /// \cond void parseElementFromChild(const QDomElement &element); void toXmlElementFromChild(QXmlStreamWriter *writer) const; /// \endcond private: QString m_jid; QString m_resource; }; #endif // QXMPPBIND_H qxmpp-0.7.6/src/base/QXmppCodec_p.h0000644000175000007640000001241412116723562017014 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPCODEC_H #define QXMPPCODEC_H #include #include "QXmppGlobal.h" class QXmppRtpPacket; class QXmppVideoFormat; class QXmppVideoFrame; /// \brief The QXmppCodec class is the base class for audio codecs capable of /// encoding and decoding audio samples. /// /// Samples must be 16-bit little endian. class QXMPP_AUTOTEST_EXPORT QXmppCodec { public: virtual ~QXmppCodec(); /// Reads samples from the input stream, encodes them and writes the /// encoded data to the output stream. virtual qint64 encode(QDataStream &input, QDataStream &output) = 0; /// Reads encoded data from the input stream, decodes it and writes the /// decoded samples to the output stream. virtual qint64 decode(QDataStream &input, QDataStream &output) = 0; }; /// \internal /// /// The QXmppG711aCodec class represent a G.711 a-law PCM codec. class QXmppG711aCodec : public QXmppCodec { public: QXmppG711aCodec(int clockrate); qint64 encode(QDataStream &input, QDataStream &output); qint64 decode(QDataStream &input, QDataStream &output); private: int m_frequency; }; /// \internal /// /// The QXmppG711uCodec class represent a G.711 u-law PCM codec. class QXmppG711uCodec : public QXmppCodec { public: QXmppG711uCodec(int clockrate); qint64 encode(QDataStream &input, QDataStream &output); qint64 decode(QDataStream &input, QDataStream &output); private: int m_frequency; }; #ifdef QXMPP_USE_SPEEX typedef struct SpeexBits SpeexBits; /// \internal /// /// The QXmppSpeexCodec class represent a SPEEX codec. class QXMPP_AUTOTEST_EXPORT QXmppSpeexCodec : public QXmppCodec { public: QXmppSpeexCodec(int clockrate); ~QXmppSpeexCodec(); qint64 encode(QDataStream &input, QDataStream &output); qint64 decode(QDataStream &input, QDataStream &output); private: SpeexBits *encoder_bits; void *encoder_state; SpeexBits *decoder_bits; void *decoder_state; int frame_samples; }; #endif /// \brief The QXmppVideoDecoder class is the base class for video decoders. /// class QXMPP_AUTOTEST_EXPORT QXmppVideoDecoder { public: virtual ~QXmppVideoDecoder(); /// Returns the format of the video stream. virtual QXmppVideoFormat format() const = 0; /// Handles an RTP \a packet and returns a list of decoded video frames. virtual QList handlePacket(const QXmppRtpPacket &packet) = 0; /// Sets the video stream's \a parameters. virtual bool setParameters(const QMap ¶meters) = 0; }; /// \brief The QXmppVideoEncoder class is the base class for video encoders. /// class QXMPP_AUTOTEST_EXPORT QXmppVideoEncoder { public: virtual ~QXmppVideoEncoder(); /// Sets the \a format of the video stream. virtual bool setFormat(const QXmppVideoFormat &format) = 0; /// Handles a video \a frame and returns a list of RTP packet payloads. virtual QList handleFrame(const QXmppVideoFrame &frame) = 0; /// Returns the video stream's parameters. virtual QMap parameters() const = 0; }; #ifdef QXMPP_USE_THEORA class QXmppTheoraDecoderPrivate; class QXmppTheoraEncoderPrivate; class QXMPP_AUTOTEST_EXPORT QXmppTheoraDecoder : public QXmppVideoDecoder { public: QXmppTheoraDecoder(); ~QXmppTheoraDecoder(); QXmppVideoFormat format() const; QList handlePacket(const QXmppRtpPacket &packet); bool setParameters(const QMap ¶meters); private: QXmppTheoraDecoderPrivate *d; }; class QXMPP_AUTOTEST_EXPORT QXmppTheoraEncoder : public QXmppVideoEncoder { public: QXmppTheoraEncoder(); ~QXmppTheoraEncoder(); bool setFormat(const QXmppVideoFormat &format); QList handleFrame(const QXmppVideoFrame &frame); QMap parameters() const; private: QXmppTheoraEncoderPrivate *d; }; #endif #ifdef QXMPP_USE_VPX class QXmppVpxDecoderPrivate; class QXmppVpxEncoderPrivate; class QXMPP_AUTOTEST_EXPORT QXmppVpxDecoder : public QXmppVideoDecoder { public: QXmppVpxDecoder(); ~QXmppVpxDecoder(); QXmppVideoFormat format() const; QList handlePacket(const QXmppRtpPacket &packet); bool setParameters(const QMap ¶meters); private: QXmppVpxDecoderPrivate *d; }; class QXMPP_AUTOTEST_EXPORT QXmppVpxEncoder : public QXmppVideoEncoder { public: QXmppVpxEncoder(); ~QXmppVpxEncoder(); bool setFormat(const QXmppVideoFormat &format); QList handleFrame(const QXmppVideoFrame &frame); QMap parameters() const; private: QXmppVpxEncoderPrivate *d; }; #endif #endif qxmpp-0.7.6/src/base/QXmppMucIq.h0000644000175000007640000000727712116723562016511 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPMUCIQ_H #define QXMPPMUCIQ_H #include "QXmppDataForm.h" #include "QXmppIq.h" /// \brief The QXmppMucItem class represents a chat room "item". /// /// It is used to convey information such as permissions. /// /// \ingroup Stanzas class QXMPP_EXPORT QXmppMucItem { public: /// This enum is used to represent long-lived permissions in a room (affiliations). enum Affiliation { UnspecifiedAffiliation, OutcastAffiliation, NoAffiliation, MemberAffiliation, AdminAffiliation, OwnerAffiliation, }; /// This enum is used to represent short-lived permissions in a room (roles). enum Role { UnspecifiedRole, NoRole, VisitorRole, ParticipantRole, ModeratorRole, }; QXmppMucItem(); bool isNull() const; QString actor() const; void setActor(const QString &actor); Affiliation affiliation() const; void setAffiliation(Affiliation affiliation); QString jid() const; void setJid(const QString &jid); QString nick() const; void setNick(const QString &nick); QString reason() const; void setReason(const QString &reason); Role role() const; void setRole(Role role); /// \cond void parse(const QDomElement &element); void toXml(QXmlStreamWriter *writer) const; static Affiliation affiliationFromString(const QString &affiliationStr); static QString affiliationToString(Affiliation affiliation); static Role roleFromString(const QString &roleStr); static QString roleToString(Role role); /// \endcond private: QString m_actor; Affiliation m_affiliation; QString m_jid; QString m_nick; QString m_reason; Role m_role; }; /// \brief The QXmppMucAdminIq class represents a chat room administration IQ /// as defined by XEP-0045: Multi-User Chat. /// /// It is used to get or modify room memberships. /// /// \ingroup Stanzas class QXMPP_EXPORT QXmppMucAdminIq : public QXmppIq { public: QList items() const; void setItems(const QList &items); /// \cond static bool isMucAdminIq(const QDomElement &element); /// \endcond protected: /// \cond void parseElementFromChild(const QDomElement &element); void toXmlElementFromChild(QXmlStreamWriter *writer) const; /// \endcond private: QList m_items; }; /// \brief The QXmppMucOwnerIq class represents a chat room configuration IQ as /// defined by XEP-0045: Multi-User Chat. /// /// It is used to get or modify room configuration options. /// /// \sa QXmppDataForm /// class QXMPP_EXPORT QXmppMucOwnerIq : public QXmppIq { public: QXmppDataForm form() const; void setForm(const QXmppDataForm &form); /// \cond static bool isMucOwnerIq(const QDomElement &element); /// \endcond protected: /// \cond void parseElementFromChild(const QDomElement &element); void toXmlElementFromChild(QXmlStreamWriter *writer) const; /// \endcond private: QXmppDataForm m_form; }; #endif qxmpp-0.7.6/src/base/QXmppElement.h0000644000175000007640000000356212116723562017055 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPELEMENT_H #define QXMPPELEMENT_H #include #include #include #include "QXmppGlobal.h" class QDomElement; class QXmppElement; class QXmppElementPrivate; typedef QList QXmppElementList; class QXMPP_EXPORT QXmppElement { public: QXmppElement(); QXmppElement(const QXmppElement &other); QXmppElement(const QDomElement &element); ~QXmppElement(); QStringList attributeNames() const; QString attribute(const QString &name) const; void setAttribute(const QString &name, const QString &value); void appendChild(const QXmppElement &child); QXmppElement firstChildElement(const QString &name = QString()) const; QXmppElement nextSiblingElement(const QString &name = QString()) const; void removeChild(const QXmppElement &child); QString tagName() const; void setTagName(const QString &type); QString value() const; void setValue(const QString &text); bool isNull() const; void toXml(QXmlStreamWriter *writer) const; QXmppElement &operator=(const QXmppElement &other); private: QXmppElement(QXmppElementPrivate *other); QXmppElementPrivate *d; }; #endif qxmpp-0.7.6/src/base/QXmppRegisterIq.cpp0000644000175000007640000000702712116723562020075 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include "QXmppConstants.h" #include "QXmppRegisterIq.h" /// Returns the email for this registration IQ. QString QXmppRegisterIq::email() const { return m_email; } /// Sets the \a email for this registration IQ. void QXmppRegisterIq::setEmail(const QString &email) { m_email = email; } /// Returns the QXmppDataForm for this registration IQ. QXmppDataForm QXmppRegisterIq::form() const { return m_form; } /// Sets the QXmppDataForm for this registration IQ. /// /// \param form void QXmppRegisterIq::setForm(const QXmppDataForm &form) { m_form = form; } /// Returns the instructions for this registration IQ. QString QXmppRegisterIq::instructions() const { return m_instructions; } /// Sets the \a instructions for this registration IQ. void QXmppRegisterIq::setInstructions(const QString &instructions) { m_instructions = instructions; } /// Returns the password for this registration IQ. QString QXmppRegisterIq::password() const { return m_password; } /// Sets the \a password for this registration IQ. void QXmppRegisterIq::setPassword(const QString &password) { m_password = password; } /// Returns the username for this registration IQ. QString QXmppRegisterIq::username() const { return m_username; } /// Sets the \a username for this registration IQ. void QXmppRegisterIq::setUsername(const QString &username) { m_username = username; } /// \cond bool QXmppRegisterIq::isRegisterIq(const QDomElement &element) { return (element.firstChildElement("query").namespaceURI() == ns_register); } void QXmppRegisterIq::parseElementFromChild(const QDomElement &element) { QDomElement queryElement = element.firstChildElement("query"); m_instructions = queryElement.firstChildElement("instructions").text(); m_username = queryElement.firstChildElement("username").text(); m_password = queryElement.firstChildElement("password").text(); m_email = queryElement.firstChildElement("email").text(); m_form.parse(queryElement.firstChildElement("x")); } void QXmppRegisterIq::toXmlElementFromChild(QXmlStreamWriter *writer) const { writer->writeStartElement("query"); writer->writeAttribute("xmlns", ns_register); if (!m_instructions.isEmpty()) writer->writeTextElement("instructions", m_instructions); if (!m_username.isEmpty()) writer->writeTextElement("username", m_username); else if (!m_username.isNull()) writer->writeEmptyElement("username"); if (!m_password.isEmpty()) writer->writeTextElement("password", m_password); else if (!m_password.isNull()) writer->writeEmptyElement("password"); if (!m_email.isEmpty()) writer->writeTextElement("email", m_email); else if (!m_email.isNull()) writer->writeEmptyElement("email"); m_form.toXml(writer); writer->writeEndElement(); } /// \endcond qxmpp-0.7.6/src/base/QXmppJingleIq.h0000644000175000007640000002063112116723562017162 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPJINGLEIQ_H #define QXMPPJINGLEIQ_H #include #include "QXmppIq.h" /// \brief The QXmppJinglePayloadType class represents a payload type /// as specified by XEP-0167: Jingle RTP Sessions and RFC 5245. /// class QXMPP_EXPORT QXmppJinglePayloadType { public: QXmppJinglePayloadType(); unsigned char channels() const; void setChannels(unsigned char channels); unsigned int clockrate() const; void setClockrate(unsigned int clockrate); unsigned char id() const; void setId(unsigned char id); unsigned int maxptime() const; void setMaxptime(unsigned int maxptime); QString name() const; void setName(const QString &name); QMap parameters() const; void setParameters(const QMap ¶meters); unsigned int ptime() const; void setPtime(unsigned int ptime); /// \cond void parse(const QDomElement &element); void toXml(QXmlStreamWriter *writer) const; /// \endcond bool operator==(const QXmppJinglePayloadType &other) const; private: unsigned char m_channels; unsigned int m_clockrate; unsigned char m_id; unsigned int m_maxptime; QString m_name; QMap m_parameters; unsigned int m_ptime; }; /// \brief The QXmppJingleCandidate class represents a transport candidate /// as specified by XEP-0176: Jingle ICE-UDP Transport Method. /// class QXMPP_EXPORT QXmppJingleCandidate { public: /// This enum is used to describe a candidate's type. enum Type { HostType, ///< Host candidate, a local address/port. PeerReflexiveType, ///< Peer-reflexive candidate, ///< the address/port as seen from the peer. ServerReflexiveType, ///< Server-reflexive candidate, ///< the address/port as seen by the STUN server RelayedType, ///< Relayed candidate, a candidate from ///< a TURN relay. }; QXmppJingleCandidate(); int component() const; void setComponent(int component); int foundation() const; void setFoundation(int foundation); QHostAddress host() const; void setHost(const QHostAddress &host); QString id() const; void setId(const QString &id); int network() const; void setNetwork(int network); quint16 port() const; void setPort(quint16 port); int priority() const; void setPriority(int priority); QString protocol() const; void setProtocol(const QString &protocol); QXmppJingleCandidate::Type type() const; void setType(QXmppJingleCandidate::Type); bool isNull() const; /// \cond void parse(const QDomElement &element); void toXml(QXmlStreamWriter *writer) const; static QXmppJingleCandidate::Type typeFromString(const QString &typeStr, bool *ok = 0); static QString typeToString(QXmppJingleCandidate::Type type); /// \endcond private: int m_component; int m_foundation; int m_generation; QHostAddress m_host; QString m_id; int m_network; quint16 m_port; QString m_protocol; int m_priority; QXmppJingleCandidate::Type m_type; }; /// \brief The QXmppJingleIq class represents an IQ used for initiating media /// sessions as specified by XEP-0166: Jingle. /// /// \ingroup Stanzas class QXMPP_EXPORT QXmppJingleIq : public QXmppIq { public: /// This enum is used to describe a Jingle action. enum Action { ContentAccept, ContentAdd, ContentModify, ContentReject, ContentRemove, DescriptionInfo, SecurityInfo, SessionAccept, SessionInfo, SessionInitiate, SessionTerminate, TransportAccept, TransportInfo, TransportReject, TransportReplace, }; /// \internal /// /// The QXmppJingleIq::Content class represents the "content" element of a /// QXmppJingleIq. class QXMPP_EXPORT Content { public: Content(); QString creator() const; void setCreator(const QString &creator); QString name() const; void setName(const QString &name); QString senders() const; void setSenders(const QString &senders); // XEP-0167: Jingle RTP Sessions QString descriptionMedia() const; void setDescriptionMedia(const QString &media); void addPayloadType(const QXmppJinglePayloadType &payload); QList payloadTypes() const; void setPayloadTypes(const QList &payloadTypes); void addTransportCandidate(const QXmppJingleCandidate &candidate); QList transportCandidates() const; QString transportUser() const; void setTransportUser(const QString &user); QString transportPassword() const; void setTransportPassword(const QString &password); /// \cond void parse(const QDomElement &element); void toXml(QXmlStreamWriter *writer) const; /// \endcond private: QString m_creator; QString m_disposition; QString m_name; QString m_senders; QString m_descriptionMedia; QString m_descriptionType; QString m_transportType; QString m_transportUser; QString m_transportPassword; QList m_payloadTypes; QList m_transportCandidates; }; /// \internal /// /// The QXmppJingleIq::Reason class represents the "reason" element of a /// QXmppJingleIq. class QXMPP_EXPORT Reason { public: enum Type { None, AlternativeSession, Busy, Cancel, ConnectivityError, Decline, Expired, FailedApplication, FailedTransport, GeneralError, Gone, IncompatibleParameters, MediaError, SecurityError, Success, Timeout, UnsupportedApplications, UnsupportedTransports, }; Reason(); QString text() const; void setText(const QString &text); Type type() const; void setType(Type type); /// \cond void parse(const QDomElement &element); void toXml(QXmlStreamWriter *writer) const; /// \endcond private: QString m_text; Type m_type; }; QXmppJingleIq(); Action action() const; void setAction(Action action); QString initiator() const; void setInitiator(const QString &initiator); QString responder() const; void setResponder(const QString &responder); QString sid() const; void setSid(const QString &sid); /// Returns a reference to the IQ's content element. Content& content() { return m_content; }; /// Returns a const reference to the IQ's content element. const Content& content() const { return m_content; }; /// Returns a reference to the IQ's reason element. Reason& reason() { return m_reason; }; /// Returns a const reference to the IQ's reason element. const Reason& reason() const { return m_reason; }; // XEP-0167: Jingle RTP Sessions bool ringing() const; void setRinging(bool ringing); /// \cond static bool isJingleIq(const QDomElement &element); /// \endcond protected: /// \cond void parseElementFromChild(const QDomElement &element); void toXmlElementFromChild(QXmlStreamWriter *writer) const; /// \endcond private: Action m_action; QString m_initiator; QString m_responder; QString m_sid; Content m_content; Reason m_reason; bool m_ringing; }; #endif qxmpp-0.7.6/src/base/QXmppRosterIq.h0000644000175000007640000000657712116723562017245 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Manjeet Dahiya * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPROSTERIQ_H #define QXMPPROSTERIQ_H #include "QXmppIq.h" #include #include /// \brief The QXmppRosterIq class represents a roster IQ. /// /// \ingroup Stanzas class QXMPP_EXPORT QXmppRosterIq : public QXmppIq { public: /// \brief The QXmppRosterIq::Item class represents a roster entry. class QXMPP_EXPORT Item { public: /// An enumeration for type of subscription with the bareJid in the roster. enum SubscriptionType { None = 0, ///< the user does not have a subscription to the ///< contact's presence information, and the contact does ///< not have a subscription to the user's presence information From = 1, ///< the contact has a subscription to the user's presence information, ///< but the user does not have a subscription to the contact's presence information To = 2, ///< the user has a subscription to the contact's presence information, ///< but the contact does not have a subscription to the user's presence information Both = 3, ///< both the user and the contact have subscriptions to each ///< other's presence information Remove = 4, ///< to delete a roster item NotSet = 8 ///< the subscription state was not specified }; Item(); QString bareJid() const; QSet groups() const; QString name() const; QString subscriptionStatus() const; SubscriptionType subscriptionType() const; void setBareJid(const QString&); void setGroups(const QSet&); void setName(const QString&); void setSubscriptionStatus(const QString&); void setSubscriptionType(SubscriptionType); /// \cond void parse(const QDomElement &element); void toXml(QXmlStreamWriter *writer) const; /// \endcond private: QString getSubscriptionTypeStr() const; void setSubscriptionTypeFromStr(const QString&); QString m_bareJid; SubscriptionType m_type; QString m_name; // can be subscribe/unsubscribe (attribute "ask") QString m_subscriptionStatus; QSet m_groups; }; void addItem(const Item&); QList items() const; /// \cond static bool isRosterIq(const QDomElement &element); /// \endcond protected: /// \cond void parseElementFromChild(const QDomElement &element); void toXmlElementFromChild(QXmlStreamWriter *writer) const; /// \endcond private: QList m_items; }; #endif // QXMPPROSTERIQ_H qxmpp-0.7.6/src/base/QXmppMessage.cpp0000644000175000007640000003330512116723562017401 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Manjeet Dahiya * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include #include #include "QXmppConstants.h" #include "QXmppMessage.h" #include "QXmppUtils.h" static const char* chat_states[] = { "", "active", "inactive", "gone", "composing", "paused", }; static const char* message_types[] = { "error", "normal", "chat", "groupchat", "headline" }; static const char *ns_xhtml = "http://www.w3.org/1999/xhtml"; enum StampType { LegacyDelayedDelivery, // XEP-0091: Legacy Delayed Delivery DelayedDelivery, // XEP-0203: Delayed Delivery }; class QXmppMessagePrivate : public QSharedData { public: QXmppMessage::Type type; QDateTime stamp; StampType stampType; QXmppMessage::State state; bool attentionRequested; QString body; QString subject; QString thread; // XEP-0071: XHTML-IM QString xhtml; // Request message receipt as per XEP-0184. QString receiptId; bool receiptRequested; // XEP-0249: Direct MUC Invitations QString mucInvitationJid; QString mucInvitationPassword; QString mucInvitationReason; }; /// Constructs a QXmppMessage. /// /// \param from /// \param to /// \param body /// \param thread QXmppMessage::QXmppMessage(const QString& from, const QString& to, const QString& body, const QString& thread) : QXmppStanza(from, to) , d(new QXmppMessagePrivate) { d->type = Chat; d->stampType = DelayedDelivery; d->state = None; d->attentionRequested = false; d->body = body; d->thread = thread; d->receiptRequested = false; } /// Constructs a copy of \a other. QXmppMessage::QXmppMessage(const QXmppMessage &other) : QXmppStanza(other) , d(other.d) { } QXmppMessage::~QXmppMessage() { } /// Assigns \a other to this message. QXmppMessage& QXmppMessage::operator=(const QXmppMessage &other) { QXmppStanza::operator=(other); d = other.d; return *this; } /// Returns the message's body. /// QString QXmppMessage::body() const { return d->body; } /// Sets the message's body. /// /// \param body void QXmppMessage::setBody(const QString& body) { d->body = body; } /// Returns true if the user's attention is requested, as defined /// by XEP-0224: Attention. bool QXmppMessage::isAttentionRequested() const { return d->attentionRequested; } /// Sets whether the user's attention is requested, as defined /// by XEP-0224: Attention. /// /// \a param requested void QXmppMessage::setAttentionRequested(bool requested) { d->attentionRequested = requested; } /// Returns true if a delivery receipt is requested, as defined /// by XEP-0184: Message Delivery Receipts. bool QXmppMessage::isReceiptRequested() const { return d->receiptRequested; } /// Sets whether a delivery receipt is requested, as defined /// by XEP-0184: Message Delivery Receipts. /// /// \a param requested void QXmppMessage::setReceiptRequested(bool requested) { d->receiptRequested = requested; if (requested && id().isEmpty()) generateAndSetNextId(); } /// If this message is a delivery receipt, returns the ID of the /// original message. QString QXmppMessage::receiptId() const { return d->receiptId; } /// Make this message a delivery receipt for the message with /// the given \a id. void QXmppMessage::setReceiptId(const QString &id) { d->receiptId = id; } /// Returns the JID for a multi-user chat direct invitation as defined /// by XEP-0249: Direct MUC Invitations. QString QXmppMessage::mucInvitationJid() const { return d->mucInvitationJid; } /// Sets the JID for a multi-user chat direct invitation as defined /// by XEP-0249: Direct MUC Invitations. void QXmppMessage::setMucInvitationJid(const QString &jid) { d->mucInvitationJid = jid; } /// Returns the password for a multi-user chat direct invitation as defined /// by XEP-0249: Direct MUC Invitations. QString QXmppMessage::mucInvitationPassword() const { return d->mucInvitationPassword; } /// Sets the \a password for a multi-user chat direct invitation as defined /// by XEP-0249: Direct MUC Invitations. void QXmppMessage::setMucInvitationPassword(const QString &password) { d->mucInvitationPassword = password; } /// Returns the reason for a multi-user chat direct invitation as defined /// by XEP-0249: Direct MUC Invitations. QString QXmppMessage::mucInvitationReason() const { return d->mucInvitationReason; } /// Sets the \a reason for a multi-user chat direct invitation as defined /// by XEP-0249: Direct MUC Invitations. void QXmppMessage::setMucInvitationReason(const QString &reason) { d->mucInvitationReason = reason; } /// Returns the message's type. /// QXmppMessage::Type QXmppMessage::type() const { return d->type; } /// Sets the message's type. /// /// \param type void QXmppMessage::setType(QXmppMessage::Type type) { d->type = type; } /// Returns the message's timestamp (if any). QDateTime QXmppMessage::stamp() const { return d->stamp; } /// Sets the message's timestamp. /// /// \param stamp void QXmppMessage::setStamp(const QDateTime &stamp) { d->stamp = stamp; } /// Returns the message's chat state. /// QXmppMessage::State QXmppMessage::state() const { return d->state; } /// Sets the message's chat state. /// /// \param state void QXmppMessage::setState(QXmppMessage::State state) { d->state = state; } /// Returns the message's subject. /// QString QXmppMessage::subject() const { return d->subject; } /// Sets the message's subject. /// /// \param subject void QXmppMessage::setSubject(const QString& subject) { d->subject = subject; } /// Returns the message's thread. QString QXmppMessage::thread() const { return d->thread; } /// Sets the message's thread. /// /// \param thread void QXmppMessage::setThread(const QString& thread) { d->thread = thread; } /// Returns the message's XHTML body as defined by /// XEP-0071: XHTML-IM. QString QXmppMessage::xhtml() const { return d->xhtml; } /// Sets the message's XHTML body as defined by /// XEP-0071: XHTML-IM. void QXmppMessage::setXhtml(const QString &xhtml) { d->xhtml = xhtml; } /// \cond void QXmppMessage::parse(const QDomElement &element) { QXmppStanza::parse(element); const QString type = element.attribute("type"); d->type = Normal; for (int i = Error; i <= Headline; i++) { if (type == message_types[i]) { d->type = static_cast(i); break; } } d->body = element.firstChildElement("body").text(); d->subject = element.firstChildElement("subject").text(); d->thread = element.firstChildElement("thread").text(); // chat states for (int i = Active; i <= Paused; i++) { QDomElement stateElement = element.firstChildElement(chat_states[i]); if (!stateElement.isNull() && stateElement.namespaceURI() == ns_chat_states) { d->state = static_cast(i); break; } } // XEP-0071: XHTML-IM QDomElement htmlElement = element.firstChildElement("html"); if (!htmlElement.isNull() && htmlElement.namespaceURI() == ns_xhtml_im) { QDomElement bodyElement = htmlElement.firstChildElement("body"); if (!bodyElement.isNull() && bodyElement.namespaceURI() == ns_xhtml) { QTextStream stream(&d->xhtml, QIODevice::WriteOnly); bodyElement.save(stream, 0); d->xhtml = d->xhtml.mid(d->xhtml.indexOf('>') + 1); d->xhtml.replace(" xmlns=\"http://www.w3.org/1999/xhtml\"", ""); d->xhtml.replace("", ""); d->xhtml = d->xhtml.trimmed(); } } // XEP-0184: Message Delivery Receipts QDomElement receivedElement = element.firstChildElement("received"); if (!receivedElement.isNull() && receivedElement.namespaceURI() == ns_message_receipts) { d->receiptId = receivedElement.attribute("id"); // compatibility with old-style XEP if (d->receiptId.isEmpty()) d->receiptId = id(); } else { d->receiptId = QString(); } d->receiptRequested = element.firstChildElement("request").namespaceURI() == ns_message_receipts; // XEP-0203: Delayed Delivery QDomElement delayElement = element.firstChildElement("delay"); if (!delayElement.isNull() && delayElement.namespaceURI() == ns_delayed_delivery) { const QString str = delayElement.attribute("stamp"); d->stamp = QXmppUtils::datetimeFromString(str); d->stampType = DelayedDelivery; } // XEP-0224: Attention d->attentionRequested = element.firstChildElement("attention").namespaceURI() == ns_attention; QXmppElementList extensions; QDomElement xElement = element.firstChildElement("x"); while (!xElement.isNull()) { if (xElement.namespaceURI() == ns_legacy_delayed_delivery) { // XEP-0091: Legacy Delayed Delivery const QString str = xElement.attribute("stamp"); d->stamp = QDateTime::fromString(str, "yyyyMMddThh:mm:ss"); d->stamp.setTimeSpec(Qt::UTC); d->stampType = LegacyDelayedDelivery; } else if (xElement.namespaceURI() == ns_conference) { // XEP-0249: Direct MUC Invitations d->mucInvitationJid = xElement.attribute("jid"); d->mucInvitationPassword = xElement.attribute("password"); d->mucInvitationReason = xElement.attribute("reason"); } else { // other extensions extensions << QXmppElement(xElement); } xElement = xElement.nextSiblingElement("x"); } setExtensions(extensions); } void QXmppMessage::toXml(QXmlStreamWriter *xmlWriter) const { xmlWriter->writeStartElement("message"); helperToXmlAddAttribute(xmlWriter, "xml:lang", lang()); helperToXmlAddAttribute(xmlWriter, "id", id()); helperToXmlAddAttribute(xmlWriter, "to", to()); helperToXmlAddAttribute(xmlWriter, "from", from()); helperToXmlAddAttribute(xmlWriter, "type", message_types[d->type]); if (!d->subject.isEmpty()) helperToXmlAddTextElement(xmlWriter, "subject", d->subject); if (!d->body.isEmpty()) helperToXmlAddTextElement(xmlWriter, "body", d->body); if (!d->thread.isEmpty()) helperToXmlAddTextElement(xmlWriter, "thread", d->thread); error().toXml(xmlWriter); // chat states if (d->state > None && d->state <= Paused) { xmlWriter->writeStartElement(chat_states[d->state]); xmlWriter->writeAttribute("xmlns", ns_chat_states); xmlWriter->writeEndElement(); } // XEP-0071: XHTML-IM if (!d->xhtml.isEmpty()) { xmlWriter->writeStartElement("html"); xmlWriter->writeAttribute("xmlns", ns_xhtml_im); xmlWriter->writeStartElement("body"); xmlWriter->writeAttribute("xmlns", ns_xhtml); xmlWriter->writeCharacters(""); xmlWriter->device()->write(d->xhtml.toUtf8()); xmlWriter->writeEndElement(); xmlWriter->writeEndElement(); } // time stamp if (d->stamp.isValid()) { QDateTime utcStamp = d->stamp.toUTC(); if (d->stampType == DelayedDelivery) { // XEP-0203: Delayed Delivery xmlWriter->writeStartElement("delay"); xmlWriter->writeAttribute("xmlns", ns_delayed_delivery); helperToXmlAddAttribute(xmlWriter, "stamp", QXmppUtils::datetimeToString(utcStamp)); xmlWriter->writeEndElement(); } else { // XEP-0091: Legacy Delayed Delivery xmlWriter->writeStartElement("x"); xmlWriter->writeAttribute("xmlns", ns_legacy_delayed_delivery); helperToXmlAddAttribute(xmlWriter, "stamp", utcStamp.toString("yyyyMMddThh:mm:ss")); xmlWriter->writeEndElement(); } } // XEP-0184: Message Delivery Receipts if (!d->receiptId.isEmpty()) { xmlWriter->writeStartElement("received"); xmlWriter->writeAttribute("xmlns", ns_message_receipts); xmlWriter->writeAttribute("id", d->receiptId); xmlWriter->writeEndElement(); } if (d->receiptRequested) { xmlWriter->writeStartElement("request"); xmlWriter->writeAttribute("xmlns", ns_message_receipts); xmlWriter->writeEndElement(); } // XEP-0224: Attention if (d->attentionRequested) { xmlWriter->writeStartElement("attention"); xmlWriter->writeAttribute("xmlns", ns_attention); xmlWriter->writeEndElement(); } // XEP-0249: Direct MUC Invitations if (!d->mucInvitationJid.isEmpty()) { xmlWriter->writeStartElement("x"); xmlWriter->writeAttribute("xmlns", ns_conference); xmlWriter->writeAttribute("jid", d->mucInvitationJid); if (!d->mucInvitationPassword.isEmpty()) xmlWriter->writeAttribute("password", d->mucInvitationPassword); if (!d->mucInvitationReason.isEmpty()) xmlWriter->writeAttribute("reason", d->mucInvitationReason); xmlWriter->writeEndElement(); } // other extensions QXmppStanza::extensionsToXml(xmlWriter); xmlWriter->writeEndElement(); } /// \endcond qxmpp-0.7.6/src/base/base.pri0000644000175000007640000000477112116723562015756 0ustar sharkyjerryweb# Header files INSTALL_HEADERS += \ base/QXmppArchiveIq.h \ base/QXmppBindIq.h \ base/QXmppBookmarkSet.h \ base/QXmppByteStreamIq.h \ base/QXmppConstants.h \ base/QXmppDataForm.h \ base/QXmppDiscoveryIq.h \ base/QXmppElement.h \ base/QXmppEntityTimeIq.h \ base/QXmppGlobal.h \ base/QXmppIbbIq.h \ base/QXmppIq.h \ base/QXmppJingleIq.h \ base/QXmppLogger.h \ base/QXmppMessage.h \ base/QXmppMucIq.h \ base/QXmppNonSASLAuth.h \ base/QXmppPingIq.h \ base/QXmppPresence.h \ base/QXmppPubSubIq.h \ base/QXmppRegisterIq.h \ base/QXmppResultSet.h \ base/QXmppRosterIq.h \ base/QXmppRpcIq.h \ base/QXmppRtpChannel.h \ base/QXmppSessionIq.h \ base/QXmppSocks.h \ base/QXmppStanza.h \ base/QXmppStream.h \ base/QXmppStreamFeatures.h \ base/QXmppStun.h \ base/QXmppUtils.h \ base/QXmppVCardIq.h \ base/QXmppVersionIq.h HEADERS += \ base/QXmppCodec_p.h \ base/QXmppSasl_p.h \ base/QXmppStreamInitiationIq_p.h # Source files SOURCES += \ base/QXmppArchiveIq.cpp \ base/QXmppBindIq.cpp \ base/QXmppBookmarkSet.cpp \ base/QXmppByteStreamIq.cpp \ base/QXmppCodec.cpp \ base/QXmppConstants.cpp \ base/QXmppDataForm.cpp \ base/QXmppDiscoveryIq.cpp \ base/QXmppElement.cpp \ base/QXmppEntityTimeIq.cpp \ base/QXmppGlobal.cpp \ base/QXmppIbbIq.cpp \ base/QXmppIq.cpp \ base/QXmppJingleIq.cpp \ base/QXmppLogger.cpp \ base/QXmppMessage.cpp \ base/QXmppMucIq.cpp \ base/QXmppNonSASLAuth.cpp \ base/QXmppPingIq.cpp \ base/QXmppPresence.cpp \ base/QXmppPubSubIq.cpp \ base/QXmppRegisterIq.cpp \ base/QXmppResultSet.cpp \ base/QXmppRosterIq.cpp \ base/QXmppRpcIq.cpp \ base/QXmppRtpChannel.cpp \ base/QXmppSasl.cpp \ base/QXmppSessionIq.cpp \ base/QXmppSocks.cpp \ base/QXmppStanza.cpp \ base/QXmppStream.cpp \ base/QXmppStreamFeatures.cpp \ base/QXmppStreamInitiationIq.cpp \ base/QXmppStun.cpp \ base/QXmppUtils.cpp \ base/QXmppVCardIq.cpp \ base/QXmppVersionIq.cpp # DNS qt_version = $$QT_MAJOR_VERSION contains(qt_version, 4) { INSTALL_HEADERS += base/qdnslookup.h base/qdnslookup_p.h SOURCES += base/qdnslookup.cpp android:SOURCES += base/qdnslookup_stub.cpp else:symbian:SOURCES += base/qdnslookup_symbian.cpp else:unix:SOURCES += base/qdnslookup_unix.cpp else:win32:SOURCES += base/qdnslookup_win.cpp else:SOURCES += base/qdnslookup_stub.cpp } qxmpp-0.7.6/src/base/QXmppIbbIq.h0000644000175000007640000000436512116723562016454 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Manjeet Dahiya * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPIBBIQ_H #define QXMPPIBBIQ_H #include "QXmppIq.h" class QXmppIbbOpenIq: public QXmppIq { public: QXmppIbbOpenIq(); long blockSize() const; void setBlockSize( long block_size ); QString sid() const; void setSid( const QString &sid ); static bool isIbbOpenIq(const QDomElement &element); protected: /// \cond void parseElementFromChild(const QDomElement &element); void toXmlElementFromChild(QXmlStreamWriter *writer) const; /// \endcond private: long m_block_size; QString m_sid; }; class QXmppIbbCloseIq: public QXmppIq { public: QXmppIbbCloseIq(); QString sid() const; void setSid( const QString &sid ); static bool isIbbCloseIq(const QDomElement &element); protected: /// \cond void parseElementFromChild(const QDomElement &element); void toXmlElementFromChild(QXmlStreamWriter *writer) const; /// \endcond private: QString m_sid; }; class QXMPP_EXPORT QXmppIbbDataIq : public QXmppIq { public: QXmppIbbDataIq(); quint16 sequence() const; void setSequence( quint16 seq ); QString sid() const; void setSid( const QString &sid ); QByteArray payload() const; void setPayload( const QByteArray &data ); static bool isIbbDataIq(const QDomElement &element); protected: /// \cond void parseElementFromChild(const QDomElement &element); void toXmlElementFromChild(QXmlStreamWriter *writer) const; /// \endcond private: quint16 m_seq; QString m_sid; QByteArray m_payload; }; #endif // QXMPPIBBIQS_H qxmpp-0.7.6/src/base/QXmppDiscoveryIq.h0000644000175000007640000000545012116723562017723 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPDISCOVERY_H #define QXMPPDISCOVERY_H #include "QXmppDataForm.h" #include "QXmppIq.h" class QXMPP_EXPORT QXmppDiscoveryIq : public QXmppIq { public: class QXMPP_EXPORT Identity { public: QString category() const; void setCategory(const QString &category); QString language() const; void setLanguage(const QString &language); QString name() const; void setName(const QString &name); QString type() const; void setType(const QString &type); private: QString m_category; QString m_language; QString m_name; QString m_type; }; class QXMPP_EXPORT Item { public: QString jid() const; void setJid(const QString &jid); QString name() const; void setName(const QString &name); QString node() const; void setNode(const QString &node); private: QString m_jid; QString m_name; QString m_node; }; enum QueryType { InfoQuery, ItemsQuery, }; QStringList features() const; void setFeatures(const QStringList &features); QList identities() const; void setIdentities(const QList &identities); QList items() const; void setItems(const QList &items); QXmppDataForm form() const; void setForm(const QXmppDataForm &form); QString queryNode() const; void setQueryNode(const QString &node); enum QueryType queryType() const; void setQueryType(enum QueryType type); QByteArray verificationString() const; static bool isDiscoveryIq(const QDomElement &element); protected: /// \cond void parseElementFromChild(const QDomElement &element); void toXmlElementFromChild(QXmlStreamWriter *writer) const; /// \endcond private: QStringList m_features; QList m_identities; QList m_items; QXmppDataForm m_form; QString m_queryNode; enum QueryType m_queryType; }; #endif qxmpp-0.7.6/src/base/QXmppDataForm.h0000644000175000007640000001130412116723562017152 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPDATAFORM_H #define QXMPPDATAFORM_H #include #include #include "QXmppStanza.h" class QXmppDataFormPrivate; class QXmppDataFormFieldPrivate; class QXmppDataFormMediaPrivate; /// \brief The QXmppDataForm class represents a data form as defined by /// XEP-0004: Data Forms. /// class QXMPP_EXPORT QXmppDataForm { public: /// \brief The QXmppDataForm::Media class represents a media field /// as defined by XEP-0221: Data Forms Media Element. /// class QXMPP_EXPORT Media { public: Media(); Media(const QXmppDataForm::Media &other); ~Media(); QXmppDataForm::Media& operator=(const QXmppDataForm::Media &other); int height() const; void setHeight(int height); int width() const; void setWidth(int width); QList > uris() const; void setUris(const QList > &uris); bool isNull() const; private: QSharedDataPointer d; }; /// \brief The QXmppDataForm::Field class represents a data form field /// as defined by XEP-0004: Data Forms. /// class QXMPP_EXPORT Field { public: /// This enum is used to describe a field's type. enum Type { BooleanField, FixedField, HiddenField, JidMultiField, JidSingleField, ListMultiField, ListSingleField, TextMultiField, TextPrivateField, TextSingleField, }; Field(QXmppDataForm::Field::Type type = QXmppDataForm::Field::TextSingleField); Field(const QXmppDataForm::Field &other); ~Field(); QXmppDataForm::Field& operator=(const QXmppDataForm::Field &other); QString description() const; void setDescription(const QString &description); QString key() const; void setKey(const QString &key); QString label() const; void setLabel(const QString &label); Media media() const; void setMedia(const Media &media); QList > options() const; void setOptions(const QList > &options); bool isRequired() const; void setRequired(bool required); QXmppDataForm::Field::Type type() const; void setType(QXmppDataForm::Field::Type type); QVariant value() const; void setValue(const QVariant &value); private: QSharedDataPointer d; }; /// This enum is used to describe a form's type. enum Type { None, ///< Unknown form type Form, ///< The form-processing entity is asking the form-submitting ///< entity to complete a form. Submit, ///< The form-submitting entity is submitting data to the ///< form-processing entity. Cancel, ///< The form-submitting entity has cancelled submission ///< of data to the form-processing entity. Result, ///< The form-processing entity is returning data ///< (e.g., search results) to the form-submitting entity, ///< or the data is a generic data set. }; QXmppDataForm(QXmppDataForm::Type type = QXmppDataForm::None); QXmppDataForm(const QXmppDataForm &other); ~QXmppDataForm(); QXmppDataForm& operator=(const QXmppDataForm &other); QString instructions() const; void setInstructions(const QString &instructions); QList fields() const; QList &fields(); void setFields(const QList &fields); QString title() const; void setTitle(const QString &title); QXmppDataForm::Type type() const; void setType(QXmppDataForm::Type type); bool isNull() const; /// \cond void parse(const QDomElement &element); void toXml(QXmlStreamWriter *writer) const; /// \endcond private: QSharedDataPointer d; }; #endif qxmpp-0.7.6/src/base/QXmppSocks.h0000644000175000007640000000335312116723562016544 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPSOCKS_H #define QXMPPSOCKS_H #include #include #include "QXmppGlobal.h" class QTcpServer; class QXMPP_EXPORT QXmppSocksClient : public QTcpSocket { Q_OBJECT public: QXmppSocksClient(const QString &proxyHost, quint16 proxyPort, QObject *parent=0); void connectToHost(const QString &hostName, quint16 hostPort); signals: void ready(); private slots: void slotConnected(); void slotReadyRead(); private: QString m_proxyHost; quint16 m_proxyPort; QString m_hostName; quint16 m_hostPort; int m_step; }; class QXMPP_EXPORT QXmppSocksServer : public QObject { Q_OBJECT public: QXmppSocksServer(QObject *parent=0); void close(); bool listen(quint16 port = 0); quint16 serverPort() const; signals: void newConnection(QTcpSocket *socket, QString hostName, quint16 port); private slots: void slotNewConnection(); void slotReadyRead(); private: QTcpServer *m_server; QTcpServer *m_server_v6; QMap m_states; }; #endif qxmpp-0.7.6/src/base/QXmppLogger.h0000644000175000007640000001165112116723562016701 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPLOGGER_H #define QXMPPLOGGER_H #include #include "QXmppGlobal.h" #ifdef QXMPP_LOGGABLE_TRACE #define qxmpp_loggable_trace(x) QString("%1(0x%2) %3").arg(metaObject()->className(), QString::number(reinterpret_cast(this), 16), x) #else #define qxmpp_loggable_trace(x) (x) #endif class QXmppLoggerPrivate; /// \brief The QXmppLogger class represents a sink for logging messages. /// /// \ingroup Core class QXMPP_EXPORT QXmppLogger : public QObject { Q_OBJECT Q_ENUMS(LoggingType) Q_FLAGS(MessageType MessageTypes) Q_PROPERTY(QString logFilePath READ logFilePath WRITE setLogFilePath) Q_PROPERTY(LoggingType loggingType READ loggingType WRITE setLoggingType) Q_PROPERTY(MessageTypes messageTypes READ messageTypes WRITE setMessageTypes) public: /// This enum describes how log message are handled. enum LoggingType { NoLogging = 0, ///< Log messages are discarded FileLogging = 1, ///< Log messages are written to a file StdoutLogging = 2, ///< Log messages are written to the standard output SignalLogging = 4, ///< Log messages are emitted as a signal }; /// This enum describes a type of log message. enum MessageType { NoMessage = 0, ///< No message type DebugMessage = 1, ///< Debugging message InformationMessage = 2, ///< Informational message WarningMessage = 4, ///< Warning message ReceivedMessage = 8, ///< Message received from server SentMessage = 16, ///< Message sent to server AnyMessage = 31, ///< Any message type }; Q_DECLARE_FLAGS(MessageTypes, MessageType) QXmppLogger(QObject *parent = 0); ~QXmppLogger(); static QXmppLogger* getLogger(); QXmppLogger::LoggingType loggingType(); void setLoggingType(QXmppLogger::LoggingType type); QString logFilePath(); void setLogFilePath(const QString &path); QXmppLogger::MessageTypes messageTypes(); void setMessageTypes(QXmppLogger::MessageTypes types); public slots: virtual void setGauge(const QString &gauge, double value); virtual void updateCounter(const QString &counter, qint64 amount); void log(QXmppLogger::MessageType type, const QString& text); void reopen(); signals: /// This signal is emitted whenever a log message is received. void message(QXmppLogger::MessageType type, const QString &text); private: static QXmppLogger* m_logger; QXmppLoggerPrivate *d; }; /// \brief The QXmppLoggable class represents a source of logging messages. /// /// \ingroup Core class QXMPP_EXPORT QXmppLoggable : public QObject { Q_OBJECT public: QXmppLoggable(QObject *parent = 0); protected: /// \cond virtual void childEvent(QChildEvent *event); /// \endcond /// Logs a debugging message. /// /// \param message void debug(const QString &message) { emit logMessage(QXmppLogger::DebugMessage, qxmpp_loggable_trace(message)); } /// Logs an informational message. /// /// \param message void info(const QString &message) { emit logMessage(QXmppLogger::InformationMessage, qxmpp_loggable_trace(message)); } /// Logs a warning message. /// /// \param message void warning(const QString &message) { emit logMessage(QXmppLogger::WarningMessage, qxmpp_loggable_trace(message)); } /// Logs a received packet. /// /// \param message void logReceived(const QString &message) { emit logMessage(QXmppLogger::ReceivedMessage, qxmpp_loggable_trace(message)); } /// Logs a sent packet. /// /// \param message void logSent(const QString &message) { emit logMessage(QXmppLogger::SentMessage, qxmpp_loggable_trace(message)); } signals: /// Sets the given \a gauge to \a value. void setGauge(const QString &gauge, double value); /// This signal is emitted to send logging messages. void logMessage(QXmppLogger::MessageType type, const QString &msg); /// Updates the given \a counter by \a amount. void updateCounter(const QString &counter, qint64 amount = 1); }; Q_DECLARE_OPERATORS_FOR_FLAGS(QXmppLogger::MessageTypes) #endif // QXMPPLOGGER_H qxmpp-0.7.6/src/base/QXmppGlobal.cpp0000644000175000007640000000167112116723562017216 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "QXmppGlobal.h" QString QXmppVersion() { return QString("%1.%2.%3").arg( QString::number((QXMPP_VERSION >> 16) & 0xff), QString::number((QXMPP_VERSION >> 8) & 0xff), QString::number(QXMPP_VERSION & 0xff)); } qxmpp-0.7.6/src/base/QXmppIq.h0000644000175000007640000000364412116723562016036 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPIQ_H #define QXMPPIQ_H #include "QXmppStanza.h" // forward declarations of QXmlStream* classes will not work on Mac, we need to // include the whole header. // See http://lists.trolltech.com/qt-interest/2008-07/thread00798-0.html // for an explanation. #include class QXmppIqPrivate; /// \brief The QXmppIq class is the base class for all IQs. /// /// \ingroup Stanzas class QXMPP_EXPORT QXmppIq : public QXmppStanza { public: /// This enum describes the type of IQ. enum Type { Error = 0, ///< Error response. Get, ///< Get request. Set, ///< Set request. Result ///< Result. }; QXmppIq(QXmppIq::Type type = QXmppIq::Get); QXmppIq(const QXmppIq &other); ~QXmppIq(); QXmppIq& operator=(const QXmppIq &other); QXmppIq::Type type() const; void setType(QXmppIq::Type); /// \cond void parse(const QDomElement &element); void toXml(QXmlStreamWriter *writer) const; protected: virtual void parseElementFromChild(const QDomElement &element); virtual void toXmlElementFromChild(QXmlStreamWriter *writer) const; /// \endcond private: QSharedDataPointer d; }; #endif // QXMPPIQ_H qxmpp-0.7.6/src/base/QXmppElement.cpp0000644000175000007640000001245012116723562017404 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "QXmppElement.h" #include "QXmppUtils.h" #include class QXmppElementPrivate { public: QXmppElementPrivate(); QXmppElementPrivate(const QDomElement &element); ~QXmppElementPrivate(); QAtomicInt counter; QXmppElementPrivate *parent; QMap attributes; QList children; QString name; QString value; }; QXmppElementPrivate::QXmppElementPrivate() : counter(1), parent(NULL) { } QXmppElementPrivate::QXmppElementPrivate(const QDomElement &element) : counter(1), parent(NULL) { if (element.isNull()) return; name = element.tagName(); QString xmlns = element.namespaceURI(); QString parentns = element.parentNode().namespaceURI(); if (!xmlns.isEmpty() && xmlns != parentns) attributes.insert("xmlns", xmlns); QDomNamedNodeMap attrs = element.attributes(); for (int i = 0; i < attrs.size(); i++) { QDomAttr attr = attrs.item(i).toAttr(); attributes.insert(attr.name(), attr.value()); } QDomNode childNode = element.firstChild(); while (!childNode.isNull()) { if (childNode.isElement()) { QXmppElementPrivate *child = new QXmppElementPrivate(childNode.toElement()); child->parent = this; children.append(child); } else if (childNode.isText()) { value += childNode.toText().data(); } childNode = childNode.nextSibling(); } } QXmppElementPrivate::~QXmppElementPrivate() { foreach (QXmppElementPrivate *child, children) if (!child->counter.deref()) delete child; } QXmppElement::QXmppElement() { d = new QXmppElementPrivate(); } QXmppElement::QXmppElement(const QXmppElement &other) { other.d->counter.ref(); d = other.d; } QXmppElement::QXmppElement(QXmppElementPrivate *other) { other->counter.ref(); d = other; } QXmppElement::QXmppElement(const QDomElement &element) { d = new QXmppElementPrivate(element); } QXmppElement::~QXmppElement() { if (!d->counter.deref()) delete d; } QXmppElement &QXmppElement::operator=(const QXmppElement &other) { other.d->counter.ref(); if (!d->counter.deref()) delete d; d = other.d; return *this; } QStringList QXmppElement::attributeNames() const { return d->attributes.keys(); } QString QXmppElement::attribute(const QString &name) const { return d->attributes.value(name); } void QXmppElement::setAttribute(const QString &name, const QString &value) { d->attributes.insert(name, value); } void QXmppElement::appendChild(const QXmppElement &child) { if (child.d->parent == d) return; if (child.d->parent) child.d->parent->children.removeAll(child.d); else child.d->counter.ref(); child.d->parent = d; d->children.append(child.d); } QXmppElement QXmppElement::firstChildElement(const QString &name) const { foreach (QXmppElementPrivate *child_d, d->children) if (name.isEmpty() || child_d->name == name) return QXmppElement(child_d); return QXmppElement(); } QXmppElement QXmppElement::nextSiblingElement(const QString &name) const { if (!d->parent) return QXmppElement(); const QList &siblings_d = d->parent->children; for (int i = siblings_d.indexOf(d) + 1; i < siblings_d.size(); i++) if (name.isEmpty() || siblings_d[i]->name == name) return QXmppElement(siblings_d[i]); return QXmppElement(); } bool QXmppElement::isNull() const { return d->name.isEmpty(); } void QXmppElement::removeChild(const QXmppElement &child) { if (child.d->parent != d) return; d->children.removeAll(child.d); child.d->counter.deref(); child.d->parent = NULL; } QString QXmppElement::tagName() const { return d->name; } void QXmppElement::setTagName(const QString &tagName) { d->name = tagName; } QString QXmppElement::value() const { return d->value; } void QXmppElement::setValue(const QString &value) { d->value = value; } void QXmppElement::toXml(QXmlStreamWriter *writer) const { if (isNull()) return; writer->writeStartElement(d->name); if (d->attributes.contains("xmlns")) writer->writeAttribute("xmlns", d->attributes.value("xmlns")); foreach (const QString &attr, d->attributes.keys()) if (attr != "xmlns") helperToXmlAddAttribute(writer, attr, d->attributes.value(attr)); if (!d->value.isEmpty()) writer->writeCharacters(d->value); foreach (const QXmppElement &child, d->children) child.toXml(writer); writer->writeEndElement(); } qxmpp-0.7.6/src/base/QXmppIbbIq.cpp0000644000175000007640000001007212116723562016777 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Manjeet Dahiya * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include #include "QXmppConstants.h" #include "QXmppIbbIq.h" QXmppIbbOpenIq::QXmppIbbOpenIq() : QXmppIq(QXmppIq::Set), m_block_size(1024) { } long QXmppIbbOpenIq::blockSize() const { return m_block_size; } void QXmppIbbOpenIq::setBlockSize( long block_size ) { m_block_size = block_size; } QString QXmppIbbOpenIq::sid() const { return m_sid; } void QXmppIbbOpenIq::setSid( const QString &sid ) { m_sid = sid; } /// \cond bool QXmppIbbOpenIq::isIbbOpenIq(const QDomElement &element) { QDomElement openElement = element.firstChildElement("open"); return openElement.namespaceURI() == ns_ibb; } void QXmppIbbOpenIq::parseElementFromChild(const QDomElement &element) { QDomElement openElement = element.firstChildElement("open"); m_sid = openElement.attribute( "sid" ); m_block_size = openElement.attribute( "block-size" ).toLong(); } void QXmppIbbOpenIq::toXmlElementFromChild(QXmlStreamWriter *writer) const { writer->writeStartElement("open"); writer->writeAttribute( "xmlns",ns_ibb); writer->writeAttribute( "sid",m_sid); writer->writeAttribute( "block-size",QString::number(m_block_size) ); writer->writeEndElement(); } /// \endcond QXmppIbbCloseIq::QXmppIbbCloseIq() : QXmppIq(QXmppIq::Set) { } QString QXmppIbbCloseIq::sid() const { return m_sid; } void QXmppIbbCloseIq::setSid( const QString &sid ) { m_sid = sid; } /// \cond bool QXmppIbbCloseIq::isIbbCloseIq(const QDomElement &element) { QDomElement openElement = element.firstChildElement("close"); return openElement.namespaceURI() == ns_ibb; } void QXmppIbbCloseIq::parseElementFromChild(const QDomElement &element) { QDomElement openElement = element.firstChildElement("close"); m_sid = openElement.attribute( "sid" ); } void QXmppIbbCloseIq::toXmlElementFromChild(QXmlStreamWriter *writer) const { writer->writeStartElement("close"); writer->writeAttribute( "xmlns",ns_ibb); writer->writeAttribute( "sid",m_sid); writer->writeEndElement(); } /// \endcond QXmppIbbDataIq::QXmppIbbDataIq() : QXmppIq( QXmppIq::Set ), m_seq(0) { } quint16 QXmppIbbDataIq::sequence() const { return m_seq; } void QXmppIbbDataIq::setSequence( quint16 seq ) { m_seq = seq; } QString QXmppIbbDataIq::sid() const { return m_sid; } void QXmppIbbDataIq::setSid( const QString &sid ) { m_sid = sid; } QByteArray QXmppIbbDataIq::payload() const { return m_payload; } void QXmppIbbDataIq::setPayload( const QByteArray &data ) { m_payload = data; } /// \cond bool QXmppIbbDataIq::isIbbDataIq(const QDomElement &element) { QDomElement dataElement = element.firstChildElement("data"); return dataElement.namespaceURI() == ns_ibb; } void QXmppIbbDataIq::parseElementFromChild(const QDomElement &element) { QDomElement dataElement = element.firstChildElement("data"); m_sid = dataElement.attribute( "sid" ); m_seq = dataElement.attribute( "seq" ).toLong(); m_payload = QByteArray::fromBase64( dataElement.text().toLatin1() ); } void QXmppIbbDataIq::toXmlElementFromChild(QXmlStreamWriter *writer) const { writer->writeStartElement("data"); writer->writeAttribute( "xmlns",ns_ibb); writer->writeAttribute( "sid",m_sid); writer->writeAttribute( "seq",QString::number(m_seq) ); writer->writeCharacters( m_payload.toBase64() ); writer->writeEndElement(); } /// \endcond qxmpp-0.7.6/src/src.pro0000644000175000007640000000231312116723562014715 0ustar sharkyjerrywebinclude(../qxmpp.pri) QT -= gui TEMPLATE = lib CONFIG += $$QXMPP_LIBRARY_TYPE DEFINES += QXMPP_BUILD DEFINES += $$QXMPP_INTERNAL_DEFINES INCLUDEPATH += $$QXMPP_INCLUDEPATH $$QXMPP_INTERNAL_INCLUDES LIBS += $$QXMPP_INTERNAL_LIBS !isEmpty(QXMPP_USE_SPEEX) { DEFINES += QXMPP_USE_SPEEX LIBS += -lspeex } !isEmpty(QXMPP_USE_THEORA) { DEFINES += QXMPP_USE_THEORA LIBS += -ltheoradec -ltheoraenc } !isEmpty(QXMPP_USE_VPX) { DEFINES += QXMPP_USE_VPX LIBS += -lvpx } # Target definition TARGET = $$QXMPP_LIBRARY_NAME VERSION = $$QXMPP_VERSION win32 { DESTDIR = $$OUT_PWD } include(base/base.pri) include(client/client.pri) include(server/server.pri) HEADERS += $$INSTALL_HEADERS # Installation headers.files = $$INSTALL_HEADERS headers.path = $$PREFIX/include/qxmpp target.path = $$PREFIX/$$LIBDIR INSTALLS += headers target # pkg-config support CONFIG += create_pc create_prl no_install_prl QMAKE_PKGCONFIG_DESTDIR = pkgconfig QMAKE_PKGCONFIG_LIBDIR = $$target.path QMAKE_PKGCONFIG_INCDIR = $$headers.path equals(QXMPP_LIBRARY_TYPE,staticlib) { QMAKE_PKGCONFIG_CFLAGS = -DQXMPP_STATIC } else { QMAKE_PKGCONFIG_CFLAGS = -DQXMPP_SHARED } unix:QMAKE_CLEAN += -r pkgconfig lib$${TARGET}.prl qxmpp-0.7.6/src/server/0000755000175000007640000000000012116723562014713 5ustar sharkyjerrywebqxmpp-0.7.6/src/server/QXmppDialback.cpp0000644000175000007640000000513112116723562020077 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include "QXmppConstants.h" #include "QXmppDialback.h" #include "QXmppUtils.h" /// Constructs a QXmppDialback. QXmppDialback::QXmppDialback() : m_command(Result) { } /// Returns the dialback command. QXmppDialback::Command QXmppDialback::command() const { return m_command; } /// Sets the dialback command. /// /// \param command void QXmppDialback::setCommand(QXmppDialback::Command command) { m_command = command; } /// Returns the dialback key. QString QXmppDialback::key() const { return m_key; } /// Sets the dialback key. /// /// \param key void QXmppDialback::setKey(const QString &key) { m_key = key; } /// Returns the dialback type. QString QXmppDialback::type() const { return m_type; } /// Sets the dialback type. /// /// \param type void QXmppDialback::setType(const QString &type) { m_type = type; } /// \cond bool QXmppDialback::isDialback(const QDomElement &element) { return element.namespaceURI() == ns_server_dialback && (element.tagName() == QLatin1String("result") || element.tagName() == QLatin1String("verify")); } void QXmppDialback::parse(const QDomElement &element) { QXmppStanza::parse(element); if (element.tagName() == QLatin1String("result")) m_command = Result; else m_command = Verify; m_type = element.attribute("type"); m_key = element.text(); } void QXmppDialback::toXml(QXmlStreamWriter *xmlWriter) const { if (m_command == Result) xmlWriter->writeStartElement("db:result"); else xmlWriter->writeStartElement("db:verify"); helperToXmlAddAttribute(xmlWriter, "id", id()); helperToXmlAddAttribute(xmlWriter, "to", to()); helperToXmlAddAttribute(xmlWriter, "from", from()); helperToXmlAddAttribute(xmlWriter, "type", m_type); if (!m_key.isEmpty()) xmlWriter->writeCharacters(m_key); xmlWriter->writeEndElement(); } /// \endcond qxmpp-0.7.6/src/server/QXmppIncomingServer.cpp0000644000175000007640000001603312116723562021342 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include #include #include #include "QXmppConstants.h" #include "QXmppDialback.h" #include "QXmppIncomingServer.h" #include "QXmppOutgoingServer.h" #include "QXmppStreamFeatures.h" #include "QXmppUtils.h" class QXmppIncomingServerPrivate { public: QXmppIncomingServerPrivate(QXmppIncomingServer *qq); QString origin() const; QSet authenticated; QString domain; QString localStreamId; private: QXmppIncomingServer *q; }; QXmppIncomingServerPrivate::QXmppIncomingServerPrivate(QXmppIncomingServer *qq) : q(qq) { } QString QXmppIncomingServerPrivate::origin() const { QSslSocket *socket = q->socket(); if (socket) return socket->peerAddress().toString() + " " + QString::number(socket->peerPort()); else return ""; } /// Constructs a new incoming server stream. /// /// \param socket The socket for the XMPP stream. /// \param domain The local domain. /// \param parent The parent QObject for the stream (optional). /// QXmppIncomingServer::QXmppIncomingServer(QSslSocket *socket, const QString &domain, QObject *parent) : QXmppStream(parent) { bool check; Q_UNUSED(check); d = new QXmppIncomingServerPrivate(this); d->domain = domain; if (socket) { check = connect(socket, SIGNAL(disconnected()), this, SLOT(slotSocketDisconnected())); Q_ASSERT(check); setSocket(socket); } info(QString("Incoming server connection from %1").arg(d->origin())); } /// Destroys the current stream. QXmppIncomingServer::~QXmppIncomingServer() { delete d; } /// Returns the stream's identifier. /// QString QXmppIncomingServer::localStreamId() const { return d->localStreamId; } /// \cond void QXmppIncomingServer::handleStream(const QDomElement &streamElement) { const QString from = streamElement.attribute("from"); if (!from.isEmpty()) info(QString("Incoming server stream from %1 on %2").arg(from, d->origin())); // start stream d->localStreamId = QXmppUtils::generateStanzaHash().toLatin1(); QString data = QString("").arg( ns_server, ns_server_dialback, ns_stream, d->localStreamId); sendData(data.toUtf8()); // send stream features QXmppStreamFeatures features; if (!socket()->isEncrypted() && !socket()->localCertificate().isNull() && !socket()->privateKey().isNull()) features.setTlsMode(QXmppStreamFeatures::Enabled); sendPacket(features); } void QXmppIncomingServer::handleStanza(const QDomElement &stanza) { const QString ns = stanza.namespaceURI(); if (ns == ns_tls && stanza.tagName() == QLatin1String("starttls")) { sendData(""); socket()->flush(); socket()->startServerEncryption(); return; } else if (QXmppDialback::isDialback(stanza)) { QXmppDialback request; request.parse(stanza); // check the request is valid if (!request.type().isEmpty() || request.from().isEmpty() || request.to() != d->domain || request.key().isEmpty()) { warning(QString("Invalid dialback received on %1").arg(d->origin())); return; } const QString domain = request.from(); if (request.command() == QXmppDialback::Result) { debug(QString("Received a dialback result from '%1' on %2").arg(domain, d->origin())); // establish dialback connection QXmppOutgoingServer *stream = new QXmppOutgoingServer(d->domain, this); bool check = connect(stream, SIGNAL(dialbackResponseReceived(QXmppDialback)), this, SLOT(slotDialbackResponseReceived(QXmppDialback))); Q_ASSERT(check); Q_UNUSED(check); stream->setVerify(d->localStreamId, request.key()); stream->connectToHost(domain); } else if (request.command() == QXmppDialback::Verify) { debug(QString("Received a dialback verify from '%1' on %2").arg(domain, d->origin())); emit dialbackRequestReceived(request); } } else if (d->authenticated.contains(QXmppUtils::jidToDomain(stanza.attribute("from")))) { // relay stanza if the remote party is authenticated emit elementReceived(stanza); } else { warning(QString("Received an element from unverified domain '%1' on %2").arg(QXmppUtils::jidToDomain(stanza.attribute("from")), d->origin())); disconnectFromHost(); } } /// \endcond /// Returns true if the socket is connected and the remote server is /// authenticated. /// bool QXmppIncomingServer::isConnected() const { return QXmppStream::isConnected() && !d->authenticated.isEmpty(); } /// Handles a dialback response received from the authority server. /// /// \param response /// void QXmppIncomingServer::slotDialbackResponseReceived(const QXmppDialback &dialback) { QXmppOutgoingServer *stream = qobject_cast(sender()); if (!stream || dialback.command() != QXmppDialback::Verify || dialback.id() != d->localStreamId || dialback.from() != stream->remoteDomain()) return; // relay verify response QXmppDialback response; response.setCommand(QXmppDialback::Result); response.setTo(dialback.from()); response.setFrom(d->domain); response.setType(dialback.type()); sendPacket(response); // check for success if (response.type() == QLatin1String("valid")) { info(QString("Verified incoming domain '%1' on %2").arg(dialback.from(), d->origin())); const bool wasConnected = !d->authenticated.isEmpty(); d->authenticated.insert(dialback.from()); if (!wasConnected) emit connected(); } else { warning(QString("Failed to verify incoming domain '%1' on %2").arg(dialback.from(), d->origin())); disconnectFromHost(); } // disconnect dialback stream->disconnectFromHost(); stream->deleteLater(); } void QXmppIncomingServer::slotSocketDisconnected() { info(QString("Socket disconnected from %1").arg(d->origin())); emit disconnected(); } qxmpp-0.7.6/src/server/QXmppIncomingServer.h0000644000175000007640000000360512116723562021010 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPINCOMINGSERVER_H #define QXMPPINCOMINGSERVER_H #include "QXmppStream.h" class QXmppDialback; class QXmppIncomingServerPrivate; class QXmppOutgoingServer; /// \brief The QXmppIncomingServer class represents an incoming XMPP stream /// from an XMPP server. /// class QXMPP_EXPORT QXmppIncomingServer : public QXmppStream { Q_OBJECT public: QXmppIncomingServer(QSslSocket *socket, const QString &domain, QObject *parent); ~QXmppIncomingServer(); bool isConnected() const; QString localStreamId() const; signals: /// This signal is emitted when a dialback verify request is received. void dialbackRequestReceived(const QXmppDialback &result); /// This signal is emitted when an element is received. void elementReceived(const QDomElement &element); protected: /// \cond void handleStanza(const QDomElement &stanzaElement); void handleStream(const QDomElement &streamElement); /// \endcond private slots: void slotDialbackResponseReceived(const QXmppDialback &dialback); void slotSocketDisconnected(); private: Q_DISABLE_COPY(QXmppIncomingServer) QXmppIncomingServerPrivate* d; friend class QXmppIncomingServerPrivate; }; #endif qxmpp-0.7.6/src/server/server.pri0000644000175000007640000000107112116723562016734 0ustar sharkyjerryweb# Headers INSTALL_HEADERS += \ server/QXmppDialback.h \ server/QXmppIncomingClient.h \ server/QXmppIncomingServer.h \ server/QXmppOutgoingServer.h \ server/QXmppPasswordChecker.h \ server/QXmppServer.h \ server/QXmppServerExtension.h \ server/QXmppServerPlugin.h # Source files SOURCES += \ server/QXmppDialback.cpp \ server/QXmppIncomingClient.cpp \ server/QXmppIncomingServer.cpp \ server/QXmppOutgoingServer.cpp \ server/QXmppPasswordChecker.cpp \ server/QXmppServer.cpp \ server/QXmppServerExtension.cpp qxmpp-0.7.6/src/server/QXmppIncomingClient.h0000644000175000007640000000355712116723562020766 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPINCOMINGCLIENT_H #define QXMPPINCOMINGCLIENT_H #include "QXmppStream.h" class QXmppIncomingClientPrivate; class QXmppPasswordChecker; /// \brief Interface for password checkers. /// /// \brief The QXmppIncomingClient class represents an incoming XMPP stream /// from an XMPP client. /// class QXMPP_EXPORT QXmppIncomingClient : public QXmppStream { Q_OBJECT public: QXmppIncomingClient(QSslSocket *socket, const QString &domain, QObject *parent = 0); ~QXmppIncomingClient(); bool isConnected() const; QString jid() const; void setInactivityTimeout(int secs); void setPasswordChecker(QXmppPasswordChecker *checker); signals: /// This signal is emitted when an element is received. void elementReceived(const QDomElement &element); protected: /// \cond void handleStream(const QDomElement &element); void handleStanza(const QDomElement &element); /// \endcond private slots: void onDigestReply(); void onPasswordReply(); void onSocketDisconnected(); void onTimeout(); private: Q_DISABLE_COPY(QXmppIncomingClient) QXmppIncomingClientPrivate* d; friend class QXmppIncomingClientPrivate; }; #endif qxmpp-0.7.6/src/server/QXmppServerExtension.h0000644000175000007640000000404012116723562021213 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPSERVEREXTENSION_H #define QXMPPSERVEREXTENSION_H #include #include "QXmppLogger.h" class QDomElement; class QStringList; class QXmppServer; class QXmppServerExtensionPrivate; class QXmppStream; /// \brief The QXmppServerExtension class is the base class for QXmppServer /// extensions. /// /// If you want to extend QXmppServer, for instance to support an IQ type /// which is not natively supported, you can subclass QXmppServerExtension /// and implement handleStanza(). You can then add your extension to the /// client instance using QXmppServer::addExtension(). /// /// \ingroup Core class QXMPP_EXPORT QXmppServerExtension : public QXmppLoggable { Q_OBJECT public: QXmppServerExtension(); ~QXmppServerExtension(); virtual QString extensionName() const; virtual int extensionPriority() const; virtual QStringList discoveryFeatures() const; virtual QStringList discoveryItems() const; virtual bool handleStanza(const QDomElement &stanza); virtual QSet presenceSubscribers(const QString &jid); virtual QSet presenceSubscriptions(const QString &jid); virtual bool start(); virtual void stop(); protected: QXmppServer *server() const; private: void setServer(QXmppServer *server); QXmppServerExtensionPrivate * const d; friend class QXmppServer; }; #endif qxmpp-0.7.6/src/server/QXmppServerExtension.cpp0000644000175000007640000000611112116723562021547 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include #include #include "QXmppLogger.h" #include "QXmppServer.h" #include "QXmppServerExtension.h" class QXmppServerExtensionPrivate { public: QXmppServer *server; }; QXmppServerExtension::QXmppServerExtension() : d(new QXmppServerExtensionPrivate) { d->server = 0; } QXmppServerExtension::~QXmppServerExtension() { delete d; } /// Returns the discovery features to add to the server. /// QStringList QXmppServerExtension::discoveryFeatures() const { return QStringList(); } /// Returns the discovery items to add to the server. /// QStringList QXmppServerExtension::discoveryItems() const { return QStringList(); } /// Returns the extension's name. /// QString QXmppServerExtension::extensionName() const { int index = metaObject()->indexOfClassInfo("ExtensionName"); if (index < 0) return QString(); const char *name = metaObject()->classInfo(index).value(); return QString::fromLatin1(name); } /// Returns the extension's priority. /// /// Higher priority extensions are called first when handling /// incoming stanzas. /// /// The default implementation returns 0. int QXmppServerExtension::extensionPriority() const { return 0; } /// Handles an incoming XMPP stanza. /// /// Return true if no further processing should occur, false otherwise. /// /// \param stanza The received stanza. bool QXmppServerExtension::handleStanza(const QDomElement &stanza) { Q_UNUSED(stanza); return false; } /// Returns the list of subscribers for the given JID. /// /// \param jid QSet QXmppServerExtension::presenceSubscribers(const QString &jid) { Q_UNUSED(jid); return QSet(); } /// Returns the list of subscriptions for the given JID. /// /// \param jid QSet QXmppServerExtension::presenceSubscriptions(const QString &jid) { Q_UNUSED(jid); return QSet(); } /// Starts the extension. /// /// Return true if the extension was started, false otherwise. bool QXmppServerExtension::start() { return true; } /// Stops the extension. void QXmppServerExtension::stop() { } /// Returns the server which loaded this extension. QXmppServer *QXmppServerExtension::server() const { return d->server; } /// Sets the server which loaded this extension. /// /// \param server void QXmppServerExtension::setServer(QXmppServer *server) { d->server = server; } qxmpp-0.7.6/src/server/QXmppServerPlugin.h0000644000175000007640000000336712116723562020510 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPSERVERPLUGIN_H #define QXMPPSERVERPLUGIN_H #include #include "QXmppGlobal.h" class QXmppServer; class QXmppServerExtension; class QXMPP_EXPORT QXmppServerPluginInterface { public: /// Creates the server extension identified by \a key. virtual QXmppServerExtension *create(const QString &key) = 0; /// Returns a list of valid extension keys. virtual QStringList keys() const = 0; }; Q_DECLARE_INTERFACE(QXmppServerPluginInterface, "com.googlecode.qxmpp.ServerPlugin/1.0") /// \brief The QXmppServerPlugin class is the base class for QXmppServer plugins. /// class QXMPP_EXPORT QXmppServerPlugin : public QObject, public QXmppServerPluginInterface { Q_OBJECT Q_INTERFACES(QXmppServerPluginInterface) public: /// Creates and returns the specified QXmppServerExtension. /// /// \param key The key for the QXmppServerExtension. virtual QXmppServerExtension *create(const QString &key) = 0; /// Returns the list of keys supported by this plugin. /// virtual QStringList keys() const = 0; }; #endif qxmpp-0.7.6/src/server/QXmppServer.cpp0000644000175000007640000006207112116723562017661 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include #include #include #include #include #include #include "QXmppConstants.h" #include "QXmppDialback.h" #include "QXmppIq.h" #include "QXmppIncomingClient.h" #include "QXmppIncomingServer.h" #include "QXmppOutgoingServer.h" #include "QXmppPresence.h" #include "QXmppServer.h" #include "QXmppServerExtension.h" #include "QXmppServerPlugin.h" #include "QXmppUtils.h" static void helperToXmlAddDomElement(QXmlStreamWriter* stream, const QDomElement& element, const QStringList &omitNamespaces) { stream->writeStartElement(element.tagName()); /* attributes */ QString xmlns = element.namespaceURI(); if (!xmlns.isEmpty() && !omitNamespaces.contains(xmlns)) stream->writeAttribute("xmlns", xmlns); QDomNamedNodeMap attrs = element.attributes(); for (int i = 0; i < attrs.size(); i++) { QDomAttr attr = attrs.item(i).toAttr(); stream->writeAttribute(attr.name(), attr.value()); } /* children */ QDomNode childNode = element.firstChild(); while (!childNode.isNull()) { if (childNode.isElement()) { helperToXmlAddDomElement(stream, childNode.toElement(), QStringList() << xmlns); } else if (childNode.isText()) { stream->writeCharacters(childNode.toText().data()); } childNode = childNode.nextSibling(); } stream->writeEndElement(); } class QXmppServerPrivate { public: QXmppServerPrivate(QXmppServer *qq); void loadExtensions(QXmppServer *server); bool routeData(const QString &to, const QByteArray &data); void startExtensions(); void stopExtensions(); void info(const QString &message); void warning(const QString &message); QString domain; QList extensions; QXmppLogger *logger; QXmppPasswordChecker *passwordChecker; // client-to-server QSet incomingClients; QHash incomingClientsByJid; QHash > incomingClientsByBareJid; QSet serversForClients; // server-to-server QSet incomingServers; QSet outgoingServers; QSet serversForServers; // ssl QList caCertificates; QSslCertificate localCertificate; QSslKey privateKey; private: bool loaded; bool started; QXmppServer *q; }; QXmppServerPrivate::QXmppServerPrivate(QXmppServer *qq) : logger(0), passwordChecker(0), loaded(false), started(false), q(qq) { } /// Routes XMPP data to the given recipient. /// /// \param to /// \param data /// bool QXmppServerPrivate::routeData(const QString &to, const QByteArray &data) { // refuse to route packets to empty destination, own domain or sub-domains const QString toDomain = QXmppUtils::jidToDomain(to); if (to.isEmpty() || to == domain || toDomain.endsWith("." + domain)) return false; if (toDomain == domain) { // look for a client connection QList found; if (QXmppUtils::jidToResource(to).isEmpty()) { foreach (QXmppIncomingClient *conn, incomingClientsByBareJid.value(to)) found << conn; } else { QXmppIncomingClient *conn = incomingClientsByJid.value(to); if (conn) found << conn; } // send data foreach (QXmppStream *conn, found) QMetaObject::invokeMethod(conn, "sendData", Q_ARG(QByteArray, data)); return !found.isEmpty(); } else if (!serversForServers.isEmpty()) { bool check; Q_UNUSED(check); // look for an outgoing S2S connection foreach (QXmppOutgoingServer *conn, outgoingServers) { if (conn->remoteDomain() == toDomain) { // send or queue data QMetaObject::invokeMethod(conn, "queueData", Q_ARG(QByteArray, data)); return true; } } // if we did not find an outgoing server, // we need to establish the S2S connection QXmppOutgoingServer *conn = new QXmppOutgoingServer(domain, 0); conn->setLocalStreamKey(QXmppUtils::generateStanzaHash().toLatin1()); conn->moveToThread(q->thread()); conn->setParent(q); check = QObject::connect(conn, SIGNAL(disconnected()), q, SLOT(_q_outgoingServerDisconnected())); Q_UNUSED(check); // add stream outgoingServers.insert(conn); q->setGauge("outgoing-server.count", outgoingServers.size()); // queue data and connect to remote server QMetaObject::invokeMethod(conn, "queueData", Q_ARG(QByteArray, data)); QMetaObject::invokeMethod(conn, "connectToHost", Q_ARG(QString, toDomain)); return true; } else { // S2S is disabled, failed to route data return false; } } /// Handles an incoming XML element. /// /// \param server /// \param stream /// \param element static void handleStanza(QXmppServer *server, const QDomElement &element) { // try extensions foreach (QXmppServerExtension *extension, server->extensions()) if (extension->handleStanza(element)) return; // default handlers const QString domain = server->domain(); const QString to = element.attribute("to"); if (to == domain) { if (element.tagName() == QLatin1String("iq")) { // we do not support the given IQ QXmppIq request; request.parse(element); if (request.type() != QXmppIq::Error && request.type() != QXmppIq::Result) { QXmppIq response(QXmppIq::Error); response.setId(request.id()); response.setFrom(domain); response.setTo(request.from()); QXmppStanza::Error error(QXmppStanza::Error::Cancel, QXmppStanza::Error::FeatureNotImplemented); response.setError(error); server->sendPacket(response); } } } else { // route element or reply on behalf of missing peer if (!server->sendElement(element) && element.tagName() == QLatin1String("iq")) { QXmppIq request; request.parse(element); QXmppIq response(QXmppIq::Error); response.setId(request.id()); response.setFrom(request.to()); response.setTo(request.from()); QXmppStanza::Error error(QXmppStanza::Error::Cancel, QXmppStanza::Error::ServiceUnavailable); response.setError(error); server->sendPacket(response); } } } void QXmppServerPrivate::info(const QString &message) { if (logger) logger->log(QXmppLogger::InformationMessage, message); } void QXmppServerPrivate::warning(const QString &message) { if (logger) logger->log(QXmppLogger::WarningMessage, message); } /// Load the server's extensions. /// /// \param server void QXmppServerPrivate::loadExtensions(QXmppServer *server) { if (!loaded) { QObjectList plugins = QPluginLoader::staticInstances(); foreach (QObject *object, plugins) { QXmppServerPlugin *plugin = qobject_cast(object); if (!plugin) continue; foreach (const QString &key, plugin->keys()) server->addExtension(plugin->create(key)); } loaded = true; } } /// Start the server's extensions. void QXmppServerPrivate::startExtensions() { if (!started) { foreach (QXmppServerExtension *extension, extensions) if (!extension->start()) warning(QString("Could not start extension %1").arg(extension->extensionName())); started = true; } } /// Stop the server's extensions (in reverse order). /// void QXmppServerPrivate::stopExtensions() { if (started) { for (int i = extensions.size() - 1; i >= 0; --i) extensions[i]->stop(); started = false; } } /// Constructs a new XMPP server instance. /// /// \param parent QXmppServer::QXmppServer(QObject *parent) : QXmppLoggable(parent) , d(new QXmppServerPrivate(this)) { qRegisterMetaType("QDomElement"); } /// Destroys an XMPP server instance. /// QXmppServer::~QXmppServer() { close(); delete d; } /// Registers a new extension with the server. /// /// \param extension void QXmppServer::addExtension(QXmppServerExtension *extension) { if (!extension || d->extensions.contains(extension)) return; d->info(QString("Added extension %1").arg(extension->extensionName())); extension->setParent(this); extension->setServer(this); // keep extensions sorted by priority for (int i = 0; i < d->extensions.size(); ++i) { QXmppServerExtension *other = d->extensions[i]; if (other->extensionPriority() < extension->extensionPriority()) { d->extensions.insert(i, extension); return; } } d->extensions << extension; } /// Returns the list of loaded extensions. /// QList QXmppServer::extensions() { d->loadExtensions(this); return d->extensions; } /// Returns the server's domain. /// QString QXmppServer::domain() const { return d->domain; } /// Sets the server's domain. /// /// \param domain void QXmppServer::setDomain(const QString &domain) { d->domain = domain; } /// Returns the QXmppLogger associated with the server. /// QXmppLogger *QXmppServer::logger() { return d->logger; } /// Sets the QXmppLogger associated with the server. /// /// \param logger void QXmppServer::setLogger(QXmppLogger *logger) { if (logger != d->logger) { if (d->logger) { disconnect(this, SIGNAL(logMessage(QXmppLogger::MessageType,QString)), d->logger, SLOT(log(QXmppLogger::MessageType,QString))); disconnect(this, SIGNAL(setGauge(QString,double)), d->logger, SLOT(setGauge(QString,double))); disconnect(this, SIGNAL(updateCounter(QString,qint64)), d->logger, SLOT(updateCounter(QString,qint64))); } d->logger = logger; if (d->logger) { connect(this, SIGNAL(logMessage(QXmppLogger::MessageType,QString)), d->logger, SLOT(log(QXmppLogger::MessageType,QString))); connect(this, SIGNAL(setGauge(QString,double)), d->logger, SLOT(setGauge(QString,double))); connect(this, SIGNAL(updateCounter(QString,qint64)), d->logger, SLOT(updateCounter(QString,qint64))); } emit loggerChanged(d->logger); } } /// Returns the password checker used to verify client credentials. /// QXmppPasswordChecker *QXmppServer::passwordChecker() { return d->passwordChecker; } /// Sets the password checker used to verify client credentials. /// /// \param checker /// void QXmppServer::setPasswordChecker(QXmppPasswordChecker *checker) { d->passwordChecker = checker; } /// Returns the statistics for the server. QVariantMap QXmppServer::statistics() const { QVariantMap stats; stats["version"] = qApp->applicationVersion(); stats["incoming-clients"] = d->incomingClients.size(); stats["incoming-servers"] = d->incomingServers.size(); stats["outgoing-servers"] = d->outgoingServers.size(); return stats; } /// Sets the path for additional SSL CA certificates. /// /// \param path void QXmppServer::addCaCertificates(const QString &path) { // load certificates if (path.isEmpty()) { d->caCertificates = QList(); } else if (QFileInfo(path).isReadable()) { d->caCertificates = QSslCertificate::fromPath(path); } else { d->warning(QString("SSL CA certificates are not readable %1").arg(path)); d->caCertificates = QList(); } // reconfigure servers foreach (QXmppSslServer *server, d->serversForClients + d->serversForServers) server->addCaCertificates(d->caCertificates); } /// Sets the path for the local SSL certificate. /// /// \param path void QXmppServer::setLocalCertificate(const QString &path) { // load certificate QSslCertificate certificate; QFile file(path); if (path.isEmpty()) { d->localCertificate = QSslCertificate(); } else if (file.open(QIODevice::ReadOnly | QIODevice::Text)) { d->localCertificate = QSslCertificate(file.readAll()); } else { d->warning(QString("SSL certificate is not readable %1").arg(path)); d->localCertificate = QSslCertificate(); } // reconfigure servers foreach (QXmppSslServer *server, d->serversForClients + d->serversForServers) server->setLocalCertificate(d->localCertificate); } /// Sets the path for the local SSL private key. /// /// \param path void QXmppServer::setPrivateKey(const QString &path) { // load key QSslKey key; QFile file(path); if (path.isEmpty()) { d->privateKey = QSslKey(); } else if (file.open(QIODevice::ReadOnly)) { d->privateKey = QSslKey(file.readAll(), QSsl::Rsa); } else { d->warning(QString("SSL key is not readable %1").arg(path)); d->privateKey = QSslKey(); } // reconfigure servers foreach (QXmppSslServer *server, d->serversForClients + d->serversForServers) server->setPrivateKey(d->privateKey); } /// Listen for incoming XMPP client connections. /// /// \param address /// \param port bool QXmppServer::listenForClients(const QHostAddress &address, quint16 port) { bool check; Q_UNUSED(check); if (d->domain.isEmpty()) { d->warning("No domain was specified!"); return false; } // create new server QXmppSslServer *server = new QXmppSslServer(this); server->addCaCertificates(d->caCertificates); server->setLocalCertificate(d->localCertificate); server->setPrivateKey(d->privateKey); check = connect(server, SIGNAL(newConnection(QSslSocket*)), this, SLOT(_q_clientConnection(QSslSocket*))); Q_ASSERT(check); if (!server->listen(address, port)) { d->warning(QString("Could not start listening for C2S on %1 %2").arg(address.toString(), QString::number(port))); delete server; return false; } d->serversForClients.insert(server); // start extensions d->loadExtensions(this); d->startExtensions(); return true; } /// Closes the server. /// void QXmppServer::close() { // prevent new connections foreach (QXmppSslServer *server, d->serversForClients + d->serversForServers) { server->close(); delete server; } d->serversForClients.clear(); d->serversForServers.clear(); // stop extensions d->stopExtensions(); // close XMPP streams foreach (QXmppIncomingClient *stream, d->incomingClients) stream->disconnectFromHost(); foreach (QXmppIncomingServer *stream, d->incomingServers) stream->disconnectFromHost(); foreach (QXmppOutgoingServer *stream, d->outgoingServers) stream->disconnectFromHost(); } /// Listen for incoming XMPP server connections. /// /// \param address /// \param port bool QXmppServer::listenForServers(const QHostAddress &address, quint16 port) { bool check; Q_UNUSED(check); if (d->domain.isEmpty()) { d->warning("No domain was specified!"); return false; } // create new server QXmppSslServer *server = new QXmppSslServer(this); server->addCaCertificates(d->caCertificates); server->setLocalCertificate(d->localCertificate); server->setPrivateKey(d->privateKey); check = connect(server, SIGNAL(newConnection(QSslSocket*)), this, SLOT(_q_serverConnection(QSslSocket*))); Q_ASSERT(check); if (!server->listen(address, port)) { d->warning(QString("Could not start listening for S2S on %1 %2").arg(address.toString(), QString::number(port))); delete server; return false; } d->serversForServers.insert(server); // start extensions d->loadExtensions(this); d->startExtensions(); return true; } /// Route an XMPP stanza. /// /// \param element bool QXmppServer::sendElement(const QDomElement &element) { // serialize data QByteArray data; QXmlStreamWriter xmlStream(&data); const QStringList omitNamespaces = QStringList() << ns_client << ns_server; helperToXmlAddDomElement(&xmlStream, element, omitNamespaces); // route data return d->routeData(element.attribute("to"), data); } /// Route an XMPP packet. /// /// \param packet bool QXmppServer::sendPacket(const QXmppStanza &packet) { // serialize data QByteArray data; QXmlStreamWriter xmlStream(&data); packet.toXml(&xmlStream); // route data return d->routeData(packet.to(), data); } /// Add a new incoming client \a stream. /// /// This method can be used for instance to implement BOSH support /// as a server extension. void QXmppServer::addIncomingClient(QXmppIncomingClient *stream) { bool check; Q_UNUSED(check); stream->setPasswordChecker(d->passwordChecker); check = connect(stream, SIGNAL(connected()), this, SLOT(_q_clientConnected())); Q_ASSERT(check); check = connect(stream, SIGNAL(disconnected()), this, SLOT(_q_clientDisconnected())); Q_ASSERT(check); check = connect(stream, SIGNAL(elementReceived(QDomElement)), this, SLOT(handleElement(QDomElement))); Q_ASSERT(check); // add stream d->incomingClients.insert(stream); setGauge("incoming-client.count", d->incomingClients.size()); } /// Handle a new incoming TCP connection from a client. /// /// \param socket void QXmppServer::_q_clientConnection(QSslSocket *socket) { // check the socket didn't die since the signal was emitted if (socket->state() != QAbstractSocket::ConnectedState) { delete socket; return; } QXmppIncomingClient *stream = new QXmppIncomingClient(socket, d->domain, this); stream->setInactivityTimeout(120); socket->setParent(stream); addIncomingClient(stream); } /// Handle a successful stream connection for a client. /// void QXmppServer::_q_clientConnected() { QXmppIncomingClient *client = qobject_cast(sender()); if (!client) return; // FIXME: at this point the JID must contain a resource, assert it? const QString jid = client->jid(); // check whether the connection conflicts with another one QXmppIncomingClient *old = d->incomingClientsByJid.value(jid); if (old && old != client) { old->sendData("Replaced by new connection"); old->disconnectFromHost(); } d->incomingClientsByJid.insert(jid, client); d->incomingClientsByBareJid[QXmppUtils::jidToBareJid(jid)].insert(client); // emit signal emit clientConnected(jid); } /// Handle a stream disconnection for a client. void QXmppServer::_q_clientDisconnected() { QXmppIncomingClient *client = qobject_cast(sender()); if (!client) return; if (d->incomingClients.remove(client)) { // remove stream from routing tables const QString jid = client->jid(); if (!jid.isEmpty()) { if (d->incomingClientsByJid.value(jid) == client) d->incomingClientsByJid.remove(jid); const QString bareJid = QXmppUtils::jidToBareJid(jid); if (d->incomingClientsByBareJid.contains(bareJid)) { d->incomingClientsByBareJid[bareJid].remove(client); if (d->incomingClientsByBareJid[bareJid].isEmpty()) d->incomingClientsByBareJid.remove(bareJid); } } // destroy client client->deleteLater(); // emit signal if (!jid.isEmpty()) emit clientDisconnected(jid); // update counter setGauge("incoming-client.count", d->incomingClients.size()); } } void QXmppServer::_q_dialbackRequestReceived(const QXmppDialback &dialback) { QXmppIncomingServer *stream = qobject_cast(sender()); if (!stream) return; if (dialback.command() == QXmppDialback::Verify) { // handle a verify request foreach (QXmppOutgoingServer *out, d->outgoingServers) { if (out->remoteDomain() != dialback.from()) continue; bool isValid = dialback.key() == out->localStreamKey(); QXmppDialback verify; verify.setCommand(QXmppDialback::Verify); verify.setId(dialback.id()); verify.setTo(dialback.from()); verify.setFrom(d->domain); verify.setType(isValid ? "valid" : "invalid"); stream->sendPacket(verify); return; } } } /// Handle an incoming XML element. void QXmppServer::handleElement(const QDomElement &element) { handleStanza(this, element); } /// Handle a stream disconnection for an outgoing server. void QXmppServer::_q_outgoingServerDisconnected() { QXmppOutgoingServer *outgoing = qobject_cast(sender()); if (!outgoing) return; if (d->outgoingServers.remove(outgoing)) { outgoing->deleteLater(); setGauge("outgoing-server.count", d->outgoingServers.size()); } } /// Handle a new incoming TCP connection from a server. /// /// \param socket void QXmppServer::_q_serverConnection(QSslSocket *socket) { bool check; Q_UNUSED(check); // check the socket didn't die since the signal was emitted if (socket->state() != QAbstractSocket::ConnectedState) { delete socket; return; } QXmppIncomingServer *stream = new QXmppIncomingServer(socket, d->domain, this); socket->setParent(stream); check = connect(stream, SIGNAL(disconnected()), this, SLOT(_q_serverDisconnected())); Q_ASSERT(check); check = connect(stream, SIGNAL(dialbackRequestReceived(QXmppDialback)), this, SLOT(_q_dialbackRequestReceived(QXmppDialback))); Q_ASSERT(check); check = connect(stream, SIGNAL(elementReceived(QDomElement)), this, SLOT(handleElement(QDomElement))); Q_ASSERT(check); // add stream d->incomingServers.insert(stream); setGauge("incoming-server.count", d->incomingServers.size()); } /// Handle a stream disconnection for an incoming server. void QXmppServer::_q_serverDisconnected() { QXmppIncomingServer *incoming = qobject_cast(sender()); if (!incoming) return; if (d->incomingServers.remove(incoming)) { incoming->deleteLater(); setGauge("incoming-server.count", d->incomingServers.size()); } } class QXmppSslServerPrivate { public: QList caCertificates; QSslCertificate localCertificate; QSslKey privateKey; }; /// Constructs a new SSL server instance. /// /// \param parent QXmppSslServer::QXmppSslServer(QObject *parent) : QTcpServer(parent), d(new QXmppSslServerPrivate) { } /// Destroys an SSL server instance. /// QXmppSslServer::~QXmppSslServer() { delete d; } void QXmppSslServer::incomingConnection(int socketDescriptor) { QSslSocket *socket = new QSslSocket; if (!socket->setSocketDescriptor(socketDescriptor)) { delete socket; return; } if (!d->localCertificate.isNull() && !d->privateKey.isNull()) { socket->setProtocol(QSsl::AnyProtocol); socket->addCaCertificates(d->caCertificates); socket->setLocalCertificate(d->localCertificate); socket->setPrivateKey(d->privateKey); } emit newConnection(socket); } /// Adds the given certificates to the CA certificate database to be used /// for incoming connnections. /// /// \param certificates void QXmppSslServer::addCaCertificates(const QList &certificates) { d->caCertificates += certificates; } /// Sets the local certificate to be used for incoming connections. /// /// \param certificate void QXmppSslServer::setLocalCertificate(const QSslCertificate &certificate) { d->localCertificate = certificate; } /// Sets the local private key to be used for incoming connections. /// /// \param key void QXmppSslServer::setPrivateKey(const QSslKey &key) { d->privateKey = key; } qxmpp-0.7.6/src/server/QXmppPasswordChecker.cpp0000644000175000007640000001161112116723562021474 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include #include #include "QXmppPasswordChecker.h" /// Returns the requested domain. QString QXmppPasswordRequest::domain() const { return m_domain; } /// Sets the requested \a domain. /// /// \param domain void QXmppPasswordRequest::setDomain(const QString &domain) { m_domain = domain; } /// Returns the given password. QString QXmppPasswordRequest::password() const { return m_password; } /// Sets the given \a password. void QXmppPasswordRequest::setPassword(const QString &password) { m_password = password; } /// Returns the requested username. QString QXmppPasswordRequest::username() const { return m_username; } /// Sets the requested \a username. /// /// \param username void QXmppPasswordRequest::setUsername(const QString &username) { m_username = username; } /// Constructs a new QXmppPasswordReply. /// /// \param parent QXmppPasswordReply::QXmppPasswordReply(QObject *parent) : QObject(parent), m_error(QXmppPasswordReply::NoError), m_isFinished(false) { } /// Returns the received MD5 digest. QByteArray QXmppPasswordReply::digest() const { return m_digest; } /// Sets the received MD5 digest. /// /// \param digest void QXmppPasswordReply::setDigest(const QByteArray &digest) { m_digest = digest; } /// Returns the error that was found during the processing of this request. /// /// If no error was found, returns NoError. QXmppPasswordReply::Error QXmppPasswordReply::error() const { return m_error; } /// Returns the error that was found during the processing of this request. /// void QXmppPasswordReply::setError(QXmppPasswordReply::Error error) { m_error = error; } /// Mark reply as finished. void QXmppPasswordReply::finish() { m_isFinished = true; emit finished(); } /// Delay marking reply as finished. void QXmppPasswordReply::finishLater() { QTimer::singleShot(0, this, SLOT(finish())); } /// Returns true when the reply has finished. bool QXmppPasswordReply::isFinished() const { return m_isFinished; } /// Returns the received password. QString QXmppPasswordReply::password() const { return m_password; } /// Sets the received password. /// /// \param password void QXmppPasswordReply::setPassword(const QString &password) { m_password = password; } /// Checks that the given credentials are valid. /// /// The base implementation requires that you reimplement getPassword(). /// /// \param request QXmppPasswordReply *QXmppPasswordChecker::checkPassword(const QXmppPasswordRequest &request) { QXmppPasswordReply *reply = new QXmppPasswordReply; QString secret; QXmppPasswordReply::Error error = getPassword(request, secret); if (error == QXmppPasswordReply::NoError) { if (request.password() != secret) reply->setError(QXmppPasswordReply::AuthorizationError); } else { reply->setError(error); } // reply is finished reply->finishLater(); return reply; } /// Retrieves the MD5 digest for the given username. /// /// Reimplement this method if your backend natively supports /// retrieving MD5 digests. /// /// \param request QXmppPasswordReply *QXmppPasswordChecker::getDigest(const QXmppPasswordRequest &request) { QXmppPasswordReply *reply = new QXmppPasswordReply; QString secret; QXmppPasswordReply::Error error = getPassword(request, secret); if (error == QXmppPasswordReply::NoError) { reply->setDigest(QCryptographicHash::hash( (request.username() + ":" + request.domain() + ":" + secret).toUtf8(), QCryptographicHash::Md5)); } else { reply->setError(error); } // reply is finished reply->finishLater(); return reply; } /// Retrieves the password for the given username. /// /// The simplest way to write a password checker is to reimplement this method. /// /// \param request /// \param password QXmppPasswordReply::Error QXmppPasswordChecker::getPassword(const QXmppPasswordRequest &request, QString &password) { Q_UNUSED(request); Q_UNUSED(password); return QXmppPasswordReply::TemporaryError; } /// Returns true if the getPassword() method is implemented. /// bool QXmppPasswordChecker::hasGetPassword() const { return false; } qxmpp-0.7.6/src/server/QXmppOutgoingServer.cpp0000644000175000007640000002217712116723562021400 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include #include #include #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) #include #else #include "qdnslookup.h" #endif #include "QXmppConstants.h" #include "QXmppDialback.h" #include "QXmppOutgoingServer.h" #include "QXmppStreamFeatures.h" #include "QXmppUtils.h" class QXmppOutgoingServerPrivate { public: QList dataQueue; QDnsLookup dns; QString localDomain; QString localStreamKey; QString remoteDomain; QString verifyId; QString verifyKey; QTimer *dialbackTimer; bool ready; }; /// Constructs a new outgoing server-to-server stream. /// /// \param domain the local domain /// \param parent the parent object /// QXmppOutgoingServer::QXmppOutgoingServer(const QString &domain, QObject *parent) : QXmppStream(parent), d(new QXmppOutgoingServerPrivate) { bool check; Q_UNUSED(check); // socket initialisation QSslSocket *socket = new QSslSocket(this); setSocket(socket); check = connect(socket, SIGNAL(disconnected()), this, SLOT(_q_socketDisconnected())); Q_ASSERT(check); check = connect(socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(socketError(QAbstractSocket::SocketError))); Q_ASSERT(check); // DNS lookups check = connect(&d->dns, SIGNAL(finished()), this, SLOT(_q_dnsLookupFinished())); Q_ASSERT(check); d->dialbackTimer = new QTimer(this); d->dialbackTimer->setInterval(5000); d->dialbackTimer->setSingleShot(true); check = connect(d->dialbackTimer, SIGNAL(timeout()), this, SLOT(sendDialback())); Q_ASSERT(check); d->localDomain = domain; d->ready = false; check = connect(socket, SIGNAL(sslErrors(QList)), this, SLOT(slotSslErrors(QList))); Q_ASSERT(check); } /// Destroys the stream. /// QXmppOutgoingServer::~QXmppOutgoingServer() { delete d; } /// Attempts to connect to an XMPP server for the specified \a domain. /// /// \param domain void QXmppOutgoingServer::connectToHost(const QString &domain) { d->remoteDomain = domain; // lookup server for domain debug(QString("Looking up server for domain %1").arg(domain)); d->dns.setName("_xmpp-server._tcp." + domain); d->dns.setType(QDnsLookup::SRV); d->dns.lookup(); } void QXmppOutgoingServer::_q_dnsLookupFinished() { QString host; quint16 port; if (d->dns.error() == QDnsLookup::NoError && !d->dns.serviceRecords().isEmpty()) { // take the first returned record host = d->dns.serviceRecords().first().target(); port = d->dns.serviceRecords().first().port(); } else { // as a fallback, use domain as the host name warning(QString("Lookup for domain %1 failed: %2") .arg(d->dns.name(), d->dns.errorString())); host = d->remoteDomain; port = 5269; } #if (QT_VERSION >= QT_VERSION_CHECK(4, 8, 0)) // set the name the SSL certificate should match socket()->setPeerVerifyName(d->remoteDomain); #endif // connect to server info(QString("Connecting to %1:%2").arg(host, QString::number(port))); socket()->connectToHost(host, port); } void QXmppOutgoingServer::_q_socketDisconnected() { debug("Socket disconnected"); emit disconnected(); } /// \cond void QXmppOutgoingServer::handleStart() { QXmppStream::handleStart(); QString data = QString("").arg( ns_server, ns_server_dialback, ns_stream); sendData(data.toUtf8()); } void QXmppOutgoingServer::handleStream(const QDomElement &streamElement) { Q_UNUSED(streamElement); // gmail.com servers are broken: they never send , // so we schedule sending the dialback in a couple of seconds d->dialbackTimer->start(); } void QXmppOutgoingServer::handleStanza(const QDomElement &stanza) { const QString ns = stanza.namespaceURI(); if(QXmppStreamFeatures::isStreamFeatures(stanza)) { QXmppStreamFeatures features; features.parse(stanza); if (!socket()->isEncrypted()) { // check we can satisfy TLS constraints if (!socket()->supportsSsl() && features.tlsMode() == QXmppStreamFeatures::Required) { warning("Disconnecting as TLS is required, but SSL support is not available"); disconnectFromHost(); return; } // enable TLS if possible if (socket()->supportsSsl() && features.tlsMode() != QXmppStreamFeatures::Disabled) { sendData(""); return; } } // send dialback if needed d->dialbackTimer->stop(); sendDialback(); } else if (ns == ns_tls) { if (stanza.tagName() == QLatin1String("proceed")) { debug("Starting encryption"); socket()->startClientEncryption(); return; } } else if (QXmppDialback::isDialback(stanza)) { QXmppDialback response; response.parse(stanza); // check the request is valid if (response.from().isEmpty() || response.to() != d->localDomain || response.type().isEmpty()) { warning("Invalid dialback response received"); return; } if (response.command() == QXmppDialback::Result) { if (response.type() == QLatin1String("valid")) { info(QString("Outgoing server stream to %1 is ready").arg(response.from())); d->ready = true; // send queued data foreach (const QByteArray &data, d->dataQueue) sendData(data); d->dataQueue.clear(); // emit signal emit connected(); } } else if (response.command() == QXmppDialback::Verify) { emit dialbackResponseReceived(response); } } } /// \endcond /// Returns true if the socket is connected and authentication succeeded. /// bool QXmppOutgoingServer::isConnected() const { return QXmppStream::isConnected() && d->ready; } /// Returns the stream's local dialback key. QString QXmppOutgoingServer::localStreamKey() const { return d->localStreamKey; } /// Sets the stream's local dialback key. /// /// \param key void QXmppOutgoingServer::setLocalStreamKey(const QString &key) { d->localStreamKey = key; } /// Sets the stream's verification information. /// /// \param id /// \param key void QXmppOutgoingServer::setVerify(const QString &id, const QString &key) { d->verifyId = id; d->verifyKey = key; } /// Sends or queues data until connected. /// /// \param data void QXmppOutgoingServer::queueData(const QByteArray &data) { if (isConnected()) sendData(data); else d->dataQueue.append(data); } /// Returns the remote server's domain. QString QXmppOutgoingServer::remoteDomain() const { return d->remoteDomain; } void QXmppOutgoingServer::sendDialback() { if (!d->localStreamKey.isEmpty()) { // send dialback key debug(QString("Sending dialback result to %1").arg(d->remoteDomain)); QXmppDialback dialback; dialback.setCommand(QXmppDialback::Result); dialback.setFrom(d->localDomain); dialback.setTo(d->remoteDomain); dialback.setKey(d->localStreamKey); sendPacket(dialback); } else if (!d->verifyId.isEmpty() && !d->verifyKey.isEmpty()) { // send dialback verify debug(QString("Sending dialback verify to %1").arg(d->remoteDomain)); QXmppDialback verify; verify.setCommand(QXmppDialback::Verify); verify.setId(d->verifyId); verify.setFrom(d->localDomain); verify.setTo(d->remoteDomain); verify.setKey(d->verifyKey); sendPacket(verify); } } void QXmppOutgoingServer::slotSslErrors(const QList &errors) { warning("SSL errors"); for(int i = 0; i < errors.count(); ++i) warning(errors.at(i).errorString()); socket()->ignoreSslErrors(); } void QXmppOutgoingServer::socketError(QAbstractSocket::SocketError error) { Q_UNUSED(error); emit disconnected(); } qxmpp-0.7.6/src/server/QXmppOutgoingServer.h0000644000175000007640000000420212116723562021032 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPOUTGOINGSERVER_H #define QXMPPOUTGOINGSERVER_H #include #include "QXmppStream.h" class QSslError; class QXmppDialback; class QXmppOutgoingServer; class QXmppOutgoingServerPrivate; /// \brief The QXmppOutgoingServer class represents an outgoing XMPP stream /// to another XMPP server. /// class QXMPP_EXPORT QXmppOutgoingServer : public QXmppStream { Q_OBJECT public: QXmppOutgoingServer(const QString &domain, QObject *parent); ~QXmppOutgoingServer(); bool isConnected() const; QString localStreamKey() const; void setLocalStreamKey(const QString &key); void setVerify(const QString &id, const QString &key); QString remoteDomain() const; signals: /// This signal is emitted when a dialback verify response is received. void dialbackResponseReceived(const QXmppDialback &response); protected: /// \cond void handleStart(); void handleStream(const QDomElement &streamElement); void handleStanza(const QDomElement &stanzaElement); /// \endcond public slots: void connectToHost(const QString &domain); void queueData(const QByteArray &data); private slots: void _q_dnsLookupFinished(); void _q_socketDisconnected(); void sendDialback(); void slotSslErrors(const QList &errors); void socketError(QAbstractSocket::SocketError error); private: Q_DISABLE_COPY(QXmppOutgoingServer) QXmppOutgoingServerPrivate* const d; }; #endif qxmpp-0.7.6/src/server/QXmppServer.h0000644000175000007640000001012312116723562017315 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPSERVER_H #define QXMPPSERVER_H #include #include #include "QXmppLogger.h" class QDomElement; class QSslCertificate; class QSslKey; class QSslSocket; class QXmppDialback; class QXmppIncomingClient; class QXmppOutgoingServer; class QXmppPasswordChecker; class QXmppPresence; class QXmppServerExtension; class QXmppServerPrivate; class QXmppSslServer; class QXmppStanza; class QXmppStream; /// \brief The QXmppServer class represents an XMPP server. /// /// It provides support for both client-to-server and server-to-server /// communications, SSL encryption and logging facilities. /// /// QXmppServer comes with a number of modules for service discovery, /// XMPP ping, statistics and file transfer proxy support. You can write /// your own extensions for QXmppServer by subclassing QXmppServerExtension. /// /// \ingroup Core class QXMPP_EXPORT QXmppServer : public QXmppLoggable { Q_OBJECT Q_PROPERTY(QXmppLogger* logger READ logger WRITE setLogger NOTIFY loggerChanged) public: QXmppServer(QObject *parent = 0); ~QXmppServer(); void addExtension(QXmppServerExtension *extension); QList extensions(); QString domain() const; void setDomain(const QString &domain); QXmppLogger *logger(); void setLogger(QXmppLogger *logger); QXmppPasswordChecker *passwordChecker(); void setPasswordChecker(QXmppPasswordChecker *checker); QVariantMap statistics() const; void addCaCertificates(const QString &caCertificates); void setLocalCertificate(const QString &path); void setPrivateKey(const QString &path); void close(); bool listenForClients(const QHostAddress &address = QHostAddress::Any, quint16 port = 5222); bool listenForServers(const QHostAddress &address = QHostAddress::Any, quint16 port = 5269); bool sendElement(const QDomElement &element); bool sendPacket(const QXmppStanza &stanza); void addIncomingClient(QXmppIncomingClient *stream); signals: /// This signal is emitted when a client has connected. void clientConnected(const QString &jid); /// This signal is emitted when a client has disconnected. void clientDisconnected(const QString &jid); /// This signal is emitted when the logger changes. void loggerChanged(QXmppLogger *logger); public slots: void handleElement(const QDomElement &element); private slots: void _q_clientConnection(QSslSocket *socket); void _q_clientConnected(); void _q_clientDisconnected(); void _q_dialbackRequestReceived(const QXmppDialback &dialback); void _q_outgoingServerDisconnected(); void _q_serverConnection(QSslSocket *socket); void _q_serverDisconnected(); private: friend class QXmppServerPrivate; QXmppServerPrivate *d; }; class QXmppSslServerPrivate; /// \brief The QXmppSslServer class represents an SSL-enabled TCP server. /// class QXMPP_EXPORT QXmppSslServer : public QTcpServer { Q_OBJECT public: QXmppSslServer(QObject *parent = 0); ~QXmppSslServer(); void addCaCertificates(const QList &certificates); void setLocalCertificate(const QSslCertificate &certificate); void setPrivateKey(const QSslKey &key); signals: /// This signal is emitted when a new connection is established. void newConnection(QSslSocket *socket); private: void incomingConnection(int socketDescriptor); QXmppSslServerPrivate * const d; }; #endif qxmpp-0.7.6/src/server/QXmppPasswordChecker.h0000644000175000007640000000526612116723562021152 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPPASSWORDCHECKER_H #define QXMPPPASSWORDCHECKER_H #include #include "QXmppGlobal.h" /// \brief The QXmppPasswordRequest class represents a password request. /// class QXMPP_EXPORT QXmppPasswordRequest { public: /// This enum is used to describe request types. enum Type { CheckPassword = 0, }; QString domain() const; void setDomain(const QString &domain); QString password() const; void setPassword(const QString &password); QString username() const; void setUsername(const QString &username); private: QString m_domain; QString m_password; QString m_username; }; /// \brief The QXmppPasswordReply class represents a password reply. /// class QXMPP_EXPORT QXmppPasswordReply : public QObject { Q_OBJECT public: /// This enum is used to describe authentication errors. enum Error { NoError = 0, AuthorizationError, TemporaryError, }; QXmppPasswordReply(QObject *parent = 0); QByteArray digest() const; void setDigest(const QByteArray &digest); QString password() const; void setPassword(const QString &password); QXmppPasswordReply::Error error() const; void setError(QXmppPasswordReply::Error error); bool isFinished() const; public slots: void finish(); void finishLater(); signals: /// This signal is emitted when the reply has finished. void finished(); private: QByteArray m_digest; QString m_password; QXmppPasswordReply::Error m_error; bool m_isFinished; }; /// \brief The QXmppPasswordChecker class represents an abstract password checker. /// class QXMPP_EXPORT QXmppPasswordChecker { public: virtual QXmppPasswordReply *checkPassword(const QXmppPasswordRequest &request); virtual QXmppPasswordReply *getDigest(const QXmppPasswordRequest &request); virtual bool hasGetPassword() const; protected: virtual QXmppPasswordReply::Error getPassword(const QXmppPasswordRequest &request, QString &password); }; #endif qxmpp-0.7.6/src/server/QXmppDialback.h0000644000175000007640000000342412116723562017547 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #ifndef QXMPPDIALBACK_H #define QXMPPDIALBACK_H #include "QXmppStanza.h" /// \brief The QXmppDialback class represents a stanza used for the Server /// Dialback protocol as specified by XEP-0220: Server Dialback. /// /// \ingroup Stanzas class QXMPP_EXPORT QXmppDialback : public QXmppStanza { public: /// This enum is used to describe a dialback command. enum Command { Result, ///< A dialback command between the originating server ///< and the receiving server. Verify, ///< A dialback command between the receiving server ///< and the authoritative server. }; QXmppDialback(); Command command() const; void setCommand(Command command); QString key() const; void setKey(const QString &key); QString type() const; void setType(const QString &type); /// \cond void parse(const QDomElement &element); void toXml(QXmlStreamWriter *writer) const; static bool isDialback(const QDomElement &element); /// \endcond private: Command m_command; QString m_key; QString m_type; }; #endif qxmpp-0.7.6/src/server/QXmppIncomingClient.cpp0000644000175000007640000003551012116723562021313 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include #include #include #include #include "QXmppBindIq.h" #include "QXmppConstants.h" #include "QXmppMessage.h" #include "QXmppPasswordChecker.h" #include "QXmppSasl_p.h" #include "QXmppSessionIq.h" #include "QXmppStreamFeatures.h" #include "QXmppUtils.h" #include "QXmppIncomingClient.h" class QXmppIncomingClientPrivate { public: QXmppIncomingClientPrivate(QXmppIncomingClient *qq); QTimer *idleTimer; QString domain; QString jid; QString resource; QXmppPasswordChecker *passwordChecker; QXmppSaslServer *saslServer; void checkCredentials(const QByteArray &response); QString origin() const; private: QXmppIncomingClient *q; }; QXmppIncomingClientPrivate::QXmppIncomingClientPrivate(QXmppIncomingClient *qq) : idleTimer(0) , passwordChecker(0) , saslServer(0) , q(qq) { } void QXmppIncomingClientPrivate::checkCredentials(const QByteArray &response) { QXmppPasswordRequest request; request.setDomain(domain); request.setUsername(saslServer->username()); if (saslServer->mechanism() == "PLAIN") { request.setPassword(saslServer->password()); QXmppPasswordReply *reply = passwordChecker->checkPassword(request); reply->setParent(q); reply->setProperty("__sasl_raw", response); QObject::connect(reply, SIGNAL(finished()), q, SLOT(onPasswordReply())); } else if (saslServer->mechanism() == "DIGEST-MD5") { QXmppPasswordReply *reply = passwordChecker->getDigest(request); reply->setParent(q); reply->setProperty("__sasl_raw", response); QObject::connect(reply, SIGNAL(finished()), q, SLOT(onDigestReply())); } } QString QXmppIncomingClientPrivate::origin() const { QSslSocket *socket = q->socket(); if (socket) return socket->peerAddress().toString() + " " + QString::number(socket->peerPort()); else return ""; } /// Constructs a new incoming client stream. /// /// \param socket The socket for the XMPP stream. /// \param domain The local domain. /// \param parent The parent QObject for the stream (optional). /// QXmppIncomingClient::QXmppIncomingClient(QSslSocket *socket, const QString &domain, QObject *parent) : QXmppStream(parent) { bool check; Q_UNUSED(check); d = new QXmppIncomingClientPrivate(this); d->domain = domain; if (socket) { check = connect(socket, SIGNAL(disconnected()), this, SLOT(onSocketDisconnected())); Q_ASSERT(check); setSocket(socket); } info(QString("Incoming client connection from %1").arg(d->origin())); // create inactivity timer d->idleTimer = new QTimer(this); d->idleTimer->setSingleShot(true); check = connect(d->idleTimer, SIGNAL(timeout()), this, SLOT(onTimeout())); Q_ASSERT(check); } /// Destroys the current stream. /// QXmppIncomingClient::~QXmppIncomingClient() { delete d; } /// Returns true if the socket is connected, the client is authenticated /// and a resource is bound. /// bool QXmppIncomingClient::isConnected() const { return QXmppStream::isConnected() && !d->jid.isEmpty() && !d->resource.isEmpty(); } /// Returns the client's JID. /// QString QXmppIncomingClient::jid() const { return d->jid; } /// Sets the number of seconds after which a client will be disconnected /// for inactivity. void QXmppIncomingClient::setInactivityTimeout(int secs) { d->idleTimer->stop(); d->idleTimer->setInterval(secs * 1000); if (d->idleTimer->interval()) d->idleTimer->start(); } /// Sets the password checker used to verify client credentials. /// /// \param checker /// void QXmppIncomingClient::setPasswordChecker(QXmppPasswordChecker *checker) { d->passwordChecker = checker; } /// \cond void QXmppIncomingClient::handleStream(const QDomElement &streamElement) { if (d->idleTimer->interval()) d->idleTimer->start(); if (d->saslServer != 0) { delete d->saslServer; d->saslServer = 0; } // start stream const QByteArray sessionId = QXmppUtils::generateStanzaHash().toLatin1(); QString response = QString("").arg( ns_client, ns_stream, sessionId, d->domain.toLatin1()); sendData(response.toUtf8()); // check requested domain if (streamElement.attribute("to") != d->domain) { QString response = QString("" "" "" "This server does not serve %1" "" "").arg(streamElement.attribute("to")); sendData(response.toUtf8()); disconnectFromHost(); return; } // send stream features QXmppStreamFeatures features; if (socket() && !socket()->isEncrypted() && !socket()->localCertificate().isNull() && !socket()->privateKey().isNull()) features.setTlsMode(QXmppStreamFeatures::Enabled); if (!d->jid.isEmpty()) { features.setBindMode(QXmppStreamFeatures::Required); features.setSessionMode(QXmppStreamFeatures::Enabled); } else if (d->passwordChecker) { QStringList mechanisms; mechanisms << "PLAIN"; if (d->passwordChecker->hasGetPassword()) mechanisms << "DIGEST-MD5"; features.setAuthMechanisms(mechanisms); } sendPacket(features); } void QXmppIncomingClient::handleStanza(const QDomElement &nodeRecv) { const QString ns = nodeRecv.namespaceURI(); if (d->idleTimer->interval()) d->idleTimer->start(); if (ns == ns_tls && nodeRecv.tagName() == QLatin1String("starttls")) { sendData(""); socket()->flush(); socket()->startServerEncryption(); return; } else if (ns == ns_sasl) { if (!d->passwordChecker) { warning("Cannot perform authentication, no password checker"); sendPacket(QXmppSaslFailure("temporary-auth-failure")); disconnectFromHost(); return; } if (nodeRecv.tagName() == QLatin1String("auth")) { QXmppSaslAuth auth; auth.parse(nodeRecv); d->saslServer = QXmppSaslServer::create(auth.mechanism(), this); if (!d->saslServer) { sendPacket(QXmppSaslFailure("invalid-mechanism")); disconnectFromHost(); return; } d->saslServer->setRealm(d->domain.toUtf8()); QByteArray challenge; QXmppSaslServer::Response result = d->saslServer->respond(auth.value(), challenge); if (result == QXmppSaslServer::InputNeeded) { // check credentials d->checkCredentials(auth.value()); } else if (result == QXmppSaslServer::Challenge) { sendPacket(QXmppSaslChallenge(challenge)); } else { // FIXME: what condition? sendPacket(QXmppSaslFailure()); disconnectFromHost(); return; } } else if (nodeRecv.tagName() == QLatin1String("response")) { QXmppSaslResponse response; response.parse(nodeRecv); if (!d->saslServer) { warning("SASL response received, but no mechanism selected"); sendPacket(QXmppSaslFailure()); disconnectFromHost(); return; } QByteArray challenge; QXmppSaslServer::Response result = d->saslServer->respond(response.value(), challenge); if (result == QXmppSaslServer::InputNeeded) { // check credentials d->checkCredentials(response.value()); } else if (result == QXmppSaslServer::Succeeded) { // authentication succeeded d->jid = QString("%1@%2").arg(d->saslServer->username(), d->domain); info(QString("Authentication succeeded for '%1' from %2").arg(d->jid, d->origin())); updateCounter("incoming-client.auth.success"); sendPacket(QXmppSaslSuccess()); handleStart(); } else { // FIXME: what condition? sendPacket(QXmppSaslFailure()); disconnectFromHost(); } } } else if (ns == ns_client) { if (nodeRecv.tagName() == QLatin1String("iq")) { const QString type = nodeRecv.attribute("type"); if (QXmppBindIq::isBindIq(nodeRecv) && type == QLatin1String("set")) { QXmppBindIq bindSet; bindSet.parse(nodeRecv); d->resource = bindSet.resource().trimmed(); if (d->resource.isEmpty()) d->resource = QXmppUtils::generateStanzaHash(); d->jid = QString("%1/%2").arg(QXmppUtils::jidToBareJid(d->jid), d->resource); QXmppBindIq bindResult; bindResult.setType(QXmppIq::Result); bindResult.setId(bindSet.id()); bindResult.setJid(d->jid); sendPacket(bindResult); // bound emit connected(); return; } else if (QXmppSessionIq::isSessionIq(nodeRecv) && type == QLatin1String("set")) { QXmppSessionIq sessionSet; sessionSet.parse(nodeRecv); QXmppIq sessionResult; sessionResult.setType(QXmppIq::Result); sessionResult.setId(sessionSet.id()); sessionResult.setTo(d->jid); sendPacket(sessionResult); return; } } // check the sender is legitimate const QString from = nodeRecv.attribute("from"); if (!from.isEmpty() && from != d->jid && from != QXmppUtils::jidToBareJid(d->jid)) { warning(QString("Received a stanza from unexpected JID %1").arg(from)); return; } // process unhandled stanzas if (nodeRecv.tagName() == QLatin1String("iq") || nodeRecv.tagName() == QLatin1String("message") || nodeRecv.tagName() == QLatin1String("presence")) { QDomElement nodeFull(nodeRecv); // if the sender is empty, set it to the appropriate JID if (nodeFull.attribute("from").isEmpty()) { if (nodeFull.tagName() == QLatin1String("presence") && (nodeFull.attribute("type") == QLatin1String("subscribe") || nodeFull.attribute("type") == QLatin1String("subscribed"))) nodeFull.setAttribute("from", QXmppUtils::jidToBareJid(d->jid)); else nodeFull.setAttribute("from", d->jid); } // if the recipient is empty, set it to the local domain if (nodeFull.attribute("to").isEmpty()) nodeFull.setAttribute("to", d->domain); // emit stanza for processing by server emit elementReceived(nodeFull); } } } /// \endcond void QXmppIncomingClient::onDigestReply() { QXmppPasswordReply *reply = qobject_cast(sender()); if (!reply) return; reply->deleteLater(); if (reply->error() == QXmppPasswordReply::TemporaryError) { warning(QString("Temporary authentication failure for '%1' from %2").arg(d->saslServer->username(), d->origin())); updateCounter("incoming-client.auth.temporary-auth-failure"); sendPacket(QXmppSaslFailure("temporary-auth-failure")); disconnectFromHost(); return; } QByteArray challenge; d->saslServer->setPasswordDigest(reply->digest()); QXmppSaslServer::Response result = d->saslServer->respond(reply->property("__sasl_raw").toByteArray(), challenge); if (result != QXmppSaslServer::Challenge) { warning(QString("Authentication failed for '%1' from %2").arg(d->saslServer->username(), d->origin())); updateCounter("incoming-client.auth.not-authorized"); sendPacket(QXmppSaslFailure("not-authorized")); disconnectFromHost(); return; } // send new challenge sendPacket(QXmppSaslChallenge(challenge)); } void QXmppIncomingClient::onPasswordReply() { QXmppPasswordReply *reply = qobject_cast(sender()); if (!reply) return; reply->deleteLater(); const QString jid = QString("%1@%2").arg(d->saslServer->username(), d->domain); switch (reply->error()) { case QXmppPasswordReply::NoError: d->jid = jid; info(QString("Authentication succeeded for '%1' from %2").arg(d->jid, d->origin())); updateCounter("incoming-client.auth.success"); sendPacket(QXmppSaslSuccess()); handleStart(); break; case QXmppPasswordReply::AuthorizationError: warning(QString("Authentication failed for '%1' from %2").arg(jid, d->origin())); updateCounter("incoming-client.auth.not-authorized"); sendPacket(QXmppSaslFailure("not-authorized")); disconnectFromHost(); break; case QXmppPasswordReply::TemporaryError: warning(QString("Temporary authentication failure for '%1' from %2").arg(jid, d->origin())); updateCounter("incoming-client.auth.temporary-auth-failure"); sendPacket(QXmppSaslFailure("temporary-auth-failure")); disconnectFromHost(); break; } } void QXmppIncomingClient::onSocketDisconnected() { info(QString("Socket disconnected for '%1' from %2").arg(d->jid, d->origin())); emit disconnected(); } void QXmppIncomingClient::onTimeout() { warning(QString("Idle timeout for '%1' from %2").arg(d->jid, d->origin())); disconnectFromHost(); // make sure disconnected() gets emitted no matter what QTimer::singleShot(30, this, SIGNAL(disconnected())); } qxmpp-0.7.6/LICENSE.LGPL0000644000175000007640000006350412116723562014370 0ustar sharkyjerryweb GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! qxmpp-0.7.6/doc/0000755000175000007640000000000012116723632013361 5ustar sharkyjerrywebqxmpp-0.7.6/doc/doc.pro0000644000175000007640000000061712116723562014656 0ustar sharkyjerrywebinclude(../qxmpp.pri) TEMPLATE = app CONFIG += console CONFIG -= app_bundle QT -= gui INCLUDEPATH += $$QXMPP_INCLUDEPATH TARGET = doxyfilter SOURCES += doxyfilter.cpp windows { DOXYFILTER = $${TARGET}.exe } else { DOXYFILTER = ./$${TARGET} } # Build rules docs.commands = $${DOXYFILTER} -g && $${DOXYFILTER} docs.depends = $${TARGET} QMAKE_CLEAN += Doxyfile QMAKE_EXTRA_TARGETS += docs qxmpp-0.7.6/doc/doxyfilter.cpp0000644000175000007640000000766712116723562016300 0ustar sharkyjerryweb/* * Copyright (C) 2008-2011 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include #include #include #include #include #include #include "QXmppGlobal.h" static void setField(QString &code, const QString &name, const QString &value) { code.replace( QRegExp(QString("(%1\\s*=)[^\\r\\n]*").arg(name)), QString("\\1 %1").arg(value)); } static void usage() { QTextStream output(stderr); output << "Usage:" << endl; output << " doxyfilter Generate documentation" << endl; output << " doxyfilter -g Generate Doxyfile" << endl; output << " doxyfilter Filter the given file's code" << endl; } int main(int argc, char *argv[]) { QCoreApplication app(argc, argv); if (argc == 1) return QProcess::execute("doxygen"); else if (argc != 2) { usage(); return 1; } if (!strcmp(argv[1], "-g")) { // generate default Doxyfile QProcess process; process.start("doxygen", QStringList() << "-g" << "-"); if (!process.waitForFinished()) { qWarning("Could not run doxygen"); return 1; } QString code = QString::fromUtf8(process.readAll()); // adjust Doxyfile setField(code, "ALPHABETICAL_INDEX", "NO"); setField(code, "EXCLUDE_PATTERNS", "*/moc_* */mod_* */qdnslookup* */*_p.h */QXmppCodec.cpp */QXmppSasl.cpp"); setField(code, "FULL_PATH_NAMES", "NO"); setField(code, "HIDE_UNDOC_CLASSES", "YES"); setField(code, "GENERATE_LATEX", "NO"); setField(code, "HTML_TIMESTAMP", "NO"); setField(code, "INPUT", "../src"); setField(code, "INPUT_FILTER", QString::fromLocal8Bit(argv[0])); setField(code, "PROJECT_NAME", "QXmpp"); setField(code, "PROJECT_NUMBER", QString("Version: %1.%2.%3").arg( QString::number((QXMPP_VERSION >> 16) & 0xff), QString::number((QXMPP_VERSION >> 8) & 0xff), QString::number(QXMPP_VERSION & 0xff))); setField(code, "QUIET", "YES"); setField(code, "RECURSIVE", "YES"); // write doxyfile QFile output("Doxyfile"); if (!output.open(QIODevice::WriteOnly)) { qWarning("Could not write to %s", qPrintable(output.fileName())); return 1; } output.write(code.toUtf8()); output.close(); } else if (!strcmp(argv[1], "-h")) { usage(); return 0; } else { // read source code QFile source(QString::fromLocal8Bit(argv[1])); if (!source.open(QIODevice::ReadOnly)) { qWarning("Could not open %s", qPrintable(source.fileName())); return 1; } QString code = QString::fromUtf8(source.readAll()); source.close(); // add links for RFCs QRegExp rfcRegexp("(RFC ([0-9]{4})(: [^\\s.]+( [A-Z][^\\s.]*)*)?)"); code.replace(rfcRegexp, "\\1"); // add links for XEPs QRegExp regexp("(XEP-([0-9]{4})(: [^\\s.]+( [A-Z][^\\s.]*)*)?)"); code.replace(regexp, "\\1"); QTextStream output(stdout); output << code; } return 0; } qxmpp-0.7.6/doc/html/0000755000175000007640000000000012116723632014325 5ustar sharkyjerrywebqxmpp-0.7.6/doc/html/group__Stanzas.html0000644000175000007640000004125712116723632020222 0ustar sharkyjerryweb QXmpp: Stanzas
QXmpp  Version:0.7.6
Stanzas

Classes

class  QXmppArchiveChatIq
 Represents an archive chat as defined by XEP-0136: Message Archiving. More...
class  QXmppArchiveListIq
 Represents an archive list as defined by XEP-0136: Message Archiving. More...
class  QXmppArchiveRemoveIq
 Represents an archive remove IQ as defined by XEP-0136: Message Archiving. More...
class  QXmppArchiveRetrieveIq
 Represents an archive retrieve IQ as defined by XEP-0136: Message Archiving. More...
class  QXmppArchivePrefIq
 Represents an archive preference IQ as defined by XEP-0136: Message Archiving. More...
class  QXmppBindIq
 The QXmppBindIq class represents an IQ used for resource binding as defined by RFC 3921. More...
class  QXmppIq
 The QXmppIq class is the base class for all IQs. More...
class  QXmppJingleIq
 The QXmppJingleIq class represents an IQ used for initiating media sessions as specified by XEP-0166: Jingle. More...
class  QXmppMessage
 The QXmppMessage class represents an XMPP message. More...
class  QXmppMucItem
 The QXmppMucItem class represents a chat room "item". More...
class  QXmppMucAdminIq
 The QXmppMucAdminIq class represents a chat room administration IQ as defined by XEP-0045: Multi-User Chat. More...
class  QXmppPresence
 The QXmppPresence class represents an XMPP presence stanza. More...
class  QXmppPubSubIq
 The QXmppPubSubIq class represents an IQ used for the publish-subscribe mechanisms defined by XEP-0060: Publish-Subscribe. More...
class  QXmppRegisterIq
 The QXmppRegisterIq class represents a registration IQ as defined by XEP-0077: In-Band Registration. More...
class  QXmppRosterIq
 The QXmppRosterIq class represents a roster IQ. More...
class  QXmppRpcResponseIq
 The QXmppRpcResponseIq class represents an IQ used to carry an RPC response as specified by XEP-0009: Jabber-RPC. More...
class  QXmppRpcInvokeIq
 The QXmppRpcInvokeIq class represents an IQ used to carry an RPC invocation as specified by XEP-0009: Jabber-RPC. More...
class  QXmppSessionIq
 The QXmppSessionIq class represents an IQ used for session establishment as defined by RFC 3921. More...
class  QXmppStanza
 The QXmppStanza class is the base class for all XMPP stanzas. More...
class  QXmppVersionIq
 The QXmppVersionIq class represents an IQ for conveying a software version as defined by XEP-0092: Software Version. More...
class  QXmppDialback
 The QXmppDialback class represents a stanza used for the Server Dialback protocol as specified by XEP-0220: Server Dialback. More...

Detailed Description

qxmpp-0.7.6/doc/html/ftv2mlastnode.png0000644000175000007640000000036612116723632017630 0ustar sharkyjerrywebPNG  IHDRɪ|IDATx!NA\ Um@`5i`h W7] b&ofdY4 c 3v=]\B I=BB;k WN@vy4]Y|M}]x6a }dׇY>||5?>|B"'IENDB`qxmpp-0.7.6/doc/html/QXmppPasswordChecker_8h_source.html0000644000175000007640000005021212116723632023247 0ustar sharkyjerryweb QXmpp: QXmppPasswordChecker.h Source File
QXmpp  Version:0.7.6
QXmppPasswordChecker.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Jeremy Lainé
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXMPPPASSWORDCHECKER_H
25 #define QXMPPPASSWORDCHECKER_H
26 
27 #include <QObject>
28 
29 #include "QXmppGlobal.h"
30 
33 class QXMPP_EXPORT QXmppPasswordRequest
34 {
35 public:
37  enum Type {
38  CheckPassword = 0,
39  };
40 
41  QString domain() const;
42  void setDomain(const QString &domain);
43 
44  QString password() const;
45  void setPassword(const QString &password);
46 
47  QString username() const;
48  void setUsername(const QString &username);
49 
50 private:
51  QString m_domain;
52  QString m_password;
53  QString m_username;
54 };
55 
58 class QXMPP_EXPORT QXmppPasswordReply : public QObject
59 {
60  Q_OBJECT
61 
62 public:
64  enum Error {
65  NoError = 0,
66  AuthorizationError,
67  TemporaryError,
68  };
69 
70  QXmppPasswordReply(QObject *parent = 0);
71 
72  QByteArray digest() const;
73  void setDigest(const QByteArray &digest);
74 
75  QString password() const;
76  void setPassword(const QString &password);
77 
78  QXmppPasswordReply::Error error() const;
79  void setError(QXmppPasswordReply::Error error);
80 
81  bool isFinished() const;
82 
83 public slots:
84  void finish();
85  void finishLater();
86 
87 signals:
89  void finished();
90 
91 private:
92  QByteArray m_digest;
93  QString m_password;
95  bool m_isFinished;
96 };
97 
100 
101 class QXMPP_EXPORT QXmppPasswordChecker
102 {
103 public:
104  virtual QXmppPasswordReply *checkPassword(const QXmppPasswordRequest &request);
105  virtual QXmppPasswordReply *getDigest(const QXmppPasswordRequest &request);
106  virtual bool hasGetPassword() const;
107 
108 protected:
109  virtual QXmppPasswordReply::Error getPassword(const QXmppPasswordRequest &request, QString &password);
110 };
111 
112 #endif
qxmpp-0.7.6/doc/html/QXmppNonSASLAuth_8h_source.html0000644000175000007640000003160612116723632022225 0ustar sharkyjerryweb QXmpp: QXmppNonSASLAuth.h Source File
QXmpp  Version:0.7.6
QXmppNonSASLAuth.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Manjeet Dahiya
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXmppNonSASLAuth_H
25 #define QXmppNonSASLAuth_H
26 
27 #include "QXmppIq.h"
28 
29 class QXMPP_EXPORT QXmppNonSASLAuthIq : public QXmppIq
30 {
31 public:
32  QXmppNonSASLAuthIq();
33 
34  QString username() const;
35  void setUsername(const QString &username);
36 
37  QByteArray digest() const;
38  void setDigest(const QString &streamId, const QString &password);
39 
40  QString password() const;
41  void setPassword(const QString &password);
42 
43  QString resource() const;
44  void setResource(const QString &resource);
45 
46  static bool isNonSASLAuthIq(const QDomElement &element);
47 
48 protected:
50  void parseElementFromChild(const QDomElement &element);
51  void toXmlElementFromChild(QXmlStreamWriter *writer) const;
53 
54 private:
55  QString m_username;
56  QByteArray m_digest;
57  QString m_password;
58  QString m_resource;
59 };
60 
61 #endif // QXmppNonSASLAuth_H
qxmpp-0.7.6/doc/html/nav_f.png0000644000175000007640000000023112116723632016120 0ustar sharkyjerrywebPNG  IHDR8`IDATxK Eі[BmkHprӼ.ꎤR6Z VIE5jliIJ0/u޿6sH yIENDB`qxmpp-0.7.6/doc/html/ftv2plastnode.png0000644000175000007640000000034512116723632017630 0ustar sharkyjerrywebPNG  IHDRɪ|IDATx=QFDk:FPK؃=V@ճ 8SHx0bnrr{򽿾$ TP XOd6"SOB(Q)+YĈ ҪR>Vtsm9(k-@ȧ-$ b [he Kp-l|CApRG'rͭaIENDB`qxmpp-0.7.6/doc/html/classQXmppSslServer-members.html0000644000175000007640000001503712116723632022615 0ustar sharkyjerryweb QXmpp: Member List
QXmppSslServer Member List

This is the complete list of members for QXmppSslServer, including all inherited members.

addCaCertificates(const QList< QSslCertificate > &certificates)QXmppSslServer
newConnection(QSslSocket *socket)QXmppSslServersignal
QXmppSslServer(QObject *parent=0)QXmppSslServer
setLocalCertificate(const QSslCertificate &certificate)QXmppSslServer
setPrivateKey(const QSslKey &key)QXmppSslServer
~QXmppSslServer()QXmppSslServer
qxmpp-0.7.6/doc/html/QXmppStanza_8h_source.html0000644000175000007640000007645112116723632021435 0ustar sharkyjerryweb QXmpp: QXmppStanza.h Source File
QXmpp  Version:0.7.6
QXmppStanza.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Authors:
5  * Manjeet Dahiya
6  * Jeremy Lainé
7  * Georg Rudoy
8  *
9  * Source:
10  * http://code.google.com/p/qxmpp
11  *
12  * This file is a part of QXmpp library.
13  *
14  * This library is free software; you can redistribute it and/or
15  * modify it under the terms of the GNU Lesser General Public
16  * License as published by the Free Software Foundation; either
17  * version 2.1 of the License, or (at your option) any later version.
18  *
19  * This library is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22  * Lesser General Public License for more details.
23  *
24  */
25 
26 
27 #ifndef QXMPPSTANZA_H
28 #define QXMPPSTANZA_H
29 
30 #include <QByteArray>
31 #include <QString>
32 #include <QSharedData>
33 
34 // forward declarations of QXmlStream* classes will not work on Mac, we need to
35 // include the whole header.
36 // See http://lists.trolltech.com/qt-interest/2008-07/thread00798-0.html
37 // for an explanation.
38 #include <QXmlStreamWriter>
39 
40 #include "QXmppElement.h"
41 
42 class QXmppExtendedAddressPrivate;
43 
49 
50 class QXMPP_EXPORT QXmppExtendedAddress
51 {
52 public:
56 
57  QXmppExtendedAddress& operator=(const QXmppExtendedAddress&);
58 
59  QString description() const;
60  void setDescription(const QString &description);
61 
62  QString jid() const;
63  void setJid(const QString &jid);
64 
65  QString type() const;
66  void setType(const QString &type);
67 
68  bool isDelivered() const;
69  void setDelivered(bool);
70 
71  bool isValid() const;
72 
74  void parse(const QDomElement &element);
75  void toXml(QXmlStreamWriter *writer) const;
77 
78 private:
79  QSharedDataPointer<QXmppExtendedAddressPrivate> d;
80 };
81 
82 class QXmppStanzaPrivate;
83 
85 
89 
90 class QXMPP_EXPORT QXmppStanza
91 {
92 public:
93  class QXMPP_EXPORT Error
94  {
95  public:
96  enum Type
97  {
98  Cancel,
99  Continue,
100  Modify,
101  Auth,
102  Wait
103  };
104 
105  enum Condition
106  {
107  BadRequest,
108  Conflict,
109  FeatureNotImplemented,
110  Forbidden,
111  Gone,
112  InternalServerError,
113  ItemNotFound,
114  JidMalformed,
115  NotAcceptable,
116  NotAllowed,
117  NotAuthorized,
118  PaymentRequired,
119  RecipientUnavailable,
120  Redirect,
121  RegistrationRequired,
122  RemoteServerNotFound,
123  RemoteServerTimeout,
124  ResourceConstraint,
125  ServiceUnavailable,
126  SubscriptionRequired,
127  UndefinedCondition,
128  UnexpectedRequest
129  };
130 
131  Error();
132  Error(Type type, Condition cond, const QString& text="");
133  Error(const QString& type, const QString& cond, const QString& text="");
134 
135  int code() const;
136  void setCode(int code);
137 
138  QString text() const;
139  void setText(const QString& text);
140 
141  Condition condition() const;
142  void setCondition(Condition cond);
143 
144  void setType(Type type);
145  Type type() const;
146 
148  void parse(const QDomElement &element);
149  void toXml(QXmlStreamWriter *writer) const;
151 
152  private:
153  QString getConditionStr() const;
154  void setConditionFromStr(const QString& cond);
155 
156  QString getTypeStr() const;
157  void setTypeFromStr(const QString& type);
158 
159  int m_code;
160  Type m_type;
161  Condition m_condition;
162  QString m_text;
163  };
164 
165  QXmppStanza(const QString& from = QString(), const QString& to = QString());
166  QXmppStanza(const QXmppStanza &other);
167  virtual ~QXmppStanza();
168 
169  QXmppStanza& operator=(const QXmppStanza &other);
170 
171  QString to() const;
172  void setTo(const QString&);
173 
174  QString from() const;
175  void setFrom(const QString&);
176 
177  QString id() const;
178  void setId(const QString&);
179 
180  QString lang() const;
181  void setLang(const QString&);
182 
183  QXmppStanza::Error error() const;
184  void setError(const QXmppStanza::Error& error);
185 
186  QXmppElementList extensions() const;
187  void setExtensions(const QXmppElementList &elements);
188 
189  QList<QXmppExtendedAddress> extendedAddresses() const;
190  void setExtendedAddresses(const QList<QXmppExtendedAddress> &extendedAddresses);
191 
193  virtual void parse(const QDomElement &element);
194  virtual void toXml(QXmlStreamWriter *writer) const = 0;
195 
196 protected:
197  void extensionsToXml(QXmlStreamWriter *writer) const;
198  void generateAndSetNextId();
200 
201 private:
202  QSharedDataPointer<QXmppStanzaPrivate> d;
203  static uint s_uniqeIdNo;
204 };
205 
206 #endif // QXMPPSTANZA_H
qxmpp-0.7.6/doc/html/modules.html0000644000175000007640000001214312116723632016664 0ustar sharkyjerryweb QXmpp: Modules
QXmpp  Version:0.7.6
Modules
Here is a list of all modules:
qxmpp-0.7.6/doc/html/classQXmppServerExtension-members.html0000644000175000007640000002734012116723632024030 0ustar sharkyjerryweb QXmpp: Member List
QXmppServerExtension Member List

This is the complete list of members for QXmppServerExtension, including all inherited members.

debug(const QString &message)QXmppLoggableinlineprotected
discoveryFeatures() const QXmppServerExtensionvirtual
discoveryItems() const QXmppServerExtensionvirtual
extensionName() const QXmppServerExtensionvirtual
extensionPriority() const QXmppServerExtensionvirtual
handleStanza(const QDomElement &stanza)QXmppServerExtensionvirtual
info(const QString &message)QXmppLoggableinlineprotected
logMessage(QXmppLogger::MessageType type, const QString &msg)QXmppLoggablesignal
logReceived(const QString &message)QXmppLoggableinlineprotected
logSent(const QString &message)QXmppLoggableinlineprotected
presenceSubscribers(const QString &jid)QXmppServerExtensionvirtual
presenceSubscriptions(const QString &jid)QXmppServerExtensionvirtual
QXmppLoggable(QObject *parent=0)QXmppLoggable
QXmppServer (defined in QXmppServerExtension)QXmppServerExtensionfriend
QXmppServerExtension() (defined in QXmppServerExtension)QXmppServerExtension
server() const QXmppServerExtensionprotected
setGauge(const QString &gauge, double value)QXmppLoggablesignal
start()QXmppServerExtensionvirtual
stop()QXmppServerExtensionvirtual
updateCounter(const QString &counter, qint64 amount=1)QXmppLoggablesignal
warning(const QString &message)QXmppLoggableinlineprotected
~QXmppServerExtension() (defined in QXmppServerExtension)QXmppServerExtension
qxmpp-0.7.6/doc/html/QXmppLogger_8h_source.html0000644000175000007640000007077112116723632021413 0ustar sharkyjerryweb QXmpp: QXmppLogger.h Source File
QXmpp  Version:0.7.6
QXmppLogger.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Manjeet Dahiya
6  * Jeremy Lainé
7  *
8  * Source:
9  * http://code.google.com/p/qxmpp
10  *
11  * This file is a part of QXmpp library.
12  *
13  * This library is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU Lesser General Public
15  * License as published by the Free Software Foundation; either
16  * version 2.1 of the License, or (at your option) any later version.
17  *
18  * This library is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21  * Lesser General Public License for more details.
22  *
23  */
24 
25 
26 #ifndef QXMPPLOGGER_H
27 #define QXMPPLOGGER_H
28 
29 #include <QObject>
30 
31 #include "QXmppGlobal.h"
32 
33 #ifdef QXMPP_LOGGABLE_TRACE
34 #define qxmpp_loggable_trace(x) QString("%1(0x%2) %3").arg(metaObject()->className(), QString::number(reinterpret_cast<qint64>(this), 16), x)
35 #else
36 #define qxmpp_loggable_trace(x) (x)
37 #endif
38 
39 class QXmppLoggerPrivate;
40 
44 
45 class QXMPP_EXPORT QXmppLogger : public QObject
46 {
47  Q_OBJECT
48  Q_ENUMS(LoggingType)
49  Q_FLAGS(MessageType MessageTypes)
50  Q_PROPERTY(QString logFilePath READ logFilePath WRITE setLogFilePath)
51  Q_PROPERTY(LoggingType loggingType READ loggingType WRITE setLoggingType)
52  Q_PROPERTY(MessageTypes messageTypes READ messageTypes WRITE setMessageTypes)
53 
54 public:
57  {
58  NoLogging = 0,
59  FileLogging = 1,
60  StdoutLogging = 2,
61  SignalLogging = 4,
62  };
63 
66  {
67  NoMessage = 0,
68  DebugMessage = 1,
69  InformationMessage = 2,
70  WarningMessage = 4,
71  ReceivedMessage = 8,
72  SentMessage = 16,
73  AnyMessage = 31,
74  };
75  Q_DECLARE_FLAGS(MessageTypes, MessageType)
76 
77  QXmppLogger(QObject *parent = 0);
78  ~QXmppLogger();
79 
80  static QXmppLogger* getLogger();
81 
82  QXmppLogger::LoggingType loggingType();
83  void setLoggingType(QXmppLogger::LoggingType type);
84 
85  QString logFilePath();
86  void setLogFilePath(const QString &path);
87 
88  QXmppLogger::MessageTypes messageTypes();
89  void setMessageTypes(QXmppLogger::MessageTypes types);
90 
91 public slots:
92  virtual void setGauge(const QString &gauge, double value);
93  virtual void updateCounter(const QString &counter, qint64 amount);
94 
95  void log(QXmppLogger::MessageType type, const QString& text);
96  void reopen();
97 
98 signals:
100  void message(QXmppLogger::MessageType type, const QString &text);
101 
102 private:
103  static QXmppLogger* m_logger;
104  QXmppLoggerPrivate *d;
105 };
106 
110 
111 class QXMPP_EXPORT QXmppLoggable : public QObject
112 {
113  Q_OBJECT
114 
115 public:
116  QXmppLoggable(QObject *parent = 0);
117 
118 protected:
120  virtual void childEvent(QChildEvent *event);
122 
126 
127  void debug(const QString &message)
128  {
129  emit logMessage(QXmppLogger::DebugMessage, qxmpp_loggable_trace(message));
130  }
131 
135 
136  void info(const QString &message)
137  {
138  emit logMessage(QXmppLogger::InformationMessage, qxmpp_loggable_trace(message));
139  }
140 
144 
145  void warning(const QString &message)
146  {
147  emit logMessage(QXmppLogger::WarningMessage, qxmpp_loggable_trace(message));
148  }
149 
153 
154  void logReceived(const QString &message)
155  {
156  emit logMessage(QXmppLogger::ReceivedMessage, qxmpp_loggable_trace(message));
157  }
158 
162 
163  void logSent(const QString &message)
164  {
165  emit logMessage(QXmppLogger::SentMessage, qxmpp_loggable_trace(message));
166  }
167 
168 signals:
170  void setGauge(const QString &gauge, double value);
171 
173  void logMessage(QXmppLogger::MessageType type, const QString &msg);
174 
176  void updateCounter(const QString &counter, qint64 amount = 1);
177 };
178 
179 Q_DECLARE_OPERATORS_FOR_FLAGS(QXmppLogger::MessageTypes)
180 #endif // QXMPPLOGGER_H
qxmpp-0.7.6/doc/html/QXmppOutgoingClient_8h_source.html0000644000175000007640000004756212116723632023130 0ustar sharkyjerryweb QXmpp: QXmppOutgoingClient.h Source File
QXmpp  Version:0.7.6
QXmppOutgoingClient.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Authors:
5  * Manjeet Dahiya
6  * Jeremy Lainé
7  *
8  * Source:
9  * http://code.google.com/p/qxmpp
10  *
11  * This file is a part of QXmpp library.
12  *
13  * This library is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU Lesser General Public
15  * License as published by the Free Software Foundation; either
16  * version 2.1 of the License, or (at your option) any later version.
17  *
18  * This library is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21  * Lesser General Public License for more details.
22  *
23  */
24 
25 
26 #ifndef QXMPPOUTGOINGCLIENT_H
27 #define QXMPPOUTGOINGCLIENT_H
28 
29 #include "QXmppClient.h"
30 #include "QXmppStanza.h"
31 #include "QXmppStream.h"
32 
33 class QDomElement;
34 class QSslError;
35 
36 class QXmppConfiguration;
37 class QXmppPresence;
38 class QXmppIq;
39 class QXmppMessage;
40 
41 class QXmppOutgoingClientPrivate;
42 
46 
47 class QXMPP_EXPORT QXmppOutgoingClient : public QXmppStream
48 {
49  Q_OBJECT
50 
51 public:
52  QXmppOutgoingClient(QObject *parent);
54 
55  void connectToHost();
56  bool isAuthenticated() const;
57  bool isConnected() const;
58 
59  QSslSocket *socket() const { return QXmppStream::socket(); };
60  QXmppStanza::Error::Condition xmppStreamError();
61 
62  QXmppConfiguration& configuration();
63 
64 signals:
66  void error(QXmppClient::Error);
67 
69  void elementReceived(const QDomElement &element, bool &handled);
70 
72  void presenceReceived(const QXmppPresence&);
73 
75  void messageReceived(const QXmppMessage&);
76 
78  void iqReceived(const QXmppIq&);
79 
80 protected:
82  // Overridable methods
83  virtual void handleStart();
84  virtual void handleStanza(const QDomElement &element);
85  virtual void handleStream(const QDomElement &element);
87 
88 private slots:
89  void _q_dnsLookupFinished();
90  void _q_socketDisconnected();
91  void socketError(QAbstractSocket::SocketError);
92  void socketSslErrors(const QList<QSslError>&);
93 
94  void pingStart();
95  void pingStop();
96  void pingSend();
97  void pingTimeout();
98 
99 private:
100  void sendNonSASLAuth(bool plaintext);
101  void sendNonSASLAuthQuery();
102 
103  friend class QXmppOutgoingClientPrivate;
104  QXmppOutgoingClientPrivate * const d;
105 };
106 
107 #endif // QXMPPOUTGOINGCLIENT_H
qxmpp-0.7.6/doc/html/classQXmppDialback.png0000644000175000007640000000103212116723632020535 0ustar sharkyjerrywebPNG  IHDRgP3PLTEutRNST2IDATxq G%ȧlA\r ϖncDy\#"үڬDDJ'"bw1E' U J}!ʹ,{8A܂wSlrlr N[Mzš~:GN-N ]to);V'oVW[{\yGDD59""ȉ1Ы ^c@8 fh|kr59~M@&gBakr+WS,cۺ>NgLi2( m7oqǥ,q,[ƪԡe j*X /N8it)>589}s>Gf|^lGTa}enЭRЯBx^?jIENDB`qxmpp-0.7.6/doc/html/classQXmppMucAdminIq-members.html0000644000175000007640000003125112116723632022650 0ustar sharkyjerryweb QXmpp: Member List
QXmppMucAdminIq Member List

This is the complete list of members for QXmppMucAdminIq, including all inherited members.

Error enum valueQXmppIq
error() const QXmppStanza
extendedAddresses() const QXmppStanza
extensions() const QXmppStanza
from() const QXmppStanza
Get enum valueQXmppIq
id() const QXmppStanza
items() const QXmppMucAdminIq
lang() const QXmppStanza
operator=(const QXmppIq &other)QXmppIq
QXmppStanza::operator=(const QXmppStanza &other)QXmppStanza
QXmppIq(QXmppIq::Type type=QXmppIq::Get)QXmppIq
QXmppIq(const QXmppIq &other)QXmppIq
QXmppStanza(const QString &from=QString(), const QString &to=QString())QXmppStanza
QXmppStanza(const QXmppStanza &other)QXmppStanza
Result enum valueQXmppIq
Set enum valueQXmppIq
setError(const QXmppStanza::Error &error)QXmppStanza
setExtendedAddresses(const QList< QXmppExtendedAddress > &extendedAddresses)QXmppStanza
setExtensions(const QXmppElementList &elements)QXmppStanza
setFrom(const QString &)QXmppStanza
setId(const QString &)QXmppStanza
setItems(const QList< QXmppMucItem > &items)QXmppMucAdminIq
setLang(const QString &)QXmppStanza
setTo(const QString &)QXmppStanza
setType(QXmppIq::Type)QXmppIq
to() const QXmppStanza
type() const QXmppIq
Type enum nameQXmppIq
~QXmppIq() (defined in QXmppIq)QXmppIq
~QXmppStanza()QXmppStanzavirtual
qxmpp-0.7.6/doc/html/classQXmppPresence.png0000644000175000007640000000104012116723632020606 0ustar sharkyjerrywebPNG  IHDRlP`)PLTEutRNST2IDATxێ EFINH #*b.N1Y"т ۰R-#DĖ#LA+12ʒۃ uj&,S޳RI&L}wf5tTXM|Ѯv)F=Ofqf;nTg0KXkSe0nG <""`""Z0a͆$@/Y {&f6f2x3A_fv~SG rѲuoZ3s :`v] WɥJLw[> M'ogOnTIYrpfsc;7x alX!L?Al;tIENDB`qxmpp-0.7.6/doc/html/QXmppRpcManager_8h_source.html0000644000175000007640000004162012116723632022202 0ustar sharkyjerryweb QXmpp: QXmppRpcManager.h Source File
QXmpp  Version:0.7.6
QXmppRpcManager.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Jeremy Lainé
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXMPPRPCMANAGER_H
25 #define QXMPPRPCMANAGER_H
26 
27 #include <QMap>
28 #include <QVariant>
29 
30 #include "QXmppClientExtension.h"
31 #include "QXmppInvokable.h"
32 #include "QXmppRemoteMethod.h"
33 
34 class QXmppRpcErrorIq;
35 class QXmppRpcInvokeIq;
36 class QXmppRpcResponseIq;
37 
53 
54 class QXMPP_EXPORT QXmppRpcManager : public QXmppClientExtension
55 {
56  Q_OBJECT
57 
58 public:
60 
61  void addInvokableInterface( QXmppInvokable *interface );
62  QXmppRemoteMethodResult callRemoteMethod( const QString &jid,
63  const QString &interface,
64  const QVariant &arg1 = QVariant(),
65  const QVariant &arg2 = QVariant(),
66  const QVariant &arg3 = QVariant(),
67  const QVariant &arg4 = QVariant(),
68  const QVariant &arg5 = QVariant(),
69  const QVariant &arg6 = QVariant(),
70  const QVariant &arg7 = QVariant(),
71  const QVariant &arg8 = QVariant(),
72  const QVariant &arg9 = QVariant(),
73  const QVariant &arg10 = QVariant() );
74 
76  QStringList discoveryFeatures() const;
77  virtual QList<QXmppDiscoveryIq::Identity> discoveryIdentities() const;
78  bool handleStanza(const QDomElement &element);
80 
81 signals:
83  void rpcCallResponse(const QXmppRpcResponseIq& result);
84  void rpcCallError(const QXmppRpcErrorIq &err);
86 
87 private:
88  void invokeInterfaceMethod(const QXmppRpcInvokeIq &iq);
89 
90  QMap<QString,QXmppInvokable*> m_interfaces;
91 };
92 
93 #endif
qxmpp-0.7.6/doc/html/classQXmppCallManager-members.html0000644000175000007640000003254212116723632023033 0ustar sharkyjerryweb QXmpp: Member List
QXmppCallManager Member List

This is the complete list of members for QXmppCallManager, including all inherited members.

call(const QString &jid)QXmppCallManagerslot
callReceived(QXmppCall *call)QXmppCallManagersignal
callStarted(QXmppCall *call)QXmppCallManagersignal
client()QXmppClientExtensionprotected
debug(const QString &message)QXmppLoggableinlineprotected
discoveryFeatures() const QXmppClientExtensionvirtual
discoveryIdentities() const QXmppClientExtensionvirtual
handleStanza(const QDomElement &stanza)=0QXmppClientExtensionpure virtual
info(const QString &message)QXmppLoggableinlineprotected
logMessage(QXmppLogger::MessageType type, const QString &msg)QXmppLoggablesignal
logReceived(const QString &message)QXmppLoggableinlineprotected
logSent(const QString &message)QXmppLoggableinlineprotected
QXmppCall (defined in QXmppCallManager)QXmppCallManagerfriend
QXmppCallManager()QXmppCallManager
QXmppCallManagerPrivate (defined in QXmppCallManager)QXmppCallManagerfriend
QXmppCallPrivate (defined in QXmppCallManager)QXmppCallManagerfriend
QXmppClientExtension()QXmppClientExtension
QXmppLoggable(QObject *parent=0)QXmppLoggable
setClient(QXmppClient *client)QXmppClientExtensionprotectedvirtual
setGauge(const QString &gauge, double value)QXmppLoggablesignal
setStunServer(const QHostAddress &host, quint16 port=3478)QXmppCallManager
setTurnPassword(const QString &password)QXmppCallManager
setTurnServer(const QHostAddress &host, quint16 port=3478)QXmppCallManager
setTurnUser(const QString &user)QXmppCallManager
updateCounter(const QString &counter, qint64 amount=1)QXmppLoggablesignal
warning(const QString &message)QXmppLoggableinlineprotected
~QXmppCallManager()QXmppCallManager
~QXmppClientExtension()QXmppClientExtensionvirtual
qxmpp-0.7.6/doc/html/classQXmppVersionIq.png0000644000175000007640000000130212116723632020762 0ustar sharkyjerrywebPNG  IHDRkױPLTEutRNST2QIDATxn umI|=ڈs&'A)K]WX[jOx2BMXwWY<t9+I^="-\f:l]W7,zLGqpsZ5dK]+I {~vGu#/\\oo$n-R0q˞otq#Iq$.Ic+`]2O6ѵfl `w.10p]@K18 $M]4 o+SMv9jWv+P<5]S}W/9KQ+Wkꋋ[ʫs+K ?ډ|WFq(IGtqs3s$.Ic+`]2O6ѵfl `w.10p]@K!0 0/HٚZIGc\NN{k)kLR/5βcSCާ4uZA6)rjy?'5\]++ >vⰻol~/I]## qw.1&Ba_М,ʔIENDB`qxmpp-0.7.6/doc/html/classQXmppClient-members.html0000644000175000007640000004656412116723632022114 0ustar sharkyjerryweb QXmpp: Member List
QXmppClient Member List

This is the complete list of members for QXmppClient, including all inherited members.

addExtension(QXmppClientExtension *extension)QXmppClient
clientPresence() const QXmppClient
configuration()QXmppClient
connected()QXmppClientsignal
ConnectedState enum valueQXmppClient
ConnectingState enum valueQXmppClient
connectToServer(const QXmppConfiguration &, const QXmppPresence &initialPresence=QXmppPresence())QXmppClient
connectToServer(const QString &jid, const QString &password)QXmppClientslot
debug(const QString &message)QXmppLoggableinlineprotected
disconnected()QXmppClientsignal
DisconnectedState enum valueQXmppClient
disconnectFromServer()QXmppClientslot
error(QXmppClient::Error)QXmppClientsignal
Error enum nameQXmppClient
extensions()QXmppClient
findExtension()QXmppClientinline
info(const QString &message)QXmppLoggableinlineprotected
insertExtension(int index, QXmppClientExtension *extension)QXmppClient
iqReceived(const QXmppIq &iq)QXmppClientsignal
isAuthenticated() const QXmppClient
isConnected() const QXmppClient
KeepAliveError enum valueQXmppClient
loggerQXmppClient
logger() const (defined in QXmppClient)QXmppClient
loggerChanged(QXmppLogger *logger)QXmppClientsignal
logMessage(QXmppLogger::MessageType type, const QString &msg)QXmppLoggablesignal
logReceived(const QString &message)QXmppLoggableinlineprotected
logSent(const QString &message)QXmppLoggableinlineprotected
messageReceived(const QXmppMessage &message)QXmppClientsignal
NoError enum valueQXmppClient
presenceReceived(const QXmppPresence &presence)QXmppClientsignal
QXmppClient(QObject *parent=0)QXmppClient
QXmppLoggable(QObject *parent=0)QXmppLoggable
removeExtension(QXmppClientExtension *extension)QXmppClient
rosterManager()QXmppClient
sendMessage(const QString &bareJid, const QString &message)QXmppClientslot
sendPacket(const QXmppStanza &)QXmppClientslot
setClientPresence(const QXmppPresence &presence)QXmppClient
setGauge(const QString &gauge, double value)QXmppLoggablesignal
setLogger(QXmppLogger *logger)QXmppClient
socketError()QXmppClient
SocketError enum valueQXmppClient
stateQXmppClient
state() const (defined in QXmppClient)QXmppClient
State enum nameQXmppClient
stateChanged(QXmppClient::State state)QXmppClientsignal
updateCounter(const QString &counter, qint64 amount=1)QXmppLoggablesignal
vCardManager()QXmppClient
versionManager()QXmppClient
warning(const QString &message)QXmppLoggableinlineprotected
xmppStreamError()QXmppClient
XmppStreamError enum valueQXmppClient
~QXmppClient()QXmppClient
qxmpp-0.7.6/doc/html/classQXmppDialback-members.html0000644000175000007640000002773612116723632022370 0ustar sharkyjerryweb QXmpp: Member List
QXmppDialback Member List

This is the complete list of members for QXmppDialback, including all inherited members.

Command enum nameQXmppDialback
command() const QXmppDialback
error() const QXmppStanza
extendedAddresses() const QXmppStanza
extensions() const QXmppStanza
from() const QXmppStanza
id() const QXmppStanza
key() const QXmppDialback
lang() const QXmppStanza
operator=(const QXmppStanza &other)QXmppStanza
QXmppDialback()QXmppDialback
QXmppStanza(const QString &from=QString(), const QString &to=QString())QXmppStanza
QXmppStanza(const QXmppStanza &other)QXmppStanza
Result enum valueQXmppDialback
setCommand(Command command)QXmppDialback
setError(const QXmppStanza::Error &error)QXmppStanza
setExtendedAddresses(const QList< QXmppExtendedAddress > &extendedAddresses)QXmppStanza
setExtensions(const QXmppElementList &elements)QXmppStanza
setFrom(const QString &)QXmppStanza
setId(const QString &)QXmppStanza
setKey(const QString &key)QXmppDialback
setLang(const QString &)QXmppStanza
setTo(const QString &)QXmppStanza
setType(const QString &type)QXmppDialback
to() const QXmppStanza
type() const QXmppDialback
Verify enum valueQXmppDialback
~QXmppStanza()QXmppStanzavirtual
qxmpp-0.7.6/doc/html/tab_b.png0000644000175000007640000000024712116723632016105 0ustar sharkyjerrywebPNG  IHDR$[nIDATxQ 0RXcI7IӨg|ٜgY3u{WS1 CjiCGJ+| s7+ٛ`t3܂aKGqQZT=@*C݇LIENDB`qxmpp-0.7.6/doc/html/classQXmppMucOwnerIq.html0000644000175000007640000005235512116723632021272 0ustar sharkyjerryweb QXmpp: QXmppMucOwnerIq Class Reference
QXmppMucOwnerIq Class Reference

The QXmppMucOwnerIq class represents a chat room configuration IQ as defined by XEP-0045: Multi-User Chat. More...

#include <QXmppMucIq.h>

Inheritance diagram for QXmppMucOwnerIq:
QXmppIq QXmppStanza

Public Member Functions

QXmppDataForm form () const
 Returns the IQ's data form.
void setForm (const QXmppDataForm &form)
- Public Member Functions inherited from QXmppIq
 QXmppIq (QXmppIq::Type type=QXmppIq::Get)
 QXmppIq (const QXmppIq &other)
 Constructs a copy of other.
QXmppIqoperator= (const QXmppIq &other)
 Assigns other to this IQ.
QXmppIq::Type type () const
void setType (QXmppIq::Type)
- Public Member Functions inherited from QXmppStanza
 QXmppStanza (const QString &from=QString(), const QString &to=QString())
 QXmppStanza (const QXmppStanza &other)
 Constructs a copy of other.
virtual ~QXmppStanza ()
 Destroys a QXmppStanza.
QXmppStanzaoperator= (const QXmppStanza &other)
 Assigns other to this stanza.
QString to () const
void setTo (const QString &)
QString from () const
 Returns the stanza's sender JID.
void setFrom (const QString &)
QString id () const
 Returns the stanza's identifier.
void setId (const QString &)
QString lang () const
 Returns the stanza's language.
void setLang (const QString &)
QXmppStanza::Error error () const
 Returns the stanza's error.
void setError (const QXmppStanza::Error &error)
QXmppElementList extensions () const
void setExtensions (const QXmppElementList &elements)
QList< QXmppExtendedAddressextendedAddresses () const
void setExtendedAddresses (const QList< QXmppExtendedAddress > &extendedAddresses)

Additional Inherited Members

- Public Types inherited from QXmppIq
enum  Type { Error = 0, Get, Set, Result }
 This enum describes the type of IQ. More...

Detailed Description

The QXmppMucOwnerIq class represents a chat room configuration IQ as defined by XEP-0045: Multi-User Chat.

It is used to get or modify room configuration options.

See Also
QXmppDataForm

Member Function Documentation

void QXmppMucOwnerIq::setForm ( const QXmppDataForm form)

Sets the IQ's data form.

Parameters
form

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppRosterManager.html0000644000175000007640000011447012116723632022007 0ustar sharkyjerryweb QXmpp: QXmppRosterManager Class Reference
QXmppRosterManager Class Reference

The QXmppRosterManager class provides access to a connected client's roster. More...

#include <QXmppRosterManager.h>

Inheritance diagram for QXmppRosterManager:
QXmppClientExtension QXmppLoggable

Public Slots

bool acceptSubscription (const QString &bareJid, const QString &reason=QString())
bool refuseSubscription (const QString &bareJid, const QString &reason=QString())
bool addItem (const QString &bareJid, const QString &name=QString(), const QSet< QString > &groups=QSet< QString >())
bool removeItem (const QString &bareJid)
bool renameItem (const QString &bareJid, const QString &name)
bool subscribe (const QString &bareJid, const QString &reason=QString())
bool unsubscribe (const QString &bareJid, const QString &reason=QString())

Signals

void rosterReceived ()
void presenceChanged (const QString &bareJid, const QString &resource)
 This signal is emitted when the presence of a particular bareJid and resource changes.
void subscriptionReceived (const QString &bareJid)
void itemAdded (const QString &bareJid)
void itemChanged (const QString &bareJid)
void itemRemoved (const QString &bareJid)

Public Member Functions

 QXmppRosterManager (QXmppClient *stream)
 Constructs a roster manager.
bool isRosterReceived () const
QStringList getRosterBareJids () const
QXmppRosterIq::Item getRosterEntry (const QString &bareJid) const
QStringList getResources (const QString &bareJid) const
QMap< QString, QXmppPresencegetAllPresencesForBareJid (const QString &bareJid) const
QXmppPresence getPresence (const QString &bareJid, const QString &resource) const
- Public Member Functions inherited from QXmppClientExtension
 QXmppClientExtension ()
virtual ~QXmppClientExtension ()
virtual QStringList discoveryFeatures () const
virtual QList
< QXmppDiscoveryIq::Identity > 
discoveryIdentities () const
virtual bool handleStanza (const QDomElement &stanza)=0
 You need to implement this method to process incoming XMPP stanzas.
- Public Member Functions inherited from QXmppLoggable
 QXmppLoggable (QObject *parent=0)

Additional Inherited Members

- Protected Member Functions inherited from QXmppClientExtension
QXmppClientclient ()
virtual void setClient (QXmppClient *client)

Detailed Description

The QXmppRosterManager class provides access to a connected client's roster.

Note
It's object should not be created using it's constructor. Instead QXmppClient::rosterManager() should be used to get the reference of instantiated object this class.

It stores all the Roster and Presence details of all the roster entries (that is all the bareJids) in the client's friend's list. It provides the functionality to get all the bareJids in the client's roster and Roster and Presence details of the same.

After the successful xmpp connection that after the signal QXmppClient::connected() is emitted QXmpp requests for getting the roster. Once QXmpp receives the roster the signal QXmppRosterManager::rosterReceived() is emitted and after that user can use the functions of this class to get roster entries.

Function QXmppRosterManager::isRosterReceived() tells whether the roster has been received or not.

The itemAdded(), itemChanged() and itemRemoved() signals are emitted whenever roster entries are added, changed or removed.

The presenceChanged() signal is emitted whenever the presence for a roster item changes.

Member Function Documentation

bool QXmppRosterManager::acceptSubscription ( const QString &  bareJid,
const QString &  reason = QString() 
)
slot

Accepts a subscription request.

You can call this method in reply to the subscriptionRequest() signal.

bool QXmppRosterManager::addItem ( const QString &  bareJid,
const QString &  name = QString(),
const QSet< QString > &  groups = QSet<QString>() 
)
slot

Adds a new item to the roster without sending any subscription requests.

As a result, the server will initiate a roster push, causing the itemAdded() or itemChanged() signal to be emitted.

Parameters
bareJid
nameOptional name for the item.
groupsOptional groups for the item.
QMap< QString, QXmppPresence > QXmppRosterManager::getAllPresencesForBareJid ( const QString &  bareJid) const

Get all the presences of all the resources of the given bareJid. A bareJid can have multiple resources and each resource will have a presence associated with it.

Parameters
bareJidas a QString
Returns
Map of resource and its respective presence QMap<QString, QXmppPresence>
QXmppPresence QXmppRosterManager::getPresence ( const QString &  bareJid,
const QString &  resource 
) const

Get the presence of the given resource of the given bareJid.

Parameters
bareJidas a QString
resourceas a QString
Returns
QXmppPresence
QStringList QXmppRosterManager::getResources ( const QString &  bareJid) const

Get all the associated resources with the given bareJid.

Parameters
bareJidas a QString
Returns
list of associated resources as a QStringList
QStringList QXmppRosterManager::getRosterBareJids ( ) const

Function to get all the bareJids present in the roster.

Returns
QStringList list of all the bareJids
QXmppRosterIq::Item QXmppRosterManager::getRosterEntry ( const QString &  bareJid) const

Returns the roster entry of the given bareJid. If the bareJid is not in the database and empty QXmppRosterIq::Item will be returned.

Parameters
bareJidas a QString
bool QXmppRosterManager::isRosterReceived ( ) const

Function to check whether the roster has been received or not.

Returns
true if roster received else false
void QXmppRosterManager::itemAdded ( const QString &  bareJid)
signal

This signal is emitted when the roster entry of a particular bareJid is added as a result of roster push.

void QXmppRosterManager::itemChanged ( const QString &  bareJid)
signal

This signal is emitted when the roster entry of a particular bareJid changes as a result of roster push.

void QXmppRosterManager::itemRemoved ( const QString &  bareJid)
signal

This signal is emitted when the roster entry of a particular bareJid is removed as a result of roster push.

bool QXmppRosterManager::refuseSubscription ( const QString &  bareJid,
const QString &  reason = QString() 
)
slot

Refuses a subscription request.

You can call this method in reply to the subscriptionRequest() signal.

bool QXmppRosterManager::removeItem ( const QString &  bareJid)
slot

Removes a roster item and cancels subscriptions to and from the contact.

As a result, the server will initiate a roster push, causing the itemRemoved() signal to be emitted.

Parameters
bareJid
bool QXmppRosterManager::renameItem ( const QString &  bareJid,
const QString &  name 
)
slot

Renames a roster item.

As a result, the server will initiate a roster push, causing the itemChanged() signal to be emitted.

Parameters
bareJid
name
void QXmppRosterManager::rosterReceived ( )
signal

This signal is emitted when the Roster IQ is received after a successful connection. That is the roster entries are empty before this signal is emitted. One should use getRosterBareJids() and getRosterEntry() only after this signal has been emitted.

bool QXmppRosterManager::subscribe ( const QString &  bareJid,
const QString &  reason = QString() 
)
slot

Requests a subscription to the given contact.

As a result, the server will initiate a roster push, causing the itemAdded() or itemChanged() signal to be emitted.

void QXmppRosterManager::subscriptionReceived ( const QString &  bareJid)
signal

This signal is emitted when a contact asks to subscribe to your presence.

You can either accept the request by calling acceptSubscription() or refuse it by calling refuseSubscription().

Note
If you set QXmppConfiguration::autoAcceptSubscriptions() to true, this signal will not be emitted.
bool QXmppRosterManager::unsubscribe ( const QString &  bareJid,
const QString &  reason = QString() 
)
slot

Removes a subscription to the given contact.

As a result, the server will initiate a roster push, causing the itemChanged() signal to be emitted.


The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppPubSubIq.html0000644000175000007640000007216112116723632020730 0ustar sharkyjerryweb QXmpp: QXmppPubSubIq Class Reference

The QXmppPubSubIq class represents an IQ used for the publish-subscribe mechanisms defined by XEP-0060: Publish-Subscribe. More...

#include <QXmppPubSubIq.h>

Inheritance diagram for QXmppPubSubIq:
QXmppIq QXmppStanza

Public Types

enum  QueryType {
  AffiliationsQuery, DefaultQuery, ItemsQuery, PublishQuery,
  RetractQuery, SubscribeQuery, SubscriptionQuery, SubscriptionsQuery,
  UnsubscribeQuery
}
 This enum is used to describe a publish-subscribe query type.
- Public Types inherited from QXmppIq
enum  Type { Error = 0, Get, Set, Result }
 This enum describes the type of IQ. More...

Public Member Functions

QXmppPubSubIq::QueryType queryType () const
void setQueryType (QXmppPubSubIq::QueryType queryType)
QString queryJid () const
void setQueryJid (const QString &jid)
QString queryNode () const
void setQueryNode (const QString &node)
QList< QXmppPubSubItemitems () const
void setItems (const QList< QXmppPubSubItem > &items)
QString subscriptionId () const
void setSubscriptionId (const QString &id)
- Public Member Functions inherited from QXmppIq
 QXmppIq (QXmppIq::Type type=QXmppIq::Get)
 QXmppIq (const QXmppIq &other)
 Constructs a copy of other.
QXmppIqoperator= (const QXmppIq &other)
 Assigns other to this IQ.
QXmppIq::Type type () const
void setType (QXmppIq::Type)
- Public Member Functions inherited from QXmppStanza
 QXmppStanza (const QString &from=QString(), const QString &to=QString())
 QXmppStanza (const QXmppStanza &other)
 Constructs a copy of other.
virtual ~QXmppStanza ()
 Destroys a QXmppStanza.
QXmppStanzaoperator= (const QXmppStanza &other)
 Assigns other to this stanza.
QString to () const
void setTo (const QString &)
QString from () const
 Returns the stanza's sender JID.
void setFrom (const QString &)
QString id () const
 Returns the stanza's identifier.
void setId (const QString &)
QString lang () const
 Returns the stanza's language.
void setLang (const QString &)
QXmppStanza::Error error () const
 Returns the stanza's error.
void setError (const QXmppStanza::Error &error)
QXmppElementList extensions () const
void setExtensions (const QXmppElementList &elements)
QList< QXmppExtendedAddressextendedAddresses () const
void setExtendedAddresses (const QList< QXmppExtendedAddress > &extendedAddresses)

Detailed Description

The QXmppPubSubIq class represents an IQ used for the publish-subscribe mechanisms defined by XEP-0060: Publish-Subscribe.

Member Function Documentation

QList< QXmppPubSubItem > QXmppPubSubIq::items ( ) const

Returns the IQ's items.

QString QXmppPubSubIq::queryJid ( ) const

Returns the JID being queried.

QString QXmppPubSubIq::queryNode ( ) const

Returns the node being queried.

QXmppPubSubIq::QueryType QXmppPubSubIq::queryType ( ) const

Returns the PubSub queryType for this IQ.

void QXmppPubSubIq::setItems ( const QList< QXmppPubSubItem > &  items)

Sets the IQ's items.

Parameters
items
void QXmppPubSubIq::setQueryJid ( const QString &  queryJid)

Sets the JID being queried.

Parameters
queryJid
void QXmppPubSubIq::setQueryNode ( const QString &  queryNode)

Sets the node being queried.

Parameters
queryNode
void QXmppPubSubIq::setQueryType ( QXmppPubSubIq::QueryType  queryType)

Sets the PubSub queryType for this IQ.

Parameters
queryType
void QXmppPubSubIq::setSubscriptionId ( const QString &  subscriptionId)

Sets the subscription ID.

Parameters
subscriptionId
QString QXmppPubSubIq::subscriptionId ( ) const

Returns the subscription ID.


The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/functions_func_0x6f.html0000644000175000007640000002214112116723632021101 0ustar sharkyjerryweb QXmpp: Class Members - Functions
QXmpp  Version:0.7.6
qxmpp-0.7.6/doc/html/classQXmppRpcResponseIq-members.html0000644000175000007640000003403712116723632023423 0ustar sharkyjerryweb QXmpp: Member List
QXmppRpcResponseIq Member List

This is the complete list of members for QXmppRpcResponseIq, including all inherited members.

error() const QXmppStanza
Error enum valueQXmppIq
extendedAddresses() const QXmppStanza
extensions() const QXmppStanza
faultCode() const QXmppRpcResponseIq
faultString() const QXmppRpcResponseIq
from() const QXmppStanza
Get enum valueQXmppIq
id() const QXmppStanza
lang() const QXmppStanza
operator=(const QXmppIq &other)QXmppIq
QXmppStanza::operator=(const QXmppStanza &other)QXmppStanza
QXmppIq(QXmppIq::Type type=QXmppIq::Get)QXmppIq
QXmppIq(const QXmppIq &other)QXmppIq
QXmppRpcResponseIq() (defined in QXmppRpcResponseIq)QXmppRpcResponseIq
QXmppStanza(const QString &from=QString(), const QString &to=QString())QXmppStanza
QXmppStanza(const QXmppStanza &other)QXmppStanza
Result enum valueQXmppIq
Set enum valueQXmppIq
setError(const QXmppStanza::Error &error)QXmppStanza
setExtendedAddresses(const QList< QXmppExtendedAddress > &extendedAddresses)QXmppStanza
setExtensions(const QXmppElementList &elements)QXmppStanza
setFaultCode(int faultCode)QXmppRpcResponseIq
setFaultString(const QString &faultString)QXmppRpcResponseIq
setFrom(const QString &)QXmppStanza
setId(const QString &)QXmppStanza
setLang(const QString &)QXmppStanza
setTo(const QString &)QXmppStanza
setType(QXmppIq::Type)QXmppIq
setValues(const QVariantList &values)QXmppRpcResponseIq
to() const QXmppStanza
type() const QXmppIq
Type enum nameQXmppIq
values() const QXmppRpcResponseIq
~QXmppIq() (defined in QXmppIq)QXmppIq
~QXmppStanza()QXmppStanzavirtual
qxmpp-0.7.6/doc/html/classQXmppJingleCandidate.html0000644000175000007640000006162412116723632022245 0ustar sharkyjerryweb QXmpp: QXmppJingleCandidate Class Reference
QXmppJingleCandidate Class Reference

The QXmppJingleCandidate class represents a transport candidate as specified by XEP-0176: Jingle ICE-UDP Transport Method. More...

#include <QXmppJingleIq.h>

Public Types

enum  Type { HostType, PeerReflexiveType, ServerReflexiveType, RelayedType }
 This enum is used to describe a candidate's type. More...

Public Member Functions

int component () const
 Returns the candidate's component ID.
void setComponent (int component)
int foundation () const
 Returns the candidate's foundation.
void setFoundation (int foundation)
QHostAddress host () const
void setHost (const QHostAddress &host)
QString id () const
void setId (const QString &id)
int network () const
void setNetwork (int network)
quint16 port () const
void setPort (quint16 port)
int priority () const
void setPriority (int priority)
QString protocol () const
void setProtocol (const QString &protocol)
QXmppJingleCandidate::Type type () const
void setType (QXmppJingleCandidate::Type)
bool isNull () const

Detailed Description

The QXmppJingleCandidate class represents a transport candidate as specified by XEP-0176: Jingle ICE-UDP Transport Method.

Member Enumeration Documentation

This enum is used to describe a candidate's type.

Enumerator:
HostType 

Host candidate, a local address/port.

PeerReflexiveType 

Peer-reflexive candidate, the address/port as seen from the peer.

ServerReflexiveType 

Server-reflexive candidate, the address/port as seen by the STUN server

RelayedType 

Relayed candidate, a candidate from a TURN relay.

Member Function Documentation

QHostAddress QXmppJingleCandidate::host ( ) const

Returns the candidate's host address.

QString QXmppJingleCandidate::id ( ) const

Returns the candidate's unique identifier.

bool QXmppJingleCandidate::isNull ( ) const

Returns true if the host address or port are empty.

int QXmppJingleCandidate::network ( ) const

Returns the network index (starting at 0) the candidate is on.

quint16 QXmppJingleCandidate::port ( ) const

Returns the candidate's port number.

int QXmppJingleCandidate::priority ( ) const

Returns the candidate's priority.

QString QXmppJingleCandidate::protocol ( ) const

Returns the candidate's protocol (e.g. "udp").

void QXmppJingleCandidate::setComponent ( int  component)

Sets the candidates's component ID.

Parameters
component
void QXmppJingleCandidate::setFoundation ( int  foundation)

Sets the candidate's foundation.

Parameters
foundation
void QXmppJingleCandidate::setHost ( const QHostAddress &  host)

Sets the candidate's host address.

Parameters
host
void QXmppJingleCandidate::setId ( const QString &  id)

Sets the candidate's unique identifier.

Parameters
id
void QXmppJingleCandidate::setNetwork ( int  network)

Sets the network index (starting at 0) the candidate is on.

Parameters
network
void QXmppJingleCandidate::setPort ( quint16  port)

Sets the candidate's port number.

Parameters
port
void QXmppJingleCandidate::setPriority ( int  priority)

Sets the candidate's priority.

Parameters
priority
void QXmppJingleCandidate::setProtocol ( const QString &  protocol)

Sets the candidate's protocol (e.g. "udp").

Parameters
protocol
void QXmppJingleCandidate::setType ( QXmppJingleCandidate::Type  type)

Sets the candidate type (e.g. "host").

Parameters
type
QXmppJingleCandidate::Type QXmppJingleCandidate::type ( ) const

Returns the candidate type (e.g. "host").


The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppServer.png0000644000175000007640000000102512116723632020313 0ustar sharkyjerrywebPNG  IHDRjPnPLTEutRNST2IDATxݒ Fak/QtL׏(I{K1QDd&JDġr6?u 0d=7J6-m~0f!S3{uPf'\Bc6joe j:%7Pt56o;QqV *^ "6usҭEDz:<&7?WȑQ<^}E?~cCp_1z<ơ(@ԏVDx4QMCD84QMCծB#MCD`𒶨y6gXmP`6?Ӣ+ )%TzKlPntjmByl_QٹFE SuJzq4h+Q(mQ]wdnߣ<(ƢBar%) IENDB`qxmpp-0.7.6/doc/html/classQXmppOutgoingClient-members.html0000644000175000007640000003601512116723632023616 0ustar sharkyjerryweb QXmpp: Member List
QXmppOutgoingClient Member List

This is the complete list of members for QXmppOutgoingClient, including all inherited members.

configuration()QXmppOutgoingClient
connected()QXmppStreamsignal
connectToHost()QXmppOutgoingClient
debug(const QString &message)QXmppLoggableinlineprotected
disconnected()QXmppStreamsignal
disconnectFromHost()QXmppStreamvirtualslot
elementReceived(const QDomElement &element, bool &handled)QXmppOutgoingClientsignal
error(QXmppClient::Error)QXmppOutgoingClientsignal
handleStanza(const QDomElement &element)=0QXmppStreamprotectedpure virtual
handleStart()QXmppStreamprotectedvirtual
handleStream(const QDomElement &element)=0QXmppStreamprotectedpure virtual
info(const QString &message)QXmppLoggableinlineprotected
iqReceived(const QXmppIq &)QXmppOutgoingClientsignal
isAuthenticated() const QXmppOutgoingClient
isConnected() const QXmppOutgoingClientvirtual
logMessage(QXmppLogger::MessageType type, const QString &msg)QXmppLoggablesignal
logReceived(const QString &message)QXmppLoggableinlineprotected
logSent(const QString &message)QXmppLoggableinlineprotected
messageReceived(const QXmppMessage &)QXmppOutgoingClientsignal
presenceReceived(const QXmppPresence &)QXmppOutgoingClientsignal
QXmppLoggable(QObject *parent=0)QXmppLoggable
QXmppOutgoingClient(QObject *parent)QXmppOutgoingClient
QXmppOutgoingClientPrivate (defined in QXmppOutgoingClient)QXmppOutgoingClientfriend
QXmppStream(QObject *parent)QXmppStream
sendData(const QByteArray &)QXmppStreamvirtualslot
sendPacket(const QXmppStanza &)QXmppStream
setGauge(const QString &gauge, double value)QXmppLoggablesignal
setSocket(QSslSocket *socket)QXmppStreamprotected
socket() const QXmppOutgoingClientinline
updateCounter(const QString &counter, qint64 amount=1)QXmppLoggablesignal
warning(const QString &message)QXmppLoggableinlineprotected
xmppStreamError()QXmppOutgoingClient
~QXmppOutgoingClient()QXmppOutgoingClient
~QXmppStream()QXmppStream
qxmpp-0.7.6/doc/html/classQXmppIceComponent-members.html0000644000175000007640000003555212116723632023254 0ustar sharkyjerryweb QXmpp: Member List
QXmppIceComponent Member List

This is the complete list of members for QXmppIceComponent, including all inherited members.

addRemoteCandidate(const QXmppJingleCandidate &candidate)QXmppIceComponent
close()QXmppIceComponentslot
component() const QXmppIceComponent
connected()QXmppIceComponentsignal
connectToHost()QXmppIceComponentslot
datagramReceived(const QByteArray &datagram)QXmppIceComponentsignal
debug(const QString &message)QXmppLoggableinlineprotected
discoverAddresses()QXmppIceComponentstatic
info(const QString &message)QXmppLoggableinlineprotected
isConnected() const QXmppIceComponent
localCandidates() const QXmppIceComponent
localCandidatesChanged()QXmppIceComponentsignal
logMessage(QXmppLogger::MessageType type, const QString &msg)QXmppLoggablesignal
logReceived(const QString &message)QXmppLoggableinlineprotected
logSent(const QString &message)QXmppLoggableinlineprotected
QXmppIceComponent(QObject *parent=0)QXmppIceComponent
QXmppLoggable(QObject *parent=0)QXmppLoggable
reservePorts(const QList< QHostAddress > &addresses, int count, QObject *parent=0)QXmppIceComponentstatic
sendDatagram(const QByteArray &datagram)QXmppIceComponentslot
setComponent(int component)QXmppIceComponent
setGauge(const QString &gauge, double value)QXmppLoggablesignal
setIceControlling(bool controlling)QXmppIceComponent
setLocalPassword(const QString &password)QXmppIceComponent
setLocalUser(const QString &user)QXmppIceComponent
setRemotePassword(const QString &password)QXmppIceComponent
setRemoteUser(const QString &user)QXmppIceComponent
setSockets(QList< QUdpSocket * > sockets)QXmppIceComponent
setStunServer(const QHostAddress &host, quint16 port)QXmppIceComponent
setTurnPassword(const QString &password)QXmppIceComponent
setTurnServer(const QHostAddress &host, quint16 port)QXmppIceComponent
setTurnUser(const QString &user)QXmppIceComponent
updateCounter(const QString &counter, qint64 amount=1)QXmppLoggablesignal
warning(const QString &message)QXmppLoggableinlineprotected
~QXmppIceComponent()QXmppIceComponent
qxmpp-0.7.6/doc/html/classQXmppRosterIq.html0000644000175000007640000005251212116723632021004 0ustar sharkyjerryweb QXmpp: QXmppRosterIq Class Reference
QXmppRosterIq Class Reference

The QXmppRosterIq class represents a roster IQ. More...

#include <QXmppRosterIq.h>

Inheritance diagram for QXmppRosterIq:
QXmppIq QXmppStanza

Classes

class  Item
 The QXmppRosterIq::Item class represents a roster entry. More...

Public Member Functions

void addItem (const Item &)
QList< Itemitems () const
 Returns the roster IQ's items.
- Public Member Functions inherited from QXmppIq
 QXmppIq (QXmppIq::Type type=QXmppIq::Get)
 QXmppIq (const QXmppIq &other)
 Constructs a copy of other.
QXmppIqoperator= (const QXmppIq &other)
 Assigns other to this IQ.
QXmppIq::Type type () const
void setType (QXmppIq::Type)
- Public Member Functions inherited from QXmppStanza
 QXmppStanza (const QString &from=QString(), const QString &to=QString())
 QXmppStanza (const QXmppStanza &other)
 Constructs a copy of other.
virtual ~QXmppStanza ()
 Destroys a QXmppStanza.
QXmppStanzaoperator= (const QXmppStanza &other)
 Assigns other to this stanza.
QString to () const
void setTo (const QString &)
QString from () const
 Returns the stanza's sender JID.
void setFrom (const QString &)
QString id () const
 Returns the stanza's identifier.
void setId (const QString &)
QString lang () const
 Returns the stanza's language.
void setLang (const QString &)
QXmppStanza::Error error () const
 Returns the stanza's error.
void setError (const QXmppStanza::Error &error)
QXmppElementList extensions () const
void setExtensions (const QXmppElementList &elements)
QList< QXmppExtendedAddressextendedAddresses () const
void setExtendedAddresses (const QList< QXmppExtendedAddress > &extendedAddresses)

Additional Inherited Members

- Public Types inherited from QXmppIq
enum  Type { Error = 0, Get, Set, Result }
 This enum describes the type of IQ. More...

Detailed Description

The QXmppRosterIq class represents a roster IQ.

Member Function Documentation

void QXmppRosterIq::addItem ( const Item item)

Adds an item to the roster IQ.

Parameters
item

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/QXmppServerPlugin_8h_source.html0000644000175000007640000003172612116723632022616 0ustar sharkyjerryweb QXmpp: QXmppServerPlugin.h Source File
QXmpp  Version:0.7.6
QXmppServerPlugin.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Jeremy Lainé
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXMPPSERVERPLUGIN_H
25 #define QXMPPSERVERPLUGIN_H
26 
27 #include <QtPlugin>
28 
29 #include "QXmppGlobal.h"
30 
31 class QXmppServer;
33 
34 class QXMPP_EXPORT QXmppServerPluginInterface
35 {
36 public:
38  virtual QXmppServerExtension *create(const QString &key) = 0;
39 
41  virtual QStringList keys() const = 0;
42 };
43 
44 Q_DECLARE_INTERFACE(QXmppServerPluginInterface, "com.googlecode.qxmpp.ServerPlugin/1.0")
45 
46 
47 
48 
49 class QXMPP_EXPORT QXmppServerPlugin : public QObject, public QXmppServerPluginInterface
50 {
51  Q_OBJECT
52  Q_INTERFACES(QXmppServerPluginInterface)
53 
54 public:
58  virtual QXmppServerExtension *create(const QString &key) = 0;
59 
62  virtual QStringList keys() const = 0;
63 };
64 
65 #endif
qxmpp-0.7.6/doc/html/dir_6908ff505388a07996d238c763adbdab.html0000644000175000007640000003072712116723632022403 0ustar sharkyjerryweb QXmpp: /home/jerryweb/sharky/Development/qxmpp/src/client/ Directory Reference
QXmpp  Version:0.7.6
client Directory Reference

Files

file  QXmppArchiveManager.cpp
file  QXmppArchiveManager.h [code]
file  QXmppBookmarkManager.cpp
file  QXmppBookmarkManager.h [code]
file  QXmppCallManager.cpp
file  QXmppCallManager.h [code]
file  QXmppClient.cpp
file  QXmppClient.h [code]
file  QXmppClientExtension.cpp
file  QXmppClientExtension.h [code]
file  QXmppConfiguration.cpp
file  QXmppConfiguration.h [code]
file  QXmppDiscoveryManager.cpp
file  QXmppDiscoveryManager.h [code]
file  QXmppEntityTimeManager.cpp
file  QXmppEntityTimeManager.h [code]
file  QXmppInvokable.cpp
file  QXmppInvokable.h [code]
file  QXmppMessageReceiptManager.cpp
file  QXmppMessageReceiptManager.h [code]
file  QXmppMucManager.cpp
file  QXmppMucManager.h [code]
file  QXmppOutgoingClient.cpp
file  QXmppOutgoingClient.h [code]
file  QXmppRemoteMethod.cpp
file  QXmppRemoteMethod.h [code]
file  QXmppRosterManager.cpp
file  QXmppRosterManager.h [code]
file  QXmppRpcManager.cpp
file  QXmppRpcManager.h [code]
file  QXmppTransferManager.cpp
file  QXmppTransferManager.h [code]
file  QXmppVCardManager.cpp
file  QXmppVCardManager.h [code]
file  QXmppVersionManager.cpp
file  QXmppVersionManager.h [code]
qxmpp-0.7.6/doc/html/classQXmppRegisterIq.png0000644000175000007640000000134212116723632021125 0ustar sharkyjerrywebPNG  IHDRmگUPLTEutRNST2qIDATxr *¬ 9ba71 $ub$Ƀ_N/FH2eoʘw)/LSv#ߥ=%Z֋ISok:gjWIkOǦXNm6vɶ۽%MÑͮ]i=j͙½-EKiS^ʿ- MN~^ $y0lAw[1LjYQsr\6 a`<6 ac7ԉa$7[k$jZ)=lybJu0k [Ҥ)1YKH1olފmnb̖i)AN3=`*-9)Ig z $y0lAw[1LjYQsr\6 a`<6 aB76~ͶLM1VMKufI<5MeiJE[&KpfJ&fQGlmęsxjj'cluȼ6- <խfW4Qֹ~ky51MlD~/ 6 B|-$4uIENDB`qxmpp-0.7.6/doc/html/functions_0x70.html0000644000175000007640000003122012116723632017777 0ustar sharkyjerryweb QXmpp: Class Members
QXmpp  Version:0.7.6
Here is a list of all documented class members with links to the class documentation for each member:

- p -

qxmpp-0.7.6/doc/html/classQXmppRpcManager.png0000644000175000007640000000164412116723632021073 0ustar sharkyjerrywebPNG  IHDRPLTEutRNST23IDATxn ROl vBն0r_RJiH!#I!#IW2sI\[.oz^4=dϴܘɜ>5z^4rK&[Pўmϫ(ߓiˌRSu/]G|D̻Odj o6)?M&I:ݱqX$̻Iny֧.-I.!#Iɤ"|UXIXf%:6Kn (RJ@5IIdߑ$Pz>zu_W!I#nui"ER;y}꫁$%S"2d5L{w#=RTd<1`ˬLWT}*R0 '5/z]kdɔ0vew+}qL9f_xMm4 ۴od&^vsU(eTn7ifqK2ڒ2䱚LJ)-7XdlVycL&2۶m!2̱| G&'cvF>a)*yd9)=RL1{o?MY(KլʴbVS{(N@.dZ:Ǭ_܌L{v.iݦ‘ٿ-]7gɌE#oddn&\@wK~zliM@>8➎9{\+s}vdߐ$dxt9$ OVE*Û#׈r@l$PrHaa dZrqIoT\,tj2FAxv-Lp׌p TI/ \sf; jViTo^cpb]€<a՜y9:+,E f6NEKU}^;nZuUS4 ѬbN.kjT% iV )GJ@TxIENDB`qxmpp-0.7.6/doc/html/classQXmppIncomingServer-members.html0000644000175000007640000003251212116723632023614 0ustar sharkyjerryweb QXmpp: Member List
QXmppIncomingServer Member List

This is the complete list of members for QXmppIncomingServer, including all inherited members.

connected()QXmppStreamsignal
debug(const QString &message)QXmppLoggableinlineprotected
dialbackRequestReceived(const QXmppDialback &result)QXmppIncomingServersignal
disconnected()QXmppStreamsignal
disconnectFromHost()QXmppStreamvirtualslot
elementReceived(const QDomElement &element)QXmppIncomingServersignal
handleStanza(const QDomElement &element)=0QXmppStreamprotectedpure virtual
handleStart()QXmppStreamprotectedvirtual
handleStream(const QDomElement &element)=0QXmppStreamprotectedpure virtual
info(const QString &message)QXmppLoggableinlineprotected
isConnected() const QXmppIncomingServervirtual
localStreamId() const QXmppIncomingServer
logMessage(QXmppLogger::MessageType type, const QString &msg)QXmppLoggablesignal
logReceived(const QString &message)QXmppLoggableinlineprotected
logSent(const QString &message)QXmppLoggableinlineprotected
QXmppIncomingServer(QSslSocket *socket, const QString &domain, QObject *parent)QXmppIncomingServer
QXmppIncomingServerPrivate (defined in QXmppIncomingServer)QXmppIncomingServerfriend
QXmppLoggable(QObject *parent=0)QXmppLoggable
QXmppStream(QObject *parent)QXmppStream
sendData(const QByteArray &)QXmppStreamvirtualslot
sendPacket(const QXmppStanza &)QXmppStream
setGauge(const QString &gauge, double value)QXmppLoggablesignal
setSocket(QSslSocket *socket)QXmppStreamprotected
socket() const QXmppStreamprotected
updateCounter(const QString &counter, qint64 amount=1)QXmppLoggablesignal
warning(const QString &message)QXmppLoggableinlineprotected
~QXmppIncomingServer()QXmppIncomingServer
~QXmppStream()QXmppStream
qxmpp-0.7.6/doc/html/classQXmppArchiveManager-members.html0000644000175000007640000003100012116723632023525 0ustar sharkyjerryweb QXmpp: Member List
QXmppArchiveManager Member List

This is the complete list of members for QXmppArchiveManager, including all inherited members.

archiveChatReceived(const QXmppArchiveChat &, const QXmppResultSetReply &rsm=QXmppResultSetReply())QXmppArchiveManagersignal
archiveListReceived(const QList< QXmppArchiveChat > &, const QXmppResultSetReply &rsm=QXmppResultSetReply())QXmppArchiveManagersignal
client()QXmppClientExtensionprotected
debug(const QString &message)QXmppLoggableinlineprotected
discoveryFeatures() const QXmppClientExtensionvirtual
discoveryIdentities() const QXmppClientExtensionvirtual
handleStanza(const QDomElement &stanza)=0QXmppClientExtensionpure virtual
info(const QString &message)QXmppLoggableinlineprotected
listCollections(const QString &jid, const QDateTime &start=QDateTime(), const QDateTime &end=QDateTime(), const QXmppResultSetQuery &rsm=QXmppResultSetQuery())QXmppArchiveManager
listCollections(const QString &jid, const QDateTime &start, const QDateTime &end, int max)QXmppArchiveManager
logMessage(QXmppLogger::MessageType type, const QString &msg)QXmppLoggablesignal
logReceived(const QString &message)QXmppLoggableinlineprotected
logSent(const QString &message)QXmppLoggableinlineprotected
QXmppClientExtension()QXmppClientExtension
QXmppLoggable(QObject *parent=0)QXmppLoggable
removeCollections(const QString &jid, const QDateTime &start=QDateTime(), const QDateTime &end=QDateTime())QXmppArchiveManager
retrieveCollection(const QString &jid, const QDateTime &start, const QXmppResultSetQuery &rsm=QXmppResultSetQuery())QXmppArchiveManager
retrieveCollection(const QString &jid, const QDateTime &start, int max)QXmppArchiveManager
setClient(QXmppClient *client)QXmppClientExtensionprotectedvirtual
setGauge(const QString &gauge, double value)QXmppLoggablesignal
updateCounter(const QString &counter, qint64 amount=1)QXmppLoggablesignal
warning(const QString &message)QXmppLoggableinlineprotected
~QXmppClientExtension()QXmppClientExtensionvirtual
qxmpp-0.7.6/doc/html/QXmppMucManager_8h_source.html0000644000175000007640000010316512116723632022205 0ustar sharkyjerryweb QXmpp: QXmppMucManager.h Source File
QXmpp  Version:0.7.6
QXmppMucManager.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Jeremy Lainé
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXMPPMUCMANAGER_H
25 #define QXMPPMUCMANAGER_H
26 
27 #include "QXmppClientExtension.h"
28 #include "QXmppMucIq.h"
29 #include "QXmppPresence.h"
30 
31 class QXmppDataForm;
32 class QXmppDiscoveryIq;
33 class QXmppMessage;
34 class QXmppMucManagerPrivate;
35 class QXmppMucRoom;
36 class QXmppMucRoomPrivate;
37 
58 
59 class QXMPP_EXPORT QXmppMucManager : public QXmppClientExtension
60 {
61  Q_OBJECT
62  Q_PROPERTY(QList<QXmppMucRoom*> rooms READ rooms NOTIFY roomAdded)
63 
64 public:
66  ~QXmppMucManager();
67 
68  QXmppMucRoom *addRoom(const QString &roomJid);
69  QList<QXmppMucRoom*> rooms() const;
70 
72  QStringList discoveryFeatures() const;
73  bool handleStanza(const QDomElement &element);
75 
76 signals:
78  void invitationReceived(const QString &roomJid, const QString &inviter, const QString &reason);
79 
81  void roomAdded(QXmppMucRoom *room);
82 
83 protected:
85  void setClient(QXmppClient* client);
87 
88 private slots:
89  void _q_messageReceived(const QXmppMessage &message);
90  void _q_roomDestroyed(QObject *object);
91 
92 private:
93  QXmppMucManagerPrivate *d;
94 };
95 
100 
101 class QXMPP_EXPORT QXmppMucRoom : public QObject
102 {
103  Q_OBJECT
104  Q_FLAGS(Action Actions)
105  Q_PROPERTY(QXmppMucRoom::Actions allowedActions READ allowedActions NOTIFY allowedActionsChanged)
106  Q_PROPERTY(bool isJoined READ isJoined NOTIFY isJoinedChanged)
107  Q_PROPERTY(QString jid READ jid CONSTANT)
108  Q_PROPERTY(QString name READ name NOTIFY nameChanged)
109  Q_PROPERTY(QString nickName READ nickName WRITE setNickName NOTIFY nickNameChanged)
110  Q_PROPERTY(QStringList participants READ participants NOTIFY participantsChanged)
111  Q_PROPERTY(QString password READ password WRITE setPassword)
112  Q_PROPERTY(QString subject READ subject WRITE setSubject NOTIFY subjectChanged)
113 
114 public:
115 
117  enum Action {
118  NoAction = 0,
119  SubjectAction = 1,
120  ConfigurationAction = 2,
121  PermissionsAction = 4,
122  KickAction = 8,
123  };
124  Q_DECLARE_FLAGS(Actions, Action)
125 
126  ~QXmppMucRoom();
127 
128  Actions allowedActions() const;
129  bool isJoined() const;
130  QString jid() const;
131  QString name() const;
132 
133  QString nickName() const;
134  void setNickName(const QString &nickName);
135 
136  Q_INVOKABLE QString participantFullJid(const QString &jid) const;
137  QXmppPresence participantPresence(const QString &jid) const;
138  QStringList participants() const;
139 
140  QString password() const;
141  void setPassword(const QString &password);
142 
143  QString subject() const;
144  void setSubject(const QString &subject);
145 
146 signals:
148  void allowedActionsChanged(QXmppMucRoom::Actions actions) const;
149 
151  void configurationReceived(const QXmppDataForm &configuration);
152 
154  void error(const QXmppStanza::Error &error);
155 
157  void joined();
158 
160  void kicked(const QString &jid, const QString &reason);
161 
163  void isJoinedChanged();
165 
167  void left();
168 
170  void messageReceived(const QXmppMessage &message);
171 
173  void nameChanged(const QString &name);
174 
176  void nickNameChanged(const QString &nickName);
177 
179  void participantAdded(const QString &jid);
180 
182  void participantChanged(const QString &jid);
183 
185  void participantRemoved(const QString &jid);
186 
188  void participantsChanged();
190 
192  void permissionsReceived(const QList<QXmppMucItem> &permissions);
193 
195  void subjectChanged(const QString &subject);
196 
197 public slots:
198  bool ban(const QString &jid, const QString &reason);
199  bool join();
200  bool kick(const QString &jid, const QString &reason);
201  bool leave(const QString &message = QString());
202  bool requestConfiguration();
203  bool requestPermissions();
204  bool setConfiguration(const QXmppDataForm &form);
205  bool setPermissions(const QList<QXmppMucItem> &permissions);
206  bool sendInvitation(const QString &jid, const QString &reason);
207  bool sendMessage(const QString &text);
208 
209 private slots:
210  void _q_disconnected();
211  void _q_discoveryInfoReceived(const QXmppDiscoveryIq &iq);
212  void _q_messageReceived(const QXmppMessage &message);
213  void _q_presenceReceived(const QXmppPresence &presence);
214 
215 private:
216  QXmppMucRoom(QXmppClient *client, const QString &jid, QObject *parent);
217  QXmppMucRoomPrivate *d;
218  friend class QXmppMucManager;
219 };
220 
221 Q_DECLARE_OPERATORS_FOR_FLAGS(QXmppMucRoom::Actions)
222 
223 #endif
qxmpp-0.7.6/doc/html/classQXmppIceConnection-members.html0000644000175000007640000003432412116723632023405 0ustar sharkyjerryweb QXmpp: Member List
QXmppIceConnection Member List

This is the complete list of members for QXmppIceConnection, including all inherited members.

addComponent(int component)QXmppIceConnection
addRemoteCandidate(const QXmppJingleCandidate &candidate)QXmppIceConnection
bind(const QList< QHostAddress > &addresses)QXmppIceConnection
close()QXmppIceConnectionslot
component(int component)QXmppIceConnection
connected()QXmppIceConnectionsignal
connectToHost()QXmppIceConnectionslot
debug(const QString &message)QXmppLoggableinlineprotected
disconnected()QXmppIceConnectionsignal
info(const QString &message)QXmppLoggableinlineprotected
isConnected() const QXmppIceConnection
localCandidates() const QXmppIceConnection
localCandidatesChanged()QXmppIceConnectionsignal
localPassword() const QXmppIceConnection
localUser() const QXmppIceConnection
logMessage(QXmppLogger::MessageType type, const QString &msg)QXmppLoggablesignal
logReceived(const QString &message)QXmppLoggableinlineprotected
logSent(const QString &message)QXmppLoggableinlineprotected
QXmppIceConnection(QObject *parent=0)QXmppIceConnection
QXmppLoggable(QObject *parent=0)QXmppLoggable
setGauge(const QString &gauge, double value)QXmppLoggablesignal
setIceControlling(bool controlling)QXmppIceConnection
setLocalPassword(const QString &password)QXmppIceConnection
setLocalUser(const QString &user)QXmppIceConnection
setRemotePassword(const QString &password)QXmppIceConnection
setRemoteUser(const QString &user)QXmppIceConnection
setStunServer(const QHostAddress &host, quint16 port=3478)QXmppIceConnection
setTurnPassword(const QString &password)QXmppIceConnection
setTurnServer(const QHostAddress &host, quint16 port=3478)QXmppIceConnection
setTurnUser(const QString &user)QXmppIceConnection
updateCounter(const QString &counter, qint64 amount=1)QXmppLoggablesignal
warning(const QString &message)QXmppLoggableinlineprotected
qxmpp-0.7.6/doc/html/classQXmppIceConnection.html0000644000175000007640000007576412116723632021772 0ustar sharkyjerryweb QXmpp: QXmppIceConnection Class Reference
QXmppIceConnection Class Reference

The QXmppIceConnection class represents a set of UDP sockets capable of performing Interactive Connectivity Establishment (RFC 5245). More...

#include <QXmppStun.h>

Inheritance diagram for QXmppIceConnection:
QXmppLoggable

Public Slots

void close ()
 Closes the ICE connection.
void connectToHost ()
 Starts ICE connectivity checks.

Signals

void connected ()
 This signal is emitted once ICE negotiation succeeds.
void disconnected ()
 This signal is emitted when ICE negotiation fails.
void localCandidatesChanged ()
 This signal is emitted when the list of local candidates changes.
- Signals inherited from QXmppLoggable
void setGauge (const QString &gauge, double value)
 Sets the given gauge to value.
void logMessage (QXmppLogger::MessageType type, const QString &msg)
 This signal is emitted to send logging messages.
void updateCounter (const QString &counter, qint64 amount=1)
 Updates the given counter by amount.

Public Member Functions

 QXmppIceConnection (QObject *parent=0)
QXmppIceComponentcomponent (int component)
void addComponent (int component)
void setIceControlling (bool controlling)
 Sets whether the local party has the ICE controlling role.
QList< QXmppJingleCandidatelocalCandidates () const
QString localUser () const
 Returns the local user fragment.
void setLocalUser (const QString &user)
QString localPassword () const
 Returns the local password.
void setLocalPassword (const QString &password)
void addRemoteCandidate (const QXmppJingleCandidate &candidate)
void setRemoteUser (const QString &user)
void setRemotePassword (const QString &password)
void setStunServer (const QHostAddress &host, quint16 port=3478)
void setTurnServer (const QHostAddress &host, quint16 port=3478)
void setTurnUser (const QString &user)
void setTurnPassword (const QString &password)
bool bind (const QList< QHostAddress > &addresses)
bool isConnected () const
 Returns true if ICE negotiation completed, false otherwise.
- Public Member Functions inherited from QXmppLoggable
 QXmppLoggable (QObject *parent=0)

Additional Inherited Members

- Protected Member Functions inherited from QXmppLoggable
void debug (const QString &message)
void info (const QString &message)
void warning (const QString &message)
void logReceived (const QString &message)
void logSent (const QString &message)

Detailed Description

The QXmppIceConnection class represents a set of UDP sockets capable of performing Interactive Connectivity Establishment (RFC 5245).

Constructor & Destructor Documentation

QXmppIceConnection::QXmppIceConnection ( QObject *  parent = 0)

Constructs a new ICE connection.

Parameters
parent

Member Function Documentation

void QXmppIceConnection::addComponent ( int  component)

Adds a component to this ICE connection, for instance 1 for RTP or 2 for RTCP.

Parameters
component
void QXmppIceConnection::addRemoteCandidate ( const QXmppJingleCandidate candidate)

Adds a candidate for one of the remote components.

Parameters
candidate
bool QXmppIceConnection::bind ( const QList< QHostAddress > &  addresses)

Binds the local sockets to the specified addresses.

Parameters
addressesThe addresses on which to listen.
QXmppIceComponent * QXmppIceConnection::component ( int  component)

Returns the given component of this ICE connection.

Parameters
component
QList< QXmppJingleCandidate > QXmppIceConnection::localCandidates ( ) const

Returns the list of local HOST CANDIDATES candidates by iterating over the available network interfaces.

void QXmppIceConnection::setLocalPassword ( const QString &  password)

Sets the local password.

You do not usually need to call this as one is automatically generated.

Parameters
password
void QXmppIceConnection::setLocalUser ( const QString &  user)

Sets the local user fragment.

You do not usually need to call this as one is automatically generated.

Parameters
user
void QXmppIceConnection::setRemotePassword ( const QString &  password)

Sets the remote password.

Parameters
password
void QXmppIceConnection::setRemoteUser ( const QString &  user)

Sets the remote user fragment.

Parameters
user
void QXmppIceConnection::setStunServer ( const QHostAddress &  host,
quint16  port = 3478 
)

Sets the STUN server to use to determine server-reflexive addresses and ports.

Parameters
hostThe address of the STUN server.
portThe port of the STUN server.
void QXmppIceConnection::setTurnPassword ( const QString &  password)

Sets the password used for authentication with the TURN server.

Parameters
password
void QXmppIceConnection::setTurnServer ( const QHostAddress &  host,
quint16  port = 3478 
)

Sets the TURN server to use to relay packets in double-NAT configurations.

Parameters
hostThe address of the TURN server.
portThe port of the TURN server.
void QXmppIceConnection::setTurnUser ( const QString &  user)

Sets the user used for authentication with the TURN server.

Parameters
user

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppOutgoingClient.html0000644000175000007640000005676312116723632022202 0ustar sharkyjerryweb QXmpp: QXmppOutgoingClient Class Reference
QXmppOutgoingClient Class Reference

The QXmppOutgoingClient class represents an outgoing XMPP stream to an XMPP server. More...

#include <QXmppOutgoingClient.h>

Inheritance diagram for QXmppOutgoingClient:
QXmppStream QXmppLoggable

Signals

void error (QXmppClient::Error)
 This signal is emitted when an error is encountered.
void elementReceived (const QDomElement &element, bool &handled)
 This signal is emitted when an element is received.
void presenceReceived (const QXmppPresence &)
 This signal is emitted when a presence is received.
void messageReceived (const QXmppMessage &)
 This signal is emitted when a message is received.
void iqReceived (const QXmppIq &)
 This signal is emitted when an IQ is received.
- Signals inherited from QXmppStream
void connected ()
 This signal is emitted when the stream is connected.
void disconnected ()
 This signal is emitted when the stream is disconnected.
- Signals inherited from QXmppLoggable
void setGauge (const QString &gauge, double value)
 Sets the given gauge to value.
void logMessage (QXmppLogger::MessageType type, const QString &msg)
 This signal is emitted to send logging messages.
void updateCounter (const QString &counter, qint64 amount=1)
 Updates the given counter by amount.

Public Member Functions

 QXmppOutgoingClient (QObject *parent)
 ~QXmppOutgoingClient ()
 Destroys an outgoing client stream.
void connectToHost ()
 Attempts to connect to the XMPP server.
bool isAuthenticated () const
 Returns true if authentication has succeeded.
bool isConnected () const
 Returns true if the socket is connected and a session has been started.
QSslSocket * socket () const
QXmppStanza::Error::Condition xmppStreamError ()
 Returns the type of the last XMPP stream error that occured.
QXmppConfigurationconfiguration ()
 Returns a reference to the stream's configuration.
- Public Member Functions inherited from QXmppStream
 QXmppStream (QObject *parent)
 ~QXmppStream ()
 Destroys a base XMPP stream.
bool sendPacket (const QXmppStanza &)
- Public Member Functions inherited from QXmppLoggable
 QXmppLoggable (QObject *parent=0)

Friends

class QXmppOutgoingClientPrivate

Additional Inherited Members

- Public Slots inherited from QXmppStream
virtual void disconnectFromHost ()
virtual bool sendData (const QByteArray &)
- Protected Member Functions inherited from QXmppStream
void setSocket (QSslSocket *socket)
virtual void handleStart ()
virtual void handleStanza (const QDomElement &element)=0
virtual void handleStream (const QDomElement &element)=0

Detailed Description

The QXmppOutgoingClient class represents an outgoing XMPP stream to an XMPP server.

Constructor & Destructor Documentation

QXmppOutgoingClient::QXmppOutgoingClient ( QObject *  parent)

Constructs an outgoing client stream.

Parameters
parent

Member Function Documentation

QSslSocket* QXmppOutgoingClient::socket ( ) const
inline

Returns the QSslSocket used for this stream.

Reimplemented from QXmppStream.


The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppRtpVideoChannel.html0000644000175000007640000005075312116723632022266 0ustar sharkyjerryweb QXmpp: QXmppRtpVideoChannel Class Reference
QXmppRtpVideoChannel Class Reference

The QXmppRtpVideoChannel class represents an RTP video channel to a remote party. More...

#include <QXmppRtpChannel.h>

Inheritance diagram for QXmppRtpVideoChannel:
QXmppLoggable

Public Slots

void datagramReceived (const QByteArray &ba)

Signals

void sendDatagram (const QByteArray &ba)
 This signal is emitted when a datagram needs to be sent.
- Signals inherited from QXmppLoggable
void setGauge (const QString &gauge, double value)
 Sets the given gauge to value.
void logMessage (QXmppLogger::MessageType type, const QString &msg)
 This signal is emitted to send logging messages.
void updateCounter (const QString &counter, qint64 amount=1)
 Updates the given counter by amount.

Public Member Functions

 QXmppRtpVideoChannel (QObject *parent=0)
 Constructs a new RTP video channel with the given parent.
void close ()
 Closes the RTP video channel.
QIODevice::OpenMode openMode () const
 Returns the mode in which the channel has been opened.
QXmppVideoFormat decoderFormat () const
 Returns the video format used by the encoder.
QList< QXmppVideoFramereadFrames ()
 Decodes buffered RTP packets and returns a list of video frames.
QXmppVideoFormat encoderFormat () const
 Returns the video format used by the encoder.
void setEncoderFormat (const QXmppVideoFormat &format)
 Sets the video format used by the encoder.
void writeFrame (const QXmppVideoFrame &frame)
 Encodes a video frame and sends RTP packets.
- Public Member Functions inherited from QXmppLoggable
 QXmppLoggable (QObject *parent=0)
- Public Member Functions inherited from QXmppRtpChannel
 QXmppRtpChannel ()
 Creates a new RTP channel.
virtual void close ()=0
 Closes the RTP channel.
virtual QIODevice::OpenMode openMode () const =0
 Returns the mode in which the channel has been opened.
QList< QXmppJinglePayloadTypelocalPayloadTypes ()
void setRemotePayloadTypes (const QList< QXmppJinglePayloadType > &remotePayloadTypes)

Friends

class QXmppRtpVideoChannelPrivate

Additional Inherited Members

- Protected Member Functions inherited from QXmppLoggable
void debug (const QString &message)
void info (const QString &message)
void warning (const QString &message)
void logReceived (const QString &message)
void logSent (const QString &message)

Detailed Description

The QXmppRtpVideoChannel class represents an RTP video channel to a remote party.

Note
THIS API IS NOT FINALIZED YET

Member Function Documentation

void QXmppRtpVideoChannel::datagramReceived ( const QByteArray &  ba)
slot

Processes an incoming RTP video packet.

Parameters
ba

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppVCardPhone-members.html0000644000175000007640000002572712116723632022665 0ustar sharkyjerryweb QXmpp: Member List
QXmppVCardPhone Member List

This is the complete list of members for QXmppVCardPhone, including all inherited members.

BBS enum value (defined in QXmppVCardPhone)QXmppVCardPhone
Cell enum value (defined in QXmppVCardPhone)QXmppVCardPhone
Fax enum value (defined in QXmppVCardPhone)QXmppVCardPhone
Home enum value (defined in QXmppVCardPhone)QXmppVCardPhone
ISDN enum value (defined in QXmppVCardPhone)QXmppVCardPhone
Messaging enum value (defined in QXmppVCardPhone)QXmppVCardPhone
Modem enum value (defined in QXmppVCardPhone)QXmppVCardPhone
None enum value (defined in QXmppVCardPhone)QXmppVCardPhone
number() const QXmppVCardPhone
operator=(const QXmppVCardPhone &other)QXmppVCardPhone
Pager enum value (defined in QXmppVCardPhone)QXmppVCardPhone
PCS enum value (defined in QXmppVCardPhone)QXmppVCardPhone
Preferred enum value (defined in QXmppVCardPhone)QXmppVCardPhone
QXmppVCardPhone()QXmppVCardPhone
QXmppVCardPhone(const QXmppVCardPhone &other)QXmppVCardPhone
setNumber(const QString &number)QXmppVCardPhone
setType(Type type)QXmppVCardPhone
type() const QXmppVCardPhone
TypeFlag enum nameQXmppVCardPhone
Video enum value (defined in QXmppVCardPhone)QXmppVCardPhone
Voice enum value (defined in QXmppVCardPhone)QXmppVCardPhone
Work enum value (defined in QXmppVCardPhone)QXmppVCardPhone
~QXmppVCardPhone() (defined in QXmppVCardPhone)QXmppVCardPhone
qxmpp-0.7.6/doc/html/classQXmppIncomingClient.png0000644000175000007640000000153112116723632021751 0ustar sharkyjerrywebPNG  IHDR dS`PLTEutRNST2IDATx DM_4蘛R_۝eΎs#,Id I}4}qM?Yf4ƗAӱXX:89Ufɒ$`=@5cvj]0Մv=:K ﻵv|W@z}a4\#DId{t{w<5•׆$yHxGo5$sH2scF( $Lc  )@SL0`  )@S $G0Y" Lg i<|%I.q2KH)[!f /5t&1^+?8ŒN \ u$m:H;.BEY{=B6}R+Ԏ}C HXJjmkZY !ڥH:fy,PmHҶm!KgId I@ry|vdc a@b0`  )@SL0` &0`@Kq>%H('?=,7H(CF k٭k.4ӉzvG[һ&tJMz^e.4?Òڃr7' z=>4zv[ =)W֑տ~k< Vƞ5x= QXmpp: QXmppSessionIq.h Source File
QXmpp  Version:0.7.6
QXmppSessionIq.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Manjeet Dahiya
6  * Jeremy Lainé
7  *
8  * Source:
9  * http://code.google.com/p/qxmpp
10  *
11  * This file is a part of QXmpp library.
12  *
13  * This library is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU Lesser General Public
15  * License as published by the Free Software Foundation; either
16  * version 2.1 of the License, or (at your option) any later version.
17  *
18  * This library is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21  * Lesser General Public License for more details.
22  *
23  */
24 
25 
26 #ifndef QXMPPSESSIONIQ_H
27 #define QXMPPSESSIONIQ_H
28 
29 #include "QXmppIq.h"
30 
35 
36 class QXMPP_EXPORT QXmppSessionIq : public QXmppIq
37 {
38 public:
40  static bool isSessionIq(const QDomElement &element);
42 
43 private:
45  void toXmlElementFromChild(QXmlStreamWriter *writer) const;
47 };
48 
49 #endif // QXMPPSESSION_H
qxmpp-0.7.6/doc/html/classQXmppJingleIq.png0000644000175000007640000000130212116723632020545 0ustar sharkyjerrywebPNG  IHDRauPLTEutRNST2QIDATxγ*Eʷ) pcSKDA,lpÕ$ /V %q{Z!O1~t)xB?qRu!\NǮ *Ps&R!=Jah(a*C]3ZݩZ* !;KG]2fBīZʊtSt2Hқ,$Y|3x `* 6[1ݰ &+D--2X,2X,2X,o~*xI2HkpÕ$u\yK{OHtB0Lt枡h}6{s74tj6JNZM$. I_1xL^btöVL7Ɋ?QK` ` ` `眛 `"`UޏgfJGcd֛ UWT]! ?ąil`HEM3МeyzOfwv6gL9n26īAOsUKO<؊!~ATGSK`ںj `D[ O?OF_s7@s`xe9f:(0KIENDB`qxmpp-0.7.6/doc/html/classQXmppArchivePrefIq.html0000644000175000007640000002457312116723632021732 0ustar sharkyjerryweb QXmpp: QXmppArchivePrefIq Class Reference
QXmppArchivePrefIq Class Reference

Represents an archive preference IQ as defined by XEP-0136: Message Archiving. More...

#include <QXmppArchiveIq.h>

Inheritance diagram for QXmppArchivePrefIq:
QXmppIq QXmppStanza

Additional Inherited Members

- Public Types inherited from QXmppIq
enum  Type { Error = 0, Get, Set, Result }
 This enum describes the type of IQ. More...
- Public Member Functions inherited from QXmppIq
 QXmppIq (QXmppIq::Type type=QXmppIq::Get)
 QXmppIq (const QXmppIq &other)
 Constructs a copy of other.
QXmppIqoperator= (const QXmppIq &other)
 Assigns other to this IQ.
QXmppIq::Type type () const
void setType (QXmppIq::Type)

Detailed Description

Represents an archive preference IQ as defined by XEP-0136: Message Archiving.


The documentation for this class was generated from the following file:
qxmpp-0.7.6/doc/html/classQXmppRtpAudioChannel.html0000644000175000007640000006523112116723632022256 0ustar sharkyjerryweb QXmpp: QXmppRtpAudioChannel Class Reference
QXmppRtpAudioChannel Class Reference

The QXmppRtpAudioChannel class represents an RTP audio channel to a remote party. More...

#include <QXmppRtpChannel.h>

Inherits QXmppRtpChannel.

Public Types

enum  Tone {
  Tone_0 = 0, Tone_1, Tone_2, Tone_3,
  Tone_4, Tone_5, Tone_6, Tone_7,
  Tone_8, Tone_9, Tone_Star, Tone_Pound,
  Tone_A, Tone_B, Tone_C, Tone_D
}
 This enum is used to describe a DTMF tone. More...

Public Slots

void datagramReceived (const QByteArray &ba)
void startTone (QXmppRtpAudioChannel::Tone tone)
void stopTone (QXmppRtpAudioChannel::Tone tone)

Signals

void sendDatagram (const QByteArray &ba)
 This signal is emitted when a datagram needs to be sent.
void logMessage (QXmppLogger::MessageType type, const QString &msg)
 This signal is emitted to send logging messages.

Public Member Functions

 QXmppRtpAudioChannel (QObject *parent=0)
 Constructs a new RTP audio channel with the given parent.
 ~QXmppRtpAudioChannel ()
qint64 bytesAvailable () const
 Returns the number of bytes that are available for reading.
void close ()
 Closes the RTP audio channel.
bool isSequential () const
QIODevice::OpenMode openMode () const
 Returns the mode in which the channel has been opened.
QXmppJinglePayloadType payloadType () const
qint64 pos () const
 Returns the position in the received audio data.
bool seek (qint64 pos)
- Public Member Functions inherited from QXmppRtpChannel
 QXmppRtpChannel ()
 Creates a new RTP channel.
virtual void close ()=0
 Closes the RTP channel.
virtual QIODevice::OpenMode openMode () const =0
 Returns the mode in which the channel has been opened.
QList< QXmppJinglePayloadTypelocalPayloadTypes ()
void setRemotePayloadTypes (const QList< QXmppJinglePayloadType > &remotePayloadTypes)

Friends

class QXmppRtpAudioChannelPrivate

Detailed Description

The QXmppRtpAudioChannel class represents an RTP audio channel to a remote party.

It acts as a QIODevice so that you can read / write audio samples, for instance using a QAudioOutput and a QAudioInput.

Note
THIS API IS NOT FINALIZED YET

Member Enumeration Documentation

This enum is used to describe a DTMF tone.

Enumerator:
Tone_0 

Tone for the 0 key.

Tone_1 

Tone for the 1 key.

Tone_2 

Tone for the 2 key.

Tone_3 

Tone for the 3 key.

Tone_4 

Tone for the 4 key.

Tone_5 

Tone for the 5 key.

Tone_6 

Tone for the 6 key.

Tone_7 

Tone for the 7 key.

Tone_8 

Tone for the 8 key.

Tone_9 

Tone for the 9 key.

Tone_Star 

Tone for the * key.

Tone_Pound 

Tone for the # key.

Tone_A 

Tone for the A key.

Tone_B 

Tone for the B key.

Tone_C 

Tone for the C key.

Tone_D 

Tone for the D key.

Constructor & Destructor Documentation

QXmppRtpAudioChannel::~QXmppRtpAudioChannel ( )

Destroys an RTP audio channel.

Member Function Documentation

void QXmppRtpAudioChannel::datagramReceived ( const QByteArray &  ba)
slot

Processes an incoming RTP packet.

Parameters
ba
bool QXmppRtpAudioChannel::isSequential ( ) const

Returns true, as the RTP channel is a sequential device.

QXmppJinglePayloadType QXmppRtpAudioChannel::payloadType ( ) const

Returns the RTP channel's payload type.

You can use this to determine the QAudioFormat to use with your QAudioInput/QAudioOutput.

bool QXmppRtpAudioChannel::seek ( qint64  pos)

Seeks in the received audio data.

Seeking backwards will result in empty samples being added at the start of the buffer.

Parameters
pos
void QXmppRtpAudioChannel::startTone ( QXmppRtpAudioChannel::Tone  tone)
slot

Starts sending the specified DTMF tone.

Parameters
tone
void QXmppRtpAudioChannel::stopTone ( QXmppRtpAudioChannel::Tone  tone)
slot

Stops sending the specified DTMF tone.

Parameters
tone

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppVCardAddress.html0000644000175000007640000003456512116723632021551 0ustar sharkyjerryweb QXmpp: QXmppVCardAddress Class Reference
QXmppVCardAddress Class Reference

Represent a vCard address. More...

#include <QXmppVCardIq.h>

Public Types

enum  TypeFlag {
  None = 0x0, Home = 0x1, Work = 0x2, Postal = 0x4,
  Preferred = 0x8
}
 Describes e-mail address types.

Public Member Functions

 QXmppVCardAddress ()
 Constructs an empty address.
 QXmppVCardAddress (const QXmppVCardAddress &other)
 Constructs a copy of other.
QXmppVCardAddressoperator= (const QXmppVCardAddress &other)
 Assigns other to this address.
QString country () const
 Returns the country.
void setCountry (const QString &country)
 Sets the country.
QString locality () const
 Returns the locality.
void setLocality (const QString &locality)
 Sets the locality.
QString postcode () const
 Returns the postcode.
void setPostcode (const QString &postcode)
 Sets the postcode.
QString region () const
 Returns the region.
void setRegion (const QString &region)
 Sets the region.
QString street () const
 Returns the street address.
void setStreet (const QString &street)
 Sets the street address.
Type type () const
 Returns the address type, which is a combination of TypeFlag.
void setType (Type type)
 Sets the address type, which is a combination of TypeFlag.

Detailed Description

Represent a vCard address.


The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppVCardManager-members.html0000644000175000007640000003065112116723632023156 0ustar sharkyjerryweb QXmpp: Member List
QXmppVCardManager Member List

This is the complete list of members for QXmppVCardManager, including all inherited members.

client()QXmppClientExtensionprotected
clientVCard() const QXmppVCardManager
clientVCardReceived()QXmppVCardManagersignal
debug(const QString &message)QXmppLoggableinlineprotected
discoveryFeatures() const QXmppClientExtensionvirtual
discoveryIdentities() const QXmppClientExtensionvirtual
handleStanza(const QDomElement &stanza)=0QXmppClientExtensionpure virtual
info(const QString &message)QXmppLoggableinlineprotected
isClientVCardReceived() const QXmppVCardManager
logMessage(QXmppLogger::MessageType type, const QString &msg)QXmppLoggablesignal
logReceived(const QString &message)QXmppLoggableinlineprotected
logSent(const QString &message)QXmppLoggableinlineprotected
QXmppClientExtension()QXmppClientExtension
QXmppLoggable(QObject *parent=0)QXmppLoggable
QXmppVCardManager() (defined in QXmppVCardManager)QXmppVCardManager
requestClientVCard()QXmppVCardManager
requestVCard(const QString &bareJid="")QXmppVCardManager
setClient(QXmppClient *client)QXmppClientExtensionprotectedvirtual
setClientVCard(const QXmppVCardIq &)QXmppVCardManager
setGauge(const QString &gauge, double value)QXmppLoggablesignal
updateCounter(const QString &counter, qint64 amount=1)QXmppLoggablesignal
vCardReceived(const QXmppVCardIq &)QXmppVCardManagersignal
warning(const QString &message)QXmppLoggableinlineprotected
~QXmppClientExtension()QXmppClientExtensionvirtual
~QXmppVCardManager() (defined in QXmppVCardManager)QXmppVCardManager
qxmpp-0.7.6/doc/html/classQXmppRtpPacket.html0000644000175000007640000002710112116723632021125 0ustar sharkyjerryweb QXmpp: QXmppRtpPacket Class Reference

The QXmppRtpPacket class represents an RTP packet. More...

#include <QXmppRtpChannel.h>

Public Member Functions

bool decode (const QByteArray &ba)
QByteArray encode () const
 Encodes an RTP packet.
QString toString () const
 Returns a string representation of the RTP header.

Public Attributes

quint8 version
 RTP version.
bool marker
 Marker flag.
quint8 type
 Payload type.
quint32 ssrc
 Synchronization source.
QList< quint32 > csrc
 Contributing sources.
quint16 sequence
 Sequence number.
quint32 stamp
 Timestamp.
QByteArray payload
 Raw payload data.

Detailed Description

The QXmppRtpPacket class represents an RTP packet.

Member Function Documentation

bool QXmppRtpPacket::decode ( const QByteArray &  ba)

Parses an RTP packet.

Parameters
ba

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/QXmppStream_8h_source.html0000644000175000007640000004025012116723632021414 0ustar sharkyjerryweb QXmpp: QXmppStream.h Source File
QXmpp  Version:0.7.6
QXmppStream.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Authors:
5  * Manjeet Dahiya
6  * Jeremy Lainé
7  *
8  * Source:
9  * http://code.google.com/p/qxmpp
10  *
11  * This file is a part of QXmpp library.
12  *
13  * This library is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU Lesser General Public
15  * License as published by the Free Software Foundation; either
16  * version 2.1 of the License, or (at your option) any later version.
17  *
18  * This library is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21  * Lesser General Public License for more details.
22  *
23  */
24 
25 
26 #ifndef QXMPPSTREAM_H
27 #define QXMPPSTREAM_H
28 
29 #include <QAbstractSocket>
30 #include <QObject>
31 #include "QXmppLogger.h"
32 
33 class QDomElement;
34 class QSslSocket;
35 class QXmppStanza;
36 class QXmppStreamPrivate;
37 
40 
41 class QXMPP_EXPORT QXmppStream : public QXmppLoggable
42 {
43  Q_OBJECT
44 
45 public:
46  QXmppStream(QObject *parent);
47  ~QXmppStream();
48 
49  virtual bool isConnected() const;
50  bool sendPacket(const QXmppStanza&);
51 
52 signals:
54  void connected();
55 
57  void disconnected();
58 
59 protected:
60  // Access to underlying socket
61  QSslSocket *socket() const;
62  void setSocket(QSslSocket *socket);
63 
64  // Overridable methods
65  virtual void handleStart();
66 
70  virtual void handleStanza(const QDomElement &element) = 0;
71 
75  virtual void handleStream(const QDomElement &element) = 0;
76 
77 public slots:
78  virtual void disconnectFromHost();
79  virtual bool sendData(const QByteArray&);
80 
81 private slots:
82  void _q_socketConnected();
83  void _q_socketEncrypted();
84  void _q_socketError(QAbstractSocket::SocketError error);
85  void _q_socketReadyRead();
86 
87 private:
88  QXmppStreamPrivate * const d;
89 };
90 
91 #endif // QXMPPSTREAM_H
qxmpp-0.7.6/doc/html/classQXmppBookmarkSet.html0000644000175000007640000002372212116723632021456 0ustar sharkyjerryweb QXmpp: QXmppBookmarkSet Class Reference
QXmppBookmarkSet Class Reference

The QXmppbookmarkSets class represents a set of bookmarks, as defined by XEP-0048: Bookmarks. More...

#include <QXmppBookmarkSet.h>

Public Member Functions

QList< QXmppBookmarkConferenceconferences () const
void setConferences (const QList< QXmppBookmarkConference > &conferences)
QList< QXmppBookmarkUrlurls () const
void setUrls (const QList< QXmppBookmarkUrl > &urls)

Detailed Description

The QXmppbookmarkSets class represents a set of bookmarks, as defined by XEP-0048: Bookmarks.

Member Function Documentation

QList< QXmppBookmarkConference > QXmppBookmarkSet::conferences ( ) const

Returns the conference rooms bookmarks in this bookmark set.

void QXmppBookmarkSet::setConferences ( const QList< QXmppBookmarkConference > &  conferences)

Sets the conference rooms bookmarks in this bookmark set.

Parameters
conferences
void QXmppBookmarkSet::setUrls ( const QList< QXmppBookmarkUrl > &  urls)

Sets the web page bookmarks in this bookmark set.

Parameters
urls
QList< QXmppBookmarkUrl > QXmppBookmarkSet::urls ( ) const

Returns the web page bookmarks in this bookmark set.


The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppMucRoom-members.html0000644000175000007640000004666612116723632022262 0ustar sharkyjerryweb QXmpp: Member List
QXmppMucRoom Member List

This is the complete list of members for QXmppMucRoom, including all inherited members.

Action enum nameQXmppMucRoom
allowedActionsQXmppMucRoom
allowedActions() const (defined in QXmppMucRoom)QXmppMucRoom
allowedActionsChanged(QXmppMucRoom::Actions actions) const QXmppMucRoomsignal
ban(const QString &jid, const QString &reason)QXmppMucRoomslot
ConfigurationAction enum valueQXmppMucRoom
configurationReceived(const QXmppDataForm &configuration)QXmppMucRoomsignal
error(const QXmppStanza::Error &error)QXmppMucRoomsignal
isJoinedQXmppMucRoom
isJoined() const (defined in QXmppMucRoom)QXmppMucRoom
jidQXmppMucRoom
jid() const (defined in QXmppMucRoom)QXmppMucRoom
join()QXmppMucRoomslot
joined()QXmppMucRoomsignal
kick(const QString &jid, const QString &reason)QXmppMucRoomslot
KickAction enum valueQXmppMucRoom
kicked(const QString &jid, const QString &reason)QXmppMucRoomsignal
leave(const QString &message=QString())QXmppMucRoomslot
left()QXmppMucRoomsignal
messageReceived(const QXmppMessage &message)QXmppMucRoomsignal
nameQXmppMucRoom
name() const (defined in QXmppMucRoom)QXmppMucRoom
nameChanged(const QString &name)QXmppMucRoomsignal
nickNameQXmppMucRoom
nickName() const (defined in QXmppMucRoom)QXmppMucRoom
nickNameChanged(const QString &nickName)QXmppMucRoomsignal
NoAction enum valueQXmppMucRoom
participantAdded(const QString &jid)QXmppMucRoomsignal
participantChanged(const QString &jid)QXmppMucRoomsignal
participantFullJid(const QString &jid) const QXmppMucRoom
participantPresence(const QString &jid) const QXmppMucRoom
participantRemoved(const QString &jid)QXmppMucRoomsignal
participantsQXmppMucRoom
participants() const (defined in QXmppMucRoom)QXmppMucRoom
passwordQXmppMucRoom
password() const (defined in QXmppMucRoom)QXmppMucRoom
PermissionsAction enum valueQXmppMucRoom
permissionsReceived(const QList< QXmppMucItem > &permissions)QXmppMucRoomsignal
QXmppMucManager (defined in QXmppMucRoom)QXmppMucRoomfriend
requestConfiguration()QXmppMucRoomslot
requestPermissions()QXmppMucRoomslot
sendInvitation(const QString &jid, const QString &reason)QXmppMucRoomslot
sendMessage(const QString &text)QXmppMucRoomslot
setConfiguration(const QXmppDataForm &form)QXmppMucRoomslot
setNickName(const QString &nickName)QXmppMucRoom
setPassword(const QString &password)QXmppMucRoom
setPermissions(const QList< QXmppMucItem > &permissions)QXmppMucRoomslot
setSubject(const QString &subject)QXmppMucRoom
subjectQXmppMucRoom
subject() const (defined in QXmppMucRoom)QXmppMucRoom
SubjectAction enum valueQXmppMucRoom
subjectChanged(const QString &subject)QXmppMucRoomsignal
~QXmppMucRoom()QXmppMucRoom
qxmpp-0.7.6/doc/html/classQXmppArchiveChatIq-members.html0000644000175000007640000003236112116723632023337 0ustar sharkyjerryweb QXmpp: Member List
QXmppArchiveChatIq Member List

This is the complete list of members for QXmppArchiveChatIq, including all inherited members.

chat() const QXmppArchiveChatIq
Error enum valueQXmppIq
error() const QXmppStanza
extendedAddresses() const QXmppStanza
extensions() const QXmppStanza
from() const QXmppStanza
Get enum valueQXmppIq
id() const QXmppStanza
lang() const QXmppStanza
operator=(const QXmppIq &other)QXmppIq
QXmppStanza::operator=(const QXmppStanza &other)QXmppStanza
QXmppIq(QXmppIq::Type type=QXmppIq::Get)QXmppIq
QXmppIq(const QXmppIq &other)QXmppIq
QXmppStanza(const QString &from=QString(), const QString &to=QString())QXmppStanza
QXmppStanza(const QXmppStanza &other)QXmppStanza
Result enum valueQXmppIq
resultSetReply() const QXmppArchiveChatIq
Set enum valueQXmppIq
setChat(const QXmppArchiveChat &chat)QXmppArchiveChatIq
setError(const QXmppStanza::Error &error)QXmppStanza
setExtendedAddresses(const QList< QXmppExtendedAddress > &extendedAddresses)QXmppStanza
setExtensions(const QXmppElementList &elements)QXmppStanza
setFrom(const QString &)QXmppStanza
setId(const QString &)QXmppStanza
setLang(const QString &)QXmppStanza
setResultSetReply(const QXmppResultSetReply &rsm)QXmppArchiveChatIq
setTo(const QString &)QXmppStanza
setType(QXmppIq::Type)QXmppIq
to() const QXmppStanza
type() const QXmppIq
Type enum nameQXmppIq
~QXmppIq() (defined in QXmppIq)QXmppIq
~QXmppStanza()QXmppStanzavirtual
qxmpp-0.7.6/doc/html/classQXmppStanza.png0000644000175000007640000002262712116723632020320 0ustar sharkyjerrywebPNG  IHDR WPLTEutRNST2%&IDATxvљ%$b>N P،퓪/zyyy"C"4K,)B@;ܵ yHI!_ ?<&)B}_F3-~s㲹\X>ߚz.|&)?)^Ύ URϓyVz8/ӛUN'"C1+ ntefLؽ.5^!{_XEmK;erN|~YCI!?or"C"4Kl<)?$)B@͒"4KeP-'!!UR^%E!]BfI%Eh!YRfI%Eh!YRfIr:Nq:Nԟ"@~CRCoHyH I~  !)!7$E<$?ߐ"@~CRCoHyH I~  !)!7$E<$_~i_si5yi7rjHyȪߐ~ YUbU!~CR%|!W~Ѫkg=A֏#f?G[]N<3/?R'eۯMTU[o~C.W)~_w&o~뿒'-_}g͊_Bx3I5QUufo7)^rUU;"9OMq3}p^?lvk k"" +sjo,͑mC[C)hKqյIf681UU;Ig{)ܽ Z"=gťYhMG)OIΊ{~wU/-/U;)ߗ]j8/7)ϯr|xrUUmU/HG$Eh!0)VU=ER%Eh!YRfI=,i1AX"|ARfI%Eh!YRfI%Eh!YRfI%Eh!YRfI%Eh!YRfI%Eh!YRfI%Eh!YRfI%Eh!YRfI%EhicyXUUCJ0͒"4K,)B@gzGUU^\\x҃>)€o몪:{w.)_7u|k/{;7oMIԒ9Tȶ-!uwڝaD=)ۣ6)̦۫;)€:9N:6.]KN#ܙg5w?=l;)€7+KAMWn&yra@OL}ܥy7sfyIqs~Sv۷%EbUձŶw$E"4Kl%)€"4K,)B@4MӘ `,J )B@͒"4K,)B@͒"4K,)B@͒"4K,)B@͒"4K,)B@͒"4K,)B@͒"4K,)B@͒"4K,)B@͒"4{T4M<,Ū!%EPRfI%Eh!S|y}磪{n/.gn.}_uk" )m>)6>axNq3^ˇnMqva=u\~ŪcŶ"+)B@:SzJ,)B@͒"4{X4Mc<*E͒"4K,)B@͒"4K,)B@͒"4K,)B@͒"4K,)B@͒"4K,)B@͒"4K,)B@͒"4K,)B@͒"4KQ)N4 a@I%Eh!YRfO}w>)€o:"Nq3^ˇnMqva==7뀫'ER:6~[n$EP{kUῦ;ťsݥa@)6Z9z}n\o?UU}*)€S:ƒ"aI%Eh6rUU/)€"4K,)B@4MӘ `,J )B@͒"4K,)B@͒"4K,)B@͒"4K,)B@͒"4K,)B@͒"4K,)B@͒"4K,)B@͒"4K,)B@͒"4{T4M<,Ū!%EPRfI%Eh!Yo/|TUu՛뉏M0 6tt9)DgK> ga[gy2|#I4HssMsdKy벼;ttꎤ%u{]UG>a@)g^Itz/ϊswhVɶꞤ/Qz|p\UG" 5u^6ԷwHRXUul]w]K7aUI:+rUNRi#)€"4K,)B@4MӘ `,J )B@͒"4K,)B@͒"4K,)B@͒"4K,)B@͒"4K,)B@͒"4K,)B@͒"4K,)B@͒"4K,)B@͒"4{T4M<,Ū!%EPRfI%Eh!S|y}磪C+G#s۫gv" )m>hfwI'Drp]>lwks)uurŪ+Iԗ⹨fλN{UUW" 1u{y'oz{JR5x<+Kuo)͊ ﶦK륮I'ϊ(n)OUU{IߗכΓv-K}TU%ES:[~*)Ÿ!YRfXUI!YRfI%EhicyTI%Eh!YRfI%Eh!YRfI%Eh!YRfI%Eh!YRfI%Eh!YRfI%Eh!YRfI%Eh!YRfI%Eh!٣Ria)VU ))€"4K,)B@͞}?UU:_9q{>a@MqmA0KmmJ:yjK! gvx\_bL{pj')€R\zyfqtN|9Ba@m)]IQsaUNR==sUY^+)t:NpVܮU/wS/zxRߛ8^'ɪzn:Tm]egu[UNR=9Ūc"I%Eh6LUUOa@I%Eh!YRfKqiL0G_!YRfI%Eh!YRfI%Eh!YRfI%Eh!YRfI%Eh!YRfI%Eh!YRfI%Eh!YRfI%Eh!YRfI=*iAAXbUՐ" ()B@͒"4KЬ-ŗ~>:6nsoI0 64:UUI07^ˇn,gכ7g_?|\dR878748w]x.컱AUI4@vok;]ߞ]:a@)SfMͩ _S^"mM⥥xuv3j}'EsR| 5Kj/U{LPRXUul)㠪I$Eh!ـ)VU=PR%Eh!YRfI=,i1AX"|ARfI%Eh!YRfI%Eh!YRfI%Eh!YRfI%Eh!YRfI%Eh!YRfI%Eh!YRfI%Eh!YRfI%EhicyXUUCJ0͒"4K,)B@_^_۸۫3WOR5fMUUג"7$sp]>v,{_6,?,2)€S\z/hlN[-Y.#.i^FTUK0.N"7wm}'ER_딷nS\e.c:a@_N1)Ÿ3+^ ;Jq/û tFTUK0ߗՃeBy5UUG" +Ūcև}>")€Xꮤ_ո꾤x)VU=RR%Eh!YRfI=,i1AX"|ARfI%Eh!YRfI%Eh!YRfI%Eh!YRfI%Eh!YRfI%Eh!YRfI%Eh!YRfI%Eh!YRfI%EhicyXUUCJ0͒"4K,)B@_^_۸W']UwRufMIS\9g8{.ve}u̷͗PdR{Kss2nr>'x>O$u{{v'|Rq5Ny6u~ItzΊsSܷY"4ΊŽR)^=OL}]g{Yy/ 2ϫx]"I)VU[<ڽ"II%Eh6hUUa@I%Eh!YRfKqiL0G_!YRfI%Eh!YRfI%Eh!YRfI%Eh!YRfI%Eh!YRfI%Eh!YRfI%Eh!YRfI%Eh!YRfI=*iAAXbUՐ" ()B@͒"4K)QUաqWߝI 6D5)ޓS\*9g8{.vy͒ۘ;E&EP_ss4ssO9vsWUu-)€S\qvyFo&tUյjHqEncwSϋ~άa@͊%Es<+^ ;Jq;Gu饲5몪%EгS|_Dij~粻wj[2=WU%ES:.g))ߑ!YRfXUI!YRfI%EhicyTI%Eh!YRfI%Eh!YRfI%Eh!YRfI%Eh!YRfI%Eh!YRfI%Eh!YRfI%Eh!YRfI%Eh!٣Ria)VU ))€"4K,)B@͞}?UUzw{lUՇoI0'fMPR9).M3nݼY]!K^?L0878'28'yޝS\g/!/U~\R=?u{S{7 mՍǗ.sjR=/urq)sWC7n%E+NfŹ}Ddz$;{9smI̊R t?<r2.)؞W/U^VٷvϮwl\y2N0gXUulߜ C&EPRfIXULI!YRfI%EhicyTI%Eh!YRfI%Eh!YRfI%Eh!YRfI%Eh!YRfI%Eh!YRfI%Eh!YRfI%Eh!YRfI%Eh!٣Ria)VU ))€"4K,)B@R|y}磪cUU{7?CJqmQ_n,)Ք9vۭ㼻l]}qIԟМ[;Rur9#)€HqZl&;OcjLyV2-knNp:NYqnp?嵙&ѤM⥰jJ}]g{Y~keY/ rv[WUJ0-%}TU=I͒"40ŪJ0͒"4K,)B@8M4&ˣR/H,)B@͒"4K,)B@͒"4K,)B@͒"4K,)B@͒"4K,)B@͒"4K,)B@͒"4K,)B@͒"4K,)B@4MӠ `,KjHI!YRfI%Eh֙}?UU\?RUWa@)m>HiMqSnU\_K;fKS6ݘ˄:_xaSU" humv)^N->a@cn/`V" 7ťˬx'uNr:NYqn즨R|+IYqSmj~rϟ>a@)Ϋ춶{Yi [_>Ο>a@)VU ꋒ"II%Eh6fUUa@I%Eh!YRfKqiL0G_!YRfI%Eh!YRfI%Eh!YRfI%Eh!YRfI%Eh!YRfI%Eh!YRfI%Eh!YRfI%Eh!YRfI=*iAAXbUՐ" ()B@͒"4KЬ-ŗ~>:%)غR\3||g&E/hJqu|T/۸]۱OL0.z{ھ\H0R\c7wUUK0p.Y/ScRtz̊scx3&E')nMq-dXUuGRg)5^j^sS|["IPRȧ)VUXUMI")B"4AUU!YRfI%Eh6M4(ÆpHIENDB`qxmpp-0.7.6/doc/html/classQXmppMessage-members.html0000644000175000007640000005107512116723632022253 0ustar sharkyjerryweb QXmpp: Member List
QXmppMessage Member List

This is the complete list of members for QXmppMessage, including all inherited members.

Active enum valueQXmppMessage
body() const QXmppMessage
Chat enum value (defined in QXmppMessage)QXmppMessage
Composing enum valueQXmppMessage
Error enum value (defined in QXmppMessage)QXmppMessage
error() const QXmppStanza
extendedAddresses() const QXmppStanza
extensions() const QXmppStanza
from() const QXmppStanza
Gone enum valueQXmppMessage
GroupChat enum value (defined in QXmppMessage)QXmppMessage
Headline enum value (defined in QXmppMessage)QXmppMessage
id() const QXmppStanza
Inactive enum valueQXmppMessage
isAttentionRequested() const QXmppMessage
isReceiptRequested() const QXmppMessage
lang() const QXmppStanza
mucInvitationJid() const QXmppMessage
mucInvitationPassword() const QXmppMessage
mucInvitationReason() const QXmppMessage
None enum valueQXmppMessage
Normal enum value (defined in QXmppMessage)QXmppMessage
operator=(const QXmppMessage &other)QXmppMessage
QXmppStanza::operator=(const QXmppStanza &other)QXmppStanza
Paused enum valueQXmppMessage
QXmppMessage(const QString &from="", const QString &to="", const QString &body="", const QString &thread="")QXmppMessage
QXmppMessage(const QXmppMessage &other)QXmppMessage
QXmppStanza(const QString &from=QString(), const QString &to=QString())QXmppStanza
QXmppStanza(const QXmppStanza &other)QXmppStanza
receiptId() const QXmppMessage
setAttentionRequested(bool requested)QXmppMessage
setBody(const QString &)QXmppMessage
setError(const QXmppStanza::Error &error)QXmppStanza
setExtendedAddresses(const QList< QXmppExtendedAddress > &extendedAddresses)QXmppStanza
setExtensions(const QXmppElementList &elements)QXmppStanza
setFrom(const QString &)QXmppStanza
setId(const QString &)QXmppStanza
setLang(const QString &)QXmppStanza
setMucInvitationJid(const QString &jid)QXmppMessage
setMucInvitationPassword(const QString &password)QXmppMessage
setMucInvitationReason(const QString &reason)QXmppMessage
setReceiptId(const QString &id)QXmppMessage
setReceiptRequested(bool requested)QXmppMessage
setStamp(const QDateTime &stamp)QXmppMessage
setState(QXmppMessage::State)QXmppMessage
setSubject(const QString &)QXmppMessage
setThread(const QString &)QXmppMessage
setTo(const QString &)QXmppStanza
setType(QXmppMessage::Type)QXmppMessage
setXhtml(const QString &xhtml)QXmppMessage
stamp() const QXmppMessage
state() const QXmppMessage
State enum nameQXmppMessage
subject() const QXmppMessage
thread() const QXmppMessage
to() const QXmppStanza
Type enum nameQXmppMessage
type() const QXmppMessage
xhtml() const QXmppMessage
~QXmppMessage() (defined in QXmppMessage)QXmppMessage
~QXmppStanza()QXmppStanzavirtual
qxmpp-0.7.6/doc/html/classQXmppRosterIq.png0000644000175000007640000000127712116723632020626 0ustar sharkyjerrywebPNG  IHDRcfPLTEutRNST2NIDATx뎬 UKg$+ kx}cԔ$nccƋg&@H1|Q )m .ǵ#_6m(pKX(ERS,wR|NzvN UM]eG=999BZY>~B mu%JIz[Cltrx}[14cK:8fEsIǟ026p`c8lKRSClw$[Gt~Oհ|9B(x+ ۍ$}`t~kpu7G G ^]A]Ugt\r*wJΨ3yC $v]]pL]F^F'sε)}~IENDB`qxmpp-0.7.6/doc/html/tab_a.png0000644000175000007640000000021612116723632016100 0ustar sharkyjerrywebPNG  IHDR$[UIDATxK 0C'o([Ž%x#٩ We# 3t I 3+E~\D9wM}Y_A4Y}IENDB`qxmpp-0.7.6/doc/html/QXmppConfiguration_8h_source.html0000644000175000007640000006250412116723632022776 0ustar sharkyjerryweb QXmpp: QXmppConfiguration.h Source File
QXmpp  Version:0.7.6
QXmppConfiguration.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Manjeet Dahiya
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 
25 #ifndef QXMPPCONFIGURATION_H
26 #define QXMPPCONFIGURATION_H
27 
28 #include <QString>
29 #include <QSharedDataPointer>
30 
31 #include "QXmppGlobal.h"
32 
33 class QNetworkProxy;
34 class QSslCertificate;
35 class QXmppConfigurationPrivate;
36 
47 
48 class QXMPP_EXPORT QXmppConfiguration
49 {
50 public:
55  {
56  TLSEnabled = 0,
58  TLSRequired
59 
60  };
61 
66  {
67  NonSASLPlain = 0,
68  NonSASLDigest
69  };
70 
75 
79  QXmppConfiguration& operator=(const QXmppConfiguration &other);
80 
81  QString host() const;
82  void setHost(const QString&);
83 
84  QString domain() const;
85  void setDomain(const QString&);
86 
87  int port() const;
88  void setPort(int);
89 
90  QString user() const;
91  void setUser(const QString&);
92 
93  QString password() const;
94  void setPassword(const QString&);
95 
96  QString resource() const;
97  void setResource(const QString&);
98 
99  QString jid() const;
100  void setJid(const QString &jid);
101 
102  QString jidBare() const;
103 
104  QString facebookAccessToken() const;
105  void setFacebookAccessToken(const QString&);
106 
107  QString facebookAppId() const;
108  void setFacebookAppId(const QString&);
109 
110  QString googleAccessToken() const;
111  void setGoogleAccessToken(const QString &accessToken);
112 
113  QString windowsLiveAccessToken() const;
114  void setWindowsLiveAccessToken(const QString &accessToken);
115 
116  bool autoAcceptSubscriptions() const;
117  void setAutoAcceptSubscriptions(bool);
118 
119  bool autoReconnectionEnabled() const;
120  void setAutoReconnectionEnabled(bool);
121 
122  bool useSASLAuthentication() const;
123  void setUseSASLAuthentication(bool);
124 
125  bool useNonSASLAuthentication() const;
126  void setUseNonSASLAuthentication(bool);
127 
128  bool ignoreSslErrors() const;
129  void setIgnoreSslErrors(bool);
130 
131  QXmppConfiguration::StreamSecurityMode streamSecurityMode() const;
132  void setStreamSecurityMode(QXmppConfiguration::StreamSecurityMode mode);
133 
134  QXmppConfiguration::NonSASLAuthMechanism nonSASLAuthMechanism() const;
135  void setNonSASLAuthMechanism(QXmppConfiguration::NonSASLAuthMechanism);
136 
137  QString saslAuthMechanism() const;
138  void setSaslAuthMechanism(const QString &mechanism);
139 
140  QNetworkProxy networkProxy() const;
141  void setNetworkProxy(const QNetworkProxy& proxy);
142 
143  int keepAliveInterval() const;
144  void setKeepAliveInterval(int secs);
145 
146  int keepAliveTimeout() const;
147  void setKeepAliveTimeout(int secs);
148 
149  QList<QSslCertificate> caCertificates() const;
150  void setCaCertificates(const QList<QSslCertificate> &);
151 
152 private:
153  QSharedDataPointer<QXmppConfigurationPrivate> d;
154 };
155 
156 #endif // QXMPPCONFIGURATION_H
qxmpp-0.7.6/doc/html/functions_func_0x73.html0000644000175000007640000013243612116723632021030 0ustar sharkyjerryweb QXmpp: Class Members - Functions
QXmpp  Version:0.7.6
 

- s -

qxmpp-0.7.6/doc/html/QXmppEntityTimeManager_8h_source.html0000644000175000007640000002715112116723632023554 0ustar sharkyjerryweb QXmpp: QXmppEntityTimeManager.h Source File
QXmpp  Version:0.7.6
QXmppEntityTimeManager.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Manjeet Dahiya
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 
25 #ifndef QXMPPENTITYTIMEMANAGER_H
26 #define QXMPPENTITYTIMEMANAGER_H
27 
28 #include "QXmppClientExtension.h"
29 
30 class QXmppEntityTimeIq;
31 
36 
37 class QXMPP_EXPORT QXmppEntityTimeManager : public QXmppClientExtension
38 {
39  Q_OBJECT
40 
41 public:
42  QString requestTime(const QString& jid);
43 
45  QStringList discoveryFeatures() const;
46  bool handleStanza(const QDomElement &element);
48 
49 signals:
51  void timeReceived(const QXmppEntityTimeIq&);
52 };
53 
54 #endif // QXMPPENTITYTIMEMANAGER_H
qxmpp-0.7.6/doc/html/classQXmppRpcManager.html0000644000175000007640000004761412116723632021262 0ustar sharkyjerryweb QXmpp: QXmppRpcManager Class Reference
QXmppRpcManager Class Reference

The QXmppRpcManager class make it possible to invoke remote methods and to expose local interfaces for remote procedure calls, as specified by XEP-0009: Jabber-RPC. More...

#include <QXmppRpcManager.h>

Inheritance diagram for QXmppRpcManager:
QXmppClientExtension QXmppLoggable

Public Member Functions

 QXmppRpcManager ()
 Constructs a QXmppRpcManager.
void addInvokableInterface (QXmppInvokable *interface)
QXmppRemoteMethodResult callRemoteMethod (const QString &jid, const QString &interface, const QVariant &arg1=QVariant(), const QVariant &arg2=QVariant(), const QVariant &arg3=QVariant(), const QVariant &arg4=QVariant(), const QVariant &arg5=QVariant(), const QVariant &arg6=QVariant(), const QVariant &arg7=QVariant(), const QVariant &arg8=QVariant(), const QVariant &arg9=QVariant(), const QVariant &arg10=QVariant())
- Public Member Functions inherited from QXmppClientExtension
 QXmppClientExtension ()
virtual ~QXmppClientExtension ()
virtual QStringList discoveryFeatures () const
virtual QList
< QXmppDiscoveryIq::Identity > 
discoveryIdentities () const
virtual bool handleStanza (const QDomElement &stanza)=0
 You need to implement this method to process incoming XMPP stanzas.
- Public Member Functions inherited from QXmppLoggable
 QXmppLoggable (QObject *parent=0)

Additional Inherited Members

- Signals inherited from QXmppLoggable
void setGauge (const QString &gauge, double value)
 Sets the given gauge to value.
void logMessage (QXmppLogger::MessageType type, const QString &msg)
 This signal is emitted to send logging messages.
void updateCounter (const QString &counter, qint64 amount=1)
 Updates the given counter by amount.
- Protected Member Functions inherited from QXmppClientExtension
QXmppClientclient ()
virtual void setClient (QXmppClient *client)

Detailed Description

The QXmppRpcManager class make it possible to invoke remote methods and to expose local interfaces for remote procedure calls, as specified by XEP-0009: Jabber-RPC.

To make use of this manager, you need to instantiate it and load it into the QXmppClient instance as follows:

Note
THIS API IS NOT FINALIZED YET

Member Function Documentation

void QXmppRpcManager::addInvokableInterface ( QXmppInvokable interface)

Adds a local interface which can be queried using RPC.

Parameters
interface
QXmppRemoteMethodResult QXmppRpcManager::callRemoteMethod ( const QString &  jid,
const QString &  interface,
const QVariant &  arg1 = QVariant(),
const QVariant &  arg2 = QVariant(),
const QVariant &  arg3 = QVariant(),
const QVariant &  arg4 = QVariant(),
const QVariant &  arg5 = QVariant(),
const QVariant &  arg6 = QVariant(),
const QVariant &  arg7 = QVariant(),
const QVariant &  arg8 = QVariant(),
const QVariant &  arg9 = QVariant(),
const QVariant &  arg10 = QVariant() 
)

Calls a remote method using RPC with the specified arguments.

Note
This method blocks until the response is received, and it may cause XMPP stanzas to be lost!

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppEntityTimeManager.png0000644000175000007640000000177712116723632022451 0ustar sharkyjerrywebPNG  IHDRSyPLTEutRNST2IDATx붫, E1yMN8iY"aK)-$DQ8^Zt'!7F>BiW^_eLv#(IAOesAm&"FܮnS94b[yKYߊ}/P̘fY1Z5v=ђtwǯAIr*1%驾58$}W(IQ%$E5"RJ^}׫{Gh D*JD D*JD D*'K)oQ$g%$E90ziI҅QQS3O/7$ :s~"I':Cޢx*\:UӽTmGLfuK2 6ZV*Bsױqd;yp=%r 4/Ct5LsJ.ɖK/.lF7p 3lzé>+%v{66Yl&}wݒLyuq$IW"JRTO%V"JRT(IQҵ>@Ʇđwƿ13 D*JD D*JD D*JDIaг D 3wmWjmjq/S6[tqGWsjE4զU7u#֞Wh[4cYtknqoƭED%M,fh _ 毈ۈcʮ33uO .}e)79?GeY|#xU9^mLq;kFb&6f.>sQ‹O>ՇNU"D5az4Bo%IENDB`qxmpp-0.7.6/doc/html/QXmppMessage_8h_source.html0000644000175000007640000005501012116723632021545 0ustar sharkyjerryweb QXmpp: QXmppMessage.h Source File
QXmpp  Version:0.7.6
QXmppMessage.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Manjeet Dahiya
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 
25 #ifndef QXMPPMESSAGE_H
26 #define QXMPPMESSAGE_H
27 
28 #include <QDateTime>
29 #include "QXmppStanza.h"
30 
31 class QXmppMessagePrivate;
32 
37 
38 class QXMPP_EXPORT QXmppMessage : public QXmppStanza
39 {
40 public:
42  enum Type
43  {
44  Error = 0,
45  Normal,
46  Chat,
47  GroupChat,
48  Headline
49  };
50 
53  enum State
54  {
55  None = 0,
58  Gone,
61  };
62 
63  QXmppMessage(const QString& from = "", const QString& to = "",
64  const QString& body = "", const QString& thread = "");
65  QXmppMessage(const QXmppMessage &other);
66  ~QXmppMessage();
67 
68  QXmppMessage& operator=(const QXmppMessage &other);
69 
70  QString body() const;
71  void setBody(const QString&);
72 
73  bool isAttentionRequested() const;
74  void setAttentionRequested(bool requested);
75 
76  bool isReceiptRequested() const;
77  void setReceiptRequested(bool requested);
78 
79  QString mucInvitationJid() const;
80  void setMucInvitationJid(const QString &jid);
81 
82  QString mucInvitationPassword() const;
83  void setMucInvitationPassword(const QString &password);
84 
85  QString mucInvitationReason() const;
86  void setMucInvitationReason(const QString &reason);
87 
88  QString receiptId() const;
89  void setReceiptId(const QString &id);
90 
91  QDateTime stamp() const;
92  void setStamp(const QDateTime &stamp);
93 
94  QXmppMessage::State state() const;
95  void setState(QXmppMessage::State);
96 
97  QString subject() const;
98  void setSubject(const QString&);
99 
100  QString thread() const;
101  void setThread(const QString&);
102 
103  QXmppMessage::Type type() const;
104  void setType(QXmppMessage::Type);
105 
106  QString xhtml() const;
107  void setXhtml(const QString &xhtml);
108 
110  void parse(const QDomElement &element);
111  void toXml(QXmlStreamWriter *writer) const;
113 
114 private:
115  QSharedDataPointer<QXmppMessagePrivate> d;
116 };
117 
118 #endif // QXMPPMESSAGE_H
qxmpp-0.7.6/doc/html/QXmppArchiveIq_8h_source.html0000644000175000007640000011344612116723632022044 0ustar sharkyjerryweb QXmpp: QXmppArchiveIq.h Source File
QXmpp  Version:0.7.6
QXmppArchiveIq.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Jeremy Lainé
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXMPPARCHIVEIQ_H
25 #define QXMPPARCHIVEIQ_H
26 
27 #include "QXmppIq.h"
28 #include "QXmppResultSet.h"
29 
30 #include <QDateTime>
31 
34 
35 class QXMPP_EXPORT QXmppArchiveMessage
36 {
37 public:
39 
40  QString body() const;
41  void setBody(const QString &body);
42 
43  QDateTime date() const;
44  void setDate(const QDateTime &date);
45 
46  bool isReceived() const;
47  void setReceived(bool isReceived);
48 
49 private:
50  QString m_body;
51  QDateTime m_date;
52  bool m_received;
53 };
54 
57 
58 class QXMPP_EXPORT QXmppArchiveChat
59 {
60 public:
62 
63  QList<QXmppArchiveMessage> messages() const;
64  void setMessages(const QList<QXmppArchiveMessage> &messages);
65 
66  QDateTime start() const;
67  void setStart(const QDateTime &start);
68 
69  QString subject() const;
70  void setSubject(const QString &subject);
71 
72  QString thread() const;
73  void setThread(const QString &thread);
74 
75  int version() const;
76  void setVersion(int version);
77 
78  QString with() const;
79  void setWith(const QString &with);
80 
82  void parse(const QDomElement &element);
83  void toXml(QXmlStreamWriter *writer, const QXmppResultSetReply &rsm = QXmppResultSetReply()) const;
85 
86 private:
87  QList<QXmppArchiveMessage> m_messages;
88  QDateTime m_start;
89  QString m_subject;
90  QString m_thread;
91  int m_version;
92  QString m_with;
93 };
94 
100 
101 class QXMPP_EXPORT QXmppArchiveChatIq : public QXmppIq
102 {
103 public:
104  QXmppArchiveChat chat() const;
105  void setChat(const QXmppArchiveChat &chat);
106 
107  QXmppResultSetReply resultSetReply() const;
108  void setResultSetReply(const QXmppResultSetReply &rsm);
109 
111  static bool isArchiveChatIq(const QDomElement &element);
112 
113 protected:
114  void parseElementFromChild(const QDomElement &element);
115  void toXmlElementFromChild(QXmlStreamWriter *writer) const;
117 
118 private:
119  QXmppArchiveChat m_chat;
120  QXmppResultSetReply m_rsmReply;
121 };
122 
126 
127 class QXMPP_EXPORT QXmppArchiveListIq : public QXmppIq
128 {
129 public:
131 
132  QList<QXmppArchiveChat> chats() const;
133  void setChats(const QList<QXmppArchiveChat> &chats);
134 
135  QString with() const;
136  void setWith( const QString &with );
137 
138  QDateTime start() const;
139  void setStart(const QDateTime &start );
140 
141  QDateTime end() const;
142  void setEnd(const QDateTime &end );
143 
144  QXmppResultSetQuery resultSetQuery() const;
145  void setResultSetQuery(const QXmppResultSetQuery &rsm);
146 
147  QXmppResultSetReply resultSetReply() const;
148  void setResultSetReply(const QXmppResultSetReply &rsm);
149 
151  static bool isArchiveListIq(const QDomElement &element);
153 
154 protected:
156  void parseElementFromChild(const QDomElement &element);
157  void toXmlElementFromChild(QXmlStreamWriter *writer) const;
159 
160 private:
161  QString m_with;
162  QDateTime m_start;
163  QDateTime m_end;
164  QList<QXmppArchiveChat> m_chats;
165  QXmppResultSetQuery m_rsmQuery;
166  QXmppResultSetReply m_rsmReply;
167 };
168 
172 
173 class QXMPP_EXPORT QXmppArchiveRemoveIq : public QXmppIq
174 {
175 public:
176  QString with() const;
177  void setWith( const QString &with );
178 
179  QDateTime start() const;
180  void setStart(const QDateTime &start );
181 
182  QDateTime end() const;
183  void setEnd(const QDateTime &end );
184 
186  static bool isArchiveRemoveIq(const QDomElement &element);
187 
188 protected:
189  void parseElementFromChild(const QDomElement &element);
190  void toXmlElementFromChild(QXmlStreamWriter *writer) const;
192 
193 private:
194  QString m_with;
195  QDateTime m_start;
196  QDateTime m_end;
197 };
198 
202 
203 class QXMPP_EXPORT QXmppArchiveRetrieveIq : public QXmppIq
204 {
205 public:
207 
208  QDateTime start() const;
209  void setStart(const QDateTime &start);
210 
211  QString with() const;
212  void setWith(const QString &with);
213 
214  QXmppResultSetQuery resultSetQuery() const;
215  void setResultSetQuery(const QXmppResultSetQuery &rsm);
216 
218  static bool isArchiveRetrieveIq(const QDomElement &element);
219 
220 protected:
221  void parseElementFromChild(const QDomElement &element);
222  void toXmlElementFromChild(QXmlStreamWriter *writer) const;
224 
225 private:
226  QString m_with;
227  QDateTime m_start;
228  QXmppResultSetQuery m_rsmQuery;
229 };
230 
234 
235 class QXMPP_EXPORT QXmppArchivePrefIq : public QXmppIq
236 {
237 public:
239  static bool isArchivePrefIq(const QDomElement &element);
240 
241 protected:
242  void parseElementFromChild(const QDomElement &element);
243  void toXmlElementFromChild(QXmlStreamWriter *writer) const;
245 };
246 
247 #endif // QXMPPARCHIVEIQ_H
qxmpp-0.7.6/doc/html/functions_func_0x6d.html0000644000175000007640000002274012116723632021104 0ustar sharkyjerryweb QXmpp: Class Members - Functions
QXmpp  Version:0.7.6
 

- m -

qxmpp-0.7.6/doc/html/QXmppOutgoingServer_8h_source.html0000644000175000007640000004140312116723632023144 0ustar sharkyjerryweb QXmpp: QXmppOutgoingServer.h Source File
QXmpp  Version:0.7.6
QXmppOutgoingServer.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Jeremy Lainé
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXMPPOUTGOINGSERVER_H
25 #define QXMPPOUTGOINGSERVER_H
26 
27 #include <QAbstractSocket>
28 
29 #include "QXmppStream.h"
30 
31 class QSslError;
32 class QXmppDialback;
34 class QXmppOutgoingServerPrivate;
35 
39 
40 class QXMPP_EXPORT QXmppOutgoingServer : public QXmppStream
41 {
42  Q_OBJECT
43 
44 public:
45  QXmppOutgoingServer(const QString &domain, QObject *parent);
47 
48  bool isConnected() const;
49 
50  QString localStreamKey() const;
51  void setLocalStreamKey(const QString &key);
52  void setVerify(const QString &id, const QString &key);
53 
54  QString remoteDomain() const;
55 
56 signals:
58  void dialbackResponseReceived(const QXmppDialback &response);
59 
60 protected:
62  void handleStart();
63  void handleStream(const QDomElement &streamElement);
64  void handleStanza(const QDomElement &stanzaElement);
66 
67 public slots:
68  void connectToHost(const QString &domain);
69  void queueData(const QByteArray &data);
70 
71 private slots:
72  void _q_dnsLookupFinished();
73  void _q_socketDisconnected();
74  void sendDialback();
75  void slotSslErrors(const QList<QSslError> &errors);
76  void socketError(QAbstractSocket::SocketError error);
77 
78 private:
79  Q_DISABLE_COPY(QXmppOutgoingServer)
80  QXmppOutgoingServerPrivate* const d;
81 };
82 
83 #endif
qxmpp-0.7.6/doc/html/classQXmppClientExtension.html0000644000175000007640000005572612116723632022361 0ustar sharkyjerryweb QXmpp: QXmppClientExtension Class Reference

The QXmppClientExtension class is the base class for QXmppClient extensions. More...

#include <QXmppClientExtension.h>

Inheritance diagram for QXmppClientExtension:
QXmppLoggable QXmppArchiveManager QXmppBookmarkManager QXmppCallManager QXmppDiscoveryManager QXmppEntityTimeManager QXmppMessageReceiptManager QXmppMucManager QXmppRosterManager QXmppRpcManager QXmppTransferManager QXmppVCardManager QXmppVersionManager

Public Member Functions

 QXmppClientExtension ()
virtual ~QXmppClientExtension ()
virtual QStringList discoveryFeatures () const
virtual QList
< QXmppDiscoveryIq::Identity > 
discoveryIdentities () const
virtual bool handleStanza (const QDomElement &stanza)=0
 You need to implement this method to process incoming XMPP stanzas.
- Public Member Functions inherited from QXmppLoggable
 QXmppLoggable (QObject *parent=0)

Protected Member Functions

QXmppClientclient ()
virtual void setClient (QXmppClient *client)
- Protected Member Functions inherited from QXmppLoggable
void debug (const QString &message)
void info (const QString &message)
void warning (const QString &message)
void logReceived (const QString &message)
void logSent (const QString &message)

Friends

class QXmppClient

Additional Inherited Members

- Signals inherited from QXmppLoggable
void setGauge (const QString &gauge, double value)
 Sets the given gauge to value.
void logMessage (QXmppLogger::MessageType type, const QString &msg)
 This signal is emitted to send logging messages.
void updateCounter (const QString &counter, qint64 amount=1)
 Updates the given counter by amount.

Detailed Description

The QXmppClientExtension class is the base class for QXmppClient extensions.

If you want to extend QXmppClient, for instance to support an IQ type which is not natively supported, you can subclass QXmppClientExtension and implement handleStanza(). You can then add your extension to the client instance using QXmppClient::addExtension().

Constructor & Destructor Documentation

QXmppClientExtension::QXmppClientExtension ( )

Constructs a QXmppClient extension.

QXmppClientExtension::~QXmppClientExtension ( )
virtual

Destroys a QXmppClient extension.

Member Function Documentation

QXmppClient * QXmppClientExtension::client ( )
protected

Returns the client which loaded this extension.

QStringList QXmppClientExtension::discoveryFeatures ( ) const
virtual

Returns the discovery features to add to the client.

QList< QXmppDiscoveryIq::Identity > QXmppClientExtension::discoveryIdentities ( ) const
virtual

Returns the discovery identities to add to the client.

virtual bool QXmppClientExtension::handleStanza ( const QDomElement &  stanza)
pure virtual

You need to implement this method to process incoming XMPP stanzas.

You should return true if the stanza was handled and no further processing should occur, or false to let other extensions process the stanza.

void QXmppClientExtension::setClient ( QXmppClient client)
protectedvirtual

Sets the client which loaded this extension.

Parameters
client

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppTransferJob.html0000644000175000007640000012105712116723632021454 0ustar sharkyjerryweb QXmpp: QXmppTransferJob Class Reference

The QXmppTransferJob class represents a single file transfer job. More...

#include <QXmppTransferManager.h>

Inheritance diagram for QXmppTransferJob:
QXmppLoggable

Public Types

enum  Direction { IncomingDirection, OutgoingDirection }
 This enum is used to describe the direction of a transfer job. More...
enum  Error {
  NoError = 0, AbortError, FileAccessError, FileCorruptError,
  ProtocolError
}
 This enum is used to describe the type of error encountered by a transfer job. More...
enum  Method { NoMethod = 0, InBandMethod = 1, SocksMethod = 2, AnyMethod = 3 }
 This enum is used to describe a transfer method. More...
enum  State { OfferState = 0, StartState = 1, TransferState = 2, FinishedState = 3 }
 This enum is used to describe the state of a transfer job. More...

Public Slots

void abort ()
void accept (const QString &filePath)
void accept (QIODevice *output)

Signals

void error (QXmppTransferJob::Error error)
void finished ()
void localFileUrlChanged (const QUrl &localFileUrl)
 This signal is emitted when the local file URL changes.
void progress (qint64 done, qint64 total)
 This signal is emitted to indicate the progress of this transfer job.
void stateChanged (QXmppTransferJob::State state)
 This signal is emitted when the transfer job changes state.
- Signals inherited from QXmppLoggable
void setGauge (const QString &gauge, double value)
 Sets the given gauge to value.
void logMessage (QXmppLogger::MessageType type, const QString &msg)
 This signal is emitted to send logging messages.
void updateCounter (const QString &counter, qint64 amount=1)
 Updates the given counter by amount.

Public Member Functions

QXmppTransferJob::Direction direction () const
QXmppTransferJob::Error error () const
QString jid () const
QXmppTransferJob::Method method () const
QString sid () const
qint64 speed () const
QXmppTransferJob::State state () const
QXmppTransferFileInfo fileInfo () const
QUrl localFileUrl () const
void setLocalFileUrl (const QUrl &localFileUrl)
- Public Member Functions inherited from QXmppLoggable
 QXmppLoggable (QObject *parent=0)

Properties

Direction direction
QUrl localFileUrl
QString jid
Method method
State state
QString fileName
qint64 fileSize

Friends

class QXmppTransferManager
class QXmppTransferManagerPrivate
class QXmppTransferIncomingJob
class QXmppTransferOutgoingJob

Additional Inherited Members

- Protected Member Functions inherited from QXmppLoggable
void debug (const QString &message)
void info (const QString &message)
void warning (const QString &message)
void logReceived (const QString &message)
void logSent (const QString &message)

Detailed Description

The QXmppTransferJob class represents a single file transfer job.

See Also
QXmppTransferManager

Member Enumeration Documentation

This enum is used to describe the direction of a transfer job.

Enumerator:
IncomingDirection 

The file is being received.

OutgoingDirection 

The file is being sent.

This enum is used to describe the type of error encountered by a transfer job.

Enumerator:
NoError 

No error occurred.

AbortError 

The file transfer was aborted.

FileAccessError 

An error was encountered trying to access a local file.

FileCorruptError 

The file is corrupt: the file size or hash do not match.

ProtocolError 

An error was encountered in the file transfer protocol.

This enum is used to describe a transfer method.

Enumerator:
NoMethod 

No transfer method.

InBandMethod 

XEP-0047: In-Band Bytestreams

SocksMethod 

XEP-0065: SOCKS5 Bytestreams

AnyMethod 

Any supported transfer method.

This enum is used to describe the state of a transfer job.

Enumerator:
OfferState 

The transfer is being offered to the remote party.

StartState 

The transfer is being connected.

TransferState 

The transfer is ongoing.

FinishedState 

The transfer is finished.

Member Function Documentation

void QXmppTransferJob::abort ( )
slot

Call this method if you wish to abort on ongoing transfer job.

void QXmppTransferJob::accept ( const QString &  filePath)
slot

Call this method if you wish to accept an incoming transfer job.

void QXmppTransferJob::accept ( QIODevice *  iodevice)
slot

Call this method if you wish to accept an incoming transfer job.

QXmppTransferJob::Error QXmppTransferJob::error ( ) const

Returns the last error that was encountered.

void QXmppTransferJob::error ( QXmppTransferJob::Error  error)
signal

This signal is emitted when an error is encountered while processing the transfer job.

QXmppTransferFileInfo QXmppTransferJob::fileInfo ( ) const

Returns meta-data about the file being transferred.

void QXmppTransferJob::finished ( )
signal

This signal is emitted when the transfer job is finished.

You can determine if the job completed successfully by testing whether error() returns QXmppTransferJob::NoError.

Note: Do not delete the job in the slot connected to this signal, instead use deleteLater().

void QXmppTransferJob::setLocalFileUrl ( const QUrl &  localFileUrl)

Sets the local file URL.

Note
You do not need to call this method if you called accept() with a file path.
QString QXmppTransferJob::sid ( ) const

Returns the job's session identifier.

qint64 QXmppTransferJob::speed ( ) const

Returns the job's transfer speed in bytes per second.

If the transfer has not started yet or is already finished, returns 0.

Property Documentation

QXmppTransferJob::Direction QXmppTransferJob::direction
read

Returns the job's transfer direction.

QString QXmppTransferJob::jid
read

Returns the remote party's JID.

QUrl QXmppTransferJob::localFileUrl
readwrite

Returns the local file URL.

QXmppTransferJob::Method QXmppTransferJob::method
read

Returns the job's transfer method.

QXmppTransferJob::State QXmppTransferJob::state
read

Returns the job's state.


The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppSessionIq.png0000644000175000007640000000131012116723632020757 0ustar sharkyjerrywebPNG  IHDRkױPLTEutRNST2WIDATx뒫 #H4S[QM9;A$%I6~וKK/~xCX\s2P{]gj==\E촖bemiÃUq?7NrBgJwjn>_*⬡ަौ]ƑsdX{9 ^6oZסζn״W]5Ozm8uw QXmpp: File List
QXmpp  Version:0.7.6
File List
Here is a list of all documented files with brief descriptions:
o*QXmppArchiveIq.h
o*QXmppArchiveManager.h
o*QXmppBindIq.h
o*QXmppBookmarkManager.h
o*QXmppBookmarkSet.h
o*QXmppByteStreamIq.h
o*QXmppCallManager.h
o*QXmppClient.h
o*QXmppClientExtension.h
o*QXmppConfiguration.h
o*QXmppConstants.h
o*QXmppDataForm.h
o*QXmppDialback.h
o*QXmppDiscoveryIq.h
o*QXmppDiscoveryManager.h
o*QXmppElement.h
o*QXmppEntityTimeIq.h
o*QXmppEntityTimeManager.h
o*QXmppGlobal.h
o*QXmppIbbIq.h
o*QXmppIncomingClient.h
o*QXmppIncomingServer.h
o*QXmppInvokable.h
o*QXmppIq.h
o*QXmppJingleIq.h
o*QXmppLogger.h
o*QXmppMessage.h
o*QXmppMessageReceiptManager.h
o*QXmppMucIq.h
o*QXmppMucManager.h
o*QXmppNonSASLAuth.h
o*QXmppOutgoingClient.h
o*QXmppOutgoingServer.h
o*QXmppPasswordChecker.h
o*QXmppPingIq.h
o*QXmppPresence.h
o*QXmppPubSubIq.h
o*QXmppRegisterIq.h
o*QXmppRemoteMethod.h
o*QXmppResultSet.h
o*QXmppRosterIq.h
o*QXmppRosterManager.h
o*QXmppRpcIq.h
o*QXmppRpcManager.h
o*QXmppRtpChannel.h
o*QXmppServer.h
o*QXmppServerExtension.h
o*QXmppServerPlugin.h
o*QXmppSessionIq.h
o*QXmppSocks.h
o*QXmppStanza.h
o*QXmppStream.h
o*QXmppStreamFeatures.h
o*QXmppStun.h
o*QXmppTransferManager.h
o*QXmppUtils.h
o*QXmppVCardIq.h
o*QXmppVCardManager.h
o*QXmppVersionIq.h
\*QXmppVersionManager.h
qxmpp-0.7.6/doc/html/QXmppPresence_8h_source.html0000644000175000007640000010034212116723632021724 0ustar sharkyjerryweb QXmpp: QXmppPresence.h Source File
QXmpp  Version:0.7.6
QXmppPresence.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Manjeet Dahiya
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 
25 #ifndef QXMPPPRESENCE_H
26 #define QXMPPPRESENCE_H
27 
28 #include "QXmppStanza.h"
29 #include "QXmppMucIq.h"
30 
31 class QXmppPresencePrivate;
32 
36 class QXMPP_EXPORT QXmppPresence : public QXmppStanza
37 {
38 public:
40  enum Type
41  {
42  Error = 0,
49  Probe
50  };
51 
54  {
55  Online = 0,
56  Away,
57  XA,
58  DND,
59  Chat,
60  Invisible
61  };
62 
66  {
67  VCardUpdateNone = 0,
70  VCardUpdateNotReady
71 
74  };
75 
77  // deprecated since 0.6.2
78  class QXMPP_EXPORT Status
79  {
80  public:
82  enum Type
83  {
84  Online = 0,
85  Away,
86  XA,
87  DND,
88  Chat,
89  Invisible
90  };
91 
92  Status(QXmppPresence::Status::Type type = QXmppPresence::Status::Online,
93  const QString statusText = "", int priority = 0);
94 
95  QXmppPresence::Status::Type type() const;
96  void setType(QXmppPresence::Status::Type);
97 
98  QString statusText() const;
99  void setStatusText(const QString&);
100 
101  int priority() const;
102  void setPriority(int);
103 
104  void parse(const QDomElement &element);
105  void toXml(QXmlStreamWriter *writer) const;
106 
107  private:
108  QXmppPresence::Status::Type m_type;
109  QString m_statusText;
110  int m_priority;
111  };
112 
113  QXmppPresence::Status Q_DECL_DEPRECATED &status();
114  const QXmppPresence::Status Q_DECL_DEPRECATED &status() const;
115  void Q_DECL_DEPRECATED setStatus(const QXmppPresence::Status&);
117 
119  QXmppPresence(const QXmppPresence &other);
120  ~QXmppPresence();
121 
122  QXmppPresence& operator=(const QXmppPresence &other);
123 
124  AvailableStatusType availableStatusType() const;
125  void setAvailableStatusType(AvailableStatusType type);
126 
127  int priority() const;
128  void setPriority(int priority);
129 
130  QXmppPresence::Type type() const;
131  void setType(QXmppPresence::Type);
132 
133  QString statusText() const;
134  void setStatusText(const QString& statusText);
135 
137  void parse(const QDomElement &element);
138  void toXml(QXmlStreamWriter *writer) const;
140 
141  // XEP-0045: Multi-User Chat
142  QXmppMucItem mucItem() const;
143  void setMucItem(const QXmppMucItem &item);
144 
145  QString mucPassword() const;
146  void setMucPassword(const QString &password);
147 
148  QList<int> mucStatusCodes() const;
149  void setMucStatusCodes(const QList<int> &codes);
150 
151  bool isMucSupported() const;
152  void setMucSupported(bool supported);
153 
155  QByteArray photoHash() const;
156  void setPhotoHash(const QByteArray&);
157 
158  VCardUpdateType vCardUpdateType() const;
159  void setVCardUpdateType(VCardUpdateType type);
160 
161  // XEP-0115: Entity Capabilities
162  QString capabilityHash() const;
163  void setCapabilityHash(const QString&);
164 
165  QString capabilityNode() const;
166  void setCapabilityNode(const QString&);
167 
168  QByteArray capabilityVer() const;
169  void setCapabilityVer(const QByteArray&);
170 
171  QStringList capabilityExt() const;
172 
173 private:
174  QSharedDataPointer<QXmppPresencePrivate> d;
175 };
176 
177 #endif // QXMPPPRESENCE_H
qxmpp-0.7.6/doc/html/classQXmppRtpPacket-members.html0000644000175000007640000001701612116723632022561 0ustar sharkyjerryweb QXmpp: Member List
QXmppRtpPacket Member List
qxmpp-0.7.6/doc/html/doxygen.png0000644000175000007640000000730312116723632016513 0ustar sharkyjerrywebPNG  IHDRh ;IDATx]y\պ~45%TL QPE"q11]8aw*(*" z`8 m,p$%B(8k6lk[߷;?kPx'tz3_Q4g@m ci{~4:Hc'PP7^h zbcP 3}OqNkT(?d ~z<4ǡ؞vz٦Zd,6k]Fz< Zs?sU2Sw1c`[}%ѽ.Լ6BLZ!F8[ T #g]:vu?vbR?wgb$kF~;عƕX?lNʪ,HCgAzlӺg ]jM3oҳ'=$f}GS_co.ȹ:ds:1={9?zqviDp moaEqҵw}~{j{ºFNë[OqOSXO]>muľe5{Jկ(bl}`UyacCAklysA7oJ .Be. Z'-PyF.lp&.j7rez19HG%qz׈c_k_")HJn~֘5 q5#+9T Rܸrzϴ̝ =υ{áOfwg|/$;֙ƭ]W"/< DఽB}yIEc^=[VhM$l];Kr¦* t$]M;I1!M (f<5~z mՠ>کIz;u[ie^ӳNF6B\}7+,'a -yHY,^f~?Hc{Z+4\sٷnߣFơsغD?<vkx0MlذIxdEEAMg*YE7ۙ^[uv[wG=Edn׶l'pGk+C82 dz3H BS[wŘ ~xptmţiQ歉AB1fى4uI]6% 1t.NJphz̠R1"3-"&1[:N mW0_œ 6&)ꦬ}~{m]zMP~^:eQT_*798ˍ 347E¿uSɻU_ NWeNӏ|;;d"ȉ޵ᆴ"ĴMM+bY_E]PXKНIޥoE<_(EP|m,өZߺk,kM`jzeU t36˷r}w:Χ |TܵQK_pໃYd0!a –W$$/\$ 2mLH dHV,:RZJaz*>_NT(‚^SVFU8E܈nd;8\C]=m:bDd=ߞUU5O|]Pv\]2"y[yzg{Y{Ù5;w{N3nĨwKݭ29Id y)P8ũ@mPwjl,6 hWd ump.DžtwR xBδYcxg*vo y򑕓[?V0NO난~󒯷h#Hk8kӍ^q@]ӓ,56-κUn[>]@nϜp[6# 4tn:}8T9_Y$/GK(ђM`dѺ;OB &P{qhJ+閧l2M_1ӫtlya L^y.۽[ u/]iS}N>e1qjf&iT\=kϛX-.84V5u!TE .OH4zwTr. xքHHg hT$yqzp< qrwI]I鲘s":ՖbզL69VW<;3?M3AV#ޯKUr9!qtH+6V/TS^pqgLP'5E ޺ n"2|;W"֬TwtO' +W+Z̖<&nO,I06.Z.h*INڒOegBXZ9hDSʍ A/c`A"z|ş;H#|%OOD mcƤqmu&~n πZj =_n[nN$_bE)8?6l}#bW( d-p&a"9ņ$ڛA!;{~8ޣ10`#kuN Qbh 8Mawhq(bK Z%m֍(J)@> 7% {y ohf>{p.­_%glZ\B2B #Һphݚ[<#SpA7Ht4:|gtL*($Ʃ$;b`=MM5ǾHH.HeA5}rd)T};Q5i2O00;,냔}g]79_{C>h{.II?[Kswz6u;OJa˶zvd l舊yc'rTWӰL |ʽhB T'ò]K(=Kx  L,Pʵu׈ž1ݫ;pGDxZY kf676oھH~޸ 8Up6(? K+?%ݷ/19U?B)l @=ޞkIENDB`qxmpp-0.7.6/doc/html/functions_func_0x67.html0000644000175000007640000002227112116723632021026 0ustar sharkyjerryweb QXmpp: Class Members - Functions
QXmpp  Version:0.7.6
 

- g -

qxmpp-0.7.6/doc/html/classQXmppVersionIq.html0000644000175000007640000006067612116723632021165 0ustar sharkyjerryweb QXmpp: QXmppVersionIq Class Reference
QXmppVersionIq Class Reference

The QXmppVersionIq class represents an IQ for conveying a software version as defined by XEP-0092: Software Version. More...

#include <QXmppVersionIq.h>

Inheritance diagram for QXmppVersionIq:
QXmppIq QXmppStanza

Public Member Functions

QString name () const
void setName (const QString &name)
QString os () const
void setOs (const QString &os)
QString version () const
void setVersion (const QString &version)
- Public Member Functions inherited from QXmppIq
 QXmppIq (QXmppIq::Type type=QXmppIq::Get)
 QXmppIq (const QXmppIq &other)
 Constructs a copy of other.
QXmppIqoperator= (const QXmppIq &other)
 Assigns other to this IQ.
QXmppIq::Type type () const
void setType (QXmppIq::Type)
- Public Member Functions inherited from QXmppStanza
 QXmppStanza (const QString &from=QString(), const QString &to=QString())
 QXmppStanza (const QXmppStanza &other)
 Constructs a copy of other.
virtual ~QXmppStanza ()
 Destroys a QXmppStanza.
QXmppStanzaoperator= (const QXmppStanza &other)
 Assigns other to this stanza.
QString to () const
void setTo (const QString &)
QString from () const
 Returns the stanza's sender JID.
void setFrom (const QString &)
QString id () const
 Returns the stanza's identifier.
void setId (const QString &)
QString lang () const
 Returns the stanza's language.
void setLang (const QString &)
QXmppStanza::Error error () const
 Returns the stanza's error.
void setError (const QXmppStanza::Error &error)
QXmppElementList extensions () const
void setExtensions (const QXmppElementList &elements)
QList< QXmppExtendedAddressextendedAddresses () const
void setExtendedAddresses (const QList< QXmppExtendedAddress > &extendedAddresses)

Additional Inherited Members

- Public Types inherited from QXmppIq
enum  Type { Error = 0, Get, Set, Result }
 This enum describes the type of IQ. More...

Detailed Description

The QXmppVersionIq class represents an IQ for conveying a software version as defined by XEP-0092: Software Version.

Member Function Documentation

QString QXmppVersionIq::name ( ) const

Returns the name of the software.

QString QXmppVersionIq::os ( ) const

Returns the operating system.

void QXmppVersionIq::setName ( const QString &  name)

Sets the name of the software.

Parameters
name
void QXmppVersionIq::setOs ( const QString &  os)

Sets the operating system.

Parameters
os
void QXmppVersionIq::setVersion ( const QString &  version)

Sets the software version.

Parameters
version
QString QXmppVersionIq::version ( ) const

Returns the software version.


The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/functions_func_0x76.html0000644000175000007640000002074612116723632021033 0ustar sharkyjerryweb QXmpp: Class Members - Functions
QXmpp  Version:0.7.6
 

- v -

qxmpp-0.7.6/doc/html/classQXmppLoggable.html0000644000175000007640000004134512116723632020752 0ustar sharkyjerryweb QXmpp: QXmppLoggable Class Reference

The QXmppLoggable class represents a source of logging messages. More...

#include <QXmppLogger.h>

Inheritance diagram for QXmppLoggable:
QXmppCall QXmppClient QXmppClientExtension QXmppIceComponent QXmppIceConnection QXmppRtpVideoChannel QXmppServer QXmppServerExtension QXmppStream QXmppTransferJob

Signals

void setGauge (const QString &gauge, double value)
 Sets the given gauge to value.
void logMessage (QXmppLogger::MessageType type, const QString &msg)
 This signal is emitted to send logging messages.
void updateCounter (const QString &counter, qint64 amount=1)
 Updates the given counter by amount.

Public Member Functions

 QXmppLoggable (QObject *parent=0)

Protected Member Functions

void debug (const QString &message)
void info (const QString &message)
void warning (const QString &message)
void logReceived (const QString &message)
void logSent (const QString &message)

Detailed Description

The QXmppLoggable class represents a source of logging messages.

Constructor & Destructor Documentation

QXmppLoggable::QXmppLoggable ( QObject *  parent = 0)

Constructs a new QXmppLoggable.

Parameters
parent

Member Function Documentation

void QXmppLoggable::debug ( const QString &  message)
inlineprotected

Logs a debugging message.

Parameters
message
void QXmppLoggable::info ( const QString &  message)
inlineprotected

Logs an informational message.

Parameters
message
void QXmppLoggable::logReceived ( const QString &  message)
inlineprotected

Logs a received packet.

Parameters
message
void QXmppLoggable::logSent ( const QString &  message)
inlineprotected

Logs a sent packet.

Parameters
message
void QXmppLoggable::warning ( const QString &  message)
inlineprotected

Logs a warning message.

Parameters
message

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppRpcInvokeIq.png0000644000175000007640000000135212116723632021242 0ustar sharkyjerrywebPNG  IHDRzPLTEutRNST2yIDATx뒫 * 5{j'E3,e4WK!RSK/FH+}3o5uhY0?t=WۋJ'I=7ɹ̱ ɳmyIҎ;nPߴo^suY|6ӱw RU:.w G~Y$ >e=T%L)m"LNټUOu)(IjI2ՒdXu1s&1SO08ljK\ ` q5!0W<#@Z a1$7qS]Ku1y¢Mu~rBVXiOK(akH%յJ\g84 sSQ?WjC\ ` q53Ba ߡ^n5@WwFiVR]E福PЅTr ]Fo˘rҹ J%umoC:L]]7;Y?9ڽW-C=ThL^vZva߼PY{>r,wmr3û/ψ 8w_250U%2cIENDB`qxmpp-0.7.6/doc/html/functions_0x78.html0000644000175000007640000001745112116723632020021 0ustar sharkyjerryweb QXmpp: Class Members
QXmpp  Version:0.7.6
Here is a list of all documented class members with links to the class documentation for each member:

- x -

qxmpp-0.7.6/doc/html/functions_func_0x70.html0000644000175000007640000002626712116723632021031 0ustar sharkyjerryweb QXmpp: Class Members - Functions
QXmpp  Version:0.7.6
 

- p -

qxmpp-0.7.6/doc/html/classQXmppVCardEmail-members.html0000644000175000007640000002152112116723632022627 0ustar sharkyjerryweb QXmpp: Member List
QXmppVCardEmail Member List

This is the complete list of members for QXmppVCardEmail, including all inherited members.

address() const QXmppVCardEmail
Home enum value (defined in QXmppVCardEmail)QXmppVCardEmail
Internet enum value (defined in QXmppVCardEmail)QXmppVCardEmail
None enum value (defined in QXmppVCardEmail)QXmppVCardEmail
operator=(const QXmppVCardEmail &other)QXmppVCardEmail
Preferred enum value (defined in QXmppVCardEmail)QXmppVCardEmail
QXmppVCardEmail()QXmppVCardEmail
QXmppVCardEmail(const QXmppVCardEmail &other)QXmppVCardEmail
setAddress(const QString &address)QXmppVCardEmail
setType(Type type)QXmppVCardEmail
type() const QXmppVCardEmail
TypeFlag enum nameQXmppVCardEmail
Work enum value (defined in QXmppVCardEmail)QXmppVCardEmail
X400 enum value (defined in QXmppVCardEmail)QXmppVCardEmail
~QXmppVCardEmail() (defined in QXmppVCardEmail)QXmppVCardEmail
qxmpp-0.7.6/doc/html/classQXmppArchivePrefIq.png0000644000175000007640000000141512116723632021540 0ustar sharkyjerrywebPNG  IHDRXPLTEutRNST2IDATx펄 EdWU\#;M' cmh$i" $9$U6CN;DPD9dWj\ݔ7ص6[rc҃˦ro>޺(niK5=L;u y?xϝCO։Ibg{Ag{9Q։]ܝ_7ݽ8ٗ3i|j6$1IENDB`qxmpp-0.7.6/doc/html/functions_func.html0000644000175000007640000002625712116723632020252 0ustar sharkyjerryweb QXmpp: Class Members - Functions
QXmpp  Version:0.7.6
 

- a -

qxmpp-0.7.6/doc/html/QXmppRpcIq_8h_source.html0000644000175000007640000005124512116723632021205 0ustar sharkyjerryweb QXmpp: QXmppRpcIq.h Source File
QXmpp  Version:0.7.6
QXmppRpcIq.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Authors:
5  * Ian Reinhart Geiser
6  * Jeremy Lainé
7  *
8  * Source:
9  * http://code.google.com/p/qxmpp
10  *
11  * This file is a part of QXmpp library.
12  *
13  * This library is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU Lesser General Public
15  * License as published by the Free Software Foundation; either
16  * version 2.1 of the License, or (at your option) any later version.
17  *
18  * This library is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21  * Lesser General Public License for more details.
22  *
23  */
24 
25 #ifndef QXMPPRPCIQ_H
26 #define QXMPPRPCIQ_H
27 
28 #include "QXmppIq.h"
29 #include <QVariant>
30 
31 class QXMPP_EXPORT QXmppRpcMarshaller
32 {
33 public:
34  static void marshall( QXmlStreamWriter *writer, const QVariant &value);
35  static QVariant demarshall(const QDomElement &elem, QStringList &errors);
36 };
37 
42 
43 class QXMPP_EXPORT QXmppRpcResponseIq : public QXmppIq
44 {
45 public:
47 
48  int faultCode() const;
49  void setFaultCode(int faultCode);
50 
51  QString faultString() const;
52  void setFaultString(const QString &faultString);
53 
54  QVariantList values() const;
55  void setValues(const QVariantList &values);
56 
58  static bool isRpcResponseIq(const QDomElement &element);
60 
61 protected:
63  void parseElementFromChild(const QDomElement &element);
64  void toXmlElementFromChild(QXmlStreamWriter *writer) const;
66 
67 private:
68  int m_faultCode;
69  QString m_faultString;
70  QVariantList m_values;
71 };
72 
77 
78 class QXMPP_EXPORT QXmppRpcInvokeIq : public QXmppIq
79 {
80 public:
82 
83  QString method() const;
84  void setMethod( const QString &method );
85 
86  QVariantList arguments() const;
87  void setArguments(const QVariantList &arguments);
88 
90  static bool isRpcInvokeIq(const QDomElement &element);
92 
93 protected:
95  void parseElementFromChild(const QDomElement &element);
96  void toXmlElementFromChild(QXmlStreamWriter *writer) const;
98 
99 private:
100  QVariantList m_arguments;
101  QString m_method;
102 
103  friend class QXmppRpcErrorIq;
104 };
105 
106 class QXMPP_EXPORT QXmppRpcErrorIq : public QXmppIq
107 {
108 public:
109  QXmppRpcErrorIq();
110 
111  QXmppRpcInvokeIq query() const;
112  void setQuery(const QXmppRpcInvokeIq &query);
113 
115  static bool isRpcErrorIq(const QDomElement &element);
117 
118 protected:
120  void parseElementFromChild(const QDomElement &element);
121  void toXmlElementFromChild(QXmlStreamWriter *writer) const;
123 
124 private:
125  QXmppRpcInvokeIq m_query;
126 };
127 
128 #endif // QXMPPRPCIQ_H
qxmpp-0.7.6/doc/html/classQXmppPresence-members.html0000644000175000007640000005632512116723632022436 0ustar sharkyjerryweb QXmpp: Member List
QXmppPresence Member List

This is the complete list of members for QXmppPresence, including all inherited members.

Available enum valueQXmppPresence
AvailableStatusType enum nameQXmppPresence
availableStatusType() const QXmppPresence
Away enum valueQXmppPresence
capabilityExt() const QXmppPresence
capabilityHash() const QXmppPresence
capabilityNode() const QXmppPresence
capabilityVer() const QXmppPresence
Chat enum valueQXmppPresence
DND enum valueQXmppPresence
error() const QXmppStanza
Error enum valueQXmppPresence
extendedAddresses() const QXmppStanza
extensions() const QXmppStanza
from() const QXmppStanza
id() const QXmppStanza
Invisible enum valueQXmppPresence
isMucSupported() const QXmppPresence
lang() const QXmppStanza
mucItem() const QXmppPresence
mucPassword() const QXmppPresence
mucStatusCodes() const QXmppPresence
Online enum valueQXmppPresence
operator=(const QXmppPresence &other)QXmppPresence
QXmppStanza::operator=(const QXmppStanza &other)QXmppStanza
photoHash() const QXmppPresence
priority() const QXmppPresence
Probe enum valueQXmppPresence
QXmppPresence(QXmppPresence::Type type=QXmppPresence::Available)QXmppPresence
QXmppPresence(const QXmppPresence &other)QXmppPresence
QXmppStanza(const QString &from=QString(), const QString &to=QString())QXmppStanza
QXmppStanza(const QXmppStanza &other)QXmppStanza
setAvailableStatusType(AvailableStatusType type)QXmppPresence
setCapabilityHash(const QString &)QXmppPresence
setCapabilityNode(const QString &)QXmppPresence
setCapabilityVer(const QByteArray &)QXmppPresence
setError(const QXmppStanza::Error &error)QXmppStanza
setExtendedAddresses(const QList< QXmppExtendedAddress > &extendedAddresses)QXmppStanza
setExtensions(const QXmppElementList &elements)QXmppStanza
setFrom(const QString &)QXmppStanza
setId(const QString &)QXmppStanza
setLang(const QString &)QXmppStanza
setMucItem(const QXmppMucItem &item)QXmppPresence
setMucPassword(const QString &password)QXmppPresence
setMucStatusCodes(const QList< int > &codes)QXmppPresence
setMucSupported(bool supported)QXmppPresence
setPhotoHash(const QByteArray &)QXmppPresence
setPriority(int priority)QXmppPresence
setStatusText(const QString &statusText)QXmppPresence
setTo(const QString &)QXmppStanza
setType(QXmppPresence::Type)QXmppPresence
setVCardUpdateType(VCardUpdateType type)QXmppPresence
statusText() const QXmppPresence
Subscribe enum valueQXmppPresence
Subscribed enum valueQXmppPresence
to() const QXmppStanza
type() const QXmppPresence
Type enum nameQXmppPresence
Unavailable enum valueQXmppPresence
Unsubscribe enum valueQXmppPresence
Unsubscribed enum valueQXmppPresence
VCardUpdateNone enum valueQXmppPresence
VCardUpdateNoPhoto enum valueQXmppPresence
VCardUpdateNotReady enum valueQXmppPresence
vCardUpdateType() const QXmppPresence
VCardUpdateType enum nameQXmppPresence
VCardUpdateValidPhoto enum valueQXmppPresence
XA enum valueQXmppPresence
~QXmppPresence()QXmppPresence
~QXmppStanza()QXmppStanzavirtual
qxmpp-0.7.6/doc/html/functions_vars.html0000644000175000007640000001405212116723632020260 0ustar sharkyjerryweb QXmpp: Class Members - Variables
QXmpp  Version:0.7.6
 
qxmpp-0.7.6/doc/html/classQXmppLogger.html0000644000175000007640000006567112116723632020465 0ustar sharkyjerryweb QXmpp: QXmppLogger Class Reference

The QXmppLogger class represents a sink for logging messages. More...

#include <QXmppLogger.h>

Public Types

enum  LoggingType { NoLogging = 0, FileLogging = 1, StdoutLogging = 2, SignalLogging = 4 }
 This enum describes how log message are handled. More...
enum  MessageType {
  NoMessage = 0, DebugMessage = 1, InformationMessage = 2, WarningMessage = 4,
  ReceivedMessage = 8, SentMessage = 16, AnyMessage = 31
}
 This enum describes a type of log message. More...

Public Slots

virtual void setGauge (const QString &gauge, double value)
virtual void updateCounter (const QString &counter, qint64 amount)
void log (QXmppLogger::MessageType type, const QString &text)
void reopen ()

Signals

void message (QXmppLogger::MessageType type, const QString &text)
 This signal is emitted whenever a log message is received.

Public Member Functions

 QXmppLogger (QObject *parent=0)
QXmppLogger::LoggingType loggingType ()
void setLoggingType (QXmppLogger::LoggingType type)
QString logFilePath ()
void setLogFilePath (const QString &path)
QXmppLogger::MessageTypes messageTypes ()
void setMessageTypes (QXmppLogger::MessageTypes types)

Static Public Member Functions

static QXmppLoggergetLogger ()

Properties

QString logFilePath
LoggingType loggingType
MessageTypes messageTypes

Detailed Description

The QXmppLogger class represents a sink for logging messages.

Member Enumeration Documentation

This enum describes how log message are handled.

Enumerator:
NoLogging 

Log messages are discarded.

FileLogging 

Log messages are written to a file.

StdoutLogging 

Log messages are written to the standard output.

SignalLogging 

Log messages are emitted as a signal.

This enum describes a type of log message.

Enumerator:
NoMessage 

No message type.

DebugMessage 

Debugging message.

InformationMessage 

Informational message.

WarningMessage 

Warning message.

ReceivedMessage 

Message received from server.

SentMessage 

Message sent to server.

AnyMessage 

Any message type.

Constructor & Destructor Documentation

QXmppLogger::QXmppLogger ( QObject *  parent = 0)

Constructs a new QXmppLogger.

Parameters
parent

Member Function Documentation

QXmppLogger * QXmppLogger::getLogger ( )
static

Returns the default logger.

void QXmppLogger::log ( QXmppLogger::MessageType  type,
const QString &  text 
)
slot

Add a logging message.

Parameters
type
text
void QXmppLogger::reopen ( )
slot

If logging to a file, causes the file to be re-opened.

void QXmppLogger::setGauge ( const QString &  gauge,
double  value 
)
virtualslot

Sets the given gauge to value.

NOTE: the base implementation does nothing.

void QXmppLogger::setLogFilePath ( const QString &  path)

Sets the path to which logging messages should be written.

Parameters
path
See Also
setLoggingType()
void QXmppLogger::setLoggingType ( QXmppLogger::LoggingType  type)

Sets the handler for logging messages.

Parameters
type
void QXmppLogger::setMessageTypes ( QXmppLogger::MessageTypes  types)

Sets the types of messages to log.

Parameters
types
void QXmppLogger::updateCounter ( const QString &  counter,
qint64  amount 
)
virtualslot

Updates the given counter by amount.

NOTE: the base implementation does nothing.

Property Documentation

QString QXmppLogger::logFilePath
readwrite

Returns the path to which logging messages should be written.

See Also
loggingType()
QXmppLogger::LoggingType QXmppLogger::loggingType
readwrite

Returns the handler for logging messages.

QXmppLogger::MessageTypes QXmppLogger::messageTypes
readwrite

Returns the types of messages to log.


The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/QXmppRtpChannel_8h_source.html0000644000175000007640000014217712116723632022232 0ustar sharkyjerryweb QXmpp: QXmppRtpChannel.h Source File
QXmpp  Version:0.7.6
QXmppRtpChannel.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Jeremy Lainé
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXMPPRTPCHANNEL_H
25 #define QXMPPRTPCHANNEL_H
26 
27 #include <QIODevice>
28 #include <QSize>
29 
30 #include "QXmppJingleIq.h"
31 #include "QXmppLogger.h"
32 
33 class QXmppCodec;
35 class QXmppRtpAudioChannelPrivate;
36 class QXmppRtpVideoChannelPrivate;
37 
40 
41 class QXMPP_EXPORT QXmppRtpPacket
42 {
43 public:
44  bool decode(const QByteArray &ba);
45  QByteArray encode() const;
46  QString toString() const;
47 
49  quint8 version;
51  bool marker;
53  quint8 type;
55  quint32 ssrc;
57  QList<quint32> csrc;
59  quint16 sequence;
61  quint32 stamp;
63  QByteArray payload;
64 };
65 
66 class QXMPP_EXPORT QXmppRtpChannel
67 {
68 public:
69  QXmppRtpChannel();
70 
72  virtual void close() = 0;
73 
75  virtual QIODevice::OpenMode openMode() const = 0;
76 
77  QList<QXmppJinglePayloadType> localPayloadTypes();
78  void setRemotePayloadTypes(const QList<QXmppJinglePayloadType> &remotePayloadTypes);
79 
80 protected:
82  virtual void payloadTypesChanged() = 0;
83 
84  QList<QXmppJinglePayloadType> m_incomingPayloadTypes;
85  QList<QXmppJinglePayloadType> m_outgoingPayloadTypes;
86  bool m_outgoingPayloadNumbered;
88 };
89 
96 
97 class QXMPP_EXPORT QXmppRtpAudioChannel : public QIODevice, public QXmppRtpChannel
98 {
99  Q_OBJECT
100  Q_ENUMS(Tone)
101 
102 public:
104  enum Tone {
105  Tone_0 = 0,
120  Tone_D
121  };
122 
123  QXmppRtpAudioChannel(QObject *parent = 0);
125 
126  qint64 bytesAvailable() const;
127  void close();
128  bool isSequential() const;
129  QIODevice::OpenMode openMode() const;
130  QXmppJinglePayloadType payloadType() const;
131  qint64 pos() const;
132  bool seek(qint64 pos);
133 
134 signals:
136  void sendDatagram(const QByteArray &ba);
137 
139  void logMessage(QXmppLogger::MessageType type, const QString &msg);
140 
141 public slots:
142  void datagramReceived(const QByteArray &ba);
143  void startTone(QXmppRtpAudioChannel::Tone tone);
144  void stopTone(QXmppRtpAudioChannel::Tone tone);
145 
146 protected:
148  void debug(const QString &message)
149  {
150  emit logMessage(QXmppLogger::DebugMessage, qxmpp_loggable_trace(message));
151  }
152 
153  void warning(const QString &message)
154  {
155  emit logMessage(QXmppLogger::WarningMessage, qxmpp_loggable_trace(message));
156  }
157 
158  void logReceived(const QString &message)
159  {
160  emit logMessage(QXmppLogger::ReceivedMessage, qxmpp_loggable_trace(message));
161  }
162 
163  void logSent(const QString &message)
164  {
165  emit logMessage(QXmppLogger::SentMessage, qxmpp_loggable_trace(message));
166  }
167 
168  void payloadTypesChanged();
169  qint64 readData(char * data, qint64 maxSize);
170  qint64 writeData(const char * data, qint64 maxSize);
172 
173 private slots:
174  void emitSignals();
175  void writeDatagram();
176 
177 private:
178  friend class QXmppRtpAudioChannelPrivate;
179  QXmppRtpAudioChannelPrivate * d;
180 };
181 
185 
186 class QXMPP_EXPORT QXmppVideoFrame
187 {
188 public:
190  enum PixelFormat {
191  Format_Invalid = 0,
192  Format_RGB32 = 3,
193  Format_RGB24 = 4,
194  Format_YUV420P = 18,
195 
196 
197 
198  Format_UYVY = 20,
199 
200 
201 
202 
203  Format_YUYV = 21,
204 
205 
206 
207 
208  };
209 
210  QXmppVideoFrame();
211  QXmppVideoFrame(int bytes, const QSize &size, int bytesPerLine, PixelFormat format);
212  uchar *bits();
213  const uchar *bits() const;
214  int bytesPerLine() const;
215  int height() const;
216  bool isValid() const;
217  int mappedBytes() const;
218  PixelFormat pixelFormat() const;
219  QSize size() const;
220  int width() const;
221 
222 private:
223  int m_bytesPerLine;
224  QByteArray m_data;
225  int m_height;
226  int m_mappedBytes;
227  PixelFormat m_pixelFormat;
228  int m_width;
229 };
230 
231 class QXMPP_EXPORT QXmppVideoFormat
232 {
233 public:
234  int frameHeight() const {
235  return m_frameSize.height();
236  }
237 
238  int frameWidth() const {
239  return m_frameSize.width();
240  }
241 
242  qreal frameRate() const {
243  return m_frameRate;
244  }
245 
246  void setFrameRate(qreal frameRate) {
247  m_frameRate = frameRate;
248  }
249 
250  QSize frameSize() const {
251  return m_frameSize;
252  }
253 
254  void setFrameSize(const QSize &frameSize) {
255  m_frameSize = frameSize;
256  }
257 
258  QXmppVideoFrame::PixelFormat pixelFormat() const {
259  return m_pixelFormat;
260  }
261 
262  void setPixelFormat(QXmppVideoFrame::PixelFormat pixelFormat) {
263  m_pixelFormat = pixelFormat;
264  }
265 
266 private:
267  qreal m_frameRate;
268  QSize m_frameSize;
269  QXmppVideoFrame::PixelFormat m_pixelFormat;
270 };
271 
272 
276 
277 class QXMPP_EXPORT QXmppRtpVideoChannel : public QXmppLoggable, public QXmppRtpChannel
278 {
279  Q_OBJECT
280 
281 public:
282  QXmppRtpVideoChannel(QObject *parent = 0);
284 
285  void close();
286  QIODevice::OpenMode openMode() const;
287 
288  // incoming stream
289  QXmppVideoFormat decoderFormat() const;
290  QList<QXmppVideoFrame> readFrames();
291 
292  // outgoing stream
293  QXmppVideoFormat encoderFormat() const;
294  void setEncoderFormat(const QXmppVideoFormat &format);
295  void writeFrame(const QXmppVideoFrame &frame);
296 
297 signals:
299  void sendDatagram(const QByteArray &ba);
300 
301 public slots:
302  void datagramReceived(const QByteArray &ba);
303 
304 protected:
306  void payloadTypesChanged();
308 
309 private:
310  friend class QXmppRtpVideoChannelPrivate;
311  QXmppRtpVideoChannelPrivate * d;
312 };
313 
314 #endif
qxmpp-0.7.6/doc/html/doxygen.css0000644000175000007640000004705012116723632016522 0ustar sharkyjerryweb/* The standard CSS for doxygen */ body, table, div, p, dl { font: 400 14px/19px Roboto,sans-serif; } /* @group Heading Levels */ h1 { font-size: 150%; } .title { font-size: 150%; font-weight: bold; margin: 10px 2px; } h2 { border-bottom: 1px solid #879ECB; color: #354C7B; font-size: 150%; font-weight: normal; margin-top: 1.75em; padding-top: 8px; padding-bottom: 4px; width: 100%; } h3 { font-size: 100%; } h1, h2, h3, h4, h5, h6 { -webkit-transition: text-shadow 0.5s linear; -moz-transition: text-shadow 0.5s linear; -ms-transition: text-shadow 0.5s linear; -o-transition: text-shadow 0.5s linear; transition: text-shadow 0.5s linear; margin-right: 15px; } h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { text-shadow: 0 0 15px cyan; } dt { font-weight: bold; } div.multicol { -moz-column-gap: 1em; -webkit-column-gap: 1em; -moz-column-count: 3; -webkit-column-count: 3; } p.startli, p.startdd, p.starttd { margin-top: 2px; } p.endli { margin-bottom: 0px; } p.enddd { margin-bottom: 4px; } p.endtd { margin-bottom: 2px; } /* @end */ caption { font-weight: bold; } span.legend { font-size: 70%; text-align: center; } h3.version { font-size: 90%; text-align: center; } div.qindex, div.navtab{ background-color: #EBEFF6; border: 1px solid #A3B4D7; text-align: center; } div.qindex, div.navpath { width: 100%; line-height: 140%; } div.navtab { margin-right: 15px; } /* @group Link Styling */ a { color: #3D578C; font-weight: normal; text-decoration: none; } .contents a:visited { color: #4665A2; } a:hover { text-decoration: underline; } a.qindex { font-weight: bold; } a.qindexHL { font-weight: bold; background-color: #9CAFD4; color: #ffffff; border: 1px double #869DCA; } .contents a.qindexHL:visited { color: #ffffff; } a.el { font-weight: bold; } a.elRef { } a.code, a.code:visited { color: #4665A2; } a.codeRef, a.codeRef:visited { color: #4665A2; } /* @end */ dl.el { margin-left: -1cm; } pre.fragment { border: 1px solid #C4CFE5; background-color: #FBFCFD; padding: 4px 6px; margin: 4px 8px 4px 2px; overflow: auto; word-wrap: break-word; font-size: 9pt; line-height: 125%; font-family: monospace, fixed; font-size: 105%; } div.fragment { padding: 4px; margin: 4px; background-color: #FBFCFD; border: 1px solid #C4CFE5; } div.line { font-family: monospace, fixed; font-size: 13px; min-height: 13px; line-height: 1.0; text-wrap: unrestricted; white-space: -moz-pre-wrap; /* Moz */ white-space: -pre-wrap; /* Opera 4-6 */ white-space: -o-pre-wrap; /* Opera 7 */ white-space: pre-wrap; /* CSS3 */ word-wrap: break-word; /* IE 5.5+ */ text-indent: -53px; padding-left: 53px; padding-bottom: 0px; margin: 0px; -webkit-transition-property: background-color, box-shadow; -webkit-transition-duration: 0.5s; -moz-transition-property: background-color, box-shadow; -moz-transition-duration: 0.5s; -ms-transition-property: background-color, box-shadow; -ms-transition-duration: 0.5s; -o-transition-property: background-color, box-shadow; -o-transition-duration: 0.5s; transition-property: background-color, box-shadow; transition-duration: 0.5s; } div.line.glow { background-color: cyan; box-shadow: 0 0 10px cyan; } span.lineno { padding-right: 4px; text-align: right; border-right: 2px solid #0F0; background-color: #E8E8E8; white-space: pre; } span.lineno a { background-color: #D8D8D8; } span.lineno a:hover { background-color: #C8C8C8; } div.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px; padding: 0.2em; border: solid thin #333; border-radius: 0.5em; -webkit-border-radius: .5em; -moz-border-radius: .5em; box-shadow: 2px 2px 3px #999; -webkit-box-shadow: 2px 2px 3px #999; -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000); } div.groupHeader { margin-left: 16px; margin-top: 12px; font-weight: bold; } div.groupText { margin-left: 16px; font-style: italic; } body { background-color: white; color: black; margin: 0; } div.contents { margin-top: 10px; margin-left: 12px; margin-right: 8px; } td.indexkey { background-color: #EBEFF6; font-weight: bold; border: 1px solid #C4CFE5; margin: 2px 0px 2px 0; padding: 2px 10px; white-space: nowrap; vertical-align: top; } td.indexvalue { background-color: #EBEFF6; border: 1px solid #C4CFE5; padding: 2px 10px; margin: 2px 0px; } tr.memlist { background-color: #EEF1F7; } p.formulaDsp { text-align: center; } img.formulaDsp { } img.formulaInl { vertical-align: middle; } div.center { text-align: center; margin-top: 0px; margin-bottom: 0px; padding: 0px; } div.center img { border: 0px; } address.footer { text-align: right; padding-right: 12px; } img.footer { border: 0px; vertical-align: middle; } /* @group Code Colorization */ span.keyword { color: #008000 } span.keywordtype { color: #604020 } span.keywordflow { color: #e08000 } span.comment { color: #800000 } span.preprocessor { color: #806020 } span.stringliteral { color: #002080 } span.charliteral { color: #008080 } span.vhdldigit { color: #ff00ff } span.vhdlchar { color: #000000 } span.vhdlkeyword { color: #700070 } span.vhdllogic { color: #ff0000 } blockquote { background-color: #F7F8FB; border-left: 2px solid #9CAFD4; margin: 0 24px 0 4px; padding: 0 12px 0 16px; } /* @end */ /* .search { color: #003399; font-weight: bold; } form.search { margin-bottom: 0px; margin-top: 0px; } input.search { font-size: 75%; color: #000080; font-weight: normal; background-color: #e8eef2; } */ td.tiny { font-size: 75%; } .dirtab { padding: 4px; border-collapse: collapse; border: 1px solid #A3B4D7; } th.dirtab { background: #EBEFF6; font-weight: bold; } hr { height: 0px; border: none; border-top: 1px solid #4A6AAA; } hr.footer { height: 1px; } /* @group Member Descriptions */ table.memberdecls { border-spacing: 0px; padding: 0px; } .memberdecls td, .fieldtable tr { -webkit-transition-property: background-color, box-shadow; -webkit-transition-duration: 0.5s; -moz-transition-property: background-color, box-shadow; -moz-transition-duration: 0.5s; -ms-transition-property: background-color, box-shadow; -ms-transition-duration: 0.5s; -o-transition-property: background-color, box-shadow; -o-transition-duration: 0.5s; transition-property: background-color, box-shadow; transition-duration: 0.5s; } .memberdecls td.glow, .fieldtable tr.glow { background-color: cyan; box-shadow: 0 0 15px cyan; } .mdescLeft, .mdescRight, .memItemLeft, .memItemRight, .memTemplItemLeft, .memTemplItemRight, .memTemplParams { background-color: #F9FAFC; border: none; margin: 4px; padding: 1px 0 0 8px; } .mdescLeft, .mdescRight { padding: 0px 8px 4px 8px; color: #555; } .memItemLeft, .memItemRight, .memTemplParams { border-bottom: 1px solid #DEE4F0; } .memItemLeft, .memTemplItemLeft { white-space: nowrap; } .memItemRight { width: 100%; } .memTemplParams { color: #4665A2; white-space: nowrap; } /* @end */ /* @group Member Details */ /* Styles for detailed member documentation */ .memtemplate { font-size: 80%; color: #4665A2; font-weight: normal; margin-left: 9px; } .memnav { background-color: #EBEFF6; border: 1px solid #A3B4D7; text-align: center; margin: 2px; margin-right: 15px; padding: 2px; } .mempage { width: 100%; } .memitem { padding: 0; margin-bottom: 10px; margin-right: 5px; -webkit-transition: box-shadow 0.5s linear; -moz-transition: box-shadow 0.5s linear; -ms-transition: box-shadow 0.5s linear; -o-transition: box-shadow 0.5s linear; transition: box-shadow 0.5s linear; display: table !important; width: 100%; } .memitem.glow { box-shadow: 0 0 15px cyan; } .memname { font-weight: bold; margin-left: 6px; } .memname td { vertical-align: bottom; } .memproto, dl.reflist dt { border-top: 1px solid #A8B8D9; border-left: 1px solid #A8B8D9; border-right: 1px solid #A8B8D9; padding: 6px 0px 6px 0px; color: #253555; font-weight: bold; text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); background-image:url('nav_f.png'); background-repeat:repeat-x; background-color: #E2E8F2; /* opera specific markup */ box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); border-top-right-radius: 4px; border-top-left-radius: 4px; /* firefox specific markup */ -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; -moz-border-radius-topright: 4px; -moz-border-radius-topleft: 4px; /* webkit specific markup */ -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); -webkit-border-top-right-radius: 4px; -webkit-border-top-left-radius: 4px; } .memdoc, dl.reflist dd { border-bottom: 1px solid #A8B8D9; border-left: 1px solid #A8B8D9; border-right: 1px solid #A8B8D9; padding: 6px 10px 2px 10px; background-color: #FBFCFD; border-top-width: 0; background-image:url('nav_g.png'); background-repeat:repeat-x; background-color: #FFFFFF; /* opera specific markup */ border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); /* firefox specific markup */ -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; /* webkit specific markup */ -webkit-border-bottom-left-radius: 4px; -webkit-border-bottom-right-radius: 4px; -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); } dl.reflist dt { padding: 5px; } dl.reflist dd { margin: 0px 0px 10px 0px; padding: 5px; } .paramkey { text-align: right; } .paramtype { white-space: nowrap; } .paramname { color: #602020; white-space: nowrap; } .paramname em { font-style: normal; } .paramname code { line-height: 14px; } .params, .retval, .exception, .tparams { margin-left: 0px; padding-left: 0px; } .params .paramname, .retval .paramname { font-weight: bold; vertical-align: top; } .params .paramtype { font-style: italic; vertical-align: top; } .params .paramdir { font-family: "courier new",courier,monospace; vertical-align: top; } table.mlabels { border-spacing: 0px; } td.mlabels-left { width: 100%; padding: 0px; } td.mlabels-right { vertical-align: bottom; padding: 0px; white-space: nowrap; } span.mlabels { margin-left: 8px; } span.mlabel { background-color: #728DC1; border-top:1px solid #5373B4; border-left:1px solid #5373B4; border-right:1px solid #C4CFE5; border-bottom:1px solid #C4CFE5; text-shadow: none; color: white; margin-right: 4px; padding: 2px 3px; border-radius: 3px; font-size: 7pt; white-space: nowrap; } /* @end */ /* these are for tree view when not used as main index */ div.directory { margin: 10px 0px; border-top: 1px solid #A8B8D9; border-bottom: 1px solid #A8B8D9; width: 100%; } .directory table { border-collapse:collapse; } .directory td { margin: 0px; padding: 0px; vertical-align: top; } .directory td.entry { white-space: nowrap; padding-right: 6px; } .directory td.entry a { outline:none; } .directory td.entry a img { border: none; } .directory td.desc { width: 100%; padding-left: 6px; padding-right: 6px; padding-top: 3px; border-left: 1px solid rgba(0,0,0,0.05); } .directory tr.even { padding-left: 6px; background-color: #F7F8FB; } .directory img { vertical-align: -30%; } .directory .levels { white-space: nowrap; width: 100%; text-align: right; font-size: 9pt; } .directory .levels span { cursor: pointer; padding-left: 2px; padding-right: 2px; color: #3D578C; } div.dynheader { margin-top: 8px; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } address { font-style: normal; color: #2A3D61; } table.doxtable { border-collapse:collapse; margin-top: 4px; margin-bottom: 4px; } table.doxtable td, table.doxtable th { border: 1px solid #2D4068; padding: 3px 7px 2px; } table.doxtable th { background-color: #374F7F; color: #FFFFFF; font-size: 110%; padding-bottom: 4px; padding-top: 5px; } table.fieldtable { width: 100%; margin-bottom: 10px; border: 1px solid #A8B8D9; border-spacing: 0px; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); } .fieldtable td, .fieldtable th { padding: 3px 7px 2px; } .fieldtable td.fieldtype, .fieldtable td.fieldname { white-space: nowrap; border-right: 1px solid #A8B8D9; border-bottom: 1px solid #A8B8D9; vertical-align: top; } .fieldtable td.fielddoc { border-bottom: 1px solid #A8B8D9; width: 100%; } .fieldtable tr:last-child td { border-bottom: none; } .fieldtable th { background-image:url('nav_f.png'); background-repeat:repeat-x; background-color: #E2E8F2; font-size: 90%; color: #253555; padding-bottom: 4px; padding-top: 5px; text-align:left; -moz-border-radius-topleft: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-left-radius: 4px; -webkit-border-top-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom: 1px solid #A8B8D9; } .tabsearch { top: 0px; left: 10px; height: 36px; background-image: url('tab_b.png'); z-index: 101; overflow: hidden; font-size: 13px; } .navpath ul { font-size: 11px; background-image:url('tab_b.png'); background-repeat:repeat-x; height:30px; line-height:30px; color:#8AA0CC; border:solid 1px #C2CDE4; overflow:hidden; margin:0px; padding:0px; } .navpath li { list-style-type:none; float:left; padding-left:10px; padding-right:15px; background-image:url('bc_s.png'); background-repeat:no-repeat; background-position:right; color:#364D7C; } .navpath li.navelem a { height:32px; display:block; text-decoration: none; outline: none; font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; } .navpath li.navelem a:hover { color:#6884BD; } .navpath li.footer { list-style-type:none; float:right; padding-left:10px; padding-right:15px; background-image:none; background-repeat:no-repeat; background-position:right; color:#364D7C; font-size: 8pt; } div.summary { float: right; font-size: 8pt; padding-right: 5px; width: 50%; text-align: right; } div.summary a { white-space: nowrap; } div.ingroups { font-size: 8pt; width: 50%; text-align: left; } div.ingroups a { white-space: nowrap; } div.header { background-image:url('nav_h.png'); background-repeat:repeat-x; background-color: #F9FAFC; margin: 0px; border-bottom: 1px solid #C4CFE5; } div.headertitle { padding: 5px 5px 5px 10px; } dl { padding: 0 0 0 10px; } /* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */ dl.section { margin-left: 0px; padding-left: 0px; } dl.note { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #D0C000; } dl.warning, dl.attention { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #FF0000; } dl.pre, dl.post, dl.invariant { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #00D000; } dl.deprecated { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #505050; } dl.todo { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #00C0E0; } dl.test { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #3030E0; } dl.bug { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #C08050; } dl.section dd { margin-bottom: 6px; } #projectlogo { text-align: center; vertical-align: bottom; border-collapse: separate; } #projectlogo img { border: 0px none; } #projectname { font: 300% Tahoma, Arial,sans-serif; margin: 0px; padding: 2px 0px; } #projectbrief { font: 120% Tahoma, Arial,sans-serif; margin: 0px; padding: 0px; } #projectnumber { font: 50% Tahoma, Arial,sans-serif; margin: 0px; padding: 0px; } #titlearea { padding: 0px; margin: 0px; width: 100%; border-bottom: 1px solid #5373B4; } .image { text-align: center; } .dotgraph { text-align: center; } .mscgraph { text-align: center; } .caption { font-weight: bold; } div.zoom { border: 1px solid #90A5CE; } dl.citelist { margin-bottom:50px; } dl.citelist dt { color:#334975; float:left; font-weight:bold; margin-right:10px; padding:5px; } dl.citelist dd { margin:2px 0; padding:5px 0; } div.toc { padding: 14px 25px; background-color: #F4F6FA; border: 1px solid #D8DFEE; border-radius: 7px 7px 7px 7px; float: right; height: auto; margin: 0 20px 10px 10px; width: 200px; } div.toc li { background: url("bdwn.png") no-repeat scroll 0 5px transparent; font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; margin-top: 5px; padding-left: 10px; padding-top: 2px; } div.toc h3 { font: bold 12px/1.2 Arial,FreeSans,sans-serif; color: #4665A2; border-bottom: 0 none; margin: 0; } div.toc ul { list-style: none outside none; border: medium none; padding: 0px; } div.toc li.level1 { margin-left: 0px; } div.toc li.level2 { margin-left: 15px; } div.toc li.level3 { margin-left: 30px; } div.toc li.level4 { margin-left: 45px; } .inherit_header { font-weight: bold; color: gray; cursor: pointer; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .inherit_header td { padding: 6px 0px 2px 5px; } .inherit { display: none; } tr.heading h2 { margin-top: 12px; margin-bottom: 4px; } @media print { #top { display: none; } #side-nav { display: none; } #nav-path { display: none; } body { overflow:visible; } h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } .summary { display: none; } .memitem { page-break-inside: avoid; } #doc-content { margin-left:0 !important; height:auto !important; width:auto !important; overflow:inherit; display:inline; } } qxmpp-0.7.6/doc/html/classQXmppPresence.html0000644000175000007640000014033612116723632021002 0ustar sharkyjerryweb QXmpp: QXmppPresence Class Reference

The QXmppPresence class represents an XMPP presence stanza. More...

#include <QXmppPresence.h>

Inheritance diagram for QXmppPresence:
QXmppStanza

Public Types

enum  Type {
  Error = 0, Available, Unavailable, Subscribe,
  Subscribed, Unsubscribe, Unsubscribed, Probe
}
 This enum is used to describe a presence type. More...
enum  AvailableStatusType {
  Online = 0, Away, XA, DND,
  Chat, Invisible
}
 This enum is used to describe an availability status. More...
enum  VCardUpdateType { VCardUpdateNone = 0, VCardUpdateNoPhoto, VCardUpdateValidPhoto, VCardUpdateNotReady }

Public Member Functions

 QXmppPresence (QXmppPresence::Type type=QXmppPresence::Available)
 QXmppPresence (const QXmppPresence &other)
 Constructs a copy of other.
 ~QXmppPresence ()
 Destroys a QXmppPresence.
QXmppPresenceoperator= (const QXmppPresence &other)
 Assigns other to this presence.
AvailableStatusType availableStatusType () const
void setAvailableStatusType (AvailableStatusType type)
 Sets the availability status type, for instance busy or away.
int priority () const
 Returns the priority level of the resource.
void setPriority (int priority)
 Sets the priority level of the resource.
QXmppPresence::Type type () const
void setType (QXmppPresence::Type)
QString statusText () const
 Returns the status text, a textual description of the user's status.
void setStatusText (const QString &statusText)
QXmppMucItem mucItem () const
 Returns the MUC item.
void setMucItem (const QXmppMucItem &item)
QString mucPassword () const
 Returns the password used to join a MUC room.
void setMucPassword (const QString &password)
 Sets the password used to join a MUC room.
QList< int > mucStatusCodes () const
 Returns the MUC status codes.
void setMucStatusCodes (const QList< int > &codes)
bool isMucSupported () const
 Returns true if the sender has indicated MUC support.
void setMucSupported (bool supported)
 Sets whether MUC is supported.
QByteArray photoHash () const
 XEP-0153: vCard-Based Avatars
void setPhotoHash (const QByteArray &)
VCardUpdateType vCardUpdateType () const
void setVCardUpdateType (VCardUpdateType type)
QString capabilityHash () const
 XEP-0115: Entity Capabilities
void setCapabilityHash (const QString &)
 XEP-0115: Entity Capabilities
QString capabilityNode () const
 XEP-0115: Entity Capabilities
void setCapabilityNode (const QString &)
 XEP-0115: Entity Capabilities
QByteArray capabilityVer () const
 XEP-0115: Entity Capabilities
void setCapabilityVer (const QByteArray &)
 XEP-0115: Entity Capabilities
QStringList capabilityExt () const
 Legacy XEP-0115: Entity Capabilities
- Public Member Functions inherited from QXmppStanza
 QXmppStanza (const QString &from=QString(), const QString &to=QString())
 QXmppStanza (const QXmppStanza &other)
 Constructs a copy of other.
virtual ~QXmppStanza ()
 Destroys a QXmppStanza.
QXmppStanzaoperator= (const QXmppStanza &other)
 Assigns other to this stanza.
QString to () const
void setTo (const QString &)
QString from () const
 Returns the stanza's sender JID.
void setFrom (const QString &)
QString id () const
 Returns the stanza's identifier.
void setId (const QString &)
QString lang () const
 Returns the stanza's language.
void setLang (const QString &)
QXmppStanza::Error error () const
 Returns the stanza's error.
void setError (const QXmppStanza::Error &error)
QXmppElementList extensions () const
void setExtensions (const QXmppElementList &elements)
QList< QXmppExtendedAddressextendedAddresses () const
void setExtendedAddresses (const QList< QXmppExtendedAddress > &extendedAddresses)

Detailed Description

The QXmppPresence class represents an XMPP presence stanza.

Member Enumeration Documentation

This enum is used to describe an availability status.

Enumerator:
Online 

The entity or resource is online.

Away 

The entity or resource is temporarily away.

XA 

The entity or resource is away for an extended period.

DND 

The entity or resource is busy ("Do Not Disturb").

Chat 

The entity or resource is actively interested in chatting.

Invisible 

obsolete XEP-0018: Invisible Presence

This enum is used to describe a presence type.

Enumerator:
Error 

An error has occurred regarding processing or delivery of a previously-sent presence stanza.

Available 

Signals that the sender is online and available for communication.

Unavailable 

Signals that the sender is no longer available for communication.

Subscribe 

The sender wishes to subscribe to the recipient's presence.

Subscribed 

The sender has allowed the recipient to receive their presence.

Unsubscribe 

The sender is unsubscribing from another entity's presence.

Unsubscribed 

The subscription request has been denied or a previously-granted subscription has been cancelled.

Probe 

A request for an entity's current presence; SHOULD be generated only by a server on behalf of a user.

This enum is used to describe vCard updates as defined by XEP-0153: vCard-Based Avatars

Enumerator:
VCardUpdateNone 

Protocol is not supported.

VCardUpdateNoPhoto 

User is not using any image.

VCardUpdateValidPhoto 

User is advertising an image.

VCardUpdateNotReady 

User is not ready to advertise an image.

Note
This enables recipients to distinguish between the absence of an image (empty photo element) and mere support for the protocol (empty update child).

Constructor & Destructor Documentation

QXmppPresence::QXmppPresence ( QXmppPresence::Type  type = QXmppPresence::Available)

Constructs a QXmppPresence.

Parameters
type

Member Function Documentation

QXmppPresence::AvailableStatusType QXmppPresence::availableStatusType ( ) const

Returns the availability status type, for instance busy or away.

This will not tell you whether a contact is connected, check whether type() is QXmppPresence::Available instead.

QByteArray QXmppPresence::photoHash ( ) const

XEP-0153: vCard-Based Avatars

 .

Returns the photo-hash of the VCardUpdate.

Returns
QByteArray
void QXmppPresence::setMucItem ( const QXmppMucItem item)

Sets the MUC item.

Parameters
item
void QXmppPresence::setMucStatusCodes ( const QList< int > &  codes)

Sets the MUC status codes.

Parameters
codes
void QXmppPresence::setPhotoHash ( const QByteArray &  photoHash)

Sets the photo-hash of the VCardUpdate.

Parameters
photoHashas QByteArray
void QXmppPresence::setStatusText ( const QString &  statusText)

Sets the status text, a textual description of the user's status.

Parameters
statusTextThe status text, for example "Gone fishing".
void QXmppPresence::setType ( QXmppPresence::Type  type)

Sets the presence type.

Parameters
type
void QXmppPresence::setVCardUpdateType ( VCardUpdateType  type)

Sets the type of VCardUpdate

Parameters
typeVCardUpdateType
QXmppPresence::Type QXmppPresence::type ( ) const

Returns the presence type.

You can use this method to determine the action which needs to be taken in response to receiving the presence. For instance, if the type is QXmppPresence::Available or QXmppPresence::Unavailable, you could update the icon representing a contact's availability.

QXmppPresence::VCardUpdateType QXmppPresence::vCardUpdateType ( ) const

Returns the type of VCardUpdate

Returns
VCardUpdateType

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/ftv2link.png0000644000175000007640000000135212116723632016573 0ustar sharkyjerrywebPNG  IHDR}\IDATxMOS[sa?-XZ(PD4 AWbu`b 77wHFCԁ/`voAPqP@ 980 +y^Z9SW\83g3'Nçl_bpV"ֆXd]3xM[1W *PGz/Eg{ aoV:这1$RW,@56-,m/蹖 r5T*S(Vf89u գwa=<{ҡUr+dDF$`zNܮ0Q3~_^N=vpTLT}kqm<?ZhX_ݥ[) `ga_*2`'=F2EP l=8Wv%THqɿ<"GxH{#֫aJmKsVءM^ T ݛr߽m_?Wİ#uIENDB`qxmpp-0.7.6/doc/html/classQXmppArchiveListIq.png0000644000175000007640000000135412116723632021561 0ustar sharkyjerrywebPNG  IHDRĀPLTEutRNST2{IDATx뒫 *YsvR4E$K1B$3~I:#L5I:'!I\f2{yNdrwZ:FI:?_mi{h$ۏh${nFS{sh:lt ]Д8'qÙ_[RW_ӹ TR5Sl~ؔǸ$ !b_W>`p?v~1FCd/IoV$2.$?ϳwbCWe<'q5ubH 5S_Syo'O+PP~>%iF_pI1FC>a0ؿ, 0zX|~;`p?Bp/Bj9 rׇnLW+<cǸC 4aIENDB`qxmpp-0.7.6/doc/html/functions_0x72.html0000644000175000007640000003121512116723632020005 0ustar sharkyjerryweb QXmpp: Class Members
QXmpp  Version:0.7.6
Here is a list of all documented class members with links to the class documentation for each member:

- r -

qxmpp-0.7.6/doc/html/QXmppDataForm_8h_source.html0000644000175000007640000007546312116723632021674 0ustar sharkyjerryweb QXmpp: QXmppDataForm.h Source File
QXmpp  Version:0.7.6
QXmppDataForm.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Jeremy Lainé
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXMPPDATAFORM_H
25 #define QXMPPDATAFORM_H
26 
27 #include <QPair>
28 #include <QVariant>
29 
30 #include "QXmppStanza.h"
31 
32 class QXmppDataFormPrivate;
33 class QXmppDataFormFieldPrivate;
34 class QXmppDataFormMediaPrivate;
35 
39 
40 class QXMPP_EXPORT QXmppDataForm
41 {
42 public:
46 
47  class QXMPP_EXPORT Media
48  {
49  public:
50  Media();
51  Media(const QXmppDataForm::Media &other);
52  ~Media();
53 
54  QXmppDataForm::Media& operator=(const QXmppDataForm::Media &other);
55 
56  int height() const;
57  void setHeight(int height);
58 
59  int width() const;
60  void setWidth(int width);
61 
62  QList<QPair<QString, QString> > uris() const;
63  void setUris(const QList<QPair<QString, QString> > &uris);
64 
65  bool isNull() const;
66 
67  private:
68  QSharedDataPointer<QXmppDataFormMediaPrivate> d;
69  };
70 
74 
75  class QXMPP_EXPORT Field
76  {
77  public:
79  enum Type
80  {
81  BooleanField,
82  FixedField,
83  HiddenField,
84  JidMultiField,
85  JidSingleField,
86  ListMultiField,
87  ListSingleField,
88  TextMultiField,
89  TextPrivateField,
90  TextSingleField,
91  };
92 
93  Field(QXmppDataForm::Field::Type type = QXmppDataForm::Field::TextSingleField);
94  Field(const QXmppDataForm::Field &other);
95  ~Field();
96 
97  QXmppDataForm::Field& operator=(const QXmppDataForm::Field &other);
98 
99  QString description() const;
100  void setDescription(const QString &description);
101 
102  QString key() const;
103  void setKey(const QString &key);
104 
105  QString label() const;
106  void setLabel(const QString &label);
107 
108  Media media() const;
109  void setMedia(const Media &media);
110 
111  QList<QPair<QString, QString> > options() const;
112  void setOptions(const QList<QPair<QString, QString> > &options);
113 
114  bool isRequired() const;
115  void setRequired(bool required);
116 
117  QXmppDataForm::Field::Type type() const;
118  void setType(QXmppDataForm::Field::Type type);
119 
120  QVariant value() const;
121  void setValue(const QVariant &value);
122 
123  private:
124  QSharedDataPointer<QXmppDataFormFieldPrivate> d;
125  };
126 
128  enum Type
129  {
131  Form,
132 
133  Submit,
134 
135  Cancel,
136 
137  Result,
138 
139 
140  };
141 
143  QXmppDataForm(const QXmppDataForm &other);
144  ~QXmppDataForm();
145 
146  QXmppDataForm& operator=(const QXmppDataForm &other);
147 
148  QString instructions() const;
149  void setInstructions(const QString &instructions);
150 
151  QList<Field> fields() const;
152  QList<Field> &fields();
153  void setFields(const QList<QXmppDataForm::Field> &fields);
154 
155  QString title() const;
156  void setTitle(const QString &title);
157 
158  QXmppDataForm::Type type() const;
159  void setType(QXmppDataForm::Type type);
160 
161  bool isNull() const;
162 
164  void parse(const QDomElement &element);
165  void toXml(QXmlStreamWriter *writer) const;
167 
168 private:
169  QSharedDataPointer<QXmppDataFormPrivate> d;
170 };
171 
172 #endif
qxmpp-0.7.6/doc/html/classQXmppBookmarkManager.html0000644000175000007640000004050512116723632022273 0ustar sharkyjerryweb QXmpp: QXmppBookmarkManager Class Reference
QXmppBookmarkManager Class Reference

The QXmppBookmarkManager class allows you to store and retrieve bookmarks as defined by XEP-0048: Bookmarks. More...

#include <QXmppBookmarkManager.h>

Inheritance diagram for QXmppBookmarkManager:
QXmppClientExtension QXmppLoggable

Signals

void bookmarksReceived (const QXmppBookmarkSet &bookmarks)
 This signal is emitted when bookmarks are received.

Public Member Functions

 QXmppBookmarkManager ()
 ~QXmppBookmarkManager ()
bool areBookmarksReceived () const
QXmppBookmarkSet bookmarks () const
bool setBookmarks (const QXmppBookmarkSet &bookmarks)
- Public Member Functions inherited from QXmppClientExtension
 QXmppClientExtension ()
virtual ~QXmppClientExtension ()
virtual QStringList discoveryFeatures () const
virtual QList
< QXmppDiscoveryIq::Identity > 
discoveryIdentities () const
virtual bool handleStanza (const QDomElement &stanza)=0
 You need to implement this method to process incoming XMPP stanzas.
- Public Member Functions inherited from QXmppLoggable
 QXmppLoggable (QObject *parent=0)

Additional Inherited Members

- Protected Member Functions inherited from QXmppClientExtension
QXmppClientclient ()
virtual void setClient (QXmppClient *client)

Detailed Description

The QXmppBookmarkManager class allows you to store and retrieve bookmarks as defined by XEP-0048: Bookmarks.

Constructor & Destructor Documentation

QXmppBookmarkManager::QXmppBookmarkManager ( )

Constructs a new bookmark manager.

QXmppBookmarkManager::~QXmppBookmarkManager ( )

Destroys a bookmark manager.

Member Function Documentation

bool QXmppBookmarkManager::areBookmarksReceived ( ) const

Returns true if the bookmarks have been received from the server, false otherwise.

QXmppBookmarkSet QXmppBookmarkManager::bookmarks ( ) const

Returns the bookmarks stored on the server.

Before calling this method, check that the bookmarks have indeed been received by calling areBookmarksReceived().

bool QXmppBookmarkManager::setBookmarks ( const QXmppBookmarkSet bookmarks)

Stores the bookmarks on the server.

Parameters
bookmarks

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/QXmppClient_8h_source.html0000644000175000007640000007662412116723632021415 0ustar sharkyjerryweb QXmpp: QXmppClient.h Source File
QXmpp  Version:0.7.6
QXmppClient.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Manjeet Dahiya
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXMPPCLIENT_H
25 #define QXMPPCLIENT_H
26 
27 #include <QObject>
28 #include <QAbstractSocket>
29 
30 #include "QXmppConfiguration.h"
31 #include "QXmppLogger.h"
32 #include "QXmppPresence.h"
33 
35 class QXmppClientPrivate;
36 class QXmppPresence;
37 class QXmppMessage;
38 class QXmppIq;
39 class QXmppStream;
40 
41 // managers
42 class QXmppDiscoveryIq;
43 class QXmppRosterManager;
44 class QXmppVCardManager;
46 
48 
50 
77 
78 class QXMPP_EXPORT QXmppClient : public QXmppLoggable
79 {
80  Q_OBJECT
81  Q_ENUMS(Error State)
82  Q_PROPERTY(QXmppLogger* logger READ logger WRITE setLogger NOTIFY loggerChanged)
83  Q_PROPERTY(State state READ state NOTIFY stateChanged)
84 
85 public:
88  enum Error
89  {
94  };
95 
97  enum State
98  {
102  };
103 
104  QXmppClient(QObject *parent = 0);
105  ~QXmppClient();
106 
107  bool addExtension(QXmppClientExtension* extension);
108  bool insertExtension(int index, QXmppClientExtension* extension);
109  bool removeExtension(QXmppClientExtension* extension);
110 
111  QList<QXmppClientExtension*> extensions();
112 
125  template<typename T>
126  T* findExtension()
127  {
128  QList<QXmppClientExtension*> list = extensions();
129  for (int i = 0; i < list.size(); ++i)
130  {
131  T* extension = qobject_cast<T*>(list.at(i));
132  if(extension)
133  return extension;
134  }
135  return 0;
136  }
137 
138  void connectToServer(const QXmppConfiguration&,
139  const QXmppPresence& initialPresence =
140  QXmppPresence());
141  bool isAuthenticated() const;
142  bool isConnected() const;
143 
144  QXmppPresence clientPresence() const;
145  void setClientPresence(const QXmppPresence &presence);
146 
147  QXmppConfiguration &configuration();
148  QXmppLogger *logger() const;
149  void setLogger(QXmppLogger *logger);
150 
151  QAbstractSocket::SocketError socketError();
152  State state() const;
153  QXmppStanza::Error::Condition xmppStreamError();
154 
155  QXmppRosterManager& rosterManager();
156  QXmppVCardManager& vCardManager();
157  QXmppVersionManager& versionManager();
158 
159 signals:
160 
180  void connected();
181 
184  void disconnected();
185 
191  void error(QXmppClient::Error);
192 
194  void loggerChanged(QXmppLogger *logger);
195 
200  void messageReceived(const QXmppMessage &message);
201 
206  void presenceReceived(const QXmppPresence &presence);
207 
212  void iqReceived(const QXmppIq &iq);
213 
215  void stateChanged(QXmppClient::State state);
216 
217 public slots:
218  void connectToServer(const QString &jid,
219  const QString &password);
220  void disconnectFromServer();
221  bool sendPacket(const QXmppStanza&);
222  void sendMessage(const QString& bareJid, const QString& message);
223 
224 private slots:
225  void _q_elementReceived(const QDomElement &element, bool &handled);
226  void _q_reconnect();
227  void _q_socketStateChanged(QAbstractSocket::SocketState state);
228  void _q_streamConnected();
229  void _q_streamDisconnected();
230  void _q_streamError(QXmppClient::Error error);
231 
232 private:
233  QXmppClientPrivate * const d;
234 };
235 
236 #endif // QXMPPCLIENT_H
qxmpp-0.7.6/doc/html/classQXmppPasswordReply-members.html0000644000175000007640000002200712116723632023476 0ustar sharkyjerryweb QXmpp: Member List
QXmppPasswordReply Member List

This is the complete list of members for QXmppPasswordReply, including all inherited members.

AuthorizationError enum value (defined in QXmppPasswordReply)QXmppPasswordReply
digest() const QXmppPasswordReply
Error enum nameQXmppPasswordReply
error() const QXmppPasswordReply
finish()QXmppPasswordReplyslot
finished()QXmppPasswordReplysignal
finishLater()QXmppPasswordReplyslot
isFinished() const QXmppPasswordReply
NoError enum value (defined in QXmppPasswordReply)QXmppPasswordReply
password() const QXmppPasswordReply
QXmppPasswordReply(QObject *parent=0)QXmppPasswordReply
setDigest(const QByteArray &digest)QXmppPasswordReply
setError(QXmppPasswordReply::Error error)QXmppPasswordReply
setPassword(const QString &password)QXmppPasswordReply
TemporaryError enum value (defined in QXmppPasswordReply)QXmppPasswordReply
qxmpp-0.7.6/doc/html/classQXmppVideoFrame.html0000644000175000007640000004250512116723632021256 0ustar sharkyjerryweb QXmpp: QXmppVideoFrame Class Reference
QXmppVideoFrame Class Reference

The QXmppVideoFrame class provides a representation of a frame of video data. More...

#include <QXmppRtpChannel.h>

Public Types

enum  PixelFormat {
  Format_Invalid = 0, Format_RGB32 = 3, Format_RGB24 = 4, Format_YUV420P = 18,
  Format_UYVY = 20, Format_YUYV = 21
}
 This enum describes a pixel format. More...

Public Member Functions

 QXmppVideoFrame ()
 QXmppVideoFrame (int bytes, const QSize &size, int bytesPerLine, PixelFormat format)
uchar * bits ()
 Returns a pointer to the start of the frame data buffer.
const uchar * bits () const
 Returns a pointer to the start of the frame data buffer.
int bytesPerLine () const
 Returns the number of bytes in a scan line.
int height () const
 Returns the height of a video frame.
bool isValid () const
 Returns true if the frame is valid.
int mappedBytes () const
 Returns the number of bytes occupied by the mapped frame data.
PixelFormat pixelFormat () const
 Returns the color format of a video frame.
QSize size () const
 Returns the size of a video frame.
int width () const
 Returns the width of a video frame.

Detailed Description

The QXmppVideoFrame class provides a representation of a frame of video data.

Note
THIS API IS NOT FINALIZED YET

Member Enumeration Documentation

This enum describes a pixel format.

Enumerator:
Format_Invalid 

The frame is invalid.

Format_RGB32 

The frame stored using a 32-bit RGB format (0xffRRGGBB).

Format_RGB24 

The frame is stored using a 24-bit RGB format (8-8-8).

Format_YUV420P 

The frame is stored using an 8-bit per component planar YUV format with the U and V planes horizontally and vertically sub-sampled, i.e. the height and width of the U and V planes are half that of the Y plane.

Format_UYVY 

The frame is stored using an 8-bit per component packed YUV format with the U and V planes horizontally sub-sampled (U-Y-V-Y), i.e. two horizontally adjacent pixels are stored as a 32-bit macropixel which has a Y value for each pixel and common U and V values.

Format_YUYV 

The frame is stored using an 8-bit per component packed YUV format with the U and V planes horizontally sub-sampled (Y-U-Y-V), i.e. two horizontally adjacent pixels are stored as a 32-bit macropixel which has a Y value for each pixel and common U and V values.

Constructor & Destructor Documentation

QXmppVideoFrame::QXmppVideoFrame ( )

Constructs a null video frame.

QXmppVideoFrame::QXmppVideoFrame ( int  bytes,
const QSize &  size,
int  bytesPerLine,
PixelFormat  format 
)

Constructs a video frame of the given pixel format and size in pixels.

Parameters
bytes
size
bytesPerLine
format

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppBookmarkConference.html0000644000175000007640000003401012116723632022762 0ustar sharkyjerryweb QXmpp: QXmppBookmarkConference Class Reference
QXmppBookmarkConference Class Reference

The QXmppBookmarkConference class represents a bookmark for a conference room, as defined by XEP-0048: Bookmarks. More...

#include <QXmppBookmarkSet.h>

Public Member Functions

 QXmppBookmarkConference ()
bool autoJoin () const
void setAutoJoin (bool autoJoin)
QString jid () const
void setJid (const QString &jid)
QString name () const
void setName (const QString &name)
QString nickName () const
void setNickName (const QString &nickName)

Detailed Description

The QXmppBookmarkConference class represents a bookmark for a conference room, as defined by XEP-0048: Bookmarks.

Constructor & Destructor Documentation

QXmppBookmarkConference::QXmppBookmarkConference ( )

Constructs a new conference room bookmark.

Member Function Documentation

bool QXmppBookmarkConference::autoJoin ( ) const

Returns whether the client should automatically join the conference room on login.

QString QXmppBookmarkConference::jid ( ) const

Returns the JID of the conference room.

QString QXmppBookmarkConference::name ( ) const

Returns the friendly name for the bookmark.

QString QXmppBookmarkConference::nickName ( ) const

Returns the preferred nickname for the conference room.

void QXmppBookmarkConference::setAutoJoin ( bool  autoJoin)

Sets whether the client should automatically join the conference room on login.

Parameters
autoJoin
void QXmppBookmarkConference::setJid ( const QString &  jid)

Sets the JID of the conference room.

Parameters
jid
void QXmppBookmarkConference::setName ( const QString &  name)

Sets the friendly name for the bookmark.

Parameters
name
void QXmppBookmarkConference::setNickName ( const QString &  nickName)

Sets the preferred nickname for the conference room.

Parameters
nickName

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppVCardManager.png0000644000175000007640000000166512116723632021351 0ustar sharkyjerrywebPNG  IHDRz#'PLTEutRNST2DIDATxң 3K^+" NZQ1K)#$͢đH#Inqz'I{FWw8y+8&Bz/9YMifܽ$p*G}BEX8S8bpǺƯgNz}T|s28v<[$szVbeIRWțی$9ι$=Dv9&*q$)|82Cy41\8+LG9 oxLxN?!XM1t7r8m 8W1z{"]08;/q`Ɔ'{\h'q)^;paFeGK3=6Gy`W C;ֿ _tk%@peY]:/7@IENDB`qxmpp-0.7.6/doc/html/classQXmppCall-members.html0000644000175000007640000004113112116723632021532 0ustar sharkyjerryweb QXmpp: Member List
QXmppCall Member List

This is the complete list of members for QXmppCall, including all inherited members.

accept()QXmppCallslot
ActiveState enum valueQXmppCall
audioChannel() const QXmppCall
audioModeQXmppCall
audioMode() const (defined in QXmppCall)QXmppCall
audioModeChanged(QIODevice::OpenMode mode)QXmppCallsignal
connected()QXmppCallsignal
ConnectingState enum valueQXmppCall
debug(const QString &message)QXmppLoggableinlineprotected
directionQXmppCall
direction() const (defined in QXmppCall)QXmppCall
Direction enum nameQXmppCall
DisconnectingState enum valueQXmppCall
finished()QXmppCallsignal
FinishedState enum valueQXmppCall
hangup()QXmppCallslot
IncomingDirection enum valueQXmppCall
info(const QString &message)QXmppLoggableinlineprotected
jidQXmppCall
jid() const (defined in QXmppCall)QXmppCall
logMessage(QXmppLogger::MessageType type, const QString &msg)QXmppLoggablesignal
logReceived(const QString &message)QXmppLoggableinlineprotected
logSent(const QString &message)QXmppLoggableinlineprotected
OutgoingDirection enum valueQXmppCall
QXmppCallManager (defined in QXmppCall)QXmppCallfriend
QXmppCallManagerPrivate (defined in QXmppCall)QXmppCallfriend
QXmppCallPrivate (defined in QXmppCall)QXmppCallfriend
QXmppLoggable(QObject *parent=0)QXmppLoggable
ringing()QXmppCallsignal
setGauge(const QString &gauge, double value)QXmppLoggablesignal
sid() const QXmppCall
startVideo()QXmppCallslot
State enum nameQXmppCall
stateQXmppCall
state() const (defined in QXmppCall)QXmppCall
stateChanged(QXmppCall::State state)QXmppCallsignal
stopVideo()QXmppCallslot
updateCounter(const QString &counter, qint64 amount=1)QXmppLoggablesignal
videoChannel() const QXmppCall
videoModeQXmppCall
videoMode() const (defined in QXmppCall)QXmppCall
videoModeChanged(QIODevice::OpenMode mode)QXmppCallsignal
warning(const QString &message)QXmppLoggableinlineprotected
~QXmppCall() (defined in QXmppCall)QXmppCall
qxmpp-0.7.6/doc/html/classQXmppDataForm_1_1Field.html0000644000175000007640000005367012116723632022343 0ustar sharkyjerryweb QXmpp: QXmppDataForm::Field Class Reference
QXmppDataForm::Field Class Reference

The QXmppDataForm::Field class represents a data form field as defined by XEP-0004: Data Forms. More...

#include <QXmppDataForm.h>

Public Types

enum  Type {
  BooleanField, FixedField, HiddenField, JidMultiField,
  JidSingleField, ListMultiField, ListSingleField, TextMultiField,
  TextPrivateField, TextSingleField
}
 This enum is used to describe a field's type.

Public Member Functions

 Field (QXmppDataForm::Field::Type type=QXmppDataForm::Field::TextSingleField)
 Constructs a QXmppDataForm::Field of the specified type.
 Field (const QXmppDataForm::Field &other)
 Constructs a copy of other.
 ~Field ()
 Destroys the form field.
QXmppDataForm::Fieldoperator= (const QXmppDataForm::Field &other)
 Assigns other to this field.
QString description () const
 Returns the field's description.
void setDescription (const QString &description)
QString key () const
 Returns the field's key.
void setKey (const QString &key)
QString label () const
 Returns the field's label.
void setLabel (const QString &label)
Media media () const
 Returns the field's media.
void setMedia (const Media &media)
 Sets the field's media.
QList< QPair< QString, QString > > options () const
 Returns the field's options.
void setOptions (const QList< QPair< QString, QString > > &options)
bool isRequired () const
 Returns true if the field is required, false otherwise.
void setRequired (bool required)
QXmppDataForm::Field::Type type () const
 Returns the field's type.
void setType (QXmppDataForm::Field::Type type)
QVariant value () const
 Returns the field's value.
void setValue (const QVariant &value)

Detailed Description

The QXmppDataForm::Field class represents a data form field as defined by XEP-0004: Data Forms.

Member Function Documentation

void QXmppDataForm::Field::setDescription ( const QString &  description)

Sets the field's description.

Parameters
description
void QXmppDataForm::Field::setKey ( const QString &  key)

Sets the field's key.

Parameters
key
void QXmppDataForm::Field::setLabel ( const QString &  label)

Sets the field's label.

Parameters
label
void QXmppDataForm::Field::setOptions ( const QList< QPair< QString, QString > > &  options)

Sets the field's options.

Parameters
options
void QXmppDataForm::Field::setRequired ( bool  required)

Set to true if the field is required, false otherwise.

Parameters
required
void QXmppDataForm::Field::setType ( QXmppDataForm::Field::Type  type)

Sets the field's type.

Parameters
type
void QXmppDataForm::Field::setValue ( const QVariant &  value)

Sets the field's value.

Parameters
value

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppMessage.png0000644000175000007640000000103412116723632020431 0ustar sharkyjerrywebPNG  IHDRiP-)mPLTEutRNST2IDATxێ DF14*D p9ؙcCDIIayVG""J OV+5)S^ckzIiQT鼥S4Y4\!)e-k5zﮑm+M PQzwT$|eGMSaWf=lVdA y2N)J=c)=J\RS_bi5ԏBazIENDB`qxmpp-0.7.6/doc/html/classQXmppArchiveManager.png0000644000175000007640000000170712116723632021730 0ustar sharkyjerrywebPNG  IHDR2;PLTEutRNST2VIDATxr ׇ#؀ttҖUcb-BXOIZM%IV9$Yu=G{4Hb*HEŪ"=i&L^4+ĕ"ZMpyʽ]5 V|cV^3g XnL%[|[ܞ+`J?ݤj+e%DIgϔ$5&%ɮֹ_%XdպX!>zZXkM'Պ\by%XV9U`cXXV9U`cXXV9U`B Iɱ$*ǒ$z;ؓ %ϧv*$a$Mf>U Ib)*-|h!no*Rkr|yq#tiZg/7c0ʽ myO/-Vڨ3UFU٘ҾVdV?aLvSIJ,q.)ybtfIleMrcIU_$- ǒ$ !)=ӚXǒ\kb=VZ+.ʱr, *ʱr, *ʱr,m۶ *: 0;D` n.+inL:W==TMsi;eB23qzѼXI.Ő+ QXmpp: Class Members
QXmpp  Version:0.7.6
Here is a list of all documented class members with links to the class documentation for each member:

- e -

qxmpp-0.7.6/doc/html/classQXmppMessageReceiptManager.html0000644000175000007640000003401112116723632023421 0ustar sharkyjerryweb QXmpp: QXmppMessageReceiptManager Class Reference
QXmppMessageReceiptManager Class Reference

The QXmppMessageReceiptManager class makes it possible to send and receive message delivery receipts as defined in XEP-0184: Message Delivery Receipts. More...

#include <QXmppMessageReceiptManager.h>

Inheritance diagram for QXmppMessageReceiptManager:
QXmppClientExtension QXmppLoggable

Signals

void messageDelivered (const QString &jid, const QString &id)

Public Member Functions

 QXmppMessageReceiptManager ()
- Public Member Functions inherited from QXmppClientExtension
 QXmppClientExtension ()
virtual ~QXmppClientExtension ()
virtual QStringList discoveryFeatures () const
virtual QList
< QXmppDiscoveryIq::Identity > 
discoveryIdentities () const
virtual bool handleStanza (const QDomElement &stanza)=0
 You need to implement this method to process incoming XMPP stanzas.
- Public Member Functions inherited from QXmppLoggable
 QXmppLoggable (QObject *parent=0)

Additional Inherited Members

- Protected Member Functions inherited from QXmppClientExtension
QXmppClientclient ()
virtual void setClient (QXmppClient *client)

Detailed Description

The QXmppMessageReceiptManager class makes it possible to send and receive message delivery receipts as defined in XEP-0184: Message Delivery Receipts.

Constructor & Destructor Documentation

QXmppMessageReceiptManager::QXmppMessageReceiptManager ( )

Constructs a QXmppMessageReceiptManager to handle incoming and outgoing message delivery receipts.

Member Function Documentation

void QXmppMessageReceiptManager::messageDelivered ( const QString &  jid,
const QString &  id 
)
signal

This signal is emitted when receipt for the message with the given id is received. The id could be previously obtained by calling QXmppMessage::id().


The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppExtendedAddress.html0000644000175000007640000003414612116723632022305 0ustar sharkyjerryweb QXmpp: QXmppExtendedAddress Class Reference
QXmppExtendedAddress Class Reference

Represents an extended address as defined by XEP-0033: Extended Stanza Addressing. More...

#include <QXmppStanza.h>

Public Member Functions

 QXmppExtendedAddress ()
 Constructs an empty extended address.
 QXmppExtendedAddress (const QXmppExtendedAddress &)
QXmppExtendedAddressoperator= (const QXmppExtendedAddress &)
QString description () const
 Returns the human-readable description of the address.
void setDescription (const QString &description)
 Sets the human-readable description of the address.
QString jid () const
 Returns the JID of the address.
void setJid (const QString &jid)
 Sets the JID of the address.
QString type () const
 Returns the type of the address.
void setType (const QString &type)
 Sets the type of the address.
bool isDelivered () const
 Returns whether the stanza has been delivered to this address.
void setDelivered (bool)
 Sets whether the stanza has been delivered to this address.
bool isValid () const

Detailed Description

Represents an extended address as defined by XEP-0033: Extended Stanza Addressing.

Extended addresses maybe of different types: some are defined by XEP-0033, others are defined in separate XEPs (for instance XEP-0146: Remote Controlling Clients). That is why the "type" property is a string rather than an enumerated type.

Constructor & Destructor Documentation

QXmppExtendedAddress::QXmppExtendedAddress ( const QXmppExtendedAddress other)

Constructs a copy of other.

Parameters
other

Member Function Documentation

bool QXmppExtendedAddress::isValid ( ) const

Checks whether this address is valid. The extended address is considered to be valid if at least type and JID fields are non-empty.

QXmppExtendedAddress & QXmppExtendedAddress::operator= ( const QXmppExtendedAddress other)

Assigns the other address to this one.

Parameters
other

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppRpcInvokeIq-members.html0000644000175000007640000003342412116723632023057 0ustar sharkyjerryweb QXmpp: Member List
QXmppRpcInvokeIq Member List

This is the complete list of members for QXmppRpcInvokeIq, including all inherited members.

arguments() const QXmppRpcInvokeIq
Error enum valueQXmppIq
error() const QXmppStanza
extendedAddresses() const QXmppStanza
extensions() const QXmppStanza
from() const QXmppStanza
Get enum valueQXmppIq
id() const QXmppStanza
lang() const QXmppStanza
method() const QXmppRpcInvokeIq
operator=(const QXmppIq &other)QXmppIq
QXmppStanza::operator=(const QXmppStanza &other)QXmppStanza
QXmppIq(QXmppIq::Type type=QXmppIq::Get)QXmppIq
QXmppIq(const QXmppIq &other)QXmppIq
QXmppRpcErrorIq (defined in QXmppRpcInvokeIq)QXmppRpcInvokeIqfriend
QXmppRpcInvokeIq() (defined in QXmppRpcInvokeIq)QXmppRpcInvokeIq
QXmppStanza(const QString &from=QString(), const QString &to=QString())QXmppStanza
QXmppStanza(const QXmppStanza &other)QXmppStanza
Result enum valueQXmppIq
Set enum valueQXmppIq
setArguments(const QVariantList &arguments)QXmppRpcInvokeIq
setError(const QXmppStanza::Error &error)QXmppStanza
setExtendedAddresses(const QList< QXmppExtendedAddress > &extendedAddresses)QXmppStanza
setExtensions(const QXmppElementList &elements)QXmppStanza
setFrom(const QString &)QXmppStanza
setId(const QString &)QXmppStanza
setLang(const QString &)QXmppStanza
setMethod(const QString &method)QXmppRpcInvokeIq
setTo(const QString &)QXmppStanza
setType(QXmppIq::Type)QXmppIq
to() const QXmppStanza
Type enum nameQXmppIq
type() const QXmppIq
~QXmppIq() (defined in QXmppIq)QXmppIq
~QXmppStanza()QXmppStanzavirtual
qxmpp-0.7.6/doc/html/classQXmppResultSetQuery.html0000644000175000007640000003300012116723632022203 0ustar sharkyjerryweb QXmpp: QXmppResultSetQuery Class Reference
QXmppResultSetQuery Class Reference

The QXmppResultSetQuery class represents a set element in a query as defined by XEP-0059: Result Set Management. More...

#include <QXmppResultSet.h>

Public Member Functions

int max () const
void setMax (int max)
int index () const
void setIndex (int index)
QString before () const
void setBefore (const QString &before)
QString after () const
void setAfter (const QString &after)
bool isNull () const
 Returns true if no result set information is present.

Detailed Description

The QXmppResultSetQuery class represents a set element in a query as defined by XEP-0059: Result Set Management.

Member Function Documentation

QString QXmppResultSetQuery::after ( ) const

Returns the UID of the last result in the previous page.

This is used for for paging forwards through results.

QString QXmppResultSetQuery::before ( ) const

Returns the UID of the first result in the next page.

This is used for for paging backwards through results.

int QXmppResultSetQuery::index ( ) const

Returns the index for the first element in the page.

This is used for retrieving pages out of order.

int QXmppResultSetQuery::max ( ) const

Returns the maximum number of results.

Note
-1 means no limit, 0 means no results are wanted.
void QXmppResultSetQuery::setAfter ( const QString &  after)

Sets the UID of the last result in the previous page.

This is used for for paging forwards through results.

void QXmppResultSetQuery::setBefore ( const QString &  before)

Sets the UID of the first result in the next page.

This is used for for paging backwards through results.

void QXmppResultSetQuery::setIndex ( int  index)

Sets the index for the first element in the page.

This is used for retrieving pages out of order.

void QXmppResultSetQuery::setMax ( int  max)

Sets the maximum number of results.

Note
-1 means no limit, 0 means no results are wanted.

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/functions_0x63.html0000644000175000007640000003643212116723632020013 0ustar sharkyjerryweb QXmpp: Class Members
QXmpp  Version:0.7.6
Here is a list of all documented class members with links to the class documentation for each member:

- c -

qxmpp-0.7.6/doc/html/QXmppPubSubIq_8h_source.html0000644000175000007640000004414312116723632021660 0ustar sharkyjerryweb QXmpp: QXmppPubSubIq.h Source File
QXmpp  Version:0.7.6
QXmppPubSubIq.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Jeremy Lainé
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXMPPPUBSUBIQ_H
25 #define QXMPPPUBSUBIQ_H
26 
27 #include "QXmppIq.h"
28 
32 
33 class QXMPP_EXPORT QXmppPubSubItem
34 {
35 public:
36  QString id() const;
37  void setId(const QString &id);
38 
39  QXmppElement contents() const;
40  void setContents(const QXmppElement &contents);
41 
43  void parse(const QDomElement &element);
44  void toXml(QXmlStreamWriter *writer) const;
46 
47 private:
48  QString m_id;
49  QXmppElement m_contents;
50 };
51 
56 
57 class QXMPP_EXPORT QXmppPubSubIq : public QXmppIq
58 {
59 public:
61  enum QueryType
62  {
63  AffiliationsQuery,
64  DefaultQuery,
65  ItemsQuery,
66  PublishQuery,
67  RetractQuery,
68  SubscribeQuery,
69  SubscriptionQuery,
70  SubscriptionsQuery,
71  UnsubscribeQuery,
72  };
73 
74  QXmppPubSubIq::QueryType queryType() const;
75  void setQueryType(QXmppPubSubIq::QueryType queryType);
76 
77  QString queryJid() const;
78  void setQueryJid(const QString &jid);
79 
80  QString queryNode() const;
81  void setQueryNode(const QString &node);
82 
83  QList<QXmppPubSubItem> items() const;
84  void setItems(const QList<QXmppPubSubItem> &items);
85 
86  QString subscriptionId() const;
87  void setSubscriptionId(const QString &id);
88 
90  static bool isPubSubIq(const QDomElement &element);
92 
93 protected:
95  void parseElementFromChild(const QDomElement&);
96  void toXmlElementFromChild(QXmlStreamWriter *writer) const;
98 
99 private:
100  QXmppPubSubIq::QueryType m_queryType;
101  QString m_queryJid;
102  QString m_queryNode;
103  QList<QXmppPubSubItem> m_items;
104  QString m_subscriptionId;
105  QString m_subscriptionType;
106 };
107 
108 #endif
qxmpp-0.7.6/doc/html/classQXmppBookmarkUrl.html0000644000175000007640000002277612116723632021475 0ustar sharkyjerryweb QXmpp: QXmppBookmarkUrl Class Reference
QXmppBookmarkUrl Class Reference

The QXmppBookmarkUrl class represents a bookmark for a web page, as defined by XEP-0048: Bookmarks. More...

#include <QXmppBookmarkSet.h>

Public Member Functions

QString name () const
void setName (const QString &name)
QUrl url () const
void setUrl (const QUrl &url)

Detailed Description

The QXmppBookmarkUrl class represents a bookmark for a web page, as defined by XEP-0048: Bookmarks.

Member Function Documentation

QString QXmppBookmarkUrl::name ( ) const

Returns the friendly name for the bookmark.

void QXmppBookmarkUrl::setName ( const QString &  name)

Sets the friendly name for the bookmark.

Parameters
name
void QXmppBookmarkUrl::setUrl ( const QUrl &  url)

Sets the URL for the web page.

Parameters
url
QUrl QXmppBookmarkUrl::url ( ) const

Returns the URL for the web page.


The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppVersionManager.html0000644000175000007640000004424412116723632022157 0ustar sharkyjerryweb QXmpp: QXmppVersionManager Class Reference
QXmppVersionManager Class Reference

The QXmppVersionManager class makes it possible to request for the software version of an entity as defined by XEP-0092: Software Version. More...

#include <QXmppVersionManager.h>

Inheritance diagram for QXmppVersionManager:
QXmppClientExtension QXmppLoggable

Signals

void versionReceived (const QXmppVersionIq &)
 This signal is emitted when a version response is received.

Public Member Functions

QString requestVersion (const QString &jid)
void setClientName (const QString &)
void setClientVersion (const QString &)
void setClientOs (const QString &)
QString clientName () const
QString clientVersion () const
QString clientOs () const
- Public Member Functions inherited from QXmppClientExtension
 QXmppClientExtension ()
virtual ~QXmppClientExtension ()
virtual QStringList discoveryFeatures () const
virtual QList
< QXmppDiscoveryIq::Identity > 
discoveryIdentities () const
virtual bool handleStanza (const QDomElement &stanza)=0
 You need to implement this method to process incoming XMPP stanzas.
- Public Member Functions inherited from QXmppLoggable
 QXmppLoggable (QObject *parent=0)

Additional Inherited Members

- Protected Member Functions inherited from QXmppClientExtension
QXmppClientclient ()
virtual void setClient (QXmppClient *client)

Detailed Description

The QXmppVersionManager class makes it possible to request for the software version of an entity as defined by XEP-0092: Software Version.

Member Function Documentation

QString QXmppVersionManager::clientName ( ) const

Returns the local XMPP client's name.

By default this is set to the QApplication::applicationName(), or "Based on QXmpp" if not specified.

QString QXmppVersionManager::clientOs ( ) const

Returns the local XMPP client's operating system.

By default this is "Linux", "Mac OS", "Symbian" or "Windows" depending on the platform QXmpp was compiled for.

QString QXmppVersionManager::clientVersion ( ) const

Returns the local XMPP client's version.

By default this is set to QApplication::applicationVersion(), or QXmpp's version if not specified.

QString QXmppVersionManager::requestVersion ( const QString &  jid)

Request version information from the specified XMPP entity.

Parameters
jid
void QXmppVersionManager::setClientName ( const QString &  name)

Sets the local XMPP client's name.

Parameters
name
void QXmppVersionManager::setClientOs ( const QString &  os)

Sets the local XMPP client's operating system.

Parameters
os
void QXmppVersionManager::setClientVersion ( const QString &  version)

Sets the local XMPP client's version.

Parameters
version

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppOutgoingClient.png0000644000175000007640000000155512116723632022007 0ustar sharkyjerrywebPNG  IHDR8^PLTEutRNST2IDATxᒳ*CU l[WK;Fa@RJS@ IrDce{I黜<4-$6irbaaO ]K:.d0ӘnLcL2I0p 'L0p 'L0p _3I)) I$9a"IKe{IƔ'=$W&ŋ>2)yEkIQh3E{1ﯝ=y~jeYkgO6}H͒a"INK&LeRJ317)vEeUdyLb &N8a &N8a &N8ɲ,L@8a4&=@cː޻nQ i|_JwCF]{&씱뉅ڳ^D7/ޒؠ&_Ȥ^gɉr:fPGiM^\tXM~fIt_|w1jvgkO v*lzU`틛L6WM vtb'LLeYf?8IENDB`qxmpp-0.7.6/doc/html/classQXmppMucManager.html0000644000175000007640000004271312116723632021255 0ustar sharkyjerryweb QXmpp: QXmppMucManager Class Reference

The QXmppMucManager class makes it possible to interact with multi-user chat rooms as defined by XEP-0045: Multi-User Chat. More...

#include <QXmppMucManager.h>

Inheritance diagram for QXmppMucManager:
QXmppClientExtension QXmppLoggable

Signals

void invitationReceived (const QString &roomJid, const QString &inviter, const QString &reason)
 This signal is emitted when an invitation to a chat room is received.
void roomAdded (QXmppMucRoom *room)
 This signal is emitted when a new room is managed.

Public Member Functions

 QXmppMucManager ()
 Constructs a new QXmppMucManager.
 ~QXmppMucManager ()
 Destroys a QXmppMucManager.
QXmppMucRoomaddRoom (const QString &roomJid)
QList< QXmppMucRoom * > rooms () const
- Public Member Functions inherited from QXmppClientExtension
 QXmppClientExtension ()
virtual ~QXmppClientExtension ()
virtual QStringList discoveryFeatures () const
virtual QList
< QXmppDiscoveryIq::Identity > 
discoveryIdentities () const
virtual bool handleStanza (const QDomElement &stanza)=0
 You need to implement this method to process incoming XMPP stanzas.
- Public Member Functions inherited from QXmppLoggable
 QXmppLoggable (QObject *parent=0)

Properties

QList< QXmppMucRoom * > rooms
 Returns the list of managed rooms.

Additional Inherited Members

- Protected Member Functions inherited from QXmppClientExtension
QXmppClientclient ()
virtual void setClient (QXmppClient *client)

Detailed Description

The QXmppMucManager class makes it possible to interact with multi-user chat rooms as defined by XEP-0045: Multi-User Chat.

To make use of this manager, you need to instantiate it and load it into the QXmppClient instance as follows:

You can then join a room as follows:

QXmppMucRoom *room = manager->addRoom("room@conference.example.com");
room->setNickName("mynick");
room->join();

Member Function Documentation

QXmppMucRoom * QXmppMucManager::addRoom ( const QString &  roomJid)

Adds the given chat room to the set of managed rooms.

Parameters
roomJid

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppEntityTimeManager.html0000644000175000007640000003157712116723632022632 0ustar sharkyjerryweb QXmpp: QXmppEntityTimeManager Class Reference
QXmppEntityTimeManager Class Reference

The QXmppEntityTimeManager class provided the functionality to get the local time of an entity as defined by XEP-0202: Entity Time. More...

#include <QXmppEntityTimeManager.h>

Inheritance diagram for QXmppEntityTimeManager:
QXmppClientExtension QXmppLoggable

Signals

void timeReceived (const QXmppEntityTimeIq &)
 This signal is emitted when a time response is received.

Public Member Functions

QString requestTime (const QString &jid)
- Public Member Functions inherited from QXmppClientExtension
 QXmppClientExtension ()
virtual ~QXmppClientExtension ()
virtual QStringList discoveryFeatures () const
virtual QList
< QXmppDiscoveryIq::Identity > 
discoveryIdentities () const
virtual bool handleStanza (const QDomElement &stanza)=0
 You need to implement this method to process incoming XMPP stanzas.
- Public Member Functions inherited from QXmppLoggable
 QXmppLoggable (QObject *parent=0)

Additional Inherited Members

- Protected Member Functions inherited from QXmppClientExtension
QXmppClientclient ()
virtual void setClient (QXmppClient *client)

Detailed Description

The QXmppEntityTimeManager class provided the functionality to get the local time of an entity as defined by XEP-0202: Entity Time.

Member Function Documentation

QString QXmppEntityTimeManager::requestTime ( const QString &  jid)

Request the time from an XMPP entity.

Parameters
jid

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppRtpVideoChannel.png0000644000175000007640000000121112116723632022067 0ustar sharkyjerrywebPNG  IHDRPҧLPLTEutRNST2IDATx E3#UZ.;_vMNR,2X$i>$y`5XZ6g./x֠'1մ^ˍ1[><$Dy 1pw0֌;U-_X9'P>ote3VmczT+JI:kڒ$oRZƶ%``˲, c̨YnIf[$,(< 0 (< 0 (< 0RQ$`GأC Wc[QkkbTu lkڃuZo)M9dMMԶ} iO_FzΔC8 ̡9Kv:5 ׾I֮v!cx L~ˮl`WglWavߩ 27Foԕ=Vg#0Nߛ_08< 0fK) @; UIENDB`qxmpp-0.7.6/doc/html/tab_s.png0000644000175000007640000000027012116723632016122 0ustar sharkyjerrywebPNG  IHDR$[IDATx݁ @@ѣ?Q"%If6[HQ<]dr s?O=w'F -~rÍ[芭m֬ݯнF)Y% `n,9B!ь\<#IENDB`qxmpp-0.7.6/doc/html/functions_func_0x6e.html0000644000175000007640000002166512116723632021112 0ustar sharkyjerryweb QXmpp: Class Members - Functions
QXmpp  Version:0.7.6
 

- n -

qxmpp-0.7.6/doc/html/classQXmppArchiveListIq.html0000644000175000007640000007361312116723632021750 0ustar sharkyjerryweb QXmpp: QXmppArchiveListIq Class Reference
QXmppArchiveListIq Class Reference

Represents an archive list as defined by XEP-0136: Message Archiving. More...

#include <QXmppArchiveIq.h>

Inheritance diagram for QXmppArchiveListIq:
QXmppIq QXmppStanza

Public Member Functions

 QXmppArchiveListIq ()
 Constructs a QXmppArchiveListIq.
QList< QXmppArchiveChatchats () const
 Returns the list of chat conversations.
void setChats (const QList< QXmppArchiveChat > &chats)
 Sets the list of chat conversations.
QString with () const
void setWith (const QString &with)
QDateTime start () const
void setStart (const QDateTime &start)
QDateTime end () const
void setEnd (const QDateTime &end)
QXmppResultSetQuery resultSetQuery () const
void setResultSetQuery (const QXmppResultSetQuery &rsm)
QXmppResultSetReply resultSetReply () const
void setResultSetReply (const QXmppResultSetReply &rsm)
- Public Member Functions inherited from QXmppIq
 QXmppIq (QXmppIq::Type type=QXmppIq::Get)
 QXmppIq (const QXmppIq &other)
 Constructs a copy of other.
QXmppIqoperator= (const QXmppIq &other)
 Assigns other to this IQ.
QXmppIq::Type type () const
void setType (QXmppIq::Type)
- Public Member Functions inherited from QXmppStanza
 QXmppStanza (const QString &from=QString(), const QString &to=QString())
 QXmppStanza (const QXmppStanza &other)
 Constructs a copy of other.
virtual ~QXmppStanza ()
 Destroys a QXmppStanza.
QXmppStanzaoperator= (const QXmppStanza &other)
 Assigns other to this stanza.
QString to () const
void setTo (const QString &)
QString from () const
 Returns the stanza's sender JID.
void setFrom (const QString &)
QString id () const
 Returns the stanza's identifier.
void setId (const QString &)
QString lang () const
 Returns the stanza's language.
void setLang (const QString &)
QXmppStanza::Error error () const
 Returns the stanza's error.
void setError (const QXmppStanza::Error &error)
QXmppElementList extensions () const
void setExtensions (const QXmppElementList &elements)
QList< QXmppExtendedAddressextendedAddresses () const
void setExtendedAddresses (const QList< QXmppExtendedAddress > &extendedAddresses)

Additional Inherited Members

- Public Types inherited from QXmppIq
enum  Type { Error = 0, Get, Set, Result }
 This enum describes the type of IQ. More...

Detailed Description

Represents an archive list as defined by XEP-0136: Message Archiving.

Member Function Documentation

QDateTime QXmppArchiveListIq::end ( ) const

Returns the end date/time for the archived conversations.

QXmppResultSetQuery QXmppArchiveListIq::resultSetQuery ( ) const

Returns the result set management query.

This is used for paging through conversations.

QXmppResultSetReply QXmppArchiveListIq::resultSetReply ( ) const

Returns the result set management reply.

This is used for paging through conversations.

void QXmppArchiveListIq::setEnd ( const QDateTime &  end)

Sets the end date/time for the archived conversations.

Parameters
end
void QXmppArchiveListIq::setResultSetQuery ( const QXmppResultSetQuery rsm)

Sets the result set management query.

This is used for paging through conversations.

void QXmppArchiveListIq::setResultSetReply ( const QXmppResultSetReply rsm)

Sets the result set management reply.

This is used for paging through conversations.

void QXmppArchiveListIq::setStart ( const QDateTime &  start)

Sets the start date/time for the archived conversations.

Parameters
start
void QXmppArchiveListIq::setWith ( const QString &  with)

Sets the JID which archived conversations must match.

Parameters
with
QDateTime QXmppArchiveListIq::start ( ) const

Returns the start date/time for the archived conversations.

QString QXmppArchiveListIq::with ( ) const

Returns the JID which archived conversations must match.


The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppIncomingClient-members.html0000644000175000007640000003307112116723632023565 0ustar sharkyjerryweb QXmpp: Member List
QXmppIncomingClient Member List

This is the complete list of members for QXmppIncomingClient, including all inherited members.

connected()QXmppStreamsignal
debug(const QString &message)QXmppLoggableinlineprotected
disconnected()QXmppStreamsignal
disconnectFromHost()QXmppStreamvirtualslot
elementReceived(const QDomElement &element)QXmppIncomingClientsignal
handleStanza(const QDomElement &element)=0QXmppStreamprotectedpure virtual
handleStart()QXmppStreamprotectedvirtual
handleStream(const QDomElement &element)=0QXmppStreamprotectedpure virtual
info(const QString &message)QXmppLoggableinlineprotected
isConnected() const QXmppIncomingClientvirtual
jid() const QXmppIncomingClient
logMessage(QXmppLogger::MessageType type, const QString &msg)QXmppLoggablesignal
logReceived(const QString &message)QXmppLoggableinlineprotected
logSent(const QString &message)QXmppLoggableinlineprotected
QXmppIncomingClient(QSslSocket *socket, const QString &domain, QObject *parent=0)QXmppIncomingClient
QXmppIncomingClientPrivate (defined in QXmppIncomingClient)QXmppIncomingClientfriend
QXmppLoggable(QObject *parent=0)QXmppLoggable
QXmppStream(QObject *parent)QXmppStream
sendData(const QByteArray &)QXmppStreamvirtualslot
sendPacket(const QXmppStanza &)QXmppStream
setGauge(const QString &gauge, double value)QXmppLoggablesignal
setInactivityTimeout(int secs)QXmppIncomingClient
setPasswordChecker(QXmppPasswordChecker *checker)QXmppIncomingClient
setSocket(QSslSocket *socket)QXmppStreamprotected
socket() const QXmppStreamprotected
updateCounter(const QString &counter, qint64 amount=1)QXmppLoggablesignal
warning(const QString &message)QXmppLoggableinlineprotected
~QXmppIncomingClient()QXmppIncomingClient
~QXmppStream()QXmppStream
qxmpp-0.7.6/doc/html/functions_0x66.html0000644000175000007640000002723212116723632020014 0ustar sharkyjerryweb QXmpp: Class Members
QXmpp  Version:0.7.6
Here is a list of all documented class members with links to the class documentation for each member:

- f -

qxmpp-0.7.6/doc/html/classQXmppSessionIq-members.html0000644000175000007640000003020512116723632022574 0ustar sharkyjerryweb QXmpp: Member List
QXmppSessionIq Member List

This is the complete list of members for QXmppSessionIq, including all inherited members.

error() const QXmppStanza
Error enum valueQXmppIq
extendedAddresses() const QXmppStanza
extensions() const QXmppStanza
from() const QXmppStanza
Get enum valueQXmppIq
id() const QXmppStanza
lang() const QXmppStanza
operator=(const QXmppIq &other)QXmppIq
QXmppStanza::operator=(const QXmppStanza &other)QXmppStanza
QXmppIq(QXmppIq::Type type=QXmppIq::Get)QXmppIq
QXmppIq(const QXmppIq &other)QXmppIq
QXmppStanza(const QString &from=QString(), const QString &to=QString())QXmppStanza
QXmppStanza(const QXmppStanza &other)QXmppStanza
Result enum valueQXmppIq
Set enum valueQXmppIq
setError(const QXmppStanza::Error &error)QXmppStanza
setExtendedAddresses(const QList< QXmppExtendedAddress > &extendedAddresses)QXmppStanza
setExtensions(const QXmppElementList &elements)QXmppStanza
setFrom(const QString &)QXmppStanza
setId(const QString &)QXmppStanza
setLang(const QString &)QXmppStanza
setTo(const QString &)QXmppStanza
setType(QXmppIq::Type)QXmppIq
to() const QXmppStanza
type() const QXmppIq
Type enum nameQXmppIq
~QXmppIq() (defined in QXmppIq)QXmppIq
~QXmppStanza()QXmppStanzavirtual
qxmpp-0.7.6/doc/html/functions_func_0x68.html0000644000175000007640000002105212116723632021023 0ustar sharkyjerryweb QXmpp: Class Members - Functions
QXmpp  Version:0.7.6
 

- h -

qxmpp-0.7.6/doc/html/classQXmppIq-members.html0000644000175000007640000003016012116723632021230 0ustar sharkyjerryweb QXmpp: Member List
QXmppIq Member List

This is the complete list of members for QXmppIq, including all inherited members.

error() const QXmppStanza
Error enum valueQXmppIq
extendedAddresses() const QXmppStanza
extensions() const QXmppStanza
from() const QXmppStanza
Get enum valueQXmppIq
id() const QXmppStanza
lang() const QXmppStanza
operator=(const QXmppIq &other)QXmppIq
QXmppStanza::operator=(const QXmppStanza &other)QXmppStanza
QXmppIq(QXmppIq::Type type=QXmppIq::Get)QXmppIq
QXmppIq(const QXmppIq &other)QXmppIq
QXmppStanza(const QString &from=QString(), const QString &to=QString())QXmppStanza
QXmppStanza(const QXmppStanza &other)QXmppStanza
Result enum valueQXmppIq
Set enum valueQXmppIq
setError(const QXmppStanza::Error &error)QXmppStanza
setExtendedAddresses(const QList< QXmppExtendedAddress > &extendedAddresses)QXmppStanza
setExtensions(const QXmppElementList &elements)QXmppStanza
setFrom(const QString &)QXmppStanza
setId(const QString &)QXmppStanza
setLang(const QString &)QXmppStanza
setTo(const QString &)QXmppStanza
setType(QXmppIq::Type)QXmppIq
to() const QXmppStanza
type() const QXmppIq
Type enum nameQXmppIq
~QXmppIq() (defined in QXmppIq)QXmppIq
~QXmppStanza()QXmppStanzavirtual
qxmpp-0.7.6/doc/html/QXmppVCardManager_8h_source.html0000644000175000007640000003412612116723632022460 0ustar sharkyjerryweb QXmpp: QXmppVCardManager.h Source File
QXmpp  Version:0.7.6
QXmppVCardManager.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Manjeet Dahiya
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 
25 #ifndef QXMPPVCARDMANAGER_H
26 #define QXMPPVCARDMANAGER_H
27 
28 #include "QXmppClientExtension.h"
29 
30 class QXmppVCardIq;
31 class QXmppVCardManagerPrivate;
32 
55 
56 class QXMPP_EXPORT QXmppVCardManager : public QXmppClientExtension
57 {
58  Q_OBJECT
59 
60 public:
63 
64  QString requestVCard(const QString& bareJid = "");
65 
66  const QXmppVCardIq& clientVCard() const;
67  void setClientVCard(const QXmppVCardIq&);
68 
69  QString requestClientVCard();
70  bool isClientVCardReceived() const;
71 
73  QStringList discoveryFeatures() const;
74  bool handleStanza(const QDomElement &element);
76 
77 signals:
80  void vCardReceived(const QXmppVCardIq&);
81 
84  void clientVCardReceived();
85 
86 private:
87  QXmppVCardManagerPrivate *d;
88 };
89 
90 #endif // QXMPPVCARDMANAGER_H
qxmpp-0.7.6/doc/html/QXmppUtils_8h_source.html0000644000175000007640000003662312116723632021272 0ustar sharkyjerryweb QXmpp: QXmppUtils.h Source File
QXmpp  Version:0.7.6
QXmppUtils.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Authors:
5  * Manjeet Dahiya
6  * Jeremy Lainé
7  *
8  * Source:
9  * http://code.google.com/p/qxmpp
10  *
11  * This file is a part of QXmpp library.
12  *
13  * This library is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU Lesser General Public
15  * License as published by the Free Software Foundation; either
16  * version 2.1 of the License, or (at your option) any later version.
17  *
18  * This library is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21  * Lesser General Public License for more details.
22  *
23  */
24 
25 
26 #ifndef QXMPPUTILS_H
27 #define QXMPPUTILS_H
28 
29 // forward declarations of QXmlStream* classes will not work on Mac, we need to
30 // include the whole header.
31 // See http://lists.trolltech.com/qt-interest/2008-07/thread00798-0.html
32 // for an explanation.
33 #include <QXmlStreamWriter>
34 
35 #include "QXmppGlobal.h"
36 
37 class QByteArray;
38 class QDateTime;
39 class QDomElement;
40 class QString;
41 class QStringList;
42 
45 class QXMPP_EXPORT QXmppUtils
46 {
47 public:
48  // XEP-0082: XMPP Date and Time Profiles
49  static QDateTime datetimeFromString(const QString &str);
50  static QString datetimeToString(const QDateTime &dt);
51  static int timezoneOffsetFromString(const QString &str);
52  static QString timezoneOffsetToString(int secs);
53 
54  static QString jidToDomain(const QString& jid);
55  static QString jidToResource(const QString& jid);
56  static QString jidToUser(const QString& jid);
57  static QString jidToBareJid(const QString& jid);
58 
59  static quint32 generateCrc32(const QByteArray &input);
60  static QByteArray generateHmacMd5(const QByteArray &key, const QByteArray &text);
61  static QByteArray generateHmacSha1(const QByteArray &key, const QByteArray &text);
62  static int generateRandomInteger(int N);
63  static QByteArray generateRandomBytes(int length);
64  static QString generateStanzaHash(int length=32);
65 };
66 
67 void helperToXmlAddAttribute(QXmlStreamWriter* stream, const QString& name,
68  const QString& value);
69 void helperToXmlAddTextElement(QXmlStreamWriter* stream, const QString& name,
70  const QString& value);
71 
72 #endif // QXMPPUTILS_H
qxmpp-0.7.6/doc/html/functions_0x6f.html0000644000175000007640000002325212116723632020072 0ustar sharkyjerryweb QXmpp: Class Members
QXmpp  Version:0.7.6
Here is a list of all documented class members with links to the class documentation for each member:

- o -

qxmpp-0.7.6/doc/html/classQXmppJinglePayloadType.html0000644000175000007640000004621212116723632022620 0ustar sharkyjerryweb QXmpp: QXmppJinglePayloadType Class Reference
QXmppJinglePayloadType Class Reference

The QXmppJinglePayloadType class represents a payload type as specified by XEP-0167: Jingle RTP Sessions and RFC 5245. More...

#include <QXmppJingleIq.h>

Public Member Functions

unsigned char channels () const
void setChannels (unsigned char channels)
unsigned int clockrate () const
void setClockrate (unsigned int clockrate)
unsigned char id () const
void setId (unsigned char id)
unsigned int maxptime () const
void setMaxptime (unsigned int maxptime)
QString name () const
void setName (const QString &name)
QMap< QString, QString > parameters () const
 Returns the payload parameters.
void setParameters (const QMap< QString, QString > &parameters)
 Sets the payload parameters.
unsigned int ptime () const
void setPtime (unsigned int ptime)
bool operator== (const QXmppJinglePayloadType &other) const

Detailed Description

The QXmppJinglePayloadType class represents a payload type as specified by XEP-0167: Jingle RTP Sessions and RFC 5245.

Member Function Documentation

unsigned char QXmppJinglePayloadType::channels ( ) const

Returns the number of channels (e.g. 1 for mono, 2 for stereo).

unsigned int QXmppJinglePayloadType::clockrate ( ) const

Returns the clockrate in Hz, i.e. the number of samples per second.

unsigned char QXmppJinglePayloadType::id ( ) const

Returns the payload type identifier.

unsigned int QXmppJinglePayloadType::maxptime ( ) const

Returns the maximum packet time in milliseconds.

QString QXmppJinglePayloadType::name ( ) const

Returns the payload type name.

bool QXmppJinglePayloadType::operator== ( const QXmppJinglePayloadType other) const

Returns true if this QXmppJinglePayloadType and other refer to the same payload type.

Parameters
other
unsigned int QXmppJinglePayloadType::ptime ( ) const

Returns the packet time in milliseconds (20 by default).

void QXmppJinglePayloadType::setChannels ( unsigned char  channels)

Sets the number of channels (e.g. 1 for mono, 2 for stereo).

Parameters
channels
void QXmppJinglePayloadType::setClockrate ( unsigned int  clockrate)

Sets the clockrate in Hz, i.e. the number of samples per second.

Parameters
clockrate
void QXmppJinglePayloadType::setId ( unsigned char  id)

Sets the payload type identifier.

void QXmppJinglePayloadType::setMaxptime ( unsigned int  maxptime)

Sets the maximum packet type in milliseconds.

Parameters
maxptime
void QXmppJinglePayloadType::setName ( const QString &  name)

Sets the payload type name.

Parameters
name
void QXmppJinglePayloadType::setPtime ( unsigned int  ptime)

Sets the packet time in milliseconds (20 by default).

Parameters
ptime

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/QXmppInvokable_8h_source.html0000644000175000007640000003152012116723632022073 0ustar sharkyjerryweb QXmpp: QXmppInvokable.h Source File
QXmpp  Version:0.7.6
QXmppInvokable.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Authors:
5  * Ian Reinhart Geiser
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXMPPINVOKABLE_H
25 #define QXMPPINVOKABLE_H
26 
27 #include <QObject>
28 #include <QHash>
29 #include <QVariant>
30 #include <QWriteLocker>
31 #include <QStringList>
32 
33 #include "QXmppGlobal.h"
34 
40 class QXMPP_EXPORT QXmppInvokable : public QObject
41 {
42  Q_OBJECT
43 public:
44  QXmppInvokable( QObject *parent = 0 );
45 
46  ~QXmppInvokable();
47 
53  QVariant dispatch( const QByteArray &method, const QList<QVariant> &args = QList<QVariant>() );
54 
59  static QList<QByteArray> paramTypes( const QList<QVariant> &params );
60 
64  virtual bool isAuthorized( const QString &jid ) const = 0;
65 
66 public slots:
70  QStringList interfaces() const;
71 
72 private:
73  void buildMethodHash();
74  QHash<QByteArray,int> m_methodHash;
75  QReadWriteLock m_lock;
76 };
77 
78 
79 #endif
qxmpp-0.7.6/doc/html/classQXmppVCardEmail.html0000644000175000007640000002425012116723632021201 0ustar sharkyjerryweb QXmpp: QXmppVCardEmail Class Reference
QXmppVCardEmail Class Reference

Represents a vCard e-mail address. More...

#include <QXmppVCardIq.h>

Public Types

enum  TypeFlag {
  None = 0x0, Home = 0x1, Work = 0x2, Internet = 0x4,
  Preferred = 0x8, X400 = 0x10
}
 Describes e-mail address types.

Public Member Functions

 QXmppVCardEmail ()
 Constructs an empty e-mail address.
 QXmppVCardEmail (const QXmppVCardEmail &other)
 Constructs a copy of other.
QXmppVCardEmailoperator= (const QXmppVCardEmail &other)
 Assigns other to this e-mail address.
QString address () const
 Returns the e-mail address.
void setAddress (const QString &address)
 Sets the e-mail address.
Type type () const
 Returns the e-mail type, which is a combination of TypeFlag.
void setType (Type type)
 Sets the e-mail type, which is a combination of TypeFlag.

Detailed Description

Represents a vCard e-mail address.


The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/functions_0x68.html0000644000175000007640000002130212116723632020006 0ustar sharkyjerryweb QXmpp: Class Members
QXmpp  Version:0.7.6
Here is a list of all documented class members with links to the class documentation for each member:

- h -

qxmpp-0.7.6/doc/html/functions_enum.html0000644000175000007640000002504312116723632020253 0ustar sharkyjerryweb QXmpp: Class Members - Enumerations
QXmpp  Version:0.7.6
 

- a -

- c -

- d -

- e -

- l -

- m -

- n -

- p -

- q -

- r -

- s -

- t -

- v -

qxmpp-0.7.6/doc/html/functions_func_0x62.html0000644000175000007640000002117112116723632021017 0ustar sharkyjerryweb QXmpp: Class Members - Functions
QXmpp  Version:0.7.6
 

- b -

qxmpp-0.7.6/doc/html/classQXmppRosterManager-members.html0000644000175000007640000004105012116723632023430 0ustar sharkyjerryweb QXmpp: Member List
QXmppRosterManager Member List

This is the complete list of members for QXmppRosterManager, including all inherited members.

acceptSubscription(const QString &bareJid, const QString &reason=QString())QXmppRosterManagerslot
addItem(const QString &bareJid, const QString &name=QString(), const QSet< QString > &groups=QSet< QString >())QXmppRosterManagerslot
client()QXmppClientExtensionprotected
debug(const QString &message)QXmppLoggableinlineprotected
discoveryFeatures() const QXmppClientExtensionvirtual
discoveryIdentities() const QXmppClientExtensionvirtual
getAllPresencesForBareJid(const QString &bareJid) const QXmppRosterManager
getPresence(const QString &bareJid, const QString &resource) const QXmppRosterManager
getResources(const QString &bareJid) const QXmppRosterManager
getRosterBareJids() const QXmppRosterManager
getRosterEntry(const QString &bareJid) const QXmppRosterManager
handleStanza(const QDomElement &stanza)=0QXmppClientExtensionpure virtual
info(const QString &message)QXmppLoggableinlineprotected
isRosterReceived() const QXmppRosterManager
itemAdded(const QString &bareJid)QXmppRosterManagersignal
itemChanged(const QString &bareJid)QXmppRosterManagersignal
itemRemoved(const QString &bareJid)QXmppRosterManagersignal
logMessage(QXmppLogger::MessageType type, const QString &msg)QXmppLoggablesignal
logReceived(const QString &message)QXmppLoggableinlineprotected
logSent(const QString &message)QXmppLoggableinlineprotected
presenceChanged(const QString &bareJid, const QString &resource)QXmppRosterManagersignal
QXmppClientExtension()QXmppClientExtension
QXmppLoggable(QObject *parent=0)QXmppLoggable
QXmppRosterManager(QXmppClient *stream)QXmppRosterManager
refuseSubscription(const QString &bareJid, const QString &reason=QString())QXmppRosterManagerslot
removeItem(const QString &bareJid)QXmppRosterManagerslot
renameItem(const QString &bareJid, const QString &name)QXmppRosterManagerslot
rosterReceived()QXmppRosterManagersignal
setClient(QXmppClient *client)QXmppClientExtensionprotectedvirtual
setGauge(const QString &gauge, double value)QXmppLoggablesignal
subscribe(const QString &bareJid, const QString &reason=QString())QXmppRosterManagerslot
subscriptionReceived(const QString &bareJid)QXmppRosterManagersignal
unsubscribe(const QString &bareJid, const QString &reason=QString())QXmppRosterManagerslot
updateCounter(const QString &counter, qint64 amount=1)QXmppLoggablesignal
warning(const QString &message)QXmppLoggableinlineprotected
~QXmppClientExtension()QXmppClientExtensionvirtual
~QXmppRosterManager() (defined in QXmppRosterManager)QXmppRosterManager
qxmpp-0.7.6/doc/html/functions_func_0x7e.html0000644000175000007640000002402512116723632021104 0ustar sharkyjerryweb QXmpp: Class Members - Functions
QXmpp  Version:0.7.6
 

- ~ -

qxmpp-0.7.6/doc/html/functions_func_0x78.html0000644000175000007640000001675712116723632021044 0ustar sharkyjerryweb QXmpp: Class Members - Functions
QXmpp  Version:0.7.6
 

- x -

qxmpp-0.7.6/doc/html/functions_0x73.html0000644000175000007640000014117112116723632020011 0ustar sharkyjerryweb QXmpp: Class Members
QXmpp  Version:0.7.6
Here is a list of all documented class members with links to the class documentation for each member:

- s -

qxmpp-0.7.6/doc/html/QXmppConstants_8h_source.html0000644000175000007640000006170512116723632022145 0ustar sharkyjerryweb QXmpp: QXmppConstants.h Source File
QXmpp  Version:0.7.6
QXmppConstants.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Manjeet Dahiya
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 
25 #ifndef QXMPPCONSTANTS_H
26 #define QXMPPCONSTANTS_H
27 
28 extern const char* ns_stream;
29 extern const char* ns_client;
30 extern const char* ns_server;
31 extern const char* ns_roster;
32 extern const char* ns_tls;
33 extern const char* ns_sasl;
34 extern const char* ns_bind;
35 extern const char* ns_session;
36 extern const char* ns_stanza;
37 // XEP-0009: Jabber-RPC
38 extern const char* ns_rpc;
39 // XEP-0020: Feature Negotiation
40 extern const char* ns_feature_negotiation;
41 // XEP-0030: Service Discovery
42 extern const char* ns_disco_info;
43 extern const char* ns_disco_items;
44 // XEP-0033: Extended Stanza Addressing
45 extern const char* ns_extended_addressing;
46 // XEP-0045: Multi-User Chat
47 extern const char* ns_muc;
48 extern const char* ns_muc_admin;
49 extern const char* ns_muc_owner;
50 extern const char* ns_muc_user;
51 // XEP-0047: In-Band Bytestreams
52 extern const char* ns_ibb;
53 // XEP-0049: Private XML Storage
54 extern const char* ns_private;
55 // XEP-0054: vcard-temp
56 extern const char* ns_vcard;
57 // XEP-0059: Result Set Management
58 extern const char* ns_rsm;
59 // XEP-0065: SOCKS5 Bytestreams
60 extern const char* ns_bytestreams;
61 // XEP-0071: XHTML-IM
62 extern const char *ns_xhtml_im;
63 // XEP-0077: In-Band Registration
64 extern const char* ns_register;
65 // XEP-0078: Non-SASL Authentication
66 extern const char* ns_auth;
67 extern const char* ns_authFeature;
68 // XEP-0085: Chat State Notifications
69 extern const char* ns_chat_states;
70 // XEP-0091: Legacy Delayed Delivery
71 extern const char* ns_legacy_delayed_delivery;
72 // XEP-0092: Software Version
73 extern const char* ns_version;
74 extern const char* ns_data;
75 // XEP-0095: Stream Initiation
76 extern const char* ns_stream_initiation;
77 extern const char* ns_stream_initiation_file_transfer;
78 // XEP-0108: User Activity
79 extern const char* ns_activity;
80 // XEP-0115: Entity Capabilities
81 extern const char* ns_capabilities;
82 // XEP-0136: Message Archiving
83 extern const char* ns_archive;
84 // XEP-0138: Stream Compression
85 extern const char* ns_compress;
86 extern const char* ns_compressFeature;
87 // XEP-0145: Annotations
88 extern const char* ns_rosternotes;
89 // XEP-0153: vCard-Based Avatars
90 extern const char* ns_vcard_update;
91 // XEP-0158: CAPTCHA Forms
92 extern const char* ns_captcha;
93 // XEP-0166: Jingle
94 extern const char* ns_jingle;
95 extern const char* ns_jingle_ice_udp;
96 extern const char* ns_jingle_raw_udp;
97 extern const char* ns_jingle_rtp;
98 extern const char* ns_jingle_rtp_audio;
99 extern const char* ns_jingle_rtp_video;
100 // XEP-0184: Message Receipts
101 extern const char* ns_message_receipts;
102 // XEP-0199: XMPP Ping
103 extern const char* ns_ping;
104 // XEP-0202: Entity Time
105 extern const char* ns_entity_time;
106 // XEP-0203: Delayed Delivery
107 extern const char* ns_delayed_delivery;
108 // XEP-0220: Server Dialback
109 extern const char* ns_server_dialback;
110 // XEP-0221: Data Forms Media Element
111 extern const char* ns_media_element;
112 // XEP-0224: Attention
113 extern const char* ns_attention;
114 // XEP-0231: Bits of Binary
115 extern const char* ns_bob;
116 // XEP-0249: Direct MUC Invitations
117 extern const char* ns_conference;
118 
119 #endif // QXMPPCONSTANTS_H
qxmpp-0.7.6/doc/html/classQXmppServerPlugin.html0000644000175000007640000002422312116723632021657 0ustar sharkyjerryweb QXmpp: QXmppServerPlugin Class Reference
QXmppServerPlugin Class Reference

The QXmppServerPlugin class is the base class for QXmppServer plugins. More...

#include <QXmppServerPlugin.h>

Inherits QXmppServerPluginInterface.

Public Member Functions

virtual QXmppServerExtensioncreate (const QString &key)=0
virtual QStringList keys () const =0
- Public Member Functions inherited from QXmppServerPluginInterface
virtual QXmppServerExtensioncreate (const QString &key)=0
 Creates the server extension identified by key.
virtual QStringList keys () const =0
 Returns a list of valid extension keys.

Detailed Description

The QXmppServerPlugin class is the base class for QXmppServer plugins.

Member Function Documentation

virtual QXmppServerExtension* QXmppServerPlugin::create ( const QString &  key)
pure virtual

Creates and returns the specified QXmppServerExtension.

Parameters
keyThe key for the QXmppServerExtension.
virtual QStringList QXmppServerPlugin::keys ( ) const
pure virtual

Returns the list of keys supported by this plugin.


The documentation for this class was generated from the following file:
qxmpp-0.7.6/doc/html/classQXmppJingleIq.html0000644000175000007640000007504112116723632020740 0ustar sharkyjerryweb QXmpp: QXmppJingleIq Class Reference

The QXmppJingleIq class represents an IQ used for initiating media sessions as specified by XEP-0166: Jingle. More...

#include <QXmppJingleIq.h>

Inheritance diagram for QXmppJingleIq:
QXmppIq QXmppStanza

Public Types

enum  Action {
  ContentAccept, ContentAdd, ContentModify, ContentReject,
  ContentRemove, DescriptionInfo, SecurityInfo, SessionAccept,
  SessionInfo, SessionInitiate, SessionTerminate, TransportAccept,
  TransportInfo, TransportReject, TransportReplace
}
 This enum is used to describe a Jingle action.
- Public Types inherited from QXmppIq
enum  Type { Error = 0, Get, Set, Result }
 This enum describes the type of IQ. More...

Public Member Functions

 QXmppJingleIq ()
 Constructs a QXmppJingleIq.
Action action () const
 Returns the Jingle IQ's action.
void setAction (Action action)
QString initiator () const
 Returns the session initiator.
void setInitiator (const QString &initiator)
QString responder () const
 Returns the session responder.
void setResponder (const QString &responder)
QString sid () const
 Returns the session ID.
void setSid (const QString &sid)
Content & content ()
 Returns a reference to the IQ's content element.
const Content & content () const
 Returns a const reference to the IQ's content element.
Reason & reason ()
 Returns a reference to the IQ's reason element.
const Reason & reason () const
 Returns a const reference to the IQ's reason element.
bool ringing () const
 Returns true if the call is ringing.
void setRinging (bool ringing)
- Public Member Functions inherited from QXmppIq
 QXmppIq (QXmppIq::Type type=QXmppIq::Get)
 QXmppIq (const QXmppIq &other)
 Constructs a copy of other.
QXmppIqoperator= (const QXmppIq &other)
 Assigns other to this IQ.
QXmppIq::Type type () const
void setType (QXmppIq::Type)
- Public Member Functions inherited from QXmppStanza
 QXmppStanza (const QString &from=QString(), const QString &to=QString())
 QXmppStanza (const QXmppStanza &other)
 Constructs a copy of other.
virtual ~QXmppStanza ()
 Destroys a QXmppStanza.
QXmppStanzaoperator= (const QXmppStanza &other)
 Assigns other to this stanza.
QString to () const
void setTo (const QString &)
QString from () const
 Returns the stanza's sender JID.
void setFrom (const QString &)
QString id () const
 Returns the stanza's identifier.
void setId (const QString &)
QString lang () const
 Returns the stanza's language.
void setLang (const QString &)
QXmppStanza::Error error () const
 Returns the stanza's error.
void setError (const QXmppStanza::Error &error)
QXmppElementList extensions () const
void setExtensions (const QXmppElementList &elements)
QList< QXmppExtendedAddressextendedAddresses () const
void setExtendedAddresses (const QList< QXmppExtendedAddress > &extendedAddresses)

Detailed Description

The QXmppJingleIq class represents an IQ used for initiating media sessions as specified by XEP-0166: Jingle.

Member Function Documentation

void QXmppJingleIq::setAction ( QXmppJingleIq::Action  action)

Sets the Jingle IQ's action.

Parameters
action
void QXmppJingleIq::setInitiator ( const QString &  initiator)

Sets the session initiator.

Parameters
initiator
void QXmppJingleIq::setResponder ( const QString &  responder)

Sets the session responder.

Parameters
responder
void QXmppJingleIq::setRinging ( bool  ringing)

Set to true if the call is ringing.

Parameters
ringing
void QXmppJingleIq::setSid ( const QString &  sid)

Sets the session ID.

Parameters
sid

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/functions_func_0x65.html0000644000175000007640000002334412116723632021026 0ustar sharkyjerryweb QXmpp: Class Members - Functions
QXmpp  Version:0.7.6
qxmpp-0.7.6/doc/html/classQXmppIq.html0000644000175000007640000006137312116723632017612 0ustar sharkyjerryweb QXmpp: QXmppIq Class Reference

The QXmppIq class is the base class for all IQs. More...

#include <QXmppIq.h>

Inheritance diagram for QXmppIq:
QXmppStanza QXmppArchiveChatIq QXmppArchiveListIq QXmppArchivePrefIq QXmppArchiveRemoveIq QXmppArchiveRetrieveIq QXmppBindIq QXmppJingleIq QXmppMucAdminIq QXmppMucOwnerIq QXmppPubSubIq QXmppRegisterIq QXmppRosterIq QXmppRpcInvokeIq QXmppRpcResponseIq QXmppSessionIq QXmppVCardIq QXmppVersionIq

Public Types

enum  Type { Error = 0, Get, Set, Result }
 This enum describes the type of IQ. More...

Public Member Functions

 QXmppIq (QXmppIq::Type type=QXmppIq::Get)
 QXmppIq (const QXmppIq &other)
 Constructs a copy of other.
QXmppIqoperator= (const QXmppIq &other)
 Assigns other to this IQ.
QXmppIq::Type type () const
void setType (QXmppIq::Type)
- Public Member Functions inherited from QXmppStanza
 QXmppStanza (const QString &from=QString(), const QString &to=QString())
 QXmppStanza (const QXmppStanza &other)
 Constructs a copy of other.
virtual ~QXmppStanza ()
 Destroys a QXmppStanza.
QXmppStanzaoperator= (const QXmppStanza &other)
 Assigns other to this stanza.
QString to () const
void setTo (const QString &)
QString from () const
 Returns the stanza's sender JID.
void setFrom (const QString &)
QString id () const
 Returns the stanza's identifier.
void setId (const QString &)
QString lang () const
 Returns the stanza's language.
void setLang (const QString &)
QXmppStanza::Error error () const
 Returns the stanza's error.
void setError (const QXmppStanza::Error &error)
QXmppElementList extensions () const
void setExtensions (const QXmppElementList &elements)
QList< QXmppExtendedAddressextendedAddresses () const
void setExtendedAddresses (const QList< QXmppExtendedAddress > &extendedAddresses)

Detailed Description

The QXmppIq class is the base class for all IQs.

Member Enumeration Documentation

This enum describes the type of IQ.

Enumerator:
Error 

Error response.

Get 

Get request.

Set 

Set request.

Result 

Result.

Constructor & Destructor Documentation

QXmppIq::QXmppIq ( QXmppIq::Type  type = QXmppIq::Get)

Constructs a QXmppIq with the specified type.

Parameters
type

Member Function Documentation

void QXmppIq::setType ( QXmppIq::Type  type)

Sets the IQ's type.

Parameters
type
QXmppIq::Type QXmppIq::type ( ) const

Returns the IQ's type.


The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppExtendedAddress-members.html0000644000175000007640000002075112116723632023732 0ustar sharkyjerryweb QXmpp: Member List
QXmppExtendedAddress Member List

This is the complete list of members for QXmppExtendedAddress, including all inherited members.

description() const QXmppExtendedAddress
isDelivered() const QXmppExtendedAddress
isValid() const QXmppExtendedAddress
jid() const QXmppExtendedAddress
operator=(const QXmppExtendedAddress &)QXmppExtendedAddress
QXmppExtendedAddress()QXmppExtendedAddress
QXmppExtendedAddress(const QXmppExtendedAddress &)QXmppExtendedAddress
setDelivered(bool)QXmppExtendedAddress
setDescription(const QString &description)QXmppExtendedAddress
setJid(const QString &jid)QXmppExtendedAddress
setType(const QString &type)QXmppExtendedAddress
type() const QXmppExtendedAddress
~QXmppExtendedAddress() (defined in QXmppExtendedAddress)QXmppExtendedAddress
qxmpp-0.7.6/doc/html/functions_func_0x69.html0000644000175000007640000003276412116723632021040 0ustar sharkyjerryweb QXmpp: Class Members - Functions
QXmpp  Version:0.7.6
 

- i -

qxmpp-0.7.6/doc/html/classQXmppPubSubIq-members.html0000644000175000007640000004256112116723632022361 0ustar sharkyjerryweb QXmpp: Member List
QXmppPubSubIq Member List

This is the complete list of members for QXmppPubSubIq, including all inherited members.

AffiliationsQuery enum value (defined in QXmppPubSubIq)QXmppPubSubIq
DefaultQuery enum value (defined in QXmppPubSubIq)QXmppPubSubIq
error() const QXmppStanza
Error enum valueQXmppIq
extendedAddresses() const QXmppStanza
extensions() const QXmppStanza
from() const QXmppStanza
Get enum valueQXmppIq
id() const QXmppStanza
items() const QXmppPubSubIq
ItemsQuery enum value (defined in QXmppPubSubIq)QXmppPubSubIq
lang() const QXmppStanza
operator=(const QXmppIq &other)QXmppIq
QXmppStanza::operator=(const QXmppStanza &other)QXmppStanza
PublishQuery enum value (defined in QXmppPubSubIq)QXmppPubSubIq
queryJid() const QXmppPubSubIq
queryNode() const QXmppPubSubIq
QueryType enum nameQXmppPubSubIq
queryType() const QXmppPubSubIq
QXmppIq(QXmppIq::Type type=QXmppIq::Get)QXmppIq
QXmppIq(const QXmppIq &other)QXmppIq
QXmppStanza(const QString &from=QString(), const QString &to=QString())QXmppStanza
QXmppStanza(const QXmppStanza &other)QXmppStanza
Result enum valueQXmppIq
RetractQuery enum value (defined in QXmppPubSubIq)QXmppPubSubIq
Set enum valueQXmppIq
setError(const QXmppStanza::Error &error)QXmppStanza
setExtendedAddresses(const QList< QXmppExtendedAddress > &extendedAddresses)QXmppStanza
setExtensions(const QXmppElementList &elements)QXmppStanza
setFrom(const QString &)QXmppStanza
setId(const QString &)QXmppStanza
setItems(const QList< QXmppPubSubItem > &items)QXmppPubSubIq
setLang(const QString &)QXmppStanza
setQueryJid(const QString &jid)QXmppPubSubIq
setQueryNode(const QString &node)QXmppPubSubIq
setQueryType(QXmppPubSubIq::QueryType queryType)QXmppPubSubIq
setSubscriptionId(const QString &id)QXmppPubSubIq
setTo(const QString &)QXmppStanza
setType(QXmppIq::Type)QXmppIq
SubscribeQuery enum value (defined in QXmppPubSubIq)QXmppPubSubIq
subscriptionId() const QXmppPubSubIq
SubscriptionQuery enum value (defined in QXmppPubSubIq)QXmppPubSubIq
SubscriptionsQuery enum value (defined in QXmppPubSubIq)QXmppPubSubIq
to() const QXmppStanza
Type enum nameQXmppIq
type() const QXmppIq
UnsubscribeQuery enum value (defined in QXmppPubSubIq)QXmppPubSubIq
~QXmppIq() (defined in QXmppIq)QXmppIq
~QXmppStanza()QXmppStanzavirtual
qxmpp-0.7.6/doc/html/classQXmppArchiveRetrieveIq.png0000644000175000007640000000155012116723632022431 0ustar sharkyjerrywebPNG  IHDRiPLTEutRNST2IDATx뒫 #@@d\w:;)䢴#ccB)q7Inds^ujIҘ[SU24U(Mh jLENشo_J|N˧Uە(SjGG-Nj9M㶋~8qŭ>g6koZne6p~;yڽnOgNa3}]96'6y OtZ6)GVo~wnvB(@dIENDB`qxmpp-0.7.6/doc/html/classQXmppUtils-members.html0000644000175000007640000002171012116723632021760 0ustar sharkyjerryweb QXmpp: Member List
QXmppUtils Member List

This is the complete list of members for QXmppUtils, including all inherited members.

datetimeFromString(const QString &str)QXmppUtilsstatic
datetimeToString(const QDateTime &dt)QXmppUtilsstatic
generateCrc32(const QByteArray &input)QXmppUtilsstatic
generateHmacMd5(const QByteArray &key, const QByteArray &text)QXmppUtilsstatic
generateHmacSha1(const QByteArray &key, const QByteArray &text)QXmppUtilsstatic
generateRandomBytes(int length)QXmppUtilsstatic
generateRandomInteger(int N)QXmppUtilsstatic
generateStanzaHash(int length=32)QXmppUtilsstatic
jidToBareJid(const QString &jid)QXmppUtilsstatic
jidToDomain(const QString &jid)QXmppUtilsstatic
jidToResource(const QString &jid)QXmppUtilsstatic
jidToUser(const QString &jid)QXmppUtilsstatic
timezoneOffsetFromString(const QString &str)QXmppUtilsstatic
timezoneOffsetToString(int secs)QXmppUtilsstatic
qxmpp-0.7.6/doc/html/QXmppRegisterIq_8h_source.html0000644000175000007640000003411312116723632022240 0ustar sharkyjerryweb QXmpp: QXmppRegisterIq.h Source File
QXmpp  Version:0.7.6
QXmppRegisterIq.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Jeremy Lainé
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 
25 #ifndef QXMPPREGISTERIQ_H
26 #define QXMPPREGISTERIQ_H
27 
28 #include "QXmppDataForm.h"
29 #include "QXmppIq.h"
30 
37 
38 class QXMPP_EXPORT QXmppRegisterIq : public QXmppIq
39 {
40 public:
41  QString email() const;
42  void setEmail(const QString &email);
43 
44  QXmppDataForm form() const;
45  void setForm(const QXmppDataForm &form);
46 
47  QString instructions() const;
48  void setInstructions(const QString &instructions);
49 
50  QString password() const;
51  void setPassword(const QString &username);
52 
53  QString username() const;
54  void setUsername(const QString &username);
55 
57  static bool isRegisterIq(const QDomElement &element);
59 
60 protected:
62  void parseElementFromChild(const QDomElement &element);
63  void toXmlElementFromChild(QXmlStreamWriter *writer) const;
65 
66 private:
67  QXmppDataForm m_form;
68  QString m_email;
69  QString m_instructions;
70  QString m_password;
71  QString m_username;
72 };
73 
74 #endif
qxmpp-0.7.6/doc/html/ftv2mo.png0000644000175000007640000000062312116723632016251 0ustar sharkyjerrywebPNG  IHDR}\ZIDATx1K@iBҡ(h"EI'oک 8R- BTP]zB3 _㒻}]V}dIiJb+|K…,[P\ʘMƢ#F`JݤkA?Y4ck6"Z)0SHM@㋺Wmo4HJ+Qobt *~8_+3Y- PwA+^}+xhϕMAE]TD~EÞߴ^R)`A9pq-۾ۍ3tƛTH) ICxd#1 m@V?Zgo_3-\IENDB`qxmpp-0.7.6/doc/html/classQXmppDiscoveryManager.html0000644000175000007640000006161612116723632022503 0ustar sharkyjerryweb QXmpp: QXmppDiscoveryManager Class Reference
QXmppDiscoveryManager Class Reference

The QXmppDiscoveryManager class makes it possible to discover information about other entities as defined by XEP-0030: Service Discovery. More...

#include <QXmppDiscoveryManager.h>

Inheritance diagram for QXmppDiscoveryManager:
QXmppClientExtension QXmppLoggable

Signals

void infoReceived (const QXmppDiscoveryIq &)
 This signal is emitted when an information response is received.
void itemsReceived (const QXmppDiscoveryIq &)
 This signal is emitted when an items response is received.

Public Member Functions

QXmppDiscoveryIq capabilities ()
 Returns the client's full capabilities.
QString requestInfo (const QString &jid, const QString &node="")
QString requestItems (const QString &jid, const QString &node="")
QString clientCapabilitiesNode () const
void setClientCapabilitiesNode (const QString &)
QString clientCategory () const
void setClientCategory (const QString &)
void setClientName (const QString &)
QString clientName () const
QString clientType () const
void setClientType (const QString &)
QXmppDataForm clientInfoForm () const
void setClientInfoForm (const QXmppDataForm &form)
- Public Member Functions inherited from QXmppClientExtension
 QXmppClientExtension ()
virtual ~QXmppClientExtension ()
virtual QStringList discoveryFeatures () const
virtual QList
< QXmppDiscoveryIq::Identity > 
discoveryIdentities () const
virtual bool handleStanza (const QDomElement &stanza)=0
 You need to implement this method to process incoming XMPP stanzas.
- Public Member Functions inherited from QXmppLoggable
 QXmppLoggable (QObject *parent=0)

Additional Inherited Members

- Protected Member Functions inherited from QXmppClientExtension
QXmppClientclient ()
virtual void setClient (QXmppClient *client)

Detailed Description

The QXmppDiscoveryManager class makes it possible to discover information about other entities as defined by XEP-0030: Service Discovery.

Member Function Documentation

QString QXmppDiscoveryManager::clientCapabilitiesNode ( ) const

Returns the capabilities node of the local XMPP client.

By default this is "http://code.google.com/p/qxmpp".

QString QXmppDiscoveryManager::clientCategory ( ) const

Returns the category of the local XMPP client.

By default this is "client".

QXmppDataForm QXmppDiscoveryManager::clientInfoForm ( ) const

Returns the client's extended information form, as defined by XEP-0128 Service Discovery Extensions.

QString QXmppDiscoveryManager::clientName ( ) const

Returns the name of the local XMPP client.

By default this is "Based on QXmpp x.y.z".

QString QXmppDiscoveryManager::clientType ( ) const

Returns the type of the local XMPP client.

By default this is "pc".

QString QXmppDiscoveryManager::requestInfo ( const QString &  jid,
const QString &  node = "" 
)

Requests information from the specified XMPP entity.

Parameters
jidThe target entity's JID.
nodeThe target node (optional).
QString QXmppDiscoveryManager::requestItems ( const QString &  jid,
const QString &  node = "" 
)

Requests items from the specified XMPP entity.

Parameters
jidThe target entity's JID.
nodeThe target node (optional).
void QXmppDiscoveryManager::setClientCapabilitiesNode ( const QString &  node)

Sets the capabilities node of the local XMPP client.

Parameters
node
void QXmppDiscoveryManager::setClientCategory ( const QString &  category)

Sets the category of the local XMPP client.

You can find a list of valid categories at: http://xmpp.org/registrar/disco-categories.html

Parameters
category
void QXmppDiscoveryManager::setClientInfoForm ( const QXmppDataForm form)

Sets the client's extended information form, as defined by XEP-0128 Service Discovery Extensions.

void QXmppDiscoveryManager::setClientName ( const QString &  name)

Sets the name of the local XMPP client.

Parameters
name
void QXmppDiscoveryManager::setClientType ( const QString &  type)

Sets the type of the local XMPP client.

You can find a list of valid types at: http://xmpp.org/registrar/disco-categories.html

Parameters
type

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/QXmppMucIq_8h_source.html0000644000175000007640000005441512116723632021207 0ustar sharkyjerryweb QXmpp: QXmppMucIq.h Source File
QXmpp  Version:0.7.6
QXmppMucIq.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Jeremy Lainé
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXMPPMUCIQ_H
25 #define QXMPPMUCIQ_H
26 
27 #include "QXmppDataForm.h"
28 #include "QXmppIq.h"
29 
35 
36 class QXMPP_EXPORT QXmppMucItem
37 {
38 public:
40  enum Affiliation {
41  UnspecifiedAffiliation,
42  OutcastAffiliation,
43  NoAffiliation,
44  MemberAffiliation,
45  AdminAffiliation,
46  OwnerAffiliation,
47  };
48 
50  enum Role {
51  UnspecifiedRole,
52  NoRole,
53  VisitorRole,
54  ParticipantRole,
55  ModeratorRole,
56  };
57 
58  QXmppMucItem();
59  bool isNull() const;
60 
61  QString actor() const;
62  void setActor(const QString &actor);
63 
64  Affiliation affiliation() const;
65  void setAffiliation(Affiliation affiliation);
66 
67  QString jid() const;
68  void setJid(const QString &jid);
69 
70  QString nick() const;
71  void setNick(const QString &nick);
72 
73  QString reason() const;
74  void setReason(const QString &reason);
75 
76  Role role() const;
77  void setRole(Role role);
78 
80  void parse(const QDomElement &element);
81  void toXml(QXmlStreamWriter *writer) const;
82 
83  static Affiliation affiliationFromString(const QString &affiliationStr);
84  static QString affiliationToString(Affiliation affiliation);
85  static Role roleFromString(const QString &roleStr);
86  static QString roleToString(Role role);
88 private:
89  QString m_actor;
90  Affiliation m_affiliation;
91  QString m_jid;
92  QString m_nick;
93  QString m_reason;
94  Role m_role;
95 };
96 
103 
104 class QXMPP_EXPORT QXmppMucAdminIq : public QXmppIq
105 {
106 public:
107  QList<QXmppMucItem> items() const;
108  void setItems(const QList<QXmppMucItem> &items);
109 
111  static bool isMucAdminIq(const QDomElement &element);
113 
114 protected:
116  void parseElementFromChild(const QDomElement &element);
117  void toXmlElementFromChild(QXmlStreamWriter *writer) const;
119 
120 private:
121  QList<QXmppMucItem> m_items;
122 };
123 
131 
132 class QXMPP_EXPORT QXmppMucOwnerIq : public QXmppIq
133 {
134 public:
135  QXmppDataForm form() const;
136  void setForm(const QXmppDataForm &form);
137 
139  static bool isMucOwnerIq(const QDomElement &element);
141 
142 protected:
144  void parseElementFromChild(const QDomElement &element);
145  void toXmlElementFromChild(QXmlStreamWriter *writer) const;
147 
148 private:
149  QXmppDataForm m_form;
150 };
151 
152 #endif
qxmpp-0.7.6/doc/html/QXmppBookmarkSet_8h_source.html0000644000175000007640000004211712116723632022406 0ustar sharkyjerryweb QXmpp: QXmppBookmarkSet.h Source File
QXmpp  Version:0.7.6
QXmppBookmarkSet.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Jeremy Lainé
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXMPPBOOKMARKSET_H
25 #define QXMPPBOOKMARKSET_H
26 
27 #include <QList>
28 #include <QUrl>
29 
30 #include "QXmppStanza.h"
31 
35 class QXMPP_EXPORT QXmppBookmarkConference
36 {
37 public:
39 
40  bool autoJoin() const;
41  void setAutoJoin(bool autoJoin);
42 
43  QString jid() const;
44  void setJid(const QString &jid);
45 
46  QString name() const;
47  void setName(const QString &name);
48 
49  QString nickName() const;
50  void setNickName(const QString &nickName);
51 
52 private:
53  bool m_autoJoin;
54  QString m_jid;
55  QString m_name;
56  QString m_nickName;
57 };
58 
62 class QXMPP_EXPORT QXmppBookmarkUrl
63 {
64 public:
65  QString name() const;
66  void setName(const QString &name);
67 
68  QUrl url() const;
69  void setUrl(const QUrl &url);
70 
71 private:
72  QString m_name;
73  QUrl m_url;
74 };
75 
79 class QXMPP_EXPORT QXmppBookmarkSet
80 {
81 public:
82  QList<QXmppBookmarkConference> conferences() const;
83  void setConferences(const QList<QXmppBookmarkConference> &conferences);
84 
85  QList<QXmppBookmarkUrl> urls() const;
86  void setUrls(const QList<QXmppBookmarkUrl> &urls);
87 
89  static bool isBookmarkSet(const QDomElement &element);
90  void parse(const QDomElement &element);
91  void toXml(QXmlStreamWriter *writer) const;
93 
94 private:
95  QList<QXmppBookmarkConference> m_conferences;
96  QList<QXmppBookmarkUrl> m_urls;
97 };
98 
99 #endif
qxmpp-0.7.6/doc/html/classQXmppDataForm-members.html0000644000175000007640000002412112116723632022354 0ustar sharkyjerryweb QXmpp: Member List
QXmppDataForm Member List

This is the complete list of members for QXmppDataForm, including all inherited members.

Cancel enum valueQXmppDataForm
fields() const QXmppDataForm
fields()QXmppDataForm
Form enum valueQXmppDataForm
instructions() const QXmppDataForm
isNull() const QXmppDataForm
None enum valueQXmppDataForm
operator=(const QXmppDataForm &other)QXmppDataForm
QXmppDataForm(QXmppDataForm::Type type=QXmppDataForm::None)QXmppDataForm
QXmppDataForm(const QXmppDataForm &other)QXmppDataForm
Result enum valueQXmppDataForm
setFields(const QList< QXmppDataForm::Field > &fields)QXmppDataForm
setInstructions(const QString &instructions)QXmppDataForm
setTitle(const QString &title)QXmppDataForm
setType(QXmppDataForm::Type type)QXmppDataForm
Submit enum valueQXmppDataForm
title() const QXmppDataForm
Type enum nameQXmppDataForm
type() const QXmppDataForm
~QXmppDataForm()QXmppDataForm
qxmpp-0.7.6/doc/html/QXmppRosterManager_8h_source.html0000644000175000007640000004600512116723632022736 0ustar sharkyjerryweb QXmpp: QXmppRosterManager.h Source File
QXmpp  Version:0.7.6
QXmppRosterManager.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Authors:
5  * Manjeet Dahiya
6  * Jeremy Lainé
7  *
8  * Source:
9  * http://code.google.com/p/qxmpp
10  *
11  * This file is a part of QXmpp library.
12  *
13  * This library is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU Lesser General Public
15  * License as published by the Free Software Foundation; either
16  * version 2.1 of the License, or (at your option) any later version.
17  *
18  * This library is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21  * Lesser General Public License for more details.
22  *
23  */
24 
25 #ifndef QXMPPROSTERMANAGER_H
26 #define QXMPPROSTERMANAGER_H
27 
28 #include <QObject>
29 #include <QMap>
30 #include <QStringList>
31 
32 #include "QXmppClientExtension.h"
33 #include "QXmppPresence.h"
34 #include "QXmppRosterIq.h"
35 
36 class QXmppRosterManagerPrivate;
37 
63 
64 class QXMPP_EXPORT QXmppRosterManager : public QXmppClientExtension
65 {
66  Q_OBJECT
67 
68 public:
71 
72  bool isRosterReceived() const;
73  QStringList getRosterBareJids() const;
74  QXmppRosterIq::Item getRosterEntry(const QString& bareJid) const;
75 
76  QStringList getResources(const QString& bareJid) const;
77  QMap<QString, QXmppPresence> getAllPresencesForBareJid(
78  const QString& bareJid) const;
79  QXmppPresence getPresence(const QString& bareJid,
80  const QString& resource) const;
81 
83  bool handleStanza(const QDomElement &element);
85 
86 public slots:
87  bool acceptSubscription(const QString &bareJid, const QString &reason = QString());
88  bool refuseSubscription(const QString &bareJid, const QString &reason = QString());
89  bool addItem(const QString &bareJid, const QString &name = QString(), const QSet<QString> &groups = QSet<QString>());
90  bool removeItem(const QString &bareJid);
91  bool renameItem(const QString &bareJid, const QString &name);
92  bool subscribe(const QString &bareJid, const QString &reason = QString());
93  bool unsubscribe(const QString &bareJid, const QString &reason = QString());
94 
95 signals:
100  void rosterReceived();
101 
103  void presenceChanged(const QString& bareJid, const QString& resource);
104 
112  void subscriptionReceived(const QString& bareJid);
113 
116  void itemAdded(const QString& bareJid);
117 
120  void itemChanged(const QString& bareJid);
121 
124  void itemRemoved(const QString& bareJid);
125 
126 private slots:
127  void _q_connected();
128  void _q_disconnected();
129  void _q_presenceReceived(const QXmppPresence&);
130 
131 private:
132  QXmppRosterManagerPrivate *d;
133 };
134 
135 #endif // QXMPPROSTER_H
qxmpp-0.7.6/doc/html/classQXmppArchivePrefIq-members.html0000644000175000007640000003022112116723632023345 0ustar sharkyjerryweb QXmpp: Member List
QXmppArchivePrefIq Member List

This is the complete list of members for QXmppArchivePrefIq, including all inherited members.

error() const QXmppStanza
Error enum valueQXmppIq
extendedAddresses() const QXmppStanza
extensions() const QXmppStanza
from() const QXmppStanza
Get enum valueQXmppIq
id() const QXmppStanza
lang() const QXmppStanza
operator=(const QXmppIq &other)QXmppIq
QXmppStanza::operator=(const QXmppStanza &other)QXmppStanza
QXmppIq(QXmppIq::Type type=QXmppIq::Get)QXmppIq
QXmppIq(const QXmppIq &other)QXmppIq
QXmppStanza(const QString &from=QString(), const QString &to=QString())QXmppStanza
QXmppStanza(const QXmppStanza &other)QXmppStanza
Result enum valueQXmppIq
Set enum valueQXmppIq
setError(const QXmppStanza::Error &error)QXmppStanza
setExtendedAddresses(const QList< QXmppExtendedAddress > &extendedAddresses)QXmppStanza
setExtensions(const QXmppElementList &elements)QXmppStanza
setFrom(const QString &)QXmppStanza
setId(const QString &)QXmppStanza
setLang(const QString &)QXmppStanza
setTo(const QString &)QXmppStanza
setType(QXmppIq::Type)QXmppIq
to() const QXmppStanza
type() const QXmppIq
Type enum nameQXmppIq
~QXmppIq() (defined in QXmppIq)QXmppIq
~QXmppStanza()QXmppStanzavirtual
qxmpp-0.7.6/doc/html/classQXmppRegisterIq.html0000644000175000007640000006357512116723632021325 0ustar sharkyjerryweb QXmpp: QXmppRegisterIq Class Reference
QXmppRegisterIq Class Reference

The QXmppRegisterIq class represents a registration IQ as defined by XEP-0077: In-Band Registration. More...

#include <QXmppRegisterIq.h>

Inheritance diagram for QXmppRegisterIq:
QXmppIq QXmppStanza

Public Member Functions

QString email () const
 Returns the email for this registration IQ.
void setEmail (const QString &email)
 Sets the email for this registration IQ.
QXmppDataForm form () const
 Returns the QXmppDataForm for this registration IQ.
void setForm (const QXmppDataForm &form)
QString instructions () const
 Returns the instructions for this registration IQ.
void setInstructions (const QString &instructions)
 Sets the instructions for this registration IQ.
QString password () const
 Returns the password for this registration IQ.
void setPassword (const QString &username)
 Sets the password for this registration IQ.
QString username () const
 Returns the username for this registration IQ.
void setUsername (const QString &username)
 Sets the username for this registration IQ.
- Public Member Functions inherited from QXmppIq
 QXmppIq (QXmppIq::Type type=QXmppIq::Get)
 QXmppIq (const QXmppIq &other)
 Constructs a copy of other.
QXmppIqoperator= (const QXmppIq &other)
 Assigns other to this IQ.
QXmppIq::Type type () const
void setType (QXmppIq::Type)
- Public Member Functions inherited from QXmppStanza
 QXmppStanza (const QString &from=QString(), const QString &to=QString())
 QXmppStanza (const QXmppStanza &other)
 Constructs a copy of other.
virtual ~QXmppStanza ()
 Destroys a QXmppStanza.
QXmppStanzaoperator= (const QXmppStanza &other)
 Assigns other to this stanza.
QString to () const
void setTo (const QString &)
QString from () const
 Returns the stanza's sender JID.
void setFrom (const QString &)
QString id () const
 Returns the stanza's identifier.
void setId (const QString &)
QString lang () const
 Returns the stanza's language.
void setLang (const QString &)
QXmppStanza::Error error () const
 Returns the stanza's error.
void setError (const QXmppStanza::Error &error)
QXmppElementList extensions () const
void setExtensions (const QXmppElementList &elements)
QList< QXmppExtendedAddressextendedAddresses () const
void setExtendedAddresses (const QList< QXmppExtendedAddress > &extendedAddresses)

Additional Inherited Members

- Public Types inherited from QXmppIq
enum  Type { Error = 0, Get, Set, Result }
 This enum describes the type of IQ. More...

Detailed Description

The QXmppRegisterIq class represents a registration IQ as defined by XEP-0077: In-Band Registration.

It is used to create an account on the server.

Member Function Documentation

void QXmppRegisterIq::setForm ( const QXmppDataForm form)

Sets the QXmppDataForm for this registration IQ.

Parameters
form

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/functions_0x76.html0000644000175000007640000002310212116723632020005 0ustar sharkyjerryweb QXmpp: Class Members
QXmpp  Version:0.7.6
Here is a list of all documented class members with links to the class documentation for each member:

- v -

qxmpp-0.7.6/doc/html/classQXmppRpcManager-members.html0000644000175000007640000002613412116723632022704 0ustar sharkyjerryweb QXmpp: Member List
QXmppRpcManager Member List

This is the complete list of members for QXmppRpcManager, including all inherited members.

addInvokableInterface(QXmppInvokable *interface)QXmppRpcManager
callRemoteMethod(const QString &jid, const QString &interface, const QVariant &arg1=QVariant(), const QVariant &arg2=QVariant(), const QVariant &arg3=QVariant(), const QVariant &arg4=QVariant(), const QVariant &arg5=QVariant(), const QVariant &arg6=QVariant(), const QVariant &arg7=QVariant(), const QVariant &arg8=QVariant(), const QVariant &arg9=QVariant(), const QVariant &arg10=QVariant())QXmppRpcManager
client()QXmppClientExtensionprotected
debug(const QString &message)QXmppLoggableinlineprotected
discoveryFeatures() const QXmppClientExtensionvirtual
discoveryIdentities() const QXmppClientExtensionvirtual
handleStanza(const QDomElement &stanza)=0QXmppClientExtensionpure virtual
info(const QString &message)QXmppLoggableinlineprotected
logMessage(QXmppLogger::MessageType type, const QString &msg)QXmppLoggablesignal
logReceived(const QString &message)QXmppLoggableinlineprotected
logSent(const QString &message)QXmppLoggableinlineprotected
QXmppClientExtension()QXmppClientExtension
QXmppLoggable(QObject *parent=0)QXmppLoggable
QXmppRpcManager()QXmppRpcManager
setClient(QXmppClient *client)QXmppClientExtensionprotectedvirtual
setGauge(const QString &gauge, double value)QXmppLoggablesignal
updateCounter(const QString &counter, qint64 amount=1)QXmppLoggablesignal
warning(const QString &message)QXmppLoggableinlineprotected
~QXmppClientExtension()QXmppClientExtensionvirtual
qxmpp-0.7.6/doc/html/classQXmppMucAdminIq.png0000644000175000007640000000135612116723632021043 0ustar sharkyjerrywebPNG  IHDR{dPLTEutRNST2}IDATxir *ȑ.#/z WHhq~cF%wKZ~;l{Lo4'|2B&eLśȆae-$xÝI?t!ֻM&QeeߧN~H4tI1s*S?ÙקtV)O)auy>_6$]ݒwKZ1hunFo7;{S-6 wkq7Z wkq7DI2ݒ=7Ir#Iﺛ^=|;XC[KܝIi %IzwkË[γ}tgi$χοr $1'?swKZ-Ik1v ׹aMm&ts^q-=~?-rp?Ý%w2}bLDmG7K ypƘ,p7Z!`3_+QIENDB`qxmpp-0.7.6/doc/html/classQXmppRosterIq_1_1Item-members.html0000644000175000007640000002426112116723632023713 0ustar sharkyjerryweb QXmpp: Member List
QXmppRosterIq::Item Member List
qxmpp-0.7.6/doc/html/classQXmppRtpVideoChannel-members.html0000644000175000007640000002771412116723632023717 0ustar sharkyjerryweb QXmpp: Member List
QXmppRtpVideoChannel Member List

This is the complete list of members for QXmppRtpVideoChannel, including all inherited members.

close()QXmppRtpVideoChannel
datagramReceived(const QByteArray &ba)QXmppRtpVideoChannelslot
debug(const QString &message)QXmppLoggableinlineprotected
decoderFormat() const QXmppRtpVideoChannel
encoderFormat() const QXmppRtpVideoChannel
info(const QString &message)QXmppLoggableinlineprotected
localPayloadTypes() (defined in QXmppRtpChannel)QXmppRtpChannel
logMessage(QXmppLogger::MessageType type, const QString &msg)QXmppLoggablesignal
logReceived(const QString &message)QXmppLoggableinlineprotected
logSent(const QString &message)QXmppLoggableinlineprotected
openMode() const QXmppRtpVideoChannel
QXmppLoggable(QObject *parent=0)QXmppLoggable
QXmppRtpChannel() (defined in QXmppRtpChannel)QXmppRtpChannel
QXmppRtpVideoChannel(QObject *parent=0)QXmppRtpVideoChannel
QXmppRtpVideoChannelPrivate (defined in QXmppRtpVideoChannel)QXmppRtpVideoChannelfriend
readFrames()QXmppRtpVideoChannel
sendDatagram(const QByteArray &ba)QXmppRtpVideoChannelsignal
setEncoderFormat(const QXmppVideoFormat &format)QXmppRtpVideoChannel
setGauge(const QString &gauge, double value)QXmppLoggablesignal
setRemotePayloadTypes(const QList< QXmppJinglePayloadType > &remotePayloadTypes) (defined in QXmppRtpChannel)QXmppRtpChannel
updateCounter(const QString &counter, qint64 amount=1)QXmppLoggablesignal
warning(const QString &message)QXmppLoggableinlineprotected
writeFrame(const QXmppVideoFrame &frame)QXmppRtpVideoChannel
~QXmppRtpVideoChannel() (defined in QXmppRtpVideoChannel)QXmppRtpVideoChannel
qxmpp-0.7.6/doc/html/classQXmppEntityTimeManager-members.html0000644000175000007640000002503412116723632024251 0ustar sharkyjerryweb QXmpp: Member List
QXmppEntityTimeManager Member List

This is the complete list of members for QXmppEntityTimeManager, including all inherited members.

client()QXmppClientExtensionprotected
debug(const QString &message)QXmppLoggableinlineprotected
discoveryFeatures() const QXmppClientExtensionvirtual
discoveryIdentities() const QXmppClientExtensionvirtual
handleStanza(const QDomElement &stanza)=0QXmppClientExtensionpure virtual
info(const QString &message)QXmppLoggableinlineprotected
logMessage(QXmppLogger::MessageType type, const QString &msg)QXmppLoggablesignal
logReceived(const QString &message)QXmppLoggableinlineprotected
logSent(const QString &message)QXmppLoggableinlineprotected
QXmppClientExtension()QXmppClientExtension
QXmppLoggable(QObject *parent=0)QXmppLoggable
requestTime(const QString &jid)QXmppEntityTimeManager
setClient(QXmppClient *client)QXmppClientExtensionprotectedvirtual
setGauge(const QString &gauge, double value)QXmppLoggablesignal
timeReceived(const QXmppEntityTimeIq &)QXmppEntityTimeManagersignal
updateCounter(const QString &counter, qint64 amount=1)QXmppLoggablesignal
warning(const QString &message)QXmppLoggableinlineprotected
~QXmppClientExtension()QXmppClientExtensionvirtual
qxmpp-0.7.6/doc/html/ftv2blank.png0000644000175000007640000000012612116723632016723 0ustar sharkyjerrywebPNG  IHDRɪ|IDATxݱðScOx@ y}IENDB`qxmpp-0.7.6/doc/html/classQXmppVCardPhone.html0000644000175000007640000002457712116723632021237 0ustar sharkyjerryweb QXmpp: QXmppVCardPhone Class Reference
QXmppVCardPhone Class Reference

Represents a vCard phone number. More...

#include <QXmppVCardIq.h>

Public Types

enum  TypeFlag {
  None = 0x0, Home = 0x1, Work = 0x2, Voice = 0x4,
  Fax = 0x8, Pager = 0x10, Messaging = 0x20, Cell = 0x40,
  Video = 0x80, BBS = 0x100, Modem = 0x200, ISDN = 0x400,
  PCS = 0x800, Preferred = 0x1000
}
 Describes phone number types.

Public Member Functions

 QXmppVCardPhone ()
 Constructs an empty phone number.
 QXmppVCardPhone (const QXmppVCardPhone &other)
 Constructs a copy of other.
QXmppVCardPhoneoperator= (const QXmppVCardPhone &other)
 Assigns other to this phone number.
QString number () const
 Returns the phone number.
void setNumber (const QString &number)
 Sets the phone number.
Type type () const
 Returns the phone number type, which is a combination of TypeFlag.
void setType (Type type)
 Sets the phone number type, which is a combination of TypeFlag.

Detailed Description

Represents a vCard phone number.


The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/QXmppServer_8h_source.html0000644000175000007640000006312012116723632021430 0ustar sharkyjerryweb QXmpp: QXmppServer.h Source File
QXmpp  Version:0.7.6
QXmppServer.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Jeremy Lainé
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXMPPSERVER_H
25 #define QXMPPSERVER_H
26 
27 #include <QTcpServer>
28 #include <QVariantMap>
29 
30 #include "QXmppLogger.h"
31 
32 class QDomElement;
33 class QSslCertificate;
34 class QSslKey;
35 class QSslSocket;
36 
37 class QXmppDialback;
41 class QXmppPresence;
43 class QXmppServerPrivate;
44 class QXmppSslServer;
45 class QXmppStanza;
46 class QXmppStream;
47 
58 
59 class QXMPP_EXPORT QXmppServer : public QXmppLoggable
60 {
61  Q_OBJECT
62  Q_PROPERTY(QXmppLogger* logger READ logger WRITE setLogger NOTIFY loggerChanged)
63 
64 public:
65  QXmppServer(QObject *parent = 0);
66  ~QXmppServer();
67 
68  void addExtension(QXmppServerExtension *extension);
69  QList<QXmppServerExtension*> extensions();
70 
71  QString domain() const;
72  void setDomain(const QString &domain);
73 
74  QXmppLogger *logger();
75  void setLogger(QXmppLogger *logger);
76 
77  QXmppPasswordChecker *passwordChecker();
78  void setPasswordChecker(QXmppPasswordChecker *checker);
79 
80  QVariantMap statistics() const;
81 
82  void addCaCertificates(const QString &caCertificates);
83  void setLocalCertificate(const QString &path);
84  void setPrivateKey(const QString &path);
85 
86  void close();
87  bool listenForClients(const QHostAddress &address = QHostAddress::Any, quint16 port = 5222);
88  bool listenForServers(const QHostAddress &address = QHostAddress::Any, quint16 port = 5269);
89 
90  bool sendElement(const QDomElement &element);
91  bool sendPacket(const QXmppStanza &stanza);
92 
93  void addIncomingClient(QXmppIncomingClient *stream);
94 
95 signals:
97  void clientConnected(const QString &jid);
98 
100  void clientDisconnected(const QString &jid);
101 
103  void loggerChanged(QXmppLogger *logger);
104 
105 public slots:
106  void handleElement(const QDomElement &element);
107 
108 private slots:
109  void _q_clientConnection(QSslSocket *socket);
110  void _q_clientConnected();
111  void _q_clientDisconnected();
112  void _q_dialbackRequestReceived(const QXmppDialback &dialback);
113  void _q_outgoingServerDisconnected();
114  void _q_serverConnection(QSslSocket *socket);
115  void _q_serverDisconnected();
116 
117 private:
118  friend class QXmppServerPrivate;
119  QXmppServerPrivate *d;
120 };
121 
122 class QXmppSslServerPrivate;
123 
126 
127 class QXMPP_EXPORT QXmppSslServer : public QTcpServer
128 {
129  Q_OBJECT
130 
131 public:
132  QXmppSslServer(QObject *parent = 0);
133  ~QXmppSslServer();
134 
135  void addCaCertificates(const QList<QSslCertificate> &certificates);
136  void setLocalCertificate(const QSslCertificate &certificate);
137  void setPrivateKey(const QSslKey &key);
138 
139 signals:
141  void newConnection(QSslSocket *socket);
142 
143 private:
144  void incomingConnection(int socketDescriptor);
145  QXmppSslServerPrivate * const d;
146 };
147 
148 #endif
qxmpp-0.7.6/doc/html/classQXmppCallManager.html0000644000175000007640000005610112116723632021400 0ustar sharkyjerryweb QXmpp: QXmppCallManager Class Reference

The QXmppCallManager class provides support for making and receiving voice calls. More...

#include <QXmppCallManager.h>

Inheritance diagram for QXmppCallManager:
QXmppClientExtension QXmppLoggable

Public Slots

QXmppCallcall (const QString &jid)

Signals

void callReceived (QXmppCall *call)
void callStarted (QXmppCall *call)
 This signal is emitted when a call (incoming or outgoing) is started.

Public Member Functions

 QXmppCallManager ()
 ~QXmppCallManager ()
 Destroys the QXmppCallManager object.
void setStunServer (const QHostAddress &host, quint16 port=3478)
void setTurnServer (const QHostAddress &host, quint16 port=3478)
void setTurnUser (const QString &user)
void setTurnPassword (const QString &password)
- Public Member Functions inherited from QXmppClientExtension
 QXmppClientExtension ()
virtual ~QXmppClientExtension ()
virtual QStringList discoveryFeatures () const
virtual QList
< QXmppDiscoveryIq::Identity > 
discoveryIdentities () const
virtual bool handleStanza (const QDomElement &stanza)=0
 You need to implement this method to process incoming XMPP stanzas.
- Public Member Functions inherited from QXmppLoggable
 QXmppLoggable (QObject *parent=0)

Friends

class QXmppCall
class QXmppCallPrivate
class QXmppCallManagerPrivate

Additional Inherited Members

- Protected Member Functions inherited from QXmppClientExtension
QXmppClientclient ()
virtual void setClient (QXmppClient *client)

Detailed Description

The QXmppCallManager class provides support for making and receiving voice calls.

Session initiation is performed as described by XEP-0166: Jingle, XEP-0167: Jingle RTP Sessions and XEP-0176: Jingle ICE-UDP Transport Method.

The data stream is connected using Interactive Connectivity Establishment (RFC 5245) and data is transferred using Real Time Protocol (RFC 3550) packets.

To make use of this manager, you need to instantiate it and load it into the QXmppClient instance as follows:

Constructor & Destructor Documentation

QXmppCallManager::QXmppCallManager ( )

Constructs a QXmppCallManager object to handle incoming and outgoing Voice-Over-IP calls.

Member Function Documentation

QXmppCall * QXmppCallManager::call ( const QString &  jid)
slot

Initiates a new outgoing call to the specified recipient.

Parameters
jid
void QXmppCallManager::callReceived ( QXmppCall call)
signal

This signal is emitted when a new incoming call is received.

To accept the call, invoke the call's QXmppCall::accept() method. To refuse the call, invoke the call's QXmppCall::hangup() method.

void QXmppCallManager::setStunServer ( const QHostAddress &  host,
quint16  port = 3478 
)

Sets the STUN server to use to determine server-reflexive addresses and ports.

Parameters
hostThe address of the STUN server.
portThe port of the STUN server.
void QXmppCallManager::setTurnPassword ( const QString &  password)

Sets the password used for authentication with the TURN server.

Parameters
password
void QXmppCallManager::setTurnServer ( const QHostAddress &  host,
quint16  port = 3478 
)

Sets the TURN server to use to relay packets in double-NAT configurations.

Parameters
hostThe address of the TURN server.
portThe port of the TURN server.
void QXmppCallManager::setTurnUser ( const QString &  user)

Sets the user used for authentication with the TURN server.

Parameters
user

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppStanza-members.html0000644000175000007640000002267512116723632022133 0ustar sharkyjerryweb QXmpp: Member List
QXmppStanza Member List

This is the complete list of members for QXmppStanza, including all inherited members.

error() const QXmppStanza
extendedAddresses() const QXmppStanza
extensions() const QXmppStanza
from() const QXmppStanza
id() const QXmppStanza
lang() const QXmppStanza
operator=(const QXmppStanza &other)QXmppStanza
QXmppStanza(const QString &from=QString(), const QString &to=QString())QXmppStanza
QXmppStanza(const QXmppStanza &other)QXmppStanza
setError(const QXmppStanza::Error &error)QXmppStanza
setExtendedAddresses(const QList< QXmppExtendedAddress > &extendedAddresses)QXmppStanza
setExtensions(const QXmppElementList &elements)QXmppStanza
setFrom(const QString &)QXmppStanza
setId(const QString &)QXmppStanza
setLang(const QString &)QXmppStanza
setTo(const QString &)QXmppStanza
to() const QXmppStanza
~QXmppStanza()QXmppStanzavirtual
qxmpp-0.7.6/doc/html/classQXmppArchiveRemoveIq.png0000644000175000007640000000154412116723632022104 0ustar sharkyjerrywebPNG  IHDRPLTEutRNST2IDATxq G?fY2mぐ="kcSB q3Ifde|}IҘx!IyլZ=I[beDο|麲rY'(-$c7KJƺlD{NY35rre0=nsJS,kFfuJ\RլN,=^.G[S Kjt!IfdKWq3I1Y1edZmViI5f6 p3n`l 7f6 _bqJ4!n&I6LlkϣO#Ir<#IgiVIo|*K͒RJaց$YܬwO$x,\l0٠6={,UP{fmJ]u|Zs3I%gq3I1Y1edZmViI5f6 p3n`l 7f6 _BaJf6 Fcǩ O3Te/Vjuo 4 pج*K4](sf#>x}{PNrys@zvp]Tڎ5f'}j6ZzͭZ_Ak? >0+q{>~Ff}Ьݚ j{^Bf[SY~cS}lK6WU`#85  q3n` ! ,?RDIENDB`qxmpp-0.7.6/doc/html/classQXmppResultSetReply-members.html0000644000175000007640000001705712116723632023637 0ustar sharkyjerryweb QXmpp: Member List
QXmppResultSetReply Member List

This is the complete list of members for QXmppResultSetReply, including all inherited members.

count() const QXmppResultSetReply
first() const QXmppResultSetReply
index() const QXmppResultSetReply
isNull() const QXmppResultSetReply
last() const QXmppResultSetReply
QXmppResultSetReply() (defined in QXmppResultSetReply)QXmppResultSetReply
setCount(int count)QXmppResultSetReply
setFirst(const QString &first)QXmppResultSetReply
setIndex(int index)QXmppResultSetReply
setLast(const QString &last)QXmppResultSetReply
qxmpp-0.7.6/doc/html/classQXmppArchiveChatIq.html0000644000175000007640000005460112116723632021710 0ustar sharkyjerryweb QXmpp: QXmppArchiveChatIq Class Reference
QXmppArchiveChatIq Class Reference

Represents an archive chat as defined by XEP-0136: Message Archiving. More...

#include <QXmppArchiveIq.h>

Inheritance diagram for QXmppArchiveChatIq:
QXmppIq QXmppStanza

Public Member Functions

QXmppArchiveChat chat () const
 Returns the chat conversation carried by this IQ.
void setChat (const QXmppArchiveChat &chat)
 Sets the chat conversation carried by this IQ.
QXmppResultSetReply resultSetReply () const
void setResultSetReply (const QXmppResultSetReply &rsm)
- Public Member Functions inherited from QXmppIq
 QXmppIq (QXmppIq::Type type=QXmppIq::Get)
 QXmppIq (const QXmppIq &other)
 Constructs a copy of other.
QXmppIqoperator= (const QXmppIq &other)
 Assigns other to this IQ.
QXmppIq::Type type () const
void setType (QXmppIq::Type)
- Public Member Functions inherited from QXmppStanza
 QXmppStanza (const QString &from=QString(), const QString &to=QString())
 QXmppStanza (const QXmppStanza &other)
 Constructs a copy of other.
virtual ~QXmppStanza ()
 Destroys a QXmppStanza.
QXmppStanzaoperator= (const QXmppStanza &other)
 Assigns other to this stanza.
QString to () const
void setTo (const QString &)
QString from () const
 Returns the stanza's sender JID.
void setFrom (const QString &)
QString id () const
 Returns the stanza's identifier.
void setId (const QString &)
QString lang () const
 Returns the stanza's language.
void setLang (const QString &)
QXmppStanza::Error error () const
 Returns the stanza's error.
void setError (const QXmppStanza::Error &error)
QXmppElementList extensions () const
void setExtensions (const QXmppElementList &elements)
QList< QXmppExtendedAddressextendedAddresses () const
void setExtendedAddresses (const QList< QXmppExtendedAddress > &extendedAddresses)

Additional Inherited Members

- Public Types inherited from QXmppIq
enum  Type { Error = 0, Get, Set, Result }
 This enum describes the type of IQ. More...

Detailed Description

Represents an archive chat as defined by XEP-0136: Message Archiving.

It is used to get chat as a QXmppArchiveChat.

Member Function Documentation

QXmppResultSetReply QXmppArchiveChatIq::resultSetReply ( ) const

Returns the result set management reply.

This is used for paging through messages.

void QXmppArchiveChatIq::setResultSetReply ( const QXmppResultSetReply rsm)

Sets the result set management reply.

This is used for paging through messages.


The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppConfiguration.html0000644000175000007640000015665212116723632022055 0ustar sharkyjerryweb QXmpp: QXmppConfiguration Class Reference
QXmppConfiguration Class Reference

The QXmppConfiguration class holds configuration options. More...

#include <QXmppConfiguration.h>

Public Types

enum  StreamSecurityMode { TLSEnabled = 0, TLSDisabled, TLSRequired }
enum  NonSASLAuthMechanism { NonSASLPlain = 0, NonSASLDigest }

Public Member Functions

 QXmppConfiguration ()
 Creates a QXmppConfiguration object.
 QXmppConfiguration (const QXmppConfiguration &other)
 Creates a copy of other.
 ~QXmppConfiguration ()
QXmppConfigurationoperator= (const QXmppConfiguration &other)
 Assigns other to this QXmppConfiguration.
QString host () const
void setHost (const QString &)
QString domain () const
void setDomain (const QString &)
int port () const
void setPort (int)
QString user () const
void setUser (const QString &)
QString password () const
void setPassword (const QString &)
QString resource () const
void setResource (const QString &)
QString jid () const
void setJid (const QString &jid)
QString jidBare () const
QString facebookAccessToken () const
 Returns the access token used for X-FACEBOOK-PLATFORM authentication.
void setFacebookAccessToken (const QString &)
QString facebookAppId () const
 Returns the application ID used for X-FACEBOOK-PLATFORM authentication.
void setFacebookAppId (const QString &)
QString googleAccessToken () const
 Returns the access token used for X-OAUTH2 authentication.
void setGoogleAccessToken (const QString &accessToken)
QString windowsLiveAccessToken () const
 Returns the access token used for X-MESSENGER-OAUTH2 authentication.
void setWindowsLiveAccessToken (const QString &accessToken)
bool autoAcceptSubscriptions () const
void setAutoAcceptSubscriptions (bool)
bool autoReconnectionEnabled () const
void setAutoReconnectionEnabled (bool)
bool useSASLAuthentication () const
 Returns whether to make use of SASL authentication.
void setUseSASLAuthentication (bool)
 Sets whether to make use of SASL authentication.
bool useNonSASLAuthentication () const
 Returns whether to make use of non-SASL authentication.
void setUseNonSASLAuthentication (bool)
 Sets whether to make use of non-SASL authentication.
bool ignoreSslErrors () const
void setIgnoreSslErrors (bool)
QXmppConfiguration::StreamSecurityMode streamSecurityMode () const
void setStreamSecurityMode (QXmppConfiguration::StreamSecurityMode mode)
QXmppConfiguration::NonSASLAuthMechanism nonSASLAuthMechanism () const
void setNonSASLAuthMechanism (QXmppConfiguration::NonSASLAuthMechanism)
QString saslAuthMechanism () const
void setSaslAuthMechanism (const QString &mechanism)
QNetworkProxy networkProxy () const
void setNetworkProxy (const QNetworkProxy &proxy)
int keepAliveInterval () const
void setKeepAliveInterval (int secs)
int keepAliveTimeout () const
void setKeepAliveTimeout (int secs)
QList< QSslCertificate > caCertificates () const
 Returns the a list of trusted CA certificates.
void setCaCertificates (const QList< QSslCertificate > &)
 Specifies a list of trusted CA certificates.

Detailed Description

The QXmppConfiguration class holds configuration options.

It can be passed to QXmppClient to specify the options when connecting to an XMPP server.

It is a container of all the settings, configuration required for connecting to an XMPP server. E.g. server name, username, port, type of authentication mechanism, type of security used by stream (encryption), etc..

Member Enumeration Documentation

An enumeration for various Non-SASL authentication mechanisms available. The server may or may not allow QXmppConfiguration::Plain mechanism. So specifying the mechanism is just a hint to the library.

Enumerator:
NonSASLPlain 

Plain.

NonSASLDigest 

Digest (default)

An enumeration for type of the Security Mode that is stream is encrypted or not. The server may or may not have TLS feature. Server may force the encryption. Depending upon all this user can specify following options.

Enumerator:
TLSEnabled 

Encryption is used if available (default)

TLSDisabled 

No encryption is server allows.

TLSRequired 

Encryption is a must otherwise connection would not be established

Constructor & Destructor Documentation

QXmppConfiguration::QXmppConfiguration ( )

Creates a QXmppConfiguration object.

An enumeration for various SASL authentication mechanisms available. The server may or may not allow any particular mechanism. So depending upon the availability of mechanisms on the server the library will choose a mechanism.

QXmppConfiguration::~QXmppConfiguration ( )

Destructor, destroys the QXmppConfiguration object.

Member Function Documentation

bool QXmppConfiguration::autoAcceptSubscriptions ( ) const

Returns the auto-accept-subscriptions-request configuration.

Returns
boolean value true means that auto-accept-subscriptions-request is enabled else disabled for false
bool QXmppConfiguration::autoReconnectionEnabled ( ) const

Returns the auto-reconnect-on-disconnection-on-error configuration.

Returns
boolean value true means that auto-reconnect is enabled else disabled for false
QString QXmppConfiguration::domain ( ) const

Returns the domain name.

Returns
domain name
QString QXmppConfiguration::host ( ) const

Returns the host name.

Returns
host name
bool QXmppConfiguration::ignoreSslErrors ( ) const

Returns whether SSL errors (such as certificate validation errors) are to be ignored when connecting to the XMPP server.

QString QXmppConfiguration::jid ( ) const

Returns the jabber id (jid).

Returns
jabber id (jid) (e.g. "qxmpp.test1@gmail.com/resource" or qxmpp.nosp@m.test.nosp@m.@jabb.nosp@m.er.o.nosp@m.rg/QXmpp156)
QString QXmppConfiguration::jidBare ( ) const

Returns the bare jabber id (jid), without the resource identifier.

Returns
bare jabber id (jid) (e.g. "qxmpp.test1@gmail.com" or qxmpp.nosp@m.test.nosp@m.@jabb.nosp@m.er.o.nosp@m.rg)
int QXmppConfiguration::keepAliveInterval ( ) const

Returns the keep alive interval in seconds.

The default value is 60 seconds.

int QXmppConfiguration::keepAliveTimeout ( ) const

Returns the keep alive timeout in seconds.

The default value is 20 seconds.

QNetworkProxy QXmppConfiguration::networkProxy ( ) const

Returns the specified network proxy. The default value is QNetworkProxy::DefaultProxy that is the proxy is determined based on the application proxy set using QNetworkProxy::setApplicationProxy().

Returns
QNetworkProxy
QXmppConfiguration::NonSASLAuthMechanism QXmppConfiguration::nonSASLAuthMechanism ( ) const

Returns the Non-SASL authentication mechanism configuration.

Returns
QXmppConfiguration::NonSASLAuthMechanism
QString QXmppConfiguration::password ( ) const

Returns the password.

Returns
password
int QXmppConfiguration::port ( ) const

Returns the port number.

Returns
port number
QString QXmppConfiguration::resource ( ) const

Returns the resource identifier.

Returns
resource identifier
QString QXmppConfiguration::saslAuthMechanism ( ) const

Returns the preferred SASL authentication mechanism.

Default value: "DIGEST-MD5"

void QXmppConfiguration::setAutoAcceptSubscriptions ( bool  value)

Sets the auto-accept-subscriptions-request configuration.

Parameters
valueboolean value true means that auto-accept-subscriptions-request is enabled else disabled for false
void QXmppConfiguration::setAutoReconnectionEnabled ( bool  value)

Sets the auto-reconnect-on-disconnection-on-error configuration.

Parameters
valueboolean value true means that auto-reconnect is enabled else disabled for false
void QXmppConfiguration::setDomain ( const QString &  domain)

Sets the domain name.

Parameters
domainDomain name e.g. "gmail.com" and "jabber.org".
Note
host name and domain name can be different for google domain name is gmail.com and host name is talk.google.com
void QXmppConfiguration::setFacebookAccessToken ( const QString &  accessToken)

Sets the access token used for X-FACEBOOK-PLATFORM authentication.

This token is returned by Facebook at the end of the OAuth authentication process.

Parameters
accessToken
void QXmppConfiguration::setFacebookAppId ( const QString &  appId)

Sets the application ID used for X-FACEBOOK-PLATFORM authentication.

Parameters
appId
void QXmppConfiguration::setGoogleAccessToken ( const QString &  accessToken)

Sets the access token used for X-OAUTH2 authentication.

This token is returned by Google at the end of the OAuth authentication process.

Parameters
accessToken
void QXmppConfiguration::setHost ( const QString &  host)

Sets the host name.

Parameters
hosthost name of the XMPP server where connection has to be made (e.g. "jabber.org" and "talk.google.com"). It can also be an IP address in the form of a string (e.g. "192.168.1.25").
void QXmppConfiguration::setIgnoreSslErrors ( bool  value)

Specifies whether SSL errors (such as certificate validation errors) are to be ignored when connecting to an XMPP server.

void QXmppConfiguration::setJid ( const QString &  jid)

Sets the JID. If a full JID (i.e. one with a resource) is given, calling this method will update the username, domain and resource. Otherwise, only the username and the domain will be updated.

Parameters
jid
void QXmppConfiguration::setKeepAliveInterval ( int  secs)

Specifies the interval in seconds at which keep alive (ping) packets will be sent to the server.

If set to zero, no keep alive packets will be sent.

The default value is 60 seconds.

void QXmppConfiguration::setKeepAliveTimeout ( int  secs)

Specifies the maximum time in seconds to wait for a keep alive response from the server before considering we are disconnected.

If set to zero or a value larger than the keep alive interval, no timeout will occur.

The default value is 20 seconds.

void QXmppConfiguration::setNetworkProxy ( const QNetworkProxy &  proxy)

Specifies the network proxy used for the connection made by QXmppClient. The default value is QNetworkProxy::DefaultProxy that is the proxy is determined based on the application proxy set using QNetworkProxy::setApplicationProxy().

Parameters
proxyQNetworkProxy
void QXmppConfiguration::setNonSASLAuthMechanism ( QXmppConfiguration::NonSASLAuthMechanism  mech)

Hints the library the Non-SASL authentication mechanism to be used for authentication.

Parameters
mechQXmppConfiguration::NonSASLAuthMechanism
void QXmppConfiguration::setPassword ( const QString &  password)

Sets the password.

Parameters
passwordPassword for the specified username
void QXmppConfiguration::setPort ( int  port)

Sets the port number.

Parameters
portPort number at which the XMPP server is listening. The default value is 5222.
void QXmppConfiguration::setResource ( const QString &  resource)

Sets the resource identifier.

Multiple resources (e.g., devices or locations) may connect simultaneously to a server on behalf of each authorized client, with each resource differentiated by the resource identifier of an XMPP address (e.g. node@domain/home vs. node@domain/work)

The default value is "QXmpp".

Parameters
resourceResource identifier of the client in connection.
void QXmppConfiguration::setSaslAuthMechanism ( const QString &  mechanism)

Sets the preferred SASL authentication mechanism.

Valid values: "PLAIN", "DIGEST-MD5", "ANONYMOUS", "X-FACEBOOK-PLATFORM"

void QXmppConfiguration::setStreamSecurityMode ( QXmppConfiguration::StreamSecurityMode  mode)

Specifies the specified security mode for the stream. The default value is QXmppConfiguration::TLSEnabled.

Parameters
modeStreamSecurityMode
void QXmppConfiguration::setUser ( const QString &  user)

Sets the username.

Parameters
userUsername of the account at the specified XMPP server. It should be the name without the domain name. E.g. "qxmpp.test1" and not "qxmpp.test1@gmail.com"
void QXmppConfiguration::setWindowsLiveAccessToken ( const QString &  accessToken)

Sets the access token used for X-MESSENGER-OAUTH2 authentication.

This token is returned by Windows Live at the end of the OAuth authentication process.

Parameters
accessToken
QXmppConfiguration::StreamSecurityMode QXmppConfiguration::streamSecurityMode ( ) const

Returns the specified security mode for the stream. The default value is QXmppConfiguration::TLSEnabled.

Returns
StreamSecurityMode
QString QXmppConfiguration::user ( ) const

Returns the username.

Returns
username

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/dir_075bb3ff235063c77951cd176d15a741.html0000644000175000007640000001775612116723632022226 0ustar sharkyjerryweb QXmpp: /home/jerryweb/sharky/Development/qxmpp/src/server/ Directory Reference
QXmpp  Version:0.7.6
server Directory Reference

Files

file  QXmppDialback.cpp
file  QXmppDialback.h [code]
file  QXmppIncomingClient.cpp
file  QXmppIncomingClient.h [code]
file  QXmppIncomingServer.cpp
file  QXmppIncomingServer.h [code]
file  QXmppOutgoingServer.cpp
file  QXmppOutgoingServer.h [code]
file  QXmppPasswordChecker.cpp
file  QXmppPasswordChecker.h [code]
file  QXmppServer.cpp
file  QXmppServer.h [code]
file  QXmppServerExtension.cpp
file  QXmppServerExtension.h [code]
file  QXmppServerPlugin.h [code]
qxmpp-0.7.6/doc/html/functions_0x64.html0000644000175000007640000002724112116723632020012 0ustar sharkyjerryweb QXmpp: Class Members
QXmpp  Version:0.7.6
Here is a list of all documented class members with links to the class documentation for each member:

- d -

qxmpp-0.7.6/doc/html/classQXmppBindIq.html0000644000175000007640000005471212116723632020406 0ustar sharkyjerryweb QXmpp: QXmppBindIq Class Reference
QXmppBindIq Class Reference

The QXmppBindIq class represents an IQ used for resource binding as defined by RFC 3921. More...

#include <QXmppBindIq.h>

Inheritance diagram for QXmppBindIq:
QXmppIq QXmppStanza

Public Member Functions

QString jid () const
void setJid (const QString &)
QString resource () const
void setResource (const QString &)
- Public Member Functions inherited from QXmppIq
 QXmppIq (QXmppIq::Type type=QXmppIq::Get)
 QXmppIq (const QXmppIq &other)
 Constructs a copy of other.
QXmppIqoperator= (const QXmppIq &other)
 Assigns other to this IQ.
QXmppIq::Type type () const
void setType (QXmppIq::Type)
- Public Member Functions inherited from QXmppStanza
 QXmppStanza (const QString &from=QString(), const QString &to=QString())
 QXmppStanza (const QXmppStanza &other)
 Constructs a copy of other.
virtual ~QXmppStanza ()
 Destroys a QXmppStanza.
QXmppStanzaoperator= (const QXmppStanza &other)
 Assigns other to this stanza.
QString to () const
void setTo (const QString &)
QString from () const
 Returns the stanza's sender JID.
void setFrom (const QString &)
QString id () const
 Returns the stanza's identifier.
void setId (const QString &)
QString lang () const
 Returns the stanza's language.
void setLang (const QString &)
QXmppStanza::Error error () const
 Returns the stanza's error.
void setError (const QXmppStanza::Error &error)
QXmppElementList extensions () const
void setExtensions (const QXmppElementList &elements)
QList< QXmppExtendedAddressextendedAddresses () const
void setExtendedAddresses (const QList< QXmppExtendedAddress > &extendedAddresses)

Additional Inherited Members

- Public Types inherited from QXmppIq
enum  Type { Error = 0, Get, Set, Result }
 This enum describes the type of IQ. More...

Detailed Description

The QXmppBindIq class represents an IQ used for resource binding as defined by RFC 3921.

Member Function Documentation

QString QXmppBindIq::jid ( ) const

Returns the bound JID.

QString QXmppBindIq::resource ( ) const

Returns the requested resource.

void QXmppBindIq::setJid ( const QString &  jid)

Sets the bound JID.

Parameters
jid
void QXmppBindIq::setResource ( const QString &  resource)

Sets the requested resource.

Parameters
resource

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppJinglePayloadType-members.html0000644000175000007640000002264412116723632024253 0ustar sharkyjerryweb QXmpp: Member List
QXmppJinglePayloadType Member List

This is the complete list of members for QXmppJinglePayloadType, including all inherited members.

channels() const QXmppJinglePayloadType
clockrate() const QXmppJinglePayloadType
id() const QXmppJinglePayloadType
maxptime() const QXmppJinglePayloadType
name() const QXmppJinglePayloadType
operator==(const QXmppJinglePayloadType &other) const QXmppJinglePayloadType
parameters() const QXmppJinglePayloadType
ptime() const QXmppJinglePayloadType
QXmppJinglePayloadType() (defined in QXmppJinglePayloadType)QXmppJinglePayloadType
setChannels(unsigned char channels)QXmppJinglePayloadType
setClockrate(unsigned int clockrate)QXmppJinglePayloadType
setId(unsigned char id)QXmppJinglePayloadType
setMaxptime(unsigned int maxptime)QXmppJinglePayloadType
setName(const QString &name)QXmppJinglePayloadType
setParameters(const QMap< QString, QString > &parameters)QXmppJinglePayloadType
setPtime(unsigned int ptime)QXmppJinglePayloadType
qxmpp-0.7.6/doc/html/QXmppTransferManager_8h_source.html0000644000175000007640000013476712116723632023261 0ustar sharkyjerryweb QXmpp: QXmppTransferManager.h Source File
QXmpp  Version:0.7.6
QXmppTransferManager.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Jeremy Lainé
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXMPPTRANSFERMANAGER_H
25 #define QXMPPTRANSFERMANAGER_H
26 
27 #include <QDateTime>
28 #include <QSharedData>
29 #include <QUrl>
30 #include <QVariant>
31 
32 #include "QXmppClientExtension.h"
33 
34 class QTcpSocket;
35 class QXmppByteStreamIq;
36 class QXmppIbbCloseIq;
37 class QXmppIbbDataIq;
38 class QXmppIbbOpenIq;
39 class QXmppIq;
40 class QXmppStreamInitiationIq;
41 class QXmppTransferFileInfoPrivate;
42 class QXmppTransferJobPrivate;
44 class QXmppTransferManagerPrivate;
45 
46 class QXMPP_EXPORT QXmppTransferFileInfo
47 {
48 public:
49  QXmppTransferFileInfo();
50  QXmppTransferFileInfo(const QXmppTransferFileInfo &other);
51  ~QXmppTransferFileInfo();
52 
53  QDateTime date() const;
54  void setDate(const QDateTime &date);
55 
56  QByteArray hash() const;
57  void setHash(const QByteArray &hash);
58 
59  QString name() const;
60  void setName(const QString &name);
61 
62  QString description() const;
63  void setDescription(const QString &description);
64 
65  qint64 size() const;
66  void setSize(qint64 size);
67 
68  bool isNull() const;
69  QXmppTransferFileInfo& operator=(const QXmppTransferFileInfo &other);
70  bool operator==(const QXmppTransferFileInfo &other) const;
71 
73  void parse(const QDomElement &element);
74  void toXml(QXmlStreamWriter *writer) const;
76 
77 private:
78  QSharedDataPointer<QXmppTransferFileInfoPrivate> d;
79 };
80 
85 
86 class QXMPP_EXPORT QXmppTransferJob : public QXmppLoggable
87 {
88  Q_OBJECT
89  Q_ENUMS(Direction Error State)
90  Q_FLAGS(Method Methods)
91  Q_PROPERTY(Direction direction READ direction CONSTANT)
92  Q_PROPERTY(QUrl localFileUrl READ localFileUrl WRITE setLocalFileUrl NOTIFY localFileUrlChanged)
93  Q_PROPERTY(QString jid READ jid CONSTANT)
94  Q_PROPERTY(Method method READ method CONSTANT)
95  Q_PROPERTY(State state READ state NOTIFY stateChanged)
96 
97  Q_PROPERTY(QString fileName READ fileName CONSTANT)
98  Q_PROPERTY(qint64 fileSize READ fileSize CONSTANT)
99 
100 public:
103  {
106  };
107 
109  enum Error
110  {
111  NoError = 0,
116  };
117 
119  enum Method
120  {
121  NoMethod = 0,
122  InBandMethod = 1,
123  SocksMethod = 2,
124  AnyMethod = 3,
125  };
126  Q_DECLARE_FLAGS(Methods, Method)
127 
128 
129  enum State
130  {
131  OfferState = 0,
132  StartState = 1,
133  TransferState = 2,
134  FinishedState = 3,
135  };
136 
137  ~QXmppTransferJob();
138 
139  QXmppTransferJob::Direction direction() const;
140  QXmppTransferJob::Error error() const;
141  QString jid() const;
142  QXmppTransferJob::Method method() const;
143  QString sid() const;
144  qint64 speed() const;
145  QXmppTransferJob::State state() const;
146 
147  // XEP-0096 : File transfer
148  QXmppTransferFileInfo fileInfo() const;
149  QUrl localFileUrl() const;
150  void setLocalFileUrl(const QUrl &localFileUrl);
151 
153  QDateTime fileDate() const;
154  QByteArray fileHash() const;
155  QString fileName() const;
156  qint64 fileSize() const;
158 
159 signals:
162  void error(QXmppTransferJob::Error error);
163 
171  void finished();
172 
174  void localFileUrlChanged(const QUrl &localFileUrl);
175 
177  void progress(qint64 done, qint64 total);
178 
180  void stateChanged(QXmppTransferJob::State state);
181 
182 public slots:
183  void abort();
184  void accept(const QString &filePath);
185  void accept(QIODevice *output);
186 
187 private slots:
188  void _q_terminated();
189 
190 private:
191  QXmppTransferJob(const QString &jid, QXmppTransferJob::Direction direction, QXmppClient *client, QObject *parent);
192  void setState(QXmppTransferJob::State state);
193  void terminate(QXmppTransferJob::Error error);
194 
195  QXmppTransferJobPrivate *const d;
196  friend class QXmppTransferManager;
197  friend class QXmppTransferManagerPrivate;
198  friend class QXmppTransferIncomingJob;
199  friend class QXmppTransferOutgoingJob;
200 };
201 
218 
219 class QXMPP_EXPORT QXmppTransferManager : public QXmppClientExtension
220 {
221  Q_OBJECT
222  Q_PROPERTY(QString proxy READ proxy WRITE setProxy)
223  Q_PROPERTY(bool proxyOnly READ proxyOnly WRITE setProxyOnly)
224  Q_PROPERTY(QXmppTransferJob::Methods supportedMethods READ supportedMethods WRITE setSupportedMethods)
225 
226 public:
228  ~QXmppTransferManager();
229 
230  QString proxy() const;
231  void setProxy(const QString &proxyJid);
232 
233  bool proxyOnly() const;
234  void setProxyOnly(bool proxyOnly);
235 
236  QXmppTransferJob::Methods supportedMethods() const;
237  void setSupportedMethods(QXmppTransferJob::Methods methods);
238 
240  QStringList discoveryFeatures() const;
241  bool handleStanza(const QDomElement &element);
243 
244 signals:
249  void fileReceived(QXmppTransferJob *job);
250 
252  void jobStarted(QXmppTransferJob *job);
253 
257  void jobFinished(QXmppTransferJob *job);
258 
259 public slots:
260  QXmppTransferJob *sendFile(const QString &jid, const QString &filePath, const QString &description = QString());
261  QXmppTransferJob *sendFile(const QString &jid, QIODevice *device, const QXmppTransferFileInfo &fileInfo, const QString &sid = QString());
262 
263 protected:
265  void setClient(QXmppClient* client);
267 
268 private slots:
269  void _q_iqReceived(const QXmppIq&);
270  void _q_jobDestroyed(QObject *object);
271  void _q_jobError(QXmppTransferJob::Error error);
272  void _q_jobFinished();
273  void _q_jobStateChanged(QXmppTransferJob::State state);
274  void _q_socksServerConnected(QTcpSocket *socket, const QString &hostName, quint16 port);
275 
276 private:
277  QXmppTransferManagerPrivate *d;
278 
279  void byteStreamIqReceived(const QXmppByteStreamIq&);
280  void byteStreamResponseReceived(const QXmppIq&);
281  void byteStreamResultReceived(const QXmppByteStreamIq&);
282  void byteStreamSetReceived(const QXmppByteStreamIq&);
283  void ibbCloseIqReceived(const QXmppIbbCloseIq&);
284  void ibbDataIqReceived(const QXmppIbbDataIq&);
285  void ibbOpenIqReceived(const QXmppIbbOpenIq&);
286  void ibbResponseReceived(const QXmppIq&);
287  void streamInitiationIqReceived(const QXmppStreamInitiationIq&);
288  void streamInitiationResultReceived(const QXmppStreamInitiationIq&);
289  void streamInitiationSetReceived(const QXmppStreamInitiationIq&);
290  void socksServerSendOffer(QXmppTransferJob *job);
291 
292  friend class QXmppTransferManagerPrivate;
293 };
294 
295 Q_DECLARE_OPERATORS_FOR_FLAGS(QXmppTransferJob::Methods)
296 
297 #endif
qxmpp-0.7.6/doc/html/classQXmppCall.html0000644000175000007640000007766112116723632020123 0ustar sharkyjerryweb QXmpp: QXmppCall Class Reference

The QXmppCall class represents a Voice-Over-IP call to a remote party. More...

#include <QXmppCallManager.h>

Inheritance diagram for QXmppCall:
QXmppLoggable

Public Types

enum  Direction { IncomingDirection, OutgoingDirection }
 This enum is used to describe the direction of a call. More...
enum  State { ConnectingState = 0, ActiveState = 1, DisconnectingState = 2, FinishedState = 3 }
 This enum is used to describe the state of a call. More...

Public Slots

void accept ()
void hangup ()
void startVideo ()
 Starts sending video to the remote party.
void stopVideo ()
 Stops sending video to the remote party.

Signals

void connected ()
 This signal is emitted when a call is connected.
void finished ()
 This signal is emitted when a call is finished.
void ringing ()
 This signal is emitted when the remote party is ringing.
void stateChanged (QXmppCall::State state)
 This signal is emitted when the call state changes.
void audioModeChanged (QIODevice::OpenMode mode)
 This signal is emitted when the audio channel changes.
void videoModeChanged (QIODevice::OpenMode mode)
 This signal is emitted when the video channel changes.
- Signals inherited from QXmppLoggable
void setGauge (const QString &gauge, double value)
 Sets the given gauge to value.
void logMessage (QXmppLogger::MessageType type, const QString &msg)
 This signal is emitted to send logging messages.
void updateCounter (const QString &counter, qint64 amount=1)
 Updates the given counter by amount.

Public Member Functions

QXmppCall::Direction direction () const
QString jid () const
QString sid () const
QXmppCall::State state () const
QXmppRtpAudioChannelaudioChannel () const
QIODevice::OpenMode audioMode () const
QXmppRtpVideoChannelvideoChannel () const
QIODevice::OpenMode videoMode () const
- Public Member Functions inherited from QXmppLoggable
 QXmppLoggable (QObject *parent=0)

Properties

Direction direction
QString jid
State state
QIODevice::OpenMode audioMode
 Returns the audio mode.
QIODevice::OpenMode videoMode
 Returns the video mode.

Friends

class QXmppCallManager
class QXmppCallManagerPrivate
class QXmppCallPrivate

Additional Inherited Members

- Protected Member Functions inherited from QXmppLoggable
void debug (const QString &message)
void info (const QString &message)
void warning (const QString &message)
void logReceived (const QString &message)
void logSent (const QString &message)

Detailed Description

The QXmppCall class represents a Voice-Over-IP call to a remote party.

To get the QIODevice from which you can read / write audio samples, call audioChannel().

Note
THIS API IS NOT FINALIZED YET

Member Enumeration Documentation

This enum is used to describe the direction of a call.

Enumerator:
IncomingDirection 

The call is incoming.

OutgoingDirection 

The call is outgoing.

This enum is used to describe the state of a call.

Enumerator:
ConnectingState 

The call is being connected.

ActiveState 

The call is active.

DisconnectingState 

The call is being disconnected.

FinishedState 

The call is finished.

Member Function Documentation

void QXmppCall::accept ( )
slot

Call this method if you wish to accept an incoming call.

QXmppRtpAudioChannel * QXmppCall::audioChannel ( ) const

Returns the RTP channel for the audio data.

It acts as a QIODevice so that you can read / write audio samples, for instance using a QAudioOutput and a QAudioInput.

void QXmppCall::connected ( )
signal

This signal is emitted when a call is connected.

Once this signal is emitted, you can connect a QAudioOutput and QAudioInput to the call. You can determine the appropriate clockrate and the number of channels by calling payloadType().

void QXmppCall::finished ( )
signal

This signal is emitted when a call is finished.

Note: Do not delete the call in the slot connected to this signal, instead use deleteLater().

void QXmppCall::hangup ( )
slot

Hangs up the call.

QString QXmppCall::sid ( ) const

Returns the call's session identifier.

QXmppRtpVideoChannel * QXmppCall::videoChannel ( ) const

Returns the RTP channel for the video data.

Property Documentation

QXmppCall::Direction QXmppCall::direction
read

Returns the call's direction.

QString QXmppCall::jid
read

Returns the remote party's JID.

QXmppCall::State QXmppCall::state
read

Returns the call's state.

See Also
stateChanged()

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppRosterManager.png0000644000175000007640000000165612116723632021630 0ustar sharkyjerrywebPNG  IHDRM$PLTEutRNST2=IDATx E/3yGnb ئ-Ѯ/%%I6QH$_hi$Z]^y>i$IAhĘ+dj%Iޢ(SUciߣi C3M4շ=R Wk\H'7ӛ̩5ËrOpƼJԁ+Caa~oB\t{Vj~[l:\F|o$ IMJ)"/vي^4V _A+h| 4W _A+h|4qۈ` ќ=}N`Tn~?z6F4~JәXNK.^א4yεE} 3M|DW*7ΏK,49E9IIENDB`qxmpp-0.7.6/doc/html/functions_func_0x71.html0000644000175000007640000003155612116723632021027 0ustar sharkyjerryweb QXmpp: Class Members - Functions
QXmpp  Version:0.7.6
 

- q -

qxmpp-0.7.6/doc/html/functions_func_0x75.html0000644000175000007640000002112712116723632021024 0ustar sharkyjerryweb QXmpp: Class Members - Functions
QXmpp  Version:0.7.6
 

- u -

qxmpp-0.7.6/doc/html/classQXmppLogger-members.html0000644000175000007640000003171312116723632022103 0ustar sharkyjerryweb QXmpp: Member List
QXmppLogger Member List

This is the complete list of members for QXmppLogger, including all inherited members.

AnyMessage enum valueQXmppLogger
DebugMessage enum valueQXmppLogger
FileLogging enum valueQXmppLogger
getLogger()QXmppLoggerstatic
InformationMessage enum valueQXmppLogger
log(QXmppLogger::MessageType type, const QString &text)QXmppLoggerslot
logFilePathQXmppLogger
logFilePath() (defined in QXmppLogger)QXmppLogger
loggingTypeQXmppLogger
loggingType() (defined in QXmppLogger)QXmppLogger
LoggingType enum nameQXmppLogger
message(QXmppLogger::MessageType type, const QString &text)QXmppLoggersignal
MessageType enum nameQXmppLogger
messageTypesQXmppLogger
messageTypes() (defined in QXmppLogger)QXmppLogger
NoLogging enum valueQXmppLogger
NoMessage enum valueQXmppLogger
QXmppLogger(QObject *parent=0)QXmppLogger
ReceivedMessage enum valueQXmppLogger
reopen()QXmppLoggerslot
SentMessage enum valueQXmppLogger
setGauge(const QString &gauge, double value)QXmppLoggervirtualslot
setLogFilePath(const QString &path)QXmppLogger
setLoggingType(QXmppLogger::LoggingType type)QXmppLogger
setMessageTypes(QXmppLogger::MessageTypes types)QXmppLogger
SignalLogging enum valueQXmppLogger
StdoutLogging enum valueQXmppLogger
updateCounter(const QString &counter, qint64 amount)QXmppLoggervirtualslot
WarningMessage enum valueQXmppLogger
~QXmppLogger() (defined in QXmppLogger)QXmppLogger
qxmpp-0.7.6/doc/html/classQXmppTransferManager.html0000644000175000007640000006753312116723632022324 0ustar sharkyjerryweb QXmpp: QXmppTransferManager Class Reference

The QXmppTransferManager class provides support for sending and receiving files. More...

#include <QXmppTransferManager.h>

Inheritance diagram for QXmppTransferManager:
QXmppClientExtension QXmppLoggable

Public Slots

QXmppTransferJobsendFile (const QString &jid, const QString &filePath, const QString &description=QString())
QXmppTransferJobsendFile (const QString &jid, QIODevice *device, const QXmppTransferFileInfo &fileInfo, const QString &sid=QString())

Signals

void fileReceived (QXmppTransferJob *job)
void jobStarted (QXmppTransferJob *job)
 This signal is emitted whenever a transfer job is started.
void jobFinished (QXmppTransferJob *job)

Public Member Functions

 QXmppTransferManager ()
QString proxy () const
void setProxy (const QString &proxyJid)
bool proxyOnly () const
void setProxyOnly (bool proxyOnly)
QXmppTransferJob::Methods supportedMethods () const
void setSupportedMethods (QXmppTransferJob::Methods methods)
- Public Member Functions inherited from QXmppClientExtension
 QXmppClientExtension ()
virtual ~QXmppClientExtension ()
virtual QStringList discoveryFeatures () const
virtual QList
< QXmppDiscoveryIq::Identity > 
discoveryIdentities () const
virtual bool handleStanza (const QDomElement &stanza)=0
 You need to implement this method to process incoming XMPP stanzas.
- Public Member Functions inherited from QXmppLoggable
 QXmppLoggable (QObject *parent=0)

Properties

QString proxy
bool proxyOnly
QXmppTransferJob::Methods supportedMethods

Friends

class QXmppTransferManagerPrivate

Additional Inherited Members

- Protected Member Functions inherited from QXmppClientExtension
QXmppClientclient ()
virtual void setClient (QXmppClient *client)

Detailed Description

The QXmppTransferManager class provides support for sending and receiving files.

Stream initiation is performed as described in XEP-0095: Stream Initiation and XEP-0096: SI File Transfer. The actual file transfer is then performed using either XEP-0065: SOCKS5 Bytestreams or XEP-0047: In-Band Bytestreams.

To make use of this manager, you need to instantiate it and load it into the QXmppClient instance as follows:

Constructor & Destructor Documentation

QXmppTransferManager::QXmppTransferManager ( )

Constructs a QXmppTransferManager to handle incoming and outgoing file transfers.

Member Function Documentation

void QXmppTransferManager::fileReceived ( QXmppTransferJob job)
signal

This signal is emitted when a new file transfer offer is received.

To accept the transfer job, call the job's QXmppTransferJob::accept() method. To refuse the transfer job, call the job's QXmppTransferJob::abort() method.

void QXmppTransferManager::jobFinished ( QXmppTransferJob job)
signal

This signal is emitted whenever a transfer job is finished.

See Also
QXmppTransferJob::finished()
QXmppTransferJob * QXmppTransferManager::sendFile ( const QString &  jid,
const QString &  filePath,
const QString &  description = QString() 
)
slot

Send file to a remote party.

The remote party will be given the choice to accept or refuse the transfer.

QXmppTransferJob * QXmppTransferManager::sendFile ( const QString &  jid,
QIODevice *  device,
const QXmppTransferFileInfo &  fileInfo,
const QString &  sid = QString() 
)
slot

Send file to a remote party.

The remote party will be given the choice to accept or refuse the transfer.

void QXmppTransferManager::setProxy ( const QString &  proxyJid)

Set the JID of the SOCKS5 bytestream proxy to use for outgoing transfers.

If you set a proxy, when you send a file the proxy will be offered to the recipient in addition to your own IP addresses.

void QXmppTransferManager::setProxyOnly ( bool  proxyOnly)

Set whether the proxy should systematically be used for outgoing SOCKS5 bytestream transfers.

Note
If you set this to true and do not provide a proxy using setProxy(), your outgoing transfers will fail!
void QXmppTransferManager::setSupportedMethods ( QXmppTransferJob::Methods  methods)

Set the supported stream methods. This allows you to selectively enable or disable stream methods (In-Band or SOCKS5 bytestreams).

The methods argument is a combination of zero or more QXmppTransferJob::Method.

Property Documentation

QString QXmppTransferManager::proxy
readwrite

Return the JID of the bytestream proxy to use for outgoing transfers.

bool QXmppTransferManager::proxyOnly
readwrite

Return whether the proxy will systematically be used for outgoing SOCKS5 bytestream transfers.

QXmppTransferJob::Methods QXmppTransferManager::supportedMethods
readwrite

Return the supported stream methods.

The methods are a combination of zero or more QXmppTransferJob::Method.


The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/QXmppBookmarkManager_8h_source.html0000644000175000007640000003522412116723632023226 0ustar sharkyjerryweb QXmpp: QXmppBookmarkManager.h Source File
QXmpp  Version:0.7.6
QXmppBookmarkManager.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Jeremy Lainé
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXMPPBOOKMARKMANAGER_H
25 #define QXMPPBOOKMARKMANAGER_H
26 
27 #include <QUrl>
28 
29 #include "QXmppClientExtension.h"
30 
31 class QXmppBookmarkManagerPrivate;
32 class QXmppBookmarkSet;
33 
37 
38 class QXMPP_EXPORT QXmppBookmarkManager : public QXmppClientExtension
39 {
40  Q_OBJECT
41 
42 public:
45 
46  bool areBookmarksReceived() const;
47  QXmppBookmarkSet bookmarks() const;
48  bool setBookmarks(const QXmppBookmarkSet &bookmarks);
49 
51  bool handleStanza(const QDomElement &stanza);
53 
54 signals:
56  void bookmarksReceived(const QXmppBookmarkSet &bookmarks);
57 
58 protected:
60  void setClient(QXmppClient* client);
62 
63 private slots:
64  void slotConnected();
65  void slotDisconnected();
66 
67 private:
68  QXmppBookmarkManagerPrivate * const d;
69 };
70 
71 #endif
qxmpp-0.7.6/doc/html/ftv2doc.png0000644000175000007640000000135212116723632016403 0ustar sharkyjerrywebPNG  IHDR}\IDATxMOS[sa?-XZ(PD4 AWbu`b 77wHFCԁ/`voAPqP@ 980 +y^Z9SW\83g3'Nçl_bpV"ֆXd]3xM[1W *PGz/Eg{ aoV:这1$RW,@56-,m/蹖 r5T*S(Vf89u գwa=<{ҡUr+dDF$`zNܮ0Q3~_^N=vpTLT}kqm<?ZhX_ݥ[) `ga_*2`'=F2EP l=8Wv%THqɿ<"GxH{#֫aJmKsVءM^ T ݛr߽m_?Wİ#uIENDB`qxmpp-0.7.6/doc/html/classQXmppPasswordReply.html0000644000175000007640000003603612116723632022055 0ustar sharkyjerryweb QXmpp: QXmppPasswordReply Class Reference
QXmppPasswordReply Class Reference

The QXmppPasswordReply class represents a password reply. More...

#include <QXmppPasswordChecker.h>

Public Types

enum  Error { NoError = 0, AuthorizationError, TemporaryError }
 This enum is used to describe authentication errors.

Public Slots

void finish ()
 Mark reply as finished.
void finishLater ()
 Delay marking reply as finished.

Signals

void finished ()
 This signal is emitted when the reply has finished.

Public Member Functions

 QXmppPasswordReply (QObject *parent=0)
QByteArray digest () const
 Returns the received MD5 digest.
void setDigest (const QByteArray &digest)
QString password () const
 Returns the received password.
void setPassword (const QString &password)
QXmppPasswordReply::Error error () const
void setError (QXmppPasswordReply::Error error)
bool isFinished () const
 Returns true when the reply has finished.

Detailed Description

The QXmppPasswordReply class represents a password reply.

Constructor & Destructor Documentation

QXmppPasswordReply::QXmppPasswordReply ( QObject *  parent = 0)

Constructs a new QXmppPasswordReply.

Parameters
parent

Member Function Documentation

QXmppPasswordReply::Error QXmppPasswordReply::error ( ) const

Returns the error that was found during the processing of this request.

If no error was found, returns NoError.

void QXmppPasswordReply::setDigest ( const QByteArray &  digest)

Sets the received MD5 digest.

Parameters
digest
void QXmppPasswordReply::setError ( QXmppPasswordReply::Error  error)

Returns the error that was found during the processing of this request.

void QXmppPasswordReply::setPassword ( const QString &  password)

Sets the received password.

Parameters
password

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppServer.html0000644000175000007640000010401612116723632020477 0ustar sharkyjerryweb QXmpp: QXmppServer Class Reference

The QXmppServer class represents an XMPP server. More...

#include <QXmppServer.h>

Inheritance diagram for QXmppServer:
QXmppLoggable

Public Slots

void handleElement (const QDomElement &element)
 Handle an incoming XML element.

Signals

void clientConnected (const QString &jid)
 This signal is emitted when a client has connected.
void clientDisconnected (const QString &jid)
 This signal is emitted when a client has disconnected.
void loggerChanged (QXmppLogger *logger)
 This signal is emitted when the logger changes.
- Signals inherited from QXmppLoggable
void setGauge (const QString &gauge, double value)
 Sets the given gauge to value.
void logMessage (QXmppLogger::MessageType type, const QString &msg)
 This signal is emitted to send logging messages.
void updateCounter (const QString &counter, qint64 amount=1)
 Updates the given counter by amount.

Public Member Functions

 QXmppServer (QObject *parent=0)
 ~QXmppServer ()
void addExtension (QXmppServerExtension *extension)
QList< QXmppServerExtension * > extensions ()
QString domain () const
void setDomain (const QString &domain)
QXmppLoggerlogger ()
void setLogger (QXmppLogger *logger)
QXmppPasswordCheckerpasswordChecker ()
void setPasswordChecker (QXmppPasswordChecker *checker)
QVariantMap statistics () const
 Returns the statistics for the server.
void addCaCertificates (const QString &caCertificates)
void setLocalCertificate (const QString &path)
void setPrivateKey (const QString &path)
void close ()
bool listenForClients (const QHostAddress &address=QHostAddress::Any, quint16 port=5222)
bool listenForServers (const QHostAddress &address=QHostAddress::Any, quint16 port=5269)
bool sendElement (const QDomElement &element)
bool sendPacket (const QXmppStanza &stanza)
void addIncomingClient (QXmppIncomingClient *stream)
- Public Member Functions inherited from QXmppLoggable
 QXmppLoggable (QObject *parent=0)

Properties

QXmppLogger logger

Friends

class QXmppServerPrivate

Additional Inherited Members

- Protected Member Functions inherited from QXmppLoggable
void debug (const QString &message)
void info (const QString &message)
void warning (const QString &message)
void logReceived (const QString &message)
void logSent (const QString &message)

Detailed Description

The QXmppServer class represents an XMPP server.

It provides support for both client-to-server and server-to-server communications, SSL encryption and logging facilities.

QXmppServer comes with a number of modules for service discovery, XMPP ping, statistics and file transfer proxy support. You can write your own extensions for QXmppServer by subclassing QXmppServerExtension.

Constructor & Destructor Documentation

QXmppServer::QXmppServer ( QObject *  parent = 0)

Constructs a new XMPP server instance.

Parameters
parent
QXmppServer::~QXmppServer ( )

Destroys an XMPP server instance.

Member Function Documentation

void QXmppServer::addCaCertificates ( const QString &  path)

Sets the path for additional SSL CA certificates.

Parameters
path
void QXmppServer::addExtension ( QXmppServerExtension extension)

Registers a new extension with the server.

Parameters
extension
void QXmppServer::addIncomingClient ( QXmppIncomingClient stream)

Add a new incoming client stream.

This method can be used for instance to implement BOSH support as a server extension.

void QXmppServer::close ( )

Closes the server.

QString QXmppServer::domain ( ) const

Returns the server's domain.

QList< QXmppServerExtension * > QXmppServer::extensions ( )

Returns the list of loaded extensions.

bool QXmppServer::listenForClients ( const QHostAddress &  address = QHostAddress::Any,
quint16  port = 5222 
)

Listen for incoming XMPP client connections.

Parameters
address
port
bool QXmppServer::listenForServers ( const QHostAddress &  address = QHostAddress::Any,
quint16  port = 5269 
)

Listen for incoming XMPP server connections.

Parameters
address
port
QXmppPasswordChecker * QXmppServer::passwordChecker ( )

Returns the password checker used to verify client credentials.

bool QXmppServer::sendElement ( const QDomElement &  element)

Route an XMPP stanza.

Parameters
element
bool QXmppServer::sendPacket ( const QXmppStanza packet)

Route an XMPP packet.

Parameters
packet
void QXmppServer::setDomain ( const QString &  domain)

Sets the server's domain.

Parameters
domain
void QXmppServer::setLocalCertificate ( const QString &  path)

Sets the path for the local SSL certificate.

Parameters
path
void QXmppServer::setLogger ( QXmppLogger logger)

Sets the QXmppLogger associated with the server.

Parameters
logger
void QXmppServer::setPasswordChecker ( QXmppPasswordChecker checker)

Sets the password checker used to verify client credentials.

Parameters
checker
void QXmppServer::setPrivateKey ( const QString &  path)

Sets the path for the local SSL private key.

Parameters
path

Property Documentation

QXmppLogger * QXmppServer::logger
readwrite

Returns the QXmppLogger associated with the server.


The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppMucManager-members.html0000644000175000007640000002751612116723632022711 0ustar sharkyjerryweb QXmpp: Member List
QXmppMucManager Member List

This is the complete list of members for QXmppMucManager, including all inherited members.

addRoom(const QString &roomJid)QXmppMucManager
client()QXmppClientExtensionprotected
debug(const QString &message)QXmppLoggableinlineprotected
discoveryFeatures() const QXmppClientExtensionvirtual
discoveryIdentities() const QXmppClientExtensionvirtual
handleStanza(const QDomElement &stanza)=0QXmppClientExtensionpure virtual
info(const QString &message)QXmppLoggableinlineprotected
invitationReceived(const QString &roomJid, const QString &inviter, const QString &reason)QXmppMucManagersignal
logMessage(QXmppLogger::MessageType type, const QString &msg)QXmppLoggablesignal
logReceived(const QString &message)QXmppLoggableinlineprotected
logSent(const QString &message)QXmppLoggableinlineprotected
QXmppClientExtension()QXmppClientExtension
QXmppLoggable(QObject *parent=0)QXmppLoggable
QXmppMucManager()QXmppMucManager
roomAdded(QXmppMucRoom *room)QXmppMucManagersignal
roomsQXmppMucManager
rooms() const (defined in QXmppMucManager)QXmppMucManager
setClient(QXmppClient *client)QXmppClientExtensionprotectedvirtual
setGauge(const QString &gauge, double value)QXmppLoggablesignal
updateCounter(const QString &counter, qint64 amount=1)QXmppLoggablesignal
warning(const QString &message)QXmppLoggableinlineprotected
~QXmppClientExtension()QXmppClientExtensionvirtual
~QXmppMucManager()QXmppMucManager
qxmpp-0.7.6/doc/html/QXmppStreamFeatures_8h_source.html0000644000175000007640000003447012116723632023122 0ustar sharkyjerryweb QXmpp: QXmppStreamFeatures.h Source File
QXmpp  Version:0.7.6
QXmppStreamFeatures.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Jeremy Lainé
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXMPPSTREAMFEATURES_H
25 #define QXMPPSTREAMFEATURES_H
26 
27 #include "QXmppStanza.h"
28 
29 class QXMPP_EXPORT QXmppStreamFeatures : public QXmppStanza
30 {
31 public:
32  QXmppStreamFeatures();
33 
34  enum Mode
35  {
36  Disabled = 0,
37  Enabled,
38  Required
39  };
40 
41  Mode bindMode() const;
42  void setBindMode(Mode mode);
43 
44  Mode sessionMode() const;
45  void setSessionMode(Mode mode);
46 
47  Mode nonSaslAuthMode() const;
48  void setNonSaslAuthMode(Mode mode);
49 
50  QStringList authMechanisms() const;
51  void setAuthMechanisms(const QStringList &mechanisms);
52 
53  QStringList compressionMethods() const;
54  void setCompressionMethods(const QStringList &methods);
55 
56  Mode tlsMode() const;
57  void setTlsMode(Mode mode);
58 
60  void parse(const QDomElement &element);
61  void toXml(QXmlStreamWriter *writer) const;
63 
64  static bool isStreamFeatures(const QDomElement &element);
65 
66 private:
67  Mode m_bindMode;
68  Mode m_sessionMode;
69  Mode m_nonSaslAuthMode;
70  Mode m_tlsMode;
71  QStringList m_authMechanisms;
72  QStringList m_compressionMethods;
73 };
74 
75 #endif
qxmpp-0.7.6/doc/html/classQXmppCall.png0000644000175000007640000000077412116723632017732 0ustar sharkyjerrywebPNG  IHDRjPnPLTEutRNST2IDATx]0FOȌ_%iBʼnwj?Іp R}%Lj,"2Bq;4O"":^YȆj9FuM-o[Nc[E2tYͲmլARGVuWtVUmsqdM`C}*/Hw*=9u2""G}L.@=ZW$DDDYT9u=hHXQ?:(P @8(P T;RJiH#(j9Yjdx|j9%[*W+FULosjTf߲T-u]GMW({UbSL`Cח|X%~'pp/32)P R?!HIENDB`qxmpp-0.7.6/doc/html/classQXmppOutgoingServer.png0000644000175000007640000000161012116723632022027 0ustar sharkyjerrywebPNG  IHDR?|PLTEutRNST2IDATxr F3K~V٘e:zXE/1ƸDIZ$ $ [(<[LWtξۖPyF_$xd5)6%ZVtP2Ic$$V ~=}UC]v* }A(>{֜P^|"tp5rAaYۻLf{\}HOw$]G2TgsK IŊB1ƸXՄŌVze2p! p! p! p! p! B1ƸDIZ$ $+BbsrC$\j2oF+m~X(w_dyJJGB۱t!i,YByH|&zt(?!IS JBkxP68C|ip"4$R^; Rw\e[$aKq!I$Y$Y(c p XMXh5ZF .q! p! p! p! p! p!+B+AXp!Nh[[U+?Є̫0}vj*ԅƳ'C(-K4u鮝LQ(j&T*_R%1V ٮ֪P+N2`v2ZНB9[uN(C!C*gKe|k0[Ct2?NC.*ݚ?첺V +oq1٧&ٻ;` > ? X(B  ;x|IENDB`qxmpp-0.7.6/doc/html/functions_func_0x6a.html0000644000175000007640000002156312116723632021103 0ustar sharkyjerryweb QXmpp: Class Members - Functions
QXmpp  Version:0.7.6
 

- j -

qxmpp-0.7.6/doc/html/QXmppMessageReceiptManager_8h_source.html0000644000175000007640000002724212116723632024362 0ustar sharkyjerryweb QXmpp: QXmppMessageReceiptManager.h Source File
QXmpp  Version:0.7.6
QXmppMessageReceiptManager.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Authors:
5  * Georg Rudoy
6  * Jeremy Lainé
7  *
8  * Source:
9  * http://code.google.com/p/qxmpp
10  *
11  * This file is a part of QXmpp library.
12  *
13  * This library is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU Lesser General Public
15  * License as published by the Free Software Foundation; either
16  * version 2.1 of the License, or (at your option) any later version.
17  *
18  * This library is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21  * Lesser General Public License for more details.
22  *
23  */
24 
25 #ifndef QXMPPMESSAGERECEIPTMANAGER_H
26 #define QXMPPMESSAGERECEIPTMANAGER_H
27 
28 #include "QXmppClientExtension.h"
29 
35 
37 {
38  Q_OBJECT
39 public:
41 
43  virtual QStringList discoveryFeatures() const;
44  virtual bool handleStanza(const QDomElement &stanza);
46 
47 signals:
51  void messageDelivered(const QString &jid, const QString &id);
52 };
53 
54 #endif // QXMPPMESSAGERECEIPTMANAGER_H
qxmpp-0.7.6/doc/html/classQXmppOutgoingServer.html0000644000175000007640000006135712116723632022225 0ustar sharkyjerryweb QXmpp: QXmppOutgoingServer Class Reference
QXmppOutgoingServer Class Reference

The QXmppOutgoingServer class represents an outgoing XMPP stream to another XMPP server. More...

#include <QXmppOutgoingServer.h>

Inheritance diagram for QXmppOutgoingServer:
QXmppStream QXmppLoggable

Public Slots

void connectToHost (const QString &domain)
void queueData (const QByteArray &data)
- Public Slots inherited from QXmppStream
virtual void disconnectFromHost ()
virtual bool sendData (const QByteArray &)

Signals

void dialbackResponseReceived (const QXmppDialback &response)
 This signal is emitted when a dialback verify response is received.
- Signals inherited from QXmppStream
void connected ()
 This signal is emitted when the stream is connected.
void disconnected ()
 This signal is emitted when the stream is disconnected.
- Signals inherited from QXmppLoggable
void setGauge (const QString &gauge, double value)
 Sets the given gauge to value.
void logMessage (QXmppLogger::MessageType type, const QString &msg)
 This signal is emitted to send logging messages.
void updateCounter (const QString &counter, qint64 amount=1)
 Updates the given counter by amount.

Public Member Functions

 QXmppOutgoingServer (const QString &domain, QObject *parent)
 ~QXmppOutgoingServer ()
bool isConnected () const
QString localStreamKey () const
 Returns the stream's local dialback key.
void setLocalStreamKey (const QString &key)
void setVerify (const QString &id, const QString &key)
QString remoteDomain () const
 Returns the remote server's domain.
- Public Member Functions inherited from QXmppStream
 QXmppStream (QObject *parent)
 ~QXmppStream ()
 Destroys a base XMPP stream.
bool sendPacket (const QXmppStanza &)
- Public Member Functions inherited from QXmppLoggable
 QXmppLoggable (QObject *parent=0)

Additional Inherited Members

- Protected Member Functions inherited from QXmppStream
QSslSocket * socket () const
void setSocket (QSslSocket *socket)
virtual void handleStart ()
virtual void handleStanza (const QDomElement &element)=0
virtual void handleStream (const QDomElement &element)=0

Detailed Description

The QXmppOutgoingServer class represents an outgoing XMPP stream to another XMPP server.

Constructor & Destructor Documentation

QXmppOutgoingServer::QXmppOutgoingServer ( const QString &  domain,
QObject *  parent 
)

Constructs a new outgoing server-to-server stream.

Parameters
domainthe local domain
parentthe parent object
QXmppOutgoingServer::~QXmppOutgoingServer ( )

Destroys the stream.

Member Function Documentation

void QXmppOutgoingServer::connectToHost ( const QString &  domain)
slot

Attempts to connect to an XMPP server for the specified domain.

Parameters
domain
bool QXmppOutgoingServer::isConnected ( ) const
virtual

Returns true if the socket is connected and authentication succeeded.

Reimplemented from QXmppStream.

void QXmppOutgoingServer::queueData ( const QByteArray &  data)
slot

Sends or queues data until connected.

Parameters
data
void QXmppOutgoingServer::setLocalStreamKey ( const QString &  key)

Sets the stream's local dialback key.

Parameters
key
void QXmppOutgoingServer::setVerify ( const QString &  id,
const QString &  key 
)

Sets the stream's verification information.

Parameters
id
key

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppDataForm.html0000644000175000007640000005121712116723632020732 0ustar sharkyjerryweb QXmpp: QXmppDataForm Class Reference
QXmppDataForm Class Reference

The QXmppDataForm class represents a data form as defined by XEP-0004: Data Forms. More...

#include <QXmppDataForm.h>

Classes

class  Field
 The QXmppDataForm::Field class represents a data form field as defined by XEP-0004: Data Forms. More...
class  Media
 The QXmppDataForm::Media class represents a media field as defined by XEP-0221: Data Forms Media Element. More...

Public Types

enum  Type {
  None, Form, Submit, Cancel,
  Result
}
 This enum is used to describe a form's type. More...

Public Member Functions

 QXmppDataForm (QXmppDataForm::Type type=QXmppDataForm::None)
 Constructs a QXmppDataForm of the specified type.
 QXmppDataForm (const QXmppDataForm &other)
 Constructs a copy of other.
 ~QXmppDataForm ()
 Destroys the form.
QXmppDataFormoperator= (const QXmppDataForm &other)
 Assigns other to this form.
QString instructions () const
 Returns the form's instructions.
void setInstructions (const QString &instructions)
QList< Fieldfields () const
 Returns the form's fields.
QList< Field > & fields ()
 Returns the form's fields by reference.
void setFields (const QList< QXmppDataForm::Field > &fields)
QString title () const
 Returns the form's title.
void setTitle (const QString &title)
QXmppDataForm::Type type () const
 Returns the form's type.
void setType (QXmppDataForm::Type type)
bool isNull () const
 Returns true if the form has an unknown type.

Detailed Description

The QXmppDataForm class represents a data form as defined by XEP-0004: Data Forms.

Member Enumeration Documentation

This enum is used to describe a form's type.

Enumerator:
None 

Unknown form type.

Form 

The form-processing entity is asking the form-submitting entity to complete a form.

Submit 

The form-submitting entity is submitting data to the form-processing entity.

Cancel 

The form-submitting entity has cancelled submission of data to the form-processing entity.

Result 

The form-processing entity is returning data (e.g., search results) to the form-submitting entity, or the data is a generic data set.

Member Function Documentation

void QXmppDataForm::setFields ( const QList< QXmppDataForm::Field > &  fields)

Sets the form's fields.

Parameters
fields
void QXmppDataForm::setInstructions ( const QString &  instructions)

Sets the form's instructions.

Parameters
instructions
void QXmppDataForm::setTitle ( const QString &  title)

Sets the form's title.

Parameters
title
void QXmppDataForm::setType ( QXmppDataForm::Type  type)

Sets the form's type.

Parameters
type

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppVCardIq.html0000644000175000007640000012344212116723632020526 0ustar sharkyjerryweb QXmpp: QXmppVCardIq Class Reference
QXmppVCardIq Class Reference

Represents the XMPP vCard. More...

#include <QXmppVCardIq.h>

Inheritance diagram for QXmppVCardIq:
QXmppIq QXmppStanza

Public Member Functions

 QXmppVCardIq (const QString &bareJid="")
 QXmppVCardIq (const QXmppVCardIq &other)
 Constructs a copy of other.
QXmppVCardIqoperator= (const QXmppVCardIq &other)
 Assigns other to this vCard IQ.
QDate birthday () const
void setBirthday (const QDate &birthday)
QString description () const
 Returns the free-form descriptive text.
void setDescription (const QString &description)
 Sets the free-form descriptive text.
QString email () const
void setEmail (const QString &)
QString firstName () const
void setFirstName (const QString &)
QString fullName () const
void setFullName (const QString &)
QString lastName () const
void setLastName (const QString &)
QString middleName () const
void setMiddleName (const QString &)
QString nickName () const
void setNickName (const QString &)
QByteArray photo () const
void setPhoto (const QByteArray &)
 Sets the photo's binary contents.
QString photoType () const
 Returns the photo's MIME type.
void setPhotoType (const QString &type)
 Sets the photo's MIME type.
QString url () const
void setUrl (const QString &)
QList< QXmppVCardAddressaddresses () const
 Returns the addresses.
void setAddresses (const QList< QXmppVCardAddress > &addresses)
 Sets the addresses.
QList< QXmppVCardEmailemails () const
 Returns the e-mail addresses.
void setEmails (const QList< QXmppVCardEmail > &emails)
 Sets the e-mail addresses.
QList< QXmppVCardPhonephones () const
 Returns the phone numbers.
void setPhones (const QList< QXmppVCardPhone > &phones)
 Sets the phone numbers.
- Public Member Functions inherited from QXmppIq
 QXmppIq (QXmppIq::Type type=QXmppIq::Get)
 QXmppIq (const QXmppIq &other)
 Constructs a copy of other.
QXmppIqoperator= (const QXmppIq &other)
 Assigns other to this IQ.
QXmppIq::Type type () const
void setType (QXmppIq::Type)
- Public Member Functions inherited from QXmppStanza
 QXmppStanza (const QString &from=QString(), const QString &to=QString())
 QXmppStanza (const QXmppStanza &other)
 Constructs a copy of other.
virtual ~QXmppStanza ()
 Destroys a QXmppStanza.
QXmppStanzaoperator= (const QXmppStanza &other)
 Assigns other to this stanza.
QString to () const
void setTo (const QString &)
QString from () const
 Returns the stanza's sender JID.
void setFrom (const QString &)
QString id () const
 Returns the stanza's identifier.
void setId (const QString &)
QString lang () const
 Returns the stanza's language.
void setLang (const QString &)
QXmppStanza::Error error () const
 Returns the stanza's error.
void setError (const QXmppStanza::Error &error)
QXmppElementList extensions () const
void setExtensions (const QXmppElementList &elements)
QList< QXmppExtendedAddressextendedAddresses () const
void setExtendedAddresses (const QList< QXmppExtendedAddress > &extendedAddresses)

Additional Inherited Members

- Public Types inherited from QXmppIq
enum  Type { Error = 0, Get, Set, Result }
 This enum describes the type of IQ. More...

Detailed Description

Represents the XMPP vCard.

The functions names are self explanatory. Look at QXmppVCardManager and XEP-0054: vcard-temp for more details.

There are many field of XMPP vCard which are not present in this class. File a issue for the same. We will add the requested field to this class.

Constructor & Destructor Documentation

QXmppVCardIq::QXmppVCardIq ( const QString &  jid = "")

Constructs a QXmppVCardIq for the specified recipient.

Parameters
jid

Member Function Documentation

QDate QXmppVCardIq::birthday ( ) const

Returns the date of birth of the individual associated with the vCard.

QString QXmppVCardIq::email ( ) const

Returns the email address.

QString QXmppVCardIq::firstName ( ) const

Returns the first name.

QString QXmppVCardIq::fullName ( ) const

Returns the full name.

QString QXmppVCardIq::lastName ( ) const

Returns the last name.

QString QXmppVCardIq::middleName ( ) const

Returns the middle name.

QString QXmppVCardIq::nickName ( ) const

Returns the nickname.

QByteArray QXmppVCardIq::photo ( ) const

Returns the photo's binary contents.

If you want to use the photo as a QImage you can use:

QBuffer buffer;
buffer.setData(myCard.photo());
buffer.open(QIODevice::ReadOnly);
QImageReader imageReader(&buffer);
QImage myImage = imageReader.read();
void QXmppVCardIq::setBirthday ( const QDate &  birthday)

Sets the date of birth of the individual associated with the vCard.

Parameters
birthday
void QXmppVCardIq::setEmail ( const QString &  email)

Sets the email address.

Parameters
email
void QXmppVCardIq::setFirstName ( const QString &  firstName)

Sets the first name.

Parameters
firstName
void QXmppVCardIq::setFullName ( const QString &  fullName)

Sets the full name.

Parameters
fullName
void QXmppVCardIq::setLastName ( const QString &  lastName)

Sets the last name.

Parameters
lastName
void QXmppVCardIq::setMiddleName ( const QString &  middleName)

Sets the middle name.

Parameters
middleName
void QXmppVCardIq::setNickName ( const QString &  nickName)

Sets the nickname.

Parameters
nickName
void QXmppVCardIq::setUrl ( const QString &  url)

Sets the URL associated with the vCard. It can represent the user's homepage or a location at which you can find real-time information about the vCard.

Parameters
url
QString QXmppVCardIq::url ( ) const

Returns the URL associated with the vCard. It can represent the user's homepage or a location at which you can find real-time information about the vCard.


The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/tabs.css0000644000175000007640000000221312116723632015766 0ustar sharkyjerryweb.tabs, .tabs2, .tabs3 { background-image: url('tab_b.png'); width: 100%; z-index: 101; font-size: 13px; font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; } .tabs2 { font-size: 10px; } .tabs3 { font-size: 9px; } .tablist { margin: 0; padding: 0; display: table; } .tablist li { float: left; display: table-cell; background-image: url('tab_b.png'); line-height: 36px; list-style: none; } .tablist a { display: block; padding: 0 20px; font-weight: bold; background-image:url('tab_s.png'); background-repeat:no-repeat; background-position:right; color: #283A5D; text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); text-decoration: none; outline: none; } .tabs3 .tablist a { padding: 0 10px; } .tablist a:hover { background-image: url('tab_h.png'); background-repeat:repeat-x; color: #fff; text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); text-decoration: none; } .tablist li.current a { background-image: url('tab_a.png'); background-repeat:repeat-x; color: #fff; text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); } qxmpp-0.7.6/doc/html/QXmppIncomingServer_8h_source.html0000644000175000007640000003573312116723632023125 0ustar sharkyjerryweb QXmpp: QXmppIncomingServer.h Source File
QXmpp  Version:0.7.6
QXmppIncomingServer.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Jeremy Lainé
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXMPPINCOMINGSERVER_H
25 #define QXMPPINCOMINGSERVER_H
26 
27 #include "QXmppStream.h"
28 
29 class QXmppDialback;
30 class QXmppIncomingServerPrivate;
32 
36 
37 class QXMPP_EXPORT QXmppIncomingServer : public QXmppStream
38 {
39  Q_OBJECT
40 
41 public:
42  QXmppIncomingServer(QSslSocket *socket, const QString &domain, QObject *parent);
44 
45  bool isConnected() const;
46  QString localStreamId() const;
47 
48 signals:
50  void dialbackRequestReceived(const QXmppDialback &result);
51 
53  void elementReceived(const QDomElement &element);
54 
55 protected:
57  void handleStanza(const QDomElement &stanzaElement);
58  void handleStream(const QDomElement &streamElement);
60 
61 private slots:
62  void slotDialbackResponseReceived(const QXmppDialback &dialback);
63  void slotSocketDisconnected();
64 
65 private:
66  Q_DISABLE_COPY(QXmppIncomingServer)
67  QXmppIncomingServerPrivate* d;
68  friend class QXmppIncomingServerPrivate;
69 };
70 
71 #endif
qxmpp-0.7.6/doc/html/QXmppEntityTimeIq_8h_source.html0000644000175000007640000002777612116723632022570 0ustar sharkyjerryweb QXmpp: QXmppEntityTimeIq.h Source File
QXmpp  Version:0.7.6
QXmppEntityTimeIq.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Manjeet Dahiya
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 
25 #ifndef QXMPPENTITYTIMEIQ_H
26 #define QXMPPENTITYTIMEIQ_H
27 
28 #include <QDateTime>
29 
30 #include "QXmppIq.h"
31 
33 
34 class QXMPP_EXPORT QXmppEntityTimeIq : public QXmppIq
35 {
36 public:
37  int tzo() const;
38  void setTzo(int tzo);
39 
40  QDateTime utc() const;
41  void setUtc(const QDateTime &utc);
42 
43  static bool isEntityTimeIq(const QDomElement &element);
44 
45 protected:
47  void parseElementFromChild(const QDomElement &element);
48  void toXmlElementFromChild(QXmlStreamWriter *writer) const;
50 
51 private:
52  int m_tzo;
53  QDateTime m_utc;
54 };
55 
56 #endif //QXMPPENTITYTIMEIQ_H
qxmpp-0.7.6/doc/html/functions_func_0x63.html0000644000175000007640000003406112116723632021022 0ustar sharkyjerryweb QXmpp: Class Members - Functions
QXmpp  Version:0.7.6
 

- c -

qxmpp-0.7.6/doc/html/classQXmppArchiveRetrieveIq.html0000644000175000007640000006102612116723632022615 0ustar sharkyjerryweb QXmpp: QXmppArchiveRetrieveIq Class Reference
QXmppArchiveRetrieveIq Class Reference

Represents an archive retrieve IQ as defined by XEP-0136: Message Archiving. More...

#include <QXmppArchiveIq.h>

Inheritance diagram for QXmppArchiveRetrieveIq:
QXmppIq QXmppStanza

Public Member Functions

QDateTime start () const
void setStart (const QDateTime &start)
QString with () const
void setWith (const QString &with)
QXmppResultSetQuery resultSetQuery () const
void setResultSetQuery (const QXmppResultSetQuery &rsm)
- Public Member Functions inherited from QXmppIq
 QXmppIq (QXmppIq::Type type=QXmppIq::Get)
 QXmppIq (const QXmppIq &other)
 Constructs a copy of other.
QXmppIqoperator= (const QXmppIq &other)
 Assigns other to this IQ.
QXmppIq::Type type () const
void setType (QXmppIq::Type)
- Public Member Functions inherited from QXmppStanza
 QXmppStanza (const QString &from=QString(), const QString &to=QString())
 QXmppStanza (const QXmppStanza &other)
 Constructs a copy of other.
virtual ~QXmppStanza ()
 Destroys a QXmppStanza.
QXmppStanzaoperator= (const QXmppStanza &other)
 Assigns other to this stanza.
QString to () const
void setTo (const QString &)
QString from () const
 Returns the stanza's sender JID.
void setFrom (const QString &)
QString id () const
 Returns the stanza's identifier.
void setId (const QString &)
QString lang () const
 Returns the stanza's language.
void setLang (const QString &)
QXmppStanza::Error error () const
 Returns the stanza's error.
void setError (const QXmppStanza::Error &error)
QXmppElementList extensions () const
void setExtensions (const QXmppElementList &elements)
QList< QXmppExtendedAddressextendedAddresses () const
void setExtendedAddresses (const QList< QXmppExtendedAddress > &extendedAddresses)

Additional Inherited Members

- Public Types inherited from QXmppIq
enum  Type { Error = 0, Get, Set, Result }
 This enum describes the type of IQ. More...

Detailed Description

Represents an archive retrieve IQ as defined by XEP-0136: Message Archiving.

Member Function Documentation

QXmppResultSetQuery QXmppArchiveRetrieveIq::resultSetQuery ( ) const

Returns the result set management query.

This is used for paging through messages.

void QXmppArchiveRetrieveIq::setResultSetQuery ( const QXmppResultSetQuery rsm)

Sets the result set management query.

This is used for paging through messages.

void QXmppArchiveRetrieveIq::setStart ( const QDateTime &  start)

Sets the start date/time for the archived conversations.

Parameters
start
void QXmppArchiveRetrieveIq::setWith ( const QString &  with)

Sets the JID which archived conversations must match.

Parameters
with
QDateTime QXmppArchiveRetrieveIq::start ( ) const

Returns the start date/time for the archived conversations.

QString QXmppArchiveRetrieveIq::with ( ) const

Returns the JID which archived conversations must match.


The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppIncomingServer.html0000644000175000007640000005172212116723632022170 0ustar sharkyjerryweb QXmpp: QXmppIncomingServer Class Reference
QXmppIncomingServer Class Reference

The QXmppIncomingServer class represents an incoming XMPP stream from an XMPP server. More...

#include <QXmppIncomingServer.h>

Inheritance diagram for QXmppIncomingServer:
QXmppStream QXmppLoggable

Signals

void dialbackRequestReceived (const QXmppDialback &result)
 This signal is emitted when a dialback verify request is received.
void elementReceived (const QDomElement &element)
 This signal is emitted when an element is received.
- Signals inherited from QXmppStream
void connected ()
 This signal is emitted when the stream is connected.
void disconnected ()
 This signal is emitted when the stream is disconnected.
- Signals inherited from QXmppLoggable
void setGauge (const QString &gauge, double value)
 Sets the given gauge to value.
void logMessage (QXmppLogger::MessageType type, const QString &msg)
 This signal is emitted to send logging messages.
void updateCounter (const QString &counter, qint64 amount=1)
 Updates the given counter by amount.

Public Member Functions

 QXmppIncomingServer (QSslSocket *socket, const QString &domain, QObject *parent)
 ~QXmppIncomingServer ()
 Destroys the current stream.
bool isConnected () const
QString localStreamId () const
- Public Member Functions inherited from QXmppStream
 QXmppStream (QObject *parent)
 ~QXmppStream ()
 Destroys a base XMPP stream.
bool sendPacket (const QXmppStanza &)
- Public Member Functions inherited from QXmppLoggable
 QXmppLoggable (QObject *parent=0)

Friends

class QXmppIncomingServerPrivate

Additional Inherited Members

- Public Slots inherited from QXmppStream
virtual void disconnectFromHost ()
virtual bool sendData (const QByteArray &)
- Protected Member Functions inherited from QXmppStream
QSslSocket * socket () const
void setSocket (QSslSocket *socket)
virtual void handleStart ()
virtual void handleStanza (const QDomElement &element)=0
virtual void handleStream (const QDomElement &element)=0

Detailed Description

The QXmppIncomingServer class represents an incoming XMPP stream from an XMPP server.

Constructor & Destructor Documentation

QXmppIncomingServer::QXmppIncomingServer ( QSslSocket *  socket,
const QString &  domain,
QObject *  parent 
)

Constructs a new incoming server stream.

Parameters
socketThe socket for the XMPP stream.
domainThe local domain.
parentThe parent QObject for the stream (optional).

Member Function Documentation

bool QXmppIncomingServer::isConnected ( ) const
virtual

Returns true if the socket is connected and the remote server is authenticated.

Reimplemented from QXmppStream.

QString QXmppIncomingServer::localStreamId ( ) const

Returns the stream's identifier.


The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/QXmppIbbIq_8h_source.html0000644000175000007640000004326212116723632021155 0ustar sharkyjerryweb QXmpp: QXmppIbbIq.h Source File
QXmpp  Version:0.7.6
QXmppIbbIq.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Authors:
5  * Manjeet Dahiya
6  * Jeremy Lainé
7  *
8  * Source:
9  * http://code.google.com/p/qxmpp
10  *
11  * This file is a part of QXmpp library.
12  *
13  * This library is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU Lesser General Public
15  * License as published by the Free Software Foundation; either
16  * version 2.1 of the License, or (at your option) any later version.
17  *
18  * This library is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21  * Lesser General Public License for more details.
22  *
23  */
24 
25 #ifndef QXMPPIBBIQ_H
26 #define QXMPPIBBIQ_H
27 
28 #include "QXmppIq.h"
29 
30 class QXmppIbbOpenIq: public QXmppIq
31 {
32 public:
33  QXmppIbbOpenIq();
34 
35  long blockSize() const;
36  void setBlockSize( long block_size );
37 
38  QString sid() const;
39  void setSid( const QString &sid );
40 
41  static bool isIbbOpenIq(const QDomElement &element);
42 
43 protected:
45  void parseElementFromChild(const QDomElement &element);
46  void toXmlElementFromChild(QXmlStreamWriter *writer) const;
48 
49 private:
50  long m_block_size;
51  QString m_sid;
52 };
53 
54 class QXmppIbbCloseIq: public QXmppIq
55 {
56 public:
57  QXmppIbbCloseIq();
58 
59  QString sid() const;
60  void setSid( const QString &sid );
61 
62  static bool isIbbCloseIq(const QDomElement &element);
63 
64 protected:
66  void parseElementFromChild(const QDomElement &element);
67  void toXmlElementFromChild(QXmlStreamWriter *writer) const;
69 
70 private:
71  QString m_sid;
72 };
73 
74 class QXMPP_EXPORT QXmppIbbDataIq : public QXmppIq
75 {
76 public:
77  QXmppIbbDataIq();
78 
79  quint16 sequence() const;
80  void setSequence( quint16 seq );
81 
82  QString sid() const;
83  void setSid( const QString &sid );
84 
85  QByteArray payload() const;
86  void setPayload( const QByteArray &data );
87 
88  static bool isIbbDataIq(const QDomElement &element);
89 
90 protected:
92  void parseElementFromChild(const QDomElement &element);
93  void toXmlElementFromChild(QXmlStreamWriter *writer) const;
95 
96 private:
97  quint16 m_seq;
98  QString m_sid;
99  QByteArray m_payload;
100 };
101 
102 #endif // QXMPPIBBIQS_H
qxmpp-0.7.6/doc/html/ftv2ns.png0000644000175000007640000000060412116723632016255 0ustar sharkyjerrywebPNG  IHDR}\KIDATx1K1 G⁂n lE(nࢋMA@ tK%ܕ ]BI%uͅa,e v祫i\tun0oV\$G.&@Y=%$um6'߫9Q\b)0-ZTH`pcsm 5:>ަI F] jgo[ on Ԭvq?\ 6Tee lQ c3*dWTM\rh61F fIENDB`qxmpp-0.7.6/doc/html/classQXmppRpcInvokeIq.html0000644000175000007640000005637212116723632021436 0ustar sharkyjerryweb QXmpp: QXmppRpcInvokeIq Class Reference
QXmppRpcInvokeIq Class Reference

The QXmppRpcInvokeIq class represents an IQ used to carry an RPC invocation as specified by XEP-0009: Jabber-RPC. More...

#include <QXmppRpcIq.h>

Inheritance diagram for QXmppRpcInvokeIq:
QXmppIq QXmppStanza

Public Member Functions

QString method () const
void setMethod (const QString &method)
QVariantList arguments () const
void setArguments (const QVariantList &arguments)
- Public Member Functions inherited from QXmppIq
 QXmppIq (QXmppIq::Type type=QXmppIq::Get)
 QXmppIq (const QXmppIq &other)
 Constructs a copy of other.
QXmppIqoperator= (const QXmppIq &other)
 Assigns other to this IQ.
QXmppIq::Type type () const
void setType (QXmppIq::Type)
- Public Member Functions inherited from QXmppStanza
 QXmppStanza (const QString &from=QString(), const QString &to=QString())
 QXmppStanza (const QXmppStanza &other)
 Constructs a copy of other.
virtual ~QXmppStanza ()
 Destroys a QXmppStanza.
QXmppStanzaoperator= (const QXmppStanza &other)
 Assigns other to this stanza.
QString to () const
void setTo (const QString &)
QString from () const
 Returns the stanza's sender JID.
void setFrom (const QString &)
QString id () const
 Returns the stanza's identifier.
void setId (const QString &)
QString lang () const
 Returns the stanza's language.
void setLang (const QString &)
QXmppStanza::Error error () const
 Returns the stanza's error.
void setError (const QXmppStanza::Error &error)
QXmppElementList extensions () const
void setExtensions (const QXmppElementList &elements)
QList< QXmppExtendedAddressextendedAddresses () const
void setExtendedAddresses (const QList< QXmppExtendedAddress > &extendedAddresses)

Friends

class QXmppRpcErrorIq

Additional Inherited Members

- Public Types inherited from QXmppIq
enum  Type { Error = 0, Get, Set, Result }
 This enum describes the type of IQ. More...

Detailed Description

The QXmppRpcInvokeIq class represents an IQ used to carry an RPC invocation as specified by XEP-0009: Jabber-RPC.

Member Function Documentation

QVariantList QXmppRpcInvokeIq::arguments ( ) const

Returns the method arguments.

QString QXmppRpcInvokeIq::method ( ) const

Returns the method name.

void QXmppRpcInvokeIq::setArguments ( const QVariantList &  arguments)

Sets the method arguments.

Parameters
arguments
void QXmppRpcInvokeIq::setMethod ( const QString &  method)

Sets the method name.

Parameters
method

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/QXmppIncomingClient_8h_source.html0000644000175000007640000003527312116723632023074 0ustar sharkyjerryweb QXmpp: QXmppIncomingClient.h Source File
QXmpp  Version:0.7.6
QXmppIncomingClient.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Jeremy Lainé
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXMPPINCOMINGCLIENT_H
25 #define QXMPPINCOMINGCLIENT_H
26 
27 #include "QXmppStream.h"
28 
29 class QXmppIncomingClientPrivate;
31 
34 
38 
39 class QXMPP_EXPORT QXmppIncomingClient : public QXmppStream
40 {
41  Q_OBJECT
42 
43 public:
44  QXmppIncomingClient(QSslSocket *socket, const QString &domain, QObject *parent = 0);
46 
47  bool isConnected() const;
48  QString jid() const;
49 
50  void setInactivityTimeout(int secs);
51  void setPasswordChecker(QXmppPasswordChecker *checker);
52 
53 signals:
55  void elementReceived(const QDomElement &element);
56 
57 protected:
59  void handleStream(const QDomElement &element);
60  void handleStanza(const QDomElement &element);
62 
63 private slots:
64  void onDigestReply();
65  void onPasswordReply();
66  void onSocketDisconnected();
67  void onTimeout();
68 
69 private:
70  Q_DISABLE_COPY(QXmppIncomingClient)
71  QXmppIncomingClientPrivate* d;
72  friend class QXmppIncomingClientPrivate;
73 };
74 
75 #endif
qxmpp-0.7.6/doc/html/classQXmppPubSubItem-members.html0000644000175000007640000001363612116723632022707 0ustar sharkyjerryweb QXmpp: Member List
QXmppPubSubItem Member List

This is the complete list of members for QXmppPubSubItem, including all inherited members.

contents() const QXmppPubSubItem
id() const QXmppPubSubItem
setContents(const QXmppElement &contents)QXmppPubSubItem
setId(const QString &id)QXmppPubSubItem
qxmpp-0.7.6/doc/html/ftv2folderclosed.png0000644000175000007640000000115012116723632020277 0ustar sharkyjerrywebPNG  IHDR}\/IDATx]MO@~uؐlp]#]PYEC\9y`xC &=qvZv3m؃vLN}}ޝZA@n ONp xKxj8s _[D'yye+ 7#rNlk* 0Ь_d_(Öz=xvhzP-䍒̪u$\DJcB4.:Ϗ-}LE #gN;B6䬜@p&h>p9EEάʑ"un$R"?{<%PNt$߶+^<"2Dqq\ҙaA"ԵP}#Ez{.8i p(ADwDE߂z;Kק8t q:uvvݛvEn{MFXgfZ֝*ߩ:jYq#3SWr'  IENDB`qxmpp-0.7.6/doc/html/QXmppClientExtension_8h_source.html0000644000175000007640000003375312116723632023306 0ustar sharkyjerryweb QXmpp: QXmppClientExtension.h Source File
QXmpp  Version:0.7.6
QXmppClientExtension.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Jeremy Lainé
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXMPPCLIENTEXTENSION_H
25 #define QXMPPCLIENTEXTENSION_H
26 
27 #include "QXmppDiscoveryIq.h"
28 #include "QXmppLogger.h"
29 
30 class QDomElement;
31 class QStringList;
32 
33 class QXmppClient;
34 class QXmppClientExtensionPrivate;
35 class QXmppStream;
36 
46 
47 class QXMPP_EXPORT QXmppClientExtension : public QXmppLoggable
48 {
49  Q_OBJECT
50 
51 public:
53  virtual ~QXmppClientExtension();
54 
55  virtual QStringList discoveryFeatures() const;
56  virtual QList<QXmppDiscoveryIq::Identity> discoveryIdentities() const;
57 
64  virtual bool handleStanza(const QDomElement &stanza) = 0;
65 
66 protected:
67  QXmppClient *client();
68  virtual void setClient(QXmppClient *client);
69 
70 private:
71  QXmppClientExtensionPrivate * const d;
72 
73  friend class QXmppClient;
74 };
75 
76 #endif
qxmpp-0.7.6/doc/html/QXmppResultSet_8h_source.html0000644000175000007640000004255712116723632022127 0ustar sharkyjerryweb QXmpp: QXmppResultSet.h Source File
QXmpp  Version:0.7.6
QXmppResultSet.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Olivier Goffart <ogoffart@woboq.com>
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXMPPRESULTSET_H
25 #define QXMPPRESULTSET_H
26 
27 #include <QDateTime>
28 
29 #include "QXmppStanza.h"
30 
33 
34 class QXMPP_EXPORT QXmppResultSetQuery
35 {
36 public:
38 
39  int max() const;
40  void setMax(int max);
41 
42  int index() const;
43  void setIndex(int index);
44 
45  QString before() const;
46  void setBefore(const QString &before );
47 
48  QString after() const;
49  void setAfter(const QString &after );
50 
51  bool isNull() const;
52 
54  void parse(const QDomElement &element);
55  void toXml(QXmlStreamWriter *writer) const;
57 
58 private:
59  int m_index;
60  int m_max;
61  QString m_after;
62  QString m_before;
63 };
64 
67 
68 class QXMPP_EXPORT QXmppResultSetReply
69 {
70 public:
72 
73  QString first() const;
74  void setFirst(const QString &first );
75 
76  QString last() const;
77  void setLast(const QString &last );
78 
79  int count() const;
80  void setCount(int count);
81 
82  int index() const;
83  void setIndex(int index);
84 
85  bool isNull() const;
86 
88  void parse(const QDomElement &element);
89  void toXml(QXmlStreamWriter *writer) const;
91 
92 private:
93  int m_count;
94  int m_index;
95  QString m_first;
96  QString m_last;
97 };
98 
99 #endif // QXMPPRESULTSET_H
qxmpp-0.7.6/doc/html/classQXmppDataForm_1_1Media.html0000644000175000007640000003076012116723632022332 0ustar sharkyjerryweb QXmpp: QXmppDataForm::Media Class Reference
QXmppDataForm::Media Class Reference

The QXmppDataForm::Media class represents a media field as defined by XEP-0221: Data Forms Media Element. More...

#include <QXmppDataForm.h>

Public Member Functions

 Media ()
 Constructs an empty QXmppDataForm::Media.
 Media (const QXmppDataForm::Media &other)
 Constructs a copy of other.
 ~Media ()
 Destroys the media.
QXmppDataForm::Mediaoperator= (const QXmppDataForm::Media &other)
 Assigns other to this media.
int height () const
 Returns media's height.
void setHeight (int height)
 Sets media's height.
int width () const
 Returns media's width.
void setWidth (int width)
 Sets media's width.
QList< QPair< QString, QString > > uris () const
 Returns media's uris.
void setUris (const QList< QPair< QString, QString > > &uris)
 Sets media's uris.
bool isNull () const
 Returns true if no media tag present.

Detailed Description

The QXmppDataForm::Media class represents a media field as defined by XEP-0221: Data Forms Media Element.


The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppPasswordRequest-members.html0000644000175000007640000001613512116723632024040 0ustar sharkyjerryweb QXmpp: Member List
QXmppPasswordRequest Member List

This is the complete list of members for QXmppPasswordRequest, including all inherited members.

CheckPassword enum value (defined in QXmppPasswordRequest)QXmppPasswordRequest
domain() const QXmppPasswordRequest
password() const QXmppPasswordRequest
setDomain(const QString &domain)QXmppPasswordRequest
setPassword(const QString &password)QXmppPasswordRequest
setUsername(const QString &username)QXmppPasswordRequest
Type enum nameQXmppPasswordRequest
username() const QXmppPasswordRequest
qxmpp-0.7.6/doc/html/QXmppVCardIq_8h_source.html0000644000175000007640000010253112116723632021453 0ustar sharkyjerryweb QXmpp: QXmppVCardIq.h Source File
QXmpp  Version:0.7.6
QXmppVCardIq.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Manjeet Dahiya
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 
25 #ifndef QXMPPVCARDIQ_H
26 #define QXMPPVCARDIQ_H
27 
28 #include "QXmppIq.h"
29 #include <QDate>
30 #include <QMap>
31 #include <QDomElement>
32 
33 class QXmppVCardAddressPrivate;
34 class QXmppVCardEmailPrivate;
35 class QXmppVCardPhonePrivate;
36 class QXmppVCardIqPrivate;
37 
39 
40 class QXMPP_EXPORT QXmppVCardAddress
41 {
42 public:
44  enum TypeFlag {
45  None = 0x0,
46  Home = 0x1,
47  Work = 0x2,
48  Postal = 0x4,
49  Preferred = 0x8
50  };
51  Q_DECLARE_FLAGS(Type, TypeFlag)
52 
54  QXmppVCardAddress(const QXmppVCardAddress &other);
55  ~QXmppVCardAddress();
56 
57  QXmppVCardAddress& operator=(const QXmppVCardAddress &other);
58 
59  QString country() const;
60  void setCountry(const QString &country);
61 
62  QString locality() const;
63  void setLocality(const QString &locality);
64 
65  QString postcode() const;
66  void setPostcode(const QString &postcode);
67 
68  QString region() const;
69  void setRegion(const QString &region);
70 
71  QString street() const;
72  void setStreet(const QString &street);
73 
74  Type type() const;
75  void setType(Type type);
76 
78  void parse(const QDomElement &element);
79  void toXml(QXmlStreamWriter *stream) const;
81 
82 private:
83  QSharedDataPointer<QXmppVCardAddressPrivate> d;
84 };
85 
87 
88 class QXMPP_EXPORT QXmppVCardEmail
89 {
90 public:
92  enum TypeFlag {
93  None = 0x0,
94  Home = 0x1,
95  Work = 0x2,
96  Internet = 0x4,
97  Preferred = 0x8,
98  X400 = 0x10
99  };
100  Q_DECLARE_FLAGS(Type, TypeFlag)
101 
102  QXmppVCardEmail();
103  QXmppVCardEmail(const QXmppVCardEmail &other);
104  ~QXmppVCardEmail();
105 
106  QXmppVCardEmail& operator=(const QXmppVCardEmail &other);
107 
108  QString address() const;
109  void setAddress(const QString &address);
110 
111  Type type() const;
112  void setType(Type type);
113 
115  void parse(const QDomElement &element);
116  void toXml(QXmlStreamWriter *stream) const;
118 
119 private:
120  QSharedDataPointer<QXmppVCardEmailPrivate> d;
121 };
122 
124 
125 class QXMPP_EXPORT QXmppVCardPhone
126 {
127 public:
129  enum TypeFlag {
130  None = 0x0,
131  Home = 0x1,
132  Work = 0x2,
133  Voice = 0x4,
134  Fax = 0x8,
135  Pager = 0x10,
136  Messaging = 0x20,
137  Cell = 0x40,
138  Video = 0x80,
139  BBS = 0x100,
140  Modem = 0x200,
141  ISDN = 0x400,
142  PCS = 0x800,
143  Preferred = 0x1000
144  };
145  Q_DECLARE_FLAGS(Type, TypeFlag)
146 
147  QXmppVCardPhone();
148  QXmppVCardPhone(const QXmppVCardPhone &other);
149  ~QXmppVCardPhone();
150 
151  QXmppVCardPhone& operator=(const QXmppVCardPhone &other);
152 
153  QString number() const;
154  void setNumber(const QString &number);
155 
156  Type type() const;
157  void setType(Type type);
158 
160  void parse(const QDomElement &element);
161  void toXml(QXmlStreamWriter *stream) const;
163 
164 private:
165  QSharedDataPointer<QXmppVCardPhonePrivate> d;
166 };
167 
177 
178 class QXMPP_EXPORT QXmppVCardIq : public QXmppIq
179 {
180 public:
181  QXmppVCardIq(const QString& bareJid = "");
182  QXmppVCardIq(const QXmppVCardIq &other);
183  ~QXmppVCardIq();
184 
185  QXmppVCardIq& operator=(const QXmppVCardIq &other);
186 
187  QDate birthday() const;
188  void setBirthday(const QDate &birthday);
189 
190  QString description() const;
191  void setDescription(const QString &description);
192 
193  QString email() const;
194  void setEmail(const QString&);
195 
196  QString firstName() const;
197  void setFirstName(const QString&);
198 
199  QString fullName() const;
200  void setFullName(const QString&);
201 
202  QString lastName() const;
203  void setLastName(const QString&);
204 
205  QString middleName() const;
206  void setMiddleName(const QString&);
207 
208  QString nickName() const;
209  void setNickName(const QString&);
210 
211  QByteArray photo() const;
212  void setPhoto(const QByteArray&);
213 
214  QString photoType() const;
215  void setPhotoType(const QString &type);
216 
217  QString url() const;
218  void setUrl(const QString&);
219 
220  QList<QXmppVCardAddress> addresses() const;
221  void setAddresses(const QList<QXmppVCardAddress> &addresses);
222 
223  QList<QXmppVCardEmail> emails() const;
224  void setEmails(const QList<QXmppVCardEmail> &emails);
225 
226  QList<QXmppVCardPhone> phones() const;
227  void setPhones(const QList<QXmppVCardPhone> &phones);
228 
230  static bool isVCard(const QDomElement &element);
232 
233 protected:
235  void parseElementFromChild(const QDomElement&);
236  void toXmlElementFromChild(QXmlStreamWriter *writer) const;
238 
239 private:
240  QSharedDataPointer<QXmppVCardIqPrivate> d;
241 };
242 
243 #endif // QXMPPVCARDIQ_H
qxmpp-0.7.6/doc/html/classQXmppBookmarkSet-members.html0000644000175000007640000001375612116723632023114 0ustar sharkyjerryweb QXmpp: Member List
QXmppBookmarkSet Member List

This is the complete list of members for QXmppBookmarkSet, including all inherited members.

conferences() const QXmppBookmarkSet
setConferences(const QList< QXmppBookmarkConference > &conferences)QXmppBookmarkSet
setUrls(const QList< QXmppBookmarkUrl > &urls)QXmppBookmarkSet
urls() const QXmppBookmarkSet
qxmpp-0.7.6/doc/html/classQXmppVideoFrame-members.html0000644000175000007640000002323512116723632022705 0ustar sharkyjerryweb QXmpp: Member List
QXmppVideoFrame Member List

This is the complete list of members for QXmppVideoFrame, including all inherited members.

bits()QXmppVideoFrame
bits() const QXmppVideoFrame
bytesPerLine() const QXmppVideoFrame
Format_Invalid enum valueQXmppVideoFrame
Format_RGB24 enum valueQXmppVideoFrame
Format_RGB32 enum valueQXmppVideoFrame
Format_UYVY enum valueQXmppVideoFrame
Format_YUV420P enum valueQXmppVideoFrame
Format_YUYV enum valueQXmppVideoFrame
height() const QXmppVideoFrame
isValid() const QXmppVideoFrame
mappedBytes() const QXmppVideoFrame
PixelFormat enum nameQXmppVideoFrame
pixelFormat() const QXmppVideoFrame
QXmppVideoFrame()QXmppVideoFrame
QXmppVideoFrame(int bytes, const QSize &size, int bytesPerLine, PixelFormat format)QXmppVideoFrame
size() const QXmppVideoFrame
width() const QXmppVideoFrame
qxmpp-0.7.6/doc/html/classQXmppVCardIq-members.html0000644000175000007640000005036212116723632022156 0ustar sharkyjerryweb QXmpp: Member List
QXmppVCardIq Member List

This is the complete list of members for QXmppVCardIq, including all inherited members.

addresses() const QXmppVCardIq
birthday() const QXmppVCardIq
description() const QXmppVCardIq
email() const QXmppVCardIq
emails() const QXmppVCardIq
Error enum valueQXmppIq
error() const QXmppStanza
extendedAddresses() const QXmppStanza
extensions() const QXmppStanza
firstName() const QXmppVCardIq
from() const QXmppStanza
fullName() const QXmppVCardIq
Get enum valueQXmppIq
id() const QXmppStanza
lang() const QXmppStanza
lastName() const QXmppVCardIq
middleName() const QXmppVCardIq
nickName() const QXmppVCardIq
operator=(const QXmppVCardIq &other)QXmppVCardIq
QXmppIq::operator=(const QXmppIq &other)QXmppIq
QXmppStanza::operator=(const QXmppStanza &other)QXmppStanza
phones() const QXmppVCardIq
photo() const QXmppVCardIq
photoType() const QXmppVCardIq
QXmppIq(QXmppIq::Type type=QXmppIq::Get)QXmppIq
QXmppIq(const QXmppIq &other)QXmppIq
QXmppStanza(const QString &from=QString(), const QString &to=QString())QXmppStanza
QXmppStanza(const QXmppStanza &other)QXmppStanza
QXmppVCardIq(const QString &bareJid="")QXmppVCardIq
QXmppVCardIq(const QXmppVCardIq &other)QXmppVCardIq
Result enum valueQXmppIq
Set enum valueQXmppIq
setAddresses(const QList< QXmppVCardAddress > &addresses)QXmppVCardIq
setBirthday(const QDate &birthday)QXmppVCardIq
setDescription(const QString &description)QXmppVCardIq
setEmail(const QString &)QXmppVCardIq
setEmails(const QList< QXmppVCardEmail > &emails)QXmppVCardIq
setError(const QXmppStanza::Error &error)QXmppStanza
setExtendedAddresses(const QList< QXmppExtendedAddress > &extendedAddresses)QXmppStanza
setExtensions(const QXmppElementList &elements)QXmppStanza
setFirstName(const QString &)QXmppVCardIq
setFrom(const QString &)QXmppStanza
setFullName(const QString &)QXmppVCardIq
setId(const QString &)QXmppStanza
setLang(const QString &)QXmppStanza
setLastName(const QString &)QXmppVCardIq
setMiddleName(const QString &)QXmppVCardIq
setNickName(const QString &)QXmppVCardIq
setPhones(const QList< QXmppVCardPhone > &phones)QXmppVCardIq
setPhoto(const QByteArray &)QXmppVCardIq
setPhotoType(const QString &type)QXmppVCardIq
setTo(const QString &)QXmppStanza
setType(QXmppIq::Type)QXmppIq
setUrl(const QString &)QXmppVCardIq
to() const QXmppStanza
type() const QXmppIq
Type enum nameQXmppIq
url() const QXmppVCardIq
~QXmppIq() (defined in QXmppIq)QXmppIq
~QXmppStanza()QXmppStanzavirtual
~QXmppVCardIq() (defined in QXmppVCardIq)QXmppVCardIq
qxmpp-0.7.6/doc/html/QXmppServerExtension_8h_source.html0000644000175000007640000003615012116723632023330 0ustar sharkyjerryweb QXmpp: QXmppServerExtension.h Source File
QXmpp  Version:0.7.6
QXmppServerExtension.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Jeremy Lainé
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXMPPSERVEREXTENSION_H
25 #define QXMPPSERVEREXTENSION_H
26 
27 #include <QVariant>
28 
29 #include "QXmppLogger.h"
30 
31 class QDomElement;
32 class QStringList;
33 
34 class QXmppServer;
35 class QXmppServerExtensionPrivate;
36 class QXmppStream;
37 
47 
48 class QXMPP_EXPORT QXmppServerExtension : public QXmppLoggable
49 {
50  Q_OBJECT
51 
52 public:
55  virtual QString extensionName() const;
56  virtual int extensionPriority() const;
57 
58  virtual QStringList discoveryFeatures() const;
59  virtual QStringList discoveryItems() const;
60  virtual bool handleStanza(const QDomElement &stanza);
61  virtual QSet<QString> presenceSubscribers(const QString &jid);
62  virtual QSet<QString> presenceSubscriptions(const QString &jid);
63 
64  virtual bool start();
65  virtual void stop();
66 
67 protected:
68  QXmppServer *server() const;
69 
70 private:
71  void setServer(QXmppServer *server);
72  QXmppServerExtensionPrivate * const d;
73 
74  friend class QXmppServer;
75 };
76 
77 #endif
qxmpp-0.7.6/doc/html/classQXmppVersionManager-members.html0000644000175000007640000003132312116723632023601 0ustar sharkyjerryweb QXmpp: Member List
QXmppVersionManager Member List

This is the complete list of members for QXmppVersionManager, including all inherited members.

client()QXmppClientExtensionprotected
clientName() const QXmppVersionManager
clientOs() const QXmppVersionManager
clientVersion() const QXmppVersionManager
debug(const QString &message)QXmppLoggableinlineprotected
discoveryFeatures() const QXmppClientExtensionvirtual
discoveryIdentities() const QXmppClientExtensionvirtual
handleStanza(const QDomElement &stanza)=0QXmppClientExtensionpure virtual
info(const QString &message)QXmppLoggableinlineprotected
logMessage(QXmppLogger::MessageType type, const QString &msg)QXmppLoggablesignal
logReceived(const QString &message)QXmppLoggableinlineprotected
logSent(const QString &message)QXmppLoggableinlineprotected
QXmppClientExtension()QXmppClientExtension
QXmppLoggable(QObject *parent=0)QXmppLoggable
QXmppVersionManager() (defined in QXmppVersionManager)QXmppVersionManager
requestVersion(const QString &jid)QXmppVersionManager
setClient(QXmppClient *client)QXmppClientExtensionprotectedvirtual
setClientName(const QString &)QXmppVersionManager
setClientOs(const QString &)QXmppVersionManager
setClientVersion(const QString &)QXmppVersionManager
setGauge(const QString &gauge, double value)QXmppLoggablesignal
updateCounter(const QString &counter, qint64 amount=1)QXmppLoggablesignal
versionReceived(const QXmppVersionIq &)QXmppVersionManagersignal
warning(const QString &message)QXmppLoggableinlineprotected
~QXmppClientExtension()QXmppClientExtensionvirtual
~QXmppVersionManager() (defined in QXmppVersionManager)QXmppVersionManager
qxmpp-0.7.6/doc/html/classQXmppCallManager.png0000644000175000007640000000164712116723632021225 0ustar sharkyjerrywebPNG  IHDRPLTEutRNST26IDATxr* 3K>@hOaQʚ pRJ@5IIޟwrd i"8 o勩L*j,Q4H&[Pўȫ,?iW3bWaR}:S7d)vN7)n+2Sut_cM9#%i_Iθ{m<{He$IUՖ$$dRJi~*$z-ded4 Gx Gx Gx Gx Gx ǿ(RJ@5IIdg$P"LQ5H҈dHH\j35_ $ɔCt"25M䰏ML{[eewi#Sv݆e8yx~cݧI<)Ka>vt㜙l03c9\xޝ66>/F&aQk޾g"\LN]lnI%BFwqNSe^a7ʤ 979퍴wdZ{w7&/&3c~BSW#dnFMGb >4hxݿ3W|T|%rkv[;W^cr2vu]ejϾM)py tvJ0ۄ ;ήR 6 ,ۻIENDB`qxmpp-0.7.6/doc/html/bdwn.png0000644000175000007640000000022312116723632015762 0ustar sharkyjerrywebPNG  IHDR5ZIDATx DP1lm rj.e D[ɾ|6V3?Ls'(}>+ Kch` ^ލnIENDB`qxmpp-0.7.6/doc/html/classQXmppVCardAddress-members.html0000644000175000007640000002544512116723632023176 0ustar sharkyjerryweb QXmpp: Member List
QXmppVCardAddress Member List

This is the complete list of members for QXmppVCardAddress, including all inherited members.

country() const QXmppVCardAddress
Home enum value (defined in QXmppVCardAddress)QXmppVCardAddress
locality() const QXmppVCardAddress
None enum value (defined in QXmppVCardAddress)QXmppVCardAddress
operator=(const QXmppVCardAddress &other)QXmppVCardAddress
Postal enum value (defined in QXmppVCardAddress)QXmppVCardAddress
postcode() const QXmppVCardAddress
Preferred enum value (defined in QXmppVCardAddress)QXmppVCardAddress
QXmppVCardAddress()QXmppVCardAddress
QXmppVCardAddress(const QXmppVCardAddress &other)QXmppVCardAddress
region() const QXmppVCardAddress
setCountry(const QString &country)QXmppVCardAddress
setLocality(const QString &locality)QXmppVCardAddress
setPostcode(const QString &postcode)QXmppVCardAddress
setRegion(const QString &region)QXmppVCardAddress
setStreet(const QString &street)QXmppVCardAddress
setType(Type type)QXmppVCardAddress
street() const QXmppVCardAddress
type() const QXmppVCardAddress
TypeFlag enum nameQXmppVCardAddress
Work enum value (defined in QXmppVCardAddress)QXmppVCardAddress
~QXmppVCardAddress() (defined in QXmppVCardAddress)QXmppVCardAddress
qxmpp-0.7.6/doc/html/classQXmppVCardIq.png0000644000175000007640000000130212116723632020334 0ustar sharkyjerrywebPNG  IHDRd&PLTEutRNST2QIDATxᒣ #H[ت )T`:bq4DI˒HߐN ߬J&BY IRjhO|F?Wm0Cx$c&[IĪ36#3Q?T2Jm:Ee$*iuWP"IeI$,I1<F3CxL̐l)?T]KgI, %p$n͒hI1(IcYIr1I%{I<7CAbE3<|=EJ$+q#I8%?Z;=I~d2D~XrQ];I91C%I=\>^"I~D̒``43$ o"Cյ$~͒Y7KfI, hcY7%{jp̗-m۳qT{_֕WofhpK_>__I碲 A._$?.2BY~,t$f$߽ĵ䢺5_wsqLkp|Zfq #%Ò% !)պ|LIENDB`qxmpp-0.7.6/doc/html/classes.html0000644000175000007640000003550712116723632016662 0ustar sharkyjerryweb QXmpp: Class Index
QXmpp  Version:0.7.6
Class Index
F | I | M | Q
  F  
QXmppArchiveRetrieveIq   QXmppIncomingClient   QXmppPasswordChecker   QXmppServerExtension   
QXmppBindIq   QXmppIncomingServer   QXmppPasswordReply   QXmppServerPlugin   
QXmppDataForm::Field   QXmppBookmarkConference   QXmppInvokable   QXmppPasswordRequest   QXmppSessionIq   
  I  
QXmppBookmarkManager   QXmppIq   QXmppPresence   QXmppSslServer   
QXmppBookmarkSet   QXmppJingleCandidate   QXmppPubSubIq   QXmppStanza   
QXmppRosterIq::Item   QXmppBookmarkUrl   QXmppJingleIq   QXmppPubSubItem   QXmppStream   
  M  
QXmppCall   QXmppJinglePayloadType   QXmppRegisterIq   QXmppTransferJob   
QXmppCallManager   QXmppLoggable   QXmppResultSetQuery   QXmppTransferManager   
QXmppDataForm::Media   QXmppClient   QXmppLogger   QXmppResultSetReply   QXmppUtils   
  Q  
QXmppClientExtension   QXmppMessage   QXmppRosterIq   QXmppVCardAddress   
QXmppConfiguration   QXmppMessageReceiptManager   QXmppRosterManager   QXmppVCardEmail   
QXmppArchiveChat   QXmppDataForm   QXmppMucAdminIq   QXmppRpcInvokeIq   QXmppVCardIq   
QXmppArchiveChatIq   QXmppDialback   QXmppMucItem   QXmppRpcManager   QXmppVCardManager   
QXmppArchiveListIq   QXmppDiscoveryManager   QXmppMucManager   QXmppRpcResponseIq   QXmppVCardPhone   
QXmppArchiveManager   QXmppEntityTimeManager   QXmppMucOwnerIq   QXmppRtpAudioChannel   QXmppVersionIq   
QXmppArchiveMessage   QXmppExtendedAddress   QXmppMucRoom   QXmppRtpPacket   QXmppVersionManager   
QXmppArchivePrefIq   QXmppIceComponent   QXmppOutgoingClient   QXmppRtpVideoChannel   QXmppVideoFrame   
QXmppArchiveRemoveIq   QXmppIceConnection   QXmppOutgoingServer   QXmppServer   
F | I | M | Q
qxmpp-0.7.6/doc/html/classQXmppJingleIq-members.html0000644000175000007640000005034112116723632022364 0ustar sharkyjerryweb QXmpp: Member List
QXmppJingleIq Member List

This is the complete list of members for QXmppJingleIq, including all inherited members.

Action enum nameQXmppJingleIq
action() const QXmppJingleIq
content()QXmppJingleIqinline
content() const QXmppJingleIqinline
ContentAccept enum value (defined in QXmppJingleIq)QXmppJingleIq
ContentAdd enum value (defined in QXmppJingleIq)QXmppJingleIq
ContentModify enum value (defined in QXmppJingleIq)QXmppJingleIq
ContentReject enum value (defined in QXmppJingleIq)QXmppJingleIq
ContentRemove enum value (defined in QXmppJingleIq)QXmppJingleIq
DescriptionInfo enum value (defined in QXmppJingleIq)QXmppJingleIq
Error enum valueQXmppIq
error() const QXmppStanza
extendedAddresses() const QXmppStanza
extensions() const QXmppStanza
from() const QXmppStanza
Get enum valueQXmppIq
id() const QXmppStanza
initiator() const QXmppJingleIq
lang() const QXmppStanza
operator=(const QXmppIq &other)QXmppIq
QXmppStanza::operator=(const QXmppStanza &other)QXmppStanza
QXmppIq(QXmppIq::Type type=QXmppIq::Get)QXmppIq
QXmppIq(const QXmppIq &other)QXmppIq
QXmppJingleIq()QXmppJingleIq
QXmppStanza(const QString &from=QString(), const QString &to=QString())QXmppStanza
QXmppStanza(const QXmppStanza &other)QXmppStanza
reason()QXmppJingleIqinline
reason() const QXmppJingleIqinline
responder() const QXmppJingleIq
Result enum valueQXmppIq
ringing() const QXmppJingleIq
SecurityInfo enum value (defined in QXmppJingleIq)QXmppJingleIq
SessionAccept enum value (defined in QXmppJingleIq)QXmppJingleIq
SessionInfo enum value (defined in QXmppJingleIq)QXmppJingleIq
SessionInitiate enum value (defined in QXmppJingleIq)QXmppJingleIq
SessionTerminate enum value (defined in QXmppJingleIq)QXmppJingleIq
Set enum valueQXmppIq
setAction(Action action)QXmppJingleIq
setError(const QXmppStanza::Error &error)QXmppStanza
setExtendedAddresses(const QList< QXmppExtendedAddress > &extendedAddresses)QXmppStanza
setExtensions(const QXmppElementList &elements)QXmppStanza
setFrom(const QString &)QXmppStanza
setId(const QString &)QXmppStanza
setInitiator(const QString &initiator)QXmppJingleIq
setLang(const QString &)QXmppStanza
setResponder(const QString &responder)QXmppJingleIq
setRinging(bool ringing)QXmppJingleIq
setSid(const QString &sid)QXmppJingleIq
setTo(const QString &)QXmppStanza
setType(QXmppIq::Type)QXmppIq
sid() const QXmppJingleIq
to() const QXmppStanza
TransportAccept enum value (defined in QXmppJingleIq)QXmppJingleIq
TransportInfo enum value (defined in QXmppJingleIq)QXmppJingleIq
TransportReject enum value (defined in QXmppJingleIq)QXmppJingleIq
TransportReplace enum value (defined in QXmppJingleIq)QXmppJingleIq
type() const QXmppIq
Type enum nameQXmppIq
~QXmppIq() (defined in QXmppIq)QXmppIq
~QXmppStanza()QXmppStanzavirtual
qxmpp-0.7.6/doc/html/classQXmppLoggable.png0000644000175000007640000001007712116723632020570 0ustar sharkyjerrywebPNG  IHDR:Hƞ9PLTEutRNST2IDATxᒢ4j=2״ cr8*@TJy}?:MK]:=O/6e8gfN+lFy | հ"Wfyt^^?ݱ;Yuvg] ]|k]hzlv=ߵBsownwX?^u6}D tQpx O+@X;$j pQ*@TJU:D tQ*@TJU:D tQ*@TJU:D tQz 0 ;^D~N5tQS*j8SydM[ؾmiygIb3V_6tٗq~֧\R]-ϋv[K7#̫'q٪taaͰ^[nAW;ߨ:EN~-DtQSTWTJU:ըҩF}0 ^CJU:D tQ*@TJU:D tQ*@TJU:D tQ*@TJU:D tQ*@ka1":tQS*jTTEw87M3OztnEn{sEgb3,߯>vJ7}9aK7ߺW>htV>}F7_~G7n-x<>?_2[UwEC;a%]ѝzwi{U}ѩoN5tQ +jTTJU:ըaxkv_JU:D tQ*@TJU:D tQ*@TJU:D tQ*@TJU:D tQz 0 ;^D~N5tQS*jNq|MS7VT{GM,w'ݛssqt%lcf2Kkzi}g|sxtG/Önu/7g ȫ/uo8|atSn,do~x<ߝooW v}˵oͯwë ߲F9Nu3jްW?N~-DN5tQSk S Jt+%W:?,t0 oz +@TJU:D tQ*@TJU:D tQ*@TJU:D tQ*@TJU:D tQax֋T߯ҩFN5tQSLt+mB*jTTJU:ըaxkv_JU:D tQ*@TJU:D tQ*@TJU:D tQ*@TJU:D tQz 0 ;^D~N5tQS*jGNq|z;̧>4O[ؾ\G+qG8kƦ5rzlZmzzZΟgn4b=\pWfvXs~8կ6/<>nyH7n?m&mx|~2[[_m=[_ ;Y29pNkgv't1U_UTJ3:տUTJU:ըҩF}0 ^CJU:D tQ*@TJU:D tQ*@TJU:D tQ*@TJU:D tQ*@ka1":tQS*jTT>p;;ջ}tq9c:tܛsT6M$kܡ^sTyt4]f^},K_ޙtو0󰬠Ⱥ0ݷ7߻P͏׭uPv,~ݲ+K\ܞ)ϧ;ws^~w{t W[na~n+'߰MX=2k{;|oe~&ϮtQS ߮tQS*jTT>n xZ}*@TJU:D tQ*@TJU:D tQ*@TJU:D tQ*@TJU:D 5t0 zU:ըҩFN5tQ;N~D-l_O~UU{,fb3,o<etl[6};ra{{x{qW{ey\Mu3jްW?N~-DN5tQSN5tQS*jG 0aO5ttQ*@TJU:D tQ*@TJU:D tQ*@TJU:D tQ*@TJU:DnxZ/S}JU:ըҩFN5j?tyߩo`naeS566^lyS:O8?/V8a>Iq{[/0]w}D7_꾥ۼ5;C+Uvypy>n;m`9\AW;ݙ-b_ѩo>ҩFN5_S}~CTҩJ}ɕNO;}0 ^CJU:D tQ*@TJU:D tQ*@TJU:D tQ*@TJU:D tQ*@ka1":tQS*jTT>p;;{}Mf·ˑO\~kfb5,'_ӑy/gln|kzL"BwLKn^ yq zp-jn16l9/#x|~׭VDwqs;o< ߺ{,׿usoO7{_;m,y];,N~-D%N5tQS}}S*jTTJt0 o(+I(0V<51ry `q] 8.)0S` O?9"KlF`Hsi2$W+FGX/O|)Fݼ!-z3tkN|Q_nH_6v/Mmg1-0c82r~7ڹ(ɶU$iHXI9V7v k`,WFT `Z` O#0<F`x #0[ =aS q8OmǕe4Lt`CˍCm]Pl MFSq`T6h&}b݀iO0`S)Qc0;F ucڮ<4a0ErX)G:6|oil~+7R$IENDB`qxmpp-0.7.6/doc/html/functions_func_0x64.html0000644000175000007640000002524012116723632021022 0ustar sharkyjerryweb QXmpp: Class Members - Functions
QXmpp  Version:0.7.6
 

- d -

qxmpp-0.7.6/doc/html/classQXmppBindIq-members.html0000644000175000007640000003213612116723632022032 0ustar sharkyjerryweb QXmpp: Member List
QXmppBindIq Member List

This is the complete list of members for QXmppBindIq, including all inherited members.

Error enum valueQXmppIq
error() const QXmppStanza
extendedAddresses() const QXmppStanza
extensions() const QXmppStanza
from() const QXmppStanza
Get enum valueQXmppIq
id() const QXmppStanza
jid() const QXmppBindIq
lang() const QXmppStanza
operator=(const QXmppIq &other)QXmppIq
QXmppStanza::operator=(const QXmppStanza &other)QXmppStanza
QXmppIq(QXmppIq::Type type=QXmppIq::Get)QXmppIq
QXmppIq(const QXmppIq &other)QXmppIq
QXmppStanza(const QString &from=QString(), const QString &to=QString())QXmppStanza
QXmppStanza(const QXmppStanza &other)QXmppStanza
resource() const QXmppBindIq
Result enum valueQXmppIq
Set enum valueQXmppIq
setError(const QXmppStanza::Error &error)QXmppStanza
setExtendedAddresses(const QList< QXmppExtendedAddress > &extendedAddresses)QXmppStanza
setExtensions(const QXmppElementList &elements)QXmppStanza
setFrom(const QString &)QXmppStanza
setId(const QString &)QXmppStanza
setJid(const QString &)QXmppBindIq
setLang(const QString &)QXmppStanza
setResource(const QString &)QXmppBindIq
setTo(const QString &)QXmppStanza
setType(QXmppIq::Type)QXmppIq
to() const QXmppStanza
Type enum nameQXmppIq
type() const QXmppIq
~QXmppIq() (defined in QXmppIq)QXmppIq
~QXmppStanza()QXmppStanzavirtual
qxmpp-0.7.6/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html0000644000175000007640000001270612116723632022670 0ustar sharkyjerryweb QXmpp: /home/jerryweb/sharky/Development/qxmpp/src/ Directory Reference
QXmpp  Version:0.7.6
src Directory Reference

Directories

directory  base
directory  client
directory  server
qxmpp-0.7.6/doc/html/QXmppDiscoveryManager_8h_source.html0000644000175000007640000004044012116723632023424 0ustar sharkyjerryweb QXmpp: QXmppDiscoveryManager.h Source File
QXmpp  Version:0.7.6
QXmppDiscoveryManager.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Manjeet Dahiya
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXMPPDISCOVERYMANAGER_H
25 #define QXMPPDISCOVERYMANAGER_H
26 
27 #include "QXmppClientExtension.h"
28 
29 class QXmppDataForm;
30 class QXmppDiscoveryIq;
31 class QXmppDiscoveryManagerPrivate;
32 
37 
38 class QXMPP_EXPORT QXmppDiscoveryManager : public QXmppClientExtension
39 {
40  Q_OBJECT
41 
42 public:
45 
46  QXmppDiscoveryIq capabilities();
47 
48  QString requestInfo(const QString& jid, const QString& node = "");
49  QString requestItems(const QString& jid, const QString& node = "");
50 
51  QString clientCapabilitiesNode() const;
52  void setClientCapabilitiesNode(const QString&);
53 
54  // http://xmpp.org/registrar/disco-categories.html#client
55  QString clientCategory() const;
56  void setClientCategory(const QString&);
57 
58  void setClientName(const QString&);
59  QString clientName() const;
60 
61  QString clientType() const;
62  void setClientType(const QString&);
63 
64  QXmppDataForm clientInfoForm() const;
65  void setClientInfoForm(const QXmppDataForm &form);
66 
68  QStringList discoveryFeatures() const;
69  bool handleStanza(const QDomElement &element);
71 
72 signals:
74  void infoReceived(const QXmppDiscoveryIq&);
75 
77  void itemsReceived(const QXmppDiscoveryIq&);
78 
79 private:
80  QXmppDiscoveryManagerPrivate *d;
81 };
82 
83 #endif // QXMPPDISCOVERYMANAGER_H
qxmpp-0.7.6/doc/html/group__Managers.html0000644000175000007640000003000612116723632020322 0ustar sharkyjerryweb QXmpp: Managers
QXmpp  Version:0.7.6
Managers

Classes

class  QXmppArchiveManager
 The QXmppArchiveManager class makes it possible to access message archives as defined by XEP-0136: Message Archiving. More...
class  QXmppCallManager
 The QXmppCallManager class provides support for making and receiving voice calls. More...
class  QXmppDiscoveryManager
 The QXmppDiscoveryManager class makes it possible to discover information about other entities as defined by XEP-0030: Service Discovery. More...
class  QXmppEntityTimeManager
 The QXmppEntityTimeManager class provided the functionality to get the local time of an entity as defined by XEP-0202: Entity Time. More...
class  QXmppMessageReceiptManager
 The QXmppMessageReceiptManager class makes it possible to send and receive message delivery receipts as defined in XEP-0184: Message Delivery Receipts. More...
class  QXmppMucManager
 The QXmppMucManager class makes it possible to interact with multi-user chat rooms as defined by XEP-0045: Multi-User Chat. More...
class  QXmppRosterManager
 The QXmppRosterManager class provides access to a connected client's roster. More...
class  QXmppRpcManager
 The QXmppRpcManager class make it possible to invoke remote methods and to expose local interfaces for remote procedure calls, as specified by XEP-0009: Jabber-RPC. More...
class  QXmppTransferManager
 The QXmppTransferManager class provides support for sending and receiving files. More...
class  QXmppVCardManager
 The QXmppVCardManager class gets/sets XMPP vCards. It is an implementation of XEP-0054: vcard-temp. More...
class  QXmppVersionManager
 The QXmppVersionManager class makes it possible to request for the software version of an entity as defined by XEP-0092: Software Version. More...

Detailed Description

qxmpp-0.7.6/doc/html/QXmppVersionIq_8h_source.html0000644000175000007640000003051712116723632022105 0ustar sharkyjerryweb QXmpp: QXmppVersionIq.h Source File
QXmpp  Version:0.7.6
QXmppVersionIq.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Jeremy Lainé
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXMPPVERSIONIQ_H
25 #define QXMPPVERSIONIQ_H
26 
27 #include "QXmppIq.h"
28 
33 
34 class QXMPP_EXPORT QXmppVersionIq : public QXmppIq
35 {
36 public:
37  QString name() const;
38  void setName(const QString &name);
39 
40  QString os() const;
41  void setOs(const QString &os);
42 
43  QString version() const;
44  void setVersion(const QString &version);
45 
47  static bool isVersionIq(const QDomElement &element);
49 
50 protected:
52  void parseElementFromChild(const QDomElement &element);
53  void toXmlElementFromChild(QXmlStreamWriter *writer) const;
55 
56 private:
57  QString m_name;
58  QString m_os;
59  QString m_version;
60 };
61 
62 #endif
qxmpp-0.7.6/doc/html/classQXmppDiscoveryManager.png0000644000175000007640000000176112116723632022316 0ustar sharkyjerrywebPNG  IHDR٫GPLTEutRNST2IDATx뒫 ۏ#Q/L5u&k;\Z`ܿ!Iҭ GIcƘ$i'm59.~s]Ӆ ԜjIW\6{f۬ۚOulql\L@ss|n㴧J^q\ij^/7ُ2T&[y-I{<]Jᣎ뼖|v%(%Ä$ GI;ҽx/%W/8F^p~O8 G?'#p~RJ7$I&%O8JmǮ1IS͞UlUr7/IJ[uVOe$i-ǩ◙F/L>eR0\W=M3^JXR}sm&/ipm7*~\ӝq<۲l:N9!' [BZ 1IENDB`qxmpp-0.7.6/doc/html/classQXmppPubSubItem.html0000644000175000007640000002304012116723632021245 0ustar sharkyjerryweb QXmpp: QXmppPubSubItem Class Reference
QXmppPubSubItem Class Reference

The QXmppPubSubItem class represents a publish-subscribe item as defined by XEP-0060: Publish-Subscribe. More...

#include <QXmppPubSubIq.h>

Public Member Functions

QString id () const
void setId (const QString &id)
QXmppElement contents () const
void setContents (const QXmppElement &contents)

Detailed Description

The QXmppPubSubItem class represents a publish-subscribe item as defined by XEP-0060: Publish-Subscribe.

Member Function Documentation

QXmppElement QXmppPubSubItem::contents ( ) const

Returns the contents of the PubSub item.

QString QXmppPubSubItem::id ( ) const

Returns the ID of the PubSub item.

void QXmppPubSubItem::setContents ( const QXmppElement &  contents)

Sets the contents of the PubSub item.

Parameters
contents
void QXmppPubSubItem::setId ( const QString &  id)

Sets the ID of the PubSub item.

Parameters
id

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/QXmppGlobal_8h_source.html0000644000175000007640000002776412116723632021400 0ustar sharkyjerryweb QXmpp: QXmppGlobal.h Source File
QXmpp  Version:0.7.6
QXmppGlobal.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Manjeet Dahiya
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 
25 #ifndef QXMPPGLOBAL_H
26 #define QXMPPGLOBAL_H
27 
28 #include <QString>
29 
30 #if defined(QXMPP_STATIC)
31 # define QXMPP_EXPORT
32 #else
33 # if defined(QXMPP_BUILD)
34 # define QXMPP_EXPORT Q_DECL_EXPORT
35 # else
36 # define QXMPP_EXPORT Q_DECL_IMPORT
37 # endif
38 #endif
39 
40 #if defined(QXMPP_AUTOTEST_INTERNAL)
41 # define QXMPP_AUTOTEST_EXPORT QXMPP_EXPORT
42 #else
43 # define QXMPP_AUTOTEST_EXPORT
44 #endif
45 
54 
55 #define QXMPP_VERSION 0x000706
56 
57 QXMPP_EXPORT QString QXmppVersion();
58 
59 #endif //QXMPPGLOBAL_H
qxmpp-0.7.6/doc/html/jquery.js0000644000175000007640000026726112116723632016220 0ustar sharkyjerryweb/*! jQuery v1.7.1 jquery.com | jquery.org/license */ (function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"":"")+""),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;g=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
a",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="
"+""+"
",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="
t
",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="
",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")}; f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&i.push({elem:this,matches:d.slice(e)});for(j=0;j0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
","
"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")), f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function() {for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c) {if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); qxmpp-0.7.6/doc/html/classQXmppDataForm_1_1Media-members.html0000644000175000007640000002024312116723632023755 0ustar sharkyjerryweb QXmpp: Member List
QXmpp  Version:0.7.6
QXmppDataForm::Media Member List

This is the complete list of members for QXmppDataForm::Media, including all inherited members.

height() const QXmppDataForm::Media
isNull() const QXmppDataForm::Media
Media()QXmppDataForm::Media
Media(const QXmppDataForm::Media &other)QXmppDataForm::Media
operator=(const QXmppDataForm::Media &other)QXmppDataForm::Media
setHeight(int height)QXmppDataForm::Media
setUris(const QList< QPair< QString, QString > > &uris)QXmppDataForm::Media
setWidth(int width)QXmppDataForm::Media
uris() const QXmppDataForm::Media
width() const QXmppDataForm::Media
~Media()QXmppDataForm::Media
qxmpp-0.7.6/doc/html/classQXmppStream-members.html0000644000175000007640000002667612116723632022133 0ustar sharkyjerryweb QXmpp: Member List
QXmppStream Member List

This is the complete list of members for QXmppStream, including all inherited members.

connected()QXmppStreamsignal
debug(const QString &message)QXmppLoggableinlineprotected
disconnected()QXmppStreamsignal
disconnectFromHost()QXmppStreamvirtualslot
handleStanza(const QDomElement &element)=0QXmppStreamprotectedpure virtual
handleStart()QXmppStreamprotectedvirtual
handleStream(const QDomElement &element)=0QXmppStreamprotectedpure virtual
info(const QString &message)QXmppLoggableinlineprotected
isConnected() const QXmppStreamvirtual
logMessage(QXmppLogger::MessageType type, const QString &msg)QXmppLoggablesignal
logReceived(const QString &message)QXmppLoggableinlineprotected
logSent(const QString &message)QXmppLoggableinlineprotected
QXmppLoggable(QObject *parent=0)QXmppLoggable
QXmppStream(QObject *parent)QXmppStream
sendData(const QByteArray &)QXmppStreamvirtualslot
sendPacket(const QXmppStanza &)QXmppStream
setGauge(const QString &gauge, double value)QXmppLoggablesignal
setSocket(QSslSocket *socket)QXmppStreamprotected
socket() const QXmppStreamprotected
updateCounter(const QString &counter, qint64 amount=1)QXmppLoggablesignal
warning(const QString &message)QXmppLoggableinlineprotected
~QXmppStream()QXmppStream
qxmpp-0.7.6/doc/html/classQXmppRpcResponseIq.html0000644000175000007640000006106612116723632021775 0ustar sharkyjerryweb QXmpp: QXmppRpcResponseIq Class Reference
QXmppRpcResponseIq Class Reference

The QXmppRpcResponseIq class represents an IQ used to carry an RPC response as specified by XEP-0009: Jabber-RPC. More...

#include <QXmppRpcIq.h>

Inheritance diagram for QXmppRpcResponseIq:
QXmppIq QXmppStanza

Public Member Functions

int faultCode () const
void setFaultCode (int faultCode)
QString faultString () const
void setFaultString (const QString &faultString)
QVariantList values () const
void setValues (const QVariantList &values)
- Public Member Functions inherited from QXmppIq
 QXmppIq (QXmppIq::Type type=QXmppIq::Get)
 QXmppIq (const QXmppIq &other)
 Constructs a copy of other.
QXmppIqoperator= (const QXmppIq &other)
 Assigns other to this IQ.
QXmppIq::Type type () const
void setType (QXmppIq::Type)
- Public Member Functions inherited from QXmppStanza
 QXmppStanza (const QString &from=QString(), const QString &to=QString())
 QXmppStanza (const QXmppStanza &other)
 Constructs a copy of other.
virtual ~QXmppStanza ()
 Destroys a QXmppStanza.
QXmppStanzaoperator= (const QXmppStanza &other)
 Assigns other to this stanza.
QString to () const
void setTo (const QString &)
QString from () const
 Returns the stanza's sender JID.
void setFrom (const QString &)
QString id () const
 Returns the stanza's identifier.
void setId (const QString &)
QString lang () const
 Returns the stanza's language.
void setLang (const QString &)
QXmppStanza::Error error () const
 Returns the stanza's error.
void setError (const QXmppStanza::Error &error)
QXmppElementList extensions () const
void setExtensions (const QXmppElementList &elements)
QList< QXmppExtendedAddressextendedAddresses () const
void setExtendedAddresses (const QList< QXmppExtendedAddress > &extendedAddresses)

Additional Inherited Members

- Public Types inherited from QXmppIq
enum  Type { Error = 0, Get, Set, Result }
 This enum describes the type of IQ. More...

Detailed Description

The QXmppRpcResponseIq class represents an IQ used to carry an RPC response as specified by XEP-0009: Jabber-RPC.

Member Function Documentation

int QXmppRpcResponseIq::faultCode ( ) const

Returns the fault code.

QString QXmppRpcResponseIq::faultString ( ) const

Returns the fault string.

void QXmppRpcResponseIq::setFaultCode ( int  faultCode)

Sets the fault code.

Parameters
faultCode
void QXmppRpcResponseIq::setFaultString ( const QString &  faultString)

Sets the fault string.

Parameters
faultString
void QXmppRpcResponseIq::setValues ( const QVariantList &  values)

Sets the response values.

Parameters
values
QVariantList QXmppRpcResponseIq::values ( ) const

Returns the response values.


The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppTransferJob-members.html0000644000175000007640000005261212116723632023104 0ustar sharkyjerryweb QXmpp: Member List
QXmppTransferJob Member List

This is the complete list of members for QXmppTransferJob, including all inherited members.

abort()QXmppTransferJobslot
AbortError enum valueQXmppTransferJob
accept(const QString &filePath)QXmppTransferJobslot
accept(QIODevice *output)QXmppTransferJobslot
AnyMethod enum valueQXmppTransferJob
debug(const QString &message)QXmppLoggableinlineprotected
directionQXmppTransferJob
direction() const (defined in QXmppTransferJob)QXmppTransferJob
Direction enum nameQXmppTransferJob
error() const QXmppTransferJob
error(QXmppTransferJob::Error error)QXmppTransferJobsignal
Error enum nameQXmppTransferJob
FileAccessError enum valueQXmppTransferJob
FileCorruptError enum valueQXmppTransferJob
fileInfo() const QXmppTransferJob
fileName (defined in QXmppTransferJob)QXmppTransferJob
fileSize (defined in QXmppTransferJob)QXmppTransferJob
finished()QXmppTransferJobsignal
FinishedState enum valueQXmppTransferJob
InBandMethod enum valueQXmppTransferJob
IncomingDirection enum valueQXmppTransferJob
info(const QString &message)QXmppLoggableinlineprotected
jidQXmppTransferJob
jid() const (defined in QXmppTransferJob)QXmppTransferJob
localFileUrlQXmppTransferJob
localFileUrl() const (defined in QXmppTransferJob)QXmppTransferJob
localFileUrlChanged(const QUrl &localFileUrl)QXmppTransferJobsignal
logMessage(QXmppLogger::MessageType type, const QString &msg)QXmppLoggablesignal
logReceived(const QString &message)QXmppLoggableinlineprotected
logSent(const QString &message)QXmppLoggableinlineprotected
methodQXmppTransferJob
method() const (defined in QXmppTransferJob)QXmppTransferJob
Method enum nameQXmppTransferJob
NoError enum valueQXmppTransferJob
NoMethod enum valueQXmppTransferJob
OfferState enum valueQXmppTransferJob
OutgoingDirection enum valueQXmppTransferJob
progress(qint64 done, qint64 total)QXmppTransferJobsignal
ProtocolError enum valueQXmppTransferJob
QXmppLoggable(QObject *parent=0)QXmppLoggable
QXmppTransferIncomingJob (defined in QXmppTransferJob)QXmppTransferJobfriend
QXmppTransferManager (defined in QXmppTransferJob)QXmppTransferJobfriend
QXmppTransferManagerPrivate (defined in QXmppTransferJob)QXmppTransferJobfriend
QXmppTransferOutgoingJob (defined in QXmppTransferJob)QXmppTransferJobfriend
setGauge(const QString &gauge, double value)QXmppLoggablesignal
setLocalFileUrl(const QUrl &localFileUrl)QXmppTransferJob
sid() const QXmppTransferJob
SocksMethod enum valueQXmppTransferJob
speed() const QXmppTransferJob
StartState enum valueQXmppTransferJob
stateQXmppTransferJob
state() const (defined in QXmppTransferJob)QXmppTransferJob
State enum nameQXmppTransferJob
stateChanged(QXmppTransferJob::State state)QXmppTransferJobsignal
TransferState enum valueQXmppTransferJob
updateCounter(const QString &counter, qint64 amount=1)QXmppLoggablesignal
warning(const QString &message)QXmppLoggableinlineprotected
~QXmppTransferJob() (defined in QXmppTransferJob)QXmppTransferJob
qxmpp-0.7.6/doc/html/QXmppVersionManager_8h_source.html0000644000175000007640000003410012116723632023076 0ustar sharkyjerryweb QXmpp: QXmppVersionManager.h Source File
QXmpp  Version:0.7.6
QXmppVersionManager.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Manjeet Dahiya
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXMPPVERSIONMANAGER_H
25 #define QXMPPVERSIONMANAGER_H
26 
27 #include "QXmppClientExtension.h"
28 
29 class QXmppVersionIq;
30 class QXmppVersionManagerPrivate;
31 
36 
37 class QXMPP_EXPORT QXmppVersionManager : public QXmppClientExtension
38 {
39  Q_OBJECT
40 
41 public:
44 
45  QString requestVersion(const QString& jid);
46 
47  void setClientName(const QString&);
48  void setClientVersion(const QString&);
49  void setClientOs(const QString&);
50 
51  QString clientName() const;
52  QString clientVersion() const;
53  QString clientOs() const;
54 
56  QStringList discoveryFeatures() const;
57  bool handleStanza(const QDomElement &element);
59 
60 signals:
62  void versionReceived(const QXmppVersionIq&);
63 
64 private:
65  QXmppVersionManagerPrivate *d;
66 };
67 
68 #endif // QXMPPVERSIONMANAGER_H
qxmpp-0.7.6/doc/html/QXmppJingleIq_8h_source.html0000644000175000007640000013625112116723632021672 0ustar sharkyjerryweb QXmpp: QXmppJingleIq.h Source File
QXmpp  Version:0.7.6
QXmppJingleIq.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Jeremy Lainé
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXMPPJINGLEIQ_H
25 #define QXMPPJINGLEIQ_H
26 
27 #include <QHostAddress>
28 
29 #include "QXmppIq.h"
30 
34 
35 class QXMPP_EXPORT QXmppJinglePayloadType
36 {
37 public:
39 
40  unsigned char channels() const;
41  void setChannels(unsigned char channels);
42 
43  unsigned int clockrate() const;
44  void setClockrate(unsigned int clockrate);
45 
46  unsigned char id() const;
47  void setId(unsigned char id);
48 
49  unsigned int maxptime() const;
50  void setMaxptime(unsigned int maxptime);
51 
52  QString name() const;
53  void setName(const QString &name);
54 
55  QMap<QString, QString> parameters() const;
56  void setParameters(const QMap<QString, QString> &parameters);
57 
58  unsigned int ptime() const;
59  void setPtime(unsigned int ptime);
60 
62  void parse(const QDomElement &element);
63  void toXml(QXmlStreamWriter *writer) const;
65 
66  bool operator==(const QXmppJinglePayloadType &other) const;
67 
68 private:
69  unsigned char m_channels;
70  unsigned int m_clockrate;
71  unsigned char m_id;
72  unsigned int m_maxptime;
73  QString m_name;
74  QMap<QString, QString> m_parameters;
75  unsigned int m_ptime;
76 };
77 
81 
82 class QXMPP_EXPORT QXmppJingleCandidate
83 {
84 public:
86  enum Type
87  {
89  PeerReflexiveType,
90 
91  ServerReflexiveType,
92 
93  RelayedType,
94 
95  };
96 
98 
99  int component() const;
100  void setComponent(int component);
101 
102  int foundation() const;
103  void setFoundation(int foundation);
104 
105  QHostAddress host() const;
106  void setHost(const QHostAddress &host);
107 
108  QString id() const;
109  void setId(const QString &id);
110 
111  int network() const;
112  void setNetwork(int network);
113 
114  quint16 port() const;
115  void setPort(quint16 port);
116 
117  int priority() const;
118  void setPriority(int priority);
119 
120  QString protocol() const;
121  void setProtocol(const QString &protocol);
122 
123  QXmppJingleCandidate::Type type() const;
124  void setType(QXmppJingleCandidate::Type);
125 
126  bool isNull() const;
127 
129  void parse(const QDomElement &element);
130  void toXml(QXmlStreamWriter *writer) const;
131 
132  static QXmppJingleCandidate::Type typeFromString(const QString &typeStr, bool *ok = 0);
133  static QString typeToString(QXmppJingleCandidate::Type type);
135 
136 private:
137  int m_component;
138  int m_foundation;
139  int m_generation;
140  QHostAddress m_host;
141  QString m_id;
142  int m_network;
143  quint16 m_port;
144  QString m_protocol;
145  int m_priority;
147 };
148 
153 
154 class QXMPP_EXPORT QXmppJingleIq : public QXmppIq
155 {
156 public:
158  enum Action {
159  ContentAccept,
160  ContentAdd,
161  ContentModify,
162  ContentReject,
163  ContentRemove,
164  DescriptionInfo,
165  SecurityInfo,
166  SessionAccept,
167  SessionInfo,
168  SessionInitiate,
169  SessionTerminate,
170  TransportAccept,
171  TransportInfo,
172  TransportReject,
173  TransportReplace,
174  };
175 
180 
181  class QXMPP_EXPORT Content
182  {
183  public:
184  Content();
185 
186  QString creator() const;
187  void setCreator(const QString &creator);
188 
189  QString name() const;
190  void setName(const QString &name);
191 
192  QString senders() const;
193  void setSenders(const QString &senders);
194 
195  // XEP-0167: Jingle RTP Sessions
196  QString descriptionMedia() const;
197  void setDescriptionMedia(const QString &media);
198 
199  void addPayloadType(const QXmppJinglePayloadType &payload);
200  QList<QXmppJinglePayloadType> payloadTypes() const;
201  void setPayloadTypes(const QList<QXmppJinglePayloadType> &payloadTypes);
202 
203  void addTransportCandidate(const QXmppJingleCandidate &candidate);
204  QList<QXmppJingleCandidate> transportCandidates() const;
205 
206  QString transportUser() const;
207  void setTransportUser(const QString &user);
208 
209  QString transportPassword() const;
210  void setTransportPassword(const QString &password);
211 
213  void parse(const QDomElement &element);
214  void toXml(QXmlStreamWriter *writer) const;
216 
217  private:
218  QString m_creator;
219  QString m_disposition;
220  QString m_name;
221  QString m_senders;
222 
223  QString m_descriptionMedia;
224  QString m_descriptionType;
225  QString m_transportType;
226  QString m_transportUser;
227  QString m_transportPassword;
228  QList<QXmppJinglePayloadType> m_payloadTypes;
229  QList<QXmppJingleCandidate> m_transportCandidates;
230  };
231 
236 
237  class QXMPP_EXPORT Reason
238  {
239  public:
240  enum Type {
241  None,
242  AlternativeSession,
243  Busy,
244  Cancel,
245  ConnectivityError,
246  Decline,
247  Expired,
248  FailedApplication,
249  FailedTransport,
250  GeneralError,
251  Gone,
252  IncompatibleParameters,
253  MediaError,
254  SecurityError,
255  Success,
256  Timeout,
257  UnsupportedApplications,
258  UnsupportedTransports,
259  };
260 
261  Reason();
262 
263  QString text() const;
264  void setText(const QString &text);
265 
266  Type type() const;
267  void setType(Type type);
268 
270  void parse(const QDomElement &element);
271  void toXml(QXmlStreamWriter *writer) const;
273 
274  private:
275  QString m_text;
276  Type m_type;
277  };
278 
279  QXmppJingleIq();
280 
281  Action action() const;
282  void setAction(Action action);
283 
284  QString initiator() const;
285  void setInitiator(const QString &initiator);
286 
287  QString responder() const;
288  void setResponder(const QString &responder);
289 
290  QString sid() const;
291  void setSid(const QString &sid);
292 
294  Content& content() { return m_content; };
295 
297  const Content& content() const { return m_content; };
298 
300  Reason& reason() { return m_reason; };
301 
303  const Reason& reason() const { return m_reason; };
304 
305  // XEP-0167: Jingle RTP Sessions
306  bool ringing() const;
307  void setRinging(bool ringing);
308 
310  static bool isJingleIq(const QDomElement &element);
312 
313 protected:
315  void parseElementFromChild(const QDomElement &element);
316  void toXmlElementFromChild(QXmlStreamWriter *writer) const;
318 
319 private:
320  Action m_action;
321  QString m_initiator;
322  QString m_responder;
323  QString m_sid;
324 
325  Content m_content;
326  Reason m_reason;
327  bool m_ringing;
328 };
329 
330 #endif
qxmpp-0.7.6/doc/html/functions_func_0x74.html0000644000175000007640000002233412116723632021024 0ustar sharkyjerryweb QXmpp: Class Members - Functions
QXmpp  Version:0.7.6
qxmpp-0.7.6/doc/html/dynsections.js0000644000175000007640000000413412116723632017227 0ustar sharkyjerrywebfunction toggleVisibility(linkObj) { var base = $(linkObj).attr('id'); var summary = $('#'+base+'-summary'); var content = $('#'+base+'-content'); var trigger = $('#'+base+'-trigger'); var src=$(trigger).attr('src'); if (content.is(':visible')===true) { content.hide(); summary.show(); $(linkObj).addClass('closed').removeClass('opened'); $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); } else { content.show(); summary.hide(); $(linkObj).removeClass('closed').addClass('opened'); $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); } return false; } function updateStripes() { $('table.directory tr'). removeClass('even').filter(':visible:even').addClass('even'); } function toggleLevel(level) { $('table.directory tr').each(function(){ var l = this.id.split('_').length-1; var i = $('#img'+this.id.substring(3)); var a = $('#arr'+this.id.substring(3)); if (lG)y>Vme4M2o&gCyqԙ r3y9@9P^)8E8 QXmpp: Member List
QXmppArchiveChat Member List

This is the complete list of members for QXmppArchiveChat, including all inherited members.

messages() const QXmppArchiveChat
QXmppArchiveChat() (defined in QXmppArchiveChat)QXmppArchiveChat
setMessages(const QList< QXmppArchiveMessage > &messages)QXmppArchiveChat
setStart(const QDateTime &start)QXmppArchiveChat
setSubject(const QString &subject)QXmppArchiveChat
setThread(const QString &thread)QXmppArchiveChat
setVersion(int version)QXmppArchiveChat
setWith(const QString &with)QXmppArchiveChat
start() const QXmppArchiveChat
subject() const QXmppArchiveChat
thread() const QXmppArchiveChat
version() const QXmppArchiveChat
with() const QXmppArchiveChat
qxmpp-0.7.6/doc/html/QXmppRosterIq_8h_source.html0000644000175000007640000004555112116723632021742 0ustar sharkyjerryweb QXmpp: QXmppRosterIq.h Source File
QXmpp  Version:0.7.6
QXmppRosterIq.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Authors:
5  * Manjeet Dahiya
6  * Jeremy Lainé
7  *
8  * Source:
9  * http://code.google.com/p/qxmpp
10  *
11  * This file is a part of QXmpp library.
12  *
13  * This library is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU Lesser General Public
15  * License as published by the Free Software Foundation; either
16  * version 2.1 of the License, or (at your option) any later version.
17  *
18  * This library is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21  * Lesser General Public License for more details.
22  *
23  */
24 
25 
26 #ifndef QXMPPROSTERIQ_H
27 #define QXMPPROSTERIQ_H
28 
29 #include "QXmppIq.h"
30 #include <QList>
31 #include <QSet>
32 
36 
37 class QXMPP_EXPORT QXmppRosterIq : public QXmppIq
38 {
39 public:
40 
42  class QXMPP_EXPORT Item
43  {
44  public:
47  {
48  None = 0,
49 
50 
51  From = 1,
52 
53  To = 2,
54 
55  Both = 3,
56 
57  Remove = 4,
58  NotSet = 8
59  };
60 
61  Item();
62  QString bareJid() const;
63  QSet<QString> groups() const;
64  QString name() const;
65  QString subscriptionStatus() const;
66  SubscriptionType subscriptionType() const;
67 
68  void setBareJid(const QString&);
69  void setGroups(const QSet<QString>&);
70  void setName(const QString&);
71  void setSubscriptionStatus(const QString&);
72  void setSubscriptionType(SubscriptionType);
73 
75  void parse(const QDomElement &element);
76  void toXml(QXmlStreamWriter *writer) const;
78 
79  private:
80  QString getSubscriptionTypeStr() const;
81  void setSubscriptionTypeFromStr(const QString&);
82 
83  QString m_bareJid;
84  SubscriptionType m_type;
85  QString m_name;
86  // can be subscribe/unsubscribe (attribute "ask")
87  QString m_subscriptionStatus;
88  QSet<QString> m_groups;
89  };
90 
91  void addItem(const Item&);
92  QList<Item> items() const;
93 
95  static bool isRosterIq(const QDomElement &element);
97 
98 protected:
100  void parseElementFromChild(const QDomElement &element);
101  void toXmlElementFromChild(QXmlStreamWriter *writer) const;
103 
104 private:
105  QList<Item> m_items;
106 };
107 
108 #endif // QXMPPROSTERIQ_H
qxmpp-0.7.6/doc/html/QXmppElement_8h_source.html0000644000175000007640000003513612116723632021561 0ustar sharkyjerryweb QXmpp: QXmppElement.h Source File
QXmpp  Version:0.7.6
QXmppElement.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Jeremy Lainé
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXMPPELEMENT_H
25 #define QXMPPELEMENT_H
26 
27 #include <QMap>
28 #include <QStringList>
29 #include <QXmlStreamWriter>
30 
31 #include "QXmppGlobal.h"
32 
33 class QDomElement;
34 class QXmppElement;
35 class QXmppElementPrivate;
36 
37 typedef QList<QXmppElement> QXmppElementList;
38 class QXMPP_EXPORT QXmppElement
39 {
40 public:
41  QXmppElement();
42  QXmppElement(const QXmppElement &other);
43  QXmppElement(const QDomElement &element);
44  ~QXmppElement();
45 
46  QStringList attributeNames() const;
47 
48  QString attribute(const QString &name) const;
49  void setAttribute(const QString &name, const QString &value);
50 
51  void appendChild(const QXmppElement &child);
52  QXmppElement firstChildElement(const QString &name = QString()) const;
53  QXmppElement nextSiblingElement(const QString &name = QString()) const;
54  void removeChild(const QXmppElement &child);
55 
56  QString tagName() const;
57  void setTagName(const QString &type);
58 
59  QString value() const;
60  void setValue(const QString &text);
61 
62  bool isNull() const;
63  void toXml(QXmlStreamWriter *writer) const;
64 
65  QXmppElement &operator=(const QXmppElement &other);
66 
67 private:
68  QXmppElement(QXmppElementPrivate *other);
69  QXmppElementPrivate *d;
70 };
71 
72 #endif
qxmpp-0.7.6/doc/html/functions_0x6d.html0000644000175000007640000002402512116723632020067 0ustar sharkyjerryweb QXmpp: Class Members
QXmpp  Version:0.7.6
Here is a list of all documented class members with links to the class documentation for each member:

- m -

qxmpp-0.7.6/doc/html/QXmppPingIq_8h_source.html0000644000175000007640000002376112116723632021360 0ustar sharkyjerryweb QXmpp: QXmppPingIq.h Source File
QXmpp  Version:0.7.6
QXmppPingIq.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Jeremy Lainé
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXMPPPINGIQ_H
25 #define QXMPPPINGIQ_H
26 
27 #include "QXmppIq.h"
28 
29 class QXMPP_EXPORT QXmppPingIq : public QXmppIq
30 {
31 public:
32  QXmppPingIq();
33  void toXmlElementFromChild(QXmlStreamWriter *writer) const;
34  static bool isPingIq(const QDomElement &element);
35 };
36 
37 #endif
qxmpp-0.7.6/doc/html/classQXmppStanza.html0000644000175000007640000006075412116723632020503 0ustar sharkyjerryweb QXmpp: QXmppStanza Class Reference
QXmppStanza Class Reference

The QXmppStanza class is the base class for all XMPP stanzas. More...

#include <QXmppStanza.h>

Inheritance diagram for QXmppStanza:
QXmppDialback QXmppIq QXmppMessage QXmppPresence QXmppArchiveChatIq QXmppArchiveListIq QXmppArchivePrefIq QXmppArchiveRemoveIq QXmppArchiveRetrieveIq QXmppBindIq QXmppJingleIq QXmppMucAdminIq QXmppMucOwnerIq QXmppPubSubIq QXmppRegisterIq QXmppRosterIq QXmppRpcInvokeIq QXmppRpcResponseIq QXmppSessionIq QXmppVCardIq QXmppVersionIq

Public Member Functions

 QXmppStanza (const QString &from=QString(), const QString &to=QString())
 QXmppStanza (const QXmppStanza &other)
 Constructs a copy of other.
virtual ~QXmppStanza ()
 Destroys a QXmppStanza.
QXmppStanzaoperator= (const QXmppStanza &other)
 Assigns other to this stanza.
QString to () const
void setTo (const QString &)
QString from () const
 Returns the stanza's sender JID.
void setFrom (const QString &)
QString id () const
 Returns the stanza's identifier.
void setId (const QString &)
QString lang () const
 Returns the stanza's language.
void setLang (const QString &)
QXmppStanza::Error error () const
 Returns the stanza's error.
void setError (const QXmppStanza::Error &error)
QXmppElementList extensions () const
void setExtensions (const QXmppElementList &elements)
QList< QXmppExtendedAddressextendedAddresses () const
void setExtendedAddresses (const QList< QXmppExtendedAddress > &extendedAddresses)

Detailed Description

The QXmppStanza class is the base class for all XMPP stanzas.

Constructor & Destructor Documentation

QXmppStanza::QXmppStanza ( const QString &  from = QString(),
const QString &  to = QString() 
)

Constructs a QXmppStanza with the specified sender and recipient.

Parameters
from
to

Member Function Documentation

QList< QXmppExtendedAddress > QXmppStanza::extendedAddresses ( ) const

Returns the stanza's extended addresses as defined by XEP-0033: Extended Stanza Addressing.

QXmppElementList QXmppStanza::extensions ( ) const

Returns the stanza's "extensions".

Extensions are XML elements which are not handled internally by QXmpp.

void QXmppStanza::setError ( const QXmppStanza::Error &  error)

Sets the stanza's error.

Parameters
error
void QXmppStanza::setExtendedAddresses ( const QList< QXmppExtendedAddress > &  addresses)

Sets the stanza's extended addresses as defined by XEP-0033: Extended Stanza Addressing.

void QXmppStanza::setExtensions ( const QXmppElementList &  extensions)

Sets the stanza's "extensions".

Parameters
extensions
void QXmppStanza::setFrom ( const QString &  from)

Sets the stanza's sender JID.

Parameters
from
void QXmppStanza::setId ( const QString &  id)

Sets the stanza's identifier.

Parameters
id
void QXmppStanza::setLang ( const QString &  lang)

Sets the stanza's language.

Parameters
lang
void QXmppStanza::setTo ( const QString &  to)

Sets the stanza's recipient JID.

Parameters
to
QString QXmppStanza::to ( ) const

Returns the stanza's recipient JID.


The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/functions_func_0x77.html0000644000175000007640000002033212116723632021023 0ustar sharkyjerryweb QXmpp: Class Members - Functions
QXmpp  Version:0.7.6
qxmpp-0.7.6/doc/html/classQXmppArchiveChat.html0000644000175000007640000003136412116723632021417 0ustar sharkyjerryweb QXmpp: QXmppArchiveChat Class Reference
QXmppArchiveChat Class Reference

The QXmppArchiveChat class represents an archived conversation as defined by XEP-0136: Message Archiving. More...

#include <QXmppArchiveIq.h>

Public Member Functions

QList< QXmppArchiveMessagemessages () const
 Returns the conversation's messages.
void setMessages (const QList< QXmppArchiveMessage > &messages)
 Sets the conversation's messages.
QDateTime start () const
 Returns the start of this conversation.
void setStart (const QDateTime &start)
 Sets the start of this conversation.
QString subject () const
 Returns the conversation's subject.
void setSubject (const QString &subject)
 Sets the conversation's subject.
QString thread () const
 Returns the conversation's thread.
void setThread (const QString &thread)
 Sets the conversation's thread.
int version () const
 Returns the conversation's version.
void setVersion (int version)
 Sets the conversation's version.
QString with () const
 Returns the JID of the remote party.
void setWith (const QString &with)
 Sets the JID of the remote party.

Detailed Description

The QXmppArchiveChat class represents an archived conversation as defined by XEP-0136: Message Archiving.


The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppTransferJob.png0000644000175000007640000000106712116723632021272 0ustar sharkyjerrywebPNG  IHDR{PrPLTEutRNST2IDATx Eaȟʏk;~ЙeK cID9YEj O!N1.;@Cyjfzx(af6;N [nz{lG?aWe;>W>خ\ۉqolc'>~]D1vsK=LDd0{{&i"3 0X 0V 0V 0V 0V 0V 0V snpSc#yǔ'%XԙbM݇n\z.jM3Y8zvܿp,ĐrBTZ֦v:j,#l8[ovf;>zǮ ꍜseϻU|uNcS+ϣyniksbbds?^mysIENDB`qxmpp-0.7.6/doc/html/classQXmppRtpAudioChannel-members.html0000644000175000007640000003601012116723632023677 0ustar sharkyjerryweb QXmpp: Member List
QXmppRtpAudioChannel Member List

This is the complete list of members for QXmppRtpAudioChannel, including all inherited members.

bytesAvailable() const QXmppRtpAudioChannel
close()QXmppRtpAudioChannel
datagramReceived(const QByteArray &ba)QXmppRtpAudioChannelslot
isSequential() const QXmppRtpAudioChannel
localPayloadTypes() (defined in QXmppRtpChannel)QXmppRtpChannel
logMessage(QXmppLogger::MessageType type, const QString &msg)QXmppRtpAudioChannelsignal
openMode() const QXmppRtpAudioChannel
payloadType() const QXmppRtpAudioChannel
pos() const QXmppRtpAudioChannel
QXmppRtpAudioChannel(QObject *parent=0)QXmppRtpAudioChannel
QXmppRtpAudioChannelPrivate (defined in QXmppRtpAudioChannel)QXmppRtpAudioChannelfriend
QXmppRtpChannel() (defined in QXmppRtpChannel)QXmppRtpChannel
seek(qint64 pos)QXmppRtpAudioChannel
sendDatagram(const QByteArray &ba)QXmppRtpAudioChannelsignal
setRemotePayloadTypes(const QList< QXmppJinglePayloadType > &remotePayloadTypes) (defined in QXmppRtpChannel)QXmppRtpChannel
startTone(QXmppRtpAudioChannel::Tone tone)QXmppRtpAudioChannelslot
stopTone(QXmppRtpAudioChannel::Tone tone)QXmppRtpAudioChannelslot
Tone enum nameQXmppRtpAudioChannel
Tone_0 enum valueQXmppRtpAudioChannel
Tone_1 enum valueQXmppRtpAudioChannel
Tone_2 enum valueQXmppRtpAudioChannel
Tone_3 enum valueQXmppRtpAudioChannel
Tone_4 enum valueQXmppRtpAudioChannel
Tone_5 enum valueQXmppRtpAudioChannel
Tone_6 enum valueQXmppRtpAudioChannel
Tone_7 enum valueQXmppRtpAudioChannel
Tone_8 enum valueQXmppRtpAudioChannel
Tone_9 enum valueQXmppRtpAudioChannel
Tone_A enum valueQXmppRtpAudioChannel
Tone_B enum valueQXmppRtpAudioChannel
Tone_C enum valueQXmppRtpAudioChannel
Tone_D enum valueQXmppRtpAudioChannel
Tone_Pound enum valueQXmppRtpAudioChannel
Tone_Star enum valueQXmppRtpAudioChannel
~QXmppRtpAudioChannel()QXmppRtpAudioChannel
qxmpp-0.7.6/doc/html/classQXmppInvokable-members.html0000644000175000007640000001517312116723632022600 0ustar sharkyjerryweb QXmpp: Member List
QXmppInvokable Member List

This is the complete list of members for QXmppInvokable, including all inherited members.

dispatch(const QByteArray &method, const QList< QVariant > &args=QList< QVariant >())QXmppInvokable
interfaces() const QXmppInvokableslot
isAuthorized(const QString &jid) const =0QXmppInvokablepure virtual
paramTypes(const QList< QVariant > &params)QXmppInvokablestatic
QXmppInvokable(QObject *parent=0)QXmppInvokable
~QXmppInvokable()QXmppInvokable
qxmpp-0.7.6/doc/html/classQXmppServerExtension.png0000644000175000007640000000120112116723632022204 0ustar sharkyjerrywebPNG  IHDRP*G=PLTEutRNST2IDATxr0 ?f Ht;j9B-˲,dbL+$ɗÔͿ$PW!7":kH{LCXNiu&T,QtL&O2[5~wF:5Gx0i3q~NX(c ϯSveaow/R6gtSYӾ[$LH>´;Iԩ-Wo$I|Mʴ,2~F4!1ԄLOfd`L W0 &_+|`L ΔRJ0 W0S 8Wi6Ny^|8;јˉ15Eź|d鹬:_/̕ي7|*aOhoWp 7-S u:e*OVn]7ƍq4ݹ\;{૾٬E{xd>SnJc1`w|]]1˶GL&L`5)SJ)ͥ?jn IENDB`qxmpp-0.7.6/doc/html/classQXmppResultSetQuery-members.html0000644000175000007640000001705712116723632023651 0ustar sharkyjerryweb QXmpp: Member List
QXmppResultSetQuery Member List

This is the complete list of members for QXmppResultSetQuery, including all inherited members.

after() const QXmppResultSetQuery
before() const QXmppResultSetQuery
index() const QXmppResultSetQuery
isNull() const QXmppResultSetQuery
max() const QXmppResultSetQuery
QXmppResultSetQuery() (defined in QXmppResultSetQuery)QXmppResultSetQuery
setAfter(const QString &after)QXmppResultSetQuery
setBefore(const QString &before)QXmppResultSetQuery
setIndex(int index)QXmppResultSetQuery
setMax(int max)QXmppResultSetQuery
qxmpp-0.7.6/doc/html/classQXmppPasswordChecker-members.html0000644000175000007640000001437712116723632023762 0ustar sharkyjerryweb QXmpp: Member List
QXmppPasswordChecker Member List

This is the complete list of members for QXmppPasswordChecker, including all inherited members.

checkPassword(const QXmppPasswordRequest &request)QXmppPasswordCheckervirtual
getDigest(const QXmppPasswordRequest &request)QXmppPasswordCheckervirtual
getPassword(const QXmppPasswordRequest &request, QString &password)QXmppPasswordCheckerprotectedvirtual
hasGetPassword() const QXmppPasswordCheckervirtual
qxmpp-0.7.6/doc/html/ftv2node.png0000644000175000007640000000012612116723632016561 0ustar sharkyjerrywebPNG  IHDRɪ|IDATxݱðScOx@ y}IENDB`qxmpp-0.7.6/doc/html/functions_func_0x6b.html0000644000175000007640000001775712116723632021116 0ustar sharkyjerryweb QXmpp: Class Members - Functions
QXmpp  Version:0.7.6
 

- k -

qxmpp-0.7.6/doc/html/classQXmppMucAdminIq.html0000644000175000007640000005221112116723632021217 0ustar sharkyjerryweb QXmpp: QXmppMucAdminIq Class Reference
QXmppMucAdminIq Class Reference

The QXmppMucAdminIq class represents a chat room administration IQ as defined by XEP-0045: Multi-User Chat. More...

#include <QXmppMucIq.h>

Inheritance diagram for QXmppMucAdminIq:
QXmppIq QXmppStanza

Public Member Functions

QList< QXmppMucItemitems () const
 Returns the IQ's items.
void setItems (const QList< QXmppMucItem > &items)
- Public Member Functions inherited from QXmppIq
 QXmppIq (QXmppIq::Type type=QXmppIq::Get)
 QXmppIq (const QXmppIq &other)
 Constructs a copy of other.
QXmppIqoperator= (const QXmppIq &other)
 Assigns other to this IQ.
QXmppIq::Type type () const
void setType (QXmppIq::Type)
- Public Member Functions inherited from QXmppStanza
 QXmppStanza (const QString &from=QString(), const QString &to=QString())
 QXmppStanza (const QXmppStanza &other)
 Constructs a copy of other.
virtual ~QXmppStanza ()
 Destroys a QXmppStanza.
QXmppStanzaoperator= (const QXmppStanza &other)
 Assigns other to this stanza.
QString to () const
void setTo (const QString &)
QString from () const
 Returns the stanza's sender JID.
void setFrom (const QString &)
QString id () const
 Returns the stanza's identifier.
void setId (const QString &)
QString lang () const
 Returns the stanza's language.
void setLang (const QString &)
QXmppStanza::Error error () const
 Returns the stanza's error.
void setError (const QXmppStanza::Error &error)
QXmppElementList extensions () const
void setExtensions (const QXmppElementList &elements)
QList< QXmppExtendedAddressextendedAddresses () const
void setExtendedAddresses (const QList< QXmppExtendedAddress > &extendedAddresses)

Additional Inherited Members

- Public Types inherited from QXmppIq
enum  Type { Error = 0, Get, Set, Result }
 This enum describes the type of IQ. More...

Detailed Description

The QXmppMucAdminIq class represents a chat room administration IQ as defined by XEP-0045: Multi-User Chat.

It is used to get or modify room memberships.

Member Function Documentation

void QXmppMucAdminIq::setItems ( const QList< QXmppMucItem > &  items)

Sets the IQ's items.

Parameters
items

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/functions_0x69.html0000644000175000007640000003475012116723632020022 0ustar sharkyjerryweb QXmpp: Class Members
QXmpp  Version:0.7.6
Here is a list of all documented class members with links to the class documentation for each member:

- i -

qxmpp-0.7.6/doc/html/classQXmppJingleCandidate-members.html0000644000175000007640000002743312116723632023675 0ustar sharkyjerryweb QXmpp: Member List
QXmppJingleCandidate Member List
qxmpp-0.7.6/doc/html/classQXmppIq.png0000644000175000007640000001574612116723632017435 0ustar sharkyjerrywebPNG  IHDR@K}>PLTEutRNST2uIDATx뒢4hݳgsJ曂0 Ó OYU T@ՠ?7 f^ :k&ӛnrb4NdzWQ,zڍZI:>So X9-g3qubTy"3.q7y1Rܪ=-ZOOZr$x]-k.^j37ToRT *j>P5AT za :4XAɯ[T@ A* @P T@ A* @P T@ A* @P 􉀇<Y@ A 8Hր yoK3i;γ+8ʍJ#9.Sl/`wh.3JnUUx3]́0_Y`J + 3T@ Ax8uhW㱂]_D A* @P T@ A* @P T@ A* @P T@ Aax~>eT *jPU ~zۓӑoM?=st? /=j -Myz- hyޝ7[7Η74kiag^o lLV73PuzexpNߞ^+x|@3p76Sqjqw;AyΩm s|gtsVv\9%{3`ZpV[P5A*jPU T@ՠWax~G|D* @P T@ A* @P T@ A* @P T@ A* @P T@ Q0 O0@էAT *jPU^pڏTu{r:rs7Ҁ y=(Mp5U=Yq g=7W94kiaL^pofcT7:| ^nnoOn x< zFMTܟ;wVjS۶jFv_7unW+yx| k{;BT *j' T@ՠP5Ua3QQ T@ A* @P T@ A* @P T@ A* @P T@ Az0 Ó{= P)+jPU T@ՠ<'{ݞܜ8? y߭Nͱ\Mvz-;7&;@ {YLnOlLV73Vid}3e׼xrmt:ݙӵ_Ϩr;{cVpYmny[{c8`jݮ$W6ݱo vT T@ՠTWP5AT *jЫ0 A* @P T@ A* @P T@ A* @P T@ A* @P (a' zSV@ՠP5A/x8}O=99qoϾww D^p5Nj._X_}FNoL+ 8e2i<Ӏ3pg<69wxs^ ~gxmVv\9WeEW]UY`T[U ~P5AT za z GT@ A* @P T@ A* @P T@ A* @P T@ A* @P8 ^T} T@ՠP5I^'#7'?:8/7?B'WSh鴝ެv 8`}㸙 4@+F54`0Y,-?vZW73Vdz7/;8;pA73v{q3psWnv}. vUxL<öG޷+  unWi5 YeM\UY`T]U n T@ՠP5Ua3QQ T@ A* @P T@ A* @P T@ A* @P T@ Az0 Ó{= P)+jPU T@ՠ<'g#NEw\nuR.˂76lvy;zc 8ʍ5-#w?ƀv![g_]^oLmztx<ܪWx@*|}yػ~=.@\637mo+P*jPU T@ՠWax~G|D* @P T@ A* @P T@ A* @P T@ A* @P T@ Q0 O0@էAT *jPU pڏTv:{3`9wp;o~0;ExcD;Y88mw'(74rnl]lm;)ಽv{]o8ϰywq!8ʭ V{7O;iL^UnW_UY`To;W?+UT@V@ՠP5A8 ^ T@ A* @P T@ A* @P T@ A* @P T@ A* @Уa4aOYU T@ՠ:?6[?+睺KNz^F;}urUo8;tD!ݵkTze{ym'}z xѻ֡'< '׭_o>wV3k[v{U/u8l ^Q;w}e6jZU iP5AT za z GT@ A* @P T@ A* @P T@ A* @P T@ A* @P8 ^T} T@ՠP5IuΈ'T݀\Λo.s2ڡZuxcf[/#O`N;Mo8]eռ][]/=OGM8[3E_?wV 8=z›9}u-~>[AW*n^Uy~s3n꽶j^U QP5AT za z GT@ A* @P T@ A* @P T@ A* @P T@ A* @P8 ^T} T@ՠP5]Iu~ y͕~{x鴝lvfz>|yu{Ƿ+Gyw8]np.dki=:^VZͲ[o=x<>?v"!͓f*y]=WO'<gtfG?hVfQ UXU T@ՠ 0 s{= #* @P T@ A* @P T@ A* @P T@ A* @P T@ Aax~>eT *jPU &~yˑS^)^ӅxcfO3vw_6Lǿu|7鲿{4nܜXF\@/#T{;ew3[~x$2Vp)ۀ`N͵.nst3?l›'_=7#T{og.}|^b myg+3p_UـAT *jPU^p9 A* @P T@ A* @P T@ A* @P T@ A* @P T@G02]I7zonn.݃jw5;Uxgޯ zgx-S꠫k 6 QX 0TP5AT *jЫ0 A* @P T@ A* @P T@ A* @P T@ A* @P (a' zSV@ՠP5A/ x8}Oݞ?m_yMbQo{Jfvzٍym7.CVV_;::(7^؈8Bλp>z9NjWgѫ/}b,2Vi`pGȫ!/x|@;3p^ P#W_{ eT *jPU .~e9~x 1Ӽ-dr鵇z;3g*ymkF?8ޒ^Yǁ?‹gª,0Q+jPU T@ՠWax~G|D* @P T@ A* @P T@ A* @P T@ A* @P T@ Q0 O0@էAT *jPUpڏTw[_c_7,+ouy}$tų$qzm\&xk_TG`6Yn/6wZvfzضz] :]x<Q'zUx([=7x õY5ݺ_UX^WlX X@ PQP5AT *jЫ0 A* @P T@ A* @P T@ A* @P T@ A* @P (a' zSV@ՠP5Ax8}O}s_y?PRgvz-){wzxǷE+,;+wz?eEQߴ3v-p v8ʬf> #z?`?';r{pڬ˜[VUxqǫ0#Pu-, @T T@ՠP5UaZ\MB^bIENDB`qxmpp-0.7.6/doc/html/classQXmppMessageReceiptManager-members.html0000644000175000007640000002511512116723632025056 0ustar sharkyjerryweb QXmpp: Member List
QXmppMessageReceiptManager Member List

This is the complete list of members for QXmppMessageReceiptManager, including all inherited members.

client()QXmppClientExtensionprotected
debug(const QString &message)QXmppLoggableinlineprotected
discoveryFeatures() const QXmppClientExtensionvirtual
discoveryIdentities() const QXmppClientExtensionvirtual
handleStanza(const QDomElement &stanza)=0QXmppClientExtensionpure virtual
info(const QString &message)QXmppLoggableinlineprotected
logMessage(QXmppLogger::MessageType type, const QString &msg)QXmppLoggablesignal
logReceived(const QString &message)QXmppLoggableinlineprotected
logSent(const QString &message)QXmppLoggableinlineprotected
messageDelivered(const QString &jid, const QString &id)QXmppMessageReceiptManagersignal
QXmppClientExtension()QXmppClientExtension
QXmppLoggable(QObject *parent=0)QXmppLoggable
QXmppMessageReceiptManager()QXmppMessageReceiptManager
setClient(QXmppClient *client)QXmppClientExtensionprotectedvirtual
setGauge(const QString &gauge, double value)QXmppLoggablesignal
updateCounter(const QString &counter, qint64 amount=1)QXmppLoggablesignal
warning(const QString &message)QXmppLoggableinlineprotected
~QXmppClientExtension()QXmppClientExtensionvirtual
qxmpp-0.7.6/doc/html/classQXmppArchiveRetrieveIq-members.html0000644000175000007640000003421312116723632024243 0ustar sharkyjerryweb QXmpp: Member List
QXmppArchiveRetrieveIq Member List

This is the complete list of members for QXmppArchiveRetrieveIq, including all inherited members.

error() const QXmppStanza
Error enum valueQXmppIq
extendedAddresses() const QXmppStanza
extensions() const QXmppStanza
from() const QXmppStanza
Get enum valueQXmppIq
id() const QXmppStanza
lang() const QXmppStanza
operator=(const QXmppIq &other)QXmppIq
QXmppStanza::operator=(const QXmppStanza &other)QXmppStanza
QXmppArchiveRetrieveIq() (defined in QXmppArchiveRetrieveIq)QXmppArchiveRetrieveIq
QXmppIq(QXmppIq::Type type=QXmppIq::Get)QXmppIq
QXmppIq(const QXmppIq &other)QXmppIq
QXmppStanza(const QString &from=QString(), const QString &to=QString())QXmppStanza
QXmppStanza(const QXmppStanza &other)QXmppStanza
Result enum valueQXmppIq
resultSetQuery() const QXmppArchiveRetrieveIq
Set enum valueQXmppIq
setError(const QXmppStanza::Error &error)QXmppStanza
setExtendedAddresses(const QList< QXmppExtendedAddress > &extendedAddresses)QXmppStanza
setExtensions(const QXmppElementList &elements)QXmppStanza
setFrom(const QString &)QXmppStanza
setId(const QString &)QXmppStanza
setLang(const QString &)QXmppStanza
setResultSetQuery(const QXmppResultSetQuery &rsm)QXmppArchiveRetrieveIq
setStart(const QDateTime &start)QXmppArchiveRetrieveIq
setTo(const QString &)QXmppStanza
setType(QXmppIq::Type)QXmppIq
setWith(const QString &with)QXmppArchiveRetrieveIq
start() const QXmppArchiveRetrieveIq
to() const QXmppStanza
Type enum nameQXmppIq
type() const QXmppIq
with() const QXmppArchiveRetrieveIq
~QXmppIq() (defined in QXmppIq)QXmppIq
~QXmppStanza()QXmppStanzavirtual
qxmpp-0.7.6/doc/html/functions_prop.html0000644000175000007640000002037512116723632020272 0ustar sharkyjerryweb QXmpp: Class Members - Properties
QXmpp  Version:0.7.6
 
qxmpp-0.7.6/doc/html/annotated.html0000644000175000007640000010375412116723632017202 0ustar sharkyjerryweb QXmpp: Class List
QXmpp  Version:0.7.6
Class List
Here are the classes, structs, unions and interfaces with brief descriptions:
[detail level 12]
oCQXmppArchiveChatArchived conversation as defined by XEP-0136: Message Archiving
oCQXmppArchiveChatIqRepresents an archive chat as defined by XEP-0136: Message Archiving
oCQXmppArchiveListIqRepresents an archive list as defined by XEP-0136: Message Archiving
oCQXmppArchiveManagerMakes it possible to access message archives as defined by XEP-0136: Message Archiving
oCQXmppArchiveMessageArchived message as defined by XEP-0136: Message Archiving
oCQXmppArchivePrefIqRepresents an archive preference IQ as defined by XEP-0136: Message Archiving
oCQXmppArchiveRemoveIqRepresents an archive remove IQ as defined by XEP-0136: Message Archiving
oCQXmppArchiveRetrieveIqRepresents an archive retrieve IQ as defined by XEP-0136: Message Archiving
oCQXmppBindIqIQ used for resource binding as defined by RFC 3921
oCQXmppBookmarkConferenceBookmark for a conference room, as defined by XEP-0048: Bookmarks
oCQXmppBookmarkManagerAllows you to store and retrieve bookmarks as defined by XEP-0048: Bookmarks
oCQXmppBookmarkSetThe QXmppbookmarkSets class represents a set of bookmarks, as defined by XEP-0048: Bookmarks
oCQXmppBookmarkUrlBookmark for a web page, as defined by XEP-0048: Bookmarks
oCQXmppCallVoice-Over-IP call to a remote party
oCQXmppCallManagerSupport for making and receiving voice calls
oCQXmppClientMain class for using QXmpp
oCQXmppClientExtensionBase class for QXmppClient extensions
oCQXmppConfigurationHolds configuration options
oCQXmppDataFormData form as defined by XEP-0004: Data Forms
|oCFieldThe QXmppDataForm::Field class represents a data form field as defined by XEP-0004: Data Forms
|\CMediaThe QXmppDataForm::Media class represents a media field as defined by XEP-0221: Data Forms Media Element
oCQXmppDialbackStanza used for the Server Dialback protocol as specified by XEP-0220: Server Dialback
oCQXmppDiscoveryManagerMakes it possible to discover information about other entities as defined by XEP-0030: Service Discovery
oCQXmppEntityTimeManagerProvided the functionality to get the local time of an entity as defined by XEP-0202: Entity Time
oCQXmppExtendedAddressRepresents an extended address as defined by XEP-0033: Extended Stanza Addressing
oCQXmppIceComponentPiece of a media stream requiring a single transport address, as defined by RFC 5245 (Interactive Connectivity Establishment)
oCQXmppIceConnectionSet of UDP sockets capable of performing Interactive Connectivity Establishment (RFC 5245)
oCQXmppIncomingClientInterface for password checkers
oCQXmppIncomingServerIncoming XMPP stream from an XMPP server
oCQXmppInvokable
oCQXmppIqBase class for all IQs
oCQXmppJingleCandidateTransport candidate as specified by XEP-0176: Jingle ICE-UDP Transport Method
oCQXmppJingleIqIQ used for initiating media sessions as specified by XEP-0166: Jingle
oCQXmppJinglePayloadTypePayload type as specified by XEP-0167: Jingle RTP Sessions and RFC 5245
oCQXmppLoggableSource of logging messages
oCQXmppLoggerSink for logging messages
oCQXmppMessageXMPP message
oCQXmppMessageReceiptManagerMakes it possible to send and receive message delivery receipts as defined in XEP-0184: Message Delivery Receipts
oCQXmppMucAdminIqChat room administration IQ as defined by XEP-0045: Multi-User Chat
oCQXmppMucItemChat room "item"
oCQXmppMucManagerMakes it possible to interact with multi-user chat rooms as defined by XEP-0045: Multi-User Chat
oCQXmppMucOwnerIqChat room configuration IQ as defined by XEP-0045: Multi-User Chat
oCQXmppMucRoomMulti-user chat room as defined by XEP-0045: Multi-User Chat
oCQXmppOutgoingClientOutgoing XMPP stream to an XMPP server
oCQXmppOutgoingServerOutgoing XMPP stream to another XMPP server
oCQXmppPasswordCheckerAbstract password checker
oCQXmppPasswordReplyPassword reply
oCQXmppPasswordRequestPassword request
oCQXmppPresenceXMPP presence stanza
oCQXmppPubSubIqIQ used for the publish-subscribe mechanisms defined by XEP-0060: Publish-Subscribe
oCQXmppPubSubItemPublish-subscribe item as defined by XEP-0060: Publish-Subscribe
oCQXmppRegisterIqRegistration IQ as defined by XEP-0077: In-Band Registration
oCQXmppResultSetQuerySet element in a query as defined by XEP-0059: Result Set Management
oCQXmppResultSetReplySet element in a reply as defined by XEP-0059: Result Set Management
oCQXmppRosterIqRoster IQ
|\CItemThe QXmppRosterIq::Item class represents a roster entry
oCQXmppRosterManagerAccess to a connected client's roster
oCQXmppRpcInvokeIqIQ used to carry an RPC invocation as specified by XEP-0009: Jabber-RPC
oCQXmppRpcManagerMake it possible to invoke remote methods and to expose local interfaces for remote procedure calls, as specified by XEP-0009: Jabber-RPC
oCQXmppRpcResponseIqIQ used to carry an RPC response as specified by XEP-0009: Jabber-RPC
oCQXmppRtpAudioChannelRTP audio channel to a remote party
oCQXmppRtpPacketRTP packet
oCQXmppRtpVideoChannelRTP video channel to a remote party
oCQXmppServerXMPP server
oCQXmppServerExtensionBase class for QXmppServer extensions
oCQXmppServerPluginBase class for QXmppServer plugins
oCQXmppSessionIqIQ used for session establishment as defined by RFC 3921
oCQXmppSslServerSSL-enabled TCP server
oCQXmppStanzaBase class for all XMPP stanzas
oCQXmppStreamBase class for all XMPP streams
oCQXmppTransferJobSingle file transfer job
oCQXmppTransferManagerSupport for sending and receiving files
oCQXmppUtilsStatic utility functions
oCQXmppVCardAddressRepresent a vCard address
oCQXmppVCardEmailRepresents a vCard e-mail address
oCQXmppVCardIqRepresents the XMPP vCard
oCQXmppVCardManagerGets/sets XMPP vCards. It is an implementation of XEP-0054: vcard-temp
oCQXmppVCardPhoneRepresents a vCard phone number
oCQXmppVersionIqIQ for conveying a software version as defined by XEP-0092: Software Version
oCQXmppVersionManagerMakes it possible to request for the software version of an entity as defined by XEP-0092: Software Version
\CQXmppVideoFrameRepresentation of a frame of video data
qxmpp-0.7.6/doc/html/classQXmppArchiveListIq-members.html0000644000175000007640000003723212116723632023375 0ustar sharkyjerryweb QXmpp: Member List
QXmppArchiveListIq Member List

This is the complete list of members for QXmppArchiveListIq, including all inherited members.

chats() const QXmppArchiveListIq
end() const QXmppArchiveListIq
Error enum valueQXmppIq
error() const QXmppStanza
extendedAddresses() const QXmppStanza
extensions() const QXmppStanza
from() const QXmppStanza
Get enum valueQXmppIq
id() const QXmppStanza
lang() const QXmppStanza
operator=(const QXmppIq &other)QXmppIq
QXmppStanza::operator=(const QXmppStanza &other)QXmppStanza
QXmppArchiveListIq()QXmppArchiveListIq
QXmppIq(QXmppIq::Type type=QXmppIq::Get)QXmppIq
QXmppIq(const QXmppIq &other)QXmppIq
QXmppStanza(const QString &from=QString(), const QString &to=QString())QXmppStanza
QXmppStanza(const QXmppStanza &other)QXmppStanza
Result enum valueQXmppIq
resultSetQuery() const QXmppArchiveListIq
resultSetReply() const QXmppArchiveListIq
Set enum valueQXmppIq
setChats(const QList< QXmppArchiveChat > &chats)QXmppArchiveListIq
setEnd(const QDateTime &end)QXmppArchiveListIq
setError(const QXmppStanza::Error &error)QXmppStanza
setExtendedAddresses(const QList< QXmppExtendedAddress > &extendedAddresses)QXmppStanza
setExtensions(const QXmppElementList &elements)QXmppStanza
setFrom(const QString &)QXmppStanza
setId(const QString &)QXmppStanza
setLang(const QString &)QXmppStanza
setResultSetQuery(const QXmppResultSetQuery &rsm)QXmppArchiveListIq
setResultSetReply(const QXmppResultSetReply &rsm)QXmppArchiveListIq
setStart(const QDateTime &start)QXmppArchiveListIq
setTo(const QString &)QXmppStanza
setType(QXmppIq::Type)QXmppIq
setWith(const QString &with)QXmppArchiveListIq
start() const QXmppArchiveListIq
to() const QXmppStanza
Type enum nameQXmppIq
type() const QXmppIq
with() const QXmppArchiveListIq
~QXmppIq() (defined in QXmppIq)QXmppIq
~QXmppStanza()QXmppStanzavirtual
qxmpp-0.7.6/doc/html/nav_g.png0000644000175000007640000000013712116723632016126 0ustar sharkyjerrywebPNG  IHDR1&IDATx1 OHf_ ->~M iMS<IENDB`qxmpp-0.7.6/doc/html/functions.html0000644000175000007640000003161312116723632017227 0ustar sharkyjerryweb QXmpp: Class Members
QXmpp  Version:0.7.6
Here is a list of all documented class members with links to the class documentation for each member:

- a -

qxmpp-0.7.6/doc/html/open.png0000644000175000007640000000017312116723632015775 0ustar sharkyjerrywebPNG  IHDR BIDATx 0 ׬ՙ\39b!9{|I>$#ߴ8/z/>2[giU,/~\ 9ٸIENDB`qxmpp-0.7.6/doc/html/classQXmppLoggable-members.html0000644000175000007640000001735612116723632022407 0ustar sharkyjerryweb QXmpp: Member List
QXmppLoggable Member List

This is the complete list of members for QXmppLoggable, including all inherited members.

debug(const QString &message)QXmppLoggableinlineprotected
info(const QString &message)QXmppLoggableinlineprotected
logMessage(QXmppLogger::MessageType type, const QString &msg)QXmppLoggablesignal
logReceived(const QString &message)QXmppLoggableinlineprotected
logSent(const QString &message)QXmppLoggableinlineprotected
QXmppLoggable(QObject *parent=0)QXmppLoggable
setGauge(const QString &gauge, double value)QXmppLoggablesignal
updateCounter(const QString &counter, qint64 amount=1)QXmppLoggablesignal
warning(const QString &message)QXmppLoggableinlineprotected
qxmpp-0.7.6/doc/html/classQXmppServerExtension.html0000644000175000007640000005414312116723632022401 0ustar sharkyjerryweb QXmpp: QXmppServerExtension Class Reference

The QXmppServerExtension class is the base class for QXmppServer extensions. More...

#include <QXmppServerExtension.h>

Inheritance diagram for QXmppServerExtension:
QXmppLoggable

Public Member Functions

virtual QString extensionName () const
virtual int extensionPriority () const
virtual QStringList discoveryFeatures () const
virtual QStringList discoveryItems () const
virtual bool handleStanza (const QDomElement &stanza)
virtual QSet< QString > presenceSubscribers (const QString &jid)
virtual QSet< QString > presenceSubscriptions (const QString &jid)
virtual bool start ()
virtual void stop ()
 Stops the extension.
- Public Member Functions inherited from QXmppLoggable
 QXmppLoggable (QObject *parent=0)

Protected Member Functions

QXmppServerserver () const
 Returns the server which loaded this extension.
- Protected Member Functions inherited from QXmppLoggable
void debug (const QString &message)
void info (const QString &message)
void warning (const QString &message)
void logReceived (const QString &message)
void logSent (const QString &message)

Friends

class QXmppServer

Additional Inherited Members

- Signals inherited from QXmppLoggable
void setGauge (const QString &gauge, double value)
 Sets the given gauge to value.
void logMessage (QXmppLogger::MessageType type, const QString &msg)
 This signal is emitted to send logging messages.
void updateCounter (const QString &counter, qint64 amount=1)
 Updates the given counter by amount.

Detailed Description

The QXmppServerExtension class is the base class for QXmppServer extensions.

If you want to extend QXmppServer, for instance to support an IQ type which is not natively supported, you can subclass QXmppServerExtension and implement handleStanza(). You can then add your extension to the client instance using QXmppServer::addExtension().

Member Function Documentation

QStringList QXmppServerExtension::discoveryFeatures ( ) const
virtual

Returns the discovery features to add to the server.

QStringList QXmppServerExtension::discoveryItems ( ) const
virtual

Returns the discovery items to add to the server.

QString QXmppServerExtension::extensionName ( ) const
virtual

Returns the extension's name.

int QXmppServerExtension::extensionPriority ( ) const
virtual

Returns the extension's priority.

Higher priority extensions are called first when handling incoming stanzas.

The default implementation returns 0.

bool QXmppServerExtension::handleStanza ( const QDomElement &  stanza)
virtual

Handles an incoming XMPP stanza.

Return true if no further processing should occur, false otherwise.

Parameters
stanzaThe received stanza.
QSet< QString > QXmppServerExtension::presenceSubscribers ( const QString &  jid)
virtual

Returns the list of subscribers for the given JID.

Parameters
jid
QSet< QString > QXmppServerExtension::presenceSubscriptions ( const QString &  jid)
virtual

Returns the list of subscriptions for the given JID.

Parameters
jid
bool QXmppServerExtension::start ( )
virtual

Starts the extension.

Return true if the extension was started, false otherwise.


The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/group__Core.html0000644000175000007640000001777012116723632017472 0ustar sharkyjerryweb QXmpp: Core
QXmpp  Version:0.7.6
Core

Classes

class  QXmppLogger
 The QXmppLogger class represents a sink for logging messages. More...
class  QXmppLoggable
 The QXmppLoggable class represents a source of logging messages. More...
class  QXmppClient
 The QXmppClient class is the main class for using QXmpp. More...
class  QXmppClientExtension
 The QXmppClientExtension class is the base class for QXmppClient extensions. More...
class  QXmppServer
 The QXmppServer class represents an XMPP server. More...
class  QXmppServerExtension
 The QXmppServerExtension class is the base class for QXmppServer extensions. More...

Detailed Description

qxmpp-0.7.6/doc/html/classQXmppInvokable.html0000644000175000007640000003027612116723632021151 0ustar sharkyjerryweb QXmpp: QXmppInvokable Class Reference

#include <QXmppInvokable.h>

Public Slots

QStringList interfaces () const

Public Member Functions

 QXmppInvokable (QObject *parent=0)
 ~QXmppInvokable ()
 Destroys a QXmppInvokable.
QVariant dispatch (const QByteArray &method, const QList< QVariant > &args=QList< QVariant >())
virtual bool isAuthorized (const QString &jid) const =0

Static Public Member Functions

static QList< QByteArray > paramTypes (const QList< QVariant > &params)

Detailed Description

This is the base class for all objects that will be invokable via RPC. All public slots of objects derived from this class will be exposed to the RPC interface. As a note for all methods, they can only understand types that QVariant knows about.

    @author Ian Reinhart Geiser <geiseri@kde.org>

Constructor & Destructor Documentation

QXmppInvokable::QXmppInvokable ( QObject *  parent = 0)

Constructs a QXmppInvokable with the specified parent.

Parameters
parent

Member Function Documentation

QVariant QXmppInvokable::dispatch ( const QByteArray &  method,
const QList< QVariant > &  args = QList<QVariant>() 
)

Execute a method on an object. with a set of arguments. This method is reentrant, and the method that is invoked will be done in a thread safe manner. It should be noted that while this method is threadsafe and reentrant the side affects of the methods invoked may not be.

QStringList QXmppInvokable::interfaces ( ) const
slot

This provides a list of interfaces for introspection of the presented interface.

virtual bool QXmppInvokable::isAuthorized ( const QString &  jid) const
pure virtual

Reimplement this method to return a true if the invoking JID is allowed to execute the method.

QList< QByteArray > QXmppInvokable::paramTypes ( const QList< QVariant > &  params)
static

Utility method to convert a QList<QVariant> to a list of types for type checking.


The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/functions_func_0x6c.html0000644000175000007640000002443612116723632021107 0ustar sharkyjerryweb QXmpp: Class Members - Functions
QXmpp  Version:0.7.6
 

- l -

qxmpp-0.7.6/doc/html/ftv2lastnode.png0000644000175000007640000000012612116723632017445 0ustar sharkyjerrywebPNG  IHDRɪ|IDATxݱðScOx@ y}IENDB`qxmpp-0.7.6/doc/html/bc_s.png0000644000175000007640000000125012116723632015737 0ustar sharkyjerrywebPNG  IHDR /9oIDATxMLANvKPJikR5^ChŃ!Dz *U4VbD1~`8x@^?@јn`JLLئXi v9)}aV&0)(zkNcFP'@KZK%!135}ݏd㰒>hGZ zڗi얺=@OȂ1ӯ3F[dJ`|^3\]'fy@Cos˧d:?$lhn nm\$cL6x@NoPΑՔG>9Q@.qܴ PCt(yQ$hN8 MNj$Őo_sLIENDB`qxmpp-0.7.6/doc/html/QXmppBindIq_8h_source.html0000644000175000007640000003001012116723632021320 0ustar sharkyjerryweb QXmpp: QXmppBindIq.h Source File
QXmpp  Version:0.7.6
QXmppBindIq.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Authors:
5  * Manjeet Dahiya
6  * Jeremy Lainé
7  *
8  * Source:
9  * http://code.google.com/p/qxmpp
10  *
11  * This file is a part of QXmpp library.
12  *
13  * This library is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU Lesser General Public
15  * License as published by the Free Software Foundation; either
16  * version 2.1 of the License, or (at your option) any later version.
17  *
18  * This library is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21  * Lesser General Public License for more details.
22  *
23  */
24 
25 
26 #ifndef QXMPPBINDIQ_H
27 #define QXMPPBINDIQ_H
28 
29 #include "QXmppIq.h"
30 
35 
36 class QXMPP_EXPORT QXmppBindIq : public QXmppIq
37 {
38 public:
39  QString jid() const;
40  void setJid(const QString&);
41 
42  QString resource() const;
43  void setResource(const QString&);
44 
46  static bool isBindIq(const QDomElement &element);
48 
49 protected:
51  void parseElementFromChild(const QDomElement &element);
52  void toXmlElementFromChild(QXmlStreamWriter *writer) const;
54 
55 private:
56  QString m_jid;
57  QString m_resource;
58 };
59 
60 #endif // QXMPPBIND_H
qxmpp-0.7.6/doc/html/functions_0x6c.html0000644000175000007640000002567712116723632020104 0ustar sharkyjerryweb QXmpp: Class Members
QXmpp  Version:0.7.6
Here is a list of all documented class members with links to the class documentation for each member:

- l -

qxmpp-0.7.6/doc/html/classQXmppRegisterIq-members.html0000644000175000007640000003536312116723632022747 0ustar sharkyjerryweb QXmpp: Member List
QXmppRegisterIq Member List

This is the complete list of members for QXmppRegisterIq, including all inherited members.

email() const QXmppRegisterIq
Error enum valueQXmppIq
error() const QXmppStanza
extendedAddresses() const QXmppStanza
extensions() const QXmppStanza
form() const QXmppRegisterIq
from() const QXmppStanza
Get enum valueQXmppIq
id() const QXmppStanza
instructions() const QXmppRegisterIq
lang() const QXmppStanza
operator=(const QXmppIq &other)QXmppIq
QXmppStanza::operator=(const QXmppStanza &other)QXmppStanza
password() const QXmppRegisterIq
QXmppIq(QXmppIq::Type type=QXmppIq::Get)QXmppIq
QXmppIq(const QXmppIq &other)QXmppIq
QXmppStanza(const QString &from=QString(), const QString &to=QString())QXmppStanza
QXmppStanza(const QXmppStanza &other)QXmppStanza
Result enum valueQXmppIq
Set enum valueQXmppIq
setEmail(const QString &email)QXmppRegisterIq
setError(const QXmppStanza::Error &error)QXmppStanza
setExtendedAddresses(const QList< QXmppExtendedAddress > &extendedAddresses)QXmppStanza
setExtensions(const QXmppElementList &elements)QXmppStanza
setForm(const QXmppDataForm &form)QXmppRegisterIq
setFrom(const QString &)QXmppStanza
setId(const QString &)QXmppStanza
setInstructions(const QString &instructions)QXmppRegisterIq
setLang(const QString &)QXmppStanza
setPassword(const QString &username)QXmppRegisterIq
setTo(const QString &)QXmppStanza
setType(QXmppIq::Type)QXmppIq
setUsername(const QString &username)QXmppRegisterIq
to() const QXmppStanza
type() const QXmppIq
Type enum nameQXmppIq
username() const QXmppRegisterIq
~QXmppIq() (defined in QXmppIq)QXmppIq
~QXmppStanza()QXmppStanzavirtual
qxmpp-0.7.6/doc/html/classQXmppArchiveMessage-members.html0000644000175000007640000001544312116723632023554 0ustar sharkyjerryweb QXmpp: Member List
QXmppArchiveMessage Member List

This is the complete list of members for QXmppArchiveMessage, including all inherited members.

body() const QXmppArchiveMessage
date() const QXmppArchiveMessage
isReceived() const QXmppArchiveMessage
QXmppArchiveMessage() (defined in QXmppArchiveMessage)QXmppArchiveMessage
setBody(const QString &body)QXmppArchiveMessage
setDate(const QDateTime &date)QXmppArchiveMessage
setReceived(bool isReceived)QXmppArchiveMessage
qxmpp-0.7.6/doc/html/classQXmppStream.html0000644000175000007640000006071312116723632020471 0ustar sharkyjerryweb QXmpp: QXmppStream Class Reference

The QXmppStream class is the base class for all XMPP streams. More...

#include <QXmppStream.h>

Inheritance diagram for QXmppStream:
QXmppLoggable QXmppIncomingClient QXmppIncomingServer QXmppOutgoingClient QXmppOutgoingServer

Public Slots

virtual void disconnectFromHost ()
virtual bool sendData (const QByteArray &)

Signals

void connected ()
 This signal is emitted when the stream is connected.
void disconnected ()
 This signal is emitted when the stream is disconnected.
- Signals inherited from QXmppLoggable
void setGauge (const QString &gauge, double value)
 Sets the given gauge to value.
void logMessage (QXmppLogger::MessageType type, const QString &msg)
 This signal is emitted to send logging messages.
void updateCounter (const QString &counter, qint64 amount=1)
 Updates the given counter by amount.

Public Member Functions

 QXmppStream (QObject *parent)
 ~QXmppStream ()
 Destroys a base XMPP stream.
virtual bool isConnected () const
bool sendPacket (const QXmppStanza &)
- Public Member Functions inherited from QXmppLoggable
 QXmppLoggable (QObject *parent=0)

Protected Member Functions

QSslSocket * socket () const
void setSocket (QSslSocket *socket)
virtual void handleStart ()
virtual void handleStanza (const QDomElement &element)=0
virtual void handleStream (const QDomElement &element)=0
- Protected Member Functions inherited from QXmppLoggable
void debug (const QString &message)
void info (const QString &message)
void warning (const QString &message)
void logReceived (const QString &message)
void logSent (const QString &message)

Detailed Description

The QXmppStream class is the base class for all XMPP streams.

Constructor & Destructor Documentation

QXmppStream::QXmppStream ( QObject *  parent)

Constructs a base XMPP stream.

Parameters
parent

Member Function Documentation

void QXmppStream::disconnectFromHost ( )
virtualslot

Disconnects from the remote host.

virtual void QXmppStream::handleStanza ( const QDomElement &  element)
protectedpure virtual

Handles an incoming XMPP stanza.

Parameters
element
void QXmppStream::handleStart ( )
protectedvirtual

Handles a stream start event, which occurs when the underlying transport becomes ready (socket connected, encryption started).

If you redefine handleStart(), make sure to call the base class's method.

virtual void QXmppStream::handleStream ( const QDomElement &  element)
protectedpure virtual

Handles an incoming XMPP stream start.

Parameters
element
bool QXmppStream::isConnected ( ) const
virtual

Returns true if the stream is connected.

Reimplemented in QXmppOutgoingClient, QXmppOutgoingServer, QXmppIncomingClient, and QXmppIncomingServer.

bool QXmppStream::sendData ( const QByteArray &  data)
virtualslot

Sends raw data to the peer.

Parameters
data
bool QXmppStream::sendPacket ( const QXmppStanza packet)

Sends an XMPP packet to the peer.

Parameters
packet
void QXmppStream::setSocket ( QSslSocket *  socket)
protected

Sets the QSslSocket used for this stream.

QSslSocket * QXmppStream::socket ( ) const
protected

Returns the QSslSocket used for this stream.

Reimplemented in QXmppOutgoingClient.


The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppServer-members.html0000644000175000007640000003506512116723632022136 0ustar sharkyjerryweb QXmpp: Member List
QXmppServer Member List

This is the complete list of members for QXmppServer, including all inherited members.

addCaCertificates(const QString &caCertificates)QXmppServer
addExtension(QXmppServerExtension *extension)QXmppServer
addIncomingClient(QXmppIncomingClient *stream)QXmppServer
clientConnected(const QString &jid)QXmppServersignal
clientDisconnected(const QString &jid)QXmppServersignal
close()QXmppServer
debug(const QString &message)QXmppLoggableinlineprotected
domain() const QXmppServer
extensions()QXmppServer
handleElement(const QDomElement &element)QXmppServerslot
info(const QString &message)QXmppLoggableinlineprotected
listenForClients(const QHostAddress &address=QHostAddress::Any, quint16 port=5222)QXmppServer
listenForServers(const QHostAddress &address=QHostAddress::Any, quint16 port=5269)QXmppServer
loggerQXmppServer
logger() (defined in QXmppServer)QXmppServer
loggerChanged(QXmppLogger *logger)QXmppServersignal
logMessage(QXmppLogger::MessageType type, const QString &msg)QXmppLoggablesignal
logReceived(const QString &message)QXmppLoggableinlineprotected
logSent(const QString &message)QXmppLoggableinlineprotected
passwordChecker()QXmppServer
QXmppLoggable(QObject *parent=0)QXmppLoggable
QXmppServer(QObject *parent=0)QXmppServer
QXmppServerPrivate (defined in QXmppServer)QXmppServerfriend
sendElement(const QDomElement &element)QXmppServer
sendPacket(const QXmppStanza &stanza)QXmppServer
setDomain(const QString &domain)QXmppServer
setGauge(const QString &gauge, double value)QXmppLoggablesignal
setLocalCertificate(const QString &path)QXmppServer
setLogger(QXmppLogger *logger)QXmppServer
setPasswordChecker(QXmppPasswordChecker *checker)QXmppServer
setPrivateKey(const QString &path)QXmppServer
statistics() const QXmppServer
updateCounter(const QString &counter, qint64 amount=1)QXmppLoggablesignal
warning(const QString &message)QXmppLoggableinlineprotected
~QXmppServer()QXmppServer
qxmpp-0.7.6/doc/html/classQXmppResultSetReply.html0000644000175000007640000003067712116723632022212 0ustar sharkyjerryweb QXmpp: QXmppResultSetReply Class Reference
QXmppResultSetReply Class Reference

The QXmppResultSetReply class represents a set element in a reply as defined by XEP-0059: Result Set Management. More...

#include <QXmppResultSet.h>

Public Member Functions

QString first () const
 Returns the UID of the first result in the page.
void setFirst (const QString &first)
 Sets the UID of the first result in the page.
QString last () const
 Returns the UID of the last result in the page.
void setLast (const QString &last)
 Sets the UID of the last result in the page.
int count () const
void setCount (int count)
int index () const
void setIndex (int index)
bool isNull () const
 Returns true if no result set information is present.

Detailed Description

The QXmppResultSetReply class represents a set element in a reply as defined by XEP-0059: Result Set Management.

Member Function Documentation

int QXmppResultSetReply::count ( ) const

Returns the total number of items in the set.

Note
This may be an approximate count.
int QXmppResultSetReply::index ( ) const

Returns the index for the first result in the page.

This is used for retrieving pages out of order.

Note
This may be an approximate index.
void QXmppResultSetReply::setCount ( int  count)

Sets the total number of items in the set.

Note
This may be an approximate count.
void QXmppResultSetReply::setIndex ( int  index)

Sets the index for the first result in the page.

This is used for retrieving pages out of order.

Note
This may be an approximate index.

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppMucRoom.html0000644000175000007640000012717212116723632020622 0ustar sharkyjerryweb QXmpp: QXmppMucRoom Class Reference

The QXmppMucRoom class represents a multi-user chat room as defined by XEP-0045: Multi-User Chat. More...

#include <QXmppMucManager.h>

Public Types

enum  Action {
  NoAction = 0, SubjectAction = 1, ConfigurationAction = 2, PermissionsAction = 4,
  KickAction = 8
}
 This enum is used to describe chat room actions. More...

Public Slots

bool ban (const QString &jid, const QString &reason)
bool join ()
bool kick (const QString &jid, const QString &reason)
bool leave (const QString &message=QString())
bool requestConfiguration ()
bool requestPermissions ()
bool setConfiguration (const QXmppDataForm &form)
bool setPermissions (const QList< QXmppMucItem > &permissions)
bool sendInvitation (const QString &jid, const QString &reason)
bool sendMessage (const QString &text)

Signals

void allowedActionsChanged (QXmppMucRoom::Actions actions) const
 This signal is emitted when the allowed actions change.
void configurationReceived (const QXmppDataForm &configuration)
 This signal is emitted when the configuration form for the room is received.
void error (const QXmppStanza::Error &error)
 This signal is emitted when an error is encountered.
void joined ()
 This signal is emitted once you have joined the room.
void kicked (const QString &jid, const QString &reason)
 This signal is emitted if you get kicked from the room.
void left ()
 This signal is emitted once you have left the room.
void messageReceived (const QXmppMessage &message)
 This signal is emitted when a message is received.
void nameChanged (const QString &name)
 This signal is emitted when the room's human-readable name changes.
void nickNameChanged (const QString &nickName)
 This signal is emitted when your own nick name changes.
void participantAdded (const QString &jid)
 This signal is emitted when a participant joins the room.
void participantChanged (const QString &jid)
 This signal is emitted when a participant changes.
void participantRemoved (const QString &jid)
 This signal is emitted when a participant leaves the room.
void permissionsReceived (const QList< QXmppMucItem > &permissions)
 This signal is emitted when the room's permissions are received.
void subjectChanged (const QString &subject)
 This signal is emitted when the room's subject changes.

Public Member Functions

 ~QXmppMucRoom ()
 Destroys a QXmppMucRoom.
Actions allowedActions () const
bool isJoined () const
QString jid () const
QString name () const
QString nickName () const
void setNickName (const QString &nickName)
Q_INVOKABLE QString participantFullJid (const QString &jid) const
QXmppPresence participantPresence (const QString &jid) const
QStringList participants () const
QString password () const
void setPassword (const QString &password)
QString subject () const
void setSubject (const QString &subject)

Properties

QXmppMucRoom::Actions allowedActions
 Returns the actions you are allowed to perform on the room.
bool isJoined
 Returns true if you are currently in the room.
QString jid
 Returns the chat room's bare JID.
QString name
QString nickName
 Returns your own nickname.
QStringList participants
QString password
 Returns the chat room password.
QString subject
 Returns the room's subject.

Friends

class QXmppMucManager

Detailed Description

The QXmppMucRoom class represents a multi-user chat room as defined by XEP-0045: Multi-User Chat.

See Also
QXmppMucManager

Member Enumeration Documentation

This enum is used to describe chat room actions.

Enumerator:
NoAction 

no action

SubjectAction 

change the room's subject

ConfigurationAction 

change the room's configuration

PermissionsAction 

change the room's permissions

KickAction 

kick users from the room

Member Function Documentation

bool QXmppMucRoom::ban ( const QString &  jid,
const QString &  reason 
)
slot

Bans the specified user from the chat room.

The specified jid is the Bare JID of the form "user@host".

Returns
true if the request was sent, false otherwise
bool QXmppMucRoom::join ( )
slot

Joins the chat room.

Returns
true if the request was sent, false otherwise
bool QXmppMucRoom::kick ( const QString &  jid,
const QString &  reason 
)
slot

Kicks the specified user from the chat room.

The specified jid is the Occupant JID of the form "room@service/nick".

Returns
true if the request was sent, false otherwise
bool QXmppMucRoom::leave ( const QString &  message = QString())
slot

Leaves the chat room.

Parameters
messageAn optional message.
Returns
true if the request was sent, false otherwise
QString QXmppMucRoom::participantFullJid ( const QString &  jid) const

Returns the "Full JID" of the given participant.

The specified jid is the Occupant JID of the form "room@service/nick".

QXmppPresence QXmppMucRoom::participantPresence ( const QString &  jid) const

Returns the presence for the given participant.

The specified jid is the Occupant JID of the form "room@service/nick".

bool QXmppMucRoom::requestConfiguration ( )
slot

Request the configuration form for the chat room.

Returns
true if the request was sent, false otherwise
See Also
configurationReceived()
bool QXmppMucRoom::requestPermissions ( )
slot

Request the room's permissions.

Returns
true if the request was sent, false otherwise
See Also
permissionsReceived()
bool QXmppMucRoom::sendInvitation ( const QString &  jid,
const QString &  reason 
)
slot

Invites a user to the chat room.

Parameters
jid
reason
Returns
true if the request was sent, false otherwise
bool QXmppMucRoom::sendMessage ( const QString &  text)
slot

Sends a message to the room.

Returns
true if the request was sent, false otherwise
bool QXmppMucRoom::setConfiguration ( const QXmppDataForm form)
slot

Send the configuration form for the chat room.

Parameters
form
Returns
true if the request was sent, false otherwise
void QXmppMucRoom::setNickName ( const QString &  nickName)

Sets your own nickname.

You need to set your nickname before calling join().

Parameters
nickName
void QXmppMucRoom::setPassword ( const QString &  password)

Sets the chat room password.

Parameters
password
bool QXmppMucRoom::setPermissions ( const QList< QXmppMucItem > &  permissions)
slot

Sets the room's permissions.

Parameters
permissions
Returns
true if the request was sent, false otherwise
void QXmppMucRoom::setSubject ( const QString &  subject)

Sets the chat room's subject.

Parameters
subject

Property Documentation

QString QXmppMucRoom::name
read

Returns the chat room's human-readable name.

This name will only be available after the room has been joined.

QStringList QXmppMucRoom::participants
read

Returns the list of participant JIDs.

These JIDs are Occupant JIDs of the form "room@service/nick".


The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/QXmppArchiveManager_8h_source.html0000644000175000007640000004071312116723632023041 0ustar sharkyjerryweb QXmpp: QXmppArchiveManager.h Source File
QXmpp  Version:0.7.6
QXmppArchiveManager.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Jeremy Lainé
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXMPPARCHIVEMANAGER_H
25 #define QXMPPARCHIVEMANAGER_H
26 
27 #include <QDateTime>
28 
29 #include "QXmppClientExtension.h"
30 #include "QXmppResultSet.h"
31 
32 class QXmppArchiveChat;
33 class QXmppArchiveChatIq;
34 class QXmppArchiveListIq;
35 class QXmppArchivePrefIq;
36 
52 
53 class QXMPP_EXPORT QXmppArchiveManager : public QXmppClientExtension
54 {
55  Q_OBJECT
56 
57 public:
58  void listCollections(const QString &jid, const QDateTime &start = QDateTime(), const QDateTime &end = QDateTime(),
60  void listCollections(const QString &jid, const QDateTime &start, const QDateTime &end, int max);
61  void removeCollections(const QString &jid, const QDateTime &start = QDateTime(), const QDateTime &end = QDateTime());
62  void retrieveCollection(const QString &jid, const QDateTime &start, const QXmppResultSetQuery &rsm = QXmppResultSetQuery());
63  void retrieveCollection(const QString &jid, const QDateTime &start, int max);
64 
66  QStringList discoveryFeatures() const;
67  bool handleStanza(const QDomElement &element);
69 
70 signals:
73  void archiveListReceived(const QList<QXmppArchiveChat>&, const QXmppResultSetReply &rsm = QXmppResultSetReply());
74 
77  void archiveChatReceived(const QXmppArchiveChat&, const QXmppResultSetReply &rsm = QXmppResultSetReply());
78 };
79 
80 #endif
qxmpp-0.7.6/doc/html/classQXmppIceComponent.html0000644000175000007640000010270712116723632021621 0ustar sharkyjerryweb QXmpp: QXmppIceComponent Class Reference

The QXmppIceComponent class represents a piece of a media stream requiring a single transport address, as defined by RFC 5245 (Interactive Connectivity Establishment). More...

#include <QXmppStun.h>

Inheritance diagram for QXmppIceComponent:
QXmppLoggable

Public Slots

void close ()
 Stops ICE connectivity checks and closes the underlying sockets.
void connectToHost ()
 Starts ICE connectivity checks.
qint64 sendDatagram (const QByteArray &datagram)

Signals

void connected ()
 This signal is emitted once ICE negotiation succeeds.
void datagramReceived (const QByteArray &datagram)
 This signal is emitted when a data packet is received.
void localCandidatesChanged ()
 This signal is emitted when the list of local candidates changes.
- Signals inherited from QXmppLoggable
void setGauge (const QString &gauge, double value)
 Sets the given gauge to value.
void logMessage (QXmppLogger::MessageType type, const QString &msg)
 This signal is emitted to send logging messages.
void updateCounter (const QString &counter, qint64 amount=1)
 Updates the given counter by amount.

Public Member Functions

 QXmppIceComponent (QObject *parent=0)
 ~QXmppIceComponent ()
 Destroys the QXmppIceComponent.
void setIceControlling (bool controlling)
 Sets whether the local party has the ICE controlling role.
void setStunServer (const QHostAddress &host, quint16 port)
void setTurnServer (const QHostAddress &host, quint16 port)
void setTurnUser (const QString &user)
void setTurnPassword (const QString &password)
QList< QXmppJingleCandidatelocalCandidates () const
 Returns the list of local candidates.
void setLocalUser (const QString &user)
void setLocalPassword (const QString &password)
int component () const
void setComponent (int component)
bool addRemoteCandidate (const QXmppJingleCandidate &candidate)
 Adds a remote STUN candidate.
void setRemoteUser (const QString &user)
void setRemotePassword (const QString &password)
bool isConnected () const
 Returns true if ICE negotiation completed, false otherwise.
void setSockets (QList< QUdpSocket * > sockets)
- Public Member Functions inherited from QXmppLoggable
 QXmppLoggable (QObject *parent=0)

Static Public Member Functions

static QList< QHostAddress > discoverAddresses ()
 Returns the list of local network addresses.
static QList< QUdpSocket * > reservePorts (const QList< QHostAddress > &addresses, int count, QObject *parent=0)

Additional Inherited Members

- Protected Member Functions inherited from QXmppLoggable
void debug (const QString &message)
void info (const QString &message)
void warning (const QString &message)
void logReceived (const QString &message)
void logSent (const QString &message)

Detailed Description

The QXmppIceComponent class represents a piece of a media stream requiring a single transport address, as defined by RFC 5245 (Interactive Connectivity Establishment).

Constructor & Destructor Documentation

QXmppIceComponent::QXmppIceComponent ( QObject *  parent = 0)

Constructs a new QXmppIceComponent.

Parameters
parent

Member Function Documentation

int QXmppIceComponent::component ( ) const

Returns the component id for the current socket, e.g. 1 for RTP and 2 for RTCP.

QList< QUdpSocket * > QXmppIceComponent::reservePorts ( const QList< QHostAddress > &  addresses,
int  count,
QObject *  parent = 0 
)
static

Tries to bind count UDP sockets on each of the given addresses.

The port numbers are chosen so that they are consecutive, starting at an even port. This makes them suitable for RTP/RTCP sockets pairs.

Parameters
addressesThe network address on which to bind the sockets.
countThe number of ports to reserve.
parentThe parent object for the sockets.
qint64 QXmppIceComponent::sendDatagram ( const QByteArray &  datagram)
slot

Sends a data packet to the remote party.

Parameters
datagram
void QXmppIceComponent::setComponent ( int  component)

Sets the component id for the current socket, e.g. 1 for RTP and 2 for RTCP.

Parameters
component
void QXmppIceComponent::setLocalPassword ( const QString &  password)

Sets the local password.

Parameters
password
void QXmppIceComponent::setLocalUser ( const QString &  user)

Sets the local user fragment.

Parameters
user
void QXmppIceComponent::setRemotePassword ( const QString &  password)

Sets the remote password.

Parameters
password
void QXmppIceComponent::setRemoteUser ( const QString &  user)

Sets the remote user fragment.

Parameters
user
void QXmppIceComponent::setSockets ( QList< QUdpSocket * >  sockets)

Sets the list of sockets to use for this component.

Parameters
sockets
void QXmppIceComponent::setStunServer ( const QHostAddress &  host,
quint16  port 
)

Sets the STUN server to use to determine server-reflexive addresses and ports.

Parameters
hostThe address of the STUN server.
portThe port of the STUN server.
void QXmppIceComponent::setTurnPassword ( const QString &  password)

Sets the password used for authentication with the TURN server.

Parameters
password
void QXmppIceComponent::setTurnServer ( const QHostAddress &  host,
quint16  port 
)

Sets the TURN server to use to relay packets in double-NAT configurations.

Parameters
hostThe address of the TURN server.
portThe port of the TURN server.
void QXmppIceComponent::setTurnUser ( const QString &  user)

Sets the user used for authentication with the TURN server.

Parameters
user

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/functions_func_0x72.html0000644000175000007640000002707512116723632021031 0ustar sharkyjerryweb QXmpp: Class Members - Functions
QXmpp  Version:0.7.6
 

- r -

qxmpp-0.7.6/doc/html/classQXmppIceConnection.png0000644000175000007640000000112512116723632021566 0ustar sharkyjerrywebPNG  IHDRPPLTEutRNST2IDATxђ E'nu2ٕ{( @^9LCQ#Ms,Wt~64 m kJ(95l2,I(eRxjpĻnٯ ֺLp繛qԇz|QUŜcyǾ?؅R_?\KI$킥2_$q!I_Ioc}=?È[IV!h s~ `z2DŽ1(_0 (80 (80 H)Lx`d8U;j-=u(ɴ.p^aBB?}pa.R7wփ%8RxjXIM_bh9Z۟>w n| ;^qQKű\_îB8/|}X@b`(]/G(~oH)=6zIENDB`qxmpp-0.7.6/doc/html/functions_0x71.html0000644000175000007640000003173012116723632020006 0ustar sharkyjerryweb QXmpp: Class Members
QXmpp  Version:0.7.6
Here is a list of all documented class members with links to the class documentation for each member:

- q -

qxmpp-0.7.6/doc/html/index.html0000644000175000007640000001754712116723632016340 0ustar sharkyjerryweb QXmpp: Main Page
QXmpp  Version:0.7.6
QXmpp Documentation

QXmpp is a cross-platform C++ XMPP client library based on the Qt framework. It tries to use Qt's programming conventions in order to ease the learning curve for new programmers.

QXmpp based clients are built using QXmppClient instances which handle the establishment of the XMPP connection and provide a number of high-level "managers" to perform specific tasks. You can write your own managers to extend QXmpp by subclassing QXmppClientExtension.

Main Class:

Managers to perform specific tasks:

XMPP stanzas: If you are interested in a more low-level API, you can refer to these classes.



Project Details:

Project Page: http://code.google.com/p/qxmpp/
Report Issues: http://code.google.com/p/qxmpp/issues/
New Releases: http://code.google.com/p/qxmpp/downloads/

qxmpp-0.7.6/doc/html/QXmppRemoteMethod_8h_source.html0000644000175000007640000003316212116723632022561 0ustar sharkyjerryweb QXmpp: QXmppRemoteMethod.h Source File
QXmpp  Version:0.7.6
QXmppRemoteMethod.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Authors:
5  * Ian Reinhart Geiser
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXMPPREMOTEMETHOD_H
25 #define QXMPPREMOTEMETHOD_H
26 
27 #include <QObject>
28 #include <QVariant>
29 
30 #include "QXmppRpcIq.h"
31 
32 class QXmppClient;
33 
34 struct QXmppRemoteMethodResult {
35  QXmppRemoteMethodResult() : hasError(false), code(0) { }
36  bool hasError;
37  int code;
38  QString errorMessage;
39  QVariant result;
40 };
41 
42 class QXMPP_EXPORT QXmppRemoteMethod : public QObject
43 {
44  Q_OBJECT
45 public:
46  QXmppRemoteMethod(const QString &jid, const QString &method, const QVariantList &args, QXmppClient *client);
47  QXmppRemoteMethodResult call( );
48 
49 private slots:
50  void gotError( const QXmppRpcErrorIq &iq );
51  void gotResult( const QXmppRpcResponseIq &iq );
52 
53 signals:
54  void callDone();
55 
56 private:
57  QXmppRpcInvokeIq m_payload;
58  QXmppClient *m_client;
59  QXmppRemoteMethodResult m_result;
60 
61 };
62 
63 #endif // QXMPPREMOTEMETHOD_H
qxmpp-0.7.6/doc/html/classQXmppVCardManager.html0000644000175000007640000004767112116723632021540 0ustar sharkyjerryweb QXmpp: QXmppVCardManager Class Reference
QXmppVCardManager Class Reference

The QXmppVCardManager class gets/sets XMPP vCards. It is an implementation of XEP-0054: vcard-temp. More...

#include <QXmppVCardManager.h>

Inheritance diagram for QXmppVCardManager:
QXmppClientExtension QXmppLoggable

Signals

void vCardReceived (const QXmppVCardIq &)
void clientVCardReceived ()

Public Member Functions

QString requestVCard (const QString &bareJid="")
const QXmppVCardIqclientVCard () const
void setClientVCard (const QXmppVCardIq &)
QString requestClientVCard ()
bool isClientVCardReceived () const
- Public Member Functions inherited from QXmppClientExtension
 QXmppClientExtension ()
virtual ~QXmppClientExtension ()
virtual QStringList discoveryFeatures () const
virtual QList
< QXmppDiscoveryIq::Identity > 
discoveryIdentities () const
virtual bool handleStanza (const QDomElement &stanza)=0
 You need to implement this method to process incoming XMPP stanzas.
- Public Member Functions inherited from QXmppLoggable
 QXmppLoggable (QObject *parent=0)

Additional Inherited Members

- Protected Member Functions inherited from QXmppClientExtension
QXmppClientclient ()
virtual void setClient (QXmppClient *client)

Detailed Description

The QXmppVCardManager class gets/sets XMPP vCards. It is an implementation of XEP-0054: vcard-temp.

Note
It's object should not be created using it's constructor. Instead QXmppClient::vCardManager() should be used to get the reference of instantiated object this class.

Getting vCards of entries in Roster:
It doesn't store vCards of the JIDs in the roster of connected user. Instead client has to request for a particular vCard using requestVCard(). And connect to the signal vCardReceived() to get the requested vCard.

Getting vCard of the connected client:
For getting the vCard of the connected user itself. Client can call requestClientVCard() and on the signal clientVCardReceived() it can get its vCard using clientVCard().

Setting vCard of the client:
Using setClientVCard() client can set its vCard.

Note
Client can't set/change vCards of roster entries.

Member Function Documentation

const QXmppVCardIq & QXmppVCardManager::clientVCard ( ) const

Returns the vCard of the connected client.

Returns
QXmppVCard
void QXmppVCardManager::clientVCardReceived ( )
signal

This signal is emitted when the client's vCard is received after calling the requestClientVCard() function.

bool QXmppVCardManager::isClientVCardReceived ( ) const

Returns true if vCard of the connected client has been received else false.

Returns
bool
QString QXmppVCardManager::requestClientVCard ( )

This function requests the server for vCard of the connected user itself. Once received the signal clientVCardReceived() is emitted. Received vCard can be get using clientVCard().

QString QXmppVCardManager::requestVCard ( const QString &  jid = "")

This function requests the server for vCard of the specified jid. Once received the signal vCardReceived() is emitted.

Parameters
jidJid of the specific entry in the roster
void QXmppVCardManager::setClientVCard ( const QXmppVCardIq clientVCard)

Sets the vCard of the connected client.

Parameters
clientVCardQXmppVCard
void QXmppVCardManager::vCardReceived ( const QXmppVCardIq )
signal

This signal is emitted when the requested vCard is received after calling the requestVCard() function.


The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppBookmarkManager-members.html0000644000175000007640000002717112116723632023727 0ustar sharkyjerryweb QXmpp: Member List
QXmppBookmarkManager Member List

This is the complete list of members for QXmppBookmarkManager, including all inherited members.

areBookmarksReceived() const QXmppBookmarkManager
bookmarks() const QXmppBookmarkManager
bookmarksReceived(const QXmppBookmarkSet &bookmarks)QXmppBookmarkManagersignal
client()QXmppClientExtensionprotected
debug(const QString &message)QXmppLoggableinlineprotected
discoveryFeatures() const QXmppClientExtensionvirtual
discoveryIdentities() const QXmppClientExtensionvirtual
handleStanza(const QDomElement &stanza)=0QXmppClientExtensionpure virtual
info(const QString &message)QXmppLoggableinlineprotected
logMessage(QXmppLogger::MessageType type, const QString &msg)QXmppLoggablesignal
logReceived(const QString &message)QXmppLoggableinlineprotected
logSent(const QString &message)QXmppLoggableinlineprotected
QXmppBookmarkManager()QXmppBookmarkManager
QXmppClientExtension()QXmppClientExtension
QXmppLoggable(QObject *parent=0)QXmppLoggable
setBookmarks(const QXmppBookmarkSet &bookmarks)QXmppBookmarkManager
setClient(QXmppClient *client)QXmppClientExtensionprotectedvirtual
setGauge(const QString &gauge, double value)QXmppLoggablesignal
updateCounter(const QString &counter, qint64 amount=1)QXmppLoggablesignal
warning(const QString &message)QXmppLoggableinlineprotected
~QXmppBookmarkManager()QXmppBookmarkManager
~QXmppClientExtension()QXmppClientExtensionvirtual
qxmpp-0.7.6/doc/html/classQXmppArchiveMessage.html0000644000175000007640000002535312116723632022125 0ustar sharkyjerryweb QXmpp: QXmppArchiveMessage Class Reference
QXmppArchiveMessage Class Reference

The QXmppArchiveMessage class represents an archived message as defined by XEP-0136: Message Archiving. More...

#include <QXmppArchiveIq.h>

Public Member Functions

QString body () const
 Returns the archived message's body.
void setBody (const QString &body)
QDateTime date () const
 Returns the archived message's date.
void setDate (const QDateTime &date)
bool isReceived () const
 Returns true if the archived message was received, false if it was sent.
void setReceived (bool isReceived)

Detailed Description

The QXmppArchiveMessage class represents an archived message as defined by XEP-0136: Message Archiving.

Member Function Documentation

void QXmppArchiveMessage::setBody ( const QString &  body)

Sets the archived message's body.

Parameters
body
void QXmppArchiveMessage::setDate ( const QDateTime &  date)

Sets the archived message's date.

Parameters
date
void QXmppArchiveMessage::setReceived ( bool  isReceived)

Set to true if the archived message was received, false if it was sent.

Parameters
isReceived

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppBookmarkManager.png0000644000175000007640000000175712116723632022121 0ustar sharkyjerrywebPNG  IHDRWDPLTEutRNST2~IDATxY0 EU0KZ/ұl/)4H4P< @I4:?Iҩ{Cn|`gin7USm$]!`&>3d-Yʡێ|Upbx/0gZ;{|;9P˓pݩۮ]f,+{=}I7Y,I֝ (I_UJG(Ì)4~U/5:583؄F GQx GQx GRJ#$I*%ɣ$NI.uA`ۜKҩʠ17$tP70%KwX#b4KjgLZV'eS7 fI]yخn /:~YRW.{6-N)\E0u;*+y0ջNوsI)6{>l`nYR+$&$ @I!$]$y RJ WY^8M8<`d1OQx GQx GQx4M# `\ GQԮ{LaÀ4\;4-UjۍJҺmJM=`Xz5GҸ曋꿮VzRQu%`Md35f;o~'Utpҝta@<W @;M4A_ֹIENDB`qxmpp-0.7.6/doc/html/functions_0x67.html0000644000175000007640000002270312116723632020013 0ustar sharkyjerryweb QXmpp: Class Members
QXmpp  Version:0.7.6
Here is a list of all documented class members with links to the class documentation for each member:

- g -

qxmpp-0.7.6/doc/html/classQXmppRosterIq_1_1Item.html0000644000175000007640000004717012116723632022267 0ustar sharkyjerryweb QXmpp: QXmppRosterIq::Item Class Reference
QXmppRosterIq::Item Class Reference

The QXmppRosterIq::Item class represents a roster entry. More...

#include <QXmppRosterIq.h>

Public Types

enum  SubscriptionType {
  None = 0, From = 1, To = 2, Both = 3,
  Remove = 4, NotSet = 8
}
 An enumeration for type of subscription with the bareJid in the roster. More...

Public Member Functions

 Item ()
 Constructs a new roster entry.
QString bareJid () const
QSet< QString > groups () const
QString name () const
QString subscriptionStatus () const
SubscriptionType subscriptionType () const
void setBareJid (const QString &)
void setGroups (const QSet< QString > &)
void setName (const QString &)
void setSubscriptionStatus (const QString &)
void setSubscriptionType (SubscriptionType)

Detailed Description

The QXmppRosterIq::Item class represents a roster entry.

Member Enumeration Documentation

An enumeration for type of subscription with the bareJid in the roster.

Enumerator:
None 

the user does not have a subscription to the contact's presence information, and the contact does not have a subscription to the user's presence information

From 

the contact has a subscription to the user's presence information, but the user does not have a subscription to the contact's presence information

To 

the user has a subscription to the contact's presence information, but the contact does not have a subscription to the user's presence information

Both 

both the user and the contact have subscriptions to each other's presence information

Remove 

to delete a roster item

NotSet 

the subscription state was not specified

Member Function Documentation

QString QXmppRosterIq::Item::bareJid ( ) const

Returns the bareJid of the roster entry.

Returns
bareJid as a QString
QSet< QString > QXmppRosterIq::Item::groups ( ) const

Returns the groups of the roster entry.

Returns
QSet<QString> list of all the groups
QString QXmppRosterIq::Item::name ( ) const

Returns the name of the roster entry.

Returns
name as a QString
void QXmppRosterIq::Item::setBareJid ( const QString &  bareJid)

Sets the bareJid of the roster entry.

Parameters
bareJidas a QString
void QXmppRosterIq::Item::setGroups ( const QSet< QString > &  groups)

Sets the groups of the roster entry.

Parameters
groupslist of all the groups as a QSet<QString>
void QXmppRosterIq::Item::setName ( const QString &  name)

Sets the name of the roster entry.

Parameters
nameas a QString
void QXmppRosterIq::Item::setSubscriptionStatus ( const QString &  status)

Sets the subscription status of the roster entry. It is the "ask" attribute in the Roster IQ stanza. Its value can be "subscribe" or "unsubscribe" or empty.

Parameters
statusas a QString
void QXmppRosterIq::Item::setSubscriptionType ( SubscriptionType  type)

Sets the subscription type of the roster entry.

Parameters
type
QString QXmppRosterIq::Item::subscriptionStatus ( ) const

Returns the subscription status of the roster entry. It is the "ask" attribute in the Roster IQ stanza. Its value can be "subscribe" or "unsubscribe" or empty.

Returns
subscription status as a QString
QXmppRosterIq::Item::SubscriptionType QXmppRosterIq::Item::subscriptionType ( ) const

Returns the subscription type of the roster entry.


The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppClientExtension-members.html0000644000175000007640000002435112116723632023777 0ustar sharkyjerryweb QXmpp: Member List
QXmppClientExtension Member List

This is the complete list of members for QXmppClientExtension, including all inherited members.

client()QXmppClientExtensionprotected
debug(const QString &message)QXmppLoggableinlineprotected
discoveryFeatures() const QXmppClientExtensionvirtual
discoveryIdentities() const QXmppClientExtensionvirtual
handleStanza(const QDomElement &stanza)=0QXmppClientExtensionpure virtual
info(const QString &message)QXmppLoggableinlineprotected
logMessage(QXmppLogger::MessageType type, const QString &msg)QXmppLoggablesignal
logReceived(const QString &message)QXmppLoggableinlineprotected
logSent(const QString &message)QXmppLoggableinlineprotected
QXmppClient (defined in QXmppClientExtension)QXmppClientExtensionfriend
QXmppClientExtension()QXmppClientExtension
QXmppLoggable(QObject *parent=0)QXmppLoggable
setClient(QXmppClient *client)QXmppClientExtensionprotectedvirtual
setGauge(const QString &gauge, double value)QXmppLoggablesignal
updateCounter(const QString &counter, qint64 amount=1)QXmppLoggablesignal
warning(const QString &message)QXmppLoggableinlineprotected
~QXmppClientExtension()QXmppClientExtensionvirtual
qxmpp-0.7.6/doc/html/classQXmppMucManager.png0000644000175000007640000000164012116723632021067 0ustar sharkyjerrywebPNG  IHDRPLTEutRNST2/IDATxn Rcfa}iN[jӌ,ܿ,$iBFz^H&[Y(KhͶUW)L7\T3L>m&3e"|Ef(N!{dxl9#%i$Igܽ6V$2iG@fKז$$dRJi,$zMd32T2q|B#d QXmpp: QXmppPasswordRequest Class Reference
QXmppPasswordRequest Class Reference

The QXmppPasswordRequest class represents a password request. More...

#include <QXmppPasswordChecker.h>

Public Types

enum  Type { CheckPassword = 0 }
 This enum is used to describe request types.

Public Member Functions

QString domain () const
 Returns the requested domain.
void setDomain (const QString &domain)
QString password () const
 Returns the given password.
void setPassword (const QString &password)
 Sets the given password.
QString username () const
 Returns the requested username.
void setUsername (const QString &username)

Detailed Description

The QXmppPasswordRequest class represents a password request.

Member Function Documentation

void QXmppPasswordRequest::setDomain ( const QString &  domain)

Sets the requested domain.

Parameters
domain
void QXmppPasswordRequest::setUsername ( const QString &  username)

Sets the requested username.

Parameters
username

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppMucOwnerIq.png0000644000175000007640000000136112116723632021101 0ustar sharkyjerrywebPNG  IHDR~6PLTEutRNST2IDATxr FU# -\f;[)Ms~%ɋK?Xޗ$ͩ OM"ԅ*YorPcJ%[~uu$迓:KMžR߆/x;fqk^GcwowC_v*"o^HYW{^$99g7~Y\w=p"N8z'BDs~%ɋK>/#Ir=#I'7[_^tP$'B/INs _W~{CE=p"N8z$/BZ363Ya!4}So͓(0u3w]cmM5w!-@ͨ%Nv/Ee dyo}wOl6g[;f!/Ó"_ZC uקz'I՟0}Cyg__c kd{u*1_'/.lJRJɋ?ps4O#YIENDB`qxmpp-0.7.6/doc/html/classQXmppIncomingServer.png0000644000175000007640000000157012116723632022004 0ustar sharkyjerrywebPNG  IHDRHPLTEutRNST2IDATxђ*#@@]jk6c-18DI$$OX>I!)#nCf.L!唰YOIS$UBgw9Ev6uʧLV)ڍY}]/{'z/H$׍$u|g$"ߨ$ pI' ^15d>TB>6`>6`>6`>6`>6`>6''(I>d>ds',OL$阜8Ȑ!|d%>yȳ.'](U*)%-4{9iBٱr$z4m^!I|@>OK|'4빯!I&?_u>tzc9VOH1Z_>dd>d3O1&b2k.|f0}l}l}l}l}l}lO!L`}lt` cOuy7MO*KOP]C$R2:I|J{4^ k655kKƱOm:4ڣh)SyW u]|?Kɛ`×swq }Ba;K%4IENDB`qxmpp-0.7.6/doc/html/functions_0x74.html0000644000175000007640000003370312116723632020013 0ustar sharkyjerryweb QXmpp: Class Members
QXmpp  Version:0.7.6
Here is a list of all documented class members with links to the class documentation for each member:

- t -

qxmpp-0.7.6/doc/html/sync_off.png0000644000175000007640000000152512116723632016644 0ustar sharkyjerrywebPNG  IHDRw=IDATxKhTW1I&38MII3b$c I1V1-(T.* t!K[čf`l(l"Y6gT}sgܹ d{8?̝;u`:!FB?Űm'y>ѝlU_?]Y(N8f1qn-etm 0}b%׌=0?1s08;_ W|%\Zð >舽lnp.a{ )t; b n652?>Oдunm`׭ZWjC~>־0+ {{fMŕټ` ݛ%uA6,]kWu]7ihu1 l Ҷ̺:\cxhRQt$ fd<4B[fd7=.M9//O a},j?.5ښm?X2#d p(?c!a1ޗةܾ7dK:)3],H+ku<|`LhC7e םt H$^2%l.aeÉ|s }D^hz~Rá]|#@חև[k<|(*ݹdtM:,]' X_n| /cfOIENDB`qxmpp-0.7.6/doc/html/classQXmppArchiveRemoveIq-members.html0000644000175000007640000003342312116723632023715 0ustar sharkyjerryweb QXmpp: Member List
QXmppArchiveRemoveIq Member List

This is the complete list of members for QXmppArchiveRemoveIq, including all inherited members.

end() const QXmppArchiveRemoveIq
error() const QXmppStanza
Error enum valueQXmppIq
extendedAddresses() const QXmppStanza
extensions() const QXmppStanza
from() const QXmppStanza
Get enum valueQXmppIq
id() const QXmppStanza
lang() const QXmppStanza
operator=(const QXmppIq &other)QXmppIq
QXmppStanza::operator=(const QXmppStanza &other)QXmppStanza
QXmppIq(QXmppIq::Type type=QXmppIq::Get)QXmppIq
QXmppIq(const QXmppIq &other)QXmppIq
QXmppStanza(const QString &from=QString(), const QString &to=QString())QXmppStanza
QXmppStanza(const QXmppStanza &other)QXmppStanza
Result enum valueQXmppIq
Set enum valueQXmppIq
setEnd(const QDateTime &end)QXmppArchiveRemoveIq
setError(const QXmppStanza::Error &error)QXmppStanza
setExtendedAddresses(const QList< QXmppExtendedAddress > &extendedAddresses)QXmppStanza
setExtensions(const QXmppElementList &elements)QXmppStanza
setFrom(const QString &)QXmppStanza
setId(const QString &)QXmppStanza
setLang(const QString &)QXmppStanza
setStart(const QDateTime &start)QXmppArchiveRemoveIq
setTo(const QString &)QXmppStanza
setType(QXmppIq::Type)QXmppIq
setWith(const QString &with)QXmppArchiveRemoveIq
start() const QXmppArchiveRemoveIq
to() const QXmppStanza
type() const QXmppIq
Type enum nameQXmppIq
with() const QXmppArchiveRemoveIq
~QXmppIq() (defined in QXmppIq)QXmppIq
~QXmppStanza()QXmppStanzavirtual
qxmpp-0.7.6/doc/html/QXmppDiscoveryIq_8h_source.html0000644000175000007640000005021212116723632022421 0ustar sharkyjerryweb QXmpp: QXmppDiscoveryIq.h Source File
QXmpp  Version:0.7.6
QXmppDiscoveryIq.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Jeremy Lainé
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXMPPDISCOVERY_H
25 #define QXMPPDISCOVERY_H
26 
27 #include "QXmppDataForm.h"
28 #include "QXmppIq.h"
29 
30 class QXMPP_EXPORT QXmppDiscoveryIq : public QXmppIq
31 {
32 public:
33  class QXMPP_EXPORT Identity
34  {
35  public:
36  QString category() const;
37  void setCategory(const QString &category);
38 
39  QString language() const;
40  void setLanguage(const QString &language);
41 
42  QString name() const;
43  void setName(const QString &name);
44 
45  QString type() const;
46  void setType(const QString &type);
47 
48  private:
49  QString m_category;
50  QString m_language;
51  QString m_name;
52  QString m_type;
53  };
54 
55  class QXMPP_EXPORT Item
56  {
57  public:
58  QString jid() const;
59  void setJid(const QString &jid);
60 
61  QString name() const;
62  void setName(const QString &name);
63 
64  QString node() const;
65  void setNode(const QString &node);
66 
67  private:
68  QString m_jid;
69  QString m_name;
70  QString m_node;
71  };
72 
73  enum QueryType {
74  InfoQuery,
75  ItemsQuery,
76  };
77 
78  QStringList features() const;
79  void setFeatures(const QStringList &features);
80 
81  QList<QXmppDiscoveryIq::Identity> identities() const;
82  void setIdentities(const QList<QXmppDiscoveryIq::Identity> &identities);
83 
84  QList<QXmppDiscoveryIq::Item> items() const;
85  void setItems(const QList<QXmppDiscoveryIq::Item> &items);
86 
87  QXmppDataForm form() const;
88  void setForm(const QXmppDataForm &form);
89 
90  QString queryNode() const;
91  void setQueryNode(const QString &node);
92 
93  enum QueryType queryType() const;
94  void setQueryType(enum QueryType type);
95 
96  QByteArray verificationString() const;
97 
98  static bool isDiscoveryIq(const QDomElement &element);
99 
100 protected:
102  void parseElementFromChild(const QDomElement &element);
103  void toXmlElementFromChild(QXmlStreamWriter *writer) const;
105 
106 private:
107  QStringList m_features;
108  QList<QXmppDiscoveryIq::Identity> m_identities;
109  QList<QXmppDiscoveryIq::Item> m_items;
110  QXmppDataForm m_form;
111  QString m_queryNode;
112  enum QueryType m_queryType;
113 };
114 
115 #endif
qxmpp-0.7.6/doc/html/functions_0x6a.html0000644000175000007640000002221112116723632020057 0ustar sharkyjerryweb QXmpp: Class Members
QXmpp  Version:0.7.6
Here is a list of all documented class members with links to the class documentation for each member:

- j -

qxmpp-0.7.6/doc/html/QXmppByteStreamIq_8h_source.html0000644000175000007640000004144012116723632022534 0ustar sharkyjerryweb QXmpp: QXmppByteStreamIq.h Source File
QXmpp  Version:0.7.6
QXmppByteStreamIq.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Jeremy Lainé
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXMPPBYTESTREAMIQ_H
25 #define QXMPPBYTESTREAMIQ_H
26 
27 #include "QXmppIq.h"
28 
29 #include <QHostAddress>
30 
31 class QXMPP_EXPORT QXmppByteStreamIq : public QXmppIq
32 {
33 public:
34  enum Mode {
35  None = 0,
36  Tcp,
37  Udp,
38  };
39 
40  class QXMPP_EXPORT StreamHost
41  {
42  public:
43  QString jid() const;
44  void setJid(const QString &jid);
45 
46  QString host() const;
47  void setHost(const QString &host);
48 
49  quint16 port() const;
50  void setPort(quint16 port);
51 
52  QString zeroconf() const;
53  void setZeroconf(const QString &zeroconf);
54 
55  private:
56  QString m_host;
57  QString m_jid;
58  quint16 m_port;
59  QString m_zeroconf;
60  };
61 
62  QXmppByteStreamIq::Mode mode() const;
63  void setMode(QXmppByteStreamIq::Mode mode);
64 
65  QString sid() const;
66  void setSid(const QString &sid);
67 
68  QString activate() const;
69  void setActivate(const QString &activate);
70 
71  QList<QXmppByteStreamIq::StreamHost> streamHosts() const;
72  void setStreamHosts(const QList<QXmppByteStreamIq::StreamHost> &streamHosts);
73 
74  QString streamHostUsed() const;
75  void setStreamHostUsed(const QString &jid);
76 
77  static bool isByteStreamIq(const QDomElement &element);
78 
79 protected:
81  void parseElementFromChild(const QDomElement &element);
82  void toXmlElementFromChild(QXmlStreamWriter *writer) const;
84 
85 private:
86  Mode m_mode;
87  QString m_sid;
88 
89  QString m_activate;
90  QList<StreamHost> m_streamHosts;
91  QString m_streamHostUsed;
92 };
93 
94 #endif
qxmpp-0.7.6/doc/html/functions_0x7e.html0000644000175000007640000002401012116723632020063 0ustar sharkyjerryweb QXmpp: Class Members
QXmpp  Version:0.7.6
Here is a list of all documented class members with links to the class documentation for each member:

- ~ -

qxmpp-0.7.6/doc/html/ftv2pnode.png0000644000175000007640000000034512116723632016744 0ustar sharkyjerrywebPNG  IHDRɪ|IDATx=QFDk:FPK؃=V@ճ 8SHx0bnrr{򽿾$ TP XOd6"SOB(Q)+YĈ ҪR>Vtsm9(k-@ȧ-$ b [he Kp-l|CApRG'rͭaIENDB`qxmpp-0.7.6/doc/html/classQXmppRosterIq-members.html0000644000175000007640000003117212116723632022433 0ustar sharkyjerryweb QXmpp: Member List
QXmppRosterIq Member List

This is the complete list of members for QXmppRosterIq, including all inherited members.

addItem(const Item &)QXmppRosterIq
Error enum valueQXmppIq
error() const QXmppStanza
extendedAddresses() const QXmppStanza
extensions() const QXmppStanza
from() const QXmppStanza
Get enum valueQXmppIq
id() const QXmppStanza
items() const QXmppRosterIq
lang() const QXmppStanza
operator=(const QXmppIq &other)QXmppIq
QXmppStanza::operator=(const QXmppStanza &other)QXmppStanza
QXmppIq(QXmppIq::Type type=QXmppIq::Get)QXmppIq
QXmppIq(const QXmppIq &other)QXmppIq
QXmppStanza(const QString &from=QString(), const QString &to=QString())QXmppStanza
QXmppStanza(const QXmppStanza &other)QXmppStanza
Result enum valueQXmppIq
Set enum valueQXmppIq
setError(const QXmppStanza::Error &error)QXmppStanza
setExtendedAddresses(const QList< QXmppExtendedAddress > &extendedAddresses)QXmppStanza
setExtensions(const QXmppElementList &elements)QXmppStanza
setFrom(const QString &)QXmppStanza
setId(const QString &)QXmppStanza
setLang(const QString &)QXmppStanza
setTo(const QString &)QXmppStanza
setType(QXmppIq::Type)QXmppIq
to() const QXmppStanza
Type enum nameQXmppIq
type() const QXmppIq
~QXmppIq() (defined in QXmppIq)QXmppIq
~QXmppStanza()QXmppStanzavirtual
qxmpp-0.7.6/doc/html/ftv2vertline.png0000644000175000007640000000012612116723632017464 0ustar sharkyjerrywebPNG  IHDRɪ|IDATxݱðScOx@ y}IENDB`qxmpp-0.7.6/doc/html/classQXmppDataForm_1_1Field-members.html0000644000175000007640000003401612116723632023764 0ustar sharkyjerryweb QXmpp: Member List
QXmppDataForm::Field Member List

This is the complete list of members for QXmppDataForm::Field, including all inherited members.

BooleanField enum value (defined in QXmppDataForm::Field)QXmppDataForm::Field
description() const QXmppDataForm::Field
Field(QXmppDataForm::Field::Type type=QXmppDataForm::Field::TextSingleField)QXmppDataForm::Field
Field(const QXmppDataForm::Field &other)QXmppDataForm::Field
FixedField enum value (defined in QXmppDataForm::Field)QXmppDataForm::Field
HiddenField enum value (defined in QXmppDataForm::Field)QXmppDataForm::Field
isRequired() const QXmppDataForm::Field
JidMultiField enum value (defined in QXmppDataForm::Field)QXmppDataForm::Field
JidSingleField enum value (defined in QXmppDataForm::Field)QXmppDataForm::Field
key() const QXmppDataForm::Field
label() const QXmppDataForm::Field
ListMultiField enum value (defined in QXmppDataForm::Field)QXmppDataForm::Field
ListSingleField enum value (defined in QXmppDataForm::Field)QXmppDataForm::Field
media() const QXmppDataForm::Field
operator=(const QXmppDataForm::Field &other)QXmppDataForm::Field
options() const QXmppDataForm::Field
setDescription(const QString &description)QXmppDataForm::Field
setKey(const QString &key)QXmppDataForm::Field
setLabel(const QString &label)QXmppDataForm::Field
setMedia(const Media &media)QXmppDataForm::Field
setOptions(const QList< QPair< QString, QString > > &options)QXmppDataForm::Field
setRequired(bool required)QXmppDataForm::Field
setType(QXmppDataForm::Field::Type type)QXmppDataForm::Field
setValue(const QVariant &value)QXmppDataForm::Field
TextMultiField enum value (defined in QXmppDataForm::Field)QXmppDataForm::Field
TextPrivateField enum value (defined in QXmppDataForm::Field)QXmppDataForm::Field
TextSingleField enum value (defined in QXmppDataForm::Field)QXmppDataForm::Field
type() const QXmppDataForm::Field
Type enum nameQXmppDataForm::Field
value() const QXmppDataForm::Field
~Field()QXmppDataForm::Field
qxmpp-0.7.6/doc/html/classQXmppArchiveRemoveIq.html0000644000175000007640000006053712116723632022273 0ustar sharkyjerryweb QXmpp: QXmppArchiveRemoveIq Class Reference
QXmppArchiveRemoveIq Class Reference

Represents an archive remove IQ as defined by XEP-0136: Message Archiving. More...

#include <QXmppArchiveIq.h>

Inheritance diagram for QXmppArchiveRemoveIq:
QXmppIq QXmppStanza

Public Member Functions

QString with () const
void setWith (const QString &with)
QDateTime start () const
void setStart (const QDateTime &start)
QDateTime end () const
void setEnd (const QDateTime &end)
- Public Member Functions inherited from QXmppIq
 QXmppIq (QXmppIq::Type type=QXmppIq::Get)
 QXmppIq (const QXmppIq &other)
 Constructs a copy of other.
QXmppIqoperator= (const QXmppIq &other)
 Assigns other to this IQ.
QXmppIq::Type type () const
void setType (QXmppIq::Type)
- Public Member Functions inherited from QXmppStanza
 QXmppStanza (const QString &from=QString(), const QString &to=QString())
 QXmppStanza (const QXmppStanza &other)
 Constructs a copy of other.
virtual ~QXmppStanza ()
 Destroys a QXmppStanza.
QXmppStanzaoperator= (const QXmppStanza &other)
 Assigns other to this stanza.
QString to () const
void setTo (const QString &)
QString from () const
 Returns the stanza's sender JID.
void setFrom (const QString &)
QString id () const
 Returns the stanza's identifier.
void setId (const QString &)
QString lang () const
 Returns the stanza's language.
void setLang (const QString &)
QXmppStanza::Error error () const
 Returns the stanza's error.
void setError (const QXmppStanza::Error &error)
QXmppElementList extensions () const
void setExtensions (const QXmppElementList &elements)
QList< QXmppExtendedAddressextendedAddresses () const
void setExtendedAddresses (const QList< QXmppExtendedAddress > &extendedAddresses)

Additional Inherited Members

- Public Types inherited from QXmppIq
enum  Type { Error = 0, Get, Set, Result }
 This enum describes the type of IQ. More...

Detailed Description

Represents an archive remove IQ as defined by XEP-0136: Message Archiving.

Member Function Documentation

QDateTime QXmppArchiveRemoveIq::end ( ) const

Returns the end date/time for the archived conversations.

void QXmppArchiveRemoveIq::setEnd ( const QDateTime &  end)

Sets the end date/time for the archived conversations.

Parameters
end
void QXmppArchiveRemoveIq::setStart ( const QDateTime &  start)

Sets the start date/time for the archived conversations.

Parameters
start
void QXmppArchiveRemoveIq::setWith ( const QString &  with)

Sets the JID which archived conversations must match.

Parameters
with
QDateTime QXmppArchiveRemoveIq::start ( ) const

Returns the start date/time for the archived conversations.

QString QXmppArchiveRemoveIq::with ( ) const

Returns the JID which archived conversations must match.


The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/sync_on.png0000644000175000007640000000151512116723632016505 0ustar sharkyjerrywebPNG  IHDRw=IDATx_HTY8i4-g6&kQ)!0URKڅ/PE>K-+K.YdEPaAZSܝ;3wgfsWK.Da'q_k DQCg 0Y:qZ)~L0HV z-C%g68%wUϿ }? ?3 K@h aaUe s~2&&B*Alji*˨,oƣT,d[3-*> LɟfkҠw#*AEjKUy>&{8m5Ki jjD*Nigw7DmzK۾M!k?o_lX#~XӑR*EՂדE;6e"Q(=Ezæ5Kؼָ_ 1zBJ X96jL^7{J1i@%8'7M_\Q#Uy Wo x8sv|Sn q_m >b[JX,4[T{Ratjjzz'ȶiIws KC^Y%6ꈺ]vhiWvh'̂|[^YrD= QXmpp: /home/jerryweb/sharky/Development/qxmpp/src/base/ Directory Reference
QXmpp  Version:0.7.6
base Directory Reference

Files

file  QXmppArchiveIq.cpp
file  QXmppArchiveIq.h [code]
file  QXmppBindIq.cpp
file  QXmppBindIq.h [code]
file  QXmppBookmarkSet.cpp
file  QXmppBookmarkSet.h [code]
file  QXmppByteStreamIq.cpp
file  QXmppByteStreamIq.h [code]
file  QXmppConstants.cpp
file  QXmppConstants.h [code]
file  QXmppDataForm.cpp
file  QXmppDataForm.h [code]
file  QXmppDiscoveryIq.cpp
file  QXmppDiscoveryIq.h [code]
file  QXmppElement.cpp
file  QXmppElement.h [code]
file  QXmppEntityTimeIq.cpp
file  QXmppEntityTimeIq.h [code]
file  QXmppGlobal.cpp
file  QXmppGlobal.h [code]
file  QXmppIbbIq.cpp
file  QXmppIbbIq.h [code]
file  QXmppIq.cpp
file  QXmppIq.h [code]
file  QXmppJingleIq.cpp
file  QXmppJingleIq.h [code]
file  QXmppLogger.cpp
file  QXmppLogger.h [code]
file  QXmppMessage.cpp
file  QXmppMessage.h [code]
file  QXmppMucIq.cpp
file  QXmppMucIq.h [code]
file  QXmppNonSASLAuth.cpp
file  QXmppNonSASLAuth.h [code]
file  QXmppPingIq.cpp
file  QXmppPingIq.h [code]
file  QXmppPresence.cpp
file  QXmppPresence.h [code]
file  QXmppPubSubIq.cpp
file  QXmppPubSubIq.h [code]
file  QXmppRegisterIq.cpp
file  QXmppRegisterIq.h [code]
file  QXmppResultSet.cpp
file  QXmppResultSet.h [code]
file  QXmppRosterIq.cpp
file  QXmppRosterIq.h [code]
file  QXmppRpcIq.cpp
file  QXmppRpcIq.h [code]
file  QXmppRtpChannel.cpp
file  QXmppRtpChannel.h [code]
file  QXmppSessionIq.cpp
file  QXmppSessionIq.h [code]
file  QXmppSocks.cpp
file  QXmppSocks.h [code]
file  QXmppStanza.cpp
file  QXmppStanza.h [code]
file  QXmppStream.cpp
file  QXmppStream.h [code]
file  QXmppStreamFeatures.cpp
file  QXmppStreamFeatures.h [code]
file  QXmppStreamInitiationIq.cpp
file  QXmppStun.cpp
file  QXmppStun.h [code]
file  QXmppUtils.cpp
file  QXmppUtils.h [code]
file  QXmppVCardIq.cpp
file  QXmppVCardIq.h [code]
file  QXmppVersionIq.cpp
file  QXmppVersionIq.h [code]
qxmpp-0.7.6/doc/html/classQXmppMucItem.html0000644000175000007640000004306712116723632020604 0ustar sharkyjerryweb QXmpp: QXmppMucItem Class Reference

The QXmppMucItem class represents a chat room "item". More...

#include <QXmppMucIq.h>

Public Types

enum  Affiliation {
  UnspecifiedAffiliation, OutcastAffiliation, NoAffiliation, MemberAffiliation,
  AdminAffiliation, OwnerAffiliation
}
 This enum is used to represent long-lived permissions in a room (affiliations).
enum  Role {
  UnspecifiedRole, NoRole, VisitorRole, ParticipantRole,
  ModeratorRole
}
 This enum is used to represent short-lived permissions in a room (roles).

Public Member Functions

bool isNull () const
 Returns true if the current item is null.
QString actor () const
void setActor (const QString &actor)
Affiliation affiliation () const
 Returns the user's affiliation, i.e. long-lived permissions.
void setAffiliation (Affiliation affiliation)
QString jid () const
 Returns the user's real JID.
void setJid (const QString &jid)
QString nick () const
 Returns the user's nickname.
void setNick (const QString &nick)
QString reason () const
void setReason (const QString &reason)
Role role () const
 Returns the user's role, i.e. short-lived permissions.
void setRole (Role role)

Detailed Description

The QXmppMucItem class represents a chat room "item".

It is used to convey information such as permissions.

Member Function Documentation

QString QXmppMucItem::actor ( ) const

Returns the actor for this item, for instance the admin who kicked a user out of a room.

QString QXmppMucItem::reason ( ) const

Returns the reason for this item, for example the reason for kicking a user out of a room.

void QXmppMucItem::setActor ( const QString &  actor)

Sets the actor for this item, for instance the admin who kicked a user out of a room.

void QXmppMucItem::setAffiliation ( Affiliation  affiliation)

Sets the user's affiliation, i.e. long-lived permissions.

Parameters
affiliation
void QXmppMucItem::setJid ( const QString &  jid)

Sets the user's real JID.

Parameters
jid
void QXmppMucItem::setNick ( const QString &  nick)

Sets the user's nickname.

Parameters
nick
void QXmppMucItem::setReason ( const QString &  reason)

Sets the reason for this item, for example the reason for kicking a user out of a room.

void QXmppMucItem::setRole ( Role  role)

Sets the user's role, i.e. short-lived permissions.

Parameters
role

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppRpcResponseIq.png0000644000175000007640000000147412116723632021612 0ustar sharkyjerrywebPNG  IHDRPLTEutRNST2IDATxے EU,dA敔R$AH#d$̲4$S*Ԑ4;=:Q|dJÐ)KdW=tIyE_&IG<%3|볽g{Q%>!SXgPeb I<63٢Ɍ#dH-2yzob i&}:tn QXmpp: Member List
QXmppVersionIq Member List

This is the complete list of members for QXmppVersionIq, including all inherited members.

error() const QXmppStanza
Error enum valueQXmppIq
extendedAddresses() const QXmppStanza
extensions() const QXmppStanza
from() const QXmppStanza
Get enum valueQXmppIq
id() const QXmppStanza
lang() const QXmppStanza
name() const QXmppVersionIq
operator=(const QXmppIq &other)QXmppIq
QXmppStanza::operator=(const QXmppStanza &other)QXmppStanza
os() const QXmppVersionIq
QXmppIq(QXmppIq::Type type=QXmppIq::Get)QXmppIq
QXmppIq(const QXmppIq &other)QXmppIq
QXmppStanza(const QString &from=QString(), const QString &to=QString())QXmppStanza
QXmppStanza(const QXmppStanza &other)QXmppStanza
Result enum valueQXmppIq
Set enum valueQXmppIq
setError(const QXmppStanza::Error &error)QXmppStanza
setExtendedAddresses(const QList< QXmppExtendedAddress > &extendedAddresses)QXmppStanza
setExtensions(const QXmppElementList &elements)QXmppStanza
setFrom(const QString &)QXmppStanza
setId(const QString &)QXmppStanza
setLang(const QString &)QXmppStanza
setName(const QString &name)QXmppVersionIq
setOs(const QString &os)QXmppVersionIq
setTo(const QString &)QXmppStanza
setType(QXmppIq::Type)QXmppIq
setVersion(const QString &version)QXmppVersionIq
to() const QXmppStanza
type() const QXmppIq
Type enum nameQXmppIq
version() const QXmppVersionIq
~QXmppIq() (defined in QXmppIq)QXmppIq
~QXmppStanza()QXmppStanzavirtual
qxmpp-0.7.6/doc/html/classQXmppSslServer.html0000644000175000007640000002626512116723632021172 0ustar sharkyjerryweb QXmpp: QXmppSslServer Class Reference
QXmppSslServer Class Reference

The QXmppSslServer class represents an SSL-enabled TCP server. More...

#include <QXmppServer.h>

Signals

void newConnection (QSslSocket *socket)
 This signal is emitted when a new connection is established.

Public Member Functions

 QXmppSslServer (QObject *parent=0)
 ~QXmppSslServer ()
void addCaCertificates (const QList< QSslCertificate > &certificates)
void setLocalCertificate (const QSslCertificate &certificate)
void setPrivateKey (const QSslKey &key)

Detailed Description

The QXmppSslServer class represents an SSL-enabled TCP server.

Constructor & Destructor Documentation

QXmppSslServer::QXmppSslServer ( QObject *  parent = 0)

Constructs a new SSL server instance.

Parameters
parent
QXmppSslServer::~QXmppSslServer ( )

Destroys an SSL server instance.

Member Function Documentation

void QXmppSslServer::addCaCertificates ( const QList< QSslCertificate > &  certificates)

Adds the given certificates to the CA certificate database to be used for incoming connnections.

Parameters
certificates
void QXmppSslServer::setLocalCertificate ( const QSslCertificate &  certificate)

Sets the local certificate to be used for incoming connections.

Parameters
certificate
void QXmppSslServer::setPrivateKey ( const QSslKey &  key)

Sets the local private key to be used for incoming connections.

Parameters
key

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppOutgoingServer-members.html0000644000175000007640000003421712116723632023650 0ustar sharkyjerryweb QXmpp: Member List
QXmppOutgoingServer Member List

This is the complete list of members for QXmppOutgoingServer, including all inherited members.

connected()QXmppStreamsignal
connectToHost(const QString &domain)QXmppOutgoingServerslot
debug(const QString &message)QXmppLoggableinlineprotected
dialbackResponseReceived(const QXmppDialback &response)QXmppOutgoingServersignal
disconnected()QXmppStreamsignal
disconnectFromHost()QXmppStreamvirtualslot
handleStanza(const QDomElement &element)=0QXmppStreamprotectedpure virtual
handleStart()QXmppStreamprotectedvirtual
handleStream(const QDomElement &element)=0QXmppStreamprotectedpure virtual
info(const QString &message)QXmppLoggableinlineprotected
isConnected() const QXmppOutgoingServervirtual
localStreamKey() const QXmppOutgoingServer
logMessage(QXmppLogger::MessageType type, const QString &msg)QXmppLoggablesignal
logReceived(const QString &message)QXmppLoggableinlineprotected
logSent(const QString &message)QXmppLoggableinlineprotected
queueData(const QByteArray &data)QXmppOutgoingServerslot
QXmppLoggable(QObject *parent=0)QXmppLoggable
QXmppOutgoingServer(const QString &domain, QObject *parent)QXmppOutgoingServer
QXmppStream(QObject *parent)QXmppStream
remoteDomain() const QXmppOutgoingServer
sendData(const QByteArray &)QXmppStreamvirtualslot
sendPacket(const QXmppStanza &)QXmppStream
setGauge(const QString &gauge, double value)QXmppLoggablesignal
setLocalStreamKey(const QString &key)QXmppOutgoingServer
setSocket(QSslSocket *socket)QXmppStreamprotected
setVerify(const QString &id, const QString &key)QXmppOutgoingServer
socket() const QXmppStreamprotected
updateCounter(const QString &counter, qint64 amount=1)QXmppLoggablesignal
warning(const QString &message)QXmppLoggableinlineprotected
~QXmppOutgoingServer()QXmppOutgoingServer
~QXmppStream()QXmppStream
qxmpp-0.7.6/doc/html/QXmppSocks_8h_source.html0000644000175000007640000003553512116723632021255 0ustar sharkyjerryweb QXmpp: QXmppSocks.h Source File
QXmpp  Version:0.7.6
QXmppSocks.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Jeremy Lainé
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXMPPSOCKS_H
25 #define QXMPPSOCKS_H
26 
27 #include <QHostAddress>
28 #include <QTcpSocket>
29 
30 #include "QXmppGlobal.h"
31 
32 class QTcpServer;
33 
34 class QXMPP_EXPORT QXmppSocksClient : public QTcpSocket
35 {
36  Q_OBJECT
37 
38 public:
39  QXmppSocksClient(const QString &proxyHost, quint16 proxyPort, QObject *parent=0);
40  void connectToHost(const QString &hostName, quint16 hostPort);
41 
42 signals:
43  void ready();
44 
45 private slots:
46  void slotConnected();
47  void slotReadyRead();
48 
49 private:
50  QString m_proxyHost;
51  quint16 m_proxyPort;
52  QString m_hostName;
53  quint16 m_hostPort;
54  int m_step;
55 };
56 
57 class QXMPP_EXPORT QXmppSocksServer : public QObject
58 {
59  Q_OBJECT
60 
61 public:
62  QXmppSocksServer(QObject *parent=0);
63  void close();
64  bool listen(quint16 port = 0);
65 
66  quint16 serverPort() const;
67 
68 signals:
69  void newConnection(QTcpSocket *socket, QString hostName, quint16 port);
70 
71 private slots:
72  void slotNewConnection();
73  void slotReadyRead();
74 
75 private:
76  QTcpServer *m_server;
77  QTcpServer *m_server_v6;
78  QMap<QTcpSocket*, int> m_states;
79 };
80 
81 #endif
qxmpp-0.7.6/doc/html/tab_h.png0000644000175000007640000000030012116723632016101 0ustar sharkyjerrywebPNG  IHDR$[IDATx @E 7X AADjG Ze؈ 8WxUK.%0mɤ&+4i$džt׿zWf5AZ'w"2Wg%d)R15Fd БOC"@g=IENDB`qxmpp-0.7.6/doc/html/QXmppStun_8h_source.html0000644000175000007640000016606212116723632021124 0ustar sharkyjerryweb QXmpp: QXmppStun.h Source File
QXmpp  Version:0.7.6
QXmppStun.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Jeremy Lainé
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXMPPSTUN_H
25 #define QXMPPSTUN_H
26 
27 #include <QObject>
28 
29 #include "QXmppLogger.h"
30 #include "QXmppJingleIq.h"
31 
32 class QDataStream;
33 class QUdpSocket;
34 class QTimer;
35 
40 
41 class QXMPP_EXPORT QXmppStunMessage
42 {
43 public:
44  enum MethodType {
45  Binding = 0x1,
46  SharedSecret = 0x2,
47  Allocate = 0x3,
48  Refresh = 0x4,
49  Send = 0x6,
50  Data = 0x7,
51  CreatePermission = 0x8,
52  ChannelBind = 0x9,
53  };
54 
55  enum ClassType {
56  Request = 0x000,
57  Indication = 0x010,
58  Response = 0x100,
59  Error = 0x110,
60  };
61 
62  QXmppStunMessage();
63 
64  quint32 cookie() const;
65  void setCookie(quint32 cookie);
66 
67  QByteArray id() const;
68  void setId(const QByteArray &id);
69 
70  quint16 messageClass() const;
71  quint16 messageMethod() const;
72 
73  quint16 type() const;
74  void setType(quint16 type);
75 
76  // attributes
77 
78  quint32 changeRequest() const;
79  void setChangeRequest(quint32 changeRequest);
80 
81  quint16 channelNumber() const;
82  void setChannelNumber(quint16 channelNumber);
83 
84  QByteArray data() const;
85  void setData(const QByteArray &data);
86 
87  quint32 lifetime() const;
88  void setLifetime(quint32 changeRequest);
89 
90  QByteArray nonce() const;
91  void setNonce(const QByteArray &nonce);
92 
93  quint32 priority() const;
94  void setPriority(quint32 priority);
95 
96  QString realm() const;
97  void setRealm(const QString &realm);
98 
99  QByteArray reservationToken() const;
100  void setReservationToken(const QByteArray &reservationToken);
101 
102  quint8 requestedTransport() const;
103  void setRequestedTransport(quint8 requestedTransport);
104 
105  QString software() const;
106  void setSoftware(const QString &software);
107 
108  QString username() const;
109  void setUsername(const QString &username);
110 
111  QByteArray encode(const QByteArray &key = QByteArray(), bool addFingerprint = true) const;
112  bool decode(const QByteArray &buffer, const QByteArray &key = QByteArray(), QStringList *errors = 0);
113  QString toString() const;
114  static quint16 peekType(const QByteArray &buffer, quint32 &cookie, QByteArray &id);
115 
116  // attributes
117  int errorCode;
118  QString errorPhrase;
119  QByteArray iceControlling;
120  QByteArray iceControlled;
121  QHostAddress changedHost;
122  quint16 changedPort;
123  QHostAddress mappedHost;
124  quint16 mappedPort;
125  QHostAddress otherHost;
126  quint16 otherPort;
127  QHostAddress sourceHost;
128  quint16 sourcePort;
129  QHostAddress xorMappedHost;
130  quint16 xorMappedPort;
131  QHostAddress xorPeerHost;
132  quint16 xorPeerPort;
133  QHostAddress xorRelayedHost;
134  quint16 xorRelayedPort;
135  bool useCandidate;
136 
137 private:
138  quint32 m_cookie;
139  QByteArray m_id;
140  quint16 m_type;
141 
142  // attributes
143  QSet<quint16> m_attributes;
144  quint32 m_changeRequest;
145  quint16 m_channelNumber;
146  QByteArray m_data;
147  quint32 m_lifetime;
148  QByteArray m_nonce;
149  quint32 m_priority;
150  QString m_realm;
151  quint8 m_requestedTransport;
152  QByteArray m_reservationToken;
153  QString m_software;
154  QString m_username;
155 };
156 
161 
162 class QXMPP_EXPORT QXmppStunTransaction : public QXmppLoggable
163 {
164  Q_OBJECT
165 
166 public:
167  QXmppStunTransaction(const QXmppStunMessage &request, QObject *parent);
168  QXmppStunMessage request() const;
169  QXmppStunMessage response() const;
170 
171 signals:
172  void finished();
173  void writeStun(const QXmppStunMessage &request);
174 
175 public slots:
176  void readStun(const QXmppStunMessage &response);
177 
178 private slots:
179  void retry();
180 
181 private:
182  QXmppStunMessage m_request;
183  QXmppStunMessage m_response;
184  QTimer *m_retryTimer;
185  int m_tries;
186 };
187 
193 
194 class QXMPP_EXPORT QXmppTurnAllocation : public QXmppLoggable
195 {
196  Q_OBJECT
197 
198 public:
199  enum AllocationState
200  {
201  UnconnectedState,
202  ConnectingState,
203  ConnectedState,
204  ClosingState,
205  };
206 
207  QXmppTurnAllocation(QObject *parent = 0);
208  ~QXmppTurnAllocation();
209 
210  QHostAddress relayedHost() const;
211  quint16 relayedPort() const;
212  AllocationState state() const;
213 
214  void setServer(const QHostAddress &host, quint16 port = 3478);
215  void setUser(const QString &user);
216  void setPassword(const QString &password);
217 
218  qint64 writeDatagram(const QByteArray &data, const QHostAddress &host, quint16 port);
219 
220 signals:
222  void connected();
223 
225  void datagramReceived(const QByteArray &data, const QHostAddress &host, quint16 port);
226 
228  void disconnected();
229 
230 public slots:
231  void connectToHost();
232  void disconnectFromHost();
233 
234 private slots:
235  void readyRead();
236  void refresh();
237  void refreshChannels();
238  void transactionFinished();
239  void writeStun(const QXmppStunMessage &message);
240 
241 private:
242  void handleDatagram(const QByteArray &datagram, const QHostAddress &host, quint16 port);
243  void setState(AllocationState state);
244 
245  QUdpSocket *socket;
246  QTimer *m_timer;
247  QTimer *m_channelTimer;
248  QString m_password;
249  QString m_username;
250  QHostAddress m_relayedHost;
251  quint16 m_relayedPort;
252  QHostAddress m_turnHost;
253  quint16 m_turnPort;
254 
255  // channels
256  typedef QPair<QHostAddress, quint16> Address;
257  quint16 m_channelNumber;
258  QMap<quint16, Address> m_channels;
259 
260  // state
261  quint32 m_lifetime;
262  QByteArray m_key;
263  QString m_realm;
264  QByteArray m_nonce;
265  AllocationState m_state;
266  QList<QXmppStunTransaction*> m_transactions;
267 };
268 
272 
273 class QXMPP_EXPORT QXmppIceComponent : public QXmppLoggable
274 {
275  Q_OBJECT
276 
277 public:
278  QXmppIceComponent(QObject *parent=0);
280  void setIceControlling(bool controlling);
281  void setStunServer(const QHostAddress &host, quint16 port);
282  void setTurnServer(const QHostAddress &host, quint16 port);
283  void setTurnUser(const QString &user);
284  void setTurnPassword(const QString &password);
285 
286  QList<QXmppJingleCandidate> localCandidates() const;
287  void setLocalUser(const QString &user);
288  void setLocalPassword(const QString &password);
289 
290  int component() const;
291  void setComponent(int component);
292 
293  bool addRemoteCandidate(const QXmppJingleCandidate &candidate);
294  void setRemoteUser(const QString &user);
295  void setRemotePassword(const QString &password);
296 
297  bool isConnected() const;
298  void setSockets(QList<QUdpSocket*> sockets);
299 
300  static QList<QHostAddress> discoverAddresses();
301  static QList<QUdpSocket*> reservePorts(const QList<QHostAddress> &addresses, int count, QObject *parent = 0);
302 
303 public slots:
304  void close();
305  void connectToHost();
306  qint64 sendDatagram(const QByteArray &datagram);
307 
308 private slots:
309  void checkCandidates();
310  void checkStun();
311  void handleDatagram(const QByteArray &datagram, const QHostAddress &host, quint16 port, QUdpSocket *socket = 0);
312  void readyRead();
313  void turnConnected();
314 
315 signals:
317  void connected();
318 
320  void datagramReceived(const QByteArray &datagram);
321 
323  void localCandidatesChanged();
324 
325 private:
326  class Pair {
327  public:
328  Pair(int component, bool controlling);
329  quint64 priority() const;
330  QString toString() const;
331 
332  QIODevice::OpenMode checked;
333  QXmppJingleCandidate remote;
334  QXmppJingleCandidate reflexive;
335  QByteArray transaction;
336  QUdpSocket *socket;
337 
338  private:
339  int m_component;
340  bool m_controlling;
341  };
342 
343  Pair *addRemoteCandidate(QUdpSocket *socket, const QHostAddress &host, quint16 port, quint32 priority);
344  qint64 writeStun(const QXmppStunMessage &message, QXmppIceComponent::Pair *pair);
345 
346  int m_component;
347 
348  QList<QXmppJingleCandidate> m_localCandidates;
349  QString m_localUser;
350  QString m_localPassword;
351 
352  Pair *m_activePair;
353  Pair *m_fallbackPair;
354  bool m_iceControlling;
355  QList<Pair*> m_pairs;
356  quint32 m_peerReflexivePriority;
357  QString m_remoteUser;
358  QString m_remotePassword;
359 
360  QList<QUdpSocket*> m_sockets;
361  QTimer *m_timer;
362 
363  // STUN server
364  QByteArray m_stunId;
365  QHostAddress m_stunHost;
366  quint16 m_stunPort;
367  QTimer *m_stunTimer;
368  int m_stunTries;
369 
370  // TURN server
371  QXmppTurnAllocation *m_turnAllocation;
372  bool m_turnConfigured;
373 };
374 
378 
379 class QXMPP_EXPORT QXmppIceConnection : public QXmppLoggable
380 {
381  Q_OBJECT
382 
383 public:
384  QXmppIceConnection(QObject *parent = 0);
385 
386  QXmppIceComponent *component(int component);
387  void addComponent(int component);
388  void setIceControlling(bool controlling);
389 
390  QList<QXmppJingleCandidate> localCandidates() const;
391  QString localUser() const;
392  void setLocalUser(const QString &user);
393  QString localPassword() const;
394  void setLocalPassword(const QString &password);
395 
396  void addRemoteCandidate(const QXmppJingleCandidate &candidate);
397  void setRemoteUser(const QString &user);
398  void setRemotePassword(const QString &password);
399 
400  void setStunServer(const QHostAddress &host, quint16 port = 3478);
401  void setTurnServer(const QHostAddress &host, quint16 port = 3478);
402  void setTurnUser(const QString &user);
403  void setTurnPassword(const QString &password);
404 
405  bool bind(const QList<QHostAddress> &addresses);
406  bool isConnected() const;
407 
408 signals:
410  void connected();
411 
413  void disconnected();
414 
416  void localCandidatesChanged();
417 
418 public slots:
419  void close();
420  void connectToHost();
421 
422 private slots:
423  void slotConnected();
424  void slotTimeout();
425 
426 private:
427  QTimer *m_connectTimer;
428  bool m_iceControlling;
429  QMap<int, QXmppIceComponent*> m_components;
430  QString m_localUser;
431  QString m_localPassword;
432  QHostAddress m_stunHost;
433  quint16 m_stunPort;
434  QHostAddress m_turnHost;
435  quint16 m_turnPort;
436  QString m_turnUser;
437  QString m_turnPassword;
438 };
439 
440 #endif
qxmpp-0.7.6/doc/html/classQXmppVersionManager.png0000644000175000007640000000167612116723632022001 0ustar sharkyjerrywebPNG  IHDR4Y8PLTEutRNST2MIDATxr0 3yG>l,q J'm3JYl6ERJ)AH+IVjz~vSCwVh>'D~q͖۵YcZQtJjYvq>&X4jtȖ/X%cx\սCs߮nk&{$UV]\>Stד$9Xr-䗤gIyJb kUJ)!11֐VOƴV1 FZH+i#b@V1 FZJ)e8(4i%I1Jb쬦gi+IF>9D}tHҞU7OSZY̡DtYh>5ޠ%nnfU1_]ժ _orj]>}o~n.nnnCUr4kQo6Ʃ\:`vEt6kKaEDz-|;|vQjV ~J$$)Ɵ,IVcXRJ !zJ 5U @V1 FZH+i#b@V1 o5M4LV1 Z{^?t7zF4wci:sbn%wFXknlcW;ӅUGlO x&y& n'V .95ViM~\.z.ۢlt2ZBj?zi ,X]Yo8:nw= ֜ÕOώyjաx{Or2/[];Wu{ ` ưV4M=BIENDB`qxmpp-0.7.6/doc/html/QXmppDialback_8h_source.html0000644000175000007640000003320412116723632021654 0ustar sharkyjerryweb QXmpp: QXmppDialback.h Source File
QXmpp  Version:0.7.6
QXmppDialback.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Jeremy Lainé
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXMPPDIALBACK_H
25 #define QXMPPDIALBACK_H
26 
27 #include "QXmppStanza.h"
28 
33 
34 class QXMPP_EXPORT QXmppDialback : public QXmppStanza
35 {
36 public:
38  enum Command {
39  Result,
40 
41  Verify,
42 
43  };
44 
45  QXmppDialback();
46 
47  Command command() const;
48  void setCommand(Command command);
49 
50  QString key() const;
51  void setKey(const QString &key);
52 
53  QString type() const;
54  void setType(const QString &type);
55 
57  void parse(const QDomElement &element);
58  void toXml(QXmlStreamWriter *writer) const;
59 
60  static bool isDialback(const QDomElement &element);
62 
63 private:
64  Command m_command;
65  QString m_key;
66  QString m_type;
67 };
68 
69 #endif
qxmpp-0.7.6/doc/html/classQXmppClientExtension.png0000644000175000007640000001442312116723632022166 0ustar sharkyjerrywebPNG  IHDRc~PLTEutRNST2IDATxrTǠ[ۜ^=SIU2 )O'ZT-rDj9e>vrf䅕DK }IKɕkqlVNTE_#=M'f_$Tۺ6Men0Z9skTGlWw4|GKeWKȿi6ϵT4nZKlXV~hQ}H7a6,GDj=EѢZhQ-Gjax@%s#Ze%^j-rD @9Ph(G#Z-rD @9Ph(G#Z-rD @9Ph(G#Z-rD 8NO'GPh(G#ZqT-Ϻўi7.cϓ T˪d 9.57?cjJF }^:9iʫvť7 w&Ey?I©=ZmާѰKhWKNٞlQY~;ZF&!K-8ao47sjqkKK~P487Zޣ-fLKEѢZhQ-G#ZT 0|<[gD @9Ph(G#Z-rD @9Ph(G#Z-rD @9Ph(G#Z-rD @9Ph(G#Z-xayO'ZT-rDj9cOu˺7>XҲ*EfQWe֬d=}y~ʮyL[e2oitS>9$8A]D}4cL-ej=Fe}o7oɏMm5$h Y~TeM>ۼ͖:MM{PݥEwE-[^3ljyndܞGBJXKIg+c3˗iiU/u{^>UBQ˓-ɖz>&ZT-rDj9EP0 ۼU @xF#Z-rD @9Ph(G#Z-rD @9Ph(G#Z-rD @9Ph(G#Z-rD @9Pja|~jQtEѢZhQ-GZN_k;T0zt?ph-롕>fg3-ߛ UMҩ|>߆K4>jٮ.ݜlQ}9A [ciRHEe,63颞 ѥݦ\ěF/rl-D-?廕+ZT#2U/o-rDj9EѢZ?emު <#Z-rD @9Ph(G#Z-rD @9Ph(G#Z-rD @9Ph(G#Z-rD @9Ph([ 0|>{~:ѢZhQ-G#ZTq$-ϵ{\5 U_djHAM(mThB5+zO_fZx팒faΩ9 yN[e%H4Z֑{ͼknF\u1D~Ӵ3Ljig-mm{.[e-ϵe/~Jִ<6֝G|> }0kilY˫;*hQ-G#ZT-rA-0 oV-Ph(G#Z-rD @9Ph(G#Z-rD @9Ph(G#Z-rD @9Ph(G#Z-rD @9ުemޫEӉrDj9EѢZCi9}}Sn\9/v I˪zԭ{{'R@ZXJF45Kw̌9?:te<cjrکPj㽖eݞɎղaC7-M0hٿhYWڄU`ZsMiY<Қ{|~{4>eɃl鯛W@ןMoiӽK!]e$m%jn7ׄ粥}irs9d]-híz T--jTT-rDj9EѢZ?emު <#Z-rD @9Ph(G#Z-rD @9Ph(G#Z-rD @9Ph(G#Z-rD @9Ph([ 0|>{~:ѢZhQ-G#ZT񇵜>v2_q9u?J.a|?Ϊ=n{\|?eìdd~}i&rsuﹳ.XmoLɗ޹? Z'4[g[L.?KVBކ䮖; 5Iҟ{7www w_n|?6Y7>-6nW~Tst)5mlY-`OO-O}t)経U)TOjG_c Vvr>y~=};E9mQ}VF˿gTeT󝥻RjmEѢZhQ-Gjax~jψrD @9Ph(G#Z-rD @9Ph(G#Z-rD @9Ph(G#Z-rD @9Ph(G#ZV-0 o^-N#ZT-rZsmǞ.͊#kY\^B;ʛW&T 2rV2evb<^Nhivf407[gks31ޥ+DK{,1}y2n k#⧲e^"ZT-rDj9EP0 ۼU @xF#Z-rD @9Ph(G#Z-rD @9Ph(G#Z-rD @9Ph(G#Z-rD @9Pja|~jQtEѢZhQ-GZN_k;Tw ~cjY\^ٸer-xAY{5]UkjuS{+iut-s.ՌzfZ7)j) vswڲE!ײ9WKEV鳒-M*4qe[׎n|U-6TSaWKoۭ]]%[T;Zwt)cj沘ԬgG7Erl߻oP}A^ժ?w}~^˕+ZTlDj9EѢZhQ-Gjax~jψrD @9Ph(G#Z-rD @9Ph(G#Z-rD @9Ph(G#Z-rD @9Ph(G#ZV-0 o^-N#ZT-r[smǞ.u}ġJ.muF8)kԽdF4_:x D%QZ(7y3?LvT_#Ze 1s6:-^pt-k*jGK_ϳWokb4֩+G|> ՗h|1ղvZv--0G{OKwS] ȡfAy³֟uwyio:v6ȱ֩QhQOhnՇHLKDj9EѢZhQ-Gjax~jψrD @9Ph(G#Z-rD @9Ph(G#Z-rD @9Ph(G#Z-rD @9Ph(G#ZV-0 o^-N#ZT-rNsmǞeJ6s8U0,=42mV24͚OnF[7yfe%\SShY- g8n[mZ6~ug@OnYߛNRe͆9OK M.-wx|~h|t|e;Ʌ~m&˖&Z-;w˽uMXRy2]}kslMqI,4nQᴨ^ϪGG˛PEu/gTT-rDj9EѢZ?emު <#Z-rD @9Ph(G#Z-rD @9Ph(G#Z-rD @9Ph(G#Z-rD @9Ph([ 0|>{~:ѢZhQ-G#ZTqP-ϵ{4}Ǩ~cjY\^¹ji,s2;egi5Kqv=7N]Kͭe]L.E;: '74Z榷{2_s̯EFK*51ޥSK|> 4Fmzê2[Hj/Etl*GSX]7Tiy%Ү`P}A|hQZEuȖzH#ZT-rDj9ayh(G#Z-rD @9Ph(G#Z-rD @9Ph(G#Z-rD @9Ph(G#Z-rD @9o2 6բDj9EѢZhQ->v`fpO˪zgzm8)piVmKz]-ڵnb{ܝz#ks ='mvoxО,e}ocIﲳ~^e В-w4ץNjiR庺um 5'=Zmާwc-7H=mˏ$[HjoDa?\xϴe|L%ffwElܻ˶uSL/C'α-/UhQe^-rDj9EѢZ?eP&.IENDB`qxmpp-0.7.6/doc/html/functions_eval.html0000644000175000007640000006161312116723632020241 0ustar sharkyjerryweb QXmpp: Class Members - Enumerator
QXmpp  Version:0.7.6
 

- a -

- b -

- c -

- d -

- e -

- f -

- g -

- h -

- i -

- k -

- n -

- o -

- p -

- r -

- s -

- t -

- u -

- v -

- w -

- x -

qxmpp-0.7.6/doc/html/ftv2mnode.png0000644000175000007640000000036612116723632016744 0ustar sharkyjerrywebPNG  IHDRɪ|IDATx!NA\ Um@`5i`h W7] b&ofdY4 c 3v=]\B I=BB;k WN@vy4]Y|M}]x6a }dׇY>||5?>|B"'IENDB`qxmpp-0.7.6/doc/html/QXmppCallManager_8h_source.html0000644000175000007640000010100512116723632022323 0ustar sharkyjerryweb QXmpp: QXmppCallManager.h Source File
QXmpp  Version:0.7.6
QXmppCallManager.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Jeremy Lainé
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 #ifndef QXMPPCALLMANAGER_H
25 #define QXMPPCALLMANAGER_H
26 
27 #include <QObject>
28 #include <QIODevice>
29 #include <QMetaType>
30 
31 #include "QXmppClientExtension.h"
32 #include "QXmppLogger.h"
33 
34 class QHostAddress;
35 class QXmppCallPrivate;
36 class QXmppCallManager;
37 class QXmppCallManagerPrivate;
38 class QXmppIq;
40 class QXmppJingleIq;
42 class QXmppPresence;
45 
52 
53 class QXMPP_EXPORT QXmppCall : public QXmppLoggable
54 {
55  Q_OBJECT
56  Q_ENUMS(Direction State)
57  Q_FLAGS(QIODevice::OpenModeFlag QIODevice::OpenMode)
58  Q_PROPERTY(Direction direction READ direction CONSTANT)
59  Q_PROPERTY(QString jid READ jid CONSTANT)
60  Q_PROPERTY(State state READ state NOTIFY stateChanged)
61  Q_PROPERTY(QIODevice::OpenMode audioMode READ audioMode NOTIFY audioModeChanged)
62  Q_PROPERTY(QIODevice::OpenMode videoMode READ videoMode NOTIFY videoModeChanged)
63 
64 public:
66  enum Direction
67  {
70  };
71 
73  enum State
74  {
75  ConnectingState = 0,
76  ActiveState = 1,
77  DisconnectingState = 2,
78  FinishedState = 3,
79  };
80 
81  ~QXmppCall();
82 
83  QXmppCall::Direction direction() const;
84  QString jid() const;
85  QString sid() const;
86  QXmppCall::State state() const;
87 
88  QXmppRtpAudioChannel *audioChannel() const;
89  QIODevice::OpenMode audioMode() const;
90  QXmppRtpVideoChannel *videoChannel() const;
91  QIODevice::OpenMode videoMode() const;
92 
93 signals:
99  void connected();
100 
105  void finished();
106 
108  void ringing();
109 
111  void stateChanged(QXmppCall::State state);
112 
114  void audioModeChanged(QIODevice::OpenMode mode);
115 
117  void videoModeChanged(QIODevice::OpenMode mode);
118 
119 public slots:
120  void accept();
121  void hangup();
122  void startVideo();
123  void stopVideo();
124 
125 private slots:
126  void localCandidatesChanged();
127  void terminated();
128  void updateOpenMode();
129 
130 private:
131  QXmppCall(const QString &jid, QXmppCall::Direction direction, QXmppCallManager *parent);
132 
133  QXmppCallPrivate *d;
134  friend class QXmppCallManager;
135  friend class QXmppCallManagerPrivate;
136  friend class QXmppCallPrivate;
137 };
138 
159 
160 class QXMPP_EXPORT QXmppCallManager : public QXmppClientExtension
161 {
162  Q_OBJECT
163 
164 public:
166  ~QXmppCallManager();
167  void setStunServer(const QHostAddress &host, quint16 port = 3478);
168  void setTurnServer(const QHostAddress &host, quint16 port = 3478);
169  void setTurnUser(const QString &user);
170  void setTurnPassword(const QString &password);
171 
173  QStringList discoveryFeatures() const;
174  bool handleStanza(const QDomElement &element);
176 
177 signals:
182  void callReceived(QXmppCall *call);
183 
185  void callStarted(QXmppCall *call);
186 
187 public slots:
188  QXmppCall *call(const QString &jid);
189 
190 protected:
192  void setClient(QXmppClient* client);
194 
195 private slots:
196  void _q_callDestroyed(QObject *object);
197  void _q_disconnected();
198  void _q_iqReceived(const QXmppIq &iq);
199  void _q_jingleIqReceived(const QXmppJingleIq &iq);
200  void _q_presenceReceived(const QXmppPresence &presence);
201 
202 private:
203  QXmppCallManagerPrivate *d;
204  friend class QXmppCall;
205  friend class QXmppCallPrivate;
206  friend class QXmppCallManagerPrivate;
207 };
208 
209 Q_DECLARE_METATYPE(QXmppCall::State)
210 
211 #endif
qxmpp-0.7.6/doc/html/QXmppIq_8h_source.html0000644000175000007640000004036012116723632020534 0ustar sharkyjerryweb QXmpp: QXmppIq.h Source File
QXmpp  Version:0.7.6
QXmppIq.h
1 /*
2  * Copyright (C) 2008-2012 The QXmpp developers
3  *
4  * Author:
5  * Manjeet Dahiya
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 
25 #ifndef QXMPPIQ_H
26 #define QXMPPIQ_H
27 
28 #include "QXmppStanza.h"
29 
30 // forward declarations of QXmlStream* classes will not work on Mac, we need to
31 // include the whole header.
32 // See http://lists.trolltech.com/qt-interest/2008-07/thread00798-0.html
33 // for an explanation.
34 #include <QXmlStreamWriter>
35 
36 class QXmppIqPrivate;
37 
41 
42 class QXMPP_EXPORT QXmppIq : public QXmppStanza
43 {
44 public:
46  enum Type
47  {
48  Error = 0,
49  Get,
50  Set,
51  Result
52  };
53 
55  QXmppIq(const QXmppIq &other);
56  ~QXmppIq();
57 
58  QXmppIq& operator=(const QXmppIq &other);
59 
60  QXmppIq::Type type() const;
61  void setType(QXmppIq::Type);
62 
64  void parse(const QDomElement &element);
65  void toXml(QXmlStreamWriter *writer) const;
66 
67 protected:
68  virtual void parseElementFromChild(const QDomElement &element);
69  virtual void toXmlElementFromChild(QXmlStreamWriter *writer) const;
71 
72 private:
73  QSharedDataPointer<QXmppIqPrivate> d;
74 };
75 
76 #endif // QXMPPIQ_H
qxmpp-0.7.6/doc/html/functions_0x77.html0000644000175000007640000002054612116723632020017 0ustar sharkyjerryweb QXmpp: Class Members
QXmpp  Version:0.7.6
Here is a list of all documented class members with links to the class documentation for each member:

- w -

qxmpp-0.7.6/doc/html/classQXmppMucItem-members.html0000644000175000007640000002734612116723632022236 0ustar sharkyjerryweb QXmpp: Member List
QXmppMucItem Member List

This is the complete list of members for QXmppMucItem, including all inherited members.

actor() const QXmppMucItem
AdminAffiliation enum value (defined in QXmppMucItem)QXmppMucItem
Affiliation enum nameQXmppMucItem
affiliation() const QXmppMucItem
isNull() const QXmppMucItem
jid() const QXmppMucItem
MemberAffiliation enum value (defined in QXmppMucItem)QXmppMucItem
ModeratorRole enum value (defined in QXmppMucItem)QXmppMucItem
nick() const QXmppMucItem
NoAffiliation enum value (defined in QXmppMucItem)QXmppMucItem
NoRole enum value (defined in QXmppMucItem)QXmppMucItem
OutcastAffiliation enum value (defined in QXmppMucItem)QXmppMucItem
OwnerAffiliation enum value (defined in QXmppMucItem)QXmppMucItem
ParticipantRole enum value (defined in QXmppMucItem)QXmppMucItem
QXmppMucItem() (defined in QXmppMucItem)QXmppMucItem
reason() const QXmppMucItem
Role enum nameQXmppMucItem
role() const QXmppMucItem
setActor(const QString &actor)QXmppMucItem
setAffiliation(Affiliation affiliation)QXmppMucItem
setJid(const QString &jid)QXmppMucItem
setNick(const QString &nick)QXmppMucItem
setReason(const QString &reason)QXmppMucItem
setRole(Role role)QXmppMucItem
UnspecifiedAffiliation enum value (defined in QXmppMucItem)QXmppMucItem
UnspecifiedRole enum value (defined in QXmppMucItem)QXmppMucItem
VisitorRole enum value (defined in QXmppMucItem)QXmppMucItem
qxmpp-0.7.6/doc/html/classQXmppStream.png0000644000175000007640000000341412116723632020304 0ustar sharkyjerrywebPNG  IHDR^PLTEutRNST2IDATx풪:Ek (Ie/i,w&_ 0|+>C^ t zAe>$j#zUUm"ɪڈ^UUH6WU&UU$jBsl_UU7~N.*UT󭫪pgz֣*fhk΁?UUuCr޷.}\#PUzmw }C~h+K@#ӿ;쬚yGs谪aqp]E=-x1)濩c=-=?79wn{F9x;婦-sy^í6fvW[8?jWܮ=9TN5WbWU,ni[;jhWzOg{z:%,:P^j zZg2<|{Zxb"x4{m ٫G~k[Vz.jzb[-_;1ղRYni8fP^}Wئ?<ӝfWܦӣ]O?SMN]6;?kzqN).㿫fhzUUf13WUp՝AR'\z^1oҫ1U'5{Q^[Uw^mz^R㚽&V^UUyBUU6dUUmDM$YUUѫjIVUFDUUqkXjHa6ȗ{IENDB`qxmpp-0.7.6/doc/html/classQXmppServerPlugin-members.html0000644000175000007640000001275512116723632023316 0ustar sharkyjerryweb QXmpp: Member List
QXmppServerPlugin Member List

This is the complete list of members for QXmppServerPlugin, including all inherited members.

create(const QString &key)=0QXmppServerPluginpure virtual
keys() const =0QXmppServerPluginpure virtual
qxmpp-0.7.6/doc/html/classQXmppPasswordChecker.html0000644000175000007640000003027312116723632022323 0ustar sharkyjerryweb QXmpp: QXmppPasswordChecker Class Reference

The QXmppPasswordChecker class represents an abstract password checker. More...

#include <QXmppPasswordChecker.h>

Public Member Functions

virtual QXmppPasswordReplycheckPassword (const QXmppPasswordRequest &request)
virtual QXmppPasswordReplygetDigest (const QXmppPasswordRequest &request)
virtual bool hasGetPassword () const

Protected Member Functions

virtual QXmppPasswordReply::Error getPassword (const QXmppPasswordRequest &request, QString &password)

Detailed Description

The QXmppPasswordChecker class represents an abstract password checker.

Member Function Documentation

QXmppPasswordReply * QXmppPasswordChecker::checkPassword ( const QXmppPasswordRequest request)
virtual

Checks that the given credentials are valid.

The base implementation requires that you reimplement getPassword().

Parameters
request
QXmppPasswordReply * QXmppPasswordChecker::getDigest ( const QXmppPasswordRequest request)
virtual

Retrieves the MD5 digest for the given username.

Reimplement this method if your backend natively supports retrieving MD5 digests.

Parameters
request
QXmppPasswordReply::Error QXmppPasswordChecker::getPassword ( const QXmppPasswordRequest request,
QString &  password 
)
protectedvirtual

Retrieves the password for the given username.

The simplest way to write a password checker is to reimplement this method.

Parameters
request
password
bool QXmppPasswordChecker::hasGetPassword ( ) const
virtual

Returns true if the getPassword() method is implemented.


The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppMessage.html0000644000175000007640000012747412116723632020632 0ustar sharkyjerryweb QXmpp: QXmppMessage Class Reference

The QXmppMessage class represents an XMPP message. More...

#include <QXmppMessage.h>

Inheritance diagram for QXmppMessage:
QXmppStanza

Public Types

enum  Type {
  Error = 0, Normal, Chat, GroupChat,
  Headline
}
 This enum described a message type.
enum  State {
  None = 0, Active, Inactive, Gone,
  Composing, Paused
}

Public Member Functions

 QXmppMessage (const QString &from="", const QString &to="", const QString &body="", const QString &thread="")
 QXmppMessage (const QXmppMessage &other)
 Constructs a copy of other.
QXmppMessageoperator= (const QXmppMessage &other)
 Assigns other to this message.
QString body () const
void setBody (const QString &)
bool isAttentionRequested () const
void setAttentionRequested (bool requested)
bool isReceiptRequested () const
void setReceiptRequested (bool requested)
QString mucInvitationJid () const
void setMucInvitationJid (const QString &jid)
QString mucInvitationPassword () const
void setMucInvitationPassword (const QString &password)
QString mucInvitationReason () const
void setMucInvitationReason (const QString &reason)
QString receiptId () const
void setReceiptId (const QString &id)
QDateTime stamp () const
 Returns the message's timestamp (if any).
void setStamp (const QDateTime &stamp)
QXmppMessage::State state () const
void setState (QXmppMessage::State)
QString subject () const
void setSubject (const QString &)
QString thread () const
 Returns the message's thread.
void setThread (const QString &)
QXmppMessage::Type type () const
void setType (QXmppMessage::Type)
QString xhtml () const
void setXhtml (const QString &xhtml)
- Public Member Functions inherited from QXmppStanza
 QXmppStanza (const QString &from=QString(), const QString &to=QString())
 QXmppStanza (const QXmppStanza &other)
 Constructs a copy of other.
virtual ~QXmppStanza ()
 Destroys a QXmppStanza.
QXmppStanzaoperator= (const QXmppStanza &other)
 Assigns other to this stanza.
QString to () const
void setTo (const QString &)
QString from () const
 Returns the stanza's sender JID.
void setFrom (const QString &)
QString id () const
 Returns the stanza's identifier.
void setId (const QString &)
QString lang () const
 Returns the stanza's language.
void setLang (const QString &)
QXmppStanza::Error error () const
 Returns the stanza's error.
void setError (const QXmppStanza::Error &error)
QXmppElementList extensions () const
void setExtensions (const QXmppElementList &elements)
QList< QXmppExtendedAddressextendedAddresses () const
void setExtendedAddresses (const QList< QXmppExtendedAddress > &extendedAddresses)

Detailed Description

The QXmppMessage class represents an XMPP message.

Member Enumeration Documentation

This enum describes a chat state as defined by XEP-0085 : Chat State Notifications.

Enumerator:
None 

The message does not contain any chat state information.

Active 

User is actively participating in the chat session.

Inactive 

User has not been actively participating in the chat session.

Gone 

User has effectively ended their participation in the chat session.

Composing 

User is composing a message.

Paused 

User had been composing but now has stopped.

Constructor & Destructor Documentation

QXmppMessage::QXmppMessage ( const QString &  from = "",
const QString &  to = "",
const QString &  body = "",
const QString &  thread = "" 
)

Constructs a QXmppMessage.

Parameters
from
to
body
thread

Member Function Documentation

QString QXmppMessage::body ( ) const

Returns the message's body.

bool QXmppMessage::isAttentionRequested ( ) const

Returns true if the user's attention is requested, as defined by XEP-0224: Attention.

bool QXmppMessage::isReceiptRequested ( ) const

Returns true if a delivery receipt is requested, as defined by XEP-0184: Message Delivery Receipts.

QString QXmppMessage::mucInvitationJid ( ) const

Returns the JID for a multi-user chat direct invitation as defined by XEP-0249: Direct MUC Invitations.

QString QXmppMessage::mucInvitationPassword ( ) const

Returns the password for a multi-user chat direct invitation as defined by XEP-0249: Direct MUC Invitations.

QString QXmppMessage::mucInvitationReason ( ) const

Returns the reason for a multi-user chat direct invitation as defined by XEP-0249: Direct MUC Invitations.

QString QXmppMessage::receiptId ( ) const

If this message is a delivery receipt, returns the ID of the original message.

void QXmppMessage::setAttentionRequested ( bool  requested)

Sets whether the user's attention is requested, as defined by XEP-0224: Attention.

param requested

void QXmppMessage::setBody ( const QString &  body)

Sets the message's body.

Parameters
body
void QXmppMessage::setMucInvitationJid ( const QString &  jid)

Sets the JID for a multi-user chat direct invitation as defined by XEP-0249: Direct MUC Invitations.

void QXmppMessage::setMucInvitationPassword ( const QString &  password)

Sets the password for a multi-user chat direct invitation as defined by XEP-0249: Direct MUC Invitations.

void QXmppMessage::setMucInvitationReason ( const QString &  reason)

Sets the reason for a multi-user chat direct invitation as defined by XEP-0249: Direct MUC Invitations.

void QXmppMessage::setReceiptId ( const QString &  id)

Make this message a delivery receipt for the message with the given id.

void QXmppMessage::setReceiptRequested ( bool  requested)

Sets whether a delivery receipt is requested, as defined by XEP-0184: Message Delivery Receipts.

param requested

void QXmppMessage::setStamp ( const QDateTime &  stamp)

Sets the message's timestamp.

Parameters
stamp
void QXmppMessage::setState ( QXmppMessage::State  state)

Sets the message's chat state.

Parameters
state
void QXmppMessage::setSubject ( const QString &  subject)

Sets the message's subject.

Parameters
subject
void QXmppMessage::setThread ( const QString &  thread)

Sets the message's thread.

Parameters
thread
void QXmppMessage::setType ( QXmppMessage::Type  type)

Sets the message's type.

Parameters
type
void QXmppMessage::setXhtml ( const QString &  xhtml)

Sets the message's XHTML body as defined by XEP-0071: XHTML-IM.

QXmppMessage::State QXmppMessage::state ( ) const

Returns the message's chat state.

QString QXmppMessage::subject ( ) const

Returns the message's subject.

QXmppMessage::Type QXmppMessage::type ( ) const

Returns the message's type.

QString QXmppMessage::xhtml ( ) const

Returns the message's XHTML body as defined by XEP-0071: XHTML-IM.


The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/functions_0x75.html0000644000175000007640000002203112116723632020004 0ustar sharkyjerryweb QXmpp: Class Members
QXmpp  Version:0.7.6
Here is a list of all documented class members with links to the class documentation for each member:

- u -

qxmpp-0.7.6/doc/html/hierarchy.html0000644000175000007640000011575212116723632017204 0ustar sharkyjerryweb QXmpp: Class Hierarchy
QXmpp  Version:0.7.6
Class Hierarchy
This inheritance list is sorted roughly, but not completely, alphabetically:
[detail level 123]
oCQXmppDataForm::FieldThe QXmppDataForm::Field class represents a data form field as defined by XEP-0004: Data Forms
oCQXmppRosterIq::ItemThe QXmppRosterIq::Item class represents a roster entry
oCQXmppDataForm::MediaThe QXmppDataForm::Media class represents a media field as defined by XEP-0221: Data Forms Media Element
oCQXmppArchiveChatArchived conversation as defined by XEP-0136: Message Archiving
oCQXmppArchiveMessageArchived message as defined by XEP-0136: Message Archiving
oCQXmppBookmarkConferenceBookmark for a conference room, as defined by XEP-0048: Bookmarks
oCQXmppBookmarkSetThe QXmppbookmarkSets class represents a set of bookmarks, as defined by XEP-0048: Bookmarks
oCQXmppBookmarkUrlBookmark for a web page, as defined by XEP-0048: Bookmarks
oCQXmppConfigurationHolds configuration options
oCQXmppDataFormData form as defined by XEP-0004: Data Forms
oCQXmppExtendedAddressRepresents an extended address as defined by XEP-0033: Extended Stanza Addressing
oCQXmppInvokable
oCQXmppJingleCandidateTransport candidate as specified by XEP-0176: Jingle ICE-UDP Transport Method
oCQXmppJinglePayloadTypePayload type as specified by XEP-0167: Jingle RTP Sessions and RFC 5245
oCQXmppLoggableSource of logging messages
|oCQXmppCallVoice-Over-IP call to a remote party
|oCQXmppClientMain class for using QXmpp
|oCQXmppClientExtensionBase class for QXmppClient extensions
||oCQXmppArchiveManagerMakes it possible to access message archives as defined by XEP-0136: Message Archiving
||oCQXmppBookmarkManagerAllows you to store and retrieve bookmarks as defined by XEP-0048: Bookmarks
||oCQXmppCallManagerSupport for making and receiving voice calls
||oCQXmppDiscoveryManagerMakes it possible to discover information about other entities as defined by XEP-0030: Service Discovery
||oCQXmppEntityTimeManagerProvided the functionality to get the local time of an entity as defined by XEP-0202: Entity Time
||oCQXmppMessageReceiptManagerMakes it possible to send and receive message delivery receipts as defined in XEP-0184: Message Delivery Receipts
||oCQXmppMucManagerMakes it possible to interact with multi-user chat rooms as defined by XEP-0045: Multi-User Chat
||oCQXmppRosterManagerAccess to a connected client's roster
||oCQXmppRpcManagerMake it possible to invoke remote methods and to expose local interfaces for remote procedure calls, as specified by XEP-0009: Jabber-RPC
||oCQXmppTransferManagerSupport for sending and receiving files
||oCQXmppVCardManagerGets/sets XMPP vCards. It is an implementation of XEP-0054: vcard-temp
||\CQXmppVersionManagerMakes it possible to request for the software version of an entity as defined by XEP-0092: Software Version
|oCQXmppIceComponentPiece of a media stream requiring a single transport address, as defined by RFC 5245 (Interactive Connectivity Establishment)
|oCQXmppIceConnectionSet of UDP sockets capable of performing Interactive Connectivity Establishment (RFC 5245)
|oCQXmppRtpVideoChannelRTP video channel to a remote party
|oCQXmppServerXMPP server
|oCQXmppServerExtensionBase class for QXmppServer extensions
|oCQXmppStreamBase class for all XMPP streams
||oCQXmppIncomingClientInterface for password checkers
||oCQXmppIncomingServerIncoming XMPP stream from an XMPP server
||oCQXmppOutgoingClientOutgoing XMPP stream to an XMPP server
||\CQXmppOutgoingServerOutgoing XMPP stream to another XMPP server
|\CQXmppTransferJobSingle file transfer job
oCQXmppLoggerSink for logging messages
oCQXmppMucItemChat room "item"
oCQXmppMucRoomMulti-user chat room as defined by XEP-0045: Multi-User Chat
oCQXmppPasswordCheckerAbstract password checker
oCQXmppPasswordReplyPassword reply
oCQXmppPasswordRequestPassword request
oCQXmppPubSubItemPublish-subscribe item as defined by XEP-0060: Publish-Subscribe
oCQXmppResultSetQuerySet element in a query as defined by XEP-0059: Result Set Management
oCQXmppResultSetReplySet element in a reply as defined by XEP-0059: Result Set Management
oCQXmppRtpAudioChannelRTP audio channel to a remote party
oCQXmppRtpPacketRTP packet
oCQXmppServerPluginBase class for QXmppServer plugins
oCQXmppSslServerSSL-enabled TCP server
oCQXmppStanzaBase class for all XMPP stanzas
|oCQXmppDialbackStanza used for the Server Dialback protocol as specified by XEP-0220: Server Dialback
|oCQXmppIqBase class for all IQs
||oCQXmppArchiveChatIqRepresents an archive chat as defined by XEP-0136: Message Archiving
||oCQXmppArchiveListIqRepresents an archive list as defined by XEP-0136: Message Archiving
||oCQXmppArchivePrefIqRepresents an archive preference IQ as defined by XEP-0136: Message Archiving
||oCQXmppArchiveRemoveIqRepresents an archive remove IQ as defined by XEP-0136: Message Archiving
||oCQXmppArchiveRetrieveIqRepresents an archive retrieve IQ as defined by XEP-0136: Message Archiving
||oCQXmppBindIqIQ used for resource binding as defined by RFC 3921
||oCQXmppJingleIqIQ used for initiating media sessions as specified by XEP-0166: Jingle
||oCQXmppMucAdminIqChat room administration IQ as defined by XEP-0045: Multi-User Chat
||oCQXmppMucOwnerIqChat room configuration IQ as defined by XEP-0045: Multi-User Chat
||oCQXmppPubSubIqIQ used for the publish-subscribe mechanisms defined by XEP-0060: Publish-Subscribe
||oCQXmppRegisterIqRegistration IQ as defined by XEP-0077: In-Band Registration
||oCQXmppRosterIqRoster IQ
||oCQXmppRpcInvokeIqIQ used to carry an RPC invocation as specified by XEP-0009: Jabber-RPC
||oCQXmppRpcResponseIqIQ used to carry an RPC response as specified by XEP-0009: Jabber-RPC
||oCQXmppSessionIqIQ used for session establishment as defined by RFC 3921
||oCQXmppVCardIqRepresents the XMPP vCard
||\CQXmppVersionIqIQ for conveying a software version as defined by XEP-0092: Software Version
|oCQXmppMessageXMPP message
|\CQXmppPresenceXMPP presence stanza
oCQXmppUtilsStatic utility functions
oCQXmppVCardAddressRepresent a vCard address
oCQXmppVCardEmailRepresents a vCard e-mail address
oCQXmppVCardPhoneRepresents a vCard phone number
\CQXmppVideoFrameRepresentation of a frame of video data
qxmpp-0.7.6/doc/html/classQXmppTransferManager.png0000644000175000007640000000171212116723632022127 0ustar sharkyjerrywebPNG  IHDRPLTEutRNST2YIDATx뒤 ?U^@^t2CB DRJC$I*$ɧ $ޓMj;I:H YZ V5˜=Ǜ|<$]A!mmta1Md5c:%ld[|rϊ+<(js7b_yA6%J^Oח$ٱ6%ɣپ/$ $44YJ)(0%{FElm\M )| 2 )| 2 )|_RJiH$i@$dӁlVI҅笃ҷ5.|OVtts $I'rB)3_c)J\7rv[7O65ĶKVu+㦣8t?#~O?tߓy%g\(MI4M6FsO8YTWmƼKĞyxȶ:B*&sVȚڴu 0!I? $~]PIOC҈^CjXkTafA%*| 2 )| 2 )| 2 liH1 )|jzXj ЩTrLA%TKs~~4> @1Us/S =%uReV7劬t.3@6;ν;_z=f^v! Yݽ&zն thrl+yguN9<Y?e'Gc6+9;+sv>kOK;\PMkZVu/fj Em>Bοu0 ɦiF>;IENDB`qxmpp-0.7.6/doc/html/classQXmppUtils.html0000644000175000007640000004242612116723632020337 0ustar sharkyjerryweb QXmpp: 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:
qxmpp-0.7.6/doc/html/classQXmppConfiguration-members.html0000644000175000007640000005141712116723632023476 0ustar sharkyjerryweb QXmpp: Member List
QXmppConfiguration Member List

This is the complete list of members for QXmppConfiguration, including all inherited members.

autoAcceptSubscriptions() const QXmppConfiguration
autoReconnectionEnabled() const QXmppConfiguration
caCertificates() const QXmppConfiguration
domain() const QXmppConfiguration
facebookAccessToken() const QXmppConfiguration
facebookAppId() const QXmppConfiguration
googleAccessToken() const QXmppConfiguration
host() const QXmppConfiguration
ignoreSslErrors() const QXmppConfiguration
jid() const QXmppConfiguration
jidBare() const QXmppConfiguration
keepAliveInterval() const QXmppConfiguration
keepAliveTimeout() const QXmppConfiguration
networkProxy() const QXmppConfiguration
nonSASLAuthMechanism() const QXmppConfiguration
NonSASLAuthMechanism enum nameQXmppConfiguration
NonSASLDigest enum valueQXmppConfiguration
NonSASLPlain enum valueQXmppConfiguration
operator=(const QXmppConfiguration &other)QXmppConfiguration
password() const QXmppConfiguration
port() const QXmppConfiguration
QXmppConfiguration()QXmppConfiguration
QXmppConfiguration(const QXmppConfiguration &other)QXmppConfiguration
resource() const QXmppConfiguration
saslAuthMechanism() const QXmppConfiguration
setAutoAcceptSubscriptions(bool)QXmppConfiguration
setAutoReconnectionEnabled(bool)QXmppConfiguration
setCaCertificates(const QList< QSslCertificate > &)QXmppConfiguration
setDomain(const QString &)QXmppConfiguration
setFacebookAccessToken(const QString &)QXmppConfiguration
setFacebookAppId(const QString &)QXmppConfiguration
setGoogleAccessToken(const QString &accessToken)QXmppConfiguration
setHost(const QString &)QXmppConfiguration
setIgnoreSslErrors(bool)QXmppConfiguration
setJid(const QString &jid)QXmppConfiguration
setKeepAliveInterval(int secs)QXmppConfiguration
setKeepAliveTimeout(int secs)QXmppConfiguration
setNetworkProxy(const QNetworkProxy &proxy)QXmppConfiguration
setNonSASLAuthMechanism(QXmppConfiguration::NonSASLAuthMechanism)QXmppConfiguration
setPassword(const QString &)QXmppConfiguration
setPort(int)QXmppConfiguration
setResource(const QString &)QXmppConfiguration
setSaslAuthMechanism(const QString &mechanism)QXmppConfiguration
setStreamSecurityMode(QXmppConfiguration::StreamSecurityMode mode)QXmppConfiguration
setUseNonSASLAuthentication(bool)QXmppConfiguration
setUser(const QString &)QXmppConfiguration
setUseSASLAuthentication(bool)QXmppConfiguration
setWindowsLiveAccessToken(const QString &accessToken)QXmppConfiguration
StreamSecurityMode enum nameQXmppConfiguration
streamSecurityMode() const QXmppConfiguration
TLSDisabled enum valueQXmppConfiguration
TLSEnabled enum valueQXmppConfiguration
TLSRequired enum valueQXmppConfiguration
useNonSASLAuthentication() const QXmppConfiguration
user() const QXmppConfiguration
useSASLAuthentication() const QXmppConfiguration
windowsLiveAccessToken() const QXmppConfiguration
~QXmppConfiguration()QXmppConfiguration
qxmpp-0.7.6/doc/html/closed.png0000644000175000007640000000020412116723632016300 0ustar sharkyjerrywebPNG  IHDR KIDATxm @!Gk7-`&sts@k}2 P%_N .:0Dk›x" ֛)x5IENDB`qxmpp-0.7.6/doc/html/functions_0x62.html0000644000175000007640000002141512116723632020005 0ustar sharkyjerryweb QXmpp: Class Members
QXmpp  Version:0.7.6
Here is a list of all documented class members with links to the class documentation for each member:

- b -

qxmpp-0.7.6/doc/html/classQXmppDialback.html0000644000175000007640000005450312116723632020730 0ustar sharkyjerryweb QXmpp: QXmppDialback Class Reference

The QXmppDialback class represents a stanza used for the Server Dialback protocol as specified by XEP-0220: Server Dialback. More...

#include <QXmppDialback.h>

Inheritance diagram for QXmppDialback:
QXmppStanza

Public Types

enum  Command { Result, Verify }
 This enum is used to describe a dialback command. More...

Public Member Functions

 QXmppDialback ()
 Constructs a QXmppDialback.
Command command () const
 Returns the dialback command.
void setCommand (Command command)
QString key () const
 Returns the dialback key.
void setKey (const QString &key)
QString type () const
 Returns the dialback type.
void setType (const QString &type)
- Public Member Functions inherited from QXmppStanza
 QXmppStanza (const QString &from=QString(), const QString &to=QString())
 QXmppStanza (const QXmppStanza &other)
 Constructs a copy of other.
virtual ~QXmppStanza ()
 Destroys a QXmppStanza.
QXmppStanzaoperator= (const QXmppStanza &other)
 Assigns other to this stanza.
QString to () const
void setTo (const QString &)
QString from () const
 Returns the stanza's sender JID.
void setFrom (const QString &)
QString id () const
 Returns the stanza's identifier.
void setId (const QString &)
QString lang () const
 Returns the stanza's language.
void setLang (const QString &)
QXmppStanza::Error error () const
 Returns the stanza's error.
void setError (const QXmppStanza::Error &error)
QXmppElementList extensions () const
void setExtensions (const QXmppElementList &elements)
QList< QXmppExtendedAddressextendedAddresses () const
void setExtendedAddresses (const QList< QXmppExtendedAddress > &extendedAddresses)

Detailed Description

The QXmppDialback class represents a stanza used for the Server Dialback protocol as specified by XEP-0220: Server Dialback.

Member Enumeration Documentation

This enum is used to describe a dialback command.

Enumerator:
Result 

A dialback command between the originating server and the receiving server.

Verify 

A dialback command between the receiving server and the authoritative server.

Member Function Documentation

void QXmppDialback::setCommand ( QXmppDialback::Command  command)

Sets the dialback command.

Parameters
command
void QXmppDialback::setKey ( const QString &  key)

Sets the dialback key.

Parameters
key
void QXmppDialback::setType ( const QString &  type)

Sets the dialback type.

Parameters
type

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppMessageReceiptManager.png0000644000175000007640000000206512116723632023245 0ustar sharkyjerrywebPNG  IHDRdsPLTEutRNST2IDATxᒃ ϙ#hE'w]H1k K IBhH膿Mgdrȁ]Q&1pMhs6Huԛ7ַ٘]2g4Vۻsh\goLa?:٬T?U*Ik I2ƺRIlkА&4$ !I^4/y\{h<`qhDChx!4^ /B Bhx!4^ C}_zI:!I^ IQnt&IL#V}_!IK55$5ɃZcV㕤4e46䜚g^4u6X/ Eijo2[mR+%2~Fc tRToUOcޖ@q| ԟs#P#g5g6=Bhx麮:?Q'UrIENDB`qxmpp-0.7.6/doc/html/classQXmppIncomingClient.html0000644000175000007640000005440412116723632022140 0ustar sharkyjerryweb QXmpp: QXmppIncomingClient Class Reference
QXmppIncomingClient Class Reference

Interface for password checkers. More...

#include <QXmppIncomingClient.h>

Inheritance diagram for QXmppIncomingClient:
QXmppStream QXmppLoggable

Signals

void elementReceived (const QDomElement &element)
 This signal is emitted when an element is received.
- Signals inherited from QXmppStream
void connected ()
 This signal is emitted when the stream is connected.
void disconnected ()
 This signal is emitted when the stream is disconnected.
- Signals inherited from QXmppLoggable
void setGauge (const QString &gauge, double value)
 Sets the given gauge to value.
void logMessage (QXmppLogger::MessageType type, const QString &msg)
 This signal is emitted to send logging messages.
void updateCounter (const QString &counter, qint64 amount=1)
 Updates the given counter by amount.

Public Member Functions

 QXmppIncomingClient (QSslSocket *socket, const QString &domain, QObject *parent=0)
 ~QXmppIncomingClient ()
bool isConnected () const
QString jid () const
void setInactivityTimeout (int secs)
void setPasswordChecker (QXmppPasswordChecker *checker)
- Public Member Functions inherited from QXmppStream
 QXmppStream (QObject *parent)
 ~QXmppStream ()
 Destroys a base XMPP stream.
bool sendPacket (const QXmppStanza &)
- Public Member Functions inherited from QXmppLoggable
 QXmppLoggable (QObject *parent=0)

Friends

class QXmppIncomingClientPrivate

Additional Inherited Members

- Public Slots inherited from QXmppStream
virtual void disconnectFromHost ()
virtual bool sendData (const QByteArray &)
- Protected Member Functions inherited from QXmppStream
QSslSocket * socket () const
void setSocket (QSslSocket *socket)
virtual void handleStart ()
virtual void handleStanza (const QDomElement &element)=0
virtual void handleStream (const QDomElement &element)=0

Detailed Description

Interface for password checkers.

The QXmppIncomingClient class represents an incoming XMPP stream from an XMPP client.

Constructor & Destructor Documentation

QXmppIncomingClient::QXmppIncomingClient ( QSslSocket *  socket,
const QString &  domain,
QObject *  parent = 0 
)

Constructs a new incoming client stream.

Parameters
socketThe socket for the XMPP stream.
domainThe local domain.
parentThe parent QObject for the stream (optional).
QXmppIncomingClient::~QXmppIncomingClient ( )

Destroys the current stream.

Member Function Documentation

bool QXmppIncomingClient::isConnected ( ) const
virtual

Returns true if the socket is connected, the client is authenticated and a resource is bound.

Reimplemented from QXmppStream.

QString QXmppIncomingClient::jid ( ) const

Returns the client's JID.

void QXmppIncomingClient::setInactivityTimeout ( int  secs)

Sets the number of seconds after which a client will be disconnected for inactivity.

void QXmppIncomingClient::setPasswordChecker ( QXmppPasswordChecker checker)

Sets the password checker used to verify client credentials.

Parameters
checker

The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/classQXmppClient.html0000644000175000007640000016744712116723632020470 0ustar sharkyjerryweb QXmpp: QXmppClient Class Reference

The QXmppClient class is the main class for using QXmpp. More...

#include <QXmppClient.h>

Inheritance diagram for QXmppClient:
QXmppLoggable

Public Types

enum  Error { NoError, SocketError, KeepAliveError, XmppStreamError }
enum  State { DisconnectedState, ConnectingState, ConnectedState }
 This enumeration describes a client state. More...

Public Slots

void connectToServer (const QString &jid, const QString &password)
void disconnectFromServer ()
bool sendPacket (const QXmppStanza &)
void sendMessage (const QString &bareJid, const QString &message)

Signals

void connected ()
void disconnected ()
void error (QXmppClient::Error)
void loggerChanged (QXmppLogger *logger)
 This signal is emitted when the logger changes.
void messageReceived (const QXmppMessage &message)
void presenceReceived (const QXmppPresence &presence)
void iqReceived (const QXmppIq &iq)
void stateChanged (QXmppClient::State state)
 This signal is emitted when the client state changes.
- Signals inherited from QXmppLoggable
void setGauge (const QString &gauge, double value)
 Sets the given gauge to value.
void logMessage (QXmppLogger::MessageType type, const QString &msg)
 This signal is emitted to send logging messages.
void updateCounter (const QString &counter, qint64 amount=1)
 Updates the given counter by amount.

Public Member Functions

 QXmppClient (QObject *parent=0)
 ~QXmppClient ()
bool addExtension (QXmppClientExtension *extension)
bool insertExtension (int index, QXmppClientExtension *extension)
bool removeExtension (QXmppClientExtension *extension)
QList< QXmppClientExtension * > extensions ()
template<typename T >
T * findExtension ()
 Returns the extension which can be cast into type T*, or 0 if there is no such extension.
void connectToServer (const QXmppConfiguration &, const QXmppPresence &initialPresence=QXmppPresence())
bool isAuthenticated () const
 Returns true if the client has authenticated with the XMPP server.
bool isConnected () const
QXmppPresence clientPresence () const
void setClientPresence (const QXmppPresence &presence)
QXmppConfigurationconfiguration ()
QXmppLoggerlogger () const
void setLogger (QXmppLogger *logger)
 Sets the QXmppLogger associated with the current QXmppClient.
QAbstractSocket::SocketError socketError ()
State state () const
QXmppStanza::Error::Condition xmppStreamError ()
QXmppRosterManagerrosterManager ()
QXmppVCardManagervCardManager ()
QXmppVersionManagerversionManager ()
- Public Member Functions inherited from QXmppLoggable
 QXmppLoggable (QObject *parent=0)

Properties

QXmppLogger logger
 Returns the QXmppLogger associated with the current QXmppClient.
State state
 Returns the client's current state.

Additional Inherited Members

- Protected Member Functions inherited from QXmppLoggable
void debug (const QString &message)
void info (const QString &message)
void warning (const QString &message)
void logReceived (const QString &message)
void logSent (const QString &message)

Detailed Description

The QXmppClient class is the main class for using QXmpp.

It provides the user all the required functionality to connect to the server and perform operations afterwards.

This class will provide the handle/reference to QXmppRosterManager (roster management), QXmppVCardManager (vCard manager), and QXmppVersionManager (software version information).

By default, the client will automatically try reconnecting to the server. You can change this a behaviour using QXmppConfiguration::setAutoReconnectionEnabled().

Not all the managers or extensions have been enabled by default. One can enable/disable the managers using the funtions addExtension() and removeExtension(). findExtension() can be used to find reference/pointer to particular instansiated and enabled manager.

List of managers enabled by default:

Member Enumeration Documentation

An enumeration for type of error. Error could come due a TCP socket or XML stream or due to various stanzas.

Enumerator:
NoError 

No error.

SocketError 

Error due to TCP socket.

KeepAliveError 

Error due to no response to a keep alive.

XmppStreamError 

Error due to XML stream.

This enumeration describes a client state.

Enumerator:
DisconnectedState 

Disconnected from the server.

ConnectingState 

Trying to connect to the server.

ConnectedState 

Connected to the server.

Constructor & Destructor Documentation

QXmppClient::QXmppClient ( QObject *  parent = 0)

Creates a QXmppClient object.

Parameters
parentis passed to the QObject's constructor. The default value is 0.
QXmppClient::~QXmppClient ( )

Destructor, destroys the QXmppClient object.

Member Function Documentation

bool QXmppClient::addExtension ( QXmppClientExtension extension)

Registers a new extension with the client.

Parameters
extension
QXmppPresence QXmppClient::clientPresence ( ) const

Returns the client's current presence.

QXmppConfiguration & QXmppClient::configuration ( )

Returns a modifiable reference to the current configuration of QXmppClient.

Returns
Reference to the QXmppClient's configuration for the connection.
void QXmppClient::connected ( )
signal

This signal is emitted when the client connects successfully to the XMPP server i.e. when a successful XMPP connection is established. XMPP Connection involves following sequential steps:

  • TCP socket connection
  • Client sends start stream
  • Server sends start stream
  • TLS negotiation (encryption)
  • Authentication
  • Resource binding
  • Session establishment

After all these steps a successful XMPP connection is established and connected() signal is emitted.

After the connected() signal is emitted QXmpp will send the roster request to the server. On receiving the roster, QXmpp will emit QXmppRosterManager::rosterReceived(). After this signal, QXmppRosterManager object gets populated and you can use rosterManager() to get the handle of QXmppRosterManager object.

void QXmppClient::connectToServer ( const QXmppConfiguration config,
const QXmppPresence initialPresence = QXmppPresence() 
)

Attempts to connect to the XMPP server. Server details and other configurations are specified using the config parameter. Use signals connected(), error(QXmppClient::Error) and disconnected() to know the status of the connection.

Parameters
configSpecifies the configuration object for connecting the XMPP server. This contains the host name, user, password etc. See QXmppConfiguration for details.
initialPresenceThe initial presence which will be set for this user after establishing the session. The default value is QXmppPresence::Available
void QXmppClient::connectToServer ( const QString &  jid,
const QString &  password 
)
slot

Overloaded function to simply connect to an XMPP server with a JID and password.

Parameters
jidJID for the account.
passwordPassword for the account.
void QXmppClient::disconnected ( )
signal

This signal is emitted when the XMPP connection disconnects.

void QXmppClient::disconnectFromServer ( )
slot

Disconnects the client and the current presence of client changes to QXmppPresence::Unavailable and status text changes to "Logged out".

Note
Make sure that the clientPresence is changed to QXmppPresence::Available, if you are again calling connectToServer() after calling the disconnectFromServer() function.
void QXmppClient::error ( QXmppClient::Error  )
signal

This signal is emitted when the XMPP connection encounters any error. The QXmppClient::Error parameter specifies the type of error occurred. It could be due to TCP socket or the xml stream or the stanza. Depending upon the type of error occurred use the respective get function to know the error.

QList< QXmppClientExtension * > QXmppClient::extensions ( )

Returns a list containing all the client's extensions.

template<typename T >
T* QXmppClient::findExtension ( )
inline

Returns the extension which can be cast into type T*, or 0 if there is no such extension.

   Usage example:
   @code 

QXmppDiscoveryManager* ext = client->findExtension<QXmppDiscoveryManager>(); if(ext) { //extension found, do stuff... }

bool QXmppClient::insertExtension ( int  index,
QXmppClientExtension extension 
)

Registers a new extension with the client at the given index.

Parameters
index
extension
void QXmppClient::iqReceived ( const QXmppIq iq)
signal

Notifies that an XMPP iq stanza is received. The QXmppIq parameter contains the details of the iq sent to this client. IQ stanzas provide a structured request-response mechanism. Roster management, setting-getting vCards etc is done using iq stanzas.

bool QXmppClient::isConnected ( ) const

Returns true if the client is connected to the XMPP server.

void QXmppClient::messageReceived ( const QXmppMessage message)
signal

Notifies that an XMPP message stanza is received. The QXmppMessage parameter contains the details of the message sent to this client. In other words whenever someone sends you a message this signal is emitted.

void QXmppClient::presenceReceived ( const QXmppPresence presence)
signal

Notifies that an XMPP presence stanza is received. The QXmppPresence parameter contains the details of the presence sent to this client. This signal is emitted when someone login/logout or when someone's status changes Busy, Idle, Invisible etc.

bool QXmppClient::removeExtension ( QXmppClientExtension extension)

Unregisters the given extension from the client. If the extension is found, it will be destroyed.

Parameters
extension
QXmppRosterManager & QXmppClient::rosterManager ( )

Returns the reference to QXmppRosterManager object of the client.

Returns
Reference to the roster object of the connected client. Use this to get the list of friends in the roster and their presence information.
void QXmppClient::sendMessage ( const QString &  bareJid,
const QString &  message 
)
slot

Utility function to send message to all the resources associated with the specified bareJid. If there are no resources available, that is the contact is offline or not present in the roster, it will still send a message to the bareJid.

Parameters
bareJidbareJid of the receiving entity
messageMessage string to be sent.
bool QXmppClient::sendPacket ( const QXmppStanza packet)
slot

After successfully connecting to the server use this function to send stanzas to the server. This function can solely be used to send various kind of stanzas to the server. QXmppStanza is a parent class of all the stanzas QXmppMessage, QXmppPresence, QXmppIq, QXmppBind, QXmppRosterIq, QXmppSession and QXmppVCard.

Returns
Returns true if the packet was sent, false otherwise.

Following code snippet illustrates how to send a message using this function:

QXmppMessage message(from, to, message);
client.sendPacket(message);
Parameters
packetA valid XMPP stanza. It can be an iq, a message or a presence stanza.
void QXmppClient::setClientPresence ( const QXmppPresence presence)

Changes the presence of the connected client.

The connection to the server will be updated accordingly:

  • Otherwise, the connection to the server will be established as needed.
Parameters
presenceQXmppPresence object
QAbstractSocket::SocketError QXmppClient::socketError ( )

Returns the socket error if error() is QXmppClient::SocketError.

QXmppVCardManager & QXmppClient::vCardManager ( )

Returns the reference to QXmppVCardManager, implementation of XEP-0054. http://xmpp.org/extensions/xep-0054.html

QXmppVersionManager & QXmppClient::versionManager ( )

Returns the reference to QXmppVersionManager, implementation of XEP-0092. http://xmpp.org/extensions/xep-0092.html

QXmppStanza::Error::Condition QXmppClient::xmppStreamError ( )

Returns the XMPP stream error if QXmppClient::Error is QXmppClient::XmppStreamError.


The documentation for this class was generated from the following files:
qxmpp-0.7.6/doc/html/search/0000755000175000007640000000000012116723632015572 5ustar sharkyjerrywebqxmpp-0.7.6/doc/html/search/enumvalues_6f.js0000644000175000007640000000117312116723632020711 0ustar sharkyjerrywebvar searchData= [ ['offerstate',['OfferState',['../classQXmppTransferJob.html#aab5bb06ca0d2c4f1fac33b7012d1c14fa0f5f5eec8a95f2faf27186dfd502f581',1,'QXmppTransferJob']]], ['online',['Online',['../classQXmppPresence.html#ad56af0f57b732c09b080b9347c4dba94a1285bac9669e2b48502a464f97dd85ee',1,'QXmppPresence']]], ['outgoingdirection',['OutgoingDirection',['../classQXmppCall.html#a429a4f8065136068b6d936cb2c803175a4959a53587ff3fe714b0c619dd8ba47d',1,'QXmppCall::OutgoingDirection()'],['../classQXmppTransferJob.html#a9c95a89a01357588f699e7d80c3de0b6adbfcc81360e31c1ded162fa244132bb7',1,'QXmppTransferJob::OutgoingDirection()']]] ]; qxmpp-0.7.6/doc/html/search/enums_70.html0000644000175000007640000000170612116723632020121 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/search_r.png0000644000175000007640000000114412116723632020066 0ustar sharkyjerrywebPNG  IHDR] pHYs   cHRMms8zʴ3Dv6*IDATxڤԿAo kVi|YIR߼C+Lg,R\B$`4)BPA!UI( 檧Ïsu:‰B$|~Z,?J^ZR.F!`08 eY$I
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/all_75.html0000644000175000007640000000170412116723632017545 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/all_6a.html0000644000175000007640000000170412116723632017620 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/enumvalues_64.html0000644000175000007640000000171312116723632021157 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/properties_6c.js0000644000175000007640000000110112116723632020705 0ustar sharkyjerrywebvar searchData= [ ['localfileurl',['localFileUrl',['../classQXmppTransferJob.html#aba043a492dc36a027323afd921c1fa29',1,'QXmppTransferJob']]], ['logfilepath',['logFilePath',['../classQXmppLogger.html#a1be30b0f1390d14cb6d8535d4898a703',1,'QXmppLogger']]], ['logger',['logger',['../classQXmppClient.html#ae5fca0867efe7e7fcae90cbbf10b8193',1,'QXmppClient::logger()'],['../classQXmppServer.html#a0fa9d97d5be1f6429b35154c7621bd24',1,'QXmppServer::logger()']]], ['loggingtype',['loggingType',['../classQXmppLogger.html#a896f3347ee0c517db3404e07c6853187',1,'QXmppLogger']]] ]; qxmpp-0.7.6/doc/html/search/all_67.html0000644000175000007640000000170412116723632017546 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/all_71.js0000644000175000007640000003363712116723632017223 0ustar sharkyjerrywebvar searchData= [ ['queryjid',['queryJid',['../classQXmppPubSubIq.html#a3610eb6fa79167df0a58a804b4cbd088',1,'QXmppPubSubIq']]], ['querynode',['queryNode',['../classQXmppPubSubIq.html#a072d2c6e7c3f6d44c9c14bb80c571b85',1,'QXmppPubSubIq']]], ['querytype',['QueryType',['../classQXmppPubSubIq.html#aeadecfdbdb64593cc7a27cbe9def8359',1,'QXmppPubSubIq::QueryType()'],['../classQXmppPubSubIq.html#ab9281b3fa57189d068976f8d0c2c9901',1,'QXmppPubSubIq::queryType() const ']]], ['queuedata',['queueData',['../classQXmppOutgoingServer.html#aeaab8b4ce42db69ab9cea8ace67a1265',1,'QXmppOutgoingServer']]], ['qxmpparchivechat',['QXmppArchiveChat',['../classQXmppArchiveChat.html',1,'']]], ['qxmpparchivechatiq',['QXmppArchiveChatIq',['../classQXmppArchiveChatIq.html',1,'']]], ['qxmpparchivelistiq',['QXmppArchiveListIq',['../classQXmppArchiveListIq.html',1,'QXmppArchiveListIq'],['../classQXmppArchiveListIq.html#aa940621c68b3d637099e40916bdf5a37',1,'QXmppArchiveListIq::QXmppArchiveListIq()']]], ['qxmpparchivemanager',['QXmppArchiveManager',['../classQXmppArchiveManager.html',1,'']]], ['qxmpparchivemessage',['QXmppArchiveMessage',['../classQXmppArchiveMessage.html',1,'']]], ['qxmpparchiveprefiq',['QXmppArchivePrefIq',['../classQXmppArchivePrefIq.html',1,'']]], ['qxmpparchiveremoveiq',['QXmppArchiveRemoveIq',['../classQXmppArchiveRemoveIq.html',1,'']]], ['qxmpparchiveretrieveiq',['QXmppArchiveRetrieveIq',['../classQXmppArchiveRetrieveIq.html',1,'']]], ['qxmppbindiq',['QXmppBindIq',['../classQXmppBindIq.html',1,'']]], ['qxmppbookmarkconference',['QXmppBookmarkConference',['../classQXmppBookmarkConference.html',1,'QXmppBookmarkConference'],['../classQXmppBookmarkConference.html#a01e949da407d33e9d53b92b7ebe81c68',1,'QXmppBookmarkConference::QXmppBookmarkConference()']]], ['qxmppbookmarkmanager',['QXmppBookmarkManager',['../classQXmppBookmarkManager.html',1,'QXmppBookmarkManager'],['../classQXmppBookmarkManager.html#af8d7ef4d015752c8b33ac81fd030f165',1,'QXmppBookmarkManager::QXmppBookmarkManager()']]], ['qxmppbookmarkset',['QXmppBookmarkSet',['../classQXmppBookmarkSet.html',1,'']]], ['qxmppbookmarkurl',['QXmppBookmarkUrl',['../classQXmppBookmarkUrl.html',1,'']]], ['qxmppcall',['QXmppCall',['../classQXmppCall.html',1,'']]], ['qxmppcallmanager',['QXmppCallManager',['../classQXmppCallManager.html',1,'QXmppCallManager'],['../classQXmppCallManager.html#a560d15be90eda576c32fc7765c4495e4',1,'QXmppCallManager::QXmppCallManager()']]], ['qxmppclient',['QXmppClient',['../classQXmppClient.html',1,'QXmppClient'],['../classQXmppClient.html#a6ba469fd893d18ae14a709c5d040b623',1,'QXmppClient::QXmppClient()']]], ['qxmppclientextension',['QXmppClientExtension',['../classQXmppClientExtension.html',1,'QXmppClientExtension'],['../classQXmppClientExtension.html#aec299452688f50431f1028668186e3ec',1,'QXmppClientExtension::QXmppClientExtension()']]], ['qxmppconfiguration',['QXmppConfiguration',['../classQXmppConfiguration.html',1,'QXmppConfiguration'],['../classQXmppConfiguration.html#acd68380ad2353139a8c29087c40e4dcc',1,'QXmppConfiguration::QXmppConfiguration()'],['../classQXmppConfiguration.html#ac91c247c5ee60472abb5393f9e32d0f2',1,'QXmppConfiguration::QXmppConfiguration(const QXmppConfiguration &other)']]], ['qxmppdataform',['QXmppDataForm',['../classQXmppDataForm.html',1,'QXmppDataForm'],['../classQXmppDataForm.html#a058f203f616dbffbd32043f509a9ff65',1,'QXmppDataForm::QXmppDataForm(QXmppDataForm::Type type=QXmppDataForm::None)'],['../classQXmppDataForm.html#a976fd7811d7f937fd2f9a7d313eb7ca8',1,'QXmppDataForm::QXmppDataForm(const QXmppDataForm &other)']]], ['qxmppdialback',['QXmppDialback',['../classQXmppDialback.html',1,'QXmppDialback'],['../classQXmppDialback.html#a1aa371e5859efa4eb5a5a733f609db3e',1,'QXmppDialback::QXmppDialback()']]], ['qxmppdiscoverymanager',['QXmppDiscoveryManager',['../classQXmppDiscoveryManager.html',1,'']]], ['qxmppentitytimemanager',['QXmppEntityTimeManager',['../classQXmppEntityTimeManager.html',1,'']]], ['qxmppextendedaddress',['QXmppExtendedAddress',['../classQXmppExtendedAddress.html',1,'QXmppExtendedAddress'],['../classQXmppExtendedAddress.html#a977ce245d062f5cb8398b02ecff76163',1,'QXmppExtendedAddress::QXmppExtendedAddress()'],['../classQXmppExtendedAddress.html#a2a88bb47091f713d6b8176ab2ee1101f',1,'QXmppExtendedAddress::QXmppExtendedAddress(const QXmppExtendedAddress &)']]], ['qxmppicecomponent',['QXmppIceComponent',['../classQXmppIceComponent.html',1,'QXmppIceComponent'],['../classQXmppIceComponent.html#ac42db14e22921cac54b2e7e2e9624c3d',1,'QXmppIceComponent::QXmppIceComponent()']]], ['qxmppiceconnection',['QXmppIceConnection',['../classQXmppIceConnection.html',1,'QXmppIceConnection'],['../classQXmppIceConnection.html#a7d406bc9a1991257db34c493bc5780a7',1,'QXmppIceConnection::QXmppIceConnection()']]], ['qxmppincomingclient',['QXmppIncomingClient',['../classQXmppIncomingClient.html',1,'QXmppIncomingClient'],['../classQXmppIncomingClient.html#a4544a58d3047af1fb4b997055fae9447',1,'QXmppIncomingClient::QXmppIncomingClient()']]], ['qxmppincomingserver',['QXmppIncomingServer',['../classQXmppIncomingServer.html',1,'QXmppIncomingServer'],['../classQXmppIncomingServer.html#a35f13c6597f2c46fe220e7f9f612832c',1,'QXmppIncomingServer::QXmppIncomingServer()']]], ['qxmppinvokable',['QXmppInvokable',['../classQXmppInvokable.html',1,'QXmppInvokable'],['../classQXmppInvokable.html#ae3f2b1d6d85b4ec6c7565554491ce6e3',1,'QXmppInvokable::QXmppInvokable()']]], ['qxmppiq',['QXmppIq',['../classQXmppIq.html',1,'QXmppIq'],['../classQXmppIq.html#a16db985e7cbf842dbca1cb94ec57c64f',1,'QXmppIq::QXmppIq(QXmppIq::Type type=QXmppIq::Get)'],['../classQXmppIq.html#a64c242ce6d42d7013d53120c58be5da2',1,'QXmppIq::QXmppIq(const QXmppIq &other)']]], ['qxmppjinglecandidate',['QXmppJingleCandidate',['../classQXmppJingleCandidate.html',1,'']]], ['qxmppjingleiq',['QXmppJingleIq',['../classQXmppJingleIq.html',1,'QXmppJingleIq'],['../classQXmppJingleIq.html#aeb7657fe2e9f6d5a9da2beef434625ff',1,'QXmppJingleIq::QXmppJingleIq()']]], ['qxmppjinglepayloadtype',['QXmppJinglePayloadType',['../classQXmppJinglePayloadType.html',1,'']]], ['qxmpploggable',['QXmppLoggable',['../classQXmppLoggable.html',1,'QXmppLoggable'],['../classQXmppLoggable.html#a05ad3142486bec62b2d58ad49b1d4005',1,'QXmppLoggable::QXmppLoggable()']]], ['qxmpplogger',['QXmppLogger',['../classQXmppLogger.html',1,'QXmppLogger'],['../classQXmppLogger.html#a103f204a149f91d7e2c4faf7d02d2266',1,'QXmppLogger::QXmppLogger()']]], ['qxmppmessage',['QXmppMessage',['../classQXmppMessage.html',1,'QXmppMessage'],['../classQXmppMessage.html#aa51870c00e3ffadc8555e00e0153c136',1,'QXmppMessage::QXmppMessage(const QString &from="", const QString &to="", const QString &body="", const QString &thread="")'],['../classQXmppMessage.html#af73b605ad48ee6ecc111975f774c6edd',1,'QXmppMessage::QXmppMessage(const QXmppMessage &other)']]], ['qxmppmessagereceiptmanager',['QXmppMessageReceiptManager',['../classQXmppMessageReceiptManager.html',1,'QXmppMessageReceiptManager'],['../classQXmppMessageReceiptManager.html#abd24b74a2784930429f1e9df1d7704fa',1,'QXmppMessageReceiptManager::QXmppMessageReceiptManager()']]], ['qxmppmucadminiq',['QXmppMucAdminIq',['../classQXmppMucAdminIq.html',1,'']]], ['qxmppmucitem',['QXmppMucItem',['../classQXmppMucItem.html',1,'']]], ['qxmppmucmanager',['QXmppMucManager',['../classQXmppMucManager.html',1,'QXmppMucManager'],['../classQXmppMucManager.html#a0eb8a3dbacfa9983e2ac72cd6a7629a3',1,'QXmppMucManager::QXmppMucManager()']]], ['qxmppmucowneriq',['QXmppMucOwnerIq',['../classQXmppMucOwnerIq.html',1,'']]], ['qxmppmucroom',['QXmppMucRoom',['../classQXmppMucRoom.html',1,'']]], ['qxmppoutgoingclient',['QXmppOutgoingClient',['../classQXmppOutgoingClient.html',1,'QXmppOutgoingClient'],['../classQXmppOutgoingClient.html#a6713a94557a69df0051039b6f9a9cf3c',1,'QXmppOutgoingClient::QXmppOutgoingClient()']]], ['qxmppoutgoingserver',['QXmppOutgoingServer',['../classQXmppOutgoingServer.html',1,'QXmppOutgoingServer'],['../classQXmppOutgoingServer.html#a10e2b65e7bc9957db290b0a6de931bed',1,'QXmppOutgoingServer::QXmppOutgoingServer()']]], ['qxmpppasswordchecker',['QXmppPasswordChecker',['../classQXmppPasswordChecker.html',1,'']]], ['qxmpppasswordreply',['QXmppPasswordReply',['../classQXmppPasswordReply.html',1,'QXmppPasswordReply'],['../classQXmppPasswordReply.html#aee5c16b4954a41b183086f108df26971',1,'QXmppPasswordReply::QXmppPasswordReply()']]], ['qxmpppasswordrequest',['QXmppPasswordRequest',['../classQXmppPasswordRequest.html',1,'']]], ['qxmpppresence',['QXmppPresence',['../classQXmppPresence.html',1,'QXmppPresence'],['../classQXmppPresence.html#ab3facb1c108a346c1866f11133592601',1,'QXmppPresence::QXmppPresence(QXmppPresence::Type type=QXmppPresence::Available)'],['../classQXmppPresence.html#a74ef4824a0c7c70c095c9e783a3b55b4',1,'QXmppPresence::QXmppPresence(const QXmppPresence &other)']]], ['qxmpppubsubiq',['QXmppPubSubIq',['../classQXmppPubSubIq.html',1,'']]], ['qxmpppubsubitem',['QXmppPubSubItem',['../classQXmppPubSubItem.html',1,'']]], ['qxmppregisteriq',['QXmppRegisterIq',['../classQXmppRegisterIq.html',1,'']]], ['qxmppresultsetquery',['QXmppResultSetQuery',['../classQXmppResultSetQuery.html',1,'']]], ['qxmppresultsetreply',['QXmppResultSetReply',['../classQXmppResultSetReply.html',1,'']]], ['qxmpprosteriq',['QXmppRosterIq',['../classQXmppRosterIq.html',1,'']]], ['qxmpprostermanager',['QXmppRosterManager',['../classQXmppRosterManager.html',1,'QXmppRosterManager'],['../classQXmppRosterManager.html#aa96bd124e15813b402bc1de93f9e4f7b',1,'QXmppRosterManager::QXmppRosterManager()']]], ['qxmpprpcinvokeiq',['QXmppRpcInvokeIq',['../classQXmppRpcInvokeIq.html',1,'']]], ['qxmpprpcmanager',['QXmppRpcManager',['../classQXmppRpcManager.html',1,'QXmppRpcManager'],['../classQXmppRpcManager.html#a8fece0110e91b17f2868575303d7c90f',1,'QXmppRpcManager::QXmppRpcManager()']]], ['qxmpprpcresponseiq',['QXmppRpcResponseIq',['../classQXmppRpcResponseIq.html',1,'']]], ['qxmpprtpaudiochannel',['QXmppRtpAudioChannel',['../classQXmppRtpAudioChannel.html',1,'QXmppRtpAudioChannel'],['../classQXmppRtpAudioChannel.html#af8d0d31bd72cb5455de7dcfbe27bcf01',1,'QXmppRtpAudioChannel::QXmppRtpAudioChannel()']]], ['qxmpprtppacket',['QXmppRtpPacket',['../classQXmppRtpPacket.html',1,'']]], ['qxmpprtpvideochannel',['QXmppRtpVideoChannel',['../classQXmppRtpVideoChannel.html',1,'QXmppRtpVideoChannel'],['../classQXmppRtpVideoChannel.html#acd71a25b1c88bb225f7c88c5f6951f63',1,'QXmppRtpVideoChannel::QXmppRtpVideoChannel()']]], ['qxmppserver',['QXmppServer',['../classQXmppServer.html',1,'QXmppServer'],['../classQXmppServer.html#a1e63b89e62f124544a1052ca6eff2af5',1,'QXmppServer::QXmppServer()']]], ['qxmppserverextension',['QXmppServerExtension',['../classQXmppServerExtension.html',1,'']]], ['qxmppserverplugin',['QXmppServerPlugin',['../classQXmppServerPlugin.html',1,'']]], ['qxmppsessioniq',['QXmppSessionIq',['../classQXmppSessionIq.html',1,'']]], ['qxmppsslserver',['QXmppSslServer',['../classQXmppSslServer.html',1,'QXmppSslServer'],['../classQXmppSslServer.html#af0ef7762cca74cc5f833f0891348e08d',1,'QXmppSslServer::QXmppSslServer()']]], ['qxmppstanza',['QXmppStanza',['../classQXmppStanza.html',1,'QXmppStanza'],['../classQXmppStanza.html#aeda5073d2af6c52e78f127bca4306ace',1,'QXmppStanza::QXmppStanza(const QString &from=QString(), const QString &to=QString())'],['../classQXmppStanza.html#af8e4636d056c754347635ba26cd8d60c',1,'QXmppStanza::QXmppStanza(const QXmppStanza &other)']]], ['qxmppstream',['QXmppStream',['../classQXmppStream.html',1,'QXmppStream'],['../classQXmppStream.html#a70a8f8a0734c3a681fb0079890d99786',1,'QXmppStream::QXmppStream()']]], ['qxmpptransferjob',['QXmppTransferJob',['../classQXmppTransferJob.html',1,'']]], ['qxmpptransfermanager',['QXmppTransferManager',['../classQXmppTransferManager.html',1,'QXmppTransferManager'],['../classQXmppTransferManager.html#aa88b03ffc2b9039a50bae7e79e759ed7',1,'QXmppTransferManager::QXmppTransferManager()']]], ['qxmpputils',['QXmppUtils',['../classQXmppUtils.html',1,'']]], ['qxmppvcardaddress',['QXmppVCardAddress',['../classQXmppVCardAddress.html',1,'QXmppVCardAddress'],['../classQXmppVCardAddress.html#ab31c2eab8fb090d6716515cfe0fad36b',1,'QXmppVCardAddress::QXmppVCardAddress()'],['../classQXmppVCardAddress.html#a2093d0ed8737c0f04ffa543c3943f0a9',1,'QXmppVCardAddress::QXmppVCardAddress(const QXmppVCardAddress &other)']]], ['qxmppvcardemail',['QXmppVCardEmail',['../classQXmppVCardEmail.html',1,'QXmppVCardEmail'],['../classQXmppVCardEmail.html#ac2d3a7f08975a9d6a395c8ed60d1a4ef',1,'QXmppVCardEmail::QXmppVCardEmail()'],['../classQXmppVCardEmail.html#a769b18f711a4bca0a6de8f7707e89a0b',1,'QXmppVCardEmail::QXmppVCardEmail(const QXmppVCardEmail &other)']]], ['qxmppvcardiq',['QXmppVCardIq',['../classQXmppVCardIq.html',1,'QXmppVCardIq'],['../classQXmppVCardIq.html#a93c39e3c608a259c505ba0ecd841e0db',1,'QXmppVCardIq::QXmppVCardIq(const QString &bareJid="")'],['../classQXmppVCardIq.html#a7e09646833b005171d2f3564cb446e91',1,'QXmppVCardIq::QXmppVCardIq(const QXmppVCardIq &other)']]], ['qxmppvcardmanager',['QXmppVCardManager',['../classQXmppVCardManager.html',1,'']]], ['qxmppvcardphone',['QXmppVCardPhone',['../classQXmppVCardPhone.html',1,'QXmppVCardPhone'],['../classQXmppVCardPhone.html#ab8227e376f5aba012a8e05d6f09c7c6a',1,'QXmppVCardPhone::QXmppVCardPhone()'],['../classQXmppVCardPhone.html#acd06e5045a4f27ce29a0bf34b6d4653c',1,'QXmppVCardPhone::QXmppVCardPhone(const QXmppVCardPhone &other)']]], ['qxmppversioniq',['QXmppVersionIq',['../classQXmppVersionIq.html',1,'']]], ['qxmppversionmanager',['QXmppVersionManager',['../classQXmppVersionManager.html',1,'']]], ['qxmppvideoframe',['QXmppVideoFrame',['../classQXmppVideoFrame.html',1,'QXmppVideoFrame'],['../classQXmppVideoFrame.html#ae33d6c7b73381921c6f6b70fa2b16cf9',1,'QXmppVideoFrame::QXmppVideoFrame()'],['../classQXmppVideoFrame.html#aa8af160798b29f2164e93b2f84b3de8e',1,'QXmppVideoFrame::QXmppVideoFrame(int bytes, const QSize &size, int bytesPerLine, PixelFormat format)']]] ]; qxmpp-0.7.6/doc/html/search/all_6b.html0000644000175000007640000000170412116723632017621 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/enums_6c.html0000644000175000007640000000170612116723632020203 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/enumvalues_70.html0000644000175000007640000000171312116723632021154 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/enumvalues_77.html0000644000175000007640000000171312116723632021163 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/all_70.html0000644000175000007640000000170412116723632017540 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/all_6f.html0000644000175000007640000000170412116723632017625 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/enums_64.js0000644000175000007640000000036112116723632017570 0ustar sharkyjerrywebvar searchData= [ ['direction',['Direction',['../classQXmppCall.html#a429a4f8065136068b6d936cb2c803175',1,'QXmppCall::Direction()'],['../classQXmppTransferJob.html#a9c95a89a01357588f699e7d80c3de0b6',1,'QXmppTransferJob::Direction()']]] ]; qxmpp-0.7.6/doc/html/search/functions_70.html0000644000175000007640000000171212116723632020777 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/functions_70.js0000644000175000007640000000774612116723632020464 0ustar sharkyjerrywebvar searchData= [ ['parameters',['parameters',['../classQXmppJinglePayloadType.html#aab01af2f379b0b1b96fea2c8dcbdd2ce',1,'QXmppJinglePayloadType']]], ['paramtypes',['paramTypes',['../classQXmppInvokable.html#af45f378146e76bd487c7bc22c173d5b4',1,'QXmppInvokable']]], ['participantadded',['participantAdded',['../classQXmppMucRoom.html#a524f76903e60e14a3163301a3cd6d792',1,'QXmppMucRoom']]], ['participantchanged',['participantChanged',['../classQXmppMucRoom.html#a12bc2e165a6bd721ecf79a3fe9480176',1,'QXmppMucRoom']]], ['participantfulljid',['participantFullJid',['../classQXmppMucRoom.html#a93fb5f2febc9cfb57b445d1d3b57d1d3',1,'QXmppMucRoom']]], ['participantpresence',['participantPresence',['../classQXmppMucRoom.html#af97a30f3f832a294cadd7b8644a1f441',1,'QXmppMucRoom']]], ['participantremoved',['participantRemoved',['../classQXmppMucRoom.html#a161afb360c1cd19819bfeb0579b9c940',1,'QXmppMucRoom']]], ['password',['password',['../classQXmppRegisterIq.html#a872b0576ecc47c3a3348f14790f13792',1,'QXmppRegisterIq::password()'],['../classQXmppConfiguration.html#ab03c0b84b6b866b10b562d0aded91140',1,'QXmppConfiguration::password()'],['../classQXmppPasswordRequest.html#abf2cc449121ce4ff2aafbe62cfe58401',1,'QXmppPasswordRequest::password()'],['../classQXmppPasswordReply.html#a9c219de5968b48f50722cee227bd9a9e',1,'QXmppPasswordReply::password()']]], ['passwordchecker',['passwordChecker',['../classQXmppServer.html#af4cc5e7fe77e1593e391bb5679a7c8f5',1,'QXmppServer']]], ['payloadtype',['payloadType',['../classQXmppRtpAudioChannel.html#a9b902a64c3cae0cfed07fece17c737e8',1,'QXmppRtpAudioChannel']]], ['permissionsreceived',['permissionsReceived',['../classQXmppMucRoom.html#abc6d62be447548fe9f60a9a478d35028',1,'QXmppMucRoom']]], ['phones',['phones',['../classQXmppVCardIq.html#ab9e923c99ee711143e06c12c250d677a',1,'QXmppVCardIq']]], ['photo',['photo',['../classQXmppVCardIq.html#a2046fd196e2b337ac2d292ca0e7635be',1,'QXmppVCardIq']]], ['photohash',['photoHash',['../classQXmppPresence.html#a2013bdab8a80ef7ed1c765d00f81ef86',1,'QXmppPresence']]], ['phototype',['photoType',['../classQXmppVCardIq.html#abc90cf1d0ea643f4c993ca7614420b9e',1,'QXmppVCardIq']]], ['pixelformat',['pixelFormat',['../classQXmppVideoFrame.html#a55c875a1341fac1b907879fa24486674',1,'QXmppVideoFrame']]], ['port',['port',['../classQXmppJingleCandidate.html#a4c7d8743389a252f7c81265df38bf7bd',1,'QXmppJingleCandidate::port()'],['../classQXmppConfiguration.html#aeca9614e66fb88a6967ebe6381e25fb7',1,'QXmppConfiguration::port()']]], ['pos',['pos',['../classQXmppRtpAudioChannel.html#adae378ae5cea29ee0f9054566723103d',1,'QXmppRtpAudioChannel']]], ['postcode',['postcode',['../classQXmppVCardAddress.html#a8bc8dc20efe2bb52a697065712dd190c',1,'QXmppVCardAddress']]], ['presencechanged',['presenceChanged',['../classQXmppRosterManager.html#ac95dd87aaa2c4cb61aa6ead2a17bc56e',1,'QXmppRosterManager']]], ['presencereceived',['presenceReceived',['../classQXmppClient.html#a10499b67cd25eed16f83118837fc5c29',1,'QXmppClient::presenceReceived()'],['../classQXmppOutgoingClient.html#a242817c83ce02d6f3c1956bfd15c3b15',1,'QXmppOutgoingClient::presenceReceived()']]], ['presencesubscribers',['presenceSubscribers',['../classQXmppServerExtension.html#a942c0a8411cabb7b4e13760e01e1ab70',1,'QXmppServerExtension']]], ['presencesubscriptions',['presenceSubscriptions',['../classQXmppServerExtension.html#a7340a5b3458e991b47dbd413ccaf13c4',1,'QXmppServerExtension']]], ['priority',['priority',['../classQXmppJingleCandidate.html#abb44c0e24dafc2a13eca85786b573d9f',1,'QXmppJingleCandidate::priority()'],['../classQXmppPresence.html#a0411a54e3f20e42b7511efa4f02e36bb',1,'QXmppPresence::priority()']]], ['progress',['progress',['../classQXmppTransferJob.html#a571b9a67cf4ad6d573c58a3039bb0433',1,'QXmppTransferJob']]], ['protocol',['protocol',['../classQXmppJingleCandidate.html#a6b23d5174e9b0d5a4fcbe701e46dd5d0',1,'QXmppJingleCandidate']]], ['ptime',['ptime',['../classQXmppJinglePayloadType.html#a563e28e2153570ea936e1bf9c13cbbd7',1,'QXmppJinglePayloadType']]] ]; qxmpp-0.7.6/doc/html/search/all_72.html0000644000175000007640000000170412116723632017542 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/all_66.html0000644000175000007640000000170412116723632017545 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/enumvalues_68.html0000644000175000007640000000171312116723632021163 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/groups_63.html0000644000175000007640000000170712116723632020314 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/enums_63.html0000644000175000007640000000170612116723632020123 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/all_6e.html0000644000175000007640000000170412116723632017624 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/enumvalues_68.js0000644000175000007640000000026312116723632020632 0ustar sharkyjerrywebvar searchData= [ ['hosttype',['HostType',['../classQXmppJingleCandidate.html#a6314b3ed7de59b68131db6ffab55fe7da65d68dede680215e9739c30ca79a1da5',1,'QXmppJingleCandidate']]] ]; qxmpp-0.7.6/doc/html/search/enums_70.js0000644000175000007640000000021612116723632017564 0ustar sharkyjerrywebvar searchData= [ ['pixelformat',['PixelFormat',['../classQXmppVideoFrame.html#a55cceb24be43a12d0d410a2a6b51c1fe',1,'QXmppVideoFrame']]] ]; qxmpp-0.7.6/doc/html/search/functions_6a.html0000644000175000007640000000171212116723632021057 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/variables_73.html0000644000175000007640000000171212116723632020742 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/variables_63.js0000644000175000007640000000017612116723632020414 0ustar sharkyjerrywebvar searchData= [ ['csrc',['csrc',['../classQXmppRtpPacket.html#a10fb838efa95f0d2e42ca04a3d06ca1f',1,'QXmppRtpPacket']]] ]; qxmpp-0.7.6/doc/html/search/functions_6b.js0000644000175000007640000000150112116723632020524 0ustar sharkyjerrywebvar searchData= [ ['keepaliveinterval',['keepAliveInterval',['../classQXmppConfiguration.html#a0ba375a5272d8c43f44ac5347ea8570a',1,'QXmppConfiguration']]], ['keepalivetimeout',['keepAliveTimeout',['../classQXmppConfiguration.html#a486b7e0f462d22645ce3a9af2f1bc760',1,'QXmppConfiguration']]], ['key',['key',['../classQXmppDataForm_1_1Field.html#a7ba080a682a735ba8ea50e10796eddae',1,'QXmppDataForm::Field::key()'],['../classQXmppDialback.html#a97b7f7b3093ae77b1a0d478e69d2d587',1,'QXmppDialback::key()']]], ['keys',['keys',['../classQXmppServerPlugin.html#a4704f26de715e8917dce478482e49826',1,'QXmppServerPlugin']]], ['kick',['kick',['../classQXmppMucRoom.html#a434a767f9fdd176ea2f2c5effd40695f',1,'QXmppMucRoom']]], ['kicked',['kicked',['../classQXmppMucRoom.html#afc2ca70209ab1ab43f75c86221f34cdc',1,'QXmppMucRoom']]] ]; qxmpp-0.7.6/doc/html/search/properties_6a.js0000644000175000007640000000046112116723632020713 0ustar sharkyjerrywebvar searchData= [ ['jid',['jid',['../classQXmppCall.html#a0b1c61fc1700b113d55b509327560104',1,'QXmppCall::jid()'],['../classQXmppMucRoom.html#a4cc3a0dc9c4fe45740d6d37320857f7c',1,'QXmppMucRoom::jid()'],['../classQXmppTransferJob.html#a9fd29edd1c42dc18699a1769ada6e05b',1,'QXmppTransferJob::jid()']]] ]; qxmpp-0.7.6/doc/html/search/functions_71.html0000644000175000007640000000171212116723632021000 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/all_6c.html0000644000175000007640000000170412116723632017622 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/enumvalues_63.js0000644000175000007640000000204612116723632020626 0ustar sharkyjerrywebvar searchData= [ ['cancel',['Cancel',['../classQXmppDataForm.html#adab12c436b8c450e2b4f59da1aecadeead77068b14f4fc528cbf07a055db6eeda',1,'QXmppDataForm']]], ['chat',['Chat',['../classQXmppPresence.html#ad56af0f57b732c09b080b9347c4dba94a284dd672032786aab31be99dd495a65d',1,'QXmppPresence']]], ['composing',['Composing',['../classQXmppMessage.html#aeaa3cc5ccb7d451067a80dd1f3c7099aa7804ac6c0c6848221acb67b9de0371d3',1,'QXmppMessage']]], ['configurationaction',['ConfigurationAction',['../classQXmppMucRoom.html#acd3129293f69d7e7cdd91b65aae0606fa4c1b38531dcf4fa97e1441e8334c9d13',1,'QXmppMucRoom']]], ['connectedstate',['ConnectedState',['../classQXmppClient.html#a5f4e70d508c08967f72fd41c5343ad2eae603afad2343f7682b39b90d3d845cf7',1,'QXmppClient']]], ['connectingstate',['ConnectingState',['../classQXmppCall.html#a90205b5034613127d2c4adc6a0252759ad7e30b8eff38aab65d8fedb68d9436fd',1,'QXmppCall::ConnectingState()'],['../classQXmppClient.html#a5f4e70d508c08967f72fd41c5343ad2eac25719267a60fc7b0ef8ecc35fa439f7',1,'QXmppClient::ConnectingState()']]] ]; qxmpp-0.7.6/doc/html/search/functions_6f.html0000644000175000007640000000171212116723632021064 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/all_67.js0000644000175000007640000000444612116723632017224 0ustar sharkyjerrywebvar searchData= [ ['generatecrc32',['generateCrc32',['../classQXmppUtils.html#ac10b0186b909d902c6670dd4aabfa772',1,'QXmppUtils']]], ['generatehmacmd5',['generateHmacMd5',['../classQXmppUtils.html#ac82b6aaa4ef413056a058dbb7d8f8069',1,'QXmppUtils']]], ['generatehmacsha1',['generateHmacSha1',['../classQXmppUtils.html#adf3869da41378c5b38d4a643cc9ee8dc',1,'QXmppUtils']]], ['generaterandombytes',['generateRandomBytes',['../classQXmppUtils.html#a58de137a41dd65c11fcf74b74c090e83',1,'QXmppUtils']]], ['generaterandominteger',['generateRandomInteger',['../classQXmppUtils.html#a7478f541be43e0bd72e088f3d4099973',1,'QXmppUtils']]], ['generatestanzahash',['generateStanzaHash',['../classQXmppUtils.html#ad86c501d2f5beaca4f77c94c1eb7245f',1,'QXmppUtils']]], ['get',['Get',['../classQXmppIq.html#a6bc7a0505a3be7309051ae2432a3d826a78ce31809da9bddb4ab04ad512293eb1',1,'QXmppIq']]], ['getallpresencesforbarejid',['getAllPresencesForBareJid',['../classQXmppRosterManager.html#a7c8e79674248ee29c1ffe6693999c547',1,'QXmppRosterManager']]], ['getdigest',['getDigest',['../classQXmppPasswordChecker.html#ac0e9395aa90f506b05658d3a8cfe0790',1,'QXmppPasswordChecker']]], ['getlogger',['getLogger',['../classQXmppLogger.html#ac261f30eeb3caaec02e9a97f9529ac49',1,'QXmppLogger']]], ['getpassword',['getPassword',['../classQXmppPasswordChecker.html#a3ff9ec7d336a6702435badbfdd3c19b2',1,'QXmppPasswordChecker']]], ['getpresence',['getPresence',['../classQXmppRosterManager.html#a107478c6ce7bd34dc07348f3acea6d91',1,'QXmppRosterManager']]], ['getresources',['getResources',['../classQXmppRosterManager.html#abdb8e62b81edc1ec05257ecc78e3a35f',1,'QXmppRosterManager']]], ['getrosterbarejids',['getRosterBareJids',['../classQXmppRosterManager.html#ae47698bf12ecb996462a0c9073544043',1,'QXmppRosterManager']]], ['getrosterentry',['getRosterEntry',['../classQXmppRosterManager.html#a012371e276be651027c0c54dabfbaa28',1,'QXmppRosterManager']]], ['gone',['Gone',['../classQXmppMessage.html#aeaa3cc5ccb7d451067a80dd1f3c7099aa82f224b6d9a97c9d40ecc8df80b22f61',1,'QXmppMessage']]], ['googleaccesstoken',['googleAccessToken',['../classQXmppConfiguration.html#ac8c67e78068826ca7799f945a9fb4e43',1,'QXmppConfiguration']]], ['groups',['groups',['../classQXmppRosterIq_1_1Item.html#a39b5e6772839a5749337c521bc8672fc',1,'QXmppRosterIq::Item']]] ]; qxmpp-0.7.6/doc/html/search/enumvalues_6f.html0000644000175000007640000000171312116723632021241 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/properties_6a.html0000644000175000007640000000171312116723632021244 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/functions_61.js0000644000175000007640000001030412116723632020444 0ustar sharkyjerrywebvar searchData= [ ['abort',['abort',['../classQXmppTransferJob.html#a22d997eaa5f3f906ef4d9e311a0e3939',1,'QXmppTransferJob']]], ['accept',['accept',['../classQXmppCall.html#a0627637efc9efd57aada1ce783b94457',1,'QXmppCall::accept()'],['../classQXmppTransferJob.html#ae8a1b5cb89a012eb1f8e85b5079379c0',1,'QXmppTransferJob::accept(const QString &filePath)'],['../classQXmppTransferJob.html#aeb89d694c0f604dd7c955ceeb5e4347d',1,'QXmppTransferJob::accept(QIODevice *output)']]], ['acceptsubscription',['acceptSubscription',['../classQXmppRosterManager.html#a0b8e48ba14b36a5ce3a04d8b3fe456ab',1,'QXmppRosterManager']]], ['action',['action',['../classQXmppJingleIq.html#aadd9b1aaba5d5e6edba0c539bf22bfb4',1,'QXmppJingleIq']]], ['actor',['actor',['../classQXmppMucItem.html#a01aafb9cb7c7c37613c11cb518196ead',1,'QXmppMucItem']]], ['addcacertificates',['addCaCertificates',['../classQXmppServer.html#a96ac43ec46b09d23d60e5b874645d253',1,'QXmppServer::addCaCertificates()'],['../classQXmppSslServer.html#a16de688275b4967ce4aa688f5f8e5f75',1,'QXmppSslServer::addCaCertificates()']]], ['addcomponent',['addComponent',['../classQXmppIceConnection.html#ac98283e6c42dd6318575c2880fd2edd8',1,'QXmppIceConnection']]], ['addextension',['addExtension',['../classQXmppClient.html#a61ccf1c37ca3f26bfd14e65c8ecf1740',1,'QXmppClient::addExtension()'],['../classQXmppServer.html#af8faf560a73c3fbe4fad705753c09d40',1,'QXmppServer::addExtension()']]], ['addincomingclient',['addIncomingClient',['../classQXmppServer.html#adc4c461cb514b5c5aba2d5d320f1d09d',1,'QXmppServer']]], ['addinvokableinterface',['addInvokableInterface',['../classQXmppRpcManager.html#a015ec2d968d2b4460325531157e8b0bf',1,'QXmppRpcManager']]], ['additem',['addItem',['../classQXmppRosterIq.html#ab7c8d7ec0b185f48e175afb00b8f72d5',1,'QXmppRosterIq::addItem()'],['../classQXmppRosterManager.html#a7039e2a5c0bf0504606356872cd7b47a',1,'QXmppRosterManager::addItem()']]], ['addremotecandidate',['addRemoteCandidate',['../classQXmppIceComponent.html#a63e4d233754452c3e81302b358a13026',1,'QXmppIceComponent::addRemoteCandidate()'],['../classQXmppIceConnection.html#a0a7f8f4176deddf2e2022f4634fbc08a',1,'QXmppIceConnection::addRemoteCandidate()']]], ['address',['address',['../classQXmppVCardEmail.html#af8cddfc269875613436846dcf05937c1',1,'QXmppVCardEmail']]], ['addresses',['addresses',['../classQXmppVCardIq.html#aa0bf01a9040b18e0043dfa8547b36f16',1,'QXmppVCardIq']]], ['addroom',['addRoom',['../classQXmppMucManager.html#a931a67884858d4440b9c307bae50d8a8',1,'QXmppMucManager']]], ['affiliation',['affiliation',['../classQXmppMucItem.html#a2c485ce387bac064704c7ed3e2cccd14',1,'QXmppMucItem']]], ['after',['after',['../classQXmppResultSetQuery.html#aa45ce7f461dc7d38885f381211efe395',1,'QXmppResultSetQuery']]], ['allowedactionschanged',['allowedActionsChanged',['../classQXmppMucRoom.html#ad48ffe7c58476c2f9f77f73f51002d78',1,'QXmppMucRoom']]], ['archivechatreceived',['archiveChatReceived',['../classQXmppArchiveManager.html#a703aa568d0ec6a7ce604004247fd97ec',1,'QXmppArchiveManager']]], ['archivelistreceived',['archiveListReceived',['../classQXmppArchiveManager.html#a664908d079afe2baeeb49396b5e53ede',1,'QXmppArchiveManager']]], ['arebookmarksreceived',['areBookmarksReceived',['../classQXmppBookmarkManager.html#ae61e6b96bd1e72019f9c96dd80bb6225',1,'QXmppBookmarkManager']]], ['arguments',['arguments',['../classQXmppRpcInvokeIq.html#a870ba44778b440a333f934979abfff34',1,'QXmppRpcInvokeIq']]], ['audiochannel',['audioChannel',['../classQXmppCall.html#aff2006c93114c3c4bcff232705658516',1,'QXmppCall']]], ['audiomodechanged',['audioModeChanged',['../classQXmppCall.html#a3da1d9302889a44a06f9d45fbd3aef33',1,'QXmppCall']]], ['autoacceptsubscriptions',['autoAcceptSubscriptions',['../classQXmppConfiguration.html#a03cdbc1bdaee40204b55efe84f363c0a',1,'QXmppConfiguration']]], ['autojoin',['autoJoin',['../classQXmppBookmarkConference.html#a993f88a4d5eb798ef972b097996c83e4',1,'QXmppBookmarkConference']]], ['autoreconnectionenabled',['autoReconnectionEnabled',['../classQXmppConfiguration.html#a8b9aad6cb544bfc51529772d1ed7d0ab',1,'QXmppConfiguration']]], ['availablestatustype',['availableStatusType',['../classQXmppPresence.html#a33aa276d9c31556f8616f6c9fd471f0e',1,'QXmppPresence']]] ]; qxmpp-0.7.6/doc/html/search/enums_76.html0000644000175000007640000000170612116723632020127 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/functions_75.js0000644000175000007640000000267512116723632020465 0ustar sharkyjerrywebvar searchData= [ ['unsubscribe',['unsubscribe',['../classQXmppRosterManager.html#aa743c82ec16b20e1134f994487db1023',1,'QXmppRosterManager']]], ['updatecounter',['updateCounter',['../classQXmppLogger.html#a9dfaa287ed3dc1b37e9f0824f279bc9c',1,'QXmppLogger::updateCounter()'],['../classQXmppLoggable.html#aa309eaea9699e7fe652a400cef346ae2',1,'QXmppLoggable::updateCounter()']]], ['uris',['uris',['../classQXmppDataForm_1_1Media.html#a3b25e4741293aacf49e67763d6335ffa',1,'QXmppDataForm::Media']]], ['url',['url',['../classQXmppBookmarkUrl.html#ad4f5f12b7d3abcec0dd39b807bc574e4',1,'QXmppBookmarkUrl::url()'],['../classQXmppVCardIq.html#aece55c4dc1a59328aaa643ec7fddb1ec',1,'QXmppVCardIq::url()']]], ['urls',['urls',['../classQXmppBookmarkSet.html#ac670a788961da47538470df0a962417e',1,'QXmppBookmarkSet']]], ['usenonsaslauthentication',['useNonSASLAuthentication',['../classQXmppConfiguration.html#aa1fde10dbd102621f412e64cb047a65e',1,'QXmppConfiguration']]], ['user',['user',['../classQXmppConfiguration.html#a50a49cee480278ddadbb6c6880a731cd',1,'QXmppConfiguration']]], ['username',['username',['../classQXmppRegisterIq.html#a71a483bfe920cb882d86804e67fad959',1,'QXmppRegisterIq::username()'],['../classQXmppPasswordRequest.html#a80eaf03d9905b9a9e778444d4f1a2882',1,'QXmppPasswordRequest::username()']]], ['usesaslauthentication',['useSASLAuthentication',['../classQXmppConfiguration.html#a60226ec21c25409f04b3f5971738e30b',1,'QXmppConfiguration']]] ]; qxmpp-0.7.6/doc/html/search/enumvalues_76.html0000644000175000007640000000171312116723632021162 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/all_6d.js0000644000175000007640000000614012116723632017272 0ustar sharkyjerrywebvar searchData= [ ['managers',['Managers',['../group__Managers.html',1,'']]], ['mappedbytes',['mappedBytes',['../classQXmppVideoFrame.html#a75609b38f580867a1b325bc9e1a49958',1,'QXmppVideoFrame']]], ['marker',['marker',['../classQXmppRtpPacket.html#ae237832abd26d61c12ab07ba3ae2bd29',1,'QXmppRtpPacket']]], ['max',['max',['../classQXmppResultSetQuery.html#aaa6e47f12046a80a3135c13672cb38e2',1,'QXmppResultSetQuery']]], ['maxptime',['maxptime',['../classQXmppJinglePayloadType.html#ab6971a4585334d2184c4a43cc65ca13f',1,'QXmppJinglePayloadType']]], ['media',['Media',['../classQXmppDataForm_1_1Media.html',1,'QXmppDataForm']]], ['media',['media',['../classQXmppDataForm_1_1Field.html#ad04607c2dcd793c9d210ed39ac3f0ec8',1,'QXmppDataForm::Field::media()'],['../classQXmppDataForm_1_1Media.html#a5b0b93f31928801d362573b49743a785',1,'QXmppDataForm::Media::Media()'],['../classQXmppDataForm_1_1Media.html#a9d9f91709c70e8591df3fd5d26bdaa18',1,'QXmppDataForm::Media::Media(const QXmppDataForm::Media &other)']]], ['message',['message',['../classQXmppLogger.html#a7b9d3f1ebab11c651a26dde5b49344ce',1,'QXmppLogger']]], ['messagedelivered',['messageDelivered',['../classQXmppMessageReceiptManager.html#ac7940d37e55e8f424fa13cae6c6c5799',1,'QXmppMessageReceiptManager']]], ['messagereceived',['messageReceived',['../classQXmppClient.html#aa3023a1ba0628cff1032f86df93d7bc3',1,'QXmppClient::messageReceived()'],['../classQXmppMucRoom.html#a1308c355bdfad95e97519d991728d44c',1,'QXmppMucRoom::messageReceived()'],['../classQXmppOutgoingClient.html#a862561dc51e446669311d374fd96f060',1,'QXmppOutgoingClient::messageReceived()']]], ['messages',['messages',['../classQXmppArchiveChat.html#ae70bdf32be4be0a9417a7c14c5ea6eea',1,'QXmppArchiveChat']]], ['messagetype',['MessageType',['../classQXmppLogger.html#a932dbbd4f70a1e9c0ff8f452e61fc9b8',1,'QXmppLogger']]], ['messagetypes',['messageTypes',['../classQXmppLogger.html#a556ae378cb65e19460436437fa155ef2',1,'QXmppLogger']]], ['method',['method',['../classQXmppTransferJob.html#ae32e312cab4321da1a55e6caec7630e2',1,'QXmppTransferJob::method()'],['../classQXmppRpcInvokeIq.html#a484c6cae06cfff75ba2247d16556c76f',1,'QXmppRpcInvokeIq::method()'],['../classQXmppTransferJob.html#a962582d3049909305277e54e2095c71b',1,'QXmppTransferJob::Method()']]], ['middlename',['middleName',['../classQXmppVCardIq.html#a52d8aa814dc5c90a9fa25fe852fad216',1,'QXmppVCardIq']]], ['mucinvitationjid',['mucInvitationJid',['../classQXmppMessage.html#ac9ac6519101e7c5301c0656a7c7b1a40',1,'QXmppMessage']]], ['mucinvitationpassword',['mucInvitationPassword',['../classQXmppMessage.html#abb1fa92382c83981f3ec2cbd2a2165ba',1,'QXmppMessage']]], ['mucinvitationreason',['mucInvitationReason',['../classQXmppMessage.html#ab0ae8f1c7ef1082e90e80a1589a1c855',1,'QXmppMessage']]], ['mucitem',['mucItem',['../classQXmppPresence.html#abd4348359cb60bfe645086bec0681178',1,'QXmppPresence']]], ['mucpassword',['mucPassword',['../classQXmppPresence.html#ae4d3eb2459c4536a14618662b3d10164',1,'QXmppPresence']]], ['mucstatuscodes',['mucStatusCodes',['../classQXmppPresence.html#afee1692914be90c24da5e872933e5023',1,'QXmppPresence']]] ]; qxmpp-0.7.6/doc/html/search/all_73.html0000644000175000007640000000170412116723632017543 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/functions_78.js0000644000175000007640000000057312116723632020463 0ustar sharkyjerrywebvar searchData= [ ['xhtml',['xhtml',['../classQXmppMessage.html#a9fe534dddf405b50ce97ff4a0f0b4301',1,'QXmppMessage']]], ['xmppstreamerror',['xmppStreamError',['../classQXmppClient.html#af3a18178f3349e668f09ee46ba7d48db',1,'QXmppClient::xmppStreamError()'],['../classQXmppOutgoingClient.html#acd53efcf1903123bdf9a1294c1423428',1,'QXmppOutgoingClient::xmppStreamError()']]] ]; qxmpp-0.7.6/doc/html/search/properties_76.html0000644000175000007640000000171312116723632021172 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/properties_72.js0000644000175000007640000000020212116723632020626 0ustar sharkyjerrywebvar searchData= [ ['rooms',['rooms',['../classQXmppMucManager.html#a574bd5b755a4463895f5376977d6a0a7',1,'QXmppMucManager']]] ]; qxmpp-0.7.6/doc/html/search/all_66.js0000644000175000007640000001147112116723632017217 0ustar sharkyjerrywebvar searchData= [ ['facebookaccesstoken',['facebookAccessToken',['../classQXmppConfiguration.html#a4ece1daf219595820ea006fd797dfe61',1,'QXmppConfiguration']]], ['facebookappid',['facebookAppId',['../classQXmppConfiguration.html#a2fc2f7fdbe02f5a4f556bcaa7572160d',1,'QXmppConfiguration']]], ['faultcode',['faultCode',['../classQXmppRpcResponseIq.html#a3cdd81277f2341bc0f409bcfeb3578b2',1,'QXmppRpcResponseIq']]], ['faultstring',['faultString',['../classQXmppRpcResponseIq.html#ae8979e9b4c98a6e40592fbef78b35082',1,'QXmppRpcResponseIq']]], ['field',['Field',['../classQXmppDataForm_1_1Field.html',1,'QXmppDataForm']]], ['field',['Field',['../classQXmppDataForm_1_1Field.html#a7bd6676385f76c0f305649cf8ded092a',1,'QXmppDataForm::Field::Field(QXmppDataForm::Field::Type type=QXmppDataForm::Field::TextSingleField)'],['../classQXmppDataForm_1_1Field.html#a4ba316346501ec1599804b13bf7754bf',1,'QXmppDataForm::Field::Field(const QXmppDataForm::Field &other)']]], ['fields',['fields',['../classQXmppDataForm.html#aa4ca5fe0af432edc25c9d6f2caffd9b7',1,'QXmppDataForm::fields() const '],['../classQXmppDataForm.html#afea9fd5c21af8685841a6b9bd51b31c6',1,'QXmppDataForm::fields()']]], ['fileaccesserror',['FileAccessError',['../classQXmppTransferJob.html#abacb5103efd8148e13b9c616113366bda652b0ea2df649472711951da6f837c8d',1,'QXmppTransferJob']]], ['filecorrupterror',['FileCorruptError',['../classQXmppTransferJob.html#abacb5103efd8148e13b9c616113366bdabd868969ddaa105da2320ae0e2049967',1,'QXmppTransferJob']]], ['fileinfo',['fileInfo',['../classQXmppTransferJob.html#a51057804e28ce62138de1798c8583637',1,'QXmppTransferJob']]], ['filelogging',['FileLogging',['../classQXmppLogger.html#a9a52fe426322ef8e10e05b7092be6c20a884a47e2c6e8f005829bd52a661b38d6',1,'QXmppLogger']]], ['filereceived',['fileReceived',['../classQXmppTransferManager.html#a12349ea192bdd58e61621dd2ac818ce5',1,'QXmppTransferManager']]], ['findextension',['findExtension',['../classQXmppClient.html#a728fc96e0ca41b21d94e4686f8519c4d',1,'QXmppClient']]], ['finish',['finish',['../classQXmppPasswordReply.html#ad009857528902d3696341b87079f0e26',1,'QXmppPasswordReply']]], ['finished',['finished',['../classQXmppCall.html#a4e2f8523540bcccc963e11401c666809',1,'QXmppCall::finished()'],['../classQXmppTransferJob.html#a602987d2e805440c93ef5b625a422856',1,'QXmppTransferJob::finished()'],['../classQXmppPasswordReply.html#a59f02853e4cf6feb747e219082b22374',1,'QXmppPasswordReply::finished()']]], ['finishedstate',['FinishedState',['../classQXmppCall.html#a90205b5034613127d2c4adc6a0252759ace75b803223c076618b697a77320e491',1,'QXmppCall::FinishedState()'],['../classQXmppTransferJob.html#aab5bb06ca0d2c4f1fac33b7012d1c14fa4ce8417fcf9feae6a2ec2a141b4c72e5',1,'QXmppTransferJob::FinishedState()']]], ['finishlater',['finishLater',['../classQXmppPasswordReply.html#acc7e92729cf456e68b8e6341b97643bc',1,'QXmppPasswordReply']]], ['first',['first',['../classQXmppResultSetReply.html#ae4b0426a63661fc66a10e895aa42fd4a',1,'QXmppResultSetReply']]], ['firstname',['firstName',['../classQXmppVCardIq.html#a64d99a338d3ebab31923aa6f4f30554b',1,'QXmppVCardIq']]], ['form',['Form',['../classQXmppDataForm.html#adab12c436b8c450e2b4f59da1aecadeea7cf7ea376eb2622aee106753f21af876',1,'QXmppDataForm::Form()'],['../classQXmppMucOwnerIq.html#a1bdf7e3e90eee74765361825fe77e93f',1,'QXmppMucOwnerIq::form()'],['../classQXmppRegisterIq.html#a94966c6db427c9709ed86ad65ba87671',1,'QXmppRegisterIq::form()']]], ['format_5finvalid',['Format_Invalid',['../classQXmppVideoFrame.html#a55cceb24be43a12d0d410a2a6b51c1feac6a70fdbcdaf9e67b459109d6d326dfa',1,'QXmppVideoFrame']]], ['format_5frgb24',['Format_RGB24',['../classQXmppVideoFrame.html#a55cceb24be43a12d0d410a2a6b51c1feaecb066de219743a4073f5f68626df9d4',1,'QXmppVideoFrame']]], ['format_5frgb32',['Format_RGB32',['../classQXmppVideoFrame.html#a55cceb24be43a12d0d410a2a6b51c1fea349cbb6efdb5b6c2ae0c7dd617b5591c',1,'QXmppVideoFrame']]], ['format_5fuyvy',['Format_UYVY',['../classQXmppVideoFrame.html#a55cceb24be43a12d0d410a2a6b51c1fea3282c8c8465dcaa28edfc728898f2dcf',1,'QXmppVideoFrame']]], ['format_5fyuv420p',['Format_YUV420P',['../classQXmppVideoFrame.html#a55cceb24be43a12d0d410a2a6b51c1fea87b2a263e0b68f02831f96ef95e3f689',1,'QXmppVideoFrame']]], ['format_5fyuyv',['Format_YUYV',['../classQXmppVideoFrame.html#a55cceb24be43a12d0d410a2a6b51c1fea3b7c68f561ad9808334391f988508844',1,'QXmppVideoFrame']]], ['foundation',['foundation',['../classQXmppJingleCandidate.html#a1454f64bd7d45a7a52a15486b49ee178',1,'QXmppJingleCandidate']]], ['from',['From',['../classQXmppRosterIq_1_1Item.html#a0133cf9262cec7e299c4db7c247c5514a05fc5ab28e5f745a116caf16dbb6b387',1,'QXmppRosterIq::Item::From()'],['../classQXmppStanza.html#a2e68644ae328ff374ffc5115597a525e',1,'QXmppStanza::from()']]], ['fullname',['fullName',['../classQXmppVCardIq.html#ab654c884f23e9567e58ceb7ccc486b4e',1,'QXmppVCardIq']]] ]; qxmpp-0.7.6/doc/html/search/nomatches.html0000644000175000007640000000071512116723632020444 0ustar sharkyjerryweb
No Matches
qxmpp-0.7.6/doc/html/search/functions_71.js0000644000175000007640000001761612116723632020462 0ustar sharkyjerrywebvar searchData= [ ['queryjid',['queryJid',['../classQXmppPubSubIq.html#a3610eb6fa79167df0a58a804b4cbd088',1,'QXmppPubSubIq']]], ['querynode',['queryNode',['../classQXmppPubSubIq.html#a072d2c6e7c3f6d44c9c14bb80c571b85',1,'QXmppPubSubIq']]], ['querytype',['queryType',['../classQXmppPubSubIq.html#ab9281b3fa57189d068976f8d0c2c9901',1,'QXmppPubSubIq']]], ['queuedata',['queueData',['../classQXmppOutgoingServer.html#aeaab8b4ce42db69ab9cea8ace67a1265',1,'QXmppOutgoingServer']]], ['qxmpparchivelistiq',['QXmppArchiveListIq',['../classQXmppArchiveListIq.html#aa940621c68b3d637099e40916bdf5a37',1,'QXmppArchiveListIq']]], ['qxmppbookmarkconference',['QXmppBookmarkConference',['../classQXmppBookmarkConference.html#a01e949da407d33e9d53b92b7ebe81c68',1,'QXmppBookmarkConference']]], ['qxmppbookmarkmanager',['QXmppBookmarkManager',['../classQXmppBookmarkManager.html#af8d7ef4d015752c8b33ac81fd030f165',1,'QXmppBookmarkManager']]], ['qxmppcallmanager',['QXmppCallManager',['../classQXmppCallManager.html#a560d15be90eda576c32fc7765c4495e4',1,'QXmppCallManager']]], ['qxmppclient',['QXmppClient',['../classQXmppClient.html#a6ba469fd893d18ae14a709c5d040b623',1,'QXmppClient']]], ['qxmppclientextension',['QXmppClientExtension',['../classQXmppClientExtension.html#aec299452688f50431f1028668186e3ec',1,'QXmppClientExtension']]], ['qxmppconfiguration',['QXmppConfiguration',['../classQXmppConfiguration.html#acd68380ad2353139a8c29087c40e4dcc',1,'QXmppConfiguration::QXmppConfiguration()'],['../classQXmppConfiguration.html#ac91c247c5ee60472abb5393f9e32d0f2',1,'QXmppConfiguration::QXmppConfiguration(const QXmppConfiguration &other)']]], ['qxmppdataform',['QXmppDataForm',['../classQXmppDataForm.html#a058f203f616dbffbd32043f509a9ff65',1,'QXmppDataForm::QXmppDataForm(QXmppDataForm::Type type=QXmppDataForm::None)'],['../classQXmppDataForm.html#a976fd7811d7f937fd2f9a7d313eb7ca8',1,'QXmppDataForm::QXmppDataForm(const QXmppDataForm &other)']]], ['qxmppdialback',['QXmppDialback',['../classQXmppDialback.html#a1aa371e5859efa4eb5a5a733f609db3e',1,'QXmppDialback']]], ['qxmppextendedaddress',['QXmppExtendedAddress',['../classQXmppExtendedAddress.html#a977ce245d062f5cb8398b02ecff76163',1,'QXmppExtendedAddress::QXmppExtendedAddress()'],['../classQXmppExtendedAddress.html#a2a88bb47091f713d6b8176ab2ee1101f',1,'QXmppExtendedAddress::QXmppExtendedAddress(const QXmppExtendedAddress &)']]], ['qxmppicecomponent',['QXmppIceComponent',['../classQXmppIceComponent.html#ac42db14e22921cac54b2e7e2e9624c3d',1,'QXmppIceComponent']]], ['qxmppiceconnection',['QXmppIceConnection',['../classQXmppIceConnection.html#a7d406bc9a1991257db34c493bc5780a7',1,'QXmppIceConnection']]], ['qxmppincomingclient',['QXmppIncomingClient',['../classQXmppIncomingClient.html#a4544a58d3047af1fb4b997055fae9447',1,'QXmppIncomingClient']]], ['qxmppincomingserver',['QXmppIncomingServer',['../classQXmppIncomingServer.html#a35f13c6597f2c46fe220e7f9f612832c',1,'QXmppIncomingServer']]], ['qxmppinvokable',['QXmppInvokable',['../classQXmppInvokable.html#ae3f2b1d6d85b4ec6c7565554491ce6e3',1,'QXmppInvokable']]], ['qxmppiq',['QXmppIq',['../classQXmppIq.html#a16db985e7cbf842dbca1cb94ec57c64f',1,'QXmppIq::QXmppIq(QXmppIq::Type type=QXmppIq::Get)'],['../classQXmppIq.html#a64c242ce6d42d7013d53120c58be5da2',1,'QXmppIq::QXmppIq(const QXmppIq &other)']]], ['qxmppjingleiq',['QXmppJingleIq',['../classQXmppJingleIq.html#aeb7657fe2e9f6d5a9da2beef434625ff',1,'QXmppJingleIq']]], ['qxmpploggable',['QXmppLoggable',['../classQXmppLoggable.html#a05ad3142486bec62b2d58ad49b1d4005',1,'QXmppLoggable']]], ['qxmpplogger',['QXmppLogger',['../classQXmppLogger.html#a103f204a149f91d7e2c4faf7d02d2266',1,'QXmppLogger']]], ['qxmppmessage',['QXmppMessage',['../classQXmppMessage.html#aa51870c00e3ffadc8555e00e0153c136',1,'QXmppMessage::QXmppMessage(const QString &from="", const QString &to="", const QString &body="", const QString &thread="")'],['../classQXmppMessage.html#af73b605ad48ee6ecc111975f774c6edd',1,'QXmppMessage::QXmppMessage(const QXmppMessage &other)']]], ['qxmppmessagereceiptmanager',['QXmppMessageReceiptManager',['../classQXmppMessageReceiptManager.html#abd24b74a2784930429f1e9df1d7704fa',1,'QXmppMessageReceiptManager']]], ['qxmppmucmanager',['QXmppMucManager',['../classQXmppMucManager.html#a0eb8a3dbacfa9983e2ac72cd6a7629a3',1,'QXmppMucManager']]], ['qxmppoutgoingclient',['QXmppOutgoingClient',['../classQXmppOutgoingClient.html#a6713a94557a69df0051039b6f9a9cf3c',1,'QXmppOutgoingClient']]], ['qxmppoutgoingserver',['QXmppOutgoingServer',['../classQXmppOutgoingServer.html#a10e2b65e7bc9957db290b0a6de931bed',1,'QXmppOutgoingServer']]], ['qxmpppasswordreply',['QXmppPasswordReply',['../classQXmppPasswordReply.html#aee5c16b4954a41b183086f108df26971',1,'QXmppPasswordReply']]], ['qxmpppresence',['QXmppPresence',['../classQXmppPresence.html#ab3facb1c108a346c1866f11133592601',1,'QXmppPresence::QXmppPresence(QXmppPresence::Type type=QXmppPresence::Available)'],['../classQXmppPresence.html#a74ef4824a0c7c70c095c9e783a3b55b4',1,'QXmppPresence::QXmppPresence(const QXmppPresence &other)']]], ['qxmpprostermanager',['QXmppRosterManager',['../classQXmppRosterManager.html#aa96bd124e15813b402bc1de93f9e4f7b',1,'QXmppRosterManager']]], ['qxmpprpcmanager',['QXmppRpcManager',['../classQXmppRpcManager.html#a8fece0110e91b17f2868575303d7c90f',1,'QXmppRpcManager']]], ['qxmpprtpaudiochannel',['QXmppRtpAudioChannel',['../classQXmppRtpAudioChannel.html#af8d0d31bd72cb5455de7dcfbe27bcf01',1,'QXmppRtpAudioChannel']]], ['qxmpprtpvideochannel',['QXmppRtpVideoChannel',['../classQXmppRtpVideoChannel.html#acd71a25b1c88bb225f7c88c5f6951f63',1,'QXmppRtpVideoChannel']]], ['qxmppserver',['QXmppServer',['../classQXmppServer.html#a1e63b89e62f124544a1052ca6eff2af5',1,'QXmppServer']]], ['qxmppsslserver',['QXmppSslServer',['../classQXmppSslServer.html#af0ef7762cca74cc5f833f0891348e08d',1,'QXmppSslServer']]], ['qxmppstanza',['QXmppStanza',['../classQXmppStanza.html#aeda5073d2af6c52e78f127bca4306ace',1,'QXmppStanza::QXmppStanza(const QString &from=QString(), const QString &to=QString())'],['../classQXmppStanza.html#af8e4636d056c754347635ba26cd8d60c',1,'QXmppStanza::QXmppStanza(const QXmppStanza &other)']]], ['qxmppstream',['QXmppStream',['../classQXmppStream.html#a70a8f8a0734c3a681fb0079890d99786',1,'QXmppStream']]], ['qxmpptransfermanager',['QXmppTransferManager',['../classQXmppTransferManager.html#aa88b03ffc2b9039a50bae7e79e759ed7',1,'QXmppTransferManager']]], ['qxmppvcardaddress',['QXmppVCardAddress',['../classQXmppVCardAddress.html#ab31c2eab8fb090d6716515cfe0fad36b',1,'QXmppVCardAddress::QXmppVCardAddress()'],['../classQXmppVCardAddress.html#a2093d0ed8737c0f04ffa543c3943f0a9',1,'QXmppVCardAddress::QXmppVCardAddress(const QXmppVCardAddress &other)']]], ['qxmppvcardemail',['QXmppVCardEmail',['../classQXmppVCardEmail.html#ac2d3a7f08975a9d6a395c8ed60d1a4ef',1,'QXmppVCardEmail::QXmppVCardEmail()'],['../classQXmppVCardEmail.html#a769b18f711a4bca0a6de8f7707e89a0b',1,'QXmppVCardEmail::QXmppVCardEmail(const QXmppVCardEmail &other)']]], ['qxmppvcardiq',['QXmppVCardIq',['../classQXmppVCardIq.html#a93c39e3c608a259c505ba0ecd841e0db',1,'QXmppVCardIq::QXmppVCardIq(const QString &bareJid="")'],['../classQXmppVCardIq.html#a7e09646833b005171d2f3564cb446e91',1,'QXmppVCardIq::QXmppVCardIq(const QXmppVCardIq &other)']]], ['qxmppvcardphone',['QXmppVCardPhone',['../classQXmppVCardPhone.html#ab8227e376f5aba012a8e05d6f09c7c6a',1,'QXmppVCardPhone::QXmppVCardPhone()'],['../classQXmppVCardPhone.html#acd06e5045a4f27ce29a0bf34b6d4653c',1,'QXmppVCardPhone::QXmppVCardPhone(const QXmppVCardPhone &other)']]], ['qxmppvideoframe',['QXmppVideoFrame',['../classQXmppVideoFrame.html#ae33d6c7b73381921c6f6b70fa2b16cf9',1,'QXmppVideoFrame::QXmppVideoFrame()'],['../classQXmppVideoFrame.html#aa8af160798b29f2164e93b2f84b3de8e',1,'QXmppVideoFrame::QXmppVideoFrame(int bytes, const QSize &size, int bytesPerLine, PixelFormat format)']]] ]; qxmpp-0.7.6/doc/html/search/properties_73.js0000644000175000007640000000106312116723632020635 0ustar sharkyjerrywebvar searchData= [ ['state',['state',['../classQXmppCall.html#aa09971e040121ffef56577a537be35a1',1,'QXmppCall::state()'],['../classQXmppClient.html#ac4cbb2e04e5ca683fadbc79ef173f0a5',1,'QXmppClient::state()'],['../classQXmppTransferJob.html#a51e1adb470053f12c5d5b2a10887c8f3',1,'QXmppTransferJob::state()']]], ['subject',['subject',['../classQXmppMucRoom.html#a7f95cf9bbd6fa253ca68312bd97f93dd',1,'QXmppMucRoom']]], ['supportedmethods',['supportedMethods',['../classQXmppTransferManager.html#aeb4b1f1bb5e966f977d832014f0de9d8',1,'QXmppTransferManager']]] ]; qxmpp-0.7.6/doc/html/search/functions_65.html0000644000175000007640000000171212116723632021003 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/all_63.html0000644000175000007640000000170412116723632017542 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/enumvalues_67.js0000644000175000007640000000042612116723632020632 0ustar sharkyjerrywebvar searchData= [ ['get',['Get',['../classQXmppIq.html#a6bc7a0505a3be7309051ae2432a3d826a78ce31809da9bddb4ab04ad512293eb1',1,'QXmppIq']]], ['gone',['Gone',['../classQXmppMessage.html#aeaa3cc5ccb7d451067a80dd1f3c7099aa82f224b6d9a97c9d40ecc8df80b22f61',1,'QXmppMessage']]] ]; qxmpp-0.7.6/doc/html/search/all_6e.js0000644000175000007640000000741412116723632017300 0ustar sharkyjerrywebvar searchData= [ ['name',['name',['../classQXmppMucRoom.html#a8cc33fb2f68adaf228a690e82705cf93',1,'QXmppMucRoom::name()'],['../classQXmppBookmarkConference.html#a4e615847e0b7654cdddaef308d833c26',1,'QXmppBookmarkConference::name()'],['../classQXmppBookmarkUrl.html#a08143b8a8e3c33c79818df2a6e9a8ee0',1,'QXmppBookmarkUrl::name()'],['../classQXmppJinglePayloadType.html#ae683ecd2f8ea39e43ab739292d166cac',1,'QXmppJinglePayloadType::name()'],['../classQXmppRosterIq_1_1Item.html#ac571bc4337c50cf3adadf14f5ff3e163',1,'QXmppRosterIq::Item::name()'],['../classQXmppVersionIq.html#a2d8382624e8dc79e1c9a431c999cc159',1,'QXmppVersionIq::name()']]], ['namechanged',['nameChanged',['../classQXmppMucRoom.html#a4d77fb275ac6ac436386dafe101df153',1,'QXmppMucRoom']]], ['network',['network',['../classQXmppJingleCandidate.html#a7250a7dcbe9584ec4ae4da94d50d8fbf',1,'QXmppJingleCandidate']]], ['networkproxy',['networkProxy',['../classQXmppConfiguration.html#a8e70297c7ea0650cd6461d2fb623e483',1,'QXmppConfiguration']]], ['newconnection',['newConnection',['../classQXmppSslServer.html#a3c5d10a6d4522437be53257665c68d30',1,'QXmppSslServer']]], ['nick',['nick',['../classQXmppMucItem.html#a9007c0121ed60c6b6926959d0e876908',1,'QXmppMucItem']]], ['nickname',['nickName',['../classQXmppMucRoom.html#a4206fcda2f174de64c6de1416ce516a9',1,'QXmppMucRoom::nickName()'],['../classQXmppBookmarkConference.html#adc78070749918c237d7d26eada80531d',1,'QXmppBookmarkConference::nickName()'],['../classQXmppVCardIq.html#a689b448396c78ddaa5a23c21af8d0a42',1,'QXmppVCardIq::nickName()']]], ['nicknamechanged',['nickNameChanged',['../classQXmppMucRoom.html#a2c3b18b2e26a82aff5a4c9f8a78c5c8a',1,'QXmppMucRoom']]], ['noaction',['NoAction',['../classQXmppMucRoom.html#acd3129293f69d7e7cdd91b65aae0606fa12d272fee016d8ad12bea4dc36d38f63',1,'QXmppMucRoom']]], ['noerror',['NoError',['../classQXmppClient.html#a7c2851d07cc33119752abc6ec8ffc47aa0432617a6e27c34202bdac7c5356299f',1,'QXmppClient::NoError()'],['../classQXmppTransferJob.html#abacb5103efd8148e13b9c616113366bdad8a530831e3758a4fd70dbfa5c49dc46',1,'QXmppTransferJob::NoError()']]], ['nologging',['NoLogging',['../classQXmppLogger.html#a9a52fe426322ef8e10e05b7092be6c20a8fcce12c247bbc876e5d97299430deb6',1,'QXmppLogger']]], ['nomessage',['NoMessage',['../classQXmppLogger.html#a932dbbd4f70a1e9c0ff8f452e61fc9b8aa1be17c113c6f22b82805e538c12cec9',1,'QXmppLogger']]], ['nomethod',['NoMethod',['../classQXmppTransferJob.html#a962582d3049909305277e54e2095c71ba6f69806ddd747d2d09d26f6642ac21e6',1,'QXmppTransferJob']]], ['none',['None',['../classQXmppDataForm.html#adab12c436b8c450e2b4f59da1aecadeea3239da22ddd2cfa5e6052d617cb7545f',1,'QXmppDataForm::None()'],['../classQXmppMessage.html#aeaa3cc5ccb7d451067a80dd1f3c7099aabe52ccd452233405cb3a9f86ce086236',1,'QXmppMessage::None()'],['../classQXmppRosterIq_1_1Item.html#a0133cf9262cec7e299c4db7c247c5514a57718bbef43da7d46f4c51473cf8dd81',1,'QXmppRosterIq::Item::None()']]], ['nonsaslauthmechanism',['NonSASLAuthMechanism',['../classQXmppConfiguration.html#acdc5d816a74551209d5c50557e90fda2',1,'QXmppConfiguration::NonSASLAuthMechanism()'],['../classQXmppConfiguration.html#a4a2c891017fc79544a439ce6ce48fc71',1,'QXmppConfiguration::nonSASLAuthMechanism() const ']]], ['nonsasldigest',['NonSASLDigest',['../classQXmppConfiguration.html#acdc5d816a74551209d5c50557e90fda2a97f33f490ab3d0bfdf717037551a62a3',1,'QXmppConfiguration']]], ['nonsaslplain',['NonSASLPlain',['../classQXmppConfiguration.html#acdc5d816a74551209d5c50557e90fda2a1edaa0616b19f8d6f7a711f37f672762',1,'QXmppConfiguration']]], ['notset',['NotSet',['../classQXmppRosterIq_1_1Item.html#a0133cf9262cec7e299c4db7c247c5514a5cbc5c1d6fd784f7c17437c7b6ebe544',1,'QXmppRosterIq::Item']]], ['number',['number',['../classQXmppVCardPhone.html#ae1677209c24e28550198ec4251880401',1,'QXmppVCardPhone']]] ]; qxmpp-0.7.6/doc/html/search/enumvalues_75.js0000644000175000007640000000073312116723632020632 0ustar sharkyjerrywebvar searchData= [ ['unavailable',['Unavailable',['../classQXmppPresence.html#a47ab8dd08436f9d7c90d2990678b5a6da6188ca67163c9045eb9568deefb9a363',1,'QXmppPresence']]], ['unsubscribe',['Unsubscribe',['../classQXmppPresence.html#a47ab8dd08436f9d7c90d2990678b5a6da20986f18e387f68a5fdfa0e67c44bc44',1,'QXmppPresence']]], ['unsubscribed',['Unsubscribed',['../classQXmppPresence.html#a47ab8dd08436f9d7c90d2990678b5a6da63414092d2fc4b90987f56731c150623',1,'QXmppPresence']]] ]; qxmpp-0.7.6/doc/html/search/functions_76.js0000644000175000007640000000250112116723632020452 0ustar sharkyjerrywebvar searchData= [ ['value',['value',['../classQXmppDataForm_1_1Field.html#aa4c1f9febaa21d50c82bf7231000ac6c',1,'QXmppDataForm::Field']]], ['values',['values',['../classQXmppRpcResponseIq.html#a197eceb6f87aab9c1cd325ebf20ab9f3',1,'QXmppRpcResponseIq']]], ['vcardmanager',['vCardManager',['../classQXmppClient.html#ab0db5aa6c6727d606497d8e3e84a3bf4',1,'QXmppClient']]], ['vcardreceived',['vCardReceived',['../classQXmppVCardManager.html#a6c67da960890760e54fec8f7c675af55',1,'QXmppVCardManager']]], ['vcardupdatetype',['vCardUpdateType',['../classQXmppPresence.html#a6748358697aa99a65209c46eae053829',1,'QXmppPresence']]], ['version',['version',['../classQXmppArchiveChat.html#a2e563da62d14e284f30f1444102d05a3',1,'QXmppArchiveChat::version()'],['../classQXmppVersionIq.html#a3dc888295f2a8ea67eab86221d1f61c5',1,'QXmppVersionIq::version()']]], ['versionmanager',['versionManager',['../classQXmppClient.html#a1ffcc6b023c8e067b2aec67a9255f1a2',1,'QXmppClient']]], ['versionreceived',['versionReceived',['../classQXmppVersionManager.html#a064202b4b525902fc76dc45f39a9cd8d',1,'QXmppVersionManager']]], ['videochannel',['videoChannel',['../classQXmppCall.html#af04eb6619344ba101dac4ead1368cd2c',1,'QXmppCall']]], ['videomodechanged',['videoModeChanged',['../classQXmppCall.html#a962643a248d029b64175eb157f0aa3b1',1,'QXmppCall']]] ]; qxmpp-0.7.6/doc/html/search/functions_69.js0000644000175000007640000001435512116723632020466 0ustar sharkyjerrywebvar searchData= [ ['id',['id',['../classQXmppJinglePayloadType.html#a7b2478ecef7063e99522f5a073275783',1,'QXmppJinglePayloadType::id()'],['../classQXmppJingleCandidate.html#a1b5b1cf42c9bddf16d251398c9d38f86',1,'QXmppJingleCandidate::id()'],['../classQXmppPubSubItem.html#a2f6465fa597d3b39c373f60dec8699e0',1,'QXmppPubSubItem::id()'],['../classQXmppStanza.html#ab9c0dbe7f86f9f222be28882617f8451',1,'QXmppStanza::id()']]], ['ignoresslerrors',['ignoreSslErrors',['../classQXmppConfiguration.html#a5b23c1bfbf43052c1de403d423967418',1,'QXmppConfiguration']]], ['index',['index',['../classQXmppResultSetQuery.html#add1556addb86f5f2093c7062899d56de',1,'QXmppResultSetQuery::index()'],['../classQXmppResultSetReply.html#a05927e11e85a68b167fec152f5e8d3f7',1,'QXmppResultSetReply::index()']]], ['info',['info',['../classQXmppLoggable.html#ab26d53408f7ecc53a776fe2499021e03',1,'QXmppLoggable']]], ['inforeceived',['infoReceived',['../classQXmppDiscoveryManager.html#addbd7076f78b31433ed0a17bcae103ef',1,'QXmppDiscoveryManager']]], ['initiator',['initiator',['../classQXmppJingleIq.html#a84ccbc8f47dea6c39721fb20ea4b1767',1,'QXmppJingleIq']]], ['insertextension',['insertExtension',['../classQXmppClient.html#a9459b68cf1cb56a2bad27909ec5e7e7b',1,'QXmppClient']]], ['instructions',['instructions',['../classQXmppDataForm.html#ab40de3c0996c5515b6fb414ec300b09d',1,'QXmppDataForm::instructions()'],['../classQXmppRegisterIq.html#aaca06d2ab6a45aafbb7c207365b7dc33',1,'QXmppRegisterIq::instructions()']]], ['interfaces',['interfaces',['../classQXmppInvokable.html#a4d345ef34a91ca9e5535cef4ee6d026c',1,'QXmppInvokable']]], ['invitationreceived',['invitationReceived',['../classQXmppMucManager.html#a8ad1ab6b9c8bf656bedbd8cd31a0076b',1,'QXmppMucManager']]], ['iqreceived',['iqReceived',['../classQXmppClient.html#ab3725eaae927f9c600c59a9e7e681909',1,'QXmppClient::iqReceived()'],['../classQXmppOutgoingClient.html#ac5199200ec81a1b3de18ca8563ac430a',1,'QXmppOutgoingClient::iqReceived()']]], ['isattentionrequested',['isAttentionRequested',['../classQXmppMessage.html#a96902fca2931b696c874ad5b972ed0f3',1,'QXmppMessage']]], ['isauthenticated',['isAuthenticated',['../classQXmppClient.html#a5337959daeec2648b3c262bc84441e44',1,'QXmppClient::isAuthenticated()'],['../classQXmppOutgoingClient.html#a009fbefdfbaef0af9846e57626048d64',1,'QXmppOutgoingClient::isAuthenticated()']]], ['isauthorized',['isAuthorized',['../classQXmppInvokable.html#abb8f542ae1ebd422e9454bbeafc5dda8',1,'QXmppInvokable']]], ['isclientvcardreceived',['isClientVCardReceived',['../classQXmppVCardManager.html#a6a9b2024738145c719623328ca13c752',1,'QXmppVCardManager']]], ['isconnected',['isConnected',['../classQXmppStream.html#a2fe3c35571afa33cb45efa7213b89270',1,'QXmppStream::isConnected()'],['../classQXmppIceComponent.html#acbaba98328a2f695acc9478ed7657cee',1,'QXmppIceComponent::isConnected()'],['../classQXmppIceConnection.html#a0d06b299c63a479c40a7d9980d5c68f8',1,'QXmppIceConnection::isConnected()'],['../classQXmppClient.html#adf54b0085d8a7fc81c05973973fa4a04',1,'QXmppClient::isConnected()'],['../classQXmppOutgoingClient.html#a7a4038c3d95a6d16d850f008cdc3960c',1,'QXmppOutgoingClient::isConnected()'],['../classQXmppIncomingClient.html#a635f2d9bd871807cb2ede33ed01d9a3b',1,'QXmppIncomingClient::isConnected()'],['../classQXmppIncomingServer.html#a10ef0d7a3bb32694b2b84feb2202ada7',1,'QXmppIncomingServer::isConnected()'],['../classQXmppOutgoingServer.html#a0288ad6d6e23ba3b6404fe39a5f08d4d',1,'QXmppOutgoingServer::isConnected()']]], ['isdelivered',['isDelivered',['../classQXmppExtendedAddress.html#a8b58ad878eeb5b73621cd61a9228fc65',1,'QXmppExtendedAddress']]], ['isfinished',['isFinished',['../classQXmppPasswordReply.html#ab4149f89263f3f40aa7dfb8aa1a4a2f1',1,'QXmppPasswordReply']]], ['ismucsupported',['isMucSupported',['../classQXmppPresence.html#a2e480c44c043017610d910cc52872d10',1,'QXmppPresence']]], ['isnull',['isNull',['../classQXmppDataForm_1_1Media.html#a9874de4203824cfc5da2f566aa768494',1,'QXmppDataForm::Media::isNull()'],['../classQXmppDataForm.html#aecb3ba04afc0a9e47a3d3464434ec1dd',1,'QXmppDataForm::isNull()'],['../classQXmppJingleCandidate.html#afefdb979f71856f728b3eaee8351570e',1,'QXmppJingleCandidate::isNull()'],['../classQXmppMucItem.html#a870dc4b604aebf06248004af97456737',1,'QXmppMucItem::isNull()'],['../classQXmppResultSetQuery.html#a917e79c4d689ed133a59c9c0b9d597ca',1,'QXmppResultSetQuery::isNull()'],['../classQXmppResultSetReply.html#a09942a28727e935f02b2f42c404b4169',1,'QXmppResultSetReply::isNull()']]], ['isreceiptrequested',['isReceiptRequested',['../classQXmppMessage.html#ab3069286f4d8f0e0985d83010a5688d8',1,'QXmppMessage']]], ['isreceived',['isReceived',['../classQXmppArchiveMessage.html#a3c57ef45d3ccec75dd9710021ee175de',1,'QXmppArchiveMessage']]], ['isrequired',['isRequired',['../classQXmppDataForm_1_1Field.html#a9466d429d737776da07591c8da25e36e',1,'QXmppDataForm::Field']]], ['isrosterreceived',['isRosterReceived',['../classQXmppRosterManager.html#a62d70b839c626994ab6de5d02ca42c23',1,'QXmppRosterManager']]], ['issequential',['isSequential',['../classQXmppRtpAudioChannel.html#a1b6e924d0fdb44c12eca6ba294816c56',1,'QXmppRtpAudioChannel']]], ['isvalid',['isValid',['../classQXmppVideoFrame.html#a0f36f8b6e5f7d66a45b51bac1616e168',1,'QXmppVideoFrame::isValid()'],['../classQXmppExtendedAddress.html#a1a936dd8187f873b9df680d6b900d6da',1,'QXmppExtendedAddress::isValid()']]], ['item',['Item',['../classQXmppRosterIq_1_1Item.html#a42077d1368696f98eb2e68abeac4ca37',1,'QXmppRosterIq::Item']]], ['itemadded',['itemAdded',['../classQXmppRosterManager.html#aa02bc7a630e38d0c3c1830b34381cdb0',1,'QXmppRosterManager']]], ['itemchanged',['itemChanged',['../classQXmppRosterManager.html#a946fa5a6386ce44b898b70bdc0eca159',1,'QXmppRosterManager']]], ['itemremoved',['itemRemoved',['../classQXmppRosterManager.html#a676caab8bdf1feb4753c0285744e77c7',1,'QXmppRosterManager']]], ['items',['items',['../classQXmppMucAdminIq.html#a6398032af6b4a8f5917c908cae096b3e',1,'QXmppMucAdminIq::items()'],['../classQXmppPubSubIq.html#ae7ad62991fe252ebdf887decdecdd35e',1,'QXmppPubSubIq::items()'],['../classQXmppRosterIq.html#a2cc8f8e839839a91a066f57cc46feda3',1,'QXmppRosterIq::items()']]], ['itemsreceived',['itemsReceived',['../classQXmppDiscoveryManager.html#ad8f5b15247f0683caa6056e6006be2ae',1,'QXmppDiscoveryManager']]] ]; qxmpp-0.7.6/doc/html/search/enumvalues_66.html0000644000175000007640000000171312116723632021161 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/enumvalues_69.js0000644000175000007640000000166512116723632020642 0ustar sharkyjerrywebvar searchData= [ ['inactive',['Inactive',['../classQXmppMessage.html#aeaa3cc5ccb7d451067a80dd1f3c7099aa4cdf5fff1f9cbfdc5db964fab2b1e0db',1,'QXmppMessage']]], ['inbandmethod',['InBandMethod',['../classQXmppTransferJob.html#a962582d3049909305277e54e2095c71bafce3f78618d8963f0ab9f1057408da0d',1,'QXmppTransferJob']]], ['incomingdirection',['IncomingDirection',['../classQXmppCall.html#a429a4f8065136068b6d936cb2c803175afc8bc2f0c97899f7be845547046d1aa0',1,'QXmppCall::IncomingDirection()'],['../classQXmppTransferJob.html#a9c95a89a01357588f699e7d80c3de0b6ae86106ecdfa723ac1933d75963c824ae',1,'QXmppTransferJob::IncomingDirection()']]], ['informationmessage',['InformationMessage',['../classQXmppLogger.html#a932dbbd4f70a1e9c0ff8f452e61fc9b8abedbb015b0064d198bc2112543bf352b',1,'QXmppLogger']]], ['invisible',['Invisible',['../classQXmppPresence.html#ad56af0f57b732c09b080b9347c4dba94a00a1530c56b9457145d4770a58a5ce95',1,'QXmppPresence']]] ]; qxmpp-0.7.6/doc/html/search/properties_72.html0000644000175000007640000000171312116723632021166 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/search_l.png0000644000175000007640000000113412116723632020057 0ustar sharkyjerrywebPNG  IHDR- pHYs   cHRMms8zʴ3Dv6*IDATxڬT=P~91M@0FPD/ѡ.;JtCڥ܊D(I.xo4hpFD8Ecmmnnl1 ,"vh4zl6{D:iP%>aax
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/enumvalues_70.js0000644000175000007640000000143512116723632020625 0ustar sharkyjerrywebvar searchData= [ ['paused',['Paused',['../classQXmppMessage.html#aeaa3cc5ccb7d451067a80dd1f3c7099aac05ed50993dc8450e49249db87c809cf',1,'QXmppMessage']]], ['peerreflexivetype',['PeerReflexiveType',['../classQXmppJingleCandidate.html#a6314b3ed7de59b68131db6ffab55fe7daa8c05f2daae9c29c2d066c54d3b8673c',1,'QXmppJingleCandidate']]], ['permissionsaction',['PermissionsAction',['../classQXmppMucRoom.html#acd3129293f69d7e7cdd91b65aae0606fa47093bf22ebdf16142a7711c31e8b508',1,'QXmppMucRoom']]], ['probe',['Probe',['../classQXmppPresence.html#a47ab8dd08436f9d7c90d2990678b5a6da78bd49bb7dff200e67b1584aee994cd8',1,'QXmppPresence']]], ['protocolerror',['ProtocolError',['../classQXmppTransferJob.html#abacb5103efd8148e13b9c616113366bdaa807924ebe3990ef06e567113ded0c4d',1,'QXmppTransferJob']]] ]; qxmpp-0.7.6/doc/html/search/all_76.js0000644000175000007640000000465612116723632017227 0ustar sharkyjerrywebvar searchData= [ ['value',['value',['../classQXmppDataForm_1_1Field.html#aa4c1f9febaa21d50c82bf7231000ac6c',1,'QXmppDataForm::Field']]], ['values',['values',['../classQXmppRpcResponseIq.html#a197eceb6f87aab9c1cd325ebf20ab9f3',1,'QXmppRpcResponseIq']]], ['vcardmanager',['vCardManager',['../classQXmppClient.html#ab0db5aa6c6727d606497d8e3e84a3bf4',1,'QXmppClient']]], ['vcardreceived',['vCardReceived',['../classQXmppVCardManager.html#a6c67da960890760e54fec8f7c675af55',1,'QXmppVCardManager']]], ['vcardupdatenone',['VCardUpdateNone',['../classQXmppPresence.html#a642a378dd425bbbda1de4317e2dcd199ade94d49098994f9d9c63a2e3b26e85fe',1,'QXmppPresence']]], ['vcardupdatenophoto',['VCardUpdateNoPhoto',['../classQXmppPresence.html#a642a378dd425bbbda1de4317e2dcd199a4d3c48d73da192a0054d24633622f564',1,'QXmppPresence']]], ['vcardupdatenotready',['VCardUpdateNotReady',['../classQXmppPresence.html#a642a378dd425bbbda1de4317e2dcd199a628f45cf1da766418d773f83ba48af50',1,'QXmppPresence']]], ['vcardupdatetype',['VCardUpdateType',['../classQXmppPresence.html#a642a378dd425bbbda1de4317e2dcd199',1,'QXmppPresence::VCardUpdateType()'],['../classQXmppPresence.html#a6748358697aa99a65209c46eae053829',1,'QXmppPresence::vCardUpdateType() const ']]], ['vcardupdatevalidphoto',['VCardUpdateValidPhoto',['../classQXmppPresence.html#a642a378dd425bbbda1de4317e2dcd199a77b3104e5b50933e952dd82740bbe703',1,'QXmppPresence']]], ['verify',['Verify',['../classQXmppDialback.html#a0448107c56f892056f359013b80798bcab04f60abfc5f6b6e0f3166e285dd78c6',1,'QXmppDialback']]], ['version',['version',['../classQXmppRtpPacket.html#a76a810d53d0df4894b0cd4abb2872a77',1,'QXmppRtpPacket::version()'],['../classQXmppArchiveChat.html#a2e563da62d14e284f30f1444102d05a3',1,'QXmppArchiveChat::version()'],['../classQXmppVersionIq.html#a3dc888295f2a8ea67eab86221d1f61c5',1,'QXmppVersionIq::version()']]], ['versionmanager',['versionManager',['../classQXmppClient.html#a1ffcc6b023c8e067b2aec67a9255f1a2',1,'QXmppClient']]], ['versionreceived',['versionReceived',['../classQXmppVersionManager.html#a064202b4b525902fc76dc45f39a9cd8d',1,'QXmppVersionManager']]], ['videochannel',['videoChannel',['../classQXmppCall.html#af04eb6619344ba101dac4ead1368cd2c',1,'QXmppCall']]], ['videomode',['videoMode',['../classQXmppCall.html#a9df3e94e7449fa1482fdc8eee56e94b6',1,'QXmppCall']]], ['videomodechanged',['videoModeChanged',['../classQXmppCall.html#a962643a248d029b64175eb157f0aa3b1',1,'QXmppCall']]] ]; qxmpp-0.7.6/doc/html/search/properties_64.html0000644000175000007640000000171312116723632021167 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/functions_7e.html0000644000175000007640000000171212116723632021064 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/properties_61.html0000644000175000007640000000171312116723632021164 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/enumvalues_63.html0000644000175000007640000000171312116723632021156 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/all_77.html0000644000175000007640000000170412116723632017547 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/search_m.png0000644000175000007640000000023612116723632020062 0ustar sharkyjerrywebPNG  IHDR5^KMgAMAOX2tEXtSoftwareAdobe ImageReadyqe<0IDATxb,//g```<~8#?bbZP,Xnݺ <~EIENDB`qxmpp-0.7.6/doc/html/search/enumvalues_6e.html0000644000175000007640000000171312116723632021240 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/close.png0000644000175000007640000000042112116723632017402 0ustar sharkyjerrywebPNG  IHDR w&IDATuQF@  C5Cg3(w{#*&9}Ͳ,ض y""q<ϑi8K߾6 Ce(;//BVx</ڶEUUte,"gL}ߣk2VSF1 s1 DZwA$IYQ[ ouk*AiWY(G/0{A,)eln]? yEIENDB`qxmpp-0.7.6/doc/html/search/all_64.js0000644000175000007640000001106712116723632017216 0ustar sharkyjerrywebvar searchData= [ ['datagramreceived',['datagramReceived',['../classQXmppRtpAudioChannel.html#aa599ecd38fe49ab6c5976b440af6701a',1,'QXmppRtpAudioChannel::datagramReceived()'],['../classQXmppRtpVideoChannel.html#a8aff9a4172fdf00deeef640e85dfa8a4',1,'QXmppRtpVideoChannel::datagramReceived()'],['../classQXmppIceComponent.html#a7c153ade85120e66964e0eada8513842',1,'QXmppIceComponent::datagramReceived()']]], ['date',['date',['../classQXmppArchiveMessage.html#afb0516bf03ff85fc14c6ec974363f3c8',1,'QXmppArchiveMessage']]], ['datetimefromstring',['datetimeFromString',['../classQXmppUtils.html#a9ce223b82721daee833cff35e8b09464',1,'QXmppUtils']]], ['datetimetostring',['datetimeToString',['../classQXmppUtils.html#a3ab27007d02693dfe26be892dd48f45c',1,'QXmppUtils']]], ['debug',['debug',['../classQXmppLoggable.html#adf78baaf99fba802edaa791fbbd34236',1,'QXmppLoggable']]], ['debugmessage',['DebugMessage',['../classQXmppLogger.html#a932dbbd4f70a1e9c0ff8f452e61fc9b8ad37e67a6433954474cdd1a44ee8d8bae',1,'QXmppLogger']]], ['decode',['decode',['../classQXmppRtpPacket.html#af9d20509224aa4f27fc1c92fc87e9f58',1,'QXmppRtpPacket']]], ['decoderformat',['decoderFormat',['../classQXmppRtpVideoChannel.html#a123733acb37a022a9c273eadaf5aa8fc',1,'QXmppRtpVideoChannel']]], ['description',['description',['../classQXmppDataForm_1_1Field.html#a8b006128d764080cf2725649f63ae4e9',1,'QXmppDataForm::Field::description()'],['../classQXmppExtendedAddress.html#ab6c29726ab00157e5711ef3cf815d06a',1,'QXmppExtendedAddress::description()'],['../classQXmppVCardIq.html#aeedaf3f78a9bb61e3d8be8129466f73c',1,'QXmppVCardIq::description()']]], ['dialbackrequestreceived',['dialbackRequestReceived',['../classQXmppIncomingServer.html#a38a41b7076e423a4861b9a3eba035e98',1,'QXmppIncomingServer']]], ['dialbackresponsereceived',['dialbackResponseReceived',['../classQXmppOutgoingServer.html#a8ebbb372ca06478a9324c65539af74db',1,'QXmppOutgoingServer']]], ['digest',['digest',['../classQXmppPasswordReply.html#a93a2eae02ee07a478366306672ae51b3',1,'QXmppPasswordReply']]], ['direction',['direction',['../classQXmppCall.html#a46873b89c65841319ed4a9ea9580df6e',1,'QXmppCall::direction()'],['../classQXmppTransferJob.html#ae38d5fe89922d7cdf702172f80d827e0',1,'QXmppTransferJob::direction()'],['../classQXmppCall.html#a429a4f8065136068b6d936cb2c803175',1,'QXmppCall::Direction()'],['../classQXmppTransferJob.html#a9c95a89a01357588f699e7d80c3de0b6',1,'QXmppTransferJob::Direction()']]], ['disconnected',['disconnected',['../classQXmppStream.html#a701163b1384f69e6947a420bb63a0d4a',1,'QXmppStream::disconnected()'],['../classQXmppIceConnection.html#aae4ecd60dbbf7276d2380893010ff01f',1,'QXmppIceConnection::disconnected()'],['../classQXmppClient.html#ad0451ed72955dba436c7b97ad2c9ac82',1,'QXmppClient::disconnected()']]], ['disconnectedstate',['DisconnectedState',['../classQXmppClient.html#a5f4e70d508c08967f72fd41c5343ad2ea6bd1662e23e948aa1cb83b628c8b472c',1,'QXmppClient']]], ['disconnectfromhost',['disconnectFromHost',['../classQXmppStream.html#a8608905c2f2cc146567c85756832acb5',1,'QXmppStream']]], ['disconnectfromserver',['disconnectFromServer',['../classQXmppClient.html#a685f42452acbba55f3b15669fa76282d',1,'QXmppClient']]], ['disconnectingstate',['DisconnectingState',['../classQXmppCall.html#a90205b5034613127d2c4adc6a0252759ac703ddc035652668500e44376d38333d',1,'QXmppCall']]], ['discoveraddresses',['discoverAddresses',['../classQXmppIceComponent.html#ab5882d9997870e9339f2d678bfa66744',1,'QXmppIceComponent']]], ['discoveryfeatures',['discoveryFeatures',['../classQXmppClientExtension.html#a3b041abac6b95f5c1614ed1cb87163f4',1,'QXmppClientExtension::discoveryFeatures()'],['../classQXmppServerExtension.html#a5d2abaf7bb482614da25627e516d0ad4',1,'QXmppServerExtension::discoveryFeatures()']]], ['discoveryidentities',['discoveryIdentities',['../classQXmppClientExtension.html#a9acf0693520c93ddc60c4994ffe09343',1,'QXmppClientExtension']]], ['discoveryitems',['discoveryItems',['../classQXmppServerExtension.html#ace0339dad1d50e98cc5109b4dc0e9212',1,'QXmppServerExtension']]], ['dispatch',['dispatch',['../classQXmppInvokable.html#aa7dc5639264fa76249d20a770219f5fb',1,'QXmppInvokable']]], ['dnd',['DND',['../classQXmppPresence.html#ad56af0f57b732c09b080b9347c4dba94a665a0346b1da2e5ddc521b47456ce729',1,'QXmppPresence']]], ['domain',['domain',['../classQXmppConfiguration.html#a80250a8b1f040328fbb3f9e4d640867b',1,'QXmppConfiguration::domain()'],['../classQXmppPasswordRequest.html#a4f71ebce0ec893aa1f3d7f41dc3bed95',1,'QXmppPasswordRequest::domain()'],['../classQXmppServer.html#a3d84689d629177cfb4fddc9798c5e05c',1,'QXmppServer::domain()']]] ]; qxmpp-0.7.6/doc/html/search/enums_6d.js0000644000175000007640000000037012116723632017650 0ustar sharkyjerrywebvar searchData= [ ['messagetype',['MessageType',['../classQXmppLogger.html#a932dbbd4f70a1e9c0ff8f452e61fc9b8',1,'QXmppLogger']]], ['method',['Method',['../classQXmppTransferJob.html#a962582d3049909305277e54e2095c71b',1,'QXmppTransferJob']]] ]; qxmpp-0.7.6/doc/html/search/variables_76.js0000644000175000007640000000020412116723632020410 0ustar sharkyjerrywebvar searchData= [ ['version',['version',['../classQXmppRtpPacket.html#a76a810d53d0df4894b0cd4abb2872a77',1,'QXmppRtpPacket']]] ]; qxmpp-0.7.6/doc/html/search/enums_73.js0000644000175000007640000000125712116723632017575 0ustar sharkyjerrywebvar searchData= [ ['state',['State',['../classQXmppMessage.html#aeaa3cc5ccb7d451067a80dd1f3c7099a',1,'QXmppMessage::State()'],['../classQXmppCall.html#a90205b5034613127d2c4adc6a0252759',1,'QXmppCall::State()'],['../classQXmppClient.html#a5f4e70d508c08967f72fd41c5343ad2e',1,'QXmppClient::State()'],['../classQXmppTransferJob.html#aab5bb06ca0d2c4f1fac33b7012d1c14f',1,'QXmppTransferJob::State()']]], ['streamsecuritymode',['StreamSecurityMode',['../classQXmppConfiguration.html#a7c6e193a68beb792038c066cfc574a18',1,'QXmppConfiguration']]], ['subscriptiontype',['SubscriptionType',['../classQXmppRosterIq_1_1Item.html#a0133cf9262cec7e299c4db7c247c5514',1,'QXmppRosterIq::Item']]] ]; qxmpp-0.7.6/doc/html/search/properties_6e.html0000644000175000007640000000171312116723632021250 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/all_63.js0000644000175000007640000002063312116723632017214 0ustar sharkyjerrywebvar searchData= [ ['cacertificates',['caCertificates',['../classQXmppConfiguration.html#a6203111336a397e83a857ca3d43e5b08',1,'QXmppConfiguration']]], ['call',['call',['../classQXmppCallManager.html#a680c63f0fdd9d45f680cdcae581714ef',1,'QXmppCallManager']]], ['callreceived',['callReceived',['../classQXmppCallManager.html#a91f0a7a4fd78c78be0c4a54ab23af65f',1,'QXmppCallManager']]], ['callremotemethod',['callRemoteMethod',['../classQXmppRpcManager.html#a23b184ca351509255623563fa2b9e2b8',1,'QXmppRpcManager']]], ['callstarted',['callStarted',['../classQXmppCallManager.html#a41734eaa39a6216d39cc40b3991492d2',1,'QXmppCallManager']]], ['cancel',['Cancel',['../classQXmppDataForm.html#adab12c436b8c450e2b4f59da1aecadeead77068b14f4fc528cbf07a055db6eeda',1,'QXmppDataForm']]], ['capabilities',['capabilities',['../classQXmppDiscoveryManager.html#a3c3e53c9eacfbe9b6bc53793543bce6e',1,'QXmppDiscoveryManager']]], ['capabilityext',['capabilityExt',['../classQXmppPresence.html#aec8f7ec4bc7ee9a6afcbd79445954d12',1,'QXmppPresence']]], ['capabilityhash',['capabilityHash',['../classQXmppPresence.html#abc586b332f1bfacdb99356b6fa66671f',1,'QXmppPresence']]], ['capabilitynode',['capabilityNode',['../classQXmppPresence.html#abeb42678d2eb51d805021239b6787e15',1,'QXmppPresence']]], ['capabilityver',['capabilityVer',['../classQXmppPresence.html#af4b39ee86352ec85f6dea9286a8cb7e7',1,'QXmppPresence']]], ['channels',['channels',['../classQXmppJinglePayloadType.html#a11c8291389457bfe986b8c738e0e49a3',1,'QXmppJinglePayloadType']]], ['chat',['chat',['../classQXmppArchiveChatIq.html#af08964b43018061a77c1e20029eaba48',1,'QXmppArchiveChatIq::chat()'],['../classQXmppPresence.html#ad56af0f57b732c09b080b9347c4dba94a284dd672032786aab31be99dd495a65d',1,'QXmppPresence::Chat()']]], ['chats',['chats',['../classQXmppArchiveListIq.html#a9a64466dafcd734555ce4406491c1e05',1,'QXmppArchiveListIq']]], ['checkpassword',['checkPassword',['../classQXmppPasswordChecker.html#a62ba10636417e503f936560f4f2910a8',1,'QXmppPasswordChecker']]], ['client',['client',['../classQXmppClientExtension.html#a2476cb1a20963d15d45d39f24a0c1198',1,'QXmppClientExtension']]], ['clientcapabilitiesnode',['clientCapabilitiesNode',['../classQXmppDiscoveryManager.html#ae2d3ef8859f13eac90ffa0d413585aa7',1,'QXmppDiscoveryManager']]], ['clientcategory',['clientCategory',['../classQXmppDiscoveryManager.html#a9c75d379114e62fcd329c8ae725c636b',1,'QXmppDiscoveryManager']]], ['clientconnected',['clientConnected',['../classQXmppServer.html#a8bfdd55f8e3769caf65b458d36467a99',1,'QXmppServer']]], ['clientdisconnected',['clientDisconnected',['../classQXmppServer.html#a378cea7ca6ab1bda5e1d5182010557f0',1,'QXmppServer']]], ['clientinfoform',['clientInfoForm',['../classQXmppDiscoveryManager.html#a4cdb1648895f23878acdc8ef7684f6ad',1,'QXmppDiscoveryManager']]], ['clientname',['clientName',['../classQXmppDiscoveryManager.html#af49b9abb7f8704c0d79fd0ef7d0360fe',1,'QXmppDiscoveryManager::clientName()'],['../classQXmppVersionManager.html#a7c1398fd97ef8aed42d4f4304c8924fa',1,'QXmppVersionManager::clientName()']]], ['clientos',['clientOs',['../classQXmppVersionManager.html#a8e03cdf2737c1e1eed51ad739ca6d179',1,'QXmppVersionManager']]], ['clientpresence',['clientPresence',['../classQXmppClient.html#a2f7f555d11d5c45772d31d66834d7610',1,'QXmppClient']]], ['clienttype',['clientType',['../classQXmppDiscoveryManager.html#a5f56394fc3ad6d21624291907af15017',1,'QXmppDiscoveryManager']]], ['clientvcard',['clientVCard',['../classQXmppVCardManager.html#a425d7a9da51c2ecc55bed35c425f612f',1,'QXmppVCardManager']]], ['clientvcardreceived',['clientVCardReceived',['../classQXmppVCardManager.html#af98ad32a12efdae22c27add715a826c8',1,'QXmppVCardManager']]], ['clientversion',['clientVersion',['../classQXmppVersionManager.html#aebb3df968e68ca78ba8b487d88becc87',1,'QXmppVersionManager']]], ['clockrate',['clockrate',['../classQXmppJinglePayloadType.html#ac6f8856d83334360d8766b473dba301a',1,'QXmppJinglePayloadType']]], ['close',['close',['../classQXmppRtpAudioChannel.html#a6a767d53335f777cb3fceb924b4b32de',1,'QXmppRtpAudioChannel::close()'],['../classQXmppRtpVideoChannel.html#ad89cde8a1e04f4327639f12a64ac25d4',1,'QXmppRtpVideoChannel::close()'],['../classQXmppIceComponent.html#a36435fa0ef3b19f2b18b1cf549992732',1,'QXmppIceComponent::close()'],['../classQXmppIceConnection.html#a8afca28f57aa276b618444e96331a2be',1,'QXmppIceConnection::close()'],['../classQXmppServer.html#a5b12956133786ce383ac2ae0716821be',1,'QXmppServer::close()']]], ['command',['command',['../classQXmppDialback.html#a7e771c31a7ba8c44fdd3e078f3b69521',1,'QXmppDialback::command() const '],['../classQXmppDialback.html#a0448107c56f892056f359013b80798bc',1,'QXmppDialback::Command()']]], ['component',['component',['../classQXmppJingleCandidate.html#a869b34fdeba74466e2cfdd69d31c5443',1,'QXmppJingleCandidate::component()'],['../classQXmppIceComponent.html#acecc3027c345fe1bfc1247107101aeab',1,'QXmppIceComponent::component()'],['../classQXmppIceConnection.html#ab75e321610c39ddc9aec5b20f36b5c8c',1,'QXmppIceConnection::component()']]], ['composing',['Composing',['../classQXmppMessage.html#aeaa3cc5ccb7d451067a80dd1f3c7099aa7804ac6c0c6848221acb67b9de0371d3',1,'QXmppMessage']]], ['conferences',['conferences',['../classQXmppBookmarkSet.html#a304e9a8e652b311853d66834a8fce6a8',1,'QXmppBookmarkSet']]], ['configuration',['configuration',['../classQXmppClient.html#a1cd44e6c54b54be4bf50cf3559786476',1,'QXmppClient::configuration()'],['../classQXmppOutgoingClient.html#a47676ce355fc5253af9a79c596a95431',1,'QXmppOutgoingClient::configuration()']]], ['configurationaction',['ConfigurationAction',['../classQXmppMucRoom.html#acd3129293f69d7e7cdd91b65aae0606fa4c1b38531dcf4fa97e1441e8334c9d13',1,'QXmppMucRoom']]], ['configurationreceived',['configurationReceived',['../classQXmppMucRoom.html#a18623535386c94ab211e6868ed5c34f4',1,'QXmppMucRoom']]], ['connected',['connected',['../classQXmppStream.html#a50332c00371295df6c3b69268f588bc9',1,'QXmppStream::connected()'],['../classQXmppIceComponent.html#ac347ba395ccef793416c11be55b05631',1,'QXmppIceComponent::connected()'],['../classQXmppIceConnection.html#ae6aa4cce6395cbac3af9ad8f62d92384',1,'QXmppIceConnection::connected()'],['../classQXmppCall.html#a384d69cd1bea31bbfaa8df9c3e99d478',1,'QXmppCall::connected()'],['../classQXmppClient.html#a46e84c5280564cdc2d60307309f97b92',1,'QXmppClient::connected()']]], ['connectedstate',['ConnectedState',['../classQXmppClient.html#a5f4e70d508c08967f72fd41c5343ad2eae603afad2343f7682b39b90d3d845cf7',1,'QXmppClient']]], ['connectingstate',['ConnectingState',['../classQXmppCall.html#a90205b5034613127d2c4adc6a0252759ad7e30b8eff38aab65d8fedb68d9436fd',1,'QXmppCall::ConnectingState()'],['../classQXmppClient.html#a5f4e70d508c08967f72fd41c5343ad2eac25719267a60fc7b0ef8ecc35fa439f7',1,'QXmppClient::ConnectingState()']]], ['connecttohost',['connectToHost',['../classQXmppIceComponent.html#a6bd508a2732ad9a21027e051a66f80ee',1,'QXmppIceComponent::connectToHost()'],['../classQXmppIceConnection.html#a1280f5ba6da8a652fb081a71bcfbe26a',1,'QXmppIceConnection::connectToHost()'],['../classQXmppOutgoingClient.html#aa04ec31dfe99c5c3121722c5a7ef3071',1,'QXmppOutgoingClient::connectToHost()'],['../classQXmppOutgoingServer.html#a0d24f0f0a5b9cb363658c91644977cd7',1,'QXmppOutgoingServer::connectToHost()']]], ['connecttoserver',['connectToServer',['../classQXmppClient.html#afebe3b0955b81c6dd0e738db328cf06b',1,'QXmppClient::connectToServer(const QXmppConfiguration &, const QXmppPresence &initialPresence=QXmppPresence())'],['../classQXmppClient.html#a06cf985c0cb91ea9341c0558c01de5b4',1,'QXmppClient::connectToServer(const QString &jid, const QString &password)']]], ['content',['content',['../classQXmppJingleIq.html#a19249357c437ca81e6d39e0434fcd90f',1,'QXmppJingleIq::content()'],['../classQXmppJingleIq.html#a118078aae1f72067abbc9096ac59d1ab',1,'QXmppJingleIq::content() const ']]], ['contents',['contents',['../classQXmppPubSubItem.html#a6079e555c862437a727647409a7912e4',1,'QXmppPubSubItem']]], ['core',['Core',['../group__Core.html',1,'']]], ['count',['count',['../classQXmppResultSetReply.html#aa6d8a4102269973ddd6d341b29d2ca12',1,'QXmppResultSetReply']]], ['country',['country',['../classQXmppVCardAddress.html#ac55d402e158179fd016faf933714895c',1,'QXmppVCardAddress']]], ['create',['create',['../classQXmppServerPlugin.html#a5802a49843d86e341c7be21662b2c09e',1,'QXmppServerPlugin']]], ['csrc',['csrc',['../classQXmppRtpPacket.html#a10fb838efa95f0d2e42ca04a3d06ca1f',1,'QXmppRtpPacket']]] ]; qxmpp-0.7.6/doc/html/search/enums_71.js0000644000175000007640000000020612116723632017564 0ustar sharkyjerrywebvar searchData= [ ['querytype',['QueryType',['../classQXmppPubSubIq.html#aeadecfdbdb64593cc7a27cbe9def8359',1,'QXmppPubSubIq']]] ]; qxmpp-0.7.6/doc/html/search/enumvalues_65.html0000644000175000007640000000171312116723632021160 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/enums_63.js0000644000175000007640000000020212116723632017561 0ustar sharkyjerrywebvar searchData= [ ['command',['Command',['../classQXmppDialback.html#a0448107c56f892056f359013b80798bc',1,'QXmppDialback']]] ]; qxmpp-0.7.6/doc/html/search/all_6c.js0000644000175000007640000001022412116723632017267 0ustar sharkyjerrywebvar searchData= [ ['label',['label',['../classQXmppDataForm_1_1Field.html#a14a29b5a11b788f6c32e7cf82353227e',1,'QXmppDataForm::Field']]], ['lang',['lang',['../classQXmppStanza.html#a64885f190ef9c8011449166bc45d19fd',1,'QXmppStanza']]], ['last',['last',['../classQXmppResultSetReply.html#adadca3c4da4ebb51962c07f5749b9cc5',1,'QXmppResultSetReply']]], ['lastname',['lastName',['../classQXmppVCardIq.html#a978b6176f42581f00c46e114b82fda5d',1,'QXmppVCardIq']]], ['leave',['leave',['../classQXmppMucRoom.html#aba377174fd4869c9d38952d71aa9297b',1,'QXmppMucRoom']]], ['left',['left',['../classQXmppMucRoom.html#a7c2f39104f9334ac0c6c188fe2f7afbb',1,'QXmppMucRoom']]], ['listcollections',['listCollections',['../classQXmppArchiveManager.html#a5ed9d433935d9de527d84e496d7d1a2e',1,'QXmppArchiveManager::listCollections(const QString &jid, const QDateTime &start=QDateTime(), const QDateTime &end=QDateTime(), const QXmppResultSetQuery &rsm=QXmppResultSetQuery())'],['../classQXmppArchiveManager.html#afe477914f6de06c8c0d8b6ccea4fa6c8',1,'QXmppArchiveManager::listCollections(const QString &jid, const QDateTime &start, const QDateTime &end, int max)']]], ['listenforclients',['listenForClients',['../classQXmppServer.html#a36250e897e5298bc5f6b6b8da5091ca1',1,'QXmppServer']]], ['listenforservers',['listenForServers',['../classQXmppServer.html#a61e648860918bfaa1db8c8aa81769e5c',1,'QXmppServer']]], ['localcandidates',['localCandidates',['../classQXmppIceComponent.html#aacddb07e704ea4e9747f75d032c598b7',1,'QXmppIceComponent::localCandidates()'],['../classQXmppIceConnection.html#aa76fbb979d0d4c9111a3a982e3bf1c13',1,'QXmppIceConnection::localCandidates()']]], ['localcandidateschanged',['localCandidatesChanged',['../classQXmppIceComponent.html#a5e75654feb10b83aec884885380e20b3',1,'QXmppIceComponent::localCandidatesChanged()'],['../classQXmppIceConnection.html#a20fa09218e384f8c115e3ed6b5d179d4',1,'QXmppIceConnection::localCandidatesChanged()']]], ['localfileurl',['localFileUrl',['../classQXmppTransferJob.html#aba043a492dc36a027323afd921c1fa29',1,'QXmppTransferJob']]], ['localfileurlchanged',['localFileUrlChanged',['../classQXmppTransferJob.html#a8fe62c0eb22925eb3ecf4703b737ea59',1,'QXmppTransferJob']]], ['locality',['locality',['../classQXmppVCardAddress.html#a69a22e7cd9c1d079b854fc30187cc683',1,'QXmppVCardAddress']]], ['localpassword',['localPassword',['../classQXmppIceConnection.html#a03c21fbebd65403414b28b331bea8f24',1,'QXmppIceConnection']]], ['localstreamid',['localStreamId',['../classQXmppIncomingServer.html#a42bfd624b87e599c4139a08a6e25bf7c',1,'QXmppIncomingServer']]], ['localstreamkey',['localStreamKey',['../classQXmppOutgoingServer.html#a6f58821f193eb048cd1c4ff188c92925',1,'QXmppOutgoingServer']]], ['localuser',['localUser',['../classQXmppIceConnection.html#aa02512f5c19bfc6514b9bf20698943ad',1,'QXmppIceConnection']]], ['log',['log',['../classQXmppLogger.html#a2e5e503ecd4400477f47dec915ac4e89',1,'QXmppLogger']]], ['logfilepath',['logFilePath',['../classQXmppLogger.html#a1be30b0f1390d14cb6d8535d4898a703',1,'QXmppLogger']]], ['logger',['logger',['../classQXmppClient.html#ae5fca0867efe7e7fcae90cbbf10b8193',1,'QXmppClient::logger()'],['../classQXmppServer.html#a0fa9d97d5be1f6429b35154c7621bd24',1,'QXmppServer::logger()']]], ['loggerchanged',['loggerChanged',['../classQXmppClient.html#a74a8754f3e14945e597d964442281e70',1,'QXmppClient::loggerChanged()'],['../classQXmppServer.html#af49a15f76003d1e3b2ff280f55e1ca54',1,'QXmppServer::loggerChanged()']]], ['loggingtype',['LoggingType',['../classQXmppLogger.html#a9a52fe426322ef8e10e05b7092be6c20',1,'QXmppLogger::LoggingType()'],['../classQXmppLogger.html#a896f3347ee0c517db3404e07c6853187',1,'QXmppLogger::loggingType()']]], ['logmessage',['logMessage',['../classQXmppLoggable.html#a403fa46ba15c65da706e8188d4312a05',1,'QXmppLoggable::logMessage()'],['../classQXmppRtpAudioChannel.html#a56e695ad1815f25c70dbef6b7310007b',1,'QXmppRtpAudioChannel::logMessage()']]], ['logreceived',['logReceived',['../classQXmppLoggable.html#afcb384597aa4cdee1dad7d2ec50871f4',1,'QXmppLoggable']]], ['logsent',['logSent',['../classQXmppLoggable.html#a50feb6fc691e90ba6b2e69c2a9aea794',1,'QXmppLoggable']]] ]; qxmpp-0.7.6/doc/html/search/all_64.html0000644000175000007640000000170412116723632017543 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/all_73.js0000644000175000007640000012257312116723632017223 0ustar sharkyjerrywebvar searchData= [ ['saslauthmechanism',['saslAuthMechanism',['../classQXmppConfiguration.html#a035bb265fcee01b05071d016693247d7',1,'QXmppConfiguration']]], ['seek',['seek',['../classQXmppRtpAudioChannel.html#ab50b3240e2226da585be3a63c0145b7a',1,'QXmppRtpAudioChannel']]], ['senddata',['sendData',['../classQXmppStream.html#a7920b8a42c3755dda87e02dbe5e9e626',1,'QXmppStream']]], ['senddatagram',['sendDatagram',['../classQXmppRtpAudioChannel.html#ac02d15c55ff0d6e5b6119d5aa104d035',1,'QXmppRtpAudioChannel::sendDatagram()'],['../classQXmppRtpVideoChannel.html#a8df16b8ad5a32f74e40aa6261f09b5e0',1,'QXmppRtpVideoChannel::sendDatagram()'],['../classQXmppIceComponent.html#a13a9f295fdcc5d2b912382054ad627cf',1,'QXmppIceComponent::sendDatagram()']]], ['sendelement',['sendElement',['../classQXmppServer.html#a8bfcf9c3734844281ee5581cae350feb',1,'QXmppServer']]], ['sendfile',['sendFile',['../classQXmppTransferManager.html#a34228d973a450f716ad8216ce6347f67',1,'QXmppTransferManager::sendFile(const QString &jid, const QString &filePath, const QString &description=QString())'],['../classQXmppTransferManager.html#a9e08182cdd6f2df3c2d3c19bb9660d24',1,'QXmppTransferManager::sendFile(const QString &jid, QIODevice *device, const QXmppTransferFileInfo &fileInfo, const QString &sid=QString())']]], ['sendinvitation',['sendInvitation',['../classQXmppMucRoom.html#a94fbb2e103f48b5cc17661d25f47122e',1,'QXmppMucRoom']]], ['sendmessage',['sendMessage',['../classQXmppClient.html#a44d230e24954da4a05e661318494fce4',1,'QXmppClient::sendMessage()'],['../classQXmppMucRoom.html#a7a3ead69818cc6b2c8536384528dbada',1,'QXmppMucRoom::sendMessage()']]], ['sendpacket',['sendPacket',['../classQXmppStream.html#a47473db930db0242bb2f6289172b6ea8',1,'QXmppStream::sendPacket()'],['../classQXmppClient.html#a28fb16fe7c83b134e46fea795bfffc35',1,'QXmppClient::sendPacket()'],['../classQXmppServer.html#a7617374585f26e9a4b5c878cc81415d8',1,'QXmppServer::sendPacket()']]], ['sentmessage',['SentMessage',['../classQXmppLogger.html#a932dbbd4f70a1e9c0ff8f452e61fc9b8ad1c7d954320b318802468a0655e81b42',1,'QXmppLogger']]], ['sequence',['sequence',['../classQXmppRtpPacket.html#a42375a7e8a10d35c721755762f2c2516',1,'QXmppRtpPacket']]], ['server',['server',['../classQXmppServerExtension.html#a56847ef0def13090d91cd6f6bded0aed',1,'QXmppServerExtension']]], ['serverreflexivetype',['ServerReflexiveType',['../classQXmppJingleCandidate.html#a6314b3ed7de59b68131db6ffab55fe7dadd47f88f0d90666a9b5768c70e407c7f',1,'QXmppJingleCandidate']]], ['set',['Set',['../classQXmppIq.html#a6bc7a0505a3be7309051ae2432a3d826a3dc74d347c7b00a2a1cd3b02b4cfd7b0',1,'QXmppIq']]], ['setaction',['setAction',['../classQXmppJingleIq.html#a7d3868e6bdc1b042f470a9ad795a811c',1,'QXmppJingleIq']]], ['setactor',['setActor',['../classQXmppMucItem.html#a69f1abfed056c472a0e8539935328573',1,'QXmppMucItem']]], ['setaddress',['setAddress',['../classQXmppVCardEmail.html#a2327c4730f9dd6b70b50bafe60791cf3',1,'QXmppVCardEmail']]], ['setaddresses',['setAddresses',['../classQXmppVCardIq.html#ae3713bdf98cc50faca4cf969dc74b6d9',1,'QXmppVCardIq']]], ['setaffiliation',['setAffiliation',['../classQXmppMucItem.html#ab1b1b9093c3bca933bd073a5ad9a4636',1,'QXmppMucItem']]], ['setafter',['setAfter',['../classQXmppResultSetQuery.html#afd191318185f5d433140c969606cb7d3',1,'QXmppResultSetQuery']]], ['setarguments',['setArguments',['../classQXmppRpcInvokeIq.html#aea362ae92bbd8a29645751ffb5452d20',1,'QXmppRpcInvokeIq']]], ['setattentionrequested',['setAttentionRequested',['../classQXmppMessage.html#ad31b0fbbb7dd26ba8c6528a5d93a8a85',1,'QXmppMessage']]], ['setautoacceptsubscriptions',['setAutoAcceptSubscriptions',['../classQXmppConfiguration.html#ab3702f9b38d6e97338f27e2d94089ce4',1,'QXmppConfiguration']]], ['setautojoin',['setAutoJoin',['../classQXmppBookmarkConference.html#a9d25893b39d5154b555b90d5ad7e2be2',1,'QXmppBookmarkConference']]], ['setautoreconnectionenabled',['setAutoReconnectionEnabled',['../classQXmppConfiguration.html#af1b4829231216e457803e46e784c25ba',1,'QXmppConfiguration']]], ['setavailablestatustype',['setAvailableStatusType',['../classQXmppPresence.html#aa07f9ccf497458999c4d2437d4300bbd',1,'QXmppPresence']]], ['setbarejid',['setBareJid',['../classQXmppRosterIq_1_1Item.html#ac58d9f728ffc0a357b9dff093890de11',1,'QXmppRosterIq::Item']]], ['setbefore',['setBefore',['../classQXmppResultSetQuery.html#a64536c4c74757afb224f8f875776550a',1,'QXmppResultSetQuery']]], ['setbirthday',['setBirthday',['../classQXmppVCardIq.html#ac7e4d0035d340b433af3bf4a84b81d04',1,'QXmppVCardIq']]], ['setbody',['setBody',['../classQXmppArchiveMessage.html#a1e69a102502f866a3fb09d1ba2a932ef',1,'QXmppArchiveMessage::setBody()'],['../classQXmppMessage.html#adfc1b70b910079c76c93ba472fc4e9e7',1,'QXmppMessage::setBody()']]], ['setbookmarks',['setBookmarks',['../classQXmppBookmarkManager.html#ac08a572f1426c49e565bf5cd96afee12',1,'QXmppBookmarkManager']]], ['setcacertificates',['setCaCertificates',['../classQXmppConfiguration.html#abe15b8d3dc480dfe30242fa0648feb6a',1,'QXmppConfiguration']]], ['setcapabilityhash',['setCapabilityHash',['../classQXmppPresence.html#a4a8355d4ce1f84a97fdb098d7856829a',1,'QXmppPresence']]], ['setcapabilitynode',['setCapabilityNode',['../classQXmppPresence.html#a087a58383725086449c9b7d8a428d4be',1,'QXmppPresence']]], ['setcapabilityver',['setCapabilityVer',['../classQXmppPresence.html#ab6434834049a20ef0711263adfd3686d',1,'QXmppPresence']]], ['setchannels',['setChannels',['../classQXmppJinglePayloadType.html#aae85a93d980283519b526b6078c7d7ba',1,'QXmppJinglePayloadType']]], ['setchat',['setChat',['../classQXmppArchiveChatIq.html#a813de01a9d74c7d05bd2cfdc094689d2',1,'QXmppArchiveChatIq']]], ['setchats',['setChats',['../classQXmppArchiveListIq.html#ae952398e8b3f23c0f25f46c68a8f3c00',1,'QXmppArchiveListIq']]], ['setclient',['setClient',['../classQXmppClientExtension.html#a166f42a22447341abb26bd9c44c97590',1,'QXmppClientExtension']]], ['setclientcapabilitiesnode',['setClientCapabilitiesNode',['../classQXmppDiscoveryManager.html#a1c2405c6d1090a770af99336b87298a0',1,'QXmppDiscoveryManager']]], ['setclientcategory',['setClientCategory',['../classQXmppDiscoveryManager.html#a032ece84805598d51018724ac033e2ea',1,'QXmppDiscoveryManager']]], ['setclientinfoform',['setClientInfoForm',['../classQXmppDiscoveryManager.html#a7d68dd342b658ebf09921889f9d345fe',1,'QXmppDiscoveryManager']]], ['setclientname',['setClientName',['../classQXmppDiscoveryManager.html#abde090985f4963ef2f113a7a9b1330b3',1,'QXmppDiscoveryManager::setClientName()'],['../classQXmppVersionManager.html#a3ff80230bbf8b1eff98e4cc3bf96cccf',1,'QXmppVersionManager::setClientName()']]], ['setclientos',['setClientOs',['../classQXmppVersionManager.html#ade1da8db8747b949e03077c612dda6fe',1,'QXmppVersionManager']]], ['setclientpresence',['setClientPresence',['../classQXmppClient.html#ad47d8d9bd5e44dd2566ff0d726b1e71b',1,'QXmppClient']]], ['setclienttype',['setClientType',['../classQXmppDiscoveryManager.html#abdb3cf2844cec7c864fe855fa86af5b1',1,'QXmppDiscoveryManager']]], ['setclientvcard',['setClientVCard',['../classQXmppVCardManager.html#a72cce6a88629d3a04996a3b4d9d420f5',1,'QXmppVCardManager']]], ['setclientversion',['setClientVersion',['../classQXmppVersionManager.html#a1fc93184ad42a74d205dc3d93cc084ae',1,'QXmppVersionManager']]], ['setclockrate',['setClockrate',['../classQXmppJinglePayloadType.html#a25d8fa0e0a23e70e72b544f7cd073da6',1,'QXmppJinglePayloadType']]], ['setcommand',['setCommand',['../classQXmppDialback.html#a8b3ac2f6733dc576ca2295d4017f1038',1,'QXmppDialback']]], ['setcomponent',['setComponent',['../classQXmppJingleCandidate.html#a7b22b0429af93096540abca2f5e2eb60',1,'QXmppJingleCandidate::setComponent()'],['../classQXmppIceComponent.html#a5fb86a2ff46687f40dc8db07ef4e6951',1,'QXmppIceComponent::setComponent()']]], ['setconferences',['setConferences',['../classQXmppBookmarkSet.html#a8486913b3825114b7ce31f313871fa81',1,'QXmppBookmarkSet']]], ['setconfiguration',['setConfiguration',['../classQXmppMucRoom.html#a15377792c8bec23191b34a6759c330ab',1,'QXmppMucRoom']]], ['setcontents',['setContents',['../classQXmppPubSubItem.html#a649ac84705dd748c05d4a436010c6f36',1,'QXmppPubSubItem']]], ['setcount',['setCount',['../classQXmppResultSetReply.html#aef59cae40af4bd2d8c00c3bb47cba141',1,'QXmppResultSetReply']]], ['setcountry',['setCountry',['../classQXmppVCardAddress.html#afbc08b88acc28250cbfc582e4cd0a055',1,'QXmppVCardAddress']]], ['setdate',['setDate',['../classQXmppArchiveMessage.html#aa459ddea8ffa849b8e408625e6f456a8',1,'QXmppArchiveMessage']]], ['setdelivered',['setDelivered',['../classQXmppExtendedAddress.html#a266a1331b7f8e88c2d9e209b85bea406',1,'QXmppExtendedAddress']]], ['setdescription',['setDescription',['../classQXmppDataForm_1_1Field.html#acc1ea1b44c059ab10e87f0ae147fca18',1,'QXmppDataForm::Field::setDescription()'],['../classQXmppExtendedAddress.html#a7c682ca662541d0c3179b861a504b651',1,'QXmppExtendedAddress::setDescription()'],['../classQXmppVCardIq.html#aa0f96a1f59c31cf067852854c8275d1e',1,'QXmppVCardIq::setDescription()']]], ['setdigest',['setDigest',['../classQXmppPasswordReply.html#a523c595ac1c6f1a006cec1bb184b6050',1,'QXmppPasswordReply']]], ['setdomain',['setDomain',['../classQXmppConfiguration.html#a716050cec0aa3fc11e6f4fbfb1e6d4a1',1,'QXmppConfiguration::setDomain()'],['../classQXmppPasswordRequest.html#a576c39a66597ea614abbb1639b2f6c73',1,'QXmppPasswordRequest::setDomain()'],['../classQXmppServer.html#aa0eeb8f1680923e70492596cb4f7e02a',1,'QXmppServer::setDomain()']]], ['setemail',['setEmail',['../classQXmppRegisterIq.html#ac8090c4a546b8f352441f0e1dec5da3a',1,'QXmppRegisterIq::setEmail()'],['../classQXmppVCardIq.html#abc7c73030e09607ce9cae339ceef73d0',1,'QXmppVCardIq::setEmail()']]], ['setemails',['setEmails',['../classQXmppVCardIq.html#aeeaf5226fc110157e80b51e6833f5a35',1,'QXmppVCardIq']]], ['setencoderformat',['setEncoderFormat',['../classQXmppRtpVideoChannel.html#a8d56343eca3dece825496e11d32ea470',1,'QXmppRtpVideoChannel']]], ['setend',['setEnd',['../classQXmppArchiveListIq.html#af3392d03c60aef8eb5563c503d3a0a83',1,'QXmppArchiveListIq::setEnd()'],['../classQXmppArchiveRemoveIq.html#a7d5ebc04183d98ffbe96a6b6009d8960',1,'QXmppArchiveRemoveIq::setEnd()']]], ['seterror',['setError',['../classQXmppStanza.html#a59cd978cb7dd23671cb679be53c4bd4b',1,'QXmppStanza::setError()'],['../classQXmppPasswordReply.html#aa44e00eacb445af75c46129d63c6234b',1,'QXmppPasswordReply::setError()']]], ['setextendedaddresses',['setExtendedAddresses',['../classQXmppStanza.html#a94da36b60b79a77836d0707b97d0ad96',1,'QXmppStanza']]], ['setextensions',['setExtensions',['../classQXmppStanza.html#accbc3c11a988b9e3a69fa099fcf9f5fb',1,'QXmppStanza']]], ['setfacebookaccesstoken',['setFacebookAccessToken',['../classQXmppConfiguration.html#af1c8f373cd71d6b3287a6d970dfb7ad4',1,'QXmppConfiguration']]], ['setfacebookappid',['setFacebookAppId',['../classQXmppConfiguration.html#a881fe44df96b52653c81823c55fb46cd',1,'QXmppConfiguration']]], ['setfaultcode',['setFaultCode',['../classQXmppRpcResponseIq.html#a64352b119ec3da44c44542d6c58548c1',1,'QXmppRpcResponseIq']]], ['setfaultstring',['setFaultString',['../classQXmppRpcResponseIq.html#a6c14545d9bcbb4f610a5c0f049bd9e5c',1,'QXmppRpcResponseIq']]], ['setfields',['setFields',['../classQXmppDataForm.html#ac907784586541e0a79dd8d966e955f0f',1,'QXmppDataForm']]], ['setfirst',['setFirst',['../classQXmppResultSetReply.html#a9647171b550730775471d9207cfedef4',1,'QXmppResultSetReply']]], ['setfirstname',['setFirstName',['../classQXmppVCardIq.html#a98b1ee2bf954f929777928791f7a53fe',1,'QXmppVCardIq']]], ['setform',['setForm',['../classQXmppMucOwnerIq.html#a02712467d300d6aad4213ddd7bff1bf2',1,'QXmppMucOwnerIq::setForm()'],['../classQXmppRegisterIq.html#a09109b5a089b53f5a4930536a1f22ca1',1,'QXmppRegisterIq::setForm()']]], ['setfoundation',['setFoundation',['../classQXmppJingleCandidate.html#aba966a89d765a54fbe15a453074c5bcd',1,'QXmppJingleCandidate']]], ['setfrom',['setFrom',['../classQXmppStanza.html#a320ae1faad87e443277a36260cefb85a',1,'QXmppStanza']]], ['setfullname',['setFullName',['../classQXmppVCardIq.html#a3f72cb68b4c2dc1120a3803d75b01b62',1,'QXmppVCardIq']]], ['setgauge',['setGauge',['../classQXmppLogger.html#a0bc6992a5e1c9f418dfe1d249ed58dd9',1,'QXmppLogger::setGauge()'],['../classQXmppLoggable.html#abed04f600f4625f0d4a32f214c718865',1,'QXmppLoggable::setGauge()']]], ['setgoogleaccesstoken',['setGoogleAccessToken',['../classQXmppConfiguration.html#aee1c3f1bf751868454c9975fc6bf7d2f',1,'QXmppConfiguration']]], ['setgroups',['setGroups',['../classQXmppRosterIq_1_1Item.html#ade2430a52808649b51ed9c6b554cf77a',1,'QXmppRosterIq::Item']]], ['setheight',['setHeight',['../classQXmppDataForm_1_1Media.html#a758f505d607571860dc90aa9d006caba',1,'QXmppDataForm::Media']]], ['sethost',['setHost',['../classQXmppJingleCandidate.html#a89f496aa65b0610af6c86c44120582aa',1,'QXmppJingleCandidate::setHost()'],['../classQXmppConfiguration.html#a97320e5239f46770edcd457301b41809',1,'QXmppConfiguration::setHost()']]], ['seticecontrolling',['setIceControlling',['../classQXmppIceComponent.html#a679e8e78807464df76feed30495b7fe7',1,'QXmppIceComponent::setIceControlling()'],['../classQXmppIceConnection.html#a27972dd93469a303586e22cd4709b84e',1,'QXmppIceConnection::setIceControlling()']]], ['setid',['setId',['../classQXmppJinglePayloadType.html#a54a81639dc575b99cf4a42a24b7de65b',1,'QXmppJinglePayloadType::setId()'],['../classQXmppJingleCandidate.html#a1b92b6622dde36f6d8ad3f63138aba63',1,'QXmppJingleCandidate::setId()'],['../classQXmppPubSubItem.html#a0e3419b22bd11e146d99447c948e7014',1,'QXmppPubSubItem::setId()'],['../classQXmppStanza.html#aee06ffcdc8c7b7d67b2da536640e188d',1,'QXmppStanza::setId()']]], ['setignoresslerrors',['setIgnoreSslErrors',['../classQXmppConfiguration.html#af6075135d8735c7c6b95d7538a2c7245',1,'QXmppConfiguration']]], ['setinactivitytimeout',['setInactivityTimeout',['../classQXmppIncomingClient.html#ac2dc764e675d481d5afbe6e612765633',1,'QXmppIncomingClient']]], ['setindex',['setIndex',['../classQXmppResultSetQuery.html#ac275493d614371bb3598c20700e21e67',1,'QXmppResultSetQuery::setIndex()'],['../classQXmppResultSetReply.html#afc3b583f74e8a41ab69b1ce0369d3807',1,'QXmppResultSetReply::setIndex()']]], ['setinitiator',['setInitiator',['../classQXmppJingleIq.html#ae2ff3ea68609d6bcd79c41e0e6351730',1,'QXmppJingleIq']]], ['setinstructions',['setInstructions',['../classQXmppDataForm.html#a86b49fc4668777e80c523c8bbea29af0',1,'QXmppDataForm::setInstructions()'],['../classQXmppRegisterIq.html#aaa2834d557e5b85a0c8b6f2f2e4edbbd',1,'QXmppRegisterIq::setInstructions()']]], ['setitems',['setItems',['../classQXmppMucAdminIq.html#a842d537a6cf06b01d26b200eae70c43d',1,'QXmppMucAdminIq::setItems()'],['../classQXmppPubSubIq.html#af8e713430dbba5da0ca5448fada723ce',1,'QXmppPubSubIq::setItems()']]], ['setjid',['setJid',['../classQXmppBindIq.html#acac65e047ba7c879b43dcd912dfc276b',1,'QXmppBindIq::setJid()'],['../classQXmppBookmarkConference.html#a2ced3c41b583ff5136a9d818c0d586b5',1,'QXmppBookmarkConference::setJid()'],['../classQXmppMucItem.html#a0c2cc3987d51a7d5fad68569c686af59',1,'QXmppMucItem::setJid()'],['../classQXmppExtendedAddress.html#a1c865f1898369cf85b54c06e4e189fac',1,'QXmppExtendedAddress::setJid()'],['../classQXmppConfiguration.html#a26c876dbe4b4adb39497ecbab5793bd6',1,'QXmppConfiguration::setJid()']]], ['setkeepaliveinterval',['setKeepAliveInterval',['../classQXmppConfiguration.html#a6d47839bca9fbcebb1fe3ce2f5fce6fd',1,'QXmppConfiguration']]], ['setkeepalivetimeout',['setKeepAliveTimeout',['../classQXmppConfiguration.html#acd5867aea24580d8aa0647750a420020',1,'QXmppConfiguration']]], ['setkey',['setKey',['../classQXmppDataForm_1_1Field.html#a4ab9994979e765bbd65d4463d7910b6e',1,'QXmppDataForm::Field::setKey()'],['../classQXmppDialback.html#a91a464ea608a5924340593a075b9352a',1,'QXmppDialback::setKey()']]], ['setlabel',['setLabel',['../classQXmppDataForm_1_1Field.html#aee48675b341d4a4b990f146434ff2eeb',1,'QXmppDataForm::Field']]], ['setlang',['setLang',['../classQXmppStanza.html#a16c60bf49fe9bdf3c74f4d99b05ddee2',1,'QXmppStanza']]], ['setlast',['setLast',['../classQXmppResultSetReply.html#af273dcb1a8b079f3512afec88f355c57',1,'QXmppResultSetReply']]], ['setlastname',['setLastName',['../classQXmppVCardIq.html#ae3e28bae362398ad657dfc53a4b04c47',1,'QXmppVCardIq']]], ['setlocalcertificate',['setLocalCertificate',['../classQXmppServer.html#ac8e8e8e321d36d965fbb38fbd7a8fc54',1,'QXmppServer::setLocalCertificate()'],['../classQXmppSslServer.html#a4fba408dbc5cdd0b093867b8da757ac3',1,'QXmppSslServer::setLocalCertificate()']]], ['setlocalfileurl',['setLocalFileUrl',['../classQXmppTransferJob.html#a7f5bf8cfe96d0e8464ac63ff0f2089ae',1,'QXmppTransferJob']]], ['setlocality',['setLocality',['../classQXmppVCardAddress.html#a6374a076568ad2889a6824070a42ff23',1,'QXmppVCardAddress']]], ['setlocalpassword',['setLocalPassword',['../classQXmppIceComponent.html#a93374c2cbe66380376f3e56cb5574243',1,'QXmppIceComponent::setLocalPassword()'],['../classQXmppIceConnection.html#a00eb97dd173d5952796f085dc6ba85f2',1,'QXmppIceConnection::setLocalPassword()']]], ['setlocalstreamkey',['setLocalStreamKey',['../classQXmppOutgoingServer.html#a04c2358e7fb7e1ce716b37ae52364586',1,'QXmppOutgoingServer']]], ['setlocaluser',['setLocalUser',['../classQXmppIceComponent.html#a54e3b9c597142d10f4f05b817a3aec6c',1,'QXmppIceComponent::setLocalUser()'],['../classQXmppIceConnection.html#aa245f34197f786c010fe4c27a7d73a77',1,'QXmppIceConnection::setLocalUser()']]], ['setlogfilepath',['setLogFilePath',['../classQXmppLogger.html#a3a67ae630d032b8bdac039fe0567e178',1,'QXmppLogger']]], ['setlogger',['setLogger',['../classQXmppClient.html#aa799549089f2ecbe9796f53d0f7be6d2',1,'QXmppClient::setLogger()'],['../classQXmppServer.html#a8d9cb8a46f45d52f9332933d6c38862c',1,'QXmppServer::setLogger()']]], ['setloggingtype',['setLoggingType',['../classQXmppLogger.html#a0b60be94fa2f768d3eabcdba8357f15b',1,'QXmppLogger']]], ['setmax',['setMax',['../classQXmppResultSetQuery.html#a6a08ab6a98e8bc46a839efadecac2613',1,'QXmppResultSetQuery']]], ['setmaxptime',['setMaxptime',['../classQXmppJinglePayloadType.html#a78d6fd7ba582123bc1fdd35530bcbc46',1,'QXmppJinglePayloadType']]], ['setmedia',['setMedia',['../classQXmppDataForm_1_1Field.html#a7ef0c3e77b744a44eec006a23491e168',1,'QXmppDataForm::Field']]], ['setmessages',['setMessages',['../classQXmppArchiveChat.html#aff362d598bec87709af80fc98e0cde28',1,'QXmppArchiveChat']]], ['setmessagetypes',['setMessageTypes',['../classQXmppLogger.html#a8be64f1219d725ba66a60c8970e53bb7',1,'QXmppLogger']]], ['setmethod',['setMethod',['../classQXmppRpcInvokeIq.html#a53cbf15b11ed4fb42f6179d005d03f63',1,'QXmppRpcInvokeIq']]], ['setmiddlename',['setMiddleName',['../classQXmppVCardIq.html#aba227d72ed8301ffbe1c7e9a64e068db',1,'QXmppVCardIq']]], ['setmucinvitationjid',['setMucInvitationJid',['../classQXmppMessage.html#a98763b6c98004242c408bd8f82b59bc0',1,'QXmppMessage']]], ['setmucinvitationpassword',['setMucInvitationPassword',['../classQXmppMessage.html#a02a02e3198793939d3504cc68333a042',1,'QXmppMessage']]], ['setmucinvitationreason',['setMucInvitationReason',['../classQXmppMessage.html#ae61cea8e5ec5aa55c109c353a0541d74',1,'QXmppMessage']]], ['setmucitem',['setMucItem',['../classQXmppPresence.html#a39b28a9d2a741f20ead461407cba5696',1,'QXmppPresence']]], ['setmucpassword',['setMucPassword',['../classQXmppPresence.html#a785c649f82e916226af6ff39b18a53ff',1,'QXmppPresence']]], ['setmucstatuscodes',['setMucStatusCodes',['../classQXmppPresence.html#a1a3b34af72d4073c4de1ab83695287d0',1,'QXmppPresence']]], ['setmucsupported',['setMucSupported',['../classQXmppPresence.html#a205b8a74e9c04280c82c29f0e9dcb794',1,'QXmppPresence']]], ['setname',['setName',['../classQXmppBookmarkConference.html#a9e68254ad4f145e735ab3e65e9e7c4e5',1,'QXmppBookmarkConference::setName()'],['../classQXmppBookmarkUrl.html#ae151acb6db6d984b5f145963f6b2ba67',1,'QXmppBookmarkUrl::setName()'],['../classQXmppJinglePayloadType.html#accafc5198b67b5f5069f54f2a941fc1f',1,'QXmppJinglePayloadType::setName()'],['../classQXmppRosterIq_1_1Item.html#a3ec918e6d85d1b318dc769799cdd9d2d',1,'QXmppRosterIq::Item::setName()'],['../classQXmppVersionIq.html#af65b2a5e43a0af8449ed36018147b474',1,'QXmppVersionIq::setName()']]], ['setnetwork',['setNetwork',['../classQXmppJingleCandidate.html#ad31d46f6c78c57a2db0825def8a3c640',1,'QXmppJingleCandidate']]], ['setnetworkproxy',['setNetworkProxy',['../classQXmppConfiguration.html#a57e5382b3283912576e2953742529cb5',1,'QXmppConfiguration']]], ['setnick',['setNick',['../classQXmppMucItem.html#ab454e1b4e6edb28f07c95ffb56df33a2',1,'QXmppMucItem']]], ['setnickname',['setNickName',['../classQXmppBookmarkConference.html#a8e8277024e367af04c433ebe02053346',1,'QXmppBookmarkConference::setNickName()'],['../classQXmppVCardIq.html#aa450262ecf9fd3d196464484add3069f',1,'QXmppVCardIq::setNickName()'],['../classQXmppMucRoom.html#a484129fde79e5ee841757d94d7eed5cc',1,'QXmppMucRoom::setNickName()']]], ['setnonsaslauthmechanism',['setNonSASLAuthMechanism',['../classQXmppConfiguration.html#a9dfd3f8b383c5996ff4906e5d3d62807',1,'QXmppConfiguration']]], ['setnumber',['setNumber',['../classQXmppVCardPhone.html#a4e37dc41300055c0963ec0adedc31ed2',1,'QXmppVCardPhone']]], ['setoptions',['setOptions',['../classQXmppDataForm_1_1Field.html#a08ff329fad506d69af660bfb9e4174fb',1,'QXmppDataForm::Field']]], ['setos',['setOs',['../classQXmppVersionIq.html#a8f6e8a6b8b02b98f99c12dfa8df78023',1,'QXmppVersionIq']]], ['setparameters',['setParameters',['../classQXmppJinglePayloadType.html#a3c17aed60c502b37ada75ed8e7e256e0',1,'QXmppJinglePayloadType']]], ['setpassword',['setPassword',['../classQXmppRegisterIq.html#a3a7bfff24c594b71a5c7d672c14e46fd',1,'QXmppRegisterIq::setPassword()'],['../classQXmppConfiguration.html#ab1deabbad52755bda2d975d5150dbf7a',1,'QXmppConfiguration::setPassword()'],['../classQXmppMucRoom.html#adfb1f258f106805c76bc501e8ea162f6',1,'QXmppMucRoom::setPassword()'],['../classQXmppPasswordRequest.html#a81b68dceb87c75e0dbfe79cdb05dc426',1,'QXmppPasswordRequest::setPassword()'],['../classQXmppPasswordReply.html#a11f9eccc067fc48dd09237499cccb53f',1,'QXmppPasswordReply::setPassword()']]], ['setpasswordchecker',['setPasswordChecker',['../classQXmppIncomingClient.html#a6c2286e741e49b582db08b8ddbffe5cb',1,'QXmppIncomingClient::setPasswordChecker()'],['../classQXmppServer.html#ae797b5932a1fe33d234677deea4bf5ac',1,'QXmppServer::setPasswordChecker()']]], ['setpermissions',['setPermissions',['../classQXmppMucRoom.html#a7bef5394e4cd2af9c57f13fb4c8dadf7',1,'QXmppMucRoom']]], ['setphones',['setPhones',['../classQXmppVCardIq.html#affe69a2e42f9835de86a066b8d2967b8',1,'QXmppVCardIq']]], ['setphoto',['setPhoto',['../classQXmppVCardIq.html#a02fbd4d1b746daf9528ed60a14c586ac',1,'QXmppVCardIq']]], ['setphotohash',['setPhotoHash',['../classQXmppPresence.html#ac1df0dc4749bac5370267a05101c84ca',1,'QXmppPresence']]], ['setphototype',['setPhotoType',['../classQXmppVCardIq.html#ad80c63e75fd3cdd293b3732e3e8f5591',1,'QXmppVCardIq']]], ['setport',['setPort',['../classQXmppJingleCandidate.html#a3dd0a3979c5547beaa5959c24e06bbd0',1,'QXmppJingleCandidate::setPort()'],['../classQXmppConfiguration.html#af6d5a5df2a2100302fef321298bb0d0b',1,'QXmppConfiguration::setPort()']]], ['setpostcode',['setPostcode',['../classQXmppVCardAddress.html#a1e5f200d3eb7a73d736dc8d62ced3a73',1,'QXmppVCardAddress']]], ['setpriority',['setPriority',['../classQXmppJingleCandidate.html#ac6ec59469d6d7c33b90a67873ff19faa',1,'QXmppJingleCandidate::setPriority()'],['../classQXmppPresence.html#ae1d446d357b6cd883c096295be40ddbc',1,'QXmppPresence::setPriority()']]], ['setprivatekey',['setPrivateKey',['../classQXmppServer.html#a37741e9135fbd5b2ed26d5d9d24b2f79',1,'QXmppServer::setPrivateKey()'],['../classQXmppSslServer.html#ab1dfa5bc69ca5f2ea98ad87f586d69cd',1,'QXmppSslServer::setPrivateKey()']]], ['setprotocol',['setProtocol',['../classQXmppJingleCandidate.html#a554314b9bf1f86b58abb1cea409c0a89',1,'QXmppJingleCandidate']]], ['setproxy',['setProxy',['../classQXmppTransferManager.html#ad7d0f0496c85b85b448010d8a3c86d23',1,'QXmppTransferManager']]], ['setproxyonly',['setProxyOnly',['../classQXmppTransferManager.html#a46b2fc83d7773ae755e04a775694b5b8',1,'QXmppTransferManager']]], ['setptime',['setPtime',['../classQXmppJinglePayloadType.html#a55217b43a1ed57ef2fd03f9e9d000870',1,'QXmppJinglePayloadType']]], ['setqueryjid',['setQueryJid',['../classQXmppPubSubIq.html#a3baec6f49cf3be7cbe0aa674fd263a27',1,'QXmppPubSubIq']]], ['setquerynode',['setQueryNode',['../classQXmppPubSubIq.html#a4536330850f2ae8ef384062ee39f158c',1,'QXmppPubSubIq']]], ['setquerytype',['setQueryType',['../classQXmppPubSubIq.html#a67fecb1af8f3cc615abed963d9503752',1,'QXmppPubSubIq']]], ['setreason',['setReason',['../classQXmppMucItem.html#ac4e4bf962ca2b6f5b14126938930434e',1,'QXmppMucItem']]], ['setreceiptid',['setReceiptId',['../classQXmppMessage.html#a104137c6a141edae8da9678fb07429eb',1,'QXmppMessage']]], ['setreceiptrequested',['setReceiptRequested',['../classQXmppMessage.html#a7ea77ae7738907a21a41d4dc3da767a6',1,'QXmppMessage']]], ['setreceived',['setReceived',['../classQXmppArchiveMessage.html#ad50506d533febb834db77813fb234389',1,'QXmppArchiveMessage']]], ['setregion',['setRegion',['../classQXmppVCardAddress.html#a340b6526d2e57843256544a023925238',1,'QXmppVCardAddress']]], ['setremotepassword',['setRemotePassword',['../classQXmppIceComponent.html#a13d7b92269d4af812a19d042d6c1aceb',1,'QXmppIceComponent::setRemotePassword()'],['../classQXmppIceConnection.html#aafcb1ab8fd41cda479adba2f5da000f8',1,'QXmppIceConnection::setRemotePassword()']]], ['setremoteuser',['setRemoteUser',['../classQXmppIceComponent.html#a675c8f43d6d57cbe45e57efb557cd443',1,'QXmppIceComponent::setRemoteUser()'],['../classQXmppIceConnection.html#a57eadc3aad0a3f83eb697fa58612cd83',1,'QXmppIceConnection::setRemoteUser()']]], ['setrequired',['setRequired',['../classQXmppDataForm_1_1Field.html#aa1067cc412a7b39de116283e5bfcab2b',1,'QXmppDataForm::Field']]], ['setresource',['setResource',['../classQXmppBindIq.html#a1b34fadd2b220216e5ab508ca8e9dbe7',1,'QXmppBindIq::setResource()'],['../classQXmppConfiguration.html#a1194a37607906daa26bbefae8e28a43f',1,'QXmppConfiguration::setResource()']]], ['setresponder',['setResponder',['../classQXmppJingleIq.html#a31efd22d113f8adb25d0426781506429',1,'QXmppJingleIq']]], ['setresultsetquery',['setResultSetQuery',['../classQXmppArchiveListIq.html#a9bdad26ec2da6c29cb6346c9cb678724',1,'QXmppArchiveListIq::setResultSetQuery()'],['../classQXmppArchiveRetrieveIq.html#aeafd3008643fc99e7eeda30a44f73d13',1,'QXmppArchiveRetrieveIq::setResultSetQuery()']]], ['setresultsetreply',['setResultSetReply',['../classQXmppArchiveChatIq.html#a2810b51a68988ec4eb2a403acf0a6ebf',1,'QXmppArchiveChatIq::setResultSetReply()'],['../classQXmppArchiveListIq.html#a43670b11c671186e1d7d18fc987341d5',1,'QXmppArchiveListIq::setResultSetReply()']]], ['setringing',['setRinging',['../classQXmppJingleIq.html#a1b7383c7480885a0830b48d115968e27',1,'QXmppJingleIq']]], ['setrole',['setRole',['../classQXmppMucItem.html#aa54c2637d43ad27edfd427db5b8b901d',1,'QXmppMucItem']]], ['setsaslauthmechanism',['setSaslAuthMechanism',['../classQXmppConfiguration.html#a3aec3c957fcb1f4f169499c31dc899d2',1,'QXmppConfiguration']]], ['setsid',['setSid',['../classQXmppJingleIq.html#a129f1b4d2bc61b88ac8f96bf2085cf3f',1,'QXmppJingleIq']]], ['setsocket',['setSocket',['../classQXmppStream.html#a108216277f9a42ef3b252a46caeb5288',1,'QXmppStream']]], ['setsockets',['setSockets',['../classQXmppIceComponent.html#a315d2979cabe2ef7452d5f20da45dd31',1,'QXmppIceComponent']]], ['setstamp',['setStamp',['../classQXmppMessage.html#a9f2a9f5b56fa023f649c372f95fbf1af',1,'QXmppMessage']]], ['setstart',['setStart',['../classQXmppArchiveChat.html#a807add48c951860e7fa791e9b5729b5a',1,'QXmppArchiveChat::setStart()'],['../classQXmppArchiveListIq.html#a8cd1c9ab52c5043bfd046fcd02f5af61',1,'QXmppArchiveListIq::setStart()'],['../classQXmppArchiveRemoveIq.html#ab5b5c3d1a7a4f9b0b26aad50f1112d0c',1,'QXmppArchiveRemoveIq::setStart()'],['../classQXmppArchiveRetrieveIq.html#a9d1ad99cfbff05e309a194bb050290b9',1,'QXmppArchiveRetrieveIq::setStart()']]], ['setstate',['setState',['../classQXmppMessage.html#a3859bd7236f3bc19f908cec612c295d2',1,'QXmppMessage']]], ['setstatustext',['setStatusText',['../classQXmppPresence.html#a3fdeba7a7a1a7905289cbfc6daf8704f',1,'QXmppPresence']]], ['setstreamsecuritymode',['setStreamSecurityMode',['../classQXmppConfiguration.html#a299a81b1f6187b3be2d8bdc063b1f732',1,'QXmppConfiguration']]], ['setstreet',['setStreet',['../classQXmppVCardAddress.html#aae029bf7f502b5997b7120ea7aaf0a44',1,'QXmppVCardAddress']]], ['setstunserver',['setStunServer',['../classQXmppIceComponent.html#a93d01d02d0458597f90e3d3aaea51948',1,'QXmppIceComponent::setStunServer()'],['../classQXmppIceConnection.html#a172ef45ea78d084f495163b1816f0cec',1,'QXmppIceConnection::setStunServer()'],['../classQXmppCallManager.html#aab04548bb154fca0f6a0d619a337c989',1,'QXmppCallManager::setStunServer()']]], ['setsubject',['setSubject',['../classQXmppArchiveChat.html#af672abee71578730bd3f62afd5c8e3e2',1,'QXmppArchiveChat::setSubject()'],['../classQXmppMessage.html#a4b2b4eb5c07495d28c70ebf660bf32fd',1,'QXmppMessage::setSubject()'],['../classQXmppMucRoom.html#adf884eda82895acbdd26ab5918257429',1,'QXmppMucRoom::setSubject()']]], ['setsubscriptionid',['setSubscriptionId',['../classQXmppPubSubIq.html#a0b095ae35bd4f84dafa9f0730d3d1e62',1,'QXmppPubSubIq']]], ['setsubscriptionstatus',['setSubscriptionStatus',['../classQXmppRosterIq_1_1Item.html#af43b7efd16697d56e2e88ffdc5ff2929',1,'QXmppRosterIq::Item']]], ['setsubscriptiontype',['setSubscriptionType',['../classQXmppRosterIq_1_1Item.html#aa9f572853402d0094676e524439b6383',1,'QXmppRosterIq::Item']]], ['setsupportedmethods',['setSupportedMethods',['../classQXmppTransferManager.html#a1a6894de4393135f7f80488f180a6ea2',1,'QXmppTransferManager']]], ['setthread',['setThread',['../classQXmppArchiveChat.html#a75ab3d8e36075ff65d5d81618aa1f7bf',1,'QXmppArchiveChat::setThread()'],['../classQXmppMessage.html#a36ed8d1190f50b78af05ce806c1e90a6',1,'QXmppMessage::setThread()']]], ['settitle',['setTitle',['../classQXmppDataForm.html#afa08e0e1f30260375d1d846bcf20bc20',1,'QXmppDataForm']]], ['setto',['setTo',['../classQXmppStanza.html#a8296bac9c1821141bb67fae87910b8e0',1,'QXmppStanza']]], ['setturnpassword',['setTurnPassword',['../classQXmppIceComponent.html#a9dcbf749ad6050caa8c905cc581f5a5b',1,'QXmppIceComponent::setTurnPassword()'],['../classQXmppIceConnection.html#a1cb5ba7634ffcba433bc8b920ab2f859',1,'QXmppIceConnection::setTurnPassword()'],['../classQXmppCallManager.html#afcdf20af9e802cdabdb864daad5da7d7',1,'QXmppCallManager::setTurnPassword()']]], ['setturnserver',['setTurnServer',['../classQXmppIceComponent.html#aad43d7618d8abd66d549d37cca62c92f',1,'QXmppIceComponent::setTurnServer()'],['../classQXmppIceConnection.html#afd6f1bb0abdacba3a31bc66ed0a947db',1,'QXmppIceConnection::setTurnServer()'],['../classQXmppCallManager.html#a64feb39c4d6605d08896eeebdbbc2ae5',1,'QXmppCallManager::setTurnServer()']]], ['setturnuser',['setTurnUser',['../classQXmppIceComponent.html#a6b178961cf8e7b08c8c2f41f41be9f8f',1,'QXmppIceComponent::setTurnUser()'],['../classQXmppIceConnection.html#a4a64db6163995de3d213706306a3e663',1,'QXmppIceConnection::setTurnUser()'],['../classQXmppCallManager.html#ad516ee9d7304b7ef8dbf0e28c8baaa55',1,'QXmppCallManager::setTurnUser()']]], ['settype',['setType',['../classQXmppDataForm_1_1Field.html#ad35131a068782d9ab9871b07fee6f774',1,'QXmppDataForm::Field::setType()'],['../classQXmppDataForm.html#a78ba23e3b14a3367be036c94b7a52a0a',1,'QXmppDataForm::setType()'],['../classQXmppIq.html#ab4b5d1e875aeace442ac8828946ba2fe',1,'QXmppIq::setType()'],['../classQXmppJingleCandidate.html#a6fbb56ccff5afcef3a78fc7c2875c29d',1,'QXmppJingleCandidate::setType()'],['../classQXmppMessage.html#a794cd10f4265b4b7d9ef5e9fb6e0c9f0',1,'QXmppMessage::setType()'],['../classQXmppPresence.html#a011e173528a981f49c7940f77e66db36',1,'QXmppPresence::setType()'],['../classQXmppExtendedAddress.html#aca3237b6eada5645b1287530557b22c9',1,'QXmppExtendedAddress::setType()'],['../classQXmppVCardAddress.html#a34bb4b51f1572359ae3a28cd83b17a88',1,'QXmppVCardAddress::setType()'],['../classQXmppVCardEmail.html#ac8c505392a51390d8466533f4a27a5e7',1,'QXmppVCardEmail::setType()'],['../classQXmppVCardPhone.html#ae52e172c8f4e24c2b06aa208c4704f41',1,'QXmppVCardPhone::setType()'],['../classQXmppDialback.html#a19eef491fa3d28ec65fa000aeb8e216a',1,'QXmppDialback::setType()']]], ['seturis',['setUris',['../classQXmppDataForm_1_1Media.html#a488070c9fc7290b41f3ef3492a72ffef',1,'QXmppDataForm::Media']]], ['seturl',['setUrl',['../classQXmppBookmarkUrl.html#a7b61c601cb00b9038a3a894fb09ea305',1,'QXmppBookmarkUrl::setUrl()'],['../classQXmppVCardIq.html#a5036f61a15796c6cc6ba172c210b7c09',1,'QXmppVCardIq::setUrl()']]], ['seturls',['setUrls',['../classQXmppBookmarkSet.html#a64084ffccdb5ab1592aabadb318352e8',1,'QXmppBookmarkSet']]], ['setusenonsaslauthentication',['setUseNonSASLAuthentication',['../classQXmppConfiguration.html#aa35552fc5f2cbc3f3651f75de5ea2b26',1,'QXmppConfiguration']]], ['setuser',['setUser',['../classQXmppConfiguration.html#a8cd27e7f2f584b6faa59a0f5cb1ee6b4',1,'QXmppConfiguration']]], ['setusername',['setUsername',['../classQXmppRegisterIq.html#a2f4bea63a8686b1e32d40699bbb0078c',1,'QXmppRegisterIq::setUsername()'],['../classQXmppPasswordRequest.html#a0a84977feca05b3c5bc4df8e93dd5f96',1,'QXmppPasswordRequest::setUsername()']]], ['setusesaslauthentication',['setUseSASLAuthentication',['../classQXmppConfiguration.html#a4c9542ac86f8305e6cea4f2ad0366fb5',1,'QXmppConfiguration']]], ['setvalue',['setValue',['../classQXmppDataForm_1_1Field.html#a7326a294d7f809d8001b47fcd6be4dba',1,'QXmppDataForm::Field']]], ['setvalues',['setValues',['../classQXmppRpcResponseIq.html#a88e0e05de1bdc3bdd05e4ea8a8c61446',1,'QXmppRpcResponseIq']]], ['setvcardupdatetype',['setVCardUpdateType',['../classQXmppPresence.html#a094e60c4acb919bb618e78d7be512755',1,'QXmppPresence']]], ['setverify',['setVerify',['../classQXmppOutgoingServer.html#ab46469ded7de73e98e205625dcfe05a5',1,'QXmppOutgoingServer']]], ['setversion',['setVersion',['../classQXmppArchiveChat.html#a05cab859aa158cb5948eee532991ec3e',1,'QXmppArchiveChat::setVersion()'],['../classQXmppVersionIq.html#a70da818941802b0270b92db779a46fe6',1,'QXmppVersionIq::setVersion()']]], ['setwidth',['setWidth',['../classQXmppDataForm_1_1Media.html#acc2927dfed4d38323861284c683e481a',1,'QXmppDataForm::Media']]], ['setwindowsliveaccesstoken',['setWindowsLiveAccessToken',['../classQXmppConfiguration.html#a2950623fabf4eb939837a7856b7720ab',1,'QXmppConfiguration']]], ['setwith',['setWith',['../classQXmppArchiveChat.html#ac2e70182971fcc63b9f40f603f07adc3',1,'QXmppArchiveChat::setWith()'],['../classQXmppArchiveListIq.html#af87f5d02c0c953d469399fde7075ec49',1,'QXmppArchiveListIq::setWith()'],['../classQXmppArchiveRemoveIq.html#a9f7bb87b8346fa0b83bce5149c50d496',1,'QXmppArchiveRemoveIq::setWith()'],['../classQXmppArchiveRetrieveIq.html#a067eb2f626d88847ff185b1e770a095e',1,'QXmppArchiveRetrieveIq::setWith()']]], ['setxhtml',['setXhtml',['../classQXmppMessage.html#a902a545bb8c628124d52136186574296',1,'QXmppMessage']]], ['sid',['sid',['../classQXmppJingleIq.html#a846549a7ce2ff322b466902a454ba4e5',1,'QXmppJingleIq::sid()'],['../classQXmppCall.html#a1a47d872cb001717eb7644dd6f168926',1,'QXmppCall::sid()'],['../classQXmppTransferJob.html#a02a1bfd07e06be44c23a2d1c559faba7',1,'QXmppTransferJob::sid()']]], ['signallogging',['SignalLogging',['../classQXmppLogger.html#a9a52fe426322ef8e10e05b7092be6c20ab2099e2e223040f603936071cc71b462',1,'QXmppLogger']]], ['size',['size',['../classQXmppVideoFrame.html#a1ea7f893dc931c3c32d9169a1f07be92',1,'QXmppVideoFrame']]], ['socket',['socket',['../classQXmppStream.html#acf771736ced3f18a0a763eb3b161b9c9',1,'QXmppStream::socket()'],['../classQXmppOutgoingClient.html#aca9b91ad84dc40275e4aa317f12ffa5c',1,'QXmppOutgoingClient::socket()']]], ['socketerror',['SocketError',['../classQXmppClient.html#a7c2851d07cc33119752abc6ec8ffc47aac48e9688ca9dce21676283ada1172863',1,'QXmppClient::SocketError()'],['../classQXmppClient.html#a2b044b37ce88a2f2e65833b3d6e57a9f',1,'QXmppClient::socketError()']]], ['socksmethod',['SocksMethod',['../classQXmppTransferJob.html#a962582d3049909305277e54e2095c71ba81571d8573b2003f6f3a66fcda644815',1,'QXmppTransferJob']]], ['speed',['speed',['../classQXmppTransferJob.html#ad4a631dda697f59eb03bf373aeddf6a6',1,'QXmppTransferJob']]], ['ssrc',['ssrc',['../classQXmppRtpPacket.html#a055a9370c194aade4b32ff15562bf3cf',1,'QXmppRtpPacket']]], ['stamp',['stamp',['../classQXmppRtpPacket.html#ac407e829affe1bca80ca191f232f4b03',1,'QXmppRtpPacket::stamp()'],['../classQXmppMessage.html#a75532528f320e94dc030f4a6e7ea9fbc',1,'QXmppMessage::stamp()']]], ['stanzas',['Stanzas',['../group__Stanzas.html',1,'']]], ['start',['start',['../classQXmppArchiveChat.html#a92f75a9737deb2ce322c2767634ab935',1,'QXmppArchiveChat::start()'],['../classQXmppArchiveListIq.html#abc3a47af035fd370e193e4fedac525f3',1,'QXmppArchiveListIq::start()'],['../classQXmppArchiveRemoveIq.html#afee3c666048c4cb211753e3dc0a54822',1,'QXmppArchiveRemoveIq::start()'],['../classQXmppArchiveRetrieveIq.html#ac8d0606440dd22b189e48521b50e46d1',1,'QXmppArchiveRetrieveIq::start()'],['../classQXmppServerExtension.html#a5341d9bb242ac64b996a35219eac1679',1,'QXmppServerExtension::start()']]], ['startstate',['StartState',['../classQXmppTransferJob.html#aab5bb06ca0d2c4f1fac33b7012d1c14faab96ac5cd1310e66c6048512f0846d66',1,'QXmppTransferJob']]], ['starttone',['startTone',['../classQXmppRtpAudioChannel.html#a70b63c9ec09cc6d2a39403e4b680581a',1,'QXmppRtpAudioChannel']]], ['startvideo',['startVideo',['../classQXmppCall.html#a08cfa042104fbdd80019c38670cd02b2',1,'QXmppCall']]], ['state',['State',['../classQXmppMessage.html#aeaa3cc5ccb7d451067a80dd1f3c7099a',1,'QXmppMessage::State()'],['../classQXmppCall.html#a90205b5034613127d2c4adc6a0252759',1,'QXmppCall::State()'],['../classQXmppClient.html#a5f4e70d508c08967f72fd41c5343ad2e',1,'QXmppClient::State()'],['../classQXmppTransferJob.html#aab5bb06ca0d2c4f1fac33b7012d1c14f',1,'QXmppTransferJob::State()'],['../classQXmppCall.html#aa09971e040121ffef56577a537be35a1',1,'QXmppCall::state()'],['../classQXmppClient.html#ac4cbb2e04e5ca683fadbc79ef173f0a5',1,'QXmppClient::state()'],['../classQXmppTransferJob.html#a51e1adb470053f12c5d5b2a10887c8f3',1,'QXmppTransferJob::state()'],['../classQXmppMessage.html#af90654a174ae92bb7904ed01b4d81dc4',1,'QXmppMessage::state()']]], ['statechanged',['stateChanged',['../classQXmppCall.html#a16dd6c41d04900e322ce522d010cd513',1,'QXmppCall::stateChanged()'],['../classQXmppClient.html#a8bd2617265568c9769a8ba608a4ff05d',1,'QXmppClient::stateChanged()'],['../classQXmppTransferJob.html#a040ea186f586a3a9ffbc6e52b3cd3917',1,'QXmppTransferJob::stateChanged()']]], ['statistics',['statistics',['../classQXmppServer.html#ab0453751b0aab88ff0cbd2cc26d9a42d',1,'QXmppServer']]], ['statustext',['statusText',['../classQXmppPresence.html#a1d4bb1a64a37ede53df5c2fdf9f6af4f',1,'QXmppPresence']]], ['stdoutlogging',['StdoutLogging',['../classQXmppLogger.html#a9a52fe426322ef8e10e05b7092be6c20acd51c8c54ebb5284752f224c69709998',1,'QXmppLogger']]], ['stop',['stop',['../classQXmppServerExtension.html#acbf4204a0bf898e70bf3e2fdceae6b09',1,'QXmppServerExtension']]], ['stoptone',['stopTone',['../classQXmppRtpAudioChannel.html#af19f7b1a9686dafaef24ff4fc9a2c3e6',1,'QXmppRtpAudioChannel']]], ['stopvideo',['stopVideo',['../classQXmppCall.html#afb995517f1cc43296000ba9321aefb74',1,'QXmppCall']]], ['streamsecuritymode',['streamSecurityMode',['../classQXmppConfiguration.html#ad9154f1c774a12a74692b5c1d2576ad8',1,'QXmppConfiguration::streamSecurityMode() const '],['../classQXmppConfiguration.html#a7c6e193a68beb792038c066cfc574a18',1,'QXmppConfiguration::StreamSecurityMode()']]], ['street',['street',['../classQXmppVCardAddress.html#a690e263b923b6ee066ae9780d4fa12f6',1,'QXmppVCardAddress']]], ['subject',['subject',['../classQXmppMucRoom.html#a7f95cf9bbd6fa253ca68312bd97f93dd',1,'QXmppMucRoom::subject()'],['../classQXmppArchiveChat.html#a56fa1f42874def672a0d4dc2501ca251',1,'QXmppArchiveChat::subject()'],['../classQXmppMessage.html#a4f7723d2f97362965151e32f666d4739',1,'QXmppMessage::subject()']]], ['subjectaction',['SubjectAction',['../classQXmppMucRoom.html#acd3129293f69d7e7cdd91b65aae0606fa1b691dc1004e867aa844ba380bb383ad',1,'QXmppMucRoom']]], ['subjectchanged',['subjectChanged',['../classQXmppMucRoom.html#a3ebda02e7b225cf6bdc264290c40b5a7',1,'QXmppMucRoom']]], ['submit',['Submit',['../classQXmppDataForm.html#adab12c436b8c450e2b4f59da1aecadeeae6ab517a99b8c387056bd5d341de4082',1,'QXmppDataForm']]], ['subscribe',['Subscribe',['../classQXmppPresence.html#a47ab8dd08436f9d7c90d2990678b5a6da27a106dd1fc50ecdba0ad9b95307ce62',1,'QXmppPresence::Subscribe()'],['../classQXmppRosterManager.html#a454db4d2832168f1302539be2d1e6435',1,'QXmppRosterManager::subscribe()']]], ['subscribed',['Subscribed',['../classQXmppPresence.html#a47ab8dd08436f9d7c90d2990678b5a6da59304e64fb15ce69c9395f6d217dcb6b',1,'QXmppPresence']]], ['subscriptionid',['subscriptionId',['../classQXmppPubSubIq.html#adb11498556fe6f224a50caa10e7a2e18',1,'QXmppPubSubIq']]], ['subscriptionreceived',['subscriptionReceived',['../classQXmppRosterManager.html#a3407f699aded8ed2724cdbb121678c4a',1,'QXmppRosterManager']]], ['subscriptionstatus',['subscriptionStatus',['../classQXmppRosterIq_1_1Item.html#aa32adf5d96267c3d4892f98cd37cd2d1',1,'QXmppRosterIq::Item']]], ['subscriptiontype',['subscriptionType',['../classQXmppRosterIq_1_1Item.html#a110aa10b3746d32e0b2e1f03c22b89c4',1,'QXmppRosterIq::Item::subscriptionType() const '],['../classQXmppRosterIq_1_1Item.html#a0133cf9262cec7e299c4db7c247c5514',1,'QXmppRosterIq::Item::SubscriptionType()']]], ['supportedmethods',['supportedMethods',['../classQXmppTransferManager.html#aeb4b1f1bb5e966f977d832014f0de9d8',1,'QXmppTransferManager']]] ]; qxmpp-0.7.6/doc/html/search/variables_74.html0000644000175000007640000000171212116723632020743 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/all_7e.js0000644000175000007640000000567012116723632017303 0ustar sharkyjerrywebvar searchData= [ ['_7efield',['~Field',['../classQXmppDataForm_1_1Field.html#a72679dafc25450a90d43494c26c542d0',1,'QXmppDataForm::Field']]], ['_7emedia',['~Media',['../classQXmppDataForm_1_1Media.html#a2f0290da439f828807dd45d1f4b38865',1,'QXmppDataForm::Media']]], ['_7eqxmppbookmarkmanager',['~QXmppBookmarkManager',['../classQXmppBookmarkManager.html#a5d5294bcee83048ec5272e6040e58805',1,'QXmppBookmarkManager']]], ['_7eqxmppcallmanager',['~QXmppCallManager',['../classQXmppCallManager.html#a6fdc1b088d34337037cc0848f3142322',1,'QXmppCallManager']]], ['_7eqxmppclient',['~QXmppClient',['../classQXmppClient.html#ac3827e343aa04eefe030d9307b273f08',1,'QXmppClient']]], ['_7eqxmppclientextension',['~QXmppClientExtension',['../classQXmppClientExtension.html#aea624caf2d98d86307c08ed89bd7bc02',1,'QXmppClientExtension']]], ['_7eqxmppconfiguration',['~QXmppConfiguration',['../classQXmppConfiguration.html#ae507ac0321a6524f137cf092974110a5',1,'QXmppConfiguration']]], ['_7eqxmppdataform',['~QXmppDataForm',['../classQXmppDataForm.html#ad9dfe6f5def82059d3e1e1d1d33a3009',1,'QXmppDataForm']]], ['_7eqxmppicecomponent',['~QXmppIceComponent',['../classQXmppIceComponent.html#a4c0a9ef7f9b22b1f4b6f93d434161d1a',1,'QXmppIceComponent']]], ['_7eqxmppincomingclient',['~QXmppIncomingClient',['../classQXmppIncomingClient.html#a578ae75e301798586e5b834bb4e6bb7b',1,'QXmppIncomingClient']]], ['_7eqxmppincomingserver',['~QXmppIncomingServer',['../classQXmppIncomingServer.html#a04744b31a4410d707507bcd88faf0e60',1,'QXmppIncomingServer']]], ['_7eqxmppinvokable',['~QXmppInvokable',['../classQXmppInvokable.html#a84024f3ebe4430972a38d52cefd6c4a7',1,'QXmppInvokable']]], ['_7eqxmppmucmanager',['~QXmppMucManager',['../classQXmppMucManager.html#a60c885a399851db5e289fddd34590110',1,'QXmppMucManager']]], ['_7eqxmppmucroom',['~QXmppMucRoom',['../classQXmppMucRoom.html#a81a85ceb530d46a94d5684275c04af4d',1,'QXmppMucRoom']]], ['_7eqxmppoutgoingclient',['~QXmppOutgoingClient',['../classQXmppOutgoingClient.html#a8b857ffc61518bb81dba4bd55e676849',1,'QXmppOutgoingClient']]], ['_7eqxmppoutgoingserver',['~QXmppOutgoingServer',['../classQXmppOutgoingServer.html#afd6d6746c38cc82f4480a7200fc2f344',1,'QXmppOutgoingServer']]], ['_7eqxmpppresence',['~QXmppPresence',['../classQXmppPresence.html#ab52ba0f4a3b8b376f9ef4e013c7bc39c',1,'QXmppPresence']]], ['_7eqxmpprtpaudiochannel',['~QXmppRtpAudioChannel',['../classQXmppRtpAudioChannel.html#a19cd135f544e842afa02f855cc30bc7b',1,'QXmppRtpAudioChannel']]], ['_7eqxmppserver',['~QXmppServer',['../classQXmppServer.html#a6e31eea84792610a37b5c783df367c08',1,'QXmppServer']]], ['_7eqxmppsslserver',['~QXmppSslServer',['../classQXmppSslServer.html#adab126f5acc840119ac59d56a8751921',1,'QXmppSslServer']]], ['_7eqxmppstanza',['~QXmppStanza',['../classQXmppStanza.html#aa6d167337d24b0fdaae6ca48b69a45ca',1,'QXmppStanza']]], ['_7eqxmppstream',['~QXmppStream',['../classQXmppStream.html#a8a098aac2a88061c1d5e86f2de99d963',1,'QXmppStream']]] ]; qxmpp-0.7.6/doc/html/search/enumvalues_6b.html0000644000175000007640000000171312116723632021235 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/functions_75.html0000644000175000007640000000171212116723632021004 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/all_78.js0000644000175000007640000000120312116723632017212 0ustar sharkyjerrywebvar searchData= [ ['xa',['XA',['../classQXmppPresence.html#ad56af0f57b732c09b080b9347c4dba94af2b440870b33ce88182aaf32f871696b',1,'QXmppPresence']]], ['xhtml',['xhtml',['../classQXmppMessage.html#a9fe534dddf405b50ce97ff4a0f0b4301',1,'QXmppMessage']]], ['xmppstreamerror',['XmppStreamError',['../classQXmppClient.html#a7c2851d07cc33119752abc6ec8ffc47aa29f30662c97dc09858f1d7e80eb1825a',1,'QXmppClient::XmppStreamError()'],['../classQXmppClient.html#af3a18178f3349e668f09ee46ba7d48db',1,'QXmppClient::xmppStreamError()'],['../classQXmppOutgoingClient.html#acd53efcf1903123bdf9a1294c1423428',1,'QXmppOutgoingClient::xmppStreamError()']]] ]; qxmpp-0.7.6/doc/html/search/functions_63.js0000644000175000007640000001620212116723632020451 0ustar sharkyjerrywebvar searchData= [ ['cacertificates',['caCertificates',['../classQXmppConfiguration.html#a6203111336a397e83a857ca3d43e5b08',1,'QXmppConfiguration']]], ['call',['call',['../classQXmppCallManager.html#a680c63f0fdd9d45f680cdcae581714ef',1,'QXmppCallManager']]], ['callreceived',['callReceived',['../classQXmppCallManager.html#a91f0a7a4fd78c78be0c4a54ab23af65f',1,'QXmppCallManager']]], ['callremotemethod',['callRemoteMethod',['../classQXmppRpcManager.html#a23b184ca351509255623563fa2b9e2b8',1,'QXmppRpcManager']]], ['callstarted',['callStarted',['../classQXmppCallManager.html#a41734eaa39a6216d39cc40b3991492d2',1,'QXmppCallManager']]], ['capabilities',['capabilities',['../classQXmppDiscoveryManager.html#a3c3e53c9eacfbe9b6bc53793543bce6e',1,'QXmppDiscoveryManager']]], ['capabilityext',['capabilityExt',['../classQXmppPresence.html#aec8f7ec4bc7ee9a6afcbd79445954d12',1,'QXmppPresence']]], ['capabilityhash',['capabilityHash',['../classQXmppPresence.html#abc586b332f1bfacdb99356b6fa66671f',1,'QXmppPresence']]], ['capabilitynode',['capabilityNode',['../classQXmppPresence.html#abeb42678d2eb51d805021239b6787e15',1,'QXmppPresence']]], ['capabilityver',['capabilityVer',['../classQXmppPresence.html#af4b39ee86352ec85f6dea9286a8cb7e7',1,'QXmppPresence']]], ['channels',['channels',['../classQXmppJinglePayloadType.html#a11c8291389457bfe986b8c738e0e49a3',1,'QXmppJinglePayloadType']]], ['chat',['chat',['../classQXmppArchiveChatIq.html#af08964b43018061a77c1e20029eaba48',1,'QXmppArchiveChatIq']]], ['chats',['chats',['../classQXmppArchiveListIq.html#a9a64466dafcd734555ce4406491c1e05',1,'QXmppArchiveListIq']]], ['checkpassword',['checkPassword',['../classQXmppPasswordChecker.html#a62ba10636417e503f936560f4f2910a8',1,'QXmppPasswordChecker']]], ['client',['client',['../classQXmppClientExtension.html#a2476cb1a20963d15d45d39f24a0c1198',1,'QXmppClientExtension']]], ['clientcapabilitiesnode',['clientCapabilitiesNode',['../classQXmppDiscoveryManager.html#ae2d3ef8859f13eac90ffa0d413585aa7',1,'QXmppDiscoveryManager']]], ['clientcategory',['clientCategory',['../classQXmppDiscoveryManager.html#a9c75d379114e62fcd329c8ae725c636b',1,'QXmppDiscoveryManager']]], ['clientconnected',['clientConnected',['../classQXmppServer.html#a8bfdd55f8e3769caf65b458d36467a99',1,'QXmppServer']]], ['clientdisconnected',['clientDisconnected',['../classQXmppServer.html#a378cea7ca6ab1bda5e1d5182010557f0',1,'QXmppServer']]], ['clientinfoform',['clientInfoForm',['../classQXmppDiscoveryManager.html#a4cdb1648895f23878acdc8ef7684f6ad',1,'QXmppDiscoveryManager']]], ['clientname',['clientName',['../classQXmppDiscoveryManager.html#af49b9abb7f8704c0d79fd0ef7d0360fe',1,'QXmppDiscoveryManager::clientName()'],['../classQXmppVersionManager.html#a7c1398fd97ef8aed42d4f4304c8924fa',1,'QXmppVersionManager::clientName()']]], ['clientos',['clientOs',['../classQXmppVersionManager.html#a8e03cdf2737c1e1eed51ad739ca6d179',1,'QXmppVersionManager']]], ['clientpresence',['clientPresence',['../classQXmppClient.html#a2f7f555d11d5c45772d31d66834d7610',1,'QXmppClient']]], ['clienttype',['clientType',['../classQXmppDiscoveryManager.html#a5f56394fc3ad6d21624291907af15017',1,'QXmppDiscoveryManager']]], ['clientvcard',['clientVCard',['../classQXmppVCardManager.html#a425d7a9da51c2ecc55bed35c425f612f',1,'QXmppVCardManager']]], ['clientvcardreceived',['clientVCardReceived',['../classQXmppVCardManager.html#af98ad32a12efdae22c27add715a826c8',1,'QXmppVCardManager']]], ['clientversion',['clientVersion',['../classQXmppVersionManager.html#aebb3df968e68ca78ba8b487d88becc87',1,'QXmppVersionManager']]], ['clockrate',['clockrate',['../classQXmppJinglePayloadType.html#ac6f8856d83334360d8766b473dba301a',1,'QXmppJinglePayloadType']]], ['close',['close',['../classQXmppRtpAudioChannel.html#a6a767d53335f777cb3fceb924b4b32de',1,'QXmppRtpAudioChannel::close()'],['../classQXmppRtpVideoChannel.html#ad89cde8a1e04f4327639f12a64ac25d4',1,'QXmppRtpVideoChannel::close()'],['../classQXmppIceComponent.html#a36435fa0ef3b19f2b18b1cf549992732',1,'QXmppIceComponent::close()'],['../classQXmppIceConnection.html#a8afca28f57aa276b618444e96331a2be',1,'QXmppIceConnection::close()'],['../classQXmppServer.html#a5b12956133786ce383ac2ae0716821be',1,'QXmppServer::close()']]], ['command',['command',['../classQXmppDialback.html#a7e771c31a7ba8c44fdd3e078f3b69521',1,'QXmppDialback']]], ['component',['component',['../classQXmppJingleCandidate.html#a869b34fdeba74466e2cfdd69d31c5443',1,'QXmppJingleCandidate::component()'],['../classQXmppIceComponent.html#acecc3027c345fe1bfc1247107101aeab',1,'QXmppIceComponent::component()'],['../classQXmppIceConnection.html#ab75e321610c39ddc9aec5b20f36b5c8c',1,'QXmppIceConnection::component()']]], ['conferences',['conferences',['../classQXmppBookmarkSet.html#a304e9a8e652b311853d66834a8fce6a8',1,'QXmppBookmarkSet']]], ['configuration',['configuration',['../classQXmppClient.html#a1cd44e6c54b54be4bf50cf3559786476',1,'QXmppClient::configuration()'],['../classQXmppOutgoingClient.html#a47676ce355fc5253af9a79c596a95431',1,'QXmppOutgoingClient::configuration()']]], ['configurationreceived',['configurationReceived',['../classQXmppMucRoom.html#a18623535386c94ab211e6868ed5c34f4',1,'QXmppMucRoom']]], ['connected',['connected',['../classQXmppStream.html#a50332c00371295df6c3b69268f588bc9',1,'QXmppStream::connected()'],['../classQXmppIceComponent.html#ac347ba395ccef793416c11be55b05631',1,'QXmppIceComponent::connected()'],['../classQXmppIceConnection.html#ae6aa4cce6395cbac3af9ad8f62d92384',1,'QXmppIceConnection::connected()'],['../classQXmppCall.html#a384d69cd1bea31bbfaa8df9c3e99d478',1,'QXmppCall::connected()'],['../classQXmppClient.html#a46e84c5280564cdc2d60307309f97b92',1,'QXmppClient::connected()']]], ['connecttohost',['connectToHost',['../classQXmppIceComponent.html#a6bd508a2732ad9a21027e051a66f80ee',1,'QXmppIceComponent::connectToHost()'],['../classQXmppIceConnection.html#a1280f5ba6da8a652fb081a71bcfbe26a',1,'QXmppIceConnection::connectToHost()'],['../classQXmppOutgoingClient.html#aa04ec31dfe99c5c3121722c5a7ef3071',1,'QXmppOutgoingClient::connectToHost()'],['../classQXmppOutgoingServer.html#a0d24f0f0a5b9cb363658c91644977cd7',1,'QXmppOutgoingServer::connectToHost()']]], ['connecttoserver',['connectToServer',['../classQXmppClient.html#afebe3b0955b81c6dd0e738db328cf06b',1,'QXmppClient::connectToServer(const QXmppConfiguration &, const QXmppPresence &initialPresence=QXmppPresence())'],['../classQXmppClient.html#a06cf985c0cb91ea9341c0558c01de5b4',1,'QXmppClient::connectToServer(const QString &jid, const QString &password)']]], ['content',['content',['../classQXmppJingleIq.html#a19249357c437ca81e6d39e0434fcd90f',1,'QXmppJingleIq::content()'],['../classQXmppJingleIq.html#a118078aae1f72067abbc9096ac59d1ab',1,'QXmppJingleIq::content() const ']]], ['contents',['contents',['../classQXmppPubSubItem.html#a6079e555c862437a727647409a7912e4',1,'QXmppPubSubItem']]], ['count',['count',['../classQXmppResultSetReply.html#aa6d8a4102269973ddd6d341b29d2ca12',1,'QXmppResultSetReply']]], ['country',['country',['../classQXmppVCardAddress.html#ac55d402e158179fd016faf933714895c',1,'QXmppVCardAddress']]], ['create',['create',['../classQXmppServerPlugin.html#a5802a49843d86e341c7be21662b2c09e',1,'QXmppServerPlugin']]] ]; qxmpp-0.7.6/doc/html/search/enumvalues_72.html0000644000175000007640000000171312116723632021156 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/functions_6c.js0000644000175000007640000000677212116723632020544 0ustar sharkyjerrywebvar searchData= [ ['label',['label',['../classQXmppDataForm_1_1Field.html#a14a29b5a11b788f6c32e7cf82353227e',1,'QXmppDataForm::Field']]], ['lang',['lang',['../classQXmppStanza.html#a64885f190ef9c8011449166bc45d19fd',1,'QXmppStanza']]], ['last',['last',['../classQXmppResultSetReply.html#adadca3c4da4ebb51962c07f5749b9cc5',1,'QXmppResultSetReply']]], ['lastname',['lastName',['../classQXmppVCardIq.html#a978b6176f42581f00c46e114b82fda5d',1,'QXmppVCardIq']]], ['leave',['leave',['../classQXmppMucRoom.html#aba377174fd4869c9d38952d71aa9297b',1,'QXmppMucRoom']]], ['left',['left',['../classQXmppMucRoom.html#a7c2f39104f9334ac0c6c188fe2f7afbb',1,'QXmppMucRoom']]], ['listcollections',['listCollections',['../classQXmppArchiveManager.html#a5ed9d433935d9de527d84e496d7d1a2e',1,'QXmppArchiveManager::listCollections(const QString &jid, const QDateTime &start=QDateTime(), const QDateTime &end=QDateTime(), const QXmppResultSetQuery &rsm=QXmppResultSetQuery())'],['../classQXmppArchiveManager.html#afe477914f6de06c8c0d8b6ccea4fa6c8',1,'QXmppArchiveManager::listCollections(const QString &jid, const QDateTime &start, const QDateTime &end, int max)']]], ['listenforclients',['listenForClients',['../classQXmppServer.html#a36250e897e5298bc5f6b6b8da5091ca1',1,'QXmppServer']]], ['listenforservers',['listenForServers',['../classQXmppServer.html#a61e648860918bfaa1db8c8aa81769e5c',1,'QXmppServer']]], ['localcandidates',['localCandidates',['../classQXmppIceComponent.html#aacddb07e704ea4e9747f75d032c598b7',1,'QXmppIceComponent::localCandidates()'],['../classQXmppIceConnection.html#aa76fbb979d0d4c9111a3a982e3bf1c13',1,'QXmppIceConnection::localCandidates()']]], ['localcandidateschanged',['localCandidatesChanged',['../classQXmppIceComponent.html#a5e75654feb10b83aec884885380e20b3',1,'QXmppIceComponent::localCandidatesChanged()'],['../classQXmppIceConnection.html#a20fa09218e384f8c115e3ed6b5d179d4',1,'QXmppIceConnection::localCandidatesChanged()']]], ['localfileurlchanged',['localFileUrlChanged',['../classQXmppTransferJob.html#a8fe62c0eb22925eb3ecf4703b737ea59',1,'QXmppTransferJob']]], ['locality',['locality',['../classQXmppVCardAddress.html#a69a22e7cd9c1d079b854fc30187cc683',1,'QXmppVCardAddress']]], ['localpassword',['localPassword',['../classQXmppIceConnection.html#a03c21fbebd65403414b28b331bea8f24',1,'QXmppIceConnection']]], ['localstreamid',['localStreamId',['../classQXmppIncomingServer.html#a42bfd624b87e599c4139a08a6e25bf7c',1,'QXmppIncomingServer']]], ['localstreamkey',['localStreamKey',['../classQXmppOutgoingServer.html#a6f58821f193eb048cd1c4ff188c92925',1,'QXmppOutgoingServer']]], ['localuser',['localUser',['../classQXmppIceConnection.html#aa02512f5c19bfc6514b9bf20698943ad',1,'QXmppIceConnection']]], ['log',['log',['../classQXmppLogger.html#a2e5e503ecd4400477f47dec915ac4e89',1,'QXmppLogger']]], ['loggerchanged',['loggerChanged',['../classQXmppClient.html#a74a8754f3e14945e597d964442281e70',1,'QXmppClient::loggerChanged()'],['../classQXmppServer.html#af49a15f76003d1e3b2ff280f55e1ca54',1,'QXmppServer::loggerChanged()']]], ['logmessage',['logMessage',['../classQXmppLoggable.html#a403fa46ba15c65da706e8188d4312a05',1,'QXmppLoggable::logMessage()'],['../classQXmppRtpAudioChannel.html#a56e695ad1815f25c70dbef6b7310007b',1,'QXmppRtpAudioChannel::logMessage()']]], ['logreceived',['logReceived',['../classQXmppLoggable.html#afcb384597aa4cdee1dad7d2ec50871f4',1,'QXmppLoggable']]], ['logsent',['logSent',['../classQXmppLoggable.html#a50feb6fc691e90ba6b2e69c2a9aea794',1,'QXmppLoggable']]] ]; qxmpp-0.7.6/doc/html/search/all_72.js0000644000175000007640000001335112116723632017213 0ustar sharkyjerrywebvar searchData= [ ['readframes',['readFrames',['../classQXmppRtpVideoChannel.html#a2d2c5854406f34fedbd10d6096428493',1,'QXmppRtpVideoChannel']]], ['reason',['reason',['../classQXmppJingleIq.html#a0109cfd1525f9ee69a40ae0ce3962d69',1,'QXmppJingleIq::reason()'],['../classQXmppJingleIq.html#a9027b28bc5f929ee415f0de50563cac7',1,'QXmppJingleIq::reason() const '],['../classQXmppMucItem.html#a7b5574030b7bb253c23ccf46fffde87e',1,'QXmppMucItem::reason()']]], ['receiptid',['receiptId',['../classQXmppMessage.html#a3df33f75c06de9a3fbe3897ca89893db',1,'QXmppMessage']]], ['receivedmessage',['ReceivedMessage',['../classQXmppLogger.html#a932dbbd4f70a1e9c0ff8f452e61fc9b8a9fe070da70e5b2a5c2e6e97a58ee8da7',1,'QXmppLogger']]], ['refusesubscription',['refuseSubscription',['../classQXmppRosterManager.html#a9e9ffd157b981d1fb4a3b641de2890c7',1,'QXmppRosterManager']]], ['region',['region',['../classQXmppVCardAddress.html#a02bd9c333ef0d1d3eac3853bb8391849',1,'QXmppVCardAddress']]], ['relayedtype',['RelayedType',['../classQXmppJingleCandidate.html#a6314b3ed7de59b68131db6ffab55fe7daca50a30f0ac47c89e25b5f74b846cffb',1,'QXmppJingleCandidate']]], ['remotedomain',['remoteDomain',['../classQXmppOutgoingServer.html#acf167e9cf078b1ee9ef80fd2d3ac0b83',1,'QXmppOutgoingServer']]], ['remove',['Remove',['../classQXmppRosterIq_1_1Item.html#a0133cf9262cec7e299c4db7c247c5514a126d552db04eb0336747ca34e2c91cee',1,'QXmppRosterIq::Item']]], ['removecollections',['removeCollections',['../classQXmppArchiveManager.html#a3de27735449b3fb10a1e85032ed3e0b6',1,'QXmppArchiveManager']]], ['removeextension',['removeExtension',['../classQXmppClient.html#ae48477dc92abd66193789bfc60d16d62',1,'QXmppClient']]], ['removeitem',['removeItem',['../classQXmppRosterManager.html#a0ac3bd1ee2cbe8e99c3da55f9423fe20',1,'QXmppRosterManager']]], ['renameitem',['renameItem',['../classQXmppRosterManager.html#a65ecf5954b56e1d38be5b3554c4e3f30',1,'QXmppRosterManager']]], ['reopen',['reopen',['../classQXmppLogger.html#a18ebf48f34358d20dd57502a9db2f0c0',1,'QXmppLogger']]], ['requestclientvcard',['requestClientVCard',['../classQXmppVCardManager.html#a3f049d6356f93f5f8fa81a1c30ea5ba9',1,'QXmppVCardManager']]], ['requestconfiguration',['requestConfiguration',['../classQXmppMucRoom.html#ab20d3d15a70354d109d1f30a13c8c1df',1,'QXmppMucRoom']]], ['requestinfo',['requestInfo',['../classQXmppDiscoveryManager.html#a81facc7b29132ee7f13c26d8d441e611',1,'QXmppDiscoveryManager']]], ['requestitems',['requestItems',['../classQXmppDiscoveryManager.html#ac6b173d943634603beeb43c15609efe4',1,'QXmppDiscoveryManager']]], ['requestpermissions',['requestPermissions',['../classQXmppMucRoom.html#a8b7cb2b8755a8cd18bf0d98cb3c3a0aa',1,'QXmppMucRoom']]], ['requesttime',['requestTime',['../classQXmppEntityTimeManager.html#ab6cb76de7eb717bb8f332b7ed643fb7b',1,'QXmppEntityTimeManager']]], ['requestvcard',['requestVCard',['../classQXmppVCardManager.html#a71c114c5375575004bd1e2593aff0ba9',1,'QXmppVCardManager']]], ['requestversion',['requestVersion',['../classQXmppVersionManager.html#ae63fec70ad9b12cb585cb2d46b8e1406',1,'QXmppVersionManager']]], ['reserveports',['reservePorts',['../classQXmppIceComponent.html#a1fc342ff0fa196320b86a2c1413b33fc',1,'QXmppIceComponent']]], ['resource',['resource',['../classQXmppBindIq.html#ac6aa0a84579d18f28196301a774a6e42',1,'QXmppBindIq::resource()'],['../classQXmppConfiguration.html#ad6969bdce483c31e1196ffb0cca800f3',1,'QXmppConfiguration::resource()']]], ['responder',['responder',['../classQXmppJingleIq.html#ad77bd95c596dbef85b9d84ff72fb4716',1,'QXmppJingleIq']]], ['result',['Result',['../classQXmppDataForm.html#adab12c436b8c450e2b4f59da1aecadeeae5ab980ce478727be2a09112bd55e2f9',1,'QXmppDataForm::Result()'],['../classQXmppIq.html#a6bc7a0505a3be7309051ae2432a3d826a8fa093ce2dcc1baf865ca6203d2712f1',1,'QXmppIq::Result()'],['../classQXmppDialback.html#a0448107c56f892056f359013b80798bcaa6debf8f80d7366af3cff72363fd0477',1,'QXmppDialback::Result()']]], ['resultsetquery',['resultSetQuery',['../classQXmppArchiveListIq.html#aed31e99a9387ef300bf91564f83f2e84',1,'QXmppArchiveListIq::resultSetQuery()'],['../classQXmppArchiveRetrieveIq.html#a927c46455efcff2fb9221f9246fcf629',1,'QXmppArchiveRetrieveIq::resultSetQuery()']]], ['resultsetreply',['resultSetReply',['../classQXmppArchiveChatIq.html#a63d9405b2b4c4b0573905a2e52a95c96',1,'QXmppArchiveChatIq::resultSetReply()'],['../classQXmppArchiveListIq.html#a47bb290958acb0721b35bb51161fa1da',1,'QXmppArchiveListIq::resultSetReply()']]], ['retrievecollection',['retrieveCollection',['../classQXmppArchiveManager.html#a5a8584a4dfb0c2fa8bb0e85690c269f9',1,'QXmppArchiveManager::retrieveCollection(const QString &jid, const QDateTime &start, const QXmppResultSetQuery &rsm=QXmppResultSetQuery())'],['../classQXmppArchiveManager.html#a7967bec8510af778f581d3232193895f',1,'QXmppArchiveManager::retrieveCollection(const QString &jid, const QDateTime &start, int max)']]], ['ringing',['ringing',['../classQXmppJingleIq.html#a2cc94c4e2e8dec892d8388aca47b0268',1,'QXmppJingleIq::ringing()'],['../classQXmppCall.html#ac661611e7d0bf5ebcdf56a28d60a95aa',1,'QXmppCall::ringing()']]], ['role',['role',['../classQXmppMucItem.html#af65444d3b29bbb8d78b4d25aa8f02894',1,'QXmppMucItem::role() const '],['../classQXmppMucItem.html#a5de278115b806b129dd6944dc8230d4a',1,'QXmppMucItem::Role()']]], ['roomadded',['roomAdded',['../classQXmppMucManager.html#a948446ebb49b07e772d8a70a0b8e71e6',1,'QXmppMucManager']]], ['rooms',['rooms',['../classQXmppMucManager.html#a574bd5b755a4463895f5376977d6a0a7',1,'QXmppMucManager']]], ['rostermanager',['rosterManager',['../classQXmppClient.html#a6a0bb409bad66a4f5ea91056ee190ad4',1,'QXmppClient']]], ['rosterreceived',['rosterReceived',['../classQXmppRosterManager.html#a978cf900248b0ef144460bb52052ded8',1,'QXmppRosterManager']]] ]; qxmpp-0.7.6/doc/html/search/all_74.js0000644000175000007640000001462312116723632017220 0ustar sharkyjerrywebvar searchData= [ ['thread',['thread',['../classQXmppArchiveChat.html#a4fa81fab978ec0725006761e81c2458c',1,'QXmppArchiveChat::thread()'],['../classQXmppMessage.html#a048b9b4a4d768e00dd54d731678ae6b1',1,'QXmppMessage::thread()']]], ['timereceived',['timeReceived',['../classQXmppEntityTimeManager.html#a43bf87be2b6c3291980779148f10ef25',1,'QXmppEntityTimeManager']]], ['timezoneoffsetfromstring',['timezoneOffsetFromString',['../classQXmppUtils.html#affdf229e846c999ea8d3f464d8e154a9',1,'QXmppUtils']]], ['timezoneoffsettostring',['timezoneOffsetToString',['../classQXmppUtils.html#ad44b0a2537afd21c426483e3daeca5d8',1,'QXmppUtils']]], ['title',['title',['../classQXmppDataForm.html#a224b4f313340a5f2aa2f8cf97ec8032b',1,'QXmppDataForm']]], ['tlsdisabled',['TLSDisabled',['../classQXmppConfiguration.html#a7c6e193a68beb792038c066cfc574a18a1af5a23c6977c4f7d639a8a8bfe3ec19',1,'QXmppConfiguration']]], ['tlsenabled',['TLSEnabled',['../classQXmppConfiguration.html#a7c6e193a68beb792038c066cfc574a18aaf3bb1e91fd95070ad94a10371b32771',1,'QXmppConfiguration']]], ['tlsrequired',['TLSRequired',['../classQXmppConfiguration.html#a7c6e193a68beb792038c066cfc574a18a3cb02f5970640730f94f516ae3924d47',1,'QXmppConfiguration']]], ['to',['To',['../classQXmppRosterIq_1_1Item.html#a0133cf9262cec7e299c4db7c247c5514af442c4841857e10e47b49915d4e19a2f',1,'QXmppRosterIq::Item::To()'],['../classQXmppStanza.html#a45ab4c2f04d712ee93df5d0e4b2c03a4',1,'QXmppStanza::to()']]], ['tone',['Tone',['../classQXmppRtpAudioChannel.html#a745ea21f875f4e92b1f361d4cf57e49d',1,'QXmppRtpAudioChannel']]], ['tone_5f0',['Tone_0',['../classQXmppRtpAudioChannel.html#a745ea21f875f4e92b1f361d4cf57e49da3539eb83f28862e09aaf5cb9816cc58e',1,'QXmppRtpAudioChannel']]], ['tone_5f1',['Tone_1',['../classQXmppRtpAudioChannel.html#a745ea21f875f4e92b1f361d4cf57e49daf4d7047f1e39ba473e9130a96dc39a55',1,'QXmppRtpAudioChannel']]], ['tone_5f2',['Tone_2',['../classQXmppRtpAudioChannel.html#a745ea21f875f4e92b1f361d4cf57e49da903f6e7bae2ee3764e69e9cf8e864913',1,'QXmppRtpAudioChannel']]], ['tone_5f3',['Tone_3',['../classQXmppRtpAudioChannel.html#a745ea21f875f4e92b1f361d4cf57e49daf360166f166de6500fb4fbdedd0339a7',1,'QXmppRtpAudioChannel']]], ['tone_5f4',['Tone_4',['../classQXmppRtpAudioChannel.html#a745ea21f875f4e92b1f361d4cf57e49da2af37c6aaa66caaa4847bab64525b879',1,'QXmppRtpAudioChannel']]], ['tone_5f5',['Tone_5',['../classQXmppRtpAudioChannel.html#a745ea21f875f4e92b1f361d4cf57e49da1d78e73e3e51d1fa3875a743cf8fb082',1,'QXmppRtpAudioChannel']]], ['tone_5f6',['Tone_6',['../classQXmppRtpAudioChannel.html#a745ea21f875f4e92b1f361d4cf57e49da14c206fef6136dd85cab67c72f099257',1,'QXmppRtpAudioChannel']]], ['tone_5f7',['Tone_7',['../classQXmppRtpAudioChannel.html#a745ea21f875f4e92b1f361d4cf57e49dae54661e96d93a55ec918513415e275d3',1,'QXmppRtpAudioChannel']]], ['tone_5f8',['Tone_8',['../classQXmppRtpAudioChannel.html#a745ea21f875f4e92b1f361d4cf57e49daaccb7e1fba31cd3b578cb0e5cd41ccd0',1,'QXmppRtpAudioChannel']]], ['tone_5f9',['Tone_9',['../classQXmppRtpAudioChannel.html#a745ea21f875f4e92b1f361d4cf57e49dae6a6465f376cc65bf3ea879fc952b771',1,'QXmppRtpAudioChannel']]], ['tone_5fa',['Tone_A',['../classQXmppRtpAudioChannel.html#a745ea21f875f4e92b1f361d4cf57e49da92da6ca1cd6ad13143239ee687de24b5',1,'QXmppRtpAudioChannel']]], ['tone_5fb',['Tone_B',['../classQXmppRtpAudioChannel.html#a745ea21f875f4e92b1f361d4cf57e49da6a8bf924317f36f5fb2d88045a6ce49a',1,'QXmppRtpAudioChannel']]], ['tone_5fc',['Tone_C',['../classQXmppRtpAudioChannel.html#a745ea21f875f4e92b1f361d4cf57e49da0c85274383a2c7da4cb98bf76cb8e1f6',1,'QXmppRtpAudioChannel']]], ['tone_5fd',['Tone_D',['../classQXmppRtpAudioChannel.html#a745ea21f875f4e92b1f361d4cf57e49dab7b22bf8ce98ce77e2b971db563aa90a',1,'QXmppRtpAudioChannel']]], ['tone_5fpound',['Tone_Pound',['../classQXmppRtpAudioChannel.html#a745ea21f875f4e92b1f361d4cf57e49da468bf817f3dcf911333d119a8badbbe0',1,'QXmppRtpAudioChannel']]], ['tone_5fstar',['Tone_Star',['../classQXmppRtpAudioChannel.html#a745ea21f875f4e92b1f361d4cf57e49da73aa7eec8acfdcce7ee6e998a5a37cb3',1,'QXmppRtpAudioChannel']]], ['tostring',['toString',['../classQXmppRtpPacket.html#a166ac10ac60f1d1cdabba66fcd90985b',1,'QXmppRtpPacket']]], ['transferstate',['TransferState',['../classQXmppTransferJob.html#aab5bb06ca0d2c4f1fac33b7012d1c14fabbaf0dcfacf7fcca8d8ba4eacd1e2d03',1,'QXmppTransferJob']]], ['type',['Type',['../classQXmppDataForm_1_1Field.html#a2de5e3af9b018b97d450797f7e4a3b44',1,'QXmppDataForm::Field::Type()'],['../classQXmppDataForm.html#adab12c436b8c450e2b4f59da1aecadee',1,'QXmppDataForm::Type()'],['../classQXmppIq.html#a6bc7a0505a3be7309051ae2432a3d826',1,'QXmppIq::Type()'],['../classQXmppJingleCandidate.html#a6314b3ed7de59b68131db6ffab55fe7d',1,'QXmppJingleCandidate::Type()'],['../classQXmppMessage.html#ac91ae4671526e44e51b18449005b224b',1,'QXmppMessage::Type()'],['../classQXmppPresence.html#a47ab8dd08436f9d7c90d2990678b5a6d',1,'QXmppPresence::Type()'],['../classQXmppPasswordRequest.html#aeeb83aba2b10a05e048567b664b25480',1,'QXmppPasswordRequest::Type()'],['../classQXmppRtpPacket.html#a212785ddeef7dd84fe262106311d5b8e',1,'QXmppRtpPacket::type()'],['../classQXmppDataForm_1_1Field.html#a87b4d2189a4c1e3eaffb7ec3687cd8b1',1,'QXmppDataForm::Field::type()'],['../classQXmppDataForm.html#a3e77bbef5efa75cb2061796654de516e',1,'QXmppDataForm::type()'],['../classQXmppIq.html#a23421b8016af239a9c8081d75f84e6b2',1,'QXmppIq::type()'],['../classQXmppJingleCandidate.html#aad116fd8e2191575ecc2dfa299fad74f',1,'QXmppJingleCandidate::type()'],['../classQXmppMessage.html#a4a2f12c298b498489077b120855a96b0',1,'QXmppMessage::type()'],['../classQXmppPresence.html#a727e9f66d6287a963f344acd407dc1f2',1,'QXmppPresence::type()'],['../classQXmppExtendedAddress.html#a24d50819936d375c0ef4dba827124a44',1,'QXmppExtendedAddress::type()'],['../classQXmppVCardAddress.html#a50a3b215d7dcc5892f7a108e13fb7990',1,'QXmppVCardAddress::type()'],['../classQXmppVCardEmail.html#a9d1e9b240a10320adb83cfb2e63e3812',1,'QXmppVCardEmail::type()'],['../classQXmppVCardPhone.html#a4727b1e8aaa20755cfd0fafbe7dc1956',1,'QXmppVCardPhone::type()'],['../classQXmppDialback.html#ab580da12ae71de1e4b055449ebdc3de1',1,'QXmppDialback::type()']]], ['typeflag',['TypeFlag',['../classQXmppVCardAddress.html#a0531f1270cfc57552675eaebac3925c5',1,'QXmppVCardAddress::TypeFlag()'],['../classQXmppVCardEmail.html#a0fd95f17b45f937d0fd6d28daddc7278',1,'QXmppVCardEmail::TypeFlag()'],['../classQXmppVCardPhone.html#a55acc02360d6324e394f5ad40b5d06f3',1,'QXmppVCardPhone::TypeFlag()']]] ]; qxmpp-0.7.6/doc/html/search/functions_64.html0000644000175000007640000000171212116723632021002 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/properties_70.js0000644000175000007640000000076012116723632020635 0ustar sharkyjerrywebvar searchData= [ ['participants',['participants',['../classQXmppMucRoom.html#a8ebbaed22c263503552704ce308d8c42',1,'QXmppMucRoom']]], ['password',['password',['../classQXmppMucRoom.html#a823200ee661315b757accce9da0313eb',1,'QXmppMucRoom']]], ['proxy',['proxy',['../classQXmppTransferManager.html#a36e5597ad06a669e4eb136862f142e7d',1,'QXmppTransferManager']]], ['proxyonly',['proxyOnly',['../classQXmppTransferManager.html#ad68788ad3eddce442b2b2e231021c24e',1,'QXmppTransferManager']]] ]; qxmpp-0.7.6/doc/html/search/classes_71.js0000644000175000007640000001476112116723632020105 0ustar sharkyjerrywebvar searchData= [ ['qxmpparchivechat',['QXmppArchiveChat',['../classQXmppArchiveChat.html',1,'']]], ['qxmpparchivechatiq',['QXmppArchiveChatIq',['../classQXmppArchiveChatIq.html',1,'']]], ['qxmpparchivelistiq',['QXmppArchiveListIq',['../classQXmppArchiveListIq.html',1,'']]], ['qxmpparchivemanager',['QXmppArchiveManager',['../classQXmppArchiveManager.html',1,'']]], ['qxmpparchivemessage',['QXmppArchiveMessage',['../classQXmppArchiveMessage.html',1,'']]], ['qxmpparchiveprefiq',['QXmppArchivePrefIq',['../classQXmppArchivePrefIq.html',1,'']]], ['qxmpparchiveremoveiq',['QXmppArchiveRemoveIq',['../classQXmppArchiveRemoveIq.html',1,'']]], ['qxmpparchiveretrieveiq',['QXmppArchiveRetrieveIq',['../classQXmppArchiveRetrieveIq.html',1,'']]], ['qxmppbindiq',['QXmppBindIq',['../classQXmppBindIq.html',1,'']]], ['qxmppbookmarkconference',['QXmppBookmarkConference',['../classQXmppBookmarkConference.html',1,'']]], ['qxmppbookmarkmanager',['QXmppBookmarkManager',['../classQXmppBookmarkManager.html',1,'']]], ['qxmppbookmarkset',['QXmppBookmarkSet',['../classQXmppBookmarkSet.html',1,'']]], ['qxmppbookmarkurl',['QXmppBookmarkUrl',['../classQXmppBookmarkUrl.html',1,'']]], ['qxmppcall',['QXmppCall',['../classQXmppCall.html',1,'']]], ['qxmppcallmanager',['QXmppCallManager',['../classQXmppCallManager.html',1,'']]], ['qxmppclient',['QXmppClient',['../classQXmppClient.html',1,'']]], ['qxmppclientextension',['QXmppClientExtension',['../classQXmppClientExtension.html',1,'']]], ['qxmppconfiguration',['QXmppConfiguration',['../classQXmppConfiguration.html',1,'']]], ['qxmppdataform',['QXmppDataForm',['../classQXmppDataForm.html',1,'']]], ['qxmppdialback',['QXmppDialback',['../classQXmppDialback.html',1,'']]], ['qxmppdiscoverymanager',['QXmppDiscoveryManager',['../classQXmppDiscoveryManager.html',1,'']]], ['qxmppentitytimemanager',['QXmppEntityTimeManager',['../classQXmppEntityTimeManager.html',1,'']]], ['qxmppextendedaddress',['QXmppExtendedAddress',['../classQXmppExtendedAddress.html',1,'']]], ['qxmppicecomponent',['QXmppIceComponent',['../classQXmppIceComponent.html',1,'']]], ['qxmppiceconnection',['QXmppIceConnection',['../classQXmppIceConnection.html',1,'']]], ['qxmppincomingclient',['QXmppIncomingClient',['../classQXmppIncomingClient.html',1,'']]], ['qxmppincomingserver',['QXmppIncomingServer',['../classQXmppIncomingServer.html',1,'']]], ['qxmppinvokable',['QXmppInvokable',['../classQXmppInvokable.html',1,'']]], ['qxmppiq',['QXmppIq',['../classQXmppIq.html',1,'']]], ['qxmppjinglecandidate',['QXmppJingleCandidate',['../classQXmppJingleCandidate.html',1,'']]], ['qxmppjingleiq',['QXmppJingleIq',['../classQXmppJingleIq.html',1,'']]], ['qxmppjinglepayloadtype',['QXmppJinglePayloadType',['../classQXmppJinglePayloadType.html',1,'']]], ['qxmpploggable',['QXmppLoggable',['../classQXmppLoggable.html',1,'']]], ['qxmpplogger',['QXmppLogger',['../classQXmppLogger.html',1,'']]], ['qxmppmessage',['QXmppMessage',['../classQXmppMessage.html',1,'']]], ['qxmppmessagereceiptmanager',['QXmppMessageReceiptManager',['../classQXmppMessageReceiptManager.html',1,'']]], ['qxmppmucadminiq',['QXmppMucAdminIq',['../classQXmppMucAdminIq.html',1,'']]], ['qxmppmucitem',['QXmppMucItem',['../classQXmppMucItem.html',1,'']]], ['qxmppmucmanager',['QXmppMucManager',['../classQXmppMucManager.html',1,'']]], ['qxmppmucowneriq',['QXmppMucOwnerIq',['../classQXmppMucOwnerIq.html',1,'']]], ['qxmppmucroom',['QXmppMucRoom',['../classQXmppMucRoom.html',1,'']]], ['qxmppoutgoingclient',['QXmppOutgoingClient',['../classQXmppOutgoingClient.html',1,'']]], ['qxmppoutgoingserver',['QXmppOutgoingServer',['../classQXmppOutgoingServer.html',1,'']]], ['qxmpppasswordchecker',['QXmppPasswordChecker',['../classQXmppPasswordChecker.html',1,'']]], ['qxmpppasswordreply',['QXmppPasswordReply',['../classQXmppPasswordReply.html',1,'']]], ['qxmpppasswordrequest',['QXmppPasswordRequest',['../classQXmppPasswordRequest.html',1,'']]], ['qxmpppresence',['QXmppPresence',['../classQXmppPresence.html',1,'']]], ['qxmpppubsubiq',['QXmppPubSubIq',['../classQXmppPubSubIq.html',1,'']]], ['qxmpppubsubitem',['QXmppPubSubItem',['../classQXmppPubSubItem.html',1,'']]], ['qxmppregisteriq',['QXmppRegisterIq',['../classQXmppRegisterIq.html',1,'']]], ['qxmppresultsetquery',['QXmppResultSetQuery',['../classQXmppResultSetQuery.html',1,'']]], ['qxmppresultsetreply',['QXmppResultSetReply',['../classQXmppResultSetReply.html',1,'']]], ['qxmpprosteriq',['QXmppRosterIq',['../classQXmppRosterIq.html',1,'']]], ['qxmpprostermanager',['QXmppRosterManager',['../classQXmppRosterManager.html',1,'']]], ['qxmpprpcinvokeiq',['QXmppRpcInvokeIq',['../classQXmppRpcInvokeIq.html',1,'']]], ['qxmpprpcmanager',['QXmppRpcManager',['../classQXmppRpcManager.html',1,'']]], ['qxmpprpcresponseiq',['QXmppRpcResponseIq',['../classQXmppRpcResponseIq.html',1,'']]], ['qxmpprtpaudiochannel',['QXmppRtpAudioChannel',['../classQXmppRtpAudioChannel.html',1,'']]], ['qxmpprtppacket',['QXmppRtpPacket',['../classQXmppRtpPacket.html',1,'']]], ['qxmpprtpvideochannel',['QXmppRtpVideoChannel',['../classQXmppRtpVideoChannel.html',1,'']]], ['qxmppserver',['QXmppServer',['../classQXmppServer.html',1,'']]], ['qxmppserverextension',['QXmppServerExtension',['../classQXmppServerExtension.html',1,'']]], ['qxmppserverplugin',['QXmppServerPlugin',['../classQXmppServerPlugin.html',1,'']]], ['qxmppsessioniq',['QXmppSessionIq',['../classQXmppSessionIq.html',1,'']]], ['qxmppsslserver',['QXmppSslServer',['../classQXmppSslServer.html',1,'']]], ['qxmppstanza',['QXmppStanza',['../classQXmppStanza.html',1,'']]], ['qxmppstream',['QXmppStream',['../classQXmppStream.html',1,'']]], ['qxmpptransferjob',['QXmppTransferJob',['../classQXmppTransferJob.html',1,'']]], ['qxmpptransfermanager',['QXmppTransferManager',['../classQXmppTransferManager.html',1,'']]], ['qxmpputils',['QXmppUtils',['../classQXmppUtils.html',1,'']]], ['qxmppvcardaddress',['QXmppVCardAddress',['../classQXmppVCardAddress.html',1,'']]], ['qxmppvcardemail',['QXmppVCardEmail',['../classQXmppVCardEmail.html',1,'']]], ['qxmppvcardiq',['QXmppVCardIq',['../classQXmppVCardIq.html',1,'']]], ['qxmppvcardmanager',['QXmppVCardManager',['../classQXmppVCardManager.html',1,'']]], ['qxmppvcardphone',['QXmppVCardPhone',['../classQXmppVCardPhone.html',1,'']]], ['qxmppversioniq',['QXmppVersionIq',['../classQXmppVersionIq.html',1,'']]], ['qxmppversionmanager',['QXmppVersionManager',['../classQXmppVersionManager.html',1,'']]], ['qxmppvideoframe',['QXmppVideoFrame',['../classQXmppVideoFrame.html',1,'']]] ]; qxmpp-0.7.6/doc/html/search/enumvalues_73.js0000644000175000007640000000343612116723632020633 0ustar sharkyjerrywebvar searchData= [ ['sentmessage',['SentMessage',['../classQXmppLogger.html#a932dbbd4f70a1e9c0ff8f452e61fc9b8ad1c7d954320b318802468a0655e81b42',1,'QXmppLogger']]], ['serverreflexivetype',['ServerReflexiveType',['../classQXmppJingleCandidate.html#a6314b3ed7de59b68131db6ffab55fe7dadd47f88f0d90666a9b5768c70e407c7f',1,'QXmppJingleCandidate']]], ['set',['Set',['../classQXmppIq.html#a6bc7a0505a3be7309051ae2432a3d826a3dc74d347c7b00a2a1cd3b02b4cfd7b0',1,'QXmppIq']]], ['signallogging',['SignalLogging',['../classQXmppLogger.html#a9a52fe426322ef8e10e05b7092be6c20ab2099e2e223040f603936071cc71b462',1,'QXmppLogger']]], ['socketerror',['SocketError',['../classQXmppClient.html#a7c2851d07cc33119752abc6ec8ffc47aac48e9688ca9dce21676283ada1172863',1,'QXmppClient']]], ['socksmethod',['SocksMethod',['../classQXmppTransferJob.html#a962582d3049909305277e54e2095c71ba81571d8573b2003f6f3a66fcda644815',1,'QXmppTransferJob']]], ['startstate',['StartState',['../classQXmppTransferJob.html#aab5bb06ca0d2c4f1fac33b7012d1c14faab96ac5cd1310e66c6048512f0846d66',1,'QXmppTransferJob']]], ['stdoutlogging',['StdoutLogging',['../classQXmppLogger.html#a9a52fe426322ef8e10e05b7092be6c20acd51c8c54ebb5284752f224c69709998',1,'QXmppLogger']]], ['subjectaction',['SubjectAction',['../classQXmppMucRoom.html#acd3129293f69d7e7cdd91b65aae0606fa1b691dc1004e867aa844ba380bb383ad',1,'QXmppMucRoom']]], ['submit',['Submit',['../classQXmppDataForm.html#adab12c436b8c450e2b4f59da1aecadeeae6ab517a99b8c387056bd5d341de4082',1,'QXmppDataForm']]], ['subscribe',['Subscribe',['../classQXmppPresence.html#a47ab8dd08436f9d7c90d2990678b5a6da27a106dd1fc50ecdba0ad9b95307ce62',1,'QXmppPresence']]], ['subscribed',['Subscribed',['../classQXmppPresence.html#a47ab8dd08436f9d7c90d2990678b5a6da59304e64fb15ce69c9395f6d217dcb6b',1,'QXmppPresence']]] ]; qxmpp-0.7.6/doc/html/search/functions_72.js0000644000175000007640000001126112116723632020451 0ustar sharkyjerrywebvar searchData= [ ['readframes',['readFrames',['../classQXmppRtpVideoChannel.html#a2d2c5854406f34fedbd10d6096428493',1,'QXmppRtpVideoChannel']]], ['reason',['reason',['../classQXmppJingleIq.html#a0109cfd1525f9ee69a40ae0ce3962d69',1,'QXmppJingleIq::reason()'],['../classQXmppJingleIq.html#a9027b28bc5f929ee415f0de50563cac7',1,'QXmppJingleIq::reason() const '],['../classQXmppMucItem.html#a7b5574030b7bb253c23ccf46fffde87e',1,'QXmppMucItem::reason()']]], ['receiptid',['receiptId',['../classQXmppMessage.html#a3df33f75c06de9a3fbe3897ca89893db',1,'QXmppMessage']]], ['refusesubscription',['refuseSubscription',['../classQXmppRosterManager.html#a9e9ffd157b981d1fb4a3b641de2890c7',1,'QXmppRosterManager']]], ['region',['region',['../classQXmppVCardAddress.html#a02bd9c333ef0d1d3eac3853bb8391849',1,'QXmppVCardAddress']]], ['remotedomain',['remoteDomain',['../classQXmppOutgoingServer.html#acf167e9cf078b1ee9ef80fd2d3ac0b83',1,'QXmppOutgoingServer']]], ['removecollections',['removeCollections',['../classQXmppArchiveManager.html#a3de27735449b3fb10a1e85032ed3e0b6',1,'QXmppArchiveManager']]], ['removeextension',['removeExtension',['../classQXmppClient.html#ae48477dc92abd66193789bfc60d16d62',1,'QXmppClient']]], ['removeitem',['removeItem',['../classQXmppRosterManager.html#a0ac3bd1ee2cbe8e99c3da55f9423fe20',1,'QXmppRosterManager']]], ['renameitem',['renameItem',['../classQXmppRosterManager.html#a65ecf5954b56e1d38be5b3554c4e3f30',1,'QXmppRosterManager']]], ['reopen',['reopen',['../classQXmppLogger.html#a18ebf48f34358d20dd57502a9db2f0c0',1,'QXmppLogger']]], ['requestclientvcard',['requestClientVCard',['../classQXmppVCardManager.html#a3f049d6356f93f5f8fa81a1c30ea5ba9',1,'QXmppVCardManager']]], ['requestconfiguration',['requestConfiguration',['../classQXmppMucRoom.html#ab20d3d15a70354d109d1f30a13c8c1df',1,'QXmppMucRoom']]], ['requestinfo',['requestInfo',['../classQXmppDiscoveryManager.html#a81facc7b29132ee7f13c26d8d441e611',1,'QXmppDiscoveryManager']]], ['requestitems',['requestItems',['../classQXmppDiscoveryManager.html#ac6b173d943634603beeb43c15609efe4',1,'QXmppDiscoveryManager']]], ['requestpermissions',['requestPermissions',['../classQXmppMucRoom.html#a8b7cb2b8755a8cd18bf0d98cb3c3a0aa',1,'QXmppMucRoom']]], ['requesttime',['requestTime',['../classQXmppEntityTimeManager.html#ab6cb76de7eb717bb8f332b7ed643fb7b',1,'QXmppEntityTimeManager']]], ['requestvcard',['requestVCard',['../classQXmppVCardManager.html#a71c114c5375575004bd1e2593aff0ba9',1,'QXmppVCardManager']]], ['requestversion',['requestVersion',['../classQXmppVersionManager.html#ae63fec70ad9b12cb585cb2d46b8e1406',1,'QXmppVersionManager']]], ['reserveports',['reservePorts',['../classQXmppIceComponent.html#a1fc342ff0fa196320b86a2c1413b33fc',1,'QXmppIceComponent']]], ['resource',['resource',['../classQXmppBindIq.html#ac6aa0a84579d18f28196301a774a6e42',1,'QXmppBindIq::resource()'],['../classQXmppConfiguration.html#ad6969bdce483c31e1196ffb0cca800f3',1,'QXmppConfiguration::resource()']]], ['responder',['responder',['../classQXmppJingleIq.html#ad77bd95c596dbef85b9d84ff72fb4716',1,'QXmppJingleIq']]], ['resultsetquery',['resultSetQuery',['../classQXmppArchiveListIq.html#aed31e99a9387ef300bf91564f83f2e84',1,'QXmppArchiveListIq::resultSetQuery()'],['../classQXmppArchiveRetrieveIq.html#a927c46455efcff2fb9221f9246fcf629',1,'QXmppArchiveRetrieveIq::resultSetQuery()']]], ['resultsetreply',['resultSetReply',['../classQXmppArchiveChatIq.html#a63d9405b2b4c4b0573905a2e52a95c96',1,'QXmppArchiveChatIq::resultSetReply()'],['../classQXmppArchiveListIq.html#a47bb290958acb0721b35bb51161fa1da',1,'QXmppArchiveListIq::resultSetReply()']]], ['retrievecollection',['retrieveCollection',['../classQXmppArchiveManager.html#a5a8584a4dfb0c2fa8bb0e85690c269f9',1,'QXmppArchiveManager::retrieveCollection(const QString &jid, const QDateTime &start, const QXmppResultSetQuery &rsm=QXmppResultSetQuery())'],['../classQXmppArchiveManager.html#a7967bec8510af778f581d3232193895f',1,'QXmppArchiveManager::retrieveCollection(const QString &jid, const QDateTime &start, int max)']]], ['ringing',['ringing',['../classQXmppJingleIq.html#a2cc94c4e2e8dec892d8388aca47b0268',1,'QXmppJingleIq::ringing()'],['../classQXmppCall.html#ac661611e7d0bf5ebcdf56a28d60a95aa',1,'QXmppCall::ringing()']]], ['role',['role',['../classQXmppMucItem.html#af65444d3b29bbb8d78b4d25aa8f02894',1,'QXmppMucItem']]], ['roomadded',['roomAdded',['../classQXmppMucManager.html#a948446ebb49b07e772d8a70a0b8e71e6',1,'QXmppMucManager']]], ['rostermanager',['rosterManager',['../classQXmppClient.html#a6a0bb409bad66a4f5ea91056ee190ad4',1,'QXmppClient']]], ['rosterreceived',['rosterReceived',['../classQXmppRosterManager.html#a978cf900248b0ef144460bb52052ded8',1,'QXmppRosterManager']]] ]; qxmpp-0.7.6/doc/html/search/enums_74.js0000644000175000007640000000220412116723632017567 0ustar sharkyjerrywebvar searchData= [ ['tone',['Tone',['../classQXmppRtpAudioChannel.html#a745ea21f875f4e92b1f361d4cf57e49d',1,'QXmppRtpAudioChannel']]], ['type',['Type',['../classQXmppDataForm_1_1Field.html#a2de5e3af9b018b97d450797f7e4a3b44',1,'QXmppDataForm::Field::Type()'],['../classQXmppDataForm.html#adab12c436b8c450e2b4f59da1aecadee',1,'QXmppDataForm::Type()'],['../classQXmppIq.html#a6bc7a0505a3be7309051ae2432a3d826',1,'QXmppIq::Type()'],['../classQXmppJingleCandidate.html#a6314b3ed7de59b68131db6ffab55fe7d',1,'QXmppJingleCandidate::Type()'],['../classQXmppMessage.html#ac91ae4671526e44e51b18449005b224b',1,'QXmppMessage::Type()'],['../classQXmppPresence.html#a47ab8dd08436f9d7c90d2990678b5a6d',1,'QXmppPresence::Type()'],['../classQXmppPasswordRequest.html#aeeb83aba2b10a05e048567b664b25480',1,'QXmppPasswordRequest::Type()']]], ['typeflag',['TypeFlag',['../classQXmppVCardAddress.html#a0531f1270cfc57552675eaebac3925c5',1,'QXmppVCardAddress::TypeFlag()'],['../classQXmppVCardEmail.html#a0fd95f17b45f937d0fd6d28daddc7278',1,'QXmppVCardEmail::TypeFlag()'],['../classQXmppVCardPhone.html#a55acc02360d6324e394f5ad40b5d06f3',1,'QXmppVCardPhone::TypeFlag()']]] ]; qxmpp-0.7.6/doc/html/search/functions_7e.js0000644000175000007640000000567012116723632020543 0ustar sharkyjerrywebvar searchData= [ ['_7efield',['~Field',['../classQXmppDataForm_1_1Field.html#a72679dafc25450a90d43494c26c542d0',1,'QXmppDataForm::Field']]], ['_7emedia',['~Media',['../classQXmppDataForm_1_1Media.html#a2f0290da439f828807dd45d1f4b38865',1,'QXmppDataForm::Media']]], ['_7eqxmppbookmarkmanager',['~QXmppBookmarkManager',['../classQXmppBookmarkManager.html#a5d5294bcee83048ec5272e6040e58805',1,'QXmppBookmarkManager']]], ['_7eqxmppcallmanager',['~QXmppCallManager',['../classQXmppCallManager.html#a6fdc1b088d34337037cc0848f3142322',1,'QXmppCallManager']]], ['_7eqxmppclient',['~QXmppClient',['../classQXmppClient.html#ac3827e343aa04eefe030d9307b273f08',1,'QXmppClient']]], ['_7eqxmppclientextension',['~QXmppClientExtension',['../classQXmppClientExtension.html#aea624caf2d98d86307c08ed89bd7bc02',1,'QXmppClientExtension']]], ['_7eqxmppconfiguration',['~QXmppConfiguration',['../classQXmppConfiguration.html#ae507ac0321a6524f137cf092974110a5',1,'QXmppConfiguration']]], ['_7eqxmppdataform',['~QXmppDataForm',['../classQXmppDataForm.html#ad9dfe6f5def82059d3e1e1d1d33a3009',1,'QXmppDataForm']]], ['_7eqxmppicecomponent',['~QXmppIceComponent',['../classQXmppIceComponent.html#a4c0a9ef7f9b22b1f4b6f93d434161d1a',1,'QXmppIceComponent']]], ['_7eqxmppincomingclient',['~QXmppIncomingClient',['../classQXmppIncomingClient.html#a578ae75e301798586e5b834bb4e6bb7b',1,'QXmppIncomingClient']]], ['_7eqxmppincomingserver',['~QXmppIncomingServer',['../classQXmppIncomingServer.html#a04744b31a4410d707507bcd88faf0e60',1,'QXmppIncomingServer']]], ['_7eqxmppinvokable',['~QXmppInvokable',['../classQXmppInvokable.html#a84024f3ebe4430972a38d52cefd6c4a7',1,'QXmppInvokable']]], ['_7eqxmppmucmanager',['~QXmppMucManager',['../classQXmppMucManager.html#a60c885a399851db5e289fddd34590110',1,'QXmppMucManager']]], ['_7eqxmppmucroom',['~QXmppMucRoom',['../classQXmppMucRoom.html#a81a85ceb530d46a94d5684275c04af4d',1,'QXmppMucRoom']]], ['_7eqxmppoutgoingclient',['~QXmppOutgoingClient',['../classQXmppOutgoingClient.html#a8b857ffc61518bb81dba4bd55e676849',1,'QXmppOutgoingClient']]], ['_7eqxmppoutgoingserver',['~QXmppOutgoingServer',['../classQXmppOutgoingServer.html#afd6d6746c38cc82f4480a7200fc2f344',1,'QXmppOutgoingServer']]], ['_7eqxmpppresence',['~QXmppPresence',['../classQXmppPresence.html#ab52ba0f4a3b8b376f9ef4e013c7bc39c',1,'QXmppPresence']]], ['_7eqxmpprtpaudiochannel',['~QXmppRtpAudioChannel',['../classQXmppRtpAudioChannel.html#a19cd135f544e842afa02f855cc30bc7b',1,'QXmppRtpAudioChannel']]], ['_7eqxmppserver',['~QXmppServer',['../classQXmppServer.html#a6e31eea84792610a37b5c783df367c08',1,'QXmppServer']]], ['_7eqxmppsslserver',['~QXmppSslServer',['../classQXmppSslServer.html#adab126f5acc840119ac59d56a8751921',1,'QXmppSslServer']]], ['_7eqxmppstanza',['~QXmppStanza',['../classQXmppStanza.html#aa6d167337d24b0fdaae6ca48b69a45ca',1,'QXmppStanza']]], ['_7eqxmppstream',['~QXmppStream',['../classQXmppStream.html#a8a098aac2a88061c1d5e86f2de99d963',1,'QXmppStream']]] ]; qxmpp-0.7.6/doc/html/search/functions_65.js0000644000175000007640000000505512116723632020457 0ustar sharkyjerrywebvar searchData= [ ['elementreceived',['elementReceived',['../classQXmppOutgoingClient.html#a9be28568b016d24502d2f766cf42cbba',1,'QXmppOutgoingClient::elementReceived()'],['../classQXmppIncomingClient.html#a6797577d34078238df80380b68e68aa8',1,'QXmppIncomingClient::elementReceived()'],['../classQXmppIncomingServer.html#a79308b406dc7b6a69e08f18fb6587bcc',1,'QXmppIncomingServer::elementReceived()']]], ['email',['email',['../classQXmppRegisterIq.html#a3f65ada262f8fcc9165fec6b9074408a',1,'QXmppRegisterIq::email()'],['../classQXmppVCardIq.html#afdbb733f0ea07c2ff47ad4cac30b0cad',1,'QXmppVCardIq::email()']]], ['emails',['emails',['../classQXmppVCardIq.html#a026d0950efc37e130f7bc27e88fb0386',1,'QXmppVCardIq']]], ['encode',['encode',['../classQXmppRtpPacket.html#aedc497730691065d46997202cfb78000',1,'QXmppRtpPacket']]], ['encoderformat',['encoderFormat',['../classQXmppRtpVideoChannel.html#ab3660ef26a4af0b91fbf199cf78e186b',1,'QXmppRtpVideoChannel']]], ['end',['end',['../classQXmppArchiveListIq.html#ab7dbb598303422e752b6c3a4e862a273',1,'QXmppArchiveListIq::end()'],['../classQXmppArchiveRemoveIq.html#adb6af974e8ec8891583644d3de6cf6ed',1,'QXmppArchiveRemoveIq::end()']]], ['error',['error',['../classQXmppStanza.html#a5ac3402fcc210cbc5a9a98501637bbc6',1,'QXmppStanza::error()'],['../classQXmppClient.html#a2bac100e40a909c860a3397643349937',1,'QXmppClient::error()'],['../classQXmppMucRoom.html#a0ff76d3091de98d7228e64ecaa954d42',1,'QXmppMucRoom::error()'],['../classQXmppOutgoingClient.html#a14d8a6c2a48c1ed6a2716002c0a29d21',1,'QXmppOutgoingClient::error()'],['../classQXmppTransferJob.html#a12fb2a7201244f6f506894f24b31f518',1,'QXmppTransferJob::error() const '],['../classQXmppTransferJob.html#a84198613e944168769b20357cfe2f626',1,'QXmppTransferJob::error()'],['../classQXmppPasswordReply.html#a08cd9a5b26a5281a2fea4f16a87aa0de',1,'QXmppPasswordReply::error()']]], ['extendedaddresses',['extendedAddresses',['../classQXmppStanza.html#af2fb9de2e719e1312a33554b3866e0c6',1,'QXmppStanza']]], ['extensionname',['extensionName',['../classQXmppServerExtension.html#ae70b92e5a9f709ea25a3e54ec1bcbc5b',1,'QXmppServerExtension']]], ['extensionpriority',['extensionPriority',['../classQXmppServerExtension.html#a86c839fe03a4ec667878148eca0782f7',1,'QXmppServerExtension']]], ['extensions',['extensions',['../classQXmppStanza.html#a4742b3dc8dee132244107910ae8d1603',1,'QXmppStanza::extensions()'],['../classQXmppClient.html#aaa12f4be9ab48f0c9375479ecd7172e9',1,'QXmppClient::extensions()'],['../classQXmppServer.html#a51e1fb51eedb4f6ad645cfc4acc9926e',1,'QXmppServer::extensions()']]] ]; qxmpp-0.7.6/doc/html/search/properties_73.html0000644000175000007640000000171312116723632021167 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/classes_71.html0000644000175000007640000000171012116723632020423 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/functions_73.html0000644000175000007640000000171212116723632021002 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/all_6d.html0000644000175000007640000000170412116723632017623 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/enumvalues_73.html0000644000175000007640000000171312116723632021157 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/enums_65.html0000644000175000007640000000170612116723632020125 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/enums_71.html0000644000175000007640000000170612116723632020122 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/functions_61.html0000644000175000007640000000171212116723632020777 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/functions_76.html0000644000175000007640000000171212116723632021005 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/all_70.js0000644000175000007640000001264612116723632017217 0ustar sharkyjerrywebvar searchData= [ ['parameters',['parameters',['../classQXmppJinglePayloadType.html#aab01af2f379b0b1b96fea2c8dcbdd2ce',1,'QXmppJinglePayloadType']]], ['paramtypes',['paramTypes',['../classQXmppInvokable.html#af45f378146e76bd487c7bc22c173d5b4',1,'QXmppInvokable']]], ['participantadded',['participantAdded',['../classQXmppMucRoom.html#a524f76903e60e14a3163301a3cd6d792',1,'QXmppMucRoom']]], ['participantchanged',['participantChanged',['../classQXmppMucRoom.html#a12bc2e165a6bd721ecf79a3fe9480176',1,'QXmppMucRoom']]], ['participantfulljid',['participantFullJid',['../classQXmppMucRoom.html#a93fb5f2febc9cfb57b445d1d3b57d1d3',1,'QXmppMucRoom']]], ['participantpresence',['participantPresence',['../classQXmppMucRoom.html#af97a30f3f832a294cadd7b8644a1f441',1,'QXmppMucRoom']]], ['participantremoved',['participantRemoved',['../classQXmppMucRoom.html#a161afb360c1cd19819bfeb0579b9c940',1,'QXmppMucRoom']]], ['participants',['participants',['../classQXmppMucRoom.html#a8ebbaed22c263503552704ce308d8c42',1,'QXmppMucRoom']]], ['password',['password',['../classQXmppMucRoom.html#a823200ee661315b757accce9da0313eb',1,'QXmppMucRoom::password()'],['../classQXmppRegisterIq.html#a872b0576ecc47c3a3348f14790f13792',1,'QXmppRegisterIq::password()'],['../classQXmppConfiguration.html#ab03c0b84b6b866b10b562d0aded91140',1,'QXmppConfiguration::password()'],['../classQXmppPasswordRequest.html#abf2cc449121ce4ff2aafbe62cfe58401',1,'QXmppPasswordRequest::password()'],['../classQXmppPasswordReply.html#a9c219de5968b48f50722cee227bd9a9e',1,'QXmppPasswordReply::password()']]], ['passwordchecker',['passwordChecker',['../classQXmppServer.html#af4cc5e7fe77e1593e391bb5679a7c8f5',1,'QXmppServer']]], ['paused',['Paused',['../classQXmppMessage.html#aeaa3cc5ccb7d451067a80dd1f3c7099aac05ed50993dc8450e49249db87c809cf',1,'QXmppMessage']]], ['payload',['payload',['../classQXmppRtpPacket.html#ac51105e2aeb00fc3a4c7db69a1bb7cc1',1,'QXmppRtpPacket']]], ['payloadtype',['payloadType',['../classQXmppRtpAudioChannel.html#a9b902a64c3cae0cfed07fece17c737e8',1,'QXmppRtpAudioChannel']]], ['peerreflexivetype',['PeerReflexiveType',['../classQXmppJingleCandidate.html#a6314b3ed7de59b68131db6ffab55fe7daa8c05f2daae9c29c2d066c54d3b8673c',1,'QXmppJingleCandidate']]], ['permissionsaction',['PermissionsAction',['../classQXmppMucRoom.html#acd3129293f69d7e7cdd91b65aae0606fa47093bf22ebdf16142a7711c31e8b508',1,'QXmppMucRoom']]], ['permissionsreceived',['permissionsReceived',['../classQXmppMucRoom.html#abc6d62be447548fe9f60a9a478d35028',1,'QXmppMucRoom']]], ['phones',['phones',['../classQXmppVCardIq.html#ab9e923c99ee711143e06c12c250d677a',1,'QXmppVCardIq']]], ['photo',['photo',['../classQXmppVCardIq.html#a2046fd196e2b337ac2d292ca0e7635be',1,'QXmppVCardIq']]], ['photohash',['photoHash',['../classQXmppPresence.html#a2013bdab8a80ef7ed1c765d00f81ef86',1,'QXmppPresence']]], ['phototype',['photoType',['../classQXmppVCardIq.html#abc90cf1d0ea643f4c993ca7614420b9e',1,'QXmppVCardIq']]], ['pixelformat',['pixelFormat',['../classQXmppVideoFrame.html#a55c875a1341fac1b907879fa24486674',1,'QXmppVideoFrame::pixelFormat() const '],['../classQXmppVideoFrame.html#a55cceb24be43a12d0d410a2a6b51c1fe',1,'QXmppVideoFrame::PixelFormat()']]], ['port',['port',['../classQXmppJingleCandidate.html#a4c7d8743389a252f7c81265df38bf7bd',1,'QXmppJingleCandidate::port()'],['../classQXmppConfiguration.html#aeca9614e66fb88a6967ebe6381e25fb7',1,'QXmppConfiguration::port()']]], ['pos',['pos',['../classQXmppRtpAudioChannel.html#adae378ae5cea29ee0f9054566723103d',1,'QXmppRtpAudioChannel']]], ['postcode',['postcode',['../classQXmppVCardAddress.html#a8bc8dc20efe2bb52a697065712dd190c',1,'QXmppVCardAddress']]], ['presencechanged',['presenceChanged',['../classQXmppRosterManager.html#ac95dd87aaa2c4cb61aa6ead2a17bc56e',1,'QXmppRosterManager']]], ['presencereceived',['presenceReceived',['../classQXmppClient.html#a10499b67cd25eed16f83118837fc5c29',1,'QXmppClient::presenceReceived()'],['../classQXmppOutgoingClient.html#a242817c83ce02d6f3c1956bfd15c3b15',1,'QXmppOutgoingClient::presenceReceived()']]], ['presencesubscribers',['presenceSubscribers',['../classQXmppServerExtension.html#a942c0a8411cabb7b4e13760e01e1ab70',1,'QXmppServerExtension']]], ['presencesubscriptions',['presenceSubscriptions',['../classQXmppServerExtension.html#a7340a5b3458e991b47dbd413ccaf13c4',1,'QXmppServerExtension']]], ['priority',['priority',['../classQXmppJingleCandidate.html#abb44c0e24dafc2a13eca85786b573d9f',1,'QXmppJingleCandidate::priority()'],['../classQXmppPresence.html#a0411a54e3f20e42b7511efa4f02e36bb',1,'QXmppPresence::priority()']]], ['probe',['Probe',['../classQXmppPresence.html#a47ab8dd08436f9d7c90d2990678b5a6da78bd49bb7dff200e67b1584aee994cd8',1,'QXmppPresence']]], ['progress',['progress',['../classQXmppTransferJob.html#a571b9a67cf4ad6d573c58a3039bb0433',1,'QXmppTransferJob']]], ['protocol',['protocol',['../classQXmppJingleCandidate.html#a6b23d5174e9b0d5a4fcbe701e46dd5d0',1,'QXmppJingleCandidate']]], ['protocolerror',['ProtocolError',['../classQXmppTransferJob.html#abacb5103efd8148e13b9c616113366bdaa807924ebe3990ef06e567113ded0c4d',1,'QXmppTransferJob']]], ['proxy',['proxy',['../classQXmppTransferManager.html#a36e5597ad06a669e4eb136862f142e7d',1,'QXmppTransferManager']]], ['proxyonly',['proxyOnly',['../classQXmppTransferManager.html#ad68788ad3eddce442b2b2e231021c24e',1,'QXmppTransferManager']]], ['ptime',['ptime',['../classQXmppJinglePayloadType.html#a563e28e2153570ea936e1bf9c13cbbd7',1,'QXmppJinglePayloadType']]] ]; qxmpp-0.7.6/doc/html/search/functions_63.html0000644000175000007640000000171212116723632021001 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/all_74.html0000644000175000007640000000170412116723632017544 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/enumvalues_76.js0000644000175000007640000000146712116723632020640 0ustar sharkyjerrywebvar searchData= [ ['vcardupdatenone',['VCardUpdateNone',['../classQXmppPresence.html#a642a378dd425bbbda1de4317e2dcd199ade94d49098994f9d9c63a2e3b26e85fe',1,'QXmppPresence']]], ['vcardupdatenophoto',['VCardUpdateNoPhoto',['../classQXmppPresence.html#a642a378dd425bbbda1de4317e2dcd199a4d3c48d73da192a0054d24633622f564',1,'QXmppPresence']]], ['vcardupdatenotready',['VCardUpdateNotReady',['../classQXmppPresence.html#a642a378dd425bbbda1de4317e2dcd199a628f45cf1da766418d773f83ba48af50',1,'QXmppPresence']]], ['vcardupdatevalidphoto',['VCardUpdateValidPhoto',['../classQXmppPresence.html#a642a378dd425bbbda1de4317e2dcd199a77b3104e5b50933e952dd82740bbe703',1,'QXmppPresence']]], ['verify',['Verify',['../classQXmppDialback.html#a0448107c56f892056f359013b80798bcab04f60abfc5f6b6e0f3166e285dd78c6',1,'QXmppDialback']]] ]; qxmpp-0.7.6/doc/html/search/all_65.html0000644000175000007640000000170412116723632017544 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/variables_70.js0000644000175000007640000000020412116723632020402 0ustar sharkyjerrywebvar searchData= [ ['payload',['payload',['../classQXmppRtpPacket.html#ac51105e2aeb00fc3a4c7db69a1bb7cc1',1,'QXmppRtpPacket']]] ]; qxmpp-0.7.6/doc/html/search/groups_63.js0000644000175000007640000000010612116723632017754 0ustar sharkyjerrywebvar searchData= [ ['core',['Core',['../group__Core.html',1,'']]] ]; qxmpp-0.7.6/doc/html/search/functions_77.js0000644000175000007640000000205612116723632020460 0ustar sharkyjerrywebvar searchData= [ ['warning',['warning',['../classQXmppLoggable.html#aed6488cb2ca9c636876e2444c635bd72',1,'QXmppLoggable']]], ['width',['width',['../classQXmppDataForm_1_1Media.html#a355906089937067230b86d5b67d72db7',1,'QXmppDataForm::Media::width()'],['../classQXmppVideoFrame.html#a07853c0f2b50643a87473889cf0447e1',1,'QXmppVideoFrame::width()']]], ['windowsliveaccesstoken',['windowsLiveAccessToken',['../classQXmppConfiguration.html#a96dac8e5867395e4229a57de23ce518b',1,'QXmppConfiguration']]], ['with',['with',['../classQXmppArchiveChat.html#ae44837a0cdc501426ed70c469f9f6eb4',1,'QXmppArchiveChat::with()'],['../classQXmppArchiveListIq.html#a3609669356d73ed933d874c15fbf0847',1,'QXmppArchiveListIq::with()'],['../classQXmppArchiveRemoveIq.html#ab815858ab3ae0a318e0b53269c7cfa48',1,'QXmppArchiveRemoveIq::with()'],['../classQXmppArchiveRetrieveIq.html#a034e30ec531789a1f77512a9001693b5',1,'QXmppArchiveRetrieveIq::with()']]], ['writeframe',['writeFrame',['../classQXmppRtpVideoChannel.html#a17673e645003e0ee9b011f7a8bcc8f64',1,'QXmppRtpVideoChannel']]] ]; qxmpp-0.7.6/doc/html/search/enumvalues_6e.js0000644000175000007640000000335312116723632020712 0ustar sharkyjerrywebvar searchData= [ ['noaction',['NoAction',['../classQXmppMucRoom.html#acd3129293f69d7e7cdd91b65aae0606fa12d272fee016d8ad12bea4dc36d38f63',1,'QXmppMucRoom']]], ['noerror',['NoError',['../classQXmppClient.html#a7c2851d07cc33119752abc6ec8ffc47aa0432617a6e27c34202bdac7c5356299f',1,'QXmppClient::NoError()'],['../classQXmppTransferJob.html#abacb5103efd8148e13b9c616113366bdad8a530831e3758a4fd70dbfa5c49dc46',1,'QXmppTransferJob::NoError()']]], ['nologging',['NoLogging',['../classQXmppLogger.html#a9a52fe426322ef8e10e05b7092be6c20a8fcce12c247bbc876e5d97299430deb6',1,'QXmppLogger']]], ['nomessage',['NoMessage',['../classQXmppLogger.html#a932dbbd4f70a1e9c0ff8f452e61fc9b8aa1be17c113c6f22b82805e538c12cec9',1,'QXmppLogger']]], ['nomethod',['NoMethod',['../classQXmppTransferJob.html#a962582d3049909305277e54e2095c71ba6f69806ddd747d2d09d26f6642ac21e6',1,'QXmppTransferJob']]], ['none',['None',['../classQXmppDataForm.html#adab12c436b8c450e2b4f59da1aecadeea3239da22ddd2cfa5e6052d617cb7545f',1,'QXmppDataForm::None()'],['../classQXmppMessage.html#aeaa3cc5ccb7d451067a80dd1f3c7099aabe52ccd452233405cb3a9f86ce086236',1,'QXmppMessage::None()'],['../classQXmppRosterIq_1_1Item.html#a0133cf9262cec7e299c4db7c247c5514a57718bbef43da7d46f4c51473cf8dd81',1,'QXmppRosterIq::Item::None()']]], ['nonsasldigest',['NonSASLDigest',['../classQXmppConfiguration.html#acdc5d816a74551209d5c50557e90fda2a97f33f490ab3d0bfdf717037551a62a3',1,'QXmppConfiguration']]], ['nonsaslplain',['NonSASLPlain',['../classQXmppConfiguration.html#acdc5d816a74551209d5c50557e90fda2a1edaa0616b19f8d6f7a711f37f672762',1,'QXmppConfiguration']]], ['notset',['NotSet',['../classQXmppRosterIq_1_1Item.html#a0133cf9262cec7e299c4db7c247c5514a5cbc5c1d6fd784f7c17437c7b6ebe544',1,'QXmppRosterIq::Item']]] ]; qxmpp-0.7.6/doc/html/search/classes_69.js0000644000175000007640000000014212116723632020100 0ustar sharkyjerrywebvar searchData= [ ['item',['Item',['../classQXmppRosterIq_1_1Item.html',1,'QXmppRosterIq']]] ]; qxmpp-0.7.6/doc/html/search/variables_6d.js0000644000175000007640000000020212116723632020463 0ustar sharkyjerrywebvar searchData= [ ['marker',['marker',['../classQXmppRtpPacket.html#ae237832abd26d61c12ab07ba3ae2bd29',1,'QXmppRtpPacket']]] ]; qxmpp-0.7.6/doc/html/search/enumvalues_62.html0000644000175000007640000000171312116723632021155 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/variables_74.js0000644000175000007640000000017612116723632020416 0ustar sharkyjerrywebvar searchData= [ ['type',['type',['../classQXmppRtpPacket.html#a212785ddeef7dd84fe262106311d5b8e',1,'QXmppRtpPacket']]] ]; qxmpp-0.7.6/doc/html/search/functions_74.html0000644000175000007640000000171212116723632021003 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/enumvalues_74.js0000644000175000007640000000640712116723632020635 0ustar sharkyjerrywebvar searchData= [ ['tlsdisabled',['TLSDisabled',['../classQXmppConfiguration.html#a7c6e193a68beb792038c066cfc574a18a1af5a23c6977c4f7d639a8a8bfe3ec19',1,'QXmppConfiguration']]], ['tlsenabled',['TLSEnabled',['../classQXmppConfiguration.html#a7c6e193a68beb792038c066cfc574a18aaf3bb1e91fd95070ad94a10371b32771',1,'QXmppConfiguration']]], ['tlsrequired',['TLSRequired',['../classQXmppConfiguration.html#a7c6e193a68beb792038c066cfc574a18a3cb02f5970640730f94f516ae3924d47',1,'QXmppConfiguration']]], ['to',['To',['../classQXmppRosterIq_1_1Item.html#a0133cf9262cec7e299c4db7c247c5514af442c4841857e10e47b49915d4e19a2f',1,'QXmppRosterIq::Item']]], ['tone_5f0',['Tone_0',['../classQXmppRtpAudioChannel.html#a745ea21f875f4e92b1f361d4cf57e49da3539eb83f28862e09aaf5cb9816cc58e',1,'QXmppRtpAudioChannel']]], ['tone_5f1',['Tone_1',['../classQXmppRtpAudioChannel.html#a745ea21f875f4e92b1f361d4cf57e49daf4d7047f1e39ba473e9130a96dc39a55',1,'QXmppRtpAudioChannel']]], ['tone_5f2',['Tone_2',['../classQXmppRtpAudioChannel.html#a745ea21f875f4e92b1f361d4cf57e49da903f6e7bae2ee3764e69e9cf8e864913',1,'QXmppRtpAudioChannel']]], ['tone_5f3',['Tone_3',['../classQXmppRtpAudioChannel.html#a745ea21f875f4e92b1f361d4cf57e49daf360166f166de6500fb4fbdedd0339a7',1,'QXmppRtpAudioChannel']]], ['tone_5f4',['Tone_4',['../classQXmppRtpAudioChannel.html#a745ea21f875f4e92b1f361d4cf57e49da2af37c6aaa66caaa4847bab64525b879',1,'QXmppRtpAudioChannel']]], ['tone_5f5',['Tone_5',['../classQXmppRtpAudioChannel.html#a745ea21f875f4e92b1f361d4cf57e49da1d78e73e3e51d1fa3875a743cf8fb082',1,'QXmppRtpAudioChannel']]], ['tone_5f6',['Tone_6',['../classQXmppRtpAudioChannel.html#a745ea21f875f4e92b1f361d4cf57e49da14c206fef6136dd85cab67c72f099257',1,'QXmppRtpAudioChannel']]], ['tone_5f7',['Tone_7',['../classQXmppRtpAudioChannel.html#a745ea21f875f4e92b1f361d4cf57e49dae54661e96d93a55ec918513415e275d3',1,'QXmppRtpAudioChannel']]], ['tone_5f8',['Tone_8',['../classQXmppRtpAudioChannel.html#a745ea21f875f4e92b1f361d4cf57e49daaccb7e1fba31cd3b578cb0e5cd41ccd0',1,'QXmppRtpAudioChannel']]], ['tone_5f9',['Tone_9',['../classQXmppRtpAudioChannel.html#a745ea21f875f4e92b1f361d4cf57e49dae6a6465f376cc65bf3ea879fc952b771',1,'QXmppRtpAudioChannel']]], ['tone_5fa',['Tone_A',['../classQXmppRtpAudioChannel.html#a745ea21f875f4e92b1f361d4cf57e49da92da6ca1cd6ad13143239ee687de24b5',1,'QXmppRtpAudioChannel']]], ['tone_5fb',['Tone_B',['../classQXmppRtpAudioChannel.html#a745ea21f875f4e92b1f361d4cf57e49da6a8bf924317f36f5fb2d88045a6ce49a',1,'QXmppRtpAudioChannel']]], ['tone_5fc',['Tone_C',['../classQXmppRtpAudioChannel.html#a745ea21f875f4e92b1f361d4cf57e49da0c85274383a2c7da4cb98bf76cb8e1f6',1,'QXmppRtpAudioChannel']]], ['tone_5fd',['Tone_D',['../classQXmppRtpAudioChannel.html#a745ea21f875f4e92b1f361d4cf57e49dab7b22bf8ce98ce77e2b971db563aa90a',1,'QXmppRtpAudioChannel']]], ['tone_5fpound',['Tone_Pound',['../classQXmppRtpAudioChannel.html#a745ea21f875f4e92b1f361d4cf57e49da468bf817f3dcf911333d119a8badbbe0',1,'QXmppRtpAudioChannel']]], ['tone_5fstar',['Tone_Star',['../classQXmppRtpAudioChannel.html#a745ea21f875f4e92b1f361d4cf57e49da73aa7eec8acfdcce7ee6e998a5a37cb3',1,'QXmppRtpAudioChannel']]], ['transferstate',['TransferState',['../classQXmppTransferJob.html#aab5bb06ca0d2c4f1fac33b7012d1c14fabbaf0dcfacf7fcca8d8ba4eacd1e2d03',1,'QXmppTransferJob']]] ]; qxmpp-0.7.6/doc/html/search/variables_76.html0000644000175000007640000000171212116723632020745 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/all_7e.html0000644000175000007640000000170412116723632017625 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/properties_6e.js0000644000175000007640000000035012116723632020714 0ustar sharkyjerrywebvar searchData= [ ['name',['name',['../classQXmppMucRoom.html#a8cc33fb2f68adaf228a690e82705cf93',1,'QXmppMucRoom']]], ['nickname',['nickName',['../classQXmppMucRoom.html#a4206fcda2f174de64c6de1416ce516a9',1,'QXmppMucRoom']]] ]; qxmpp-0.7.6/doc/html/search/all_68.html0000644000175000007640000000170412116723632017547 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/functions_77.html0000644000175000007640000000171212116723632021006 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/enums_65.js0000644000175000007640000000051312116723632017570 0ustar sharkyjerrywebvar searchData= [ ['error',['Error',['../classQXmppClient.html#a7c2851d07cc33119752abc6ec8ffc47a',1,'QXmppClient::Error()'],['../classQXmppTransferJob.html#abacb5103efd8148e13b9c616113366bd',1,'QXmppTransferJob::Error()'],['../classQXmppPasswordReply.html#ac82ccc3fa130a75e97816c19b598da59',1,'QXmppPasswordReply::Error()']]] ]; qxmpp-0.7.6/doc/html/search/functions_6e.html0000644000175000007640000000171212116723632021063 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/enums_6c.js0000644000175000007640000000020612116723632017645 0ustar sharkyjerrywebvar searchData= [ ['loggingtype',['LoggingType',['../classQXmppLogger.html#a9a52fe426322ef8e10e05b7092be6c20',1,'QXmppLogger']]] ]; qxmpp-0.7.6/doc/html/search/all_69.html0000644000175000007640000000170412116723632017550 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/groups_6d.html0000644000175000007640000000170712116723632020375 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/properties_76.js0000644000175000007640000000017612116723632020644 0ustar sharkyjerrywebvar searchData= [ ['videomode',['videoMode',['../classQXmppCall.html#a9df3e94e7449fa1482fdc8eee56e94b6',1,'QXmppCall']]] ]; qxmpp-0.7.6/doc/html/search/classes_6d.js0000644000175000007640000000014512116723632020156 0ustar sharkyjerrywebvar searchData= [ ['media',['Media',['../classQXmppDataForm_1_1Media.html',1,'QXmppDataForm']]] ]; qxmpp-0.7.6/doc/html/search/enumvalues_66.js0000644000175000007640000000400012116723632020621 0ustar sharkyjerrywebvar searchData= [ ['fileaccesserror',['FileAccessError',['../classQXmppTransferJob.html#abacb5103efd8148e13b9c616113366bda652b0ea2df649472711951da6f837c8d',1,'QXmppTransferJob']]], ['filecorrupterror',['FileCorruptError',['../classQXmppTransferJob.html#abacb5103efd8148e13b9c616113366bdabd868969ddaa105da2320ae0e2049967',1,'QXmppTransferJob']]], ['filelogging',['FileLogging',['../classQXmppLogger.html#a9a52fe426322ef8e10e05b7092be6c20a884a47e2c6e8f005829bd52a661b38d6',1,'QXmppLogger']]], ['finishedstate',['FinishedState',['../classQXmppCall.html#a90205b5034613127d2c4adc6a0252759ace75b803223c076618b697a77320e491',1,'QXmppCall::FinishedState()'],['../classQXmppTransferJob.html#aab5bb06ca0d2c4f1fac33b7012d1c14fa4ce8417fcf9feae6a2ec2a141b4c72e5',1,'QXmppTransferJob::FinishedState()']]], ['form',['Form',['../classQXmppDataForm.html#adab12c436b8c450e2b4f59da1aecadeea7cf7ea376eb2622aee106753f21af876',1,'QXmppDataForm']]], ['format_5finvalid',['Format_Invalid',['../classQXmppVideoFrame.html#a55cceb24be43a12d0d410a2a6b51c1feac6a70fdbcdaf9e67b459109d6d326dfa',1,'QXmppVideoFrame']]], ['format_5frgb24',['Format_RGB24',['../classQXmppVideoFrame.html#a55cceb24be43a12d0d410a2a6b51c1feaecb066de219743a4073f5f68626df9d4',1,'QXmppVideoFrame']]], ['format_5frgb32',['Format_RGB32',['../classQXmppVideoFrame.html#a55cceb24be43a12d0d410a2a6b51c1fea349cbb6efdb5b6c2ae0c7dd617b5591c',1,'QXmppVideoFrame']]], ['format_5fuyvy',['Format_UYVY',['../classQXmppVideoFrame.html#a55cceb24be43a12d0d410a2a6b51c1fea3282c8c8465dcaa28edfc728898f2dcf',1,'QXmppVideoFrame']]], ['format_5fyuv420p',['Format_YUV420P',['../classQXmppVideoFrame.html#a55cceb24be43a12d0d410a2a6b51c1fea87b2a263e0b68f02831f96ef95e3f689',1,'QXmppVideoFrame']]], ['format_5fyuyv',['Format_YUYV',['../classQXmppVideoFrame.html#a55cceb24be43a12d0d410a2a6b51c1fea3b7c68f561ad9808334391f988508844',1,'QXmppVideoFrame']]], ['from',['From',['../classQXmppRosterIq_1_1Item.html#a0133cf9262cec7e299c4db7c247c5514a05fc5ab28e5f745a116caf16dbb6b387',1,'QXmppRosterIq::Item']]] ]; qxmpp-0.7.6/doc/html/search/properties_69.html0000644000175000007640000000171312116723632021174 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/all_6a.js0000644000175000007640000000361712116723632017275 0ustar sharkyjerrywebvar searchData= [ ['jid',['jid',['../classQXmppCall.html#a0b1c61fc1700b113d55b509327560104',1,'QXmppCall::jid()'],['../classQXmppMucRoom.html#a4cc3a0dc9c4fe45740d6d37320857f7c',1,'QXmppMucRoom::jid()'],['../classQXmppTransferJob.html#a9fd29edd1c42dc18699a1769ada6e05b',1,'QXmppTransferJob::jid()'],['../classQXmppBindIq.html#a97457e48e85c2ffb620934ddcc5fcd34',1,'QXmppBindIq::jid()'],['../classQXmppBookmarkConference.html#a651e92afc55ffd7901a79d007797c90f',1,'QXmppBookmarkConference::jid()'],['../classQXmppMucItem.html#aa8852e37e3adb422dde9f46289c3a3c8',1,'QXmppMucItem::jid()'],['../classQXmppExtendedAddress.html#a2b695588e9c22aa57564fab87acb6848',1,'QXmppExtendedAddress::jid()'],['../classQXmppConfiguration.html#a9733276982f4b55517e4ea739d7039a2',1,'QXmppConfiguration::jid()'],['../classQXmppIncomingClient.html#ab708ff1b465b52bb93e12941bca38486',1,'QXmppIncomingClient::jid()']]], ['jidbare',['jidBare',['../classQXmppConfiguration.html#a00c6b1ca3a1008f214f0258f6736c9ba',1,'QXmppConfiguration']]], ['jidtobarejid',['jidToBareJid',['../classQXmppUtils.html#ab3d6904c272008e64c86107221f0936e',1,'QXmppUtils']]], ['jidtodomain',['jidToDomain',['../classQXmppUtils.html#a8723c0bee318896100ab2f41ae4cd73e',1,'QXmppUtils']]], ['jidtoresource',['jidToResource',['../classQXmppUtils.html#a5248b98f6df1ba1aae3f416092819443',1,'QXmppUtils']]], ['jidtouser',['jidToUser',['../classQXmppUtils.html#a0df11be63c49dc312e417cddca3fa3e5',1,'QXmppUtils']]], ['jobfinished',['jobFinished',['../classQXmppTransferManager.html#af2dcae40840d04530e5aef97a6586188',1,'QXmppTransferManager']]], ['jobstarted',['jobStarted',['../classQXmppTransferManager.html#a2a19e77348fe9df618d7e289bbe84f21',1,'QXmppTransferManager']]], ['join',['join',['../classQXmppMucRoom.html#afd01483eb367ecfa4f1fc2828919b4c1',1,'QXmppMucRoom']]], ['joined',['joined',['../classQXmppMucRoom.html#ab01ece57f344187b5fca066051fedb81',1,'QXmppMucRoom']]] ]; qxmpp-0.7.6/doc/html/search/all_62.html0000644000175000007640000000170412116723632017541 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/functions_62.js0000644000175000007640000000302112116723632020443 0ustar sharkyjerrywebvar searchData= [ ['ban',['ban',['../classQXmppMucRoom.html#a1c4be76e72f4b3d91752e653e722ed7c',1,'QXmppMucRoom']]], ['barejid',['bareJid',['../classQXmppRosterIq_1_1Item.html#ab221fe068220e81efd0ca7ce8629b51d',1,'QXmppRosterIq::Item']]], ['before',['before',['../classQXmppResultSetQuery.html#a18330d1eaafd1d3f5ce18fc6d53956b9',1,'QXmppResultSetQuery']]], ['bind',['bind',['../classQXmppIceConnection.html#a21afce5d6bab75567edb2765fb2dce11',1,'QXmppIceConnection']]], ['birthday',['birthday',['../classQXmppVCardIq.html#a2d2a9f093833db58aa1df9603c9d2146',1,'QXmppVCardIq']]], ['bits',['bits',['../classQXmppVideoFrame.html#a969344e616ca53851d1d2fa1664f66fe',1,'QXmppVideoFrame::bits()'],['../classQXmppVideoFrame.html#a11aed117d01a623679e48c0223b13a1a',1,'QXmppVideoFrame::bits() const ']]], ['body',['body',['../classQXmppArchiveMessage.html#a050f075904b135e03f1c787f78af4d0f',1,'QXmppArchiveMessage::body()'],['../classQXmppMessage.html#aac3e82974ab462b12b4de2493dc2467c',1,'QXmppMessage::body()']]], ['bookmarks',['bookmarks',['../classQXmppBookmarkManager.html#a918afcea89ab482c2112f7cafa48eff9',1,'QXmppBookmarkManager']]], ['bookmarksreceived',['bookmarksReceived',['../classQXmppBookmarkManager.html#a6b4c3ebab3bc03e313dc3b5392394a6c',1,'QXmppBookmarkManager']]], ['bytesavailable',['bytesAvailable',['../classQXmppRtpAudioChannel.html#ab466e33fdac225754fce1403e76a67a8',1,'QXmppRtpAudioChannel']]], ['bytesperline',['bytesPerLine',['../classQXmppVideoFrame.html#a03da51f8e009d31cd57c399cf7708138',1,'QXmppVideoFrame']]] ]; qxmpp-0.7.6/doc/html/search/enumvalues_78.html0000644000175000007640000000171312116723632021164 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/properties_6d.js0000644000175000007640000000037212116723632020717 0ustar sharkyjerrywebvar searchData= [ ['messagetypes',['messageTypes',['../classQXmppLogger.html#a556ae378cb65e19460436437fa155ef2',1,'QXmppLogger']]], ['method',['method',['../classQXmppTransferJob.html#ae32e312cab4321da1a55e6caec7630e2',1,'QXmppTransferJob']]] ]; qxmpp-0.7.6/doc/html/search/classes_66.js0000644000175000007640000000014512116723632020100 0ustar sharkyjerrywebvar searchData= [ ['field',['Field',['../classQXmppDataForm_1_1Field.html',1,'QXmppDataForm']]] ]; qxmpp-0.7.6/doc/html/search/functions_6b.html0000644000175000007640000000171212116723632021060 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/enums_61.html0000644000175000007640000000170612116723632020121 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/all_69.js0000644000175000007640000001651212116723632017223 0ustar sharkyjerrywebvar searchData= [ ['id',['id',['../classQXmppJinglePayloadType.html#a7b2478ecef7063e99522f5a073275783',1,'QXmppJinglePayloadType::id()'],['../classQXmppJingleCandidate.html#a1b5b1cf42c9bddf16d251398c9d38f86',1,'QXmppJingleCandidate::id()'],['../classQXmppPubSubItem.html#a2f6465fa597d3b39c373f60dec8699e0',1,'QXmppPubSubItem::id()'],['../classQXmppStanza.html#ab9c0dbe7f86f9f222be28882617f8451',1,'QXmppStanza::id()']]], ['ignoresslerrors',['ignoreSslErrors',['../classQXmppConfiguration.html#a5b23c1bfbf43052c1de403d423967418',1,'QXmppConfiguration']]], ['inactive',['Inactive',['../classQXmppMessage.html#aeaa3cc5ccb7d451067a80dd1f3c7099aa4cdf5fff1f9cbfdc5db964fab2b1e0db',1,'QXmppMessage']]], ['inbandmethod',['InBandMethod',['../classQXmppTransferJob.html#a962582d3049909305277e54e2095c71bafce3f78618d8963f0ab9f1057408da0d',1,'QXmppTransferJob']]], ['incomingdirection',['IncomingDirection',['../classQXmppCall.html#a429a4f8065136068b6d936cb2c803175afc8bc2f0c97899f7be845547046d1aa0',1,'QXmppCall::IncomingDirection()'],['../classQXmppTransferJob.html#a9c95a89a01357588f699e7d80c3de0b6ae86106ecdfa723ac1933d75963c824ae',1,'QXmppTransferJob::IncomingDirection()']]], ['index',['index',['../classQXmppResultSetQuery.html#add1556addb86f5f2093c7062899d56de',1,'QXmppResultSetQuery::index()'],['../classQXmppResultSetReply.html#a05927e11e85a68b167fec152f5e8d3f7',1,'QXmppResultSetReply::index()']]], ['info',['info',['../classQXmppLoggable.html#ab26d53408f7ecc53a776fe2499021e03',1,'QXmppLoggable']]], ['inforeceived',['infoReceived',['../classQXmppDiscoveryManager.html#addbd7076f78b31433ed0a17bcae103ef',1,'QXmppDiscoveryManager']]], ['informationmessage',['InformationMessage',['../classQXmppLogger.html#a932dbbd4f70a1e9c0ff8f452e61fc9b8abedbb015b0064d198bc2112543bf352b',1,'QXmppLogger']]], ['initiator',['initiator',['../classQXmppJingleIq.html#a84ccbc8f47dea6c39721fb20ea4b1767',1,'QXmppJingleIq']]], ['insertextension',['insertExtension',['../classQXmppClient.html#a9459b68cf1cb56a2bad27909ec5e7e7b',1,'QXmppClient']]], ['instructions',['instructions',['../classQXmppDataForm.html#ab40de3c0996c5515b6fb414ec300b09d',1,'QXmppDataForm::instructions()'],['../classQXmppRegisterIq.html#aaca06d2ab6a45aafbb7c207365b7dc33',1,'QXmppRegisterIq::instructions()']]], ['interfaces',['interfaces',['../classQXmppInvokable.html#a4d345ef34a91ca9e5535cef4ee6d026c',1,'QXmppInvokable']]], ['invisible',['Invisible',['../classQXmppPresence.html#ad56af0f57b732c09b080b9347c4dba94a00a1530c56b9457145d4770a58a5ce95',1,'QXmppPresence']]], ['invitationreceived',['invitationReceived',['../classQXmppMucManager.html#a8ad1ab6b9c8bf656bedbd8cd31a0076b',1,'QXmppMucManager']]], ['iqreceived',['iqReceived',['../classQXmppClient.html#ab3725eaae927f9c600c59a9e7e681909',1,'QXmppClient::iqReceived()'],['../classQXmppOutgoingClient.html#ac5199200ec81a1b3de18ca8563ac430a',1,'QXmppOutgoingClient::iqReceived()']]], ['isattentionrequested',['isAttentionRequested',['../classQXmppMessage.html#a96902fca2931b696c874ad5b972ed0f3',1,'QXmppMessage']]], ['isauthenticated',['isAuthenticated',['../classQXmppClient.html#a5337959daeec2648b3c262bc84441e44',1,'QXmppClient::isAuthenticated()'],['../classQXmppOutgoingClient.html#a009fbefdfbaef0af9846e57626048d64',1,'QXmppOutgoingClient::isAuthenticated()']]], ['isauthorized',['isAuthorized',['../classQXmppInvokable.html#abb8f542ae1ebd422e9454bbeafc5dda8',1,'QXmppInvokable']]], ['isclientvcardreceived',['isClientVCardReceived',['../classQXmppVCardManager.html#a6a9b2024738145c719623328ca13c752',1,'QXmppVCardManager']]], ['isconnected',['isConnected',['../classQXmppStream.html#a2fe3c35571afa33cb45efa7213b89270',1,'QXmppStream::isConnected()'],['../classQXmppIceComponent.html#acbaba98328a2f695acc9478ed7657cee',1,'QXmppIceComponent::isConnected()'],['../classQXmppIceConnection.html#a0d06b299c63a479c40a7d9980d5c68f8',1,'QXmppIceConnection::isConnected()'],['../classQXmppClient.html#adf54b0085d8a7fc81c05973973fa4a04',1,'QXmppClient::isConnected()'],['../classQXmppOutgoingClient.html#a7a4038c3d95a6d16d850f008cdc3960c',1,'QXmppOutgoingClient::isConnected()'],['../classQXmppIncomingClient.html#a635f2d9bd871807cb2ede33ed01d9a3b',1,'QXmppIncomingClient::isConnected()'],['../classQXmppIncomingServer.html#a10ef0d7a3bb32694b2b84feb2202ada7',1,'QXmppIncomingServer::isConnected()'],['../classQXmppOutgoingServer.html#a0288ad6d6e23ba3b6404fe39a5f08d4d',1,'QXmppOutgoingServer::isConnected()']]], ['isdelivered',['isDelivered',['../classQXmppExtendedAddress.html#a8b58ad878eeb5b73621cd61a9228fc65',1,'QXmppExtendedAddress']]], ['isfinished',['isFinished',['../classQXmppPasswordReply.html#ab4149f89263f3f40aa7dfb8aa1a4a2f1',1,'QXmppPasswordReply']]], ['isjoined',['isJoined',['../classQXmppMucRoom.html#ae2f74618afc16039b63da11b7eb91829',1,'QXmppMucRoom']]], ['ismucsupported',['isMucSupported',['../classQXmppPresence.html#a2e480c44c043017610d910cc52872d10',1,'QXmppPresence']]], ['isnull',['isNull',['../classQXmppDataForm_1_1Media.html#a9874de4203824cfc5da2f566aa768494',1,'QXmppDataForm::Media::isNull()'],['../classQXmppDataForm.html#aecb3ba04afc0a9e47a3d3464434ec1dd',1,'QXmppDataForm::isNull()'],['../classQXmppJingleCandidate.html#afefdb979f71856f728b3eaee8351570e',1,'QXmppJingleCandidate::isNull()'],['../classQXmppMucItem.html#a870dc4b604aebf06248004af97456737',1,'QXmppMucItem::isNull()'],['../classQXmppResultSetQuery.html#a917e79c4d689ed133a59c9c0b9d597ca',1,'QXmppResultSetQuery::isNull()'],['../classQXmppResultSetReply.html#a09942a28727e935f02b2f42c404b4169',1,'QXmppResultSetReply::isNull()']]], ['isreceiptrequested',['isReceiptRequested',['../classQXmppMessage.html#ab3069286f4d8f0e0985d83010a5688d8',1,'QXmppMessage']]], ['isreceived',['isReceived',['../classQXmppArchiveMessage.html#a3c57ef45d3ccec75dd9710021ee175de',1,'QXmppArchiveMessage']]], ['isrequired',['isRequired',['../classQXmppDataForm_1_1Field.html#a9466d429d737776da07591c8da25e36e',1,'QXmppDataForm::Field']]], ['isrosterreceived',['isRosterReceived',['../classQXmppRosterManager.html#a62d70b839c626994ab6de5d02ca42c23',1,'QXmppRosterManager']]], ['issequential',['isSequential',['../classQXmppRtpAudioChannel.html#a1b6e924d0fdb44c12eca6ba294816c56',1,'QXmppRtpAudioChannel']]], ['isvalid',['isValid',['../classQXmppVideoFrame.html#a0f36f8b6e5f7d66a45b51bac1616e168',1,'QXmppVideoFrame::isValid()'],['../classQXmppExtendedAddress.html#a1a936dd8187f873b9df680d6b900d6da',1,'QXmppExtendedAddress::isValid()']]], ['item',['Item',['../classQXmppRosterIq_1_1Item.html',1,'QXmppRosterIq']]], ['item',['Item',['../classQXmppRosterIq_1_1Item.html#a42077d1368696f98eb2e68abeac4ca37',1,'QXmppRosterIq::Item']]], ['itemadded',['itemAdded',['../classQXmppRosterManager.html#aa02bc7a630e38d0c3c1830b34381cdb0',1,'QXmppRosterManager']]], ['itemchanged',['itemChanged',['../classQXmppRosterManager.html#a946fa5a6386ce44b898b70bdc0eca159',1,'QXmppRosterManager']]], ['itemremoved',['itemRemoved',['../classQXmppRosterManager.html#a676caab8bdf1feb4753c0285744e77c7',1,'QXmppRosterManager']]], ['items',['items',['../classQXmppMucAdminIq.html#a6398032af6b4a8f5917c908cae096b3e',1,'QXmppMucAdminIq::items()'],['../classQXmppPubSubIq.html#ae7ad62991fe252ebdf887decdecdd35e',1,'QXmppPubSubIq::items()'],['../classQXmppRosterIq.html#a2cc8f8e839839a91a066f57cc46feda3',1,'QXmppRosterIq::items()']]], ['itemsreceived',['itemsReceived',['../classQXmppDiscoveryManager.html#ad8f5b15247f0683caa6056e6006be2ae',1,'QXmppDiscoveryManager']]] ]; qxmpp-0.7.6/doc/html/search/enumvalues_67.html0000644000175000007640000000171312116723632021162 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/functions_62.html0000644000175000007640000000171212116723632021000 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/variables_70.html0000644000175000007640000000171212116723632020737 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/all_61.html0000644000175000007640000000170412116723632017540 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/functions_6e.js0000644000175000007640000000335312116723632020536 0ustar sharkyjerrywebvar searchData= [ ['name',['name',['../classQXmppBookmarkConference.html#a4e615847e0b7654cdddaef308d833c26',1,'QXmppBookmarkConference::name()'],['../classQXmppBookmarkUrl.html#a08143b8a8e3c33c79818df2a6e9a8ee0',1,'QXmppBookmarkUrl::name()'],['../classQXmppJinglePayloadType.html#ae683ecd2f8ea39e43ab739292d166cac',1,'QXmppJinglePayloadType::name()'],['../classQXmppRosterIq_1_1Item.html#ac571bc4337c50cf3adadf14f5ff3e163',1,'QXmppRosterIq::Item::name()'],['../classQXmppVersionIq.html#a2d8382624e8dc79e1c9a431c999cc159',1,'QXmppVersionIq::name()']]], ['namechanged',['nameChanged',['../classQXmppMucRoom.html#a4d77fb275ac6ac436386dafe101df153',1,'QXmppMucRoom']]], ['network',['network',['../classQXmppJingleCandidate.html#a7250a7dcbe9584ec4ae4da94d50d8fbf',1,'QXmppJingleCandidate']]], ['networkproxy',['networkProxy',['../classQXmppConfiguration.html#a8e70297c7ea0650cd6461d2fb623e483',1,'QXmppConfiguration']]], ['newconnection',['newConnection',['../classQXmppSslServer.html#a3c5d10a6d4522437be53257665c68d30',1,'QXmppSslServer']]], ['nick',['nick',['../classQXmppMucItem.html#a9007c0121ed60c6b6926959d0e876908',1,'QXmppMucItem']]], ['nickname',['nickName',['../classQXmppBookmarkConference.html#adc78070749918c237d7d26eada80531d',1,'QXmppBookmarkConference::nickName()'],['../classQXmppVCardIq.html#a689b448396c78ddaa5a23c21af8d0a42',1,'QXmppVCardIq::nickName()']]], ['nicknamechanged',['nickNameChanged',['../classQXmppMucRoom.html#a2c3b18b2e26a82aff5a4c9f8a78c5c8a',1,'QXmppMucRoom']]], ['nonsaslauthmechanism',['nonSASLAuthMechanism',['../classQXmppConfiguration.html#a4a2c891017fc79544a439ce6ce48fc71',1,'QXmppConfiguration']]], ['number',['number',['../classQXmppVCardPhone.html#ae1677209c24e28550198ec4251880401',1,'QXmppVCardPhone']]] ]; qxmpp-0.7.6/doc/html/search/properties_61.js0000644000175000007640000000037012116723632020632 0ustar sharkyjerrywebvar searchData= [ ['allowedactions',['allowedActions',['../classQXmppMucRoom.html#a3b41defb3bcf48bf7ce51c8163aac803',1,'QXmppMucRoom']]], ['audiomode',['audioMode',['../classQXmppCall.html#aa8d261bbeabb9b3225d2590788f51fce',1,'QXmppCall']]] ]; qxmpp-0.7.6/doc/html/search/mag_sel.png0000644000175000007640000000106312116723632017707 0ustar sharkyjerrywebPNG  IHDR- pHYs   cHRMms8zʴ3Dv6*IDATx䔻"A:/xQL@7010|173sVD6@PTmPjٝu &X?9S%|~|Ʉrf!LT**PH)9Nr0`Y'CZh NS,"JQ*d2V+fɄH$B^d۶(T*4MPH*zƶm:Ha0jSS-bMiP(ka<`ˉDq']?cǘ4M1tZ>z|)tu]F
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/properties_6c.html0000644000175000007640000000171312116723632021246 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/functions_67.js0000644000175000007640000000404412116723632020456 0ustar sharkyjerrywebvar searchData= [ ['generatecrc32',['generateCrc32',['../classQXmppUtils.html#ac10b0186b909d902c6670dd4aabfa772',1,'QXmppUtils']]], ['generatehmacmd5',['generateHmacMd5',['../classQXmppUtils.html#ac82b6aaa4ef413056a058dbb7d8f8069',1,'QXmppUtils']]], ['generatehmacsha1',['generateHmacSha1',['../classQXmppUtils.html#adf3869da41378c5b38d4a643cc9ee8dc',1,'QXmppUtils']]], ['generaterandombytes',['generateRandomBytes',['../classQXmppUtils.html#a58de137a41dd65c11fcf74b74c090e83',1,'QXmppUtils']]], ['generaterandominteger',['generateRandomInteger',['../classQXmppUtils.html#a7478f541be43e0bd72e088f3d4099973',1,'QXmppUtils']]], ['generatestanzahash',['generateStanzaHash',['../classQXmppUtils.html#ad86c501d2f5beaca4f77c94c1eb7245f',1,'QXmppUtils']]], ['getallpresencesforbarejid',['getAllPresencesForBareJid',['../classQXmppRosterManager.html#a7c8e79674248ee29c1ffe6693999c547',1,'QXmppRosterManager']]], ['getdigest',['getDigest',['../classQXmppPasswordChecker.html#ac0e9395aa90f506b05658d3a8cfe0790',1,'QXmppPasswordChecker']]], ['getlogger',['getLogger',['../classQXmppLogger.html#ac261f30eeb3caaec02e9a97f9529ac49',1,'QXmppLogger']]], ['getpassword',['getPassword',['../classQXmppPasswordChecker.html#a3ff9ec7d336a6702435badbfdd3c19b2',1,'QXmppPasswordChecker']]], ['getpresence',['getPresence',['../classQXmppRosterManager.html#a107478c6ce7bd34dc07348f3acea6d91',1,'QXmppRosterManager']]], ['getresources',['getResources',['../classQXmppRosterManager.html#abdb8e62b81edc1ec05257ecc78e3a35f',1,'QXmppRosterManager']]], ['getrosterbarejids',['getRosterBareJids',['../classQXmppRosterManager.html#ae47698bf12ecb996462a0c9073544043',1,'QXmppRosterManager']]], ['getrosterentry',['getRosterEntry',['../classQXmppRosterManager.html#a012371e276be651027c0c54dabfbaa28',1,'QXmppRosterManager']]], ['googleaccesstoken',['googleAccessToken',['../classQXmppConfiguration.html#ac8c67e78068826ca7799f945a9fb4e43',1,'QXmppConfiguration']]], ['groups',['groups',['../classQXmppRosterIq_1_1Item.html#a39b5e6772839a5749337c521bc8672fc',1,'QXmppRosterIq::Item']]] ]; qxmpp-0.7.6/doc/html/search/functions_6a.js0000644000175000007640000000320512116723632020526 0ustar sharkyjerrywebvar searchData= [ ['jid',['jid',['../classQXmppBindIq.html#a97457e48e85c2ffb620934ddcc5fcd34',1,'QXmppBindIq::jid()'],['../classQXmppBookmarkConference.html#a651e92afc55ffd7901a79d007797c90f',1,'QXmppBookmarkConference::jid()'],['../classQXmppMucItem.html#aa8852e37e3adb422dde9f46289c3a3c8',1,'QXmppMucItem::jid()'],['../classQXmppExtendedAddress.html#a2b695588e9c22aa57564fab87acb6848',1,'QXmppExtendedAddress::jid()'],['../classQXmppConfiguration.html#a9733276982f4b55517e4ea739d7039a2',1,'QXmppConfiguration::jid()'],['../classQXmppIncomingClient.html#ab708ff1b465b52bb93e12941bca38486',1,'QXmppIncomingClient::jid()']]], ['jidbare',['jidBare',['../classQXmppConfiguration.html#a00c6b1ca3a1008f214f0258f6736c9ba',1,'QXmppConfiguration']]], ['jidtobarejid',['jidToBareJid',['../classQXmppUtils.html#ab3d6904c272008e64c86107221f0936e',1,'QXmppUtils']]], ['jidtodomain',['jidToDomain',['../classQXmppUtils.html#a8723c0bee318896100ab2f41ae4cd73e',1,'QXmppUtils']]], ['jidtoresource',['jidToResource',['../classQXmppUtils.html#a5248b98f6df1ba1aae3f416092819443',1,'QXmppUtils']]], ['jidtouser',['jidToUser',['../classQXmppUtils.html#a0df11be63c49dc312e417cddca3fa3e5',1,'QXmppUtils']]], ['jobfinished',['jobFinished',['../classQXmppTransferManager.html#af2dcae40840d04530e5aef97a6586188',1,'QXmppTransferManager']]], ['jobstarted',['jobStarted',['../classQXmppTransferManager.html#a2a19e77348fe9df618d7e289bbe84f21',1,'QXmppTransferManager']]], ['join',['join',['../classQXmppMucRoom.html#afd01483eb367ecfa4f1fc2828919b4c1',1,'QXmppMucRoom']]], ['joined',['joined',['../classQXmppMucRoom.html#ab01ece57f344187b5fca066051fedb81',1,'QXmppMucRoom']]] ]; qxmpp-0.7.6/doc/html/search/enumvalues_74.html0000644000175000007640000000171312116723632021160 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/groups_73.html0000644000175000007640000000170712116723632020315 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/enumvalues_78.js0000644000175000007640000000046412116723632020636 0ustar sharkyjerrywebvar searchData= [ ['xa',['XA',['../classQXmppPresence.html#ad56af0f57b732c09b080b9347c4dba94af2b440870b33ce88182aaf32f871696b',1,'QXmppPresence']]], ['xmppstreamerror',['XmppStreamError',['../classQXmppClient.html#a7c2851d07cc33119752abc6ec8ffc47aa29f30662c97dc09858f1d7e80eb1825a',1,'QXmppClient']]] ]; qxmpp-0.7.6/doc/html/search/enums_72.js0000644000175000007640000000017212116723632017567 0ustar sharkyjerrywebvar searchData= [ ['role',['Role',['../classQXmppMucItem.html#a5de278115b806b129dd6944dc8230d4a',1,'QXmppMucItem']]] ]; qxmpp-0.7.6/doc/html/search/properties_69.js0000644000175000007640000000020212116723632020634 0ustar sharkyjerrywebvar searchData= [ ['isjoined',['isJoined',['../classQXmppMucRoom.html#ae2f74618afc16039b63da11b7eb91829',1,'QXmppMucRoom']]] ]; qxmpp-0.7.6/doc/html/search/enums_6e.html0000644000175000007640000000170612116723632020205 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/functions_66.js0000644000175000007640000000541612116723632020461 0ustar sharkyjerrywebvar searchData= [ ['facebookaccesstoken',['facebookAccessToken',['../classQXmppConfiguration.html#a4ece1daf219595820ea006fd797dfe61',1,'QXmppConfiguration']]], ['facebookappid',['facebookAppId',['../classQXmppConfiguration.html#a2fc2f7fdbe02f5a4f556bcaa7572160d',1,'QXmppConfiguration']]], ['faultcode',['faultCode',['../classQXmppRpcResponseIq.html#a3cdd81277f2341bc0f409bcfeb3578b2',1,'QXmppRpcResponseIq']]], ['faultstring',['faultString',['../classQXmppRpcResponseIq.html#ae8979e9b4c98a6e40592fbef78b35082',1,'QXmppRpcResponseIq']]], ['field',['Field',['../classQXmppDataForm_1_1Field.html#a7bd6676385f76c0f305649cf8ded092a',1,'QXmppDataForm::Field::Field(QXmppDataForm::Field::Type type=QXmppDataForm::Field::TextSingleField)'],['../classQXmppDataForm_1_1Field.html#a4ba316346501ec1599804b13bf7754bf',1,'QXmppDataForm::Field::Field(const QXmppDataForm::Field &other)']]], ['fields',['fields',['../classQXmppDataForm.html#aa4ca5fe0af432edc25c9d6f2caffd9b7',1,'QXmppDataForm::fields() const '],['../classQXmppDataForm.html#afea9fd5c21af8685841a6b9bd51b31c6',1,'QXmppDataForm::fields()']]], ['fileinfo',['fileInfo',['../classQXmppTransferJob.html#a51057804e28ce62138de1798c8583637',1,'QXmppTransferJob']]], ['filereceived',['fileReceived',['../classQXmppTransferManager.html#a12349ea192bdd58e61621dd2ac818ce5',1,'QXmppTransferManager']]], ['findextension',['findExtension',['../classQXmppClient.html#a728fc96e0ca41b21d94e4686f8519c4d',1,'QXmppClient']]], ['finish',['finish',['../classQXmppPasswordReply.html#ad009857528902d3696341b87079f0e26',1,'QXmppPasswordReply']]], ['finished',['finished',['../classQXmppCall.html#a4e2f8523540bcccc963e11401c666809',1,'QXmppCall::finished()'],['../classQXmppTransferJob.html#a602987d2e805440c93ef5b625a422856',1,'QXmppTransferJob::finished()'],['../classQXmppPasswordReply.html#a59f02853e4cf6feb747e219082b22374',1,'QXmppPasswordReply::finished()']]], ['finishlater',['finishLater',['../classQXmppPasswordReply.html#acc7e92729cf456e68b8e6341b97643bc',1,'QXmppPasswordReply']]], ['first',['first',['../classQXmppResultSetReply.html#ae4b0426a63661fc66a10e895aa42fd4a',1,'QXmppResultSetReply']]], ['firstname',['firstName',['../classQXmppVCardIq.html#a64d99a338d3ebab31923aa6f4f30554b',1,'QXmppVCardIq']]], ['form',['form',['../classQXmppMucOwnerIq.html#a1bdf7e3e90eee74765361825fe77e93f',1,'QXmppMucOwnerIq::form()'],['../classQXmppRegisterIq.html#a94966c6db427c9709ed86ad65ba87671',1,'QXmppRegisterIq::form()']]], ['foundation',['foundation',['../classQXmppJingleCandidate.html#a1454f64bd7d45a7a52a15486b49ee178',1,'QXmppJingleCandidate']]], ['from',['from',['../classQXmppStanza.html#a2e68644ae328ff374ffc5115597a525e',1,'QXmppStanza']]], ['fullname',['fullName',['../classQXmppVCardIq.html#ab654c884f23e9567e58ceb7ccc486b4e',1,'QXmppVCardIq']]] ]; qxmpp-0.7.6/doc/html/search/functions_6f.js0000644000175000007640000000365612116723632020545 0ustar sharkyjerrywebvar searchData= [ ['openmode',['openMode',['../classQXmppRtpAudioChannel.html#a04c68666e2c9d4398eebefdf6a589f7e',1,'QXmppRtpAudioChannel::openMode()'],['../classQXmppRtpVideoChannel.html#a35a18db3dd09e978e80782410c5f9ab8',1,'QXmppRtpVideoChannel::openMode()']]], ['operator_3d',['operator=',['../classQXmppDataForm_1_1Media.html#ab19ca6c24b02e94f0de3b71ce9fd793b',1,'QXmppDataForm::Media::operator=()'],['../classQXmppDataForm_1_1Field.html#a53c05474d49892a70be0b78623f91d58',1,'QXmppDataForm::Field::operator=()'],['../classQXmppDataForm.html#a9ddc279a4bf7d8af83b9b036a1a05e3f',1,'QXmppDataForm::operator=()'],['../classQXmppIq.html#acac075df8295dd8c60015b7266de58b2',1,'QXmppIq::operator=()'],['../classQXmppMessage.html#ab3aa184e6abbbc3900c278724f97d547',1,'QXmppMessage::operator=()'],['../classQXmppPresence.html#a1141ade052875a709b7d6c8556fc1868',1,'QXmppPresence::operator=()'],['../classQXmppExtendedAddress.html#ac92e6a7834fec8050a1db385c923048c',1,'QXmppExtendedAddress::operator=()'],['../classQXmppStanza.html#a767267784f17dadb5fcc63cbd79a6cf4',1,'QXmppStanza::operator=()'],['../classQXmppVCardAddress.html#a591dbdba926e4f9dadd9707681edce3b',1,'QXmppVCardAddress::operator=()'],['../classQXmppVCardEmail.html#a7f846de66c12cc0dc07079be410c20eb',1,'QXmppVCardEmail::operator=()'],['../classQXmppVCardPhone.html#a95ee8da274bd22a93967e95d38d66280',1,'QXmppVCardPhone::operator=()'],['../classQXmppVCardIq.html#a15ffae99786fbe0f56e3bd4f3b0255bc',1,'QXmppVCardIq::operator=()'],['../classQXmppConfiguration.html#a81cb2c0461d396b1458191e5181ba34a',1,'QXmppConfiguration::operator=()']]], ['operator_3d_3d',['operator==',['../classQXmppJinglePayloadType.html#ab368f65404568832f8cd861d2b307a94',1,'QXmppJinglePayloadType']]], ['options',['options',['../classQXmppDataForm_1_1Field.html#a9caa3cf1de4d1cfeb27d601cab3990d4',1,'QXmppDataForm::Field']]], ['os',['os',['../classQXmppVersionIq.html#a38ea1a7fb98453b7aa9783d7ba198ae7',1,'QXmppVersionIq']]] ]; qxmpp-0.7.6/doc/html/search/functions_64.js0000644000175000007640000000710412116723632020453 0ustar sharkyjerrywebvar searchData= [ ['datagramreceived',['datagramReceived',['../classQXmppRtpAudioChannel.html#aa599ecd38fe49ab6c5976b440af6701a',1,'QXmppRtpAudioChannel::datagramReceived()'],['../classQXmppRtpVideoChannel.html#a8aff9a4172fdf00deeef640e85dfa8a4',1,'QXmppRtpVideoChannel::datagramReceived()'],['../classQXmppIceComponent.html#a7c153ade85120e66964e0eada8513842',1,'QXmppIceComponent::datagramReceived()']]], ['date',['date',['../classQXmppArchiveMessage.html#afb0516bf03ff85fc14c6ec974363f3c8',1,'QXmppArchiveMessage']]], ['datetimefromstring',['datetimeFromString',['../classQXmppUtils.html#a9ce223b82721daee833cff35e8b09464',1,'QXmppUtils']]], ['datetimetostring',['datetimeToString',['../classQXmppUtils.html#a3ab27007d02693dfe26be892dd48f45c',1,'QXmppUtils']]], ['debug',['debug',['../classQXmppLoggable.html#adf78baaf99fba802edaa791fbbd34236',1,'QXmppLoggable']]], ['decode',['decode',['../classQXmppRtpPacket.html#af9d20509224aa4f27fc1c92fc87e9f58',1,'QXmppRtpPacket']]], ['decoderformat',['decoderFormat',['../classQXmppRtpVideoChannel.html#a123733acb37a022a9c273eadaf5aa8fc',1,'QXmppRtpVideoChannel']]], ['description',['description',['../classQXmppDataForm_1_1Field.html#a8b006128d764080cf2725649f63ae4e9',1,'QXmppDataForm::Field::description()'],['../classQXmppExtendedAddress.html#ab6c29726ab00157e5711ef3cf815d06a',1,'QXmppExtendedAddress::description()'],['../classQXmppVCardIq.html#aeedaf3f78a9bb61e3d8be8129466f73c',1,'QXmppVCardIq::description()']]], ['dialbackrequestreceived',['dialbackRequestReceived',['../classQXmppIncomingServer.html#a38a41b7076e423a4861b9a3eba035e98',1,'QXmppIncomingServer']]], ['dialbackresponsereceived',['dialbackResponseReceived',['../classQXmppOutgoingServer.html#a8ebbb372ca06478a9324c65539af74db',1,'QXmppOutgoingServer']]], ['digest',['digest',['../classQXmppPasswordReply.html#a93a2eae02ee07a478366306672ae51b3',1,'QXmppPasswordReply']]], ['disconnected',['disconnected',['../classQXmppStream.html#a701163b1384f69e6947a420bb63a0d4a',1,'QXmppStream::disconnected()'],['../classQXmppIceConnection.html#aae4ecd60dbbf7276d2380893010ff01f',1,'QXmppIceConnection::disconnected()'],['../classQXmppClient.html#ad0451ed72955dba436c7b97ad2c9ac82',1,'QXmppClient::disconnected()']]], ['disconnectfromhost',['disconnectFromHost',['../classQXmppStream.html#a8608905c2f2cc146567c85756832acb5',1,'QXmppStream']]], ['disconnectfromserver',['disconnectFromServer',['../classQXmppClient.html#a685f42452acbba55f3b15669fa76282d',1,'QXmppClient']]], ['discoveraddresses',['discoverAddresses',['../classQXmppIceComponent.html#ab5882d9997870e9339f2d678bfa66744',1,'QXmppIceComponent']]], ['discoveryfeatures',['discoveryFeatures',['../classQXmppClientExtension.html#a3b041abac6b95f5c1614ed1cb87163f4',1,'QXmppClientExtension::discoveryFeatures()'],['../classQXmppServerExtension.html#a5d2abaf7bb482614da25627e516d0ad4',1,'QXmppServerExtension::discoveryFeatures()']]], ['discoveryidentities',['discoveryIdentities',['../classQXmppClientExtension.html#a9acf0693520c93ddc60c4994ffe09343',1,'QXmppClientExtension']]], ['discoveryitems',['discoveryItems',['../classQXmppServerExtension.html#ace0339dad1d50e98cc5109b4dc0e9212',1,'QXmppServerExtension']]], ['dispatch',['dispatch',['../classQXmppInvokable.html#aa7dc5639264fa76249d20a770219f5fb',1,'QXmppInvokable']]], ['domain',['domain',['../classQXmppConfiguration.html#a80250a8b1f040328fbb3f9e4d640867b',1,'QXmppConfiguration::domain()'],['../classQXmppPasswordRequest.html#a4f71ebce0ec893aa1f3d7f41dc3bed95',1,'QXmppPasswordRequest::domain()'],['../classQXmppServer.html#a3d84689d629177cfb4fddc9798c5e05c',1,'QXmppServer::domain()']]] ]; qxmpp-0.7.6/doc/html/search/enumvalues_61.html0000644000175000007640000000171312116723632021154 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/functions_73.js0000644000175000007640000011416412116723632020460 0ustar sharkyjerrywebvar searchData= [ ['saslauthmechanism',['saslAuthMechanism',['../classQXmppConfiguration.html#a035bb265fcee01b05071d016693247d7',1,'QXmppConfiguration']]], ['seek',['seek',['../classQXmppRtpAudioChannel.html#ab50b3240e2226da585be3a63c0145b7a',1,'QXmppRtpAudioChannel']]], ['senddata',['sendData',['../classQXmppStream.html#a7920b8a42c3755dda87e02dbe5e9e626',1,'QXmppStream']]], ['senddatagram',['sendDatagram',['../classQXmppRtpAudioChannel.html#ac02d15c55ff0d6e5b6119d5aa104d035',1,'QXmppRtpAudioChannel::sendDatagram()'],['../classQXmppRtpVideoChannel.html#a8df16b8ad5a32f74e40aa6261f09b5e0',1,'QXmppRtpVideoChannel::sendDatagram()'],['../classQXmppIceComponent.html#a13a9f295fdcc5d2b912382054ad627cf',1,'QXmppIceComponent::sendDatagram()']]], ['sendelement',['sendElement',['../classQXmppServer.html#a8bfcf9c3734844281ee5581cae350feb',1,'QXmppServer']]], ['sendfile',['sendFile',['../classQXmppTransferManager.html#a34228d973a450f716ad8216ce6347f67',1,'QXmppTransferManager::sendFile(const QString &jid, const QString &filePath, const QString &description=QString())'],['../classQXmppTransferManager.html#a9e08182cdd6f2df3c2d3c19bb9660d24',1,'QXmppTransferManager::sendFile(const QString &jid, QIODevice *device, const QXmppTransferFileInfo &fileInfo, const QString &sid=QString())']]], ['sendinvitation',['sendInvitation',['../classQXmppMucRoom.html#a94fbb2e103f48b5cc17661d25f47122e',1,'QXmppMucRoom']]], ['sendmessage',['sendMessage',['../classQXmppClient.html#a44d230e24954da4a05e661318494fce4',1,'QXmppClient::sendMessage()'],['../classQXmppMucRoom.html#a7a3ead69818cc6b2c8536384528dbada',1,'QXmppMucRoom::sendMessage()']]], ['sendpacket',['sendPacket',['../classQXmppStream.html#a47473db930db0242bb2f6289172b6ea8',1,'QXmppStream::sendPacket()'],['../classQXmppClient.html#a28fb16fe7c83b134e46fea795bfffc35',1,'QXmppClient::sendPacket()'],['../classQXmppServer.html#a7617374585f26e9a4b5c878cc81415d8',1,'QXmppServer::sendPacket()']]], ['server',['server',['../classQXmppServerExtension.html#a56847ef0def13090d91cd6f6bded0aed',1,'QXmppServerExtension']]], ['setaction',['setAction',['../classQXmppJingleIq.html#a7d3868e6bdc1b042f470a9ad795a811c',1,'QXmppJingleIq']]], ['setactor',['setActor',['../classQXmppMucItem.html#a69f1abfed056c472a0e8539935328573',1,'QXmppMucItem']]], ['setaddress',['setAddress',['../classQXmppVCardEmail.html#a2327c4730f9dd6b70b50bafe60791cf3',1,'QXmppVCardEmail']]], ['setaddresses',['setAddresses',['../classQXmppVCardIq.html#ae3713bdf98cc50faca4cf969dc74b6d9',1,'QXmppVCardIq']]], ['setaffiliation',['setAffiliation',['../classQXmppMucItem.html#ab1b1b9093c3bca933bd073a5ad9a4636',1,'QXmppMucItem']]], ['setafter',['setAfter',['../classQXmppResultSetQuery.html#afd191318185f5d433140c969606cb7d3',1,'QXmppResultSetQuery']]], ['setarguments',['setArguments',['../classQXmppRpcInvokeIq.html#aea362ae92bbd8a29645751ffb5452d20',1,'QXmppRpcInvokeIq']]], ['setattentionrequested',['setAttentionRequested',['../classQXmppMessage.html#ad31b0fbbb7dd26ba8c6528a5d93a8a85',1,'QXmppMessage']]], ['setautoacceptsubscriptions',['setAutoAcceptSubscriptions',['../classQXmppConfiguration.html#ab3702f9b38d6e97338f27e2d94089ce4',1,'QXmppConfiguration']]], ['setautojoin',['setAutoJoin',['../classQXmppBookmarkConference.html#a9d25893b39d5154b555b90d5ad7e2be2',1,'QXmppBookmarkConference']]], ['setautoreconnectionenabled',['setAutoReconnectionEnabled',['../classQXmppConfiguration.html#af1b4829231216e457803e46e784c25ba',1,'QXmppConfiguration']]], ['setavailablestatustype',['setAvailableStatusType',['../classQXmppPresence.html#aa07f9ccf497458999c4d2437d4300bbd',1,'QXmppPresence']]], ['setbarejid',['setBareJid',['../classQXmppRosterIq_1_1Item.html#ac58d9f728ffc0a357b9dff093890de11',1,'QXmppRosterIq::Item']]], ['setbefore',['setBefore',['../classQXmppResultSetQuery.html#a64536c4c74757afb224f8f875776550a',1,'QXmppResultSetQuery']]], ['setbirthday',['setBirthday',['../classQXmppVCardIq.html#ac7e4d0035d340b433af3bf4a84b81d04',1,'QXmppVCardIq']]], ['setbody',['setBody',['../classQXmppArchiveMessage.html#a1e69a102502f866a3fb09d1ba2a932ef',1,'QXmppArchiveMessage::setBody()'],['../classQXmppMessage.html#adfc1b70b910079c76c93ba472fc4e9e7',1,'QXmppMessage::setBody()']]], ['setbookmarks',['setBookmarks',['../classQXmppBookmarkManager.html#ac08a572f1426c49e565bf5cd96afee12',1,'QXmppBookmarkManager']]], ['setcacertificates',['setCaCertificates',['../classQXmppConfiguration.html#abe15b8d3dc480dfe30242fa0648feb6a',1,'QXmppConfiguration']]], ['setcapabilityhash',['setCapabilityHash',['../classQXmppPresence.html#a4a8355d4ce1f84a97fdb098d7856829a',1,'QXmppPresence']]], ['setcapabilitynode',['setCapabilityNode',['../classQXmppPresence.html#a087a58383725086449c9b7d8a428d4be',1,'QXmppPresence']]], ['setcapabilityver',['setCapabilityVer',['../classQXmppPresence.html#ab6434834049a20ef0711263adfd3686d',1,'QXmppPresence']]], ['setchannels',['setChannels',['../classQXmppJinglePayloadType.html#aae85a93d980283519b526b6078c7d7ba',1,'QXmppJinglePayloadType']]], ['setchat',['setChat',['../classQXmppArchiveChatIq.html#a813de01a9d74c7d05bd2cfdc094689d2',1,'QXmppArchiveChatIq']]], ['setchats',['setChats',['../classQXmppArchiveListIq.html#ae952398e8b3f23c0f25f46c68a8f3c00',1,'QXmppArchiveListIq']]], ['setclient',['setClient',['../classQXmppClientExtension.html#a166f42a22447341abb26bd9c44c97590',1,'QXmppClientExtension']]], ['setclientcapabilitiesnode',['setClientCapabilitiesNode',['../classQXmppDiscoveryManager.html#a1c2405c6d1090a770af99336b87298a0',1,'QXmppDiscoveryManager']]], ['setclientcategory',['setClientCategory',['../classQXmppDiscoveryManager.html#a032ece84805598d51018724ac033e2ea',1,'QXmppDiscoveryManager']]], ['setclientinfoform',['setClientInfoForm',['../classQXmppDiscoveryManager.html#a7d68dd342b658ebf09921889f9d345fe',1,'QXmppDiscoveryManager']]], ['setclientname',['setClientName',['../classQXmppDiscoveryManager.html#abde090985f4963ef2f113a7a9b1330b3',1,'QXmppDiscoveryManager::setClientName()'],['../classQXmppVersionManager.html#a3ff80230bbf8b1eff98e4cc3bf96cccf',1,'QXmppVersionManager::setClientName()']]], ['setclientos',['setClientOs',['../classQXmppVersionManager.html#ade1da8db8747b949e03077c612dda6fe',1,'QXmppVersionManager']]], ['setclientpresence',['setClientPresence',['../classQXmppClient.html#ad47d8d9bd5e44dd2566ff0d726b1e71b',1,'QXmppClient']]], ['setclienttype',['setClientType',['../classQXmppDiscoveryManager.html#abdb3cf2844cec7c864fe855fa86af5b1',1,'QXmppDiscoveryManager']]], ['setclientvcard',['setClientVCard',['../classQXmppVCardManager.html#a72cce6a88629d3a04996a3b4d9d420f5',1,'QXmppVCardManager']]], ['setclientversion',['setClientVersion',['../classQXmppVersionManager.html#a1fc93184ad42a74d205dc3d93cc084ae',1,'QXmppVersionManager']]], ['setclockrate',['setClockrate',['../classQXmppJinglePayloadType.html#a25d8fa0e0a23e70e72b544f7cd073da6',1,'QXmppJinglePayloadType']]], ['setcommand',['setCommand',['../classQXmppDialback.html#a8b3ac2f6733dc576ca2295d4017f1038',1,'QXmppDialback']]], ['setcomponent',['setComponent',['../classQXmppJingleCandidate.html#a7b22b0429af93096540abca2f5e2eb60',1,'QXmppJingleCandidate::setComponent()'],['../classQXmppIceComponent.html#a5fb86a2ff46687f40dc8db07ef4e6951',1,'QXmppIceComponent::setComponent()']]], ['setconferences',['setConferences',['../classQXmppBookmarkSet.html#a8486913b3825114b7ce31f313871fa81',1,'QXmppBookmarkSet']]], ['setconfiguration',['setConfiguration',['../classQXmppMucRoom.html#a15377792c8bec23191b34a6759c330ab',1,'QXmppMucRoom']]], ['setcontents',['setContents',['../classQXmppPubSubItem.html#a649ac84705dd748c05d4a436010c6f36',1,'QXmppPubSubItem']]], ['setcount',['setCount',['../classQXmppResultSetReply.html#aef59cae40af4bd2d8c00c3bb47cba141',1,'QXmppResultSetReply']]], ['setcountry',['setCountry',['../classQXmppVCardAddress.html#afbc08b88acc28250cbfc582e4cd0a055',1,'QXmppVCardAddress']]], ['setdate',['setDate',['../classQXmppArchiveMessage.html#aa459ddea8ffa849b8e408625e6f456a8',1,'QXmppArchiveMessage']]], ['setdelivered',['setDelivered',['../classQXmppExtendedAddress.html#a266a1331b7f8e88c2d9e209b85bea406',1,'QXmppExtendedAddress']]], ['setdescription',['setDescription',['../classQXmppDataForm_1_1Field.html#acc1ea1b44c059ab10e87f0ae147fca18',1,'QXmppDataForm::Field::setDescription()'],['../classQXmppExtendedAddress.html#a7c682ca662541d0c3179b861a504b651',1,'QXmppExtendedAddress::setDescription()'],['../classQXmppVCardIq.html#aa0f96a1f59c31cf067852854c8275d1e',1,'QXmppVCardIq::setDescription()']]], ['setdigest',['setDigest',['../classQXmppPasswordReply.html#a523c595ac1c6f1a006cec1bb184b6050',1,'QXmppPasswordReply']]], ['setdomain',['setDomain',['../classQXmppConfiguration.html#a716050cec0aa3fc11e6f4fbfb1e6d4a1',1,'QXmppConfiguration::setDomain()'],['../classQXmppPasswordRequest.html#a576c39a66597ea614abbb1639b2f6c73',1,'QXmppPasswordRequest::setDomain()'],['../classQXmppServer.html#aa0eeb8f1680923e70492596cb4f7e02a',1,'QXmppServer::setDomain()']]], ['setemail',['setEmail',['../classQXmppRegisterIq.html#ac8090c4a546b8f352441f0e1dec5da3a',1,'QXmppRegisterIq::setEmail()'],['../classQXmppVCardIq.html#abc7c73030e09607ce9cae339ceef73d0',1,'QXmppVCardIq::setEmail()']]], ['setemails',['setEmails',['../classQXmppVCardIq.html#aeeaf5226fc110157e80b51e6833f5a35',1,'QXmppVCardIq']]], ['setencoderformat',['setEncoderFormat',['../classQXmppRtpVideoChannel.html#a8d56343eca3dece825496e11d32ea470',1,'QXmppRtpVideoChannel']]], ['setend',['setEnd',['../classQXmppArchiveListIq.html#af3392d03c60aef8eb5563c503d3a0a83',1,'QXmppArchiveListIq::setEnd()'],['../classQXmppArchiveRemoveIq.html#a7d5ebc04183d98ffbe96a6b6009d8960',1,'QXmppArchiveRemoveIq::setEnd()']]], ['seterror',['setError',['../classQXmppStanza.html#a59cd978cb7dd23671cb679be53c4bd4b',1,'QXmppStanza::setError()'],['../classQXmppPasswordReply.html#aa44e00eacb445af75c46129d63c6234b',1,'QXmppPasswordReply::setError()']]], ['setextendedaddresses',['setExtendedAddresses',['../classQXmppStanza.html#a94da36b60b79a77836d0707b97d0ad96',1,'QXmppStanza']]], ['setextensions',['setExtensions',['../classQXmppStanza.html#accbc3c11a988b9e3a69fa099fcf9f5fb',1,'QXmppStanza']]], ['setfacebookaccesstoken',['setFacebookAccessToken',['../classQXmppConfiguration.html#af1c8f373cd71d6b3287a6d970dfb7ad4',1,'QXmppConfiguration']]], ['setfacebookappid',['setFacebookAppId',['../classQXmppConfiguration.html#a881fe44df96b52653c81823c55fb46cd',1,'QXmppConfiguration']]], ['setfaultcode',['setFaultCode',['../classQXmppRpcResponseIq.html#a64352b119ec3da44c44542d6c58548c1',1,'QXmppRpcResponseIq']]], ['setfaultstring',['setFaultString',['../classQXmppRpcResponseIq.html#a6c14545d9bcbb4f610a5c0f049bd9e5c',1,'QXmppRpcResponseIq']]], ['setfields',['setFields',['../classQXmppDataForm.html#ac907784586541e0a79dd8d966e955f0f',1,'QXmppDataForm']]], ['setfirst',['setFirst',['../classQXmppResultSetReply.html#a9647171b550730775471d9207cfedef4',1,'QXmppResultSetReply']]], ['setfirstname',['setFirstName',['../classQXmppVCardIq.html#a98b1ee2bf954f929777928791f7a53fe',1,'QXmppVCardIq']]], ['setform',['setForm',['../classQXmppMucOwnerIq.html#a02712467d300d6aad4213ddd7bff1bf2',1,'QXmppMucOwnerIq::setForm()'],['../classQXmppRegisterIq.html#a09109b5a089b53f5a4930536a1f22ca1',1,'QXmppRegisterIq::setForm()']]], ['setfoundation',['setFoundation',['../classQXmppJingleCandidate.html#aba966a89d765a54fbe15a453074c5bcd',1,'QXmppJingleCandidate']]], ['setfrom',['setFrom',['../classQXmppStanza.html#a320ae1faad87e443277a36260cefb85a',1,'QXmppStanza']]], ['setfullname',['setFullName',['../classQXmppVCardIq.html#a3f72cb68b4c2dc1120a3803d75b01b62',1,'QXmppVCardIq']]], ['setgauge',['setGauge',['../classQXmppLogger.html#a0bc6992a5e1c9f418dfe1d249ed58dd9',1,'QXmppLogger::setGauge()'],['../classQXmppLoggable.html#abed04f600f4625f0d4a32f214c718865',1,'QXmppLoggable::setGauge()']]], ['setgoogleaccesstoken',['setGoogleAccessToken',['../classQXmppConfiguration.html#aee1c3f1bf751868454c9975fc6bf7d2f',1,'QXmppConfiguration']]], ['setgroups',['setGroups',['../classQXmppRosterIq_1_1Item.html#ade2430a52808649b51ed9c6b554cf77a',1,'QXmppRosterIq::Item']]], ['setheight',['setHeight',['../classQXmppDataForm_1_1Media.html#a758f505d607571860dc90aa9d006caba',1,'QXmppDataForm::Media']]], ['sethost',['setHost',['../classQXmppJingleCandidate.html#a89f496aa65b0610af6c86c44120582aa',1,'QXmppJingleCandidate::setHost()'],['../classQXmppConfiguration.html#a97320e5239f46770edcd457301b41809',1,'QXmppConfiguration::setHost()']]], ['seticecontrolling',['setIceControlling',['../classQXmppIceComponent.html#a679e8e78807464df76feed30495b7fe7',1,'QXmppIceComponent::setIceControlling()'],['../classQXmppIceConnection.html#a27972dd93469a303586e22cd4709b84e',1,'QXmppIceConnection::setIceControlling()']]], ['setid',['setId',['../classQXmppJinglePayloadType.html#a54a81639dc575b99cf4a42a24b7de65b',1,'QXmppJinglePayloadType::setId()'],['../classQXmppJingleCandidate.html#a1b92b6622dde36f6d8ad3f63138aba63',1,'QXmppJingleCandidate::setId()'],['../classQXmppPubSubItem.html#a0e3419b22bd11e146d99447c948e7014',1,'QXmppPubSubItem::setId()'],['../classQXmppStanza.html#aee06ffcdc8c7b7d67b2da536640e188d',1,'QXmppStanza::setId()']]], ['setignoresslerrors',['setIgnoreSslErrors',['../classQXmppConfiguration.html#af6075135d8735c7c6b95d7538a2c7245',1,'QXmppConfiguration']]], ['setinactivitytimeout',['setInactivityTimeout',['../classQXmppIncomingClient.html#ac2dc764e675d481d5afbe6e612765633',1,'QXmppIncomingClient']]], ['setindex',['setIndex',['../classQXmppResultSetQuery.html#ac275493d614371bb3598c20700e21e67',1,'QXmppResultSetQuery::setIndex()'],['../classQXmppResultSetReply.html#afc3b583f74e8a41ab69b1ce0369d3807',1,'QXmppResultSetReply::setIndex()']]], ['setinitiator',['setInitiator',['../classQXmppJingleIq.html#ae2ff3ea68609d6bcd79c41e0e6351730',1,'QXmppJingleIq']]], ['setinstructions',['setInstructions',['../classQXmppDataForm.html#a86b49fc4668777e80c523c8bbea29af0',1,'QXmppDataForm::setInstructions()'],['../classQXmppRegisterIq.html#aaa2834d557e5b85a0c8b6f2f2e4edbbd',1,'QXmppRegisterIq::setInstructions()']]], ['setitems',['setItems',['../classQXmppMucAdminIq.html#a842d537a6cf06b01d26b200eae70c43d',1,'QXmppMucAdminIq::setItems()'],['../classQXmppPubSubIq.html#af8e713430dbba5da0ca5448fada723ce',1,'QXmppPubSubIq::setItems()']]], ['setjid',['setJid',['../classQXmppBindIq.html#acac65e047ba7c879b43dcd912dfc276b',1,'QXmppBindIq::setJid()'],['../classQXmppBookmarkConference.html#a2ced3c41b583ff5136a9d818c0d586b5',1,'QXmppBookmarkConference::setJid()'],['../classQXmppMucItem.html#a0c2cc3987d51a7d5fad68569c686af59',1,'QXmppMucItem::setJid()'],['../classQXmppExtendedAddress.html#a1c865f1898369cf85b54c06e4e189fac',1,'QXmppExtendedAddress::setJid()'],['../classQXmppConfiguration.html#a26c876dbe4b4adb39497ecbab5793bd6',1,'QXmppConfiguration::setJid()']]], ['setkeepaliveinterval',['setKeepAliveInterval',['../classQXmppConfiguration.html#a6d47839bca9fbcebb1fe3ce2f5fce6fd',1,'QXmppConfiguration']]], ['setkeepalivetimeout',['setKeepAliveTimeout',['../classQXmppConfiguration.html#acd5867aea24580d8aa0647750a420020',1,'QXmppConfiguration']]], ['setkey',['setKey',['../classQXmppDataForm_1_1Field.html#a4ab9994979e765bbd65d4463d7910b6e',1,'QXmppDataForm::Field::setKey()'],['../classQXmppDialback.html#a91a464ea608a5924340593a075b9352a',1,'QXmppDialback::setKey()']]], ['setlabel',['setLabel',['../classQXmppDataForm_1_1Field.html#aee48675b341d4a4b990f146434ff2eeb',1,'QXmppDataForm::Field']]], ['setlang',['setLang',['../classQXmppStanza.html#a16c60bf49fe9bdf3c74f4d99b05ddee2',1,'QXmppStanza']]], ['setlast',['setLast',['../classQXmppResultSetReply.html#af273dcb1a8b079f3512afec88f355c57',1,'QXmppResultSetReply']]], ['setlastname',['setLastName',['../classQXmppVCardIq.html#ae3e28bae362398ad657dfc53a4b04c47',1,'QXmppVCardIq']]], ['setlocalcertificate',['setLocalCertificate',['../classQXmppServer.html#ac8e8e8e321d36d965fbb38fbd7a8fc54',1,'QXmppServer::setLocalCertificate()'],['../classQXmppSslServer.html#a4fba408dbc5cdd0b093867b8da757ac3',1,'QXmppSslServer::setLocalCertificate()']]], ['setlocalfileurl',['setLocalFileUrl',['../classQXmppTransferJob.html#a7f5bf8cfe96d0e8464ac63ff0f2089ae',1,'QXmppTransferJob']]], ['setlocality',['setLocality',['../classQXmppVCardAddress.html#a6374a076568ad2889a6824070a42ff23',1,'QXmppVCardAddress']]], ['setlocalpassword',['setLocalPassword',['../classQXmppIceComponent.html#a93374c2cbe66380376f3e56cb5574243',1,'QXmppIceComponent::setLocalPassword()'],['../classQXmppIceConnection.html#a00eb97dd173d5952796f085dc6ba85f2',1,'QXmppIceConnection::setLocalPassword()']]], ['setlocalstreamkey',['setLocalStreamKey',['../classQXmppOutgoingServer.html#a04c2358e7fb7e1ce716b37ae52364586',1,'QXmppOutgoingServer']]], ['setlocaluser',['setLocalUser',['../classQXmppIceComponent.html#a54e3b9c597142d10f4f05b817a3aec6c',1,'QXmppIceComponent::setLocalUser()'],['../classQXmppIceConnection.html#aa245f34197f786c010fe4c27a7d73a77',1,'QXmppIceConnection::setLocalUser()']]], ['setlogfilepath',['setLogFilePath',['../classQXmppLogger.html#a3a67ae630d032b8bdac039fe0567e178',1,'QXmppLogger']]], ['setlogger',['setLogger',['../classQXmppClient.html#aa799549089f2ecbe9796f53d0f7be6d2',1,'QXmppClient::setLogger()'],['../classQXmppServer.html#a8d9cb8a46f45d52f9332933d6c38862c',1,'QXmppServer::setLogger()']]], ['setloggingtype',['setLoggingType',['../classQXmppLogger.html#a0b60be94fa2f768d3eabcdba8357f15b',1,'QXmppLogger']]], ['setmax',['setMax',['../classQXmppResultSetQuery.html#a6a08ab6a98e8bc46a839efadecac2613',1,'QXmppResultSetQuery']]], ['setmaxptime',['setMaxptime',['../classQXmppJinglePayloadType.html#a78d6fd7ba582123bc1fdd35530bcbc46',1,'QXmppJinglePayloadType']]], ['setmedia',['setMedia',['../classQXmppDataForm_1_1Field.html#a7ef0c3e77b744a44eec006a23491e168',1,'QXmppDataForm::Field']]], ['setmessages',['setMessages',['../classQXmppArchiveChat.html#aff362d598bec87709af80fc98e0cde28',1,'QXmppArchiveChat']]], ['setmessagetypes',['setMessageTypes',['../classQXmppLogger.html#a8be64f1219d725ba66a60c8970e53bb7',1,'QXmppLogger']]], ['setmethod',['setMethod',['../classQXmppRpcInvokeIq.html#a53cbf15b11ed4fb42f6179d005d03f63',1,'QXmppRpcInvokeIq']]], ['setmiddlename',['setMiddleName',['../classQXmppVCardIq.html#aba227d72ed8301ffbe1c7e9a64e068db',1,'QXmppVCardIq']]], ['setmucinvitationjid',['setMucInvitationJid',['../classQXmppMessage.html#a98763b6c98004242c408bd8f82b59bc0',1,'QXmppMessage']]], ['setmucinvitationpassword',['setMucInvitationPassword',['../classQXmppMessage.html#a02a02e3198793939d3504cc68333a042',1,'QXmppMessage']]], ['setmucinvitationreason',['setMucInvitationReason',['../classQXmppMessage.html#ae61cea8e5ec5aa55c109c353a0541d74',1,'QXmppMessage']]], ['setmucitem',['setMucItem',['../classQXmppPresence.html#a39b28a9d2a741f20ead461407cba5696',1,'QXmppPresence']]], ['setmucpassword',['setMucPassword',['../classQXmppPresence.html#a785c649f82e916226af6ff39b18a53ff',1,'QXmppPresence']]], ['setmucstatuscodes',['setMucStatusCodes',['../classQXmppPresence.html#a1a3b34af72d4073c4de1ab83695287d0',1,'QXmppPresence']]], ['setmucsupported',['setMucSupported',['../classQXmppPresence.html#a205b8a74e9c04280c82c29f0e9dcb794',1,'QXmppPresence']]], ['setname',['setName',['../classQXmppBookmarkConference.html#a9e68254ad4f145e735ab3e65e9e7c4e5',1,'QXmppBookmarkConference::setName()'],['../classQXmppBookmarkUrl.html#ae151acb6db6d984b5f145963f6b2ba67',1,'QXmppBookmarkUrl::setName()'],['../classQXmppJinglePayloadType.html#accafc5198b67b5f5069f54f2a941fc1f',1,'QXmppJinglePayloadType::setName()'],['../classQXmppRosterIq_1_1Item.html#a3ec918e6d85d1b318dc769799cdd9d2d',1,'QXmppRosterIq::Item::setName()'],['../classQXmppVersionIq.html#af65b2a5e43a0af8449ed36018147b474',1,'QXmppVersionIq::setName()']]], ['setnetwork',['setNetwork',['../classQXmppJingleCandidate.html#ad31d46f6c78c57a2db0825def8a3c640',1,'QXmppJingleCandidate']]], ['setnetworkproxy',['setNetworkProxy',['../classQXmppConfiguration.html#a57e5382b3283912576e2953742529cb5',1,'QXmppConfiguration']]], ['setnick',['setNick',['../classQXmppMucItem.html#ab454e1b4e6edb28f07c95ffb56df33a2',1,'QXmppMucItem']]], ['setnickname',['setNickName',['../classQXmppBookmarkConference.html#a8e8277024e367af04c433ebe02053346',1,'QXmppBookmarkConference::setNickName()'],['../classQXmppVCardIq.html#aa450262ecf9fd3d196464484add3069f',1,'QXmppVCardIq::setNickName()'],['../classQXmppMucRoom.html#a484129fde79e5ee841757d94d7eed5cc',1,'QXmppMucRoom::setNickName()']]], ['setnonsaslauthmechanism',['setNonSASLAuthMechanism',['../classQXmppConfiguration.html#a9dfd3f8b383c5996ff4906e5d3d62807',1,'QXmppConfiguration']]], ['setnumber',['setNumber',['../classQXmppVCardPhone.html#a4e37dc41300055c0963ec0adedc31ed2',1,'QXmppVCardPhone']]], ['setoptions',['setOptions',['../classQXmppDataForm_1_1Field.html#a08ff329fad506d69af660bfb9e4174fb',1,'QXmppDataForm::Field']]], ['setos',['setOs',['../classQXmppVersionIq.html#a8f6e8a6b8b02b98f99c12dfa8df78023',1,'QXmppVersionIq']]], ['setparameters',['setParameters',['../classQXmppJinglePayloadType.html#a3c17aed60c502b37ada75ed8e7e256e0',1,'QXmppJinglePayloadType']]], ['setpassword',['setPassword',['../classQXmppRegisterIq.html#a3a7bfff24c594b71a5c7d672c14e46fd',1,'QXmppRegisterIq::setPassword()'],['../classQXmppConfiguration.html#ab1deabbad52755bda2d975d5150dbf7a',1,'QXmppConfiguration::setPassword()'],['../classQXmppMucRoom.html#adfb1f258f106805c76bc501e8ea162f6',1,'QXmppMucRoom::setPassword()'],['../classQXmppPasswordRequest.html#a81b68dceb87c75e0dbfe79cdb05dc426',1,'QXmppPasswordRequest::setPassword()'],['../classQXmppPasswordReply.html#a11f9eccc067fc48dd09237499cccb53f',1,'QXmppPasswordReply::setPassword()']]], ['setpasswordchecker',['setPasswordChecker',['../classQXmppIncomingClient.html#a6c2286e741e49b582db08b8ddbffe5cb',1,'QXmppIncomingClient::setPasswordChecker()'],['../classQXmppServer.html#ae797b5932a1fe33d234677deea4bf5ac',1,'QXmppServer::setPasswordChecker()']]], ['setpermissions',['setPermissions',['../classQXmppMucRoom.html#a7bef5394e4cd2af9c57f13fb4c8dadf7',1,'QXmppMucRoom']]], ['setphones',['setPhones',['../classQXmppVCardIq.html#affe69a2e42f9835de86a066b8d2967b8',1,'QXmppVCardIq']]], ['setphoto',['setPhoto',['../classQXmppVCardIq.html#a02fbd4d1b746daf9528ed60a14c586ac',1,'QXmppVCardIq']]], ['setphotohash',['setPhotoHash',['../classQXmppPresence.html#ac1df0dc4749bac5370267a05101c84ca',1,'QXmppPresence']]], ['setphototype',['setPhotoType',['../classQXmppVCardIq.html#ad80c63e75fd3cdd293b3732e3e8f5591',1,'QXmppVCardIq']]], ['setport',['setPort',['../classQXmppJingleCandidate.html#a3dd0a3979c5547beaa5959c24e06bbd0',1,'QXmppJingleCandidate::setPort()'],['../classQXmppConfiguration.html#af6d5a5df2a2100302fef321298bb0d0b',1,'QXmppConfiguration::setPort()']]], ['setpostcode',['setPostcode',['../classQXmppVCardAddress.html#a1e5f200d3eb7a73d736dc8d62ced3a73',1,'QXmppVCardAddress']]], ['setpriority',['setPriority',['../classQXmppJingleCandidate.html#ac6ec59469d6d7c33b90a67873ff19faa',1,'QXmppJingleCandidate::setPriority()'],['../classQXmppPresence.html#ae1d446d357b6cd883c096295be40ddbc',1,'QXmppPresence::setPriority()']]], ['setprivatekey',['setPrivateKey',['../classQXmppServer.html#a37741e9135fbd5b2ed26d5d9d24b2f79',1,'QXmppServer::setPrivateKey()'],['../classQXmppSslServer.html#ab1dfa5bc69ca5f2ea98ad87f586d69cd',1,'QXmppSslServer::setPrivateKey()']]], ['setprotocol',['setProtocol',['../classQXmppJingleCandidate.html#a554314b9bf1f86b58abb1cea409c0a89',1,'QXmppJingleCandidate']]], ['setproxy',['setProxy',['../classQXmppTransferManager.html#ad7d0f0496c85b85b448010d8a3c86d23',1,'QXmppTransferManager']]], ['setproxyonly',['setProxyOnly',['../classQXmppTransferManager.html#a46b2fc83d7773ae755e04a775694b5b8',1,'QXmppTransferManager']]], ['setptime',['setPtime',['../classQXmppJinglePayloadType.html#a55217b43a1ed57ef2fd03f9e9d000870',1,'QXmppJinglePayloadType']]], ['setqueryjid',['setQueryJid',['../classQXmppPubSubIq.html#a3baec6f49cf3be7cbe0aa674fd263a27',1,'QXmppPubSubIq']]], ['setquerynode',['setQueryNode',['../classQXmppPubSubIq.html#a4536330850f2ae8ef384062ee39f158c',1,'QXmppPubSubIq']]], ['setquerytype',['setQueryType',['../classQXmppPubSubIq.html#a67fecb1af8f3cc615abed963d9503752',1,'QXmppPubSubIq']]], ['setreason',['setReason',['../classQXmppMucItem.html#ac4e4bf962ca2b6f5b14126938930434e',1,'QXmppMucItem']]], ['setreceiptid',['setReceiptId',['../classQXmppMessage.html#a104137c6a141edae8da9678fb07429eb',1,'QXmppMessage']]], ['setreceiptrequested',['setReceiptRequested',['../classQXmppMessage.html#a7ea77ae7738907a21a41d4dc3da767a6',1,'QXmppMessage']]], ['setreceived',['setReceived',['../classQXmppArchiveMessage.html#ad50506d533febb834db77813fb234389',1,'QXmppArchiveMessage']]], ['setregion',['setRegion',['../classQXmppVCardAddress.html#a340b6526d2e57843256544a023925238',1,'QXmppVCardAddress']]], ['setremotepassword',['setRemotePassword',['../classQXmppIceComponent.html#a13d7b92269d4af812a19d042d6c1aceb',1,'QXmppIceComponent::setRemotePassword()'],['../classQXmppIceConnection.html#aafcb1ab8fd41cda479adba2f5da000f8',1,'QXmppIceConnection::setRemotePassword()']]], ['setremoteuser',['setRemoteUser',['../classQXmppIceComponent.html#a675c8f43d6d57cbe45e57efb557cd443',1,'QXmppIceComponent::setRemoteUser()'],['../classQXmppIceConnection.html#a57eadc3aad0a3f83eb697fa58612cd83',1,'QXmppIceConnection::setRemoteUser()']]], ['setrequired',['setRequired',['../classQXmppDataForm_1_1Field.html#aa1067cc412a7b39de116283e5bfcab2b',1,'QXmppDataForm::Field']]], ['setresource',['setResource',['../classQXmppBindIq.html#a1b34fadd2b220216e5ab508ca8e9dbe7',1,'QXmppBindIq::setResource()'],['../classQXmppConfiguration.html#a1194a37607906daa26bbefae8e28a43f',1,'QXmppConfiguration::setResource()']]], ['setresponder',['setResponder',['../classQXmppJingleIq.html#a31efd22d113f8adb25d0426781506429',1,'QXmppJingleIq']]], ['setresultsetquery',['setResultSetQuery',['../classQXmppArchiveListIq.html#a9bdad26ec2da6c29cb6346c9cb678724',1,'QXmppArchiveListIq::setResultSetQuery()'],['../classQXmppArchiveRetrieveIq.html#aeafd3008643fc99e7eeda30a44f73d13',1,'QXmppArchiveRetrieveIq::setResultSetQuery()']]], ['setresultsetreply',['setResultSetReply',['../classQXmppArchiveChatIq.html#a2810b51a68988ec4eb2a403acf0a6ebf',1,'QXmppArchiveChatIq::setResultSetReply()'],['../classQXmppArchiveListIq.html#a43670b11c671186e1d7d18fc987341d5',1,'QXmppArchiveListIq::setResultSetReply()']]], ['setringing',['setRinging',['../classQXmppJingleIq.html#a1b7383c7480885a0830b48d115968e27',1,'QXmppJingleIq']]], ['setrole',['setRole',['../classQXmppMucItem.html#aa54c2637d43ad27edfd427db5b8b901d',1,'QXmppMucItem']]], ['setsaslauthmechanism',['setSaslAuthMechanism',['../classQXmppConfiguration.html#a3aec3c957fcb1f4f169499c31dc899d2',1,'QXmppConfiguration']]], ['setsid',['setSid',['../classQXmppJingleIq.html#a129f1b4d2bc61b88ac8f96bf2085cf3f',1,'QXmppJingleIq']]], ['setsocket',['setSocket',['../classQXmppStream.html#a108216277f9a42ef3b252a46caeb5288',1,'QXmppStream']]], ['setsockets',['setSockets',['../classQXmppIceComponent.html#a315d2979cabe2ef7452d5f20da45dd31',1,'QXmppIceComponent']]], ['setstamp',['setStamp',['../classQXmppMessage.html#a9f2a9f5b56fa023f649c372f95fbf1af',1,'QXmppMessage']]], ['setstart',['setStart',['../classQXmppArchiveChat.html#a807add48c951860e7fa791e9b5729b5a',1,'QXmppArchiveChat::setStart()'],['../classQXmppArchiveListIq.html#a8cd1c9ab52c5043bfd046fcd02f5af61',1,'QXmppArchiveListIq::setStart()'],['../classQXmppArchiveRemoveIq.html#ab5b5c3d1a7a4f9b0b26aad50f1112d0c',1,'QXmppArchiveRemoveIq::setStart()'],['../classQXmppArchiveRetrieveIq.html#a9d1ad99cfbff05e309a194bb050290b9',1,'QXmppArchiveRetrieveIq::setStart()']]], ['setstate',['setState',['../classQXmppMessage.html#a3859bd7236f3bc19f908cec612c295d2',1,'QXmppMessage']]], ['setstatustext',['setStatusText',['../classQXmppPresence.html#a3fdeba7a7a1a7905289cbfc6daf8704f',1,'QXmppPresence']]], ['setstreamsecuritymode',['setStreamSecurityMode',['../classQXmppConfiguration.html#a299a81b1f6187b3be2d8bdc063b1f732',1,'QXmppConfiguration']]], ['setstreet',['setStreet',['../classQXmppVCardAddress.html#aae029bf7f502b5997b7120ea7aaf0a44',1,'QXmppVCardAddress']]], ['setstunserver',['setStunServer',['../classQXmppIceComponent.html#a93d01d02d0458597f90e3d3aaea51948',1,'QXmppIceComponent::setStunServer()'],['../classQXmppIceConnection.html#a172ef45ea78d084f495163b1816f0cec',1,'QXmppIceConnection::setStunServer()'],['../classQXmppCallManager.html#aab04548bb154fca0f6a0d619a337c989',1,'QXmppCallManager::setStunServer()']]], ['setsubject',['setSubject',['../classQXmppArchiveChat.html#af672abee71578730bd3f62afd5c8e3e2',1,'QXmppArchiveChat::setSubject()'],['../classQXmppMessage.html#a4b2b4eb5c07495d28c70ebf660bf32fd',1,'QXmppMessage::setSubject()'],['../classQXmppMucRoom.html#adf884eda82895acbdd26ab5918257429',1,'QXmppMucRoom::setSubject()']]], ['setsubscriptionid',['setSubscriptionId',['../classQXmppPubSubIq.html#a0b095ae35bd4f84dafa9f0730d3d1e62',1,'QXmppPubSubIq']]], ['setsubscriptionstatus',['setSubscriptionStatus',['../classQXmppRosterIq_1_1Item.html#af43b7efd16697d56e2e88ffdc5ff2929',1,'QXmppRosterIq::Item']]], ['setsubscriptiontype',['setSubscriptionType',['../classQXmppRosterIq_1_1Item.html#aa9f572853402d0094676e524439b6383',1,'QXmppRosterIq::Item']]], ['setsupportedmethods',['setSupportedMethods',['../classQXmppTransferManager.html#a1a6894de4393135f7f80488f180a6ea2',1,'QXmppTransferManager']]], ['setthread',['setThread',['../classQXmppArchiveChat.html#a75ab3d8e36075ff65d5d81618aa1f7bf',1,'QXmppArchiveChat::setThread()'],['../classQXmppMessage.html#a36ed8d1190f50b78af05ce806c1e90a6',1,'QXmppMessage::setThread()']]], ['settitle',['setTitle',['../classQXmppDataForm.html#afa08e0e1f30260375d1d846bcf20bc20',1,'QXmppDataForm']]], ['setto',['setTo',['../classQXmppStanza.html#a8296bac9c1821141bb67fae87910b8e0',1,'QXmppStanza']]], ['setturnpassword',['setTurnPassword',['../classQXmppIceComponent.html#a9dcbf749ad6050caa8c905cc581f5a5b',1,'QXmppIceComponent::setTurnPassword()'],['../classQXmppIceConnection.html#a1cb5ba7634ffcba433bc8b920ab2f859',1,'QXmppIceConnection::setTurnPassword()'],['../classQXmppCallManager.html#afcdf20af9e802cdabdb864daad5da7d7',1,'QXmppCallManager::setTurnPassword()']]], ['setturnserver',['setTurnServer',['../classQXmppIceComponent.html#aad43d7618d8abd66d549d37cca62c92f',1,'QXmppIceComponent::setTurnServer()'],['../classQXmppIceConnection.html#afd6f1bb0abdacba3a31bc66ed0a947db',1,'QXmppIceConnection::setTurnServer()'],['../classQXmppCallManager.html#a64feb39c4d6605d08896eeebdbbc2ae5',1,'QXmppCallManager::setTurnServer()']]], ['setturnuser',['setTurnUser',['../classQXmppIceComponent.html#a6b178961cf8e7b08c8c2f41f41be9f8f',1,'QXmppIceComponent::setTurnUser()'],['../classQXmppIceConnection.html#a4a64db6163995de3d213706306a3e663',1,'QXmppIceConnection::setTurnUser()'],['../classQXmppCallManager.html#ad516ee9d7304b7ef8dbf0e28c8baaa55',1,'QXmppCallManager::setTurnUser()']]], ['settype',['setType',['../classQXmppDataForm_1_1Field.html#ad35131a068782d9ab9871b07fee6f774',1,'QXmppDataForm::Field::setType()'],['../classQXmppDataForm.html#a78ba23e3b14a3367be036c94b7a52a0a',1,'QXmppDataForm::setType()'],['../classQXmppIq.html#ab4b5d1e875aeace442ac8828946ba2fe',1,'QXmppIq::setType()'],['../classQXmppJingleCandidate.html#a6fbb56ccff5afcef3a78fc7c2875c29d',1,'QXmppJingleCandidate::setType()'],['../classQXmppMessage.html#a794cd10f4265b4b7d9ef5e9fb6e0c9f0',1,'QXmppMessage::setType()'],['../classQXmppPresence.html#a011e173528a981f49c7940f77e66db36',1,'QXmppPresence::setType()'],['../classQXmppExtendedAddress.html#aca3237b6eada5645b1287530557b22c9',1,'QXmppExtendedAddress::setType()'],['../classQXmppVCardAddress.html#a34bb4b51f1572359ae3a28cd83b17a88',1,'QXmppVCardAddress::setType()'],['../classQXmppVCardEmail.html#ac8c505392a51390d8466533f4a27a5e7',1,'QXmppVCardEmail::setType()'],['../classQXmppVCardPhone.html#ae52e172c8f4e24c2b06aa208c4704f41',1,'QXmppVCardPhone::setType()'],['../classQXmppDialback.html#a19eef491fa3d28ec65fa000aeb8e216a',1,'QXmppDialback::setType()']]], ['seturis',['setUris',['../classQXmppDataForm_1_1Media.html#a488070c9fc7290b41f3ef3492a72ffef',1,'QXmppDataForm::Media']]], ['seturl',['setUrl',['../classQXmppBookmarkUrl.html#a7b61c601cb00b9038a3a894fb09ea305',1,'QXmppBookmarkUrl::setUrl()'],['../classQXmppVCardIq.html#a5036f61a15796c6cc6ba172c210b7c09',1,'QXmppVCardIq::setUrl()']]], ['seturls',['setUrls',['../classQXmppBookmarkSet.html#a64084ffccdb5ab1592aabadb318352e8',1,'QXmppBookmarkSet']]], ['setusenonsaslauthentication',['setUseNonSASLAuthentication',['../classQXmppConfiguration.html#aa35552fc5f2cbc3f3651f75de5ea2b26',1,'QXmppConfiguration']]], ['setuser',['setUser',['../classQXmppConfiguration.html#a8cd27e7f2f584b6faa59a0f5cb1ee6b4',1,'QXmppConfiguration']]], ['setusername',['setUsername',['../classQXmppRegisterIq.html#a2f4bea63a8686b1e32d40699bbb0078c',1,'QXmppRegisterIq::setUsername()'],['../classQXmppPasswordRequest.html#a0a84977feca05b3c5bc4df8e93dd5f96',1,'QXmppPasswordRequest::setUsername()']]], ['setusesaslauthentication',['setUseSASLAuthentication',['../classQXmppConfiguration.html#a4c9542ac86f8305e6cea4f2ad0366fb5',1,'QXmppConfiguration']]], ['setvalue',['setValue',['../classQXmppDataForm_1_1Field.html#a7326a294d7f809d8001b47fcd6be4dba',1,'QXmppDataForm::Field']]], ['setvalues',['setValues',['../classQXmppRpcResponseIq.html#a88e0e05de1bdc3bdd05e4ea8a8c61446',1,'QXmppRpcResponseIq']]], ['setvcardupdatetype',['setVCardUpdateType',['../classQXmppPresence.html#a094e60c4acb919bb618e78d7be512755',1,'QXmppPresence']]], ['setverify',['setVerify',['../classQXmppOutgoingServer.html#ab46469ded7de73e98e205625dcfe05a5',1,'QXmppOutgoingServer']]], ['setversion',['setVersion',['../classQXmppArchiveChat.html#a05cab859aa158cb5948eee532991ec3e',1,'QXmppArchiveChat::setVersion()'],['../classQXmppVersionIq.html#a70da818941802b0270b92db779a46fe6',1,'QXmppVersionIq::setVersion()']]], ['setwidth',['setWidth',['../classQXmppDataForm_1_1Media.html#acc2927dfed4d38323861284c683e481a',1,'QXmppDataForm::Media']]], ['setwindowsliveaccesstoken',['setWindowsLiveAccessToken',['../classQXmppConfiguration.html#a2950623fabf4eb939837a7856b7720ab',1,'QXmppConfiguration']]], ['setwith',['setWith',['../classQXmppArchiveChat.html#ac2e70182971fcc63b9f40f603f07adc3',1,'QXmppArchiveChat::setWith()'],['../classQXmppArchiveListIq.html#af87f5d02c0c953d469399fde7075ec49',1,'QXmppArchiveListIq::setWith()'],['../classQXmppArchiveRemoveIq.html#a9f7bb87b8346fa0b83bce5149c50d496',1,'QXmppArchiveRemoveIq::setWith()'],['../classQXmppArchiveRetrieveIq.html#a067eb2f626d88847ff185b1e770a095e',1,'QXmppArchiveRetrieveIq::setWith()']]], ['setxhtml',['setXhtml',['../classQXmppMessage.html#a902a545bb8c628124d52136186574296',1,'QXmppMessage']]], ['sid',['sid',['../classQXmppJingleIq.html#a846549a7ce2ff322b466902a454ba4e5',1,'QXmppJingleIq::sid()'],['../classQXmppCall.html#a1a47d872cb001717eb7644dd6f168926',1,'QXmppCall::sid()'],['../classQXmppTransferJob.html#a02a1bfd07e06be44c23a2d1c559faba7',1,'QXmppTransferJob::sid()']]], ['size',['size',['../classQXmppVideoFrame.html#a1ea7f893dc931c3c32d9169a1f07be92',1,'QXmppVideoFrame']]], ['socket',['socket',['../classQXmppStream.html#acf771736ced3f18a0a763eb3b161b9c9',1,'QXmppStream::socket()'],['../classQXmppOutgoingClient.html#aca9b91ad84dc40275e4aa317f12ffa5c',1,'QXmppOutgoingClient::socket()']]], ['socketerror',['socketError',['../classQXmppClient.html#a2b044b37ce88a2f2e65833b3d6e57a9f',1,'QXmppClient']]], ['speed',['speed',['../classQXmppTransferJob.html#ad4a631dda697f59eb03bf373aeddf6a6',1,'QXmppTransferJob']]], ['stamp',['stamp',['../classQXmppMessage.html#a75532528f320e94dc030f4a6e7ea9fbc',1,'QXmppMessage']]], ['start',['start',['../classQXmppArchiveChat.html#a92f75a9737deb2ce322c2767634ab935',1,'QXmppArchiveChat::start()'],['../classQXmppArchiveListIq.html#abc3a47af035fd370e193e4fedac525f3',1,'QXmppArchiveListIq::start()'],['../classQXmppArchiveRemoveIq.html#afee3c666048c4cb211753e3dc0a54822',1,'QXmppArchiveRemoveIq::start()'],['../classQXmppArchiveRetrieveIq.html#ac8d0606440dd22b189e48521b50e46d1',1,'QXmppArchiveRetrieveIq::start()'],['../classQXmppServerExtension.html#a5341d9bb242ac64b996a35219eac1679',1,'QXmppServerExtension::start()']]], ['starttone',['startTone',['../classQXmppRtpAudioChannel.html#a70b63c9ec09cc6d2a39403e4b680581a',1,'QXmppRtpAudioChannel']]], ['startvideo',['startVideo',['../classQXmppCall.html#a08cfa042104fbdd80019c38670cd02b2',1,'QXmppCall']]], ['state',['state',['../classQXmppMessage.html#af90654a174ae92bb7904ed01b4d81dc4',1,'QXmppMessage']]], ['statechanged',['stateChanged',['../classQXmppCall.html#a16dd6c41d04900e322ce522d010cd513',1,'QXmppCall::stateChanged()'],['../classQXmppClient.html#a8bd2617265568c9769a8ba608a4ff05d',1,'QXmppClient::stateChanged()'],['../classQXmppTransferJob.html#a040ea186f586a3a9ffbc6e52b3cd3917',1,'QXmppTransferJob::stateChanged()']]], ['statistics',['statistics',['../classQXmppServer.html#ab0453751b0aab88ff0cbd2cc26d9a42d',1,'QXmppServer']]], ['statustext',['statusText',['../classQXmppPresence.html#a1d4bb1a64a37ede53df5c2fdf9f6af4f',1,'QXmppPresence']]], ['stop',['stop',['../classQXmppServerExtension.html#acbf4204a0bf898e70bf3e2fdceae6b09',1,'QXmppServerExtension']]], ['stoptone',['stopTone',['../classQXmppRtpAudioChannel.html#af19f7b1a9686dafaef24ff4fc9a2c3e6',1,'QXmppRtpAudioChannel']]], ['stopvideo',['stopVideo',['../classQXmppCall.html#afb995517f1cc43296000ba9321aefb74',1,'QXmppCall']]], ['streamsecuritymode',['streamSecurityMode',['../classQXmppConfiguration.html#ad9154f1c774a12a74692b5c1d2576ad8',1,'QXmppConfiguration']]], ['street',['street',['../classQXmppVCardAddress.html#a690e263b923b6ee066ae9780d4fa12f6',1,'QXmppVCardAddress']]], ['subject',['subject',['../classQXmppArchiveChat.html#a56fa1f42874def672a0d4dc2501ca251',1,'QXmppArchiveChat::subject()'],['../classQXmppMessage.html#a4f7723d2f97362965151e32f666d4739',1,'QXmppMessage::subject()']]], ['subjectchanged',['subjectChanged',['../classQXmppMucRoom.html#a3ebda02e7b225cf6bdc264290c40b5a7',1,'QXmppMucRoom']]], ['subscribe',['subscribe',['../classQXmppRosterManager.html#a454db4d2832168f1302539be2d1e6435',1,'QXmppRosterManager']]], ['subscriptionid',['subscriptionId',['../classQXmppPubSubIq.html#adb11498556fe6f224a50caa10e7a2e18',1,'QXmppPubSubIq']]], ['subscriptionreceived',['subscriptionReceived',['../classQXmppRosterManager.html#a3407f699aded8ed2724cdbb121678c4a',1,'QXmppRosterManager']]], ['subscriptionstatus',['subscriptionStatus',['../classQXmppRosterIq_1_1Item.html#aa32adf5d96267c3d4892f98cd37cd2d1',1,'QXmppRosterIq::Item']]], ['subscriptiontype',['subscriptionType',['../classQXmppRosterIq_1_1Item.html#a110aa10b3746d32e0b2e1f03c22b89c4',1,'QXmppRosterIq::Item']]] ]; qxmpp-0.7.6/doc/html/search/all_77.js0000644000175000007640000000230712116723632017217 0ustar sharkyjerrywebvar searchData= [ ['warning',['warning',['../classQXmppLoggable.html#aed6488cb2ca9c636876e2444c635bd72',1,'QXmppLoggable']]], ['warningmessage',['WarningMessage',['../classQXmppLogger.html#a932dbbd4f70a1e9c0ff8f452e61fc9b8adb2cbaa9ae0daa021fa4feddf085910a',1,'QXmppLogger']]], ['width',['width',['../classQXmppDataForm_1_1Media.html#a355906089937067230b86d5b67d72db7',1,'QXmppDataForm::Media::width()'],['../classQXmppVideoFrame.html#a07853c0f2b50643a87473889cf0447e1',1,'QXmppVideoFrame::width()']]], ['windowsliveaccesstoken',['windowsLiveAccessToken',['../classQXmppConfiguration.html#a96dac8e5867395e4229a57de23ce518b',1,'QXmppConfiguration']]], ['with',['with',['../classQXmppArchiveChat.html#ae44837a0cdc501426ed70c469f9f6eb4',1,'QXmppArchiveChat::with()'],['../classQXmppArchiveListIq.html#a3609669356d73ed933d874c15fbf0847',1,'QXmppArchiveListIq::with()'],['../classQXmppArchiveRemoveIq.html#ab815858ab3ae0a318e0b53269c7cfa48',1,'QXmppArchiveRemoveIq::with()'],['../classQXmppArchiveRetrieveIq.html#a034e30ec531789a1f77512a9001693b5',1,'QXmppArchiveRetrieveIq::with()']]], ['writeframe',['writeFrame',['../classQXmppRtpVideoChannel.html#a17673e645003e0ee9b011f7a8bcc8f64',1,'QXmppRtpVideoChannel']]] ]; qxmpp-0.7.6/doc/html/search/classes_69.html0000644000175000007640000000171012116723632020432 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/functions_72.html0000644000175000007640000000171212116723632021001 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/enums_76.js0000644000175000007640000000022212116723632017567 0ustar sharkyjerrywebvar searchData= [ ['vcardupdatetype',['VCardUpdateType',['../classQXmppPresence.html#a642a378dd425bbbda1de4317e2dcd199',1,'QXmppPresence']]] ]; qxmpp-0.7.6/doc/html/search/enumvalues_77.js0000644000175000007640000000025512116723632020633 0ustar sharkyjerrywebvar searchData= [ ['warningmessage',['WarningMessage',['../classQXmppLogger.html#a932dbbd4f70a1e9c0ff8f452e61fc9b8adb2cbaa9ae0daa021fa4feddf085910a',1,'QXmppLogger']]] ]; qxmpp-0.7.6/doc/html/search/all_78.html0000644000175000007640000000170412116723632017550 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/functions_6d.html0000644000175000007640000000171212116723632021062 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/classes_66.html0000644000175000007640000000171012116723632020427 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/functions_6d.js0000644000175000007640000000465512116723632020543 0ustar sharkyjerrywebvar searchData= [ ['mappedbytes',['mappedBytes',['../classQXmppVideoFrame.html#a75609b38f580867a1b325bc9e1a49958',1,'QXmppVideoFrame']]], ['max',['max',['../classQXmppResultSetQuery.html#aaa6e47f12046a80a3135c13672cb38e2',1,'QXmppResultSetQuery']]], ['maxptime',['maxptime',['../classQXmppJinglePayloadType.html#ab6971a4585334d2184c4a43cc65ca13f',1,'QXmppJinglePayloadType']]], ['media',['media',['../classQXmppDataForm_1_1Field.html#ad04607c2dcd793c9d210ed39ac3f0ec8',1,'QXmppDataForm::Field::media()'],['../classQXmppDataForm_1_1Media.html#a5b0b93f31928801d362573b49743a785',1,'QXmppDataForm::Media::Media()'],['../classQXmppDataForm_1_1Media.html#a9d9f91709c70e8591df3fd5d26bdaa18',1,'QXmppDataForm::Media::Media(const QXmppDataForm::Media &other)']]], ['message',['message',['../classQXmppLogger.html#a7b9d3f1ebab11c651a26dde5b49344ce',1,'QXmppLogger']]], ['messagedelivered',['messageDelivered',['../classQXmppMessageReceiptManager.html#ac7940d37e55e8f424fa13cae6c6c5799',1,'QXmppMessageReceiptManager']]], ['messagereceived',['messageReceived',['../classQXmppClient.html#aa3023a1ba0628cff1032f86df93d7bc3',1,'QXmppClient::messageReceived()'],['../classQXmppMucRoom.html#a1308c355bdfad95e97519d991728d44c',1,'QXmppMucRoom::messageReceived()'],['../classQXmppOutgoingClient.html#a862561dc51e446669311d374fd96f060',1,'QXmppOutgoingClient::messageReceived()']]], ['messages',['messages',['../classQXmppArchiveChat.html#ae70bdf32be4be0a9417a7c14c5ea6eea',1,'QXmppArchiveChat']]], ['method',['method',['../classQXmppRpcInvokeIq.html#a484c6cae06cfff75ba2247d16556c76f',1,'QXmppRpcInvokeIq']]], ['middlename',['middleName',['../classQXmppVCardIq.html#a52d8aa814dc5c90a9fa25fe852fad216',1,'QXmppVCardIq']]], ['mucinvitationjid',['mucInvitationJid',['../classQXmppMessage.html#ac9ac6519101e7c5301c0656a7c7b1a40',1,'QXmppMessage']]], ['mucinvitationpassword',['mucInvitationPassword',['../classQXmppMessage.html#abb1fa92382c83981f3ec2cbd2a2165ba',1,'QXmppMessage']]], ['mucinvitationreason',['mucInvitationReason',['../classQXmppMessage.html#ab0ae8f1c7ef1082e90e80a1589a1c855',1,'QXmppMessage']]], ['mucitem',['mucItem',['../classQXmppPresence.html#abd4348359cb60bfe645086bec0681178',1,'QXmppPresence']]], ['mucpassword',['mucPassword',['../classQXmppPresence.html#ae4d3eb2459c4536a14618662b3d10164',1,'QXmppPresence']]], ['mucstatuscodes',['mucStatusCodes',['../classQXmppPresence.html#afee1692914be90c24da5e872933e5023',1,'QXmppPresence']]] ]; qxmpp-0.7.6/doc/html/search/functions_68.html0000644000175000007640000000171212116723632021006 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/enums_72.html0000644000175000007640000000170612116723632020123 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/enums_61.js0000644000175000007640000000073712116723632017574 0ustar sharkyjerrywebvar searchData= [ ['action',['Action',['../classQXmppJingleIq.html#accfb8d2dec7f9ee9a8de7bff4f1de1ec',1,'QXmppJingleIq::Action()'],['../classQXmppMucRoom.html#acd3129293f69d7e7cdd91b65aae0606f',1,'QXmppMucRoom::Action()']]], ['affiliation',['Affiliation',['../classQXmppMucItem.html#a3a0d58827ab4d535326fc6d3dbcbd417',1,'QXmppMucItem']]], ['availablestatustype',['AvailableStatusType',['../classQXmppPresence.html#ad56af0f57b732c09b080b9347c4dba94',1,'QXmppPresence']]] ]; qxmpp-0.7.6/doc/html/search/enumvalues_6b.js0000644000175000007640000000050012116723632020676 0ustar sharkyjerrywebvar searchData= [ ['keepaliveerror',['KeepAliveError',['../classQXmppClient.html#a7c2851d07cc33119752abc6ec8ffc47aa9b8aabc7956d082a04b4d0ed879564aa',1,'QXmppClient']]], ['kickaction',['KickAction',['../classQXmppMucRoom.html#acd3129293f69d7e7cdd91b65aae0606fa3d65a5019321c87100e1bd61881b8559',1,'QXmppMucRoom']]] ]; qxmpp-0.7.6/doc/html/search/all_61.js0000644000175000007640000001354312116723632017214 0ustar sharkyjerrywebvar searchData= [ ['abort',['abort',['../classQXmppTransferJob.html#a22d997eaa5f3f906ef4d9e311a0e3939',1,'QXmppTransferJob']]], ['aborterror',['AbortError',['../classQXmppTransferJob.html#abacb5103efd8148e13b9c616113366bda0e4b5001e71380ad5f06f68cec3a08d8',1,'QXmppTransferJob']]], ['accept',['accept',['../classQXmppCall.html#a0627637efc9efd57aada1ce783b94457',1,'QXmppCall::accept()'],['../classQXmppTransferJob.html#ae8a1b5cb89a012eb1f8e85b5079379c0',1,'QXmppTransferJob::accept(const QString &filePath)'],['../classQXmppTransferJob.html#aeb89d694c0f604dd7c955ceeb5e4347d',1,'QXmppTransferJob::accept(QIODevice *output)']]], ['acceptsubscription',['acceptSubscription',['../classQXmppRosterManager.html#a0b8e48ba14b36a5ce3a04d8b3fe456ab',1,'QXmppRosterManager']]], ['action',['Action',['../classQXmppJingleIq.html#accfb8d2dec7f9ee9a8de7bff4f1de1ec',1,'QXmppJingleIq::Action()'],['../classQXmppMucRoom.html#acd3129293f69d7e7cdd91b65aae0606f',1,'QXmppMucRoom::Action()'],['../classQXmppJingleIq.html#aadd9b1aaba5d5e6edba0c539bf22bfb4',1,'QXmppJingleIq::action()']]], ['active',['Active',['../classQXmppMessage.html#aeaa3cc5ccb7d451067a80dd1f3c7099aa2a197e88be8355a853534c2342e64c48',1,'QXmppMessage']]], ['activestate',['ActiveState',['../classQXmppCall.html#a90205b5034613127d2c4adc6a0252759ac43dd016f3eb2141b9ee044c255afcb8',1,'QXmppCall']]], ['actor',['actor',['../classQXmppMucItem.html#a01aafb9cb7c7c37613c11cb518196ead',1,'QXmppMucItem']]], ['addcacertificates',['addCaCertificates',['../classQXmppServer.html#a96ac43ec46b09d23d60e5b874645d253',1,'QXmppServer::addCaCertificates()'],['../classQXmppSslServer.html#a16de688275b4967ce4aa688f5f8e5f75',1,'QXmppSslServer::addCaCertificates()']]], ['addcomponent',['addComponent',['../classQXmppIceConnection.html#ac98283e6c42dd6318575c2880fd2edd8',1,'QXmppIceConnection']]], ['addextension',['addExtension',['../classQXmppClient.html#a61ccf1c37ca3f26bfd14e65c8ecf1740',1,'QXmppClient::addExtension()'],['../classQXmppServer.html#af8faf560a73c3fbe4fad705753c09d40',1,'QXmppServer::addExtension()']]], ['addincomingclient',['addIncomingClient',['../classQXmppServer.html#adc4c461cb514b5c5aba2d5d320f1d09d',1,'QXmppServer']]], ['addinvokableinterface',['addInvokableInterface',['../classQXmppRpcManager.html#a015ec2d968d2b4460325531157e8b0bf',1,'QXmppRpcManager']]], ['additem',['addItem',['../classQXmppRosterIq.html#ab7c8d7ec0b185f48e175afb00b8f72d5',1,'QXmppRosterIq::addItem()'],['../classQXmppRosterManager.html#a7039e2a5c0bf0504606356872cd7b47a',1,'QXmppRosterManager::addItem()']]], ['addremotecandidate',['addRemoteCandidate',['../classQXmppIceComponent.html#a63e4d233754452c3e81302b358a13026',1,'QXmppIceComponent::addRemoteCandidate()'],['../classQXmppIceConnection.html#a0a7f8f4176deddf2e2022f4634fbc08a',1,'QXmppIceConnection::addRemoteCandidate()']]], ['address',['address',['../classQXmppVCardEmail.html#af8cddfc269875613436846dcf05937c1',1,'QXmppVCardEmail']]], ['addresses',['addresses',['../classQXmppVCardIq.html#aa0bf01a9040b18e0043dfa8547b36f16',1,'QXmppVCardIq']]], ['addroom',['addRoom',['../classQXmppMucManager.html#a931a67884858d4440b9c307bae50d8a8',1,'QXmppMucManager']]], ['affiliation',['Affiliation',['../classQXmppMucItem.html#a3a0d58827ab4d535326fc6d3dbcbd417',1,'QXmppMucItem::Affiliation()'],['../classQXmppMucItem.html#a2c485ce387bac064704c7ed3e2cccd14',1,'QXmppMucItem::affiliation() const ']]], ['after',['after',['../classQXmppResultSetQuery.html#aa45ce7f461dc7d38885f381211efe395',1,'QXmppResultSetQuery']]], ['allowedactions',['allowedActions',['../classQXmppMucRoom.html#a3b41defb3bcf48bf7ce51c8163aac803',1,'QXmppMucRoom']]], ['allowedactionschanged',['allowedActionsChanged',['../classQXmppMucRoom.html#ad48ffe7c58476c2f9f77f73f51002d78',1,'QXmppMucRoom']]], ['anymessage',['AnyMessage',['../classQXmppLogger.html#a932dbbd4f70a1e9c0ff8f452e61fc9b8a4d23e0e5cc611ed29c10ae10b60a1fb7',1,'QXmppLogger']]], ['anymethod',['AnyMethod',['../classQXmppTransferJob.html#a962582d3049909305277e54e2095c71ba3a44df5bc47241f7bdc3ba4ca5018032',1,'QXmppTransferJob']]], ['archivechatreceived',['archiveChatReceived',['../classQXmppArchiveManager.html#a703aa568d0ec6a7ce604004247fd97ec',1,'QXmppArchiveManager']]], ['archivelistreceived',['archiveListReceived',['../classQXmppArchiveManager.html#a664908d079afe2baeeb49396b5e53ede',1,'QXmppArchiveManager']]], ['arebookmarksreceived',['areBookmarksReceived',['../classQXmppBookmarkManager.html#ae61e6b96bd1e72019f9c96dd80bb6225',1,'QXmppBookmarkManager']]], ['arguments',['arguments',['../classQXmppRpcInvokeIq.html#a870ba44778b440a333f934979abfff34',1,'QXmppRpcInvokeIq']]], ['audiochannel',['audioChannel',['../classQXmppCall.html#aff2006c93114c3c4bcff232705658516',1,'QXmppCall']]], ['audiomode',['audioMode',['../classQXmppCall.html#aa8d261bbeabb9b3225d2590788f51fce',1,'QXmppCall']]], ['audiomodechanged',['audioModeChanged',['../classQXmppCall.html#a3da1d9302889a44a06f9d45fbd3aef33',1,'QXmppCall']]], ['autoacceptsubscriptions',['autoAcceptSubscriptions',['../classQXmppConfiguration.html#a03cdbc1bdaee40204b55efe84f363c0a',1,'QXmppConfiguration']]], ['autojoin',['autoJoin',['../classQXmppBookmarkConference.html#a993f88a4d5eb798ef972b097996c83e4',1,'QXmppBookmarkConference']]], ['autoreconnectionenabled',['autoReconnectionEnabled',['../classQXmppConfiguration.html#a8b9aad6cb544bfc51529772d1ed7d0ab',1,'QXmppConfiguration']]], ['available',['Available',['../classQXmppPresence.html#a47ab8dd08436f9d7c90d2990678b5a6daee4c403679460358c9002562794059d3',1,'QXmppPresence']]], ['availablestatustype',['AvailableStatusType',['../classQXmppPresence.html#ad56af0f57b732c09b080b9347c4dba94',1,'QXmppPresence::AvailableStatusType()'],['../classQXmppPresence.html#a33aa276d9c31556f8616f6c9fd471f0e',1,'QXmppPresence::availableStatusType() const ']]], ['away',['Away',['../classQXmppPresence.html#ad56af0f57b732c09b080b9347c4dba94acebcb202966ea59ea213459d36e2d949',1,'QXmppPresence']]] ]; qxmpp-0.7.6/doc/html/search/variables_73.js0000644000175000007640000000053412116723632020413 0ustar sharkyjerrywebvar searchData= [ ['sequence',['sequence',['../classQXmppRtpPacket.html#a42375a7e8a10d35c721755762f2c2516',1,'QXmppRtpPacket']]], ['ssrc',['ssrc',['../classQXmppRtpPacket.html#a055a9370c194aade4b32ff15562bf3cf',1,'QXmppRtpPacket']]], ['stamp',['stamp',['../classQXmppRtpPacket.html#ac407e829affe1bca80ca191f232f4b03',1,'QXmppRtpPacket']]] ]; qxmpp-0.7.6/doc/html/search/all_65.js0000644000175000007640000000607312116723632017220 0ustar sharkyjerrywebvar searchData= [ ['elementreceived',['elementReceived',['../classQXmppOutgoingClient.html#a9be28568b016d24502d2f766cf42cbba',1,'QXmppOutgoingClient::elementReceived()'],['../classQXmppIncomingClient.html#a6797577d34078238df80380b68e68aa8',1,'QXmppIncomingClient::elementReceived()'],['../classQXmppIncomingServer.html#a79308b406dc7b6a69e08f18fb6587bcc',1,'QXmppIncomingServer::elementReceived()']]], ['email',['email',['../classQXmppRegisterIq.html#a3f65ada262f8fcc9165fec6b9074408a',1,'QXmppRegisterIq::email()'],['../classQXmppVCardIq.html#afdbb733f0ea07c2ff47ad4cac30b0cad',1,'QXmppVCardIq::email()']]], ['emails',['emails',['../classQXmppVCardIq.html#a026d0950efc37e130f7bc27e88fb0386',1,'QXmppVCardIq']]], ['encode',['encode',['../classQXmppRtpPacket.html#aedc497730691065d46997202cfb78000',1,'QXmppRtpPacket']]], ['encoderformat',['encoderFormat',['../classQXmppRtpVideoChannel.html#ab3660ef26a4af0b91fbf199cf78e186b',1,'QXmppRtpVideoChannel']]], ['end',['end',['../classQXmppArchiveListIq.html#ab7dbb598303422e752b6c3a4e862a273',1,'QXmppArchiveListIq::end()'],['../classQXmppArchiveRemoveIq.html#adb6af974e8ec8891583644d3de6cf6ed',1,'QXmppArchiveRemoveIq::end()']]], ['error',['Error',['../classQXmppClient.html#a7c2851d07cc33119752abc6ec8ffc47a',1,'QXmppClient::Error()'],['../classQXmppTransferJob.html#abacb5103efd8148e13b9c616113366bd',1,'QXmppTransferJob::Error()'],['../classQXmppPasswordReply.html#ac82ccc3fa130a75e97816c19b598da59',1,'QXmppPasswordReply::Error()'],['../classQXmppIq.html#a6bc7a0505a3be7309051ae2432a3d826a3777dc62b2a51edfceed871ba68f438d',1,'QXmppIq::Error()'],['../classQXmppPresence.html#a47ab8dd08436f9d7c90d2990678b5a6dafe9d13e17362533f94ec92720fb07157',1,'QXmppPresence::Error()'],['../classQXmppStanza.html#a5ac3402fcc210cbc5a9a98501637bbc6',1,'QXmppStanza::error()'],['../classQXmppClient.html#a2bac100e40a909c860a3397643349937',1,'QXmppClient::error()'],['../classQXmppMucRoom.html#a0ff76d3091de98d7228e64ecaa954d42',1,'QXmppMucRoom::error()'],['../classQXmppOutgoingClient.html#a14d8a6c2a48c1ed6a2716002c0a29d21',1,'QXmppOutgoingClient::error()'],['../classQXmppTransferJob.html#a12fb2a7201244f6f506894f24b31f518',1,'QXmppTransferJob::error() const '],['../classQXmppTransferJob.html#a84198613e944168769b20357cfe2f626',1,'QXmppTransferJob::error()'],['../classQXmppPasswordReply.html#a08cd9a5b26a5281a2fea4f16a87aa0de',1,'QXmppPasswordReply::error()']]], ['extendedaddresses',['extendedAddresses',['../classQXmppStanza.html#af2fb9de2e719e1312a33554b3866e0c6',1,'QXmppStanza']]], ['extensionname',['extensionName',['../classQXmppServerExtension.html#ae70b92e5a9f709ea25a3e54ec1bcbc5b',1,'QXmppServerExtension']]], ['extensionpriority',['extensionPriority',['../classQXmppServerExtension.html#a86c839fe03a4ec667878148eca0782f7',1,'QXmppServerExtension']]], ['extensions',['extensions',['../classQXmppStanza.html#a4742b3dc8dee132244107910ae8d1603',1,'QXmppStanza::extensions()'],['../classQXmppClient.html#aaa12f4be9ab48f0c9375479ecd7172e9',1,'QXmppClient::extensions()'],['../classQXmppServer.html#a51e1fb51eedb4f6ad645cfc4acc9926e',1,'QXmppServer::extensions()']]] ]; qxmpp-0.7.6/doc/html/search/enumvalues_72.js0000644000175000007640000000156612116723632020634 0ustar sharkyjerrywebvar searchData= [ ['receivedmessage',['ReceivedMessage',['../classQXmppLogger.html#a932dbbd4f70a1e9c0ff8f452e61fc9b8a9fe070da70e5b2a5c2e6e97a58ee8da7',1,'QXmppLogger']]], ['relayedtype',['RelayedType',['../classQXmppJingleCandidate.html#a6314b3ed7de59b68131db6ffab55fe7daca50a30f0ac47c89e25b5f74b846cffb',1,'QXmppJingleCandidate']]], ['remove',['Remove',['../classQXmppRosterIq_1_1Item.html#a0133cf9262cec7e299c4db7c247c5514a126d552db04eb0336747ca34e2c91cee',1,'QXmppRosterIq::Item']]], ['result',['Result',['../classQXmppDataForm.html#adab12c436b8c450e2b4f59da1aecadeeae5ab980ce478727be2a09112bd55e2f9',1,'QXmppDataForm::Result()'],['../classQXmppIq.html#a6bc7a0505a3be7309051ae2432a3d826a8fa093ce2dcc1baf865ca6203d2712f1',1,'QXmppIq::Result()'],['../classQXmppDialback.html#a0448107c56f892056f359013b80798bcaa6debf8f80d7366af3cff72363fd0477',1,'QXmppDialback::Result()']]] ]; qxmpp-0.7.6/doc/html/search/enumvalues_65.js0000644000175000007640000000043112116723632020624 0ustar sharkyjerrywebvar searchData= [ ['error',['Error',['../classQXmppIq.html#a6bc7a0505a3be7309051ae2432a3d826a3777dc62b2a51edfceed871ba68f438d',1,'QXmppIq::Error()'],['../classQXmppPresence.html#a47ab8dd08436f9d7c90d2990678b5a6dafe9d13e17362533f94ec92720fb07157',1,'QXmppPresence::Error()']]] ]; qxmpp-0.7.6/doc/html/search/enumvalues_64.js0000644000175000007640000000115412116723632020626 0ustar sharkyjerrywebvar searchData= [ ['debugmessage',['DebugMessage',['../classQXmppLogger.html#a932dbbd4f70a1e9c0ff8f452e61fc9b8ad37e67a6433954474cdd1a44ee8d8bae',1,'QXmppLogger']]], ['disconnectedstate',['DisconnectedState',['../classQXmppClient.html#a5f4e70d508c08967f72fd41c5343ad2ea6bd1662e23e948aa1cb83b628c8b472c',1,'QXmppClient']]], ['disconnectingstate',['DisconnectingState',['../classQXmppCall.html#a90205b5034613127d2c4adc6a0252759ac703ddc035652668500e44376d38333d',1,'QXmppCall']]], ['dnd',['DND',['../classQXmppPresence.html#ad56af0f57b732c09b080b9347c4dba94a665a0346b1da2e5ddc521b47456ce729',1,'QXmppPresence']]] ]; qxmpp-0.7.6/doc/html/search/enums_74.html0000644000175000007640000000170612116723632020125 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/all_62.js0000644000175000007640000000325012116723632017207 0ustar sharkyjerrywebvar searchData= [ ['ban',['ban',['../classQXmppMucRoom.html#a1c4be76e72f4b3d91752e653e722ed7c',1,'QXmppMucRoom']]], ['barejid',['bareJid',['../classQXmppRosterIq_1_1Item.html#ab221fe068220e81efd0ca7ce8629b51d',1,'QXmppRosterIq::Item']]], ['before',['before',['../classQXmppResultSetQuery.html#a18330d1eaafd1d3f5ce18fc6d53956b9',1,'QXmppResultSetQuery']]], ['bind',['bind',['../classQXmppIceConnection.html#a21afce5d6bab75567edb2765fb2dce11',1,'QXmppIceConnection']]], ['birthday',['birthday',['../classQXmppVCardIq.html#a2d2a9f093833db58aa1df9603c9d2146',1,'QXmppVCardIq']]], ['bits',['bits',['../classQXmppVideoFrame.html#a969344e616ca53851d1d2fa1664f66fe',1,'QXmppVideoFrame::bits()'],['../classQXmppVideoFrame.html#a11aed117d01a623679e48c0223b13a1a',1,'QXmppVideoFrame::bits() const ']]], ['body',['body',['../classQXmppArchiveMessage.html#a050f075904b135e03f1c787f78af4d0f',1,'QXmppArchiveMessage::body()'],['../classQXmppMessage.html#aac3e82974ab462b12b4de2493dc2467c',1,'QXmppMessage::body()']]], ['bookmarks',['bookmarks',['../classQXmppBookmarkManager.html#a918afcea89ab482c2112f7cafa48eff9',1,'QXmppBookmarkManager']]], ['bookmarksreceived',['bookmarksReceived',['../classQXmppBookmarkManager.html#a6b4c3ebab3bc03e313dc3b5392394a6c',1,'QXmppBookmarkManager']]], ['both',['Both',['../classQXmppRosterIq_1_1Item.html#a0133cf9262cec7e299c4db7c247c5514ad7dc2c24e3f207106bad568b6d705df7',1,'QXmppRosterIq::Item']]], ['bytesavailable',['bytesAvailable',['../classQXmppRtpAudioChannel.html#ab466e33fdac225754fce1403e76a67a8',1,'QXmppRtpAudioChannel']]], ['bytesperline',['bytesPerLine',['../classQXmppVideoFrame.html#a03da51f8e009d31cd57c399cf7708138',1,'QXmppVideoFrame']]] ]; qxmpp-0.7.6/doc/html/search/functions_66.html0000644000175000007640000000171212116723632021004 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/enums_64.html0000644000175000007640000000170612116723632020124 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/functions_6c.html0000644000175000007640000000171212116723632021061 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/all_71.html0000644000175000007640000000170412116723632017541 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/enumvalues_75.html0000644000175000007640000000171312116723632021161 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/all_68.js0000644000175000007640000000305512116723632017220 0ustar sharkyjerrywebvar searchData= [ ['handleelement',['handleElement',['../classQXmppServer.html#ab7ee638bc69fd4ca76638e45a64c6ec4',1,'QXmppServer']]], ['handlestanza',['handleStanza',['../classQXmppStream.html#aeb24cc2f3b30c902f0a6e3be9586510d',1,'QXmppStream::handleStanza()'],['../classQXmppClientExtension.html#af026d292204dc538249d16086e9e8108',1,'QXmppClientExtension::handleStanza()'],['../classQXmppServerExtension.html#ad8218187cd17b9d730fc72a9d722cf0a',1,'QXmppServerExtension::handleStanza()']]], ['handlestart',['handleStart',['../classQXmppStream.html#a970b0a6893c097c03ff6d279234178d5',1,'QXmppStream']]], ['handlestream',['handleStream',['../classQXmppStream.html#adda64f130a59719e241eea89b31c27fe',1,'QXmppStream']]], ['hangup',['hangup',['../classQXmppCall.html#a36e4892d706ae7035d5973f6e3b6a7cb',1,'QXmppCall']]], ['hasgetpassword',['hasGetPassword',['../classQXmppPasswordChecker.html#a41d37404a8a21397275164ed68e222bb',1,'QXmppPasswordChecker']]], ['height',['height',['../classQXmppDataForm_1_1Media.html#a6ce52e7ff7b5514f42f3b369e62d70f6',1,'QXmppDataForm::Media::height()'],['../classQXmppVideoFrame.html#aeed5d618b102be220ba2891f0f559e44',1,'QXmppVideoFrame::height()']]], ['host',['host',['../classQXmppJingleCandidate.html#a52ef0f40c4304cbaa96f76c89dffa0f2',1,'QXmppJingleCandidate::host()'],['../classQXmppConfiguration.html#a5109714e0bb5ad69f0e8dde063e54811',1,'QXmppConfiguration::host()']]], ['hosttype',['HostType',['../classQXmppJingleCandidate.html#a6314b3ed7de59b68131db6ffab55fe7da65d68dede680215e9739c30ca79a1da5',1,'QXmppJingleCandidate']]] ]; qxmpp-0.7.6/doc/html/search/variables_63.html0000644000175000007640000000171212116723632020741 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/enumvalues_61.js0000644000175000007640000000201712116723632020622 0ustar sharkyjerrywebvar searchData= [ ['aborterror',['AbortError',['../classQXmppTransferJob.html#abacb5103efd8148e13b9c616113366bda0e4b5001e71380ad5f06f68cec3a08d8',1,'QXmppTransferJob']]], ['active',['Active',['../classQXmppMessage.html#aeaa3cc5ccb7d451067a80dd1f3c7099aa2a197e88be8355a853534c2342e64c48',1,'QXmppMessage']]], ['activestate',['ActiveState',['../classQXmppCall.html#a90205b5034613127d2c4adc6a0252759ac43dd016f3eb2141b9ee044c255afcb8',1,'QXmppCall']]], ['anymessage',['AnyMessage',['../classQXmppLogger.html#a932dbbd4f70a1e9c0ff8f452e61fc9b8a4d23e0e5cc611ed29c10ae10b60a1fb7',1,'QXmppLogger']]], ['anymethod',['AnyMethod',['../classQXmppTransferJob.html#a962582d3049909305277e54e2095c71ba3a44df5bc47241f7bdc3ba4ca5018032',1,'QXmppTransferJob']]], ['available',['Available',['../classQXmppPresence.html#a47ab8dd08436f9d7c90d2990678b5a6daee4c403679460358c9002562794059d3',1,'QXmppPresence']]], ['away',['Away',['../classQXmppPresence.html#ad56af0f57b732c09b080b9347c4dba94acebcb202966ea59ea213459d36e2d949',1,'QXmppPresence']]] ]; qxmpp-0.7.6/doc/html/search/search.css0000644000175000007640000000762412116723632017562 0ustar sharkyjerryweb/*---------------- Search Box */ #FSearchBox { float: left; } #MSearchBox { white-space : nowrap; position: absolute; float: none; display: inline; margin-top: 8px; right: 0px; width: 170px; z-index: 102; background-color: white; } #MSearchBox .left { display:block; position:absolute; left:10px; width:20px; height:19px; background:url('search_l.png') no-repeat; background-position:right; } #MSearchSelect { display:block; position:absolute; width:20px; height:19px; } .left #MSearchSelect { left:4px; } .right #MSearchSelect { right:5px; } #MSearchField { display:block; position:absolute; height:19px; background:url('search_m.png') repeat-x; border:none; width:116px; margin-left:20px; padding-left:4px; color: #909090; outline: none; font: 9pt Arial, Verdana, sans-serif; } #FSearchBox #MSearchField { margin-left:15px; } #MSearchBox .right { display:block; position:absolute; right:10px; top:0px; width:20px; height:19px; background:url('search_r.png') no-repeat; background-position:left; } #MSearchClose { display: none; position: absolute; top: 4px; background : none; border: none; margin: 0px 4px 0px 0px; padding: 0px 0px; outline: none; } .left #MSearchClose { left: 6px; } .right #MSearchClose { right: 2px; } .MSearchBoxActive #MSearchField { color: #000000; } /*---------------- Search filter selection */ #MSearchSelectWindow { display: none; position: absolute; left: 0; top: 0; border: 1px solid #90A5CE; background-color: #F9FAFC; z-index: 1; padding-top: 4px; padding-bottom: 4px; -moz-border-radius: 4px; -webkit-border-top-left-radius: 4px; -webkit-border-top-right-radius: 4px; -webkit-border-bottom-left-radius: 4px; -webkit-border-bottom-right-radius: 4px; -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); } .SelectItem { font: 8pt Arial, Verdana, sans-serif; padding-left: 2px; padding-right: 12px; border: 0px; } span.SelectionMark { margin-right: 4px; font-family: monospace; outline-style: none; text-decoration: none; } a.SelectItem { display: block; outline-style: none; color: #000000; text-decoration: none; padding-left: 6px; padding-right: 12px; } a.SelectItem:focus, a.SelectItem:active { color: #000000; outline-style: none; text-decoration: none; } a.SelectItem:hover { color: #FFFFFF; background-color: #3D578C; outline-style: none; text-decoration: none; cursor: pointer; display: block; } /*---------------- Search results window */ iframe#MSearchResults { width: 60ex; height: 15em; } #MSearchResultsWindow { display: none; position: absolute; left: 0; top: 0; border: 1px solid #000; background-color: #EEF1F7; } /* ----------------------------------- */ #SRIndex { clear:both; padding-bottom: 15px; } .SREntry { font-size: 10pt; padding-left: 1ex; } .SRPage .SREntry { font-size: 8pt; padding: 1px 5px; } body.SRPage { margin: 5px 2px; } .SRChildren { padding-left: 3ex; padding-bottom: .5em } .SRPage .SRChildren { display: none; } .SRSymbol { font-weight: bold; color: #425E97; font-family: Arial, Verdana, sans-serif; text-decoration: none; outline: none; } a.SRScope { display: block; color: #425E97; font-family: Arial, Verdana, sans-serif; text-decoration: none; outline: none; } a.SRSymbol:focus, a.SRSymbol:active, a.SRScope:focus, a.SRScope:active { text-decoration: underline; } span.SRScope { padding-left: 4px; } .SRPage .SRStatus { padding: 2px 5px; font-size: 8pt; font-style: italic; } .SRResult { display: none; } DIV.searchresults { margin-left: 10px; margin-right: 10px; } qxmpp-0.7.6/doc/html/search/search.js0000644000175000007640000005707612116723632017414 0ustar sharkyjerryweb// Search script generated by doxygen // Copyright (C) 2009 by Dimitri van Heesch. // The code in this file is loosly based on main.js, part of Natural Docs, // which is Copyright (C) 2003-2008 Greg Valure // Natural Docs is licensed under the GPL. var indexSectionsWithContent = { 0: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111111111111111111000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", 1: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001001000100010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", 2: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111111111111111111000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", 3: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000100100110100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", 4: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101110000001110111110100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", 5: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111010011101111111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", 6: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100100001101110101100100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", 7: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000100000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" }; var indexSectionNames = { 0: "all", 1: "classes", 2: "functions", 3: "variables", 4: "enums", 5: "enumvalues", 6: "properties", 7: "groups" }; function convertToId(search) { var result = ''; for (i=0;i do a search { this.Search(); } } this.OnSearchSelectKey = function(evt) { var e = (evt) ? evt : window.event; // for IE if (e.keyCode==40 && this.searchIndex0) // Up { this.searchIndex--; this.OnSelectItem(this.searchIndex); } else if (e.keyCode==13 || e.keyCode==27) { this.OnSelectItem(this.searchIndex); this.CloseSelectionWindow(); this.DOMSearchField().focus(); } return false; } // --------- Actions // Closes the results window. this.CloseResultsWindow = function() { this.DOMPopupSearchResultsWindow().style.display = 'none'; this.DOMSearchClose().style.display = 'none'; this.Activate(false); } this.CloseSelectionWindow = function() { this.DOMSearchSelectWindow().style.display = 'none'; } // Performs a search. this.Search = function() { this.keyTimeout = 0; // strip leading whitespace var searchValue = this.DOMSearchField().value.replace(/^ +/, ""); var code = searchValue.toLowerCase().charCodeAt(0); var hexCode; if (code<16) { hexCode="0"+code.toString(16); } else { hexCode=code.toString(16); } var resultsPage; var resultsPageWithSearch; var hasResultsPage; if (indexSectionsWithContent[this.searchIndex].charAt(code) == '1') { resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html'; resultsPageWithSearch = resultsPage+'?'+escape(searchValue); hasResultsPage = true; } else // nothing available for this search term { resultsPage = this.resultsPath + '/nomatches.html'; resultsPageWithSearch = resultsPage; hasResultsPage = false; } window.frames.MSearchResults.location = resultsPageWithSearch; var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); if (domPopupSearchResultsWindow.style.display!='block') { var domSearchBox = this.DOMSearchBox(); this.DOMSearchClose().style.display = 'inline'; if (this.insideFrame) { var domPopupSearchResults = this.DOMPopupSearchResults(); domPopupSearchResultsWindow.style.position = 'relative'; domPopupSearchResultsWindow.style.display = 'block'; var width = document.body.clientWidth - 8; // the -8 is for IE :-( domPopupSearchResultsWindow.style.width = width + 'px'; domPopupSearchResults.style.width = width + 'px'; } else { var domPopupSearchResults = this.DOMPopupSearchResults(); var left = getXPos(domSearchBox) + 150; // domSearchBox.offsetWidth; var top = getYPos(domSearchBox) + 20; // domSearchBox.offsetHeight + 1; domPopupSearchResultsWindow.style.display = 'block'; left -= domPopupSearchResults.offsetWidth; domPopupSearchResultsWindow.style.top = top + 'px'; domPopupSearchResultsWindow.style.left = left + 'px'; } } this.lastSearchValue = searchValue; this.lastResultsPage = resultsPage; } // -------- Activation Functions // Activates or deactivates the search panel, resetting things to // their default values if necessary. this.Activate = function(isActive) { if (isActive || // open it this.DOMPopupSearchResultsWindow().style.display == 'block' ) { this.DOMSearchBox().className = 'MSearchBoxActive'; var searchField = this.DOMSearchField(); if (searchField.value == this.searchLabel) // clear "Search" term upon entry { searchField.value = ''; this.searchActive = true; } } else if (!isActive) // directly remove the panel { this.DOMSearchBox().className = 'MSearchBoxInactive'; this.DOMSearchField().value = this.searchLabel; this.searchActive = false; this.lastSearchValue = '' this.lastResultsPage = ''; } } } // ----------------------------------------------------------------------- // The class that handles everything on the search results page. function SearchResults(name) { // The number of matches from the last run of . this.lastMatchCount = 0; this.lastKey = 0; this.repeatOn = false; // Toggles the visibility of the passed element ID. this.FindChildElement = function(id) { var parentElement = document.getElementById(id); var element = parentElement.firstChild; while (element && element!=parentElement) { if (element.nodeName == 'DIV' && element.className == 'SRChildren') { return element; } if (element.nodeName == 'DIV' && element.hasChildNodes()) { element = element.firstChild; } else if (element.nextSibling) { element = element.nextSibling; } else { do { element = element.parentNode; } while (element && element!=parentElement && !element.nextSibling); if (element && element!=parentElement) { element = element.nextSibling; } } } } this.Toggle = function(id) { var element = this.FindChildElement(id); if (element) { if (element.style.display == 'block') { element.style.display = 'none'; } else { element.style.display = 'block'; } } } // Searches for the passed string. If there is no parameter, // it takes it from the URL query. // // Always returns true, since other documents may try to call it // and that may or may not be possible. this.Search = function(search) { if (!search) // get search word from URL { search = window.location.search; search = search.substring(1); // Remove the leading '?' search = unescape(search); } search = search.replace(/^ +/, ""); // strip leading spaces search = search.replace(/ +$/, ""); // strip trailing spaces search = search.toLowerCase(); search = convertToId(search); var resultRows = document.getElementsByTagName("div"); var matches = 0; var i = 0; while (i < resultRows.length) { var row = resultRows.item(i); if (row.className == "SRResult") { var rowMatchName = row.id.toLowerCase(); rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' if (search.length<=rowMatchName.length && rowMatchName.substr(0, search.length)==search) { row.style.display = 'block'; matches++; } else { row.style.display = 'none'; } } i++; } document.getElementById("Searching").style.display='none'; if (matches == 0) // no results { document.getElementById("NoMatches").style.display='block'; } else // at least one result { document.getElementById("NoMatches").style.display='none'; } this.lastMatchCount = matches; return true; } // return the first item with index index or higher that is visible this.NavNext = function(index) { var focusItem; while (1) { var focusName = 'Item'+index; focusItem = document.getElementById(focusName); if (focusItem && focusItem.parentNode.parentNode.style.display=='block') { break; } else if (!focusItem) // last element { break; } focusItem=null; index++; } return focusItem; } this.NavPrev = function(index) { var focusItem; while (1) { var focusName = 'Item'+index; focusItem = document.getElementById(focusName); if (focusItem && focusItem.parentNode.parentNode.style.display=='block') { break; } else if (!focusItem) // last element { break; } focusItem=null; index--; } return focusItem; } this.ProcessKeys = function(e) { if (e.type == "keydown") { this.repeatOn = false; this.lastKey = e.keyCode; } else if (e.type == "keypress") { if (!this.repeatOn) { if (this.lastKey) this.repeatOn = true; return false; // ignore first keypress after keydown } } else if (e.type == "keyup") { this.lastKey = 0; this.repeatOn = false; } return this.lastKey!=0; } this.Nav = function(evt,itemIndex) { var e = (evt) ? evt : window.event; // for IE if (e.keyCode==13) return true; if (!this.ProcessKeys(e)) return false; if (this.lastKey==38) // Up { var newIndex = itemIndex-1; var focusItem = this.NavPrev(newIndex); if (focusItem) { var child = this.FindChildElement(focusItem.parentNode.parentNode.id); if (child && child.style.display == 'block') // children visible { var n=0; var tmpElem; while (1) // search for last child { tmpElem = document.getElementById('Item'+newIndex+'_c'+n); if (tmpElem) { focusItem = tmpElem; } else // found it! { break; } n++; } } } if (focusItem) { focusItem.focus(); } else // return focus to search field { parent.document.getElementById("MSearchField").focus(); } } else if (this.lastKey==40) // Down { var newIndex = itemIndex+1; var focusItem; var item = document.getElementById('Item'+itemIndex); var elem = this.FindChildElement(item.parentNode.parentNode.id); if (elem && elem.style.display == 'block') // children visible { focusItem = document.getElementById('Item'+itemIndex+'_c0'); } if (!focusItem) focusItem = this.NavNext(newIndex); if (focusItem) focusItem.focus(); } else if (this.lastKey==39) // Right { var item = document.getElementById('Item'+itemIndex); var elem = this.FindChildElement(item.parentNode.parentNode.id); if (elem) elem.style.display = 'block'; } else if (this.lastKey==37) // Left { var item = document.getElementById('Item'+itemIndex); var elem = this.FindChildElement(item.parentNode.parentNode.id); if (elem) elem.style.display = 'none'; } else if (this.lastKey==27) // Escape { parent.searchBox.CloseResultsWindow(); parent.document.getElementById("MSearchField").focus(); } else if (this.lastKey==13) // Enter { return true; } return false; } this.NavChild = function(evt,itemIndex,childIndex) { var e = (evt) ? evt : window.event; // for IE if (e.keyCode==13) return true; if (!this.ProcessKeys(e)) return false; if (this.lastKey==38) // Up { if (childIndex>0) { var newIndex = childIndex-1; document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); } else // already at first child, jump to parent { document.getElementById('Item'+itemIndex).focus(); } } else if (this.lastKey==40) // Down { var newIndex = childIndex+1; var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); if (!elem) // last child, jump to parent next parent { elem = this.NavNext(itemIndex+1); } if (elem) { elem.focus(); } } else if (this.lastKey==27) // Escape { parent.searchBox.CloseResultsWindow(); parent.document.getElementById("MSearchField").focus(); } else if (this.lastKey==13) // Enter { return true; } return false; } } function setKeyActions(elem,action) { elem.setAttribute('onkeydown',action); elem.setAttribute('onkeypress',action); elem.setAttribute('onkeyup',action); } function setClassAttr(elem,attr) { elem.setAttribute('class',attr); elem.setAttribute('className',attr); } function createResults() { var results = document.getElementById("SRResults"); for (var e=0; e
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/groups_73.js0000644000175000007640000000011712116723632017757 0ustar sharkyjerrywebvar searchData= [ ['stanzas',['Stanzas',['../group__Stanzas.html',1,'']]] ]; qxmpp-0.7.6/doc/html/search/enums_6d.html0000644000175000007640000000170612116723632020204 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/functions_69.html0000644000175000007640000000171212116723632021007 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/enums_73.html0000644000175000007640000000170612116723632020124 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/properties_70.html0000644000175000007640000000171312116723632021164 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/properties_6d.html0000644000175000007640000000171312116723632021247 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/functions_67.html0000644000175000007640000000171212116723632021005 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/all_6f.js0000644000175000007640000000502512116723632017275 0ustar sharkyjerrywebvar searchData= [ ['offerstate',['OfferState',['../classQXmppTransferJob.html#aab5bb06ca0d2c4f1fac33b7012d1c14fa0f5f5eec8a95f2faf27186dfd502f581',1,'QXmppTransferJob']]], ['online',['Online',['../classQXmppPresence.html#ad56af0f57b732c09b080b9347c4dba94a1285bac9669e2b48502a464f97dd85ee',1,'QXmppPresence']]], ['openmode',['openMode',['../classQXmppRtpAudioChannel.html#a04c68666e2c9d4398eebefdf6a589f7e',1,'QXmppRtpAudioChannel::openMode()'],['../classQXmppRtpVideoChannel.html#a35a18db3dd09e978e80782410c5f9ab8',1,'QXmppRtpVideoChannel::openMode()']]], ['operator_3d',['operator=',['../classQXmppDataForm_1_1Media.html#ab19ca6c24b02e94f0de3b71ce9fd793b',1,'QXmppDataForm::Media::operator=()'],['../classQXmppDataForm_1_1Field.html#a53c05474d49892a70be0b78623f91d58',1,'QXmppDataForm::Field::operator=()'],['../classQXmppDataForm.html#a9ddc279a4bf7d8af83b9b036a1a05e3f',1,'QXmppDataForm::operator=()'],['../classQXmppIq.html#acac075df8295dd8c60015b7266de58b2',1,'QXmppIq::operator=()'],['../classQXmppMessage.html#ab3aa184e6abbbc3900c278724f97d547',1,'QXmppMessage::operator=()'],['../classQXmppPresence.html#a1141ade052875a709b7d6c8556fc1868',1,'QXmppPresence::operator=()'],['../classQXmppExtendedAddress.html#ac92e6a7834fec8050a1db385c923048c',1,'QXmppExtendedAddress::operator=()'],['../classQXmppStanza.html#a767267784f17dadb5fcc63cbd79a6cf4',1,'QXmppStanza::operator=()'],['../classQXmppVCardAddress.html#a591dbdba926e4f9dadd9707681edce3b',1,'QXmppVCardAddress::operator=()'],['../classQXmppVCardEmail.html#a7f846de66c12cc0dc07079be410c20eb',1,'QXmppVCardEmail::operator=()'],['../classQXmppVCardPhone.html#a95ee8da274bd22a93967e95d38d66280',1,'QXmppVCardPhone::operator=()'],['../classQXmppVCardIq.html#a15ffae99786fbe0f56e3bd4f3b0255bc',1,'QXmppVCardIq::operator=()'],['../classQXmppConfiguration.html#a81cb2c0461d396b1458191e5181ba34a',1,'QXmppConfiguration::operator=()']]], ['operator_3d_3d',['operator==',['../classQXmppJinglePayloadType.html#ab368f65404568832f8cd861d2b307a94',1,'QXmppJinglePayloadType']]], ['options',['options',['../classQXmppDataForm_1_1Field.html#a9caa3cf1de4d1cfeb27d601cab3990d4',1,'QXmppDataForm::Field']]], ['os',['os',['../classQXmppVersionIq.html#a38ea1a7fb98453b7aa9783d7ba198ae7',1,'QXmppVersionIq']]], ['outgoingdirection',['OutgoingDirection',['../classQXmppCall.html#a429a4f8065136068b6d936cb2c803175a4959a53587ff3fe714b0c619dd8ba47d',1,'QXmppCall::OutgoingDirection()'],['../classQXmppTransferJob.html#a9c95a89a01357588f699e7d80c3de0b6adbfcc81360e31c1ded162fa244132bb7',1,'QXmppTransferJob::OutgoingDirection()']]] ]; qxmpp-0.7.6/doc/html/search/enumvalues_69.html0000644000175000007640000000171312116723632021164 0ustar sharkyjerryweb
Loading...
Searching...
No Matches
qxmpp-0.7.6/doc/html/search/all_75.js0000644000175000007640000000357712116723632017227 0ustar sharkyjerrywebvar searchData= [ ['unavailable',['Unavailable',['../classQXmppPresence.html#a47ab8dd08436f9d7c90d2990678b5a6da6188ca67163c9045eb9568deefb9a363',1,'QXmppPresence']]], ['unsubscribe',['unsubscribe',['../classQXmppRosterManager.html#aa743c82ec16b20e1134f994487db1023',1,'QXmppRosterManager::unsubscribe()'],['../classQXmppPresence.html#a47ab8dd08436f9d7c90d2990678b5a6da20986f18e387f68a5fdfa0e67c44bc44',1,'QXmppPresence::Unsubscribe()']]], ['unsubscribed',['Unsubscribed',['../classQXmppPresence.html#a47ab8dd08436f9d7c90d2990678b5a6da63414092d2fc4b90987f56731c150623',1,'QXmppPresence']]], ['updatecounter',['updateCounter',['../classQXmppLogger.html#a9dfaa287ed3dc1b37e9f0824f279bc9c',1,'QXmppLogger::updateCounter()'],['../classQXmppLoggable.html#aa309eaea9699e7fe652a400cef346ae2',1,'QXmppLoggable::updateCounter()']]], ['uris',['uris',['../classQXmppDataForm_1_1Media.html#a3b25e4741293aacf49e67763d6335ffa',1,'QXmppDataForm::Media']]], ['url',['url',['../classQXmppBookmarkUrl.html#ad4f5f12b7d3abcec0dd39b807bc574e4',1,'QXmppBookmarkUrl::url()'],['../classQXmppVCardIq.html#aece55c4dc1a59328aaa643ec7fddb1ec',1,'QXmppVCardIq::url()']]], ['urls',['urls',['../classQXmppBookmarkSet.html#ac670a788961da47538470df0a962417e',1,'QXmppBookmarkSet']]], ['usenonsaslauthentication',['useNonSASLAuthentication',['../classQXmppConfiguration.html#aa1fde10dbd102621f412e64cb047a65e',1,'QXmppConfiguration']]], ['user',['user',['../classQXmppConfiguration.html#a50a49cee480278ddadbb6c6880a731cd',1,'QXmppConfiguration']]], ['username',['username',['../classQXmppRegisterIq.html#a71a483bfe920cb882d86804e67fad959',1,'QXmppRegisterIq::username()'],['../classQXmppPasswordRequest.html#a80eaf03d9905b9a9e778444d4f1a2882',1,'QXmppPasswordRequest::username()']]], ['usesaslauthentication',['useSASLAuthentication',['../classQXmppConfiguration.html#a60226ec21c25409f04b3f5971738e30b',1,'QXmppConfiguration']]] ]; qxmpp-0.7.6/doc/html/search/all_6b.js0000644000175000007640000000215512116723632017272 0ustar sharkyjerrywebvar searchData= [ ['keepaliveerror',['KeepAliveError',['../classQXmppClient.html#a7c2851d07cc33119752abc6ec8ffc47aa9b8aabc7956d082a04b4d0ed879564aa',1,'QXmppClient']]], ['keepaliveinterval',['keepAliveInterval',['../classQXmppConfiguration.html#a0ba375a5272d8c43f44ac5347ea8570a',1,'QXmppConfiguration']]], ['keepalivetimeout',['keepAliveTimeout',['../classQXmppConfiguration.html#a486b7e0f462d22645ce3a9af2f1bc760',1,'QXmppConfiguration']]], ['key',['key',['../classQXmppDataForm_1_1Field.html#a7ba080a682a735ba8ea50e10796eddae',1,'QXmppDataForm::Field::key()'],['../classQXmppDialback.html#a97b7f7b3093ae77b1a0d478e69d2d587',1,'QXmppDialback::key()']]], ['keys',['keys',['../classQXmppServerPlugin.html#a4704f26de715e8917dce478482e49826',1,'QXmppServerPlugin']]], ['kick',['kick',['../classQXmppMucRoom.html#a434a767f9fdd176ea2f2c5effd40695f',1,'QXmppMucRoom']]], ['kickaction',['KickAction',['../classQXmppMucRoom.html#acd3129293f69d7e7cdd91b65aae0606fa3d65a5019321c87100e1bd61881b8559',1,'QXmppMucRoom']]], ['kicked',['kicked',['../classQXmppMucRoom.html#afc2ca70209ab1ab43f75c86221f34cdc',1,'QXmppMucRoom']]] ]; qxmpp-0.7.6/doc/html/search/groups_6d.js0000644000175000007640000000012212116723632020033 0ustar sharkyjerrywebvar searchData= [ ['managers',['Managers',['../group__Managers.html',1,'']]] ]; qxmpp-0.7.6/doc/html/functions_func_0x66.html0000644000175000007640000002327212116723632021027 0ustar sharkyjerryweb QXmpp: Class Members - Functions
QXmpp  Version:0.7.6
 

- f -

qxmpp-0.7.6/doc/html/ftv2cl.png0000644000175000007640000000070512116723632016235 0ustar sharkyjerrywebPNG  IHDR}\IDATx;H#Ao4ႇK ,m vڞJ XY B|drcvoİ 0Ò3ͤe״1X8nQ88֧3*rb-$P1@Z-#011HkK wO@!fuc;sB[EA\>]Pzf| +g5b i5mM_q,cod!,{Y,zT8H]𤕘7/8Q!F~6?Y A@Ũ.@TYr8*>?e[6xIENDB`qxmpp-0.7.6/doc/html/classQXmppBookmarkUrl-members.html0000644000175000007640000001363412116723632023116 0ustar sharkyjerryweb QXmpp: Member List
QXmppBookmarkUrl Member List

This is the complete list of members for QXmppBookmarkUrl, including all inherited members.

name() const QXmppBookmarkUrl
setName(const QString &name)QXmppBookmarkUrl
setUrl(const QUrl &url)QXmppBookmarkUrl
url() const QXmppBookmarkUrl
qxmpp-0.7.6/doc/html/functions_0x6e.html0000644000175000007640000002577512116723632020105 0ustar sharkyjerryweb QXmpp: Class Members
QXmpp  Version:0.7.6
Here is a list of all documented class members with links to the class documentation for each member:

- n -

qxmpp-0.7.6/doc/html/classQXmppSessionIq.html0000644000175000007640000002526712116723632021160 0ustar sharkyjerryweb QXmpp: QXmppSessionIq Class Reference
QXmppSessionIq Class Reference

The QXmppSessionIq class represents an IQ used for session establishment as defined by RFC 3921. More...

#include <QXmppSessionIq.h>

Inheritance diagram for QXmppSessionIq:
QXmppIq QXmppStanza

Additional Inherited Members

- Public Types inherited from QXmppIq
enum  Type { Error = 0, Get, Set, Result }
 This enum describes the type of IQ. More...
- Public Member Functions inherited from QXmppIq
 QXmppIq (QXmppIq::Type type=QXmppIq::Get)
 QXmppIq (const QXmppIq &other)
 Constructs a copy of other.
QXmppIqoperator= (const QXmppIq &other)
 Assigns other to this IQ.
QXmppIq::Type type () const
void setType (QXmppIq::Type)

Detailed Description

The QXmppSessionIq class represents an IQ used for session establishment as defined by RFC 3921.


The documentation for this class was generated from the following file:
qxmpp-0.7.6/doc/html/nav_h.png0000644000175000007640000000014212116723632016123 0ustar sharkyjerrywebPNG  IHDR ,@)IDATxA @BQۛТ) ) aܿoRlIENDB`qxmpp-0.7.6/doc/html/functions_0x6b.html0000644000175000007640000002042212116723632020062 0ustar sharkyjerryweb QXmpp: Class Members
QXmpp  Version:0.7.6
Here is a list of all documented class members with links to the class documentation for each member:

- k -

qxmpp-0.7.6/doc/html/classQXmppMucOwnerIq-members.html0000644000175000007640000003123012116723632022707 0ustar sharkyjerryweb QXmpp: Member List
QXmppMucOwnerIq Member List

This is the complete list of members for QXmppMucOwnerIq, including all inherited members.

Error enum valueQXmppIq
error() const QXmppStanza
extendedAddresses() const QXmppStanza
extensions() const QXmppStanza
form() const QXmppMucOwnerIq
from() const QXmppStanza
Get enum valueQXmppIq
id() const QXmppStanza
lang() const QXmppStanza
operator=(const QXmppIq &other)QXmppIq
QXmppStanza::operator=(const QXmppStanza &other)QXmppStanza
QXmppIq(QXmppIq::Type type=QXmppIq::Get)QXmppIq
QXmppIq(const QXmppIq &other)QXmppIq
QXmppStanza(const QString &from=QString(), const QString &to=QString())QXmppStanza
QXmppStanza(const QXmppStanza &other)QXmppStanza
Result enum valueQXmppIq
Set enum valueQXmppIq
setError(const QXmppStanza::Error &error)QXmppStanza
setExtendedAddresses(const QList< QXmppExtendedAddress > &extendedAddresses)QXmppStanza
setExtensions(const QXmppElementList &elements)QXmppStanza
setForm(const QXmppDataForm &form)QXmppMucOwnerIq
setFrom(const QString &)QXmppStanza
setId(const QString &)QXmppStanza
setLang(const QString &)QXmppStanza
setTo(const QString &)QXmppStanza
setType(QXmppIq::Type)QXmppIq
to() const QXmppStanza
type() const QXmppIq
Type enum nameQXmppIq
~QXmppIq() (defined in QXmppIq)QXmppIq
~QXmppStanza()QXmppStanzavirtual
qxmpp-0.7.6/doc/html/classQXmppBookmarkConference-members.html0000644000175000007640000001665412116723632024430 0ustar sharkyjerryweb QXmpp: Member List
QXmppBookmarkConference Member List
qxmpp-0.7.6/doc/html/ftv2splitbar.png0000644000175000007640000000047212116723632017460 0ustar sharkyjerrywebPNG  IHDRMIDATxݡJCa( %4 bȘͶ3v^EL ,b;{Ï/aYկq:\IIIIIIIIIIIIIIIIII-l揊_t/ϻYQVYivk_ۣI@$I@$I@$I@$I@$I@$I@$I@$I@$I@$I@$I@$I@$I@$I@$I@$I@$I@$C[V=[fIENDB`qxmpp-0.7.6/doc/html/classQXmppTransferManager-members.html0000644000175000007640000003604112116723632023742 0ustar sharkyjerryweb QXmpp: Member List
QXmppTransferManager Member List

This is the complete list of members for QXmppTransferManager, including all inherited members.

client()QXmppClientExtensionprotected
debug(const QString &message)QXmppLoggableinlineprotected
discoveryFeatures() const QXmppClientExtensionvirtual
discoveryIdentities() const QXmppClientExtensionvirtual
fileReceived(QXmppTransferJob *job)QXmppTransferManagersignal
handleStanza(const QDomElement &stanza)=0QXmppClientExtensionpure virtual
info(const QString &message)QXmppLoggableinlineprotected
jobFinished(QXmppTransferJob *job)QXmppTransferManagersignal
jobStarted(QXmppTransferJob *job)QXmppTransferManagersignal
logMessage(QXmppLogger::MessageType type, const QString &msg)QXmppLoggablesignal
logReceived(const QString &message)QXmppLoggableinlineprotected
logSent(const QString &message)QXmppLoggableinlineprotected
proxyQXmppTransferManager
proxy() const (defined in QXmppTransferManager)QXmppTransferManager
proxyOnlyQXmppTransferManager
proxyOnly() const (defined in QXmppTransferManager)QXmppTransferManager
QXmppClientExtension()QXmppClientExtension
QXmppLoggable(QObject *parent=0)QXmppLoggable
QXmppTransferManager()QXmppTransferManager
QXmppTransferManagerPrivate (defined in QXmppTransferManager)QXmppTransferManagerfriend
sendFile(const QString &jid, const QString &filePath, const QString &description=QString())QXmppTransferManagerslot
sendFile(const QString &jid, QIODevice *device, const QXmppTransferFileInfo &fileInfo, const QString &sid=QString())QXmppTransferManagerslot
setClient(QXmppClient *client)QXmppClientExtensionprotectedvirtual
setGauge(const QString &gauge, double value)QXmppLoggablesignal
setProxy(const QString &proxyJid)QXmppTransferManager
setProxyOnly(bool proxyOnly)QXmppTransferManager
setSupportedMethods(QXmppTransferJob::Methods methods)QXmppTransferManager
supportedMethodsQXmppTransferManager
supportedMethods() const (defined in QXmppTransferManager)QXmppTransferManager
updateCounter(const QString &counter, qint64 amount=1)QXmppLoggablesignal
warning(const QString &message)QXmppLoggableinlineprotected
~QXmppClientExtension()QXmppClientExtensionvirtual
~QXmppTransferManager() (defined in QXmppTransferManager)QXmppTransferManager
qxmpp-0.7.6/doc/html/classQXmppIceComponent.png0000644000175000007640000000110412116723632021426 0ustar sharkyjerrywebPNG  IHDRPPLTEutRNST2IDATxے DID'oT)x]!)S_9E!I= 1o$I][]z0'ۙbM|~paqҧUϹ$9c7;-ws0V˹o0Ս/0>N ʞ_؄.=Rƿ2I2I<)45p⚐$_؞I:o|K +x&F9.pz=o'p<#N `R`@O=F`S`@Ob"ܭ ƴaiCi0'ۙudhaB;\^vԲת7bV~.2eqKu4h`UocL;zQek^hFnѱvovcIi  }ν$0i+vṕjcN={8#~az gbÐ2qIENDB`qxmpp-0.7.6/doc/html/classQXmppDiscoveryManager-members.html0000644000175000007640000003560712116723632024134 0ustar sharkyjerryweb QXmpp: Member List
QXmppDiscoveryManager Member List

This is the complete list of members for QXmppDiscoveryManager, including all inherited members.

capabilities()QXmppDiscoveryManager
client()QXmppClientExtensionprotected
clientCapabilitiesNode() const QXmppDiscoveryManager
clientCategory() const QXmppDiscoveryManager
clientInfoForm() const QXmppDiscoveryManager
clientName() const QXmppDiscoveryManager
clientType() const QXmppDiscoveryManager
debug(const QString &message)QXmppLoggableinlineprotected
discoveryFeatures() const QXmppClientExtensionvirtual
discoveryIdentities() const QXmppClientExtensionvirtual
handleStanza(const QDomElement &stanza)=0QXmppClientExtensionpure virtual
info(const QString &message)QXmppLoggableinlineprotected
infoReceived(const QXmppDiscoveryIq &)QXmppDiscoveryManagersignal
itemsReceived(const QXmppDiscoveryIq &)QXmppDiscoveryManagersignal
logMessage(QXmppLogger::MessageType type, const QString &msg)QXmppLoggablesignal
logReceived(const QString &message)QXmppLoggableinlineprotected
logSent(const QString &message)QXmppLoggableinlineprotected
QXmppClientExtension()QXmppClientExtension
QXmppDiscoveryManager() (defined in QXmppDiscoveryManager)QXmppDiscoveryManager
QXmppLoggable(QObject *parent=0)QXmppLoggable
requestInfo(const QString &jid, const QString &node="")QXmppDiscoveryManager
requestItems(const QString &jid, const QString &node="")QXmppDiscoveryManager
setClient(QXmppClient *client)QXmppClientExtensionprotectedvirtual
setClientCapabilitiesNode(const QString &)QXmppDiscoveryManager
setClientCategory(const QString &)QXmppDiscoveryManager
setClientInfoForm(const QXmppDataForm &form)QXmppDiscoveryManager
setClientName(const QString &)QXmppDiscoveryManager
setClientType(const QString &)QXmppDiscoveryManager
setGauge(const QString &gauge, double value)QXmppLoggablesignal
updateCounter(const QString &counter, qint64 amount=1)QXmppLoggablesignal
warning(const QString &message)QXmppLoggableinlineprotected
~QXmppClientExtension()QXmppClientExtensionvirtual
~QXmppDiscoveryManager() (defined in QXmppDiscoveryManager)QXmppDiscoveryManager
qxmpp-0.7.6/doc/html/classQXmppArchiveManager.html0000644000175000007640000006465612116723632022124 0ustar sharkyjerryweb QXmpp: QXmppArchiveManager Class Reference
QXmppArchiveManager Class Reference

The QXmppArchiveManager class makes it possible to access message archives as defined by XEP-0136: Message Archiving. More...

#include <QXmppArchiveManager.h>

Inheritance diagram for QXmppArchiveManager:
QXmppClientExtension QXmppLoggable

Signals

void archiveListReceived (const QList< QXmppArchiveChat > &, const QXmppResultSetReply &rsm=QXmppResultSetReply())
void archiveChatReceived (const QXmppArchiveChat &, const QXmppResultSetReply &rsm=QXmppResultSetReply())

Public Member Functions

void listCollections (const QString &jid, const QDateTime &start=QDateTime(), const QDateTime &end=QDateTime(), const QXmppResultSetQuery &rsm=QXmppResultSetQuery())
void listCollections (const QString &jid, const QDateTime &start, const QDateTime &end, int max)
void removeCollections (const QString &jid, const QDateTime &start=QDateTime(), const QDateTime &end=QDateTime())
void retrieveCollection (const QString &jid, const QDateTime &start, const QXmppResultSetQuery &rsm=QXmppResultSetQuery())
void retrieveCollection (const QString &jid, const QDateTime &start, int max)
- Public Member Functions inherited from QXmppClientExtension
 QXmppClientExtension ()
virtual ~QXmppClientExtension ()
virtual QStringList discoveryFeatures () const
virtual QList
< QXmppDiscoveryIq::Identity > 
discoveryIdentities () const
virtual bool handleStanza (const QDomElement &stanza)=0
 You need to implement this method to process incoming XMPP stanzas.
- Public Member Functions inherited from QXmppLoggable
 QXmppLoggable (QObject *parent=0)

Additional Inherited Members

- Protected Member Functions inherited from QXmppClientExtension
QXmppClientclient ()
virtual void setClient (QXmppClient *client)

Detailed Description

The QXmppArchiveManager class makes it possible to access message archives as defined by XEP-0136: Message Archiving.

To make use of this manager, you need to instantiate it and load it into the QXmppClient instance as follows:

Note
Few servers support message archiving. Check if the server in use supports this XEP.

Member Function Documentation

void QXmppArchiveManager::archiveChatReceived ( const QXmppArchiveChat ,
const QXmppResultSetReply rsm = QXmppResultSetReply() 
)
signal

This signal is emitted when archive chat is received after calling retrieveCollection()

void QXmppArchiveManager::archiveListReceived ( const QList< QXmppArchiveChat > &  ,
const QXmppResultSetReply rsm = QXmppResultSetReply() 
)
signal

This signal is emitted when archive list is received after calling listCollections()

void QXmppArchiveManager::listCollections ( const QString &  jid,
const QDateTime &  start = QDateTime(),
const QDateTime &  end = QDateTime(),
const QXmppResultSetQuery rsm = QXmppResultSetQuery() 
)

Retrieves the list of available collections. Once the results are received, the archiveListReceived() signal will be emitted.

Parameters
jidJID you want conversations with.
startOptional start time.
endOptional end time.
rsmOptional Result Set Management query
void QXmppArchiveManager::listCollections ( const QString &  jid,
const QDateTime &  start,
const QDateTime &  end,
int  max 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Retrieves the list of available collections. Once the results are received, the archiveListReceived() signal will be emitted.

Parameters
jidJID you want conversations with.
startStart time.
endEnd time.
maxMaximum number of collections to list.
void QXmppArchiveManager::removeCollections ( const QString &  jid,
const QDateTime &  start = QDateTime(),
const QDateTime &  end = QDateTime() 
)

Removes the specified collection(s).

Parameters
jidThe JID of the collection
startOptional start time.
endOptional end time.
void QXmppArchiveManager::retrieveCollection ( const QString &  jid,
const QDateTime &  start,
const QXmppResultSetQuery rsm = QXmppResultSetQuery() 
)

Retrieves the specified collection. Once the results are received, the archiveChatReceived() will be emitted.

Parameters
jidThe JID of the collection
startThe start time of the collection.
rsmOptional Result Set Management query
void QXmppArchiveManager::retrieveCollection ( const QString &  jid,
const QDateTime &  start,
int  max 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Retrieves the specified collection. Once the results are received, the archiveChatReceived() will be emitted.

Parameters
jidThe JID of the collection
startThe start time of the collection.
maxMaximum number of messages to retrieve.

The documentation for this class was generated from the following files:
qxmpp-0.7.6/qxmpp.pro0000644000175000007640000000140012116723562014500 0ustar sharkyjerrywebinclude(qxmpp.pri) TEMPLATE = subdirs SUBDIRS = src android { } else { SUBDIRS += tests examples doc INSTALLS += htmldocs } CONFIG += ordered # Documentation generation docs.commands = cd doc/ && $(QMAKE) && $(MAKE) docs # Source distribution QXMPP_ARCHIVE = qxmpp-$$QXMPP_VERSION dist.commands = \ $(DEL_FILE) -r $$QXMPP_ARCHIVE && \ $(MKDIR) $$QXMPP_ARCHIVE && \ git archive master | tar -x -C $$QXMPP_ARCHIVE && \ $(COPY_DIR) doc/html $$QXMPP_ARCHIVE/doc && \ tar czf $${QXMPP_ARCHIVE}.tar.gz $$QXMPP_ARCHIVE && \ $(DEL_FILE) -r $$QXMPP_ARCHIVE dist.depends = docs # Install rules htmldocs.files = doc/html htmldocs.path = $$PREFIX/share/doc/qxmpp htmldocs.CONFIG += no_check_exist directory QMAKE_EXTRA_TARGETS += dist docs qxmpp-0.7.6/tests/0000755000175000007640000000000012116723562013760 5ustar sharkyjerrywebqxmpp-0.7.6/tests/tests.pri0000644000175000007640000000021012116723562015627 0ustar sharkyjerrywebinclude(../qxmpp.pri) QT -= gui QT += testlib QMAKE_LIBDIR += ../../src INCLUDEPATH += $$PWD $$QXMPP_INCLUDEPATH LIBS += $$QXMPP_LIBS qxmpp-0.7.6/tests/qxmppresultset/0000755000175000007640000000000012116723562017100 5ustar sharkyjerrywebqxmpp-0.7.6/tests/qxmppresultset/tst_qxmppresultset.cpp0000644000175000007640000001256112116723562023623 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Olivier Goffart * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include "QXmppResultSet.h" #include "util.h" class tst_QXmppResultSet : public QObject { Q_OBJECT private slots: void testQuery_data(); void testQuery(); void testReply_data(); void testReply(); }; void tst_QXmppResultSet::testQuery_data() { QTest::addColumn("xml"); QTest::addColumn("max"); QTest::addColumn("index"); QTest::addColumn("before"); QTest::addColumn("after"); QTest::newRow("Example 3") << QByteArray("" "10" "") << 10 << -1 << QString() << QString(); QTest::newRow("Example 5") << QByteArray("" "10" "peterpan@neverland.lit" "") << 10 << -1 << QString() << QString("peterpan@neverland.lit"); QTest::newRow("Example 5") << QByteArray("" "10" "peter@pixyland.org" "") << 10 << -1 << QString("peter@pixyland.org") << QString(); QTest::newRow("Example 11") << QByteArray("" "10" "" "") << 10 << -1 << QString("") << QString(); QTest::newRow("Example 12") << QByteArray("" "10" "371" "") << 10 << 371 << QString() << QString(); QTest::newRow("Example 15") << QByteArray("" "0" "") << 0 << -1 << QString() << QString(); } void tst_QXmppResultSet::testQuery() { QFETCH(QByteArray, xml); QFETCH(int, max); QFETCH(int, index); QFETCH(QString, before); QFETCH(QString, after); QXmppResultSetQuery iq; parsePacket(iq, xml); QCOMPARE(iq.max(), max); QCOMPARE(iq.index(), index); QCOMPARE(iq.before(), before); QCOMPARE(iq.before().isNull(), before.isNull()); QCOMPARE(iq.after(), after); QCOMPARE(iq.after().isNull(), after.isNull()); serializePacket(iq, xml); } void tst_QXmppResultSet::testReply_data() { QTest::addColumn("xml"); QTest::addColumn("count"); QTest::addColumn("index"); QTest::addColumn("first"); QTest::addColumn("last"); QTest::newRow("Example 4") << QByteArray( "" "stpeter@jabber.org" "peterpan@neverland.lit" "800" "") << 800 << 0 << QString("stpeter@jabber.org") << QString("peterpan@neverland.lit"); QTest::newRow("Example 6") << QByteArray( "" "stpeter@jabber.org" "peterpan@neverland.lit" "800" "") << 800 << 0 << QString("stpeter@jabber.org") << QString("peterpan@neverland.lit"); QTest::newRow("Example 4") << QByteArray( "" "peter@pixyland.org" "peter@rabbit.lit" "800" "") << 800 << 10 << QString("peter@pixyland.org") << QString("peter@rabbit.lit"); QTest::newRow("Example 7") << QByteArray( "" "790" "") << 790 << -1 << QString() << QString(); } void tst_QXmppResultSet::testReply() { QFETCH(QByteArray, xml); QFETCH(int, count); QFETCH(int, index); QFETCH(QString, first); QFETCH(QString, last); QXmppResultSetReply iq; parsePacket(iq, xml); QCOMPARE(iq.count(), count); QCOMPARE(iq.index(), index); QCOMPARE(iq.first(), first); QCOMPARE(iq.first().isNull(), first.isNull()); QCOMPARE(iq.last(), last); QCOMPARE(iq.last().isNull(), last.isNull()); serializePacket(iq, xml); } QTEST_MAIN(tst_QXmppResultSet) #include "tst_qxmppresultset.moc" qxmpp-0.7.6/tests/qxmppresultset/qxmppresultset.pro0000644000175000007640000000012412116723562022737 0ustar sharkyjerrywebinclude(../tests.pri) TARGET = tst_qxmppresultset SOURCES += tst_qxmppresultset.cpp qxmpp-0.7.6/tests/qxmppstreamfeatures/0000755000175000007640000000000012116723562020100 5ustar sharkyjerrywebqxmpp-0.7.6/tests/qxmppstreamfeatures/qxmppstreamfeatures.pro0000644000175000007640000000013612116723562024742 0ustar sharkyjerrywebinclude(../tests.pri) TARGET = tst_qxmppstreamfeatures SOURCES += tst_qxmppstreamfeatures.cpp qxmpp-0.7.6/tests/qxmppstreamfeatures/tst_qxmppstreamfeatures.cpp0000644000175000007640000000512312116723562025617 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "QXmppStreamFeatures.h" #include "util.h" class tst_QXmppStreamFeatures : public QObject { Q_OBJECT private slots: void testEmpty(); void testFull(); }; void tst_QXmppStreamFeatures::testEmpty() { const QByteArray xml(""); QXmppStreamFeatures features; parsePacket(features, xml); QCOMPARE(features.bindMode(), QXmppStreamFeatures::Disabled); QCOMPARE(features.sessionMode(), QXmppStreamFeatures::Disabled); QCOMPARE(features.nonSaslAuthMode(), QXmppStreamFeatures::Disabled); QCOMPARE(features.tlsMode(), QXmppStreamFeatures::Disabled); QCOMPARE(features.authMechanisms(), QStringList()); QCOMPARE(features.compressionMethods(), QStringList()); serializePacket(features, xml); } void tst_QXmppStreamFeatures::testFull() { const QByteArray xml("" "" "" "" "" "zlib" "PLAIN" ""); QXmppStreamFeatures features; parsePacket(features, xml); QCOMPARE(features.bindMode(), QXmppStreamFeatures::Enabled); QCOMPARE(features.sessionMode(), QXmppStreamFeatures::Enabled); QCOMPARE(features.nonSaslAuthMode(), QXmppStreamFeatures::Enabled); QCOMPARE(features.tlsMode(), QXmppStreamFeatures::Enabled); QCOMPARE(features.authMechanisms(), QStringList() << "PLAIN"); QCOMPARE(features.compressionMethods(), QStringList() << "zlib"); serializePacket(features, xml); } QTEST_MAIN(tst_QXmppStreamFeatures) #include "tst_qxmppstreamfeatures.moc" qxmpp-0.7.6/tests/qxmpprosteriq/0000755000175000007640000000000012116723562016716 5ustar sharkyjerrywebqxmpp-0.7.6/tests/qxmpprosteriq/tst_qxmpprosteriq.cpp0000644000175000007640000000525012116723562023254 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include "QXmppRosterIq.h" #include "util.h" class tst_QXmppRosterIq : public QObject { Q_OBJECT private slots: void testItem_data(); void testItem(); }; void tst_QXmppRosterIq::testItem_data() { QTest::addColumn("xml"); QTest::addColumn("name"); QTest::addColumn("subscriptionType"); QTest::newRow("none") << QByteArray("") << "" << int(QXmppRosterIq::Item::None); QTest::newRow("from") << QByteArray("") << "" << int(QXmppRosterIq::Item::From); QTest::newRow("to") << QByteArray("") << "" << int(QXmppRosterIq::Item::To); QTest::newRow("both") << QByteArray("") << "" << int(QXmppRosterIq::Item::Both); QTest::newRow("remove") << QByteArray("") << "" << int(QXmppRosterIq::Item::Remove); QTest::newRow("notset") << QByteArray("") << "" << int(QXmppRosterIq::Item::NotSet); QTest::newRow("name") << QByteArray("") << "foo bar" << int(QXmppRosterIq::Item::NotSet); } void tst_QXmppRosterIq::testItem() { QFETCH(QByteArray, xml); QFETCH(QString, name); QFETCH(int, subscriptionType); QXmppRosterIq::Item item; parsePacket(item, xml); QCOMPARE(item.bareJid(), QLatin1String("foo@example.com")); QCOMPARE(item.groups(), QSet()); QCOMPARE(item.name(), name); QCOMPARE(int(item.subscriptionType()), subscriptionType); QCOMPARE(item.subscriptionStatus(), QString()); serializePacket(item, xml); } QTEST_MAIN(tst_QXmppRosterIq) #include "tst_qxmpprosteriq.moc" qxmpp-0.7.6/tests/qxmpprosteriq/qxmpprosteriq.pro0000644000175000007640000000012212116723562022371 0ustar sharkyjerrywebinclude(../tests.pri) TARGET = tst_qxmpprosteriq SOURCES += tst_qxmpprosteriq.cpp qxmpp-0.7.6/tests/qxmppdiscoveryiq/0000755000175000007640000000000012116723562017407 5ustar sharkyjerrywebqxmpp-0.7.6/tests/qxmppdiscoveryiq/qxmppdiscoveryiq.pro0000644000175000007640000000013012116723562023552 0ustar sharkyjerrywebinclude(../tests.pri) TARGET = tst_qxmppdiscoveryiq SOURCES += tst_qxmppdiscoveryiq.cpp qxmpp-0.7.6/tests/qxmppdiscoveryiq/tst_qxmppdiscoveryiq.cpp0000644000175000007640000000667212116723562024447 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Jeremy Lainé * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include "QXmppDiscoveryIq.h" #include "util.h" class tst_QXmppDiscoveryIq : public QObject { Q_OBJECT private slots: void testDiscovery(); void testDiscoveryWithForm(); }; void tst_QXmppDiscoveryIq::testDiscovery() { const QByteArray xml( "" "" "" "" "" "" "" "" ""); QXmppDiscoveryIq disco; parsePacket(disco, xml); QCOMPARE(disco.verificationString(), QByteArray::fromBase64("QgayPKawpkPSDYmwT/WM94uAlu0=")); serializePacket(disco, xml); } void tst_QXmppDiscoveryIq::testDiscoveryWithForm() { const QByteArray xml( "" "" "" "" "" "" "" "" "" "" "urn:xmpp:dataforms:softwareinfo" "" "" "ipv4" "ipv6" "" "" "Mac" "" "" "10.5.1" "" "" "Psi" "" "" "0.11" "" "" "" ""); QXmppDiscoveryIq disco; parsePacket(disco, xml); QCOMPARE(disco.verificationString(), QByteArray::fromBase64("q07IKJEyjvHSyhy//CH0CxmKi8w=")); serializePacket(disco, xml); } QTEST_MAIN(tst_QXmppDiscoveryIq) #include "tst_qxmppdiscoveryiq.moc" qxmpp-0.7.6/tests/qxmppbindiq/0000755000175000007640000000000012116723562016314 5ustar sharkyjerrywebqxmpp-0.7.6/tests/qxmppbindiq/tst_qxmppbindiq.cpp0000644000175000007640000000467312116723562022260 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Jeremy Lainé * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include "QXmppBindIq.h" #include "util.h" class tst_QXmppBindIq : public QObject { Q_OBJECT private slots: void testNoResource(); void testResource(); void testResult(); }; void tst_QXmppBindIq::testNoResource() { const QByteArray xml( "" "" ""); QXmppBindIq bind; parsePacket(bind, xml); QCOMPARE(bind.type(), QXmppIq::Set); QCOMPARE(bind.id(), QString("bind_1")); QCOMPARE(bind.jid(), QString()); QCOMPARE(bind.resource(), QString()); serializePacket(bind, xml); } void tst_QXmppBindIq::testResource() { const QByteArray xml( "" "" "someresource" "" ""); QXmppBindIq bind; parsePacket(bind, xml); QCOMPARE(bind.type(), QXmppIq::Set); QCOMPARE(bind.id(), QString("bind_2")); QCOMPARE(bind.jid(), QString()); QCOMPARE(bind.resource(), QString("someresource")); serializePacket(bind, xml); } void tst_QXmppBindIq::testResult() { const QByteArray xml( "" "" "somenode@example.com/someresource" "" ""); QXmppBindIq bind; parsePacket(bind, xml); QCOMPARE(bind.type(), QXmppIq::Result); QCOMPARE(bind.id(), QString("bind_2")); QCOMPARE(bind.jid(), QString("somenode@example.com/someresource")); QCOMPARE(bind.resource(), QString()); serializePacket(bind, xml); } QTEST_MAIN(tst_QXmppBindIq) #include "tst_qxmppbindiq.moc" qxmpp-0.7.6/tests/qxmppbindiq/qxmppbindiq.pro0000644000175000007640000000011612116723562021370 0ustar sharkyjerrywebinclude(../tests.pri) TARGET = tst_qxmppbindiq SOURCES += tst_qxmppbindiq.cpp qxmpp-0.7.6/tests/qxmppnonsaslauthiq/0000755000175000007640000000000012116723562017737 5ustar sharkyjerrywebqxmpp-0.7.6/tests/qxmppnonsaslauthiq/tst_qxmppnonsaslauthiq.cpp0000644000175000007640000000524312116723562025320 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Jeremy Lainé * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "QXmppNonSASLAuth.h" #include "util.h" class tst_QXmppNonSASLAuthIq : public QObject { Q_OBJECT private slots: void testGet(); void testSetPlain(); void testSetDigest(); }; void tst_QXmppNonSASLAuthIq::testGet() { // Client requests authentication fields from server const QByteArray xml( "" "" ""); QXmppNonSASLAuthIq iq; parsePacket(iq, xml); serializePacket(iq, xml); } void tst_QXmppNonSASLAuthIq::testSetPlain() { // Client provides required information (plain) const QByteArray xml( "" "" "bill" "Calli0pe" "globe" "" ""); QXmppNonSASLAuthIq iq; parsePacket(iq, xml); QCOMPARE(iq.username(), QLatin1String("bill")); QCOMPARE(iq.digest(), QByteArray()); QCOMPARE(iq.password(), QLatin1String("Calli0pe")); QCOMPARE(iq.resource(), QLatin1String("globe")); serializePacket(iq, xml); } void tst_QXmppNonSASLAuthIq::testSetDigest() { // Client provides required information (digest) const QByteArray xml( "" "" "bill" "48fc78be9ec8f86d8ce1c39c320c97c21d62334d" "globe" "" ""); QXmppNonSASLAuthIq iq; parsePacket(iq, xml); QCOMPARE(iq.username(), QLatin1String("bill")); QCOMPARE(iq.digest(), QByteArray("\x48\xfc\x78\xbe\x9e\xc8\xf8\x6d\x8c\xe1\xc3\x9c\x32\x0c\x97\xc2\x1d\x62\x33\x4d")); QCOMPARE(iq.password(), QString()); QCOMPARE(iq.resource(), QLatin1String("globe")); serializePacket(iq, xml); } QTEST_MAIN(tst_QXmppNonSASLAuthIq) #include "tst_qxmppnonsaslauthiq.moc" qxmpp-0.7.6/tests/qxmppnonsaslauthiq/qxmppnonsaslauthiq.pro0000644000175000007640000000013412116723562024436 0ustar sharkyjerrywebinclude(../tests.pri) TARGET = tst_qxmppnonsaslauthiq SOURCES += tst_qxmppnonsaslauthiq.cpp qxmpp-0.7.6/tests/qxmpppresence/0000755000175000007640000000000012116723562016652 5ustar sharkyjerrywebqxmpp-0.7.6/tests/qxmpppresence/tst_qxmpppresence.cpp0000644000175000007640000002577212116723562023157 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Olivier Goffart * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include "QXmppPresence.h" #include "util.h" class tst_QXmppPresence : public QObject { Q_OBJECT private slots: void testPresence(); void testPresence_data(); void testPresenceWithCapability(); void testPresenceWithExtendedAddresses(); void testPresenceWithMucItem(); void testPresenceWithMucPassword(); void testPresenceWithMucSupport(); }; void tst_QXmppPresence::testPresence_data() { QXmppPresence foo; QTest::addColumn("xml"); QTest::addColumn("type"); QTest::addColumn("priority"); QTest::addColumn("statusType"); QTest::addColumn("statusText"); QTest::addColumn("vcardUpdate"); QTest::addColumn("photoHash"); // presence type QTest::newRow("available") << QByteArray("") << int(QXmppPresence::Available) << 0 << int(QXmppPresence::Online) << "" << int(QXmppPresence::VCardUpdateNone) << QByteArray(); QTest::newRow("unavailable") << QByteArray("") << int(QXmppPresence::Unavailable) << 0 << int(QXmppPresence::Online) << "" << int(QXmppPresence::VCardUpdateNone) << QByteArray(); QTest::newRow("error") << QByteArray("") << int(QXmppPresence::Error) << 0 << int(QXmppPresence::Online) << "" << int(QXmppPresence::VCardUpdateNone) << QByteArray(); QTest::newRow("subscribe") << QByteArray("") << int(QXmppPresence::Subscribe) << 0 << int(QXmppPresence::Online) << "" << int(QXmppPresence::VCardUpdateNone) << QByteArray(); QTest::newRow("unsubscribe") << QByteArray("") << int(QXmppPresence::Unsubscribe) << 0 << int(QXmppPresence::Online) << "" << int(QXmppPresence::VCardUpdateNone) << QByteArray(); QTest::newRow("subscribed") << QByteArray("") << int(QXmppPresence::Subscribed) << 0 << int(QXmppPresence::Online) << "" << int(QXmppPresence::VCardUpdateNone) << QByteArray(); QTest::newRow("unsubscribed") << QByteArray("") << int(QXmppPresence::Unsubscribed) << 0 << int(QXmppPresence::Online) << "" << int(QXmppPresence::VCardUpdateNone) << QByteArray(); QTest::newRow("probe") << QByteArray("") << int(QXmppPresence::Probe) << 0 << int(QXmppPresence::Online) << "" << int(QXmppPresence::VCardUpdateNone) << QByteArray(); // status text + priority QTest::newRow("full") << QByteArray("awayIn a meeting5") << int(QXmppPresence::Available) << 5 << int(QXmppPresence::Away) << "In a meeting" << int(QXmppPresence::VCardUpdateNone) << QByteArray(); // status type QTest::newRow("away") << QByteArray("away") << int(QXmppPresence::Available) << 0 << int(QXmppPresence::Away) << "" << int(QXmppPresence::VCardUpdateNone) << QByteArray(); QTest::newRow("dnd") << QByteArray("dnd") << int(QXmppPresence::Available) << 0 << int(QXmppPresence::DND) << "" << int(QXmppPresence::VCardUpdateNone) << QByteArray(); QTest::newRow("chat") << QByteArray("chat") << int(QXmppPresence::Available) << 0 << int(QXmppPresence::Chat) << "" << int(QXmppPresence::VCardUpdateNone) << QByteArray(); QTest::newRow("xa") << QByteArray("xa") << int(QXmppPresence::Available) << 0 << int(QXmppPresence::XA) << "" << int(QXmppPresence::VCardUpdateNone) << QByteArray(); QTest::newRow("invisible") << QByteArray("invisible") << int(QXmppPresence::Available) << 0 << int(QXmppPresence::Invisible) << "" << int(QXmppPresence::VCardUpdateNone) << QByteArray(); // photo QTest::newRow("vcard-photo") << QByteArray( "" "" "73b908bc" "" "") << int(QXmppPresence::Available) << 0 << int(QXmppPresence::Online) << "" << int(QXmppPresence::VCardUpdateValidPhoto) << QByteArray::fromHex("73b908bc"); QTest::newRow("vard-not-ready") << QByteArray( "" "" "") << int(QXmppPresence::Available) << 0 << int(QXmppPresence::Online) << "" << int(QXmppPresence::VCardUpdateNotReady) << QByteArray(); } void tst_QXmppPresence::testPresence() { QFETCH(QByteArray, xml); QFETCH(int, type); QFETCH(int, priority); QFETCH(int, statusType); QFETCH(QString, statusText); QFETCH(int, vcardUpdate); QFETCH(QByteArray, photoHash); QXmppPresence presence; parsePacket(presence, xml); QCOMPARE(int(presence.type()), type); QCOMPARE(presence.priority(), priority); QCOMPARE(int(presence.availableStatusType()), statusType); QCOMPARE(presence.statusText(), statusText); QCOMPARE(int(presence.vCardUpdateType()), vcardUpdate); QCOMPARE(presence.photoHash(), photoHash); // legacy QCOMPARE(presence.status().priority(), priority); QCOMPARE(int(presence.status().type()), statusType); QCOMPARE(presence.status().statusText(), statusText); serializePacket(presence, xml); } void tst_QXmppPresence::testPresenceWithCapability() { const QByteArray xml( "" "away" "In a meeting" "5" "" "73b908bc" "" "" ""); QXmppPresence presence; parsePacket(presence, xml); QCOMPARE(presence.to(), QString("foo@example.com/QXmpp")); QCOMPARE(presence.from(), QString("bar@example.com/QXmpp")); QCOMPARE(presence.availableStatusType(), QXmppPresence::Away); QCOMPARE(presence.statusText(), QString("In a meeting")); QCOMPARE(presence.priority(), 5); QCOMPARE(presence.photoHash(), QByteArray::fromHex("73b908bc")); QCOMPARE(presence.vCardUpdateType(), QXmppPresence::VCardUpdateValidPhoto); QCOMPARE(presence.capabilityHash(), QString("sha-1")); QCOMPARE(presence.capabilityNode(), QString("http://code.google.com/p/qxmpp")); QCOMPARE(presence.capabilityVer(), QByteArray::fromBase64("QgayPKawpkPSDYmwT/WM94uAlu0=")); serializePacket(presence, xml); } void tst_QXmppPresence::testPresenceWithExtendedAddresses() { const QByteArray xml( "" "" "
" "
" "" ""); QXmppPresence presence; parsePacket(presence, xml); QCOMPARE(presence.extendedAddresses().size(), 2); QCOMPARE(presence.extendedAddresses()[0].description(), QString()); QCOMPARE(presence.extendedAddresses()[0].jid(), QLatin1String("temas@jabber.org")); QCOMPARE(presence.extendedAddresses()[0].type(), QLatin1String("bcc")); QCOMPARE(presence.extendedAddresses()[1].description(), QString()); QCOMPARE(presence.extendedAddresses()[1].jid(), QLatin1String("jer@jabber.org")); QCOMPARE(presence.extendedAddresses()[1].type(), QLatin1String("bcc")); serializePacket(presence, xml); } void tst_QXmppPresence::testPresenceWithMucItem() { const QByteArray xml( "" "" "" "" "Avaunt, you cullion!" "" "" "" ""); QXmppPresence presence; parsePacket(presence, xml); QCOMPARE(presence.to(), QLatin1String("pistol@shakespeare.lit/harfleur")); QCOMPARE(presence.from(), QLatin1String("harfleur@henryv.shakespeare.lit/pistol")); QCOMPARE(presence.type(), QXmppPresence::Unavailable); QCOMPARE(presence.mucItem().actor(), QLatin1String("fluellen@shakespeare.lit")); QCOMPARE(presence.mucItem().affiliation(), QXmppMucItem::NoAffiliation); QCOMPARE(presence.mucItem().jid(), QString()); QCOMPARE(presence.mucItem().reason(), QLatin1String("Avaunt, you cullion!")); QCOMPARE(presence.mucItem().role(), QXmppMucItem::NoRole); QCOMPARE(presence.mucStatusCodes(), QList() << 307); serializePacket(presence, xml); } void tst_QXmppPresence::testPresenceWithMucPassword() { const QByteArray xml( "" "" "pass" "" ""); QXmppPresence presence; parsePacket(presence, xml); QCOMPARE(presence.to(), QLatin1String("coven@chat.shakespeare.lit/thirdwitch")); QCOMPARE(presence.from(), QLatin1String("hag66@shakespeare.lit/pda")); QCOMPARE(presence.type(), QXmppPresence::Available); QCOMPARE(presence.isMucSupported(), true); QCOMPARE(presence.mucPassword(), QLatin1String("pass")); serializePacket(presence, xml); } void tst_QXmppPresence::testPresenceWithMucSupport() { const QByteArray xml( "" "" ""); QXmppPresence presence; parsePacket(presence, xml); QCOMPARE(presence.to(), QLatin1String("coven@chat.shakespeare.lit/thirdwitch")); QCOMPARE(presence.from(), QLatin1String("hag66@shakespeare.lit/pda")); QCOMPARE(presence.type(), QXmppPresence::Available); QCOMPARE(presence.isMucSupported(), true); QVERIFY(presence.mucPassword().isEmpty()); serializePacket(presence, xml); } QTEST_MAIN(tst_QXmppPresence) #include "tst_qxmpppresence.moc" qxmpp-0.7.6/tests/qxmpppresence/qxmpppresence.pro0000644000175000007640000000012212116723562022261 0ustar sharkyjerrywebinclude(../tests.pri) TARGET = tst_qxmpppresence SOURCES += tst_qxmpppresence.cpp qxmpp-0.7.6/tests/run.py0000755000175000007640000000252312116723562015143 0ustar sharkyjerryweb#!/usr/bin/python import getopt import os import platform import sys root = os.path.dirname(__file__) report_path = None def usage(): print "Usage: run.py [options]" # parse options try: opts, args = getopt.getopt(sys.argv[1:], 'hx:') except getopt.GetoptError, err: print err usage() sys.exit(2) for opt, optarg in opts: if opt == '-h': usage() sys.exit() elif opt == '-x': report_path = optarg if not os.path.exists(report_path): os.mkdir(report_path) # set library path path = os.path.join(root, '..', 'src') if platform.system() == 'Darwin': os.environ['DYLD_LIBRARY_PATH'] = path else: os.environ['LD_LIBRARY_PATH'] = path # run tests for test in os.listdir(root): test_path = os.path.join(root, test) if os.path.isdir(test_path): if platform.system() == 'Darwin': prog = os.path.join(test_path, 'tst_' + test + '.app', 'Contents', 'MacOS', 'tst_' + test) elif platform.system() == 'Windows': prog = os.path.join(test_path, 'tst_' + test + '.exe') else: prog = os.path.join(test_path, 'tst_' + test) if not os.path.exists(prog): continue if report_path: os.system('%s -xunitxml -o %s/%s.xml' % (prog, report_path, test)) else: os.system(prog) qxmpp-0.7.6/tests/qxmppentitytimeiq/0000755000175000007640000000000012116723562017573 5ustar sharkyjerrywebqxmpp-0.7.6/tests/qxmppentitytimeiq/qxmppentitytimeiq.pro0000644000175000007640000000013212116723562024124 0ustar sharkyjerrywebinclude(../tests.pri) TARGET = tst_qxmppentitytimeiq SOURCES += tst_qxmppentitytimeiq.cpp qxmpp-0.7.6/tests/qxmppentitytimeiq/tst_qxmppentitytimeiq.cpp0000644000175000007640000000463412116723562025013 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Jeremy Lainé * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include "QXmppEntityTimeIq.h" #include "util.h" class tst_QXmppEntityTimeIq : public QObject { Q_OBJECT private slots: void testEntityTimeGet(); void testEntityTimeResult(); }; void tst_QXmppEntityTimeIq::testEntityTimeGet() { const QByteArray xml("" ""); QXmppEntityTimeIq entityTime; parsePacket(entityTime, xml); QCOMPARE(entityTime.id(), QLatin1String("time_1")); QCOMPARE(entityTime.to(), QLatin1String("juliet@capulet.com/balcony")); QCOMPARE(entityTime.from(), QLatin1String("romeo@montague.net/orchard")); QCOMPARE(entityTime.type(), QXmppIq::Get); serializePacket(entityTime, xml); } void tst_QXmppEntityTimeIq::testEntityTimeResult() { const QByteArray xml( "" "" ""); QXmppEntityTimeIq entityTime; parsePacket(entityTime, xml); QCOMPARE(entityTime.id(), QLatin1String("time_1")); QCOMPARE(entityTime.from(), QLatin1String("juliet@capulet.com/balcony")); QCOMPARE(entityTime.to(), QLatin1String("romeo@montague.net/orchard")); QCOMPARE(entityTime.type(), QXmppIq::Result); QCOMPARE(entityTime.tzo(), -21600); QCOMPARE(entityTime.utc(), QDateTime(QDate(2006, 12, 19), QTime(17, 58, 35), Qt::UTC)); serializePacket(entityTime, xml); } QTEST_MAIN(tst_QXmppEntityTimeIq) #include "tst_qxmppentitytimeiq.moc" qxmpp-0.7.6/tests/qxmppcodec/0000755000175000007640000000000012116723562016123 5ustar sharkyjerrywebqxmpp-0.7.6/tests/qxmppcodec/qxmppcodec.pro0000644000175000007640000000011412116723562021004 0ustar sharkyjerrywebinclude(../tests.pri) TARGET = tst_qxmppcodec SOURCES += tst_qxmppcodec.cpp qxmpp-0.7.6/tests/qxmppcodec/tst_qxmppcodec.cpp0000644000175000007640000002332312116723562021667 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include #include "QXmppCodec_p.h" class tst_QXmppCodec : public QObject { Q_OBJECT private slots: void testTheoraDecoder(); void testTheoraEncoder(); }; void tst_QXmppCodec::testTheoraDecoder() { #ifdef QXMPP_USE_THEORA QMap params; params.insert("delivery-method", "inline"); params.insert("configuration", "AAAAAcNFrgqZAio6gHRoZW9yYQMCAQAUAA8AAUAAAPAAAAAAAB4AAAABAAAAAAAAAAAAAMDAgXRoZW9yYSsAAABYaXBoLk9yZyBsaWJ0aGVvcmEgMS4xIDIwMDkwODIyIChUaHVzbmVsZGEpAAAAAIJ0aGVvcmG+zSj3uc1rGLWpSUoQc5zmMYxSlKQhCDGMYhCEIQhAAAAAAAAAAAAAEfThZC5VSbR2EvVwtJhrlaKpQJZIodBH05m41mQwF0slUpEslEYiEAeDkcDQZDEWiwVigTCURiEQB4OhwMhgLBUJhIIg8GgwFPuZF9aVVVQUEtLRkZBQTw8NzcyMi0tLSgoKCMjIx4eHh4ZGRkZFBQUFBQPDw8PDw8PCgoKCgoKCgoFBQUFBQUFAIQCwoQGCgzPQwMDhMaOjw3Dg0QGCg5RTgOERYdM1dQPhIWJTpEbWdNGCM3QFFocVwxQE5XZ3l4ZUhcX2JwZGdjERIYL2NjY2MSFRpCY2NjYxgaOGNjY2NjL0JjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjYxAQEBQYHCAoEBAUGBwgKDAQFBgcICgwQBQYHCAoMEBAGBwgKDBAQEAcICgwQEBAYCAoMEBAQGCAKDBAQEBggIA+L8t9ANMxO+Qo3g6om9uWYi3Ucb4D9yiSJe4NjJfWqpGmZXYuxCBORg9o6mS+cw2tWGxlUpXn27h+SdxDTMrsXYghfIo8NVqDYyXj85dzEro9o8k4T7qqQgxXNU+6qkV2NBGcppQe0eddyQ4GVrMbfOH8V4Xgl52/4TjtMPaPOpImMBdWszKag13wyWkKP7QL0KeNjmXZGgdyg9o865Tba72CuClUYEXxJ/xaLWOQfcIh3Nr/cQtI2GYsrQG6clcih7t51JeqpKhHmcJ0rWbBcbxQiuwNJA5PFD3brv/7JjeWwUg9ngWnWdxxYrMYfAZUcjRqJpZNr/6lLc7I4sPg+Tgmlk2jwW8Bn1dAsrAi0x5Mr/6lLchNaPXnYDaiL/gex8voTcwnZ9LbBWuBNLJrpigPMnd6qkQBJr9e5epxNLtQbnWbCJahuFlYaf4o8jvzhVSUoC6M6yYlGvwsrF5OTS7SPO3DmIQ7j3Ng/0tqKUBFc4YvWsosrHki/tu5Cbaj7MRmHQn/0yWw1FKBHCLKzdefak8z9tQiJc2HQtMnunBcx8SOe6iqkWVi+UPvfAbUT/69M8IxFIMuGKbm0XHem8MAX1rNRAdQ8Nvl1QpxWtzzk7RHpKomkj/NMjCfML51dgQ/nTuLbFc+gFNTS0OHKMJpXtEnmuRhvmDVzDe0nK7GNwEe37g7iBM9olk86qU5mT6Baw3AedmwUTeyyRNYb285XiszBy6j0yXH/HxVStYQB9exgJ8m417RdOYRZWuYDwlbFE3skehazf8KqRS+I3nf5O4zQWCu5uwDUmNqPZZImnRaycwmN9QqpGXJ1nCf43BwjCYoba+y6d2K7SDcvnCTyLD4QVKSN3haH7FJ5WscTjl1EhubhmDShtr7NLlf8KXE4xZtESMkJpdtbjm8798H1qysFEOH+4y6gqFVIdtATS7Sa0c3DOG+AfWn56ji6sKzzCduZY8CkRKAbTS6yaQr+jg9y8WmHfI+sVmLOP8gT3N6gsrqU7hPcRgmbay6SZQuC/3wdCjPDtb8cmMX8AqpORJkwx8gN3B7FaOvkLucRlANtZtJc7136ysVUkK17PuQOH0Y8XfrKzovk7cjDEGjbWbOVRlEKqW4DNo21yxlu+hIHDwvYKJvxFYrSdnS17Oj5EFSlwPRiNtWTTOjC/uw3Qq1qe4jRdDyWQTf/cg4ea7p7zE5Im1EMDOsWUqsi5odOwmlk9j/PsLQ+IfOGN5lufnaPXmcWVrjR0iBNLtJ7RgU1GcFotXwHzj9vOBooJCVtNr75hcCOLvnKssqUsWbqEPmWFKo/dQwC5jw3rLLS8CVM21k0jz5PHaJ7ROH11Ko5ZBolTNtZPY394O0SjPw6w4W2FcDcxhnED5/ypqFqGcdntAzGkzbWWTJ1fWWLvDgxwRR7jcn/XcoKikDIbapmmctDHDt1FWWIfjxGeyXuLRuhWi9QMmmZtriwmn7QK7CmoRfHUnI/Jfbo3nAqpHV/Ccwx5H1oQ0d/oBmiDbVIml0jy9LKy7zcU7nnC34CLKG6A5XhIJpW2umceD92xoLKyd71UKXwxJBtqlaTZ5UQt3Dr0PzCNFf4rsE/K1d2gqG9SmAO10XBb0+9EJeSGZtqlaTZMcP/DlOojWVjepSh4CPoSL2DFkNtUzTOX/2Acp11Bb9W8WIux5SqcEhelYDbUymaZ43J7RCi5gHr5R+srI3fW48qUi36Rz6QIVlZGC8mZNM2Btrjd/1EO06WjjcRnIXTF5gyxNM22tFvsiqApHXditKT//ELiJv4KR7CaUdQE7Dg/y+G9xiz5rLAiJCVtNrH35etqFVJcZd+BGCaVtrpJmiov+D9164YYoNy2xWQ8ziqkIyQlNJm2udF7ljgQ+fA7ZRf2j3rjcT3WK4AFGN/6fmBTULV3gJBmaTNtZcsIkfdhWhe9HH243OhiZJjTNtrKowSXo+VNRAefVlhP29uLeD+KEbieT5zEqpIEJ7/aWVjvqNwFAbasmmeLCZfLd4Nx+nXA0zbamFDLG+aSNAcnsv0JVSInltaw764ECRxKQuTr/vcqpLKyITnw21UML1xli0z9meWxg694pVPrQUAbapWk0mcePJDfcgfu2DKIT+WK9xTUgcOoR4n5V2Avju+WqDAkErSY21zyxibvXf4pqHfzq2AekcXKys83IX5ekYMRtrKTNM8riejgLKyLqFTUEb5cXhlM0zlG2uOEjlbRAebvR/P3wEblI+n9VUjfyAhKO4jixWFyVeNM22phMyx/t6DeL0Fr/7vjwsrBKuGWLTM21TML56OUnRAjhVUlKM3d9REBI4sK3JKF0zC/8bamWLTP5Qtn8PYaiqlARiyscb9krkTKJzbV/8MsWmZdawv69InkkIgeWqaghuc/k5gSCZpmbay5Y92Fe4URor/nDr0HX6ckBtqZTNM5WOF91SmAeOfhRFbuWOPVZ3HCKaiH0t58ICNQkJQ0zbamEzLG+7cP++LFZP86iCMAyxaZm2qZhfdL+n+5WVqahD5Abokii164ddj05KFp/MGWLTM21XML5+90FRS8cWEat0l+QopBvGSQxEA4HQY4M8i2dfcmfGuj/blR36WVvJVVI3jJIYiAcDoMcGeRbOvuTPjXR/tyo79LK3kqqkbxkkMRAOB0GODPItnX3Jnxro/25Ud+llbyVVSKqThP1ACJeCZpmbay5SMcIfFlYt5fei7sjo/3BbHDUpeuX9AsrgPNwuSGDEZTNMzbWW+fg7+RdAfz8+UqllYPqIvW8KA4JC9KNM22pMyxwu7RregsrOVr6fwjcJO2/pAhOj9KGEzLFeaZttbqIlNRSeRA+no7cc+hXZHANxafjLFpmTMLzbW6XqSGoQonqyulUgG8jwD5MvunWjXR/sY4M8peXbhR1GQIUZIEoutYXkyic76f/WKwbaueDLFpnv75EqpKqUBGLKxxv2SuRMonNtX/wyxaZl1rC/r0ieSQgA=="); QXmppTheoraDecoder decoder; QCOMPARE(decoder.setParameters(params), true); QXmppVideoFormat format = decoder.format(); QCOMPARE(format.frameSize(), QSize(320, 240)); QCOMPARE(format.pixelFormat(), QXmppVideoFrame::Format_YUV420P); #endif } void tst_QXmppCodec::testTheoraEncoder() { #ifdef QXMPP_USE_THEORA QXmppVideoFormat format; format.setFrameSize(QSize(320, 240)); format.setPixelFormat(QXmppVideoFrame::Format_YUV420P); QXmppTheoraEncoder encoder; encoder.setFormat(format); QMap params = encoder.parameters(); QCOMPARE(params.value("delivery-method"), QLatin1String("inline")); QCOMPARE(params.value("configuration"), QLatin1String("AAAAAcNFrgzoAio6gHRoZW9yYQMCAQAUAA8AAUAAAPAAAAAAAB4AAAABAAAAAAAAAAAAAMDAgXRoZW9yYSsAAABYaXBoLk9yZyBsaWJ0aGVvcmEgMS4xIDIwMDkwODIyIChUaHVzbmVsZGEpAAAAAIJ0aGVvcmG+zSj3uc1rGLWpSUoQc5zmMYxSlKQhCDGMYhCEIQhAAAAAAAAAAAAAEW2uU2eSyPxWEvx4OVts5ir1aKtUKBMpJFoQ/nk5m41mUwl4slUpk4kkghkIfDwdjgajQYC8VioUCQRiIQh8PBwMhgLBQIg4FRba5TZ5LI/FYS/Hg5W2zmKvVoq1QoEykkWhD+eTmbjWZTCXiyVSmTiSSCGQh8PB2OBqNBgLxWKhQJBGIhCHw8HAyGAsFAiDgUCw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDw8PDAwPEhQUFQ0NDhESFRUUDg4PEhQVFRUOEBETFBUVFRARFBUVFRUVEhMUFRUVFRUUFRUVFRUVFRUVFRUVFRUVEAwLEBQZGxwNDQ4SFRwcGw4NEBQZHBwcDhATFhsdHRwRExkcHB4eHRQYGxwdHh4dGxwdHR4eHh4dHR0dHh4eHRALChAYKDM9DAwOExo6PDcODRAYKDlFOA4RFh0zV1A+EhYlOkRtZ00YIzdAUWhxXDFATldneXhlSFxfYnBkZ2MTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTEhIVGRoaGhoSFBYaGhoaGhUWGRoaGhoaGRoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhESFh8kJCQkEhQYIiQkJCQWGCEkJCQkJB8iJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQREhgvY2NjYxIVGkJjY2NjGBo4Y2NjY2MvQmNjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRISEhUXGBkbEhIVFxgZGxwSFRcYGRscHRUXGBkbHB0dFxgZGxwdHR0YGRscHR0dHhkbHB0dHR4eGxwdHR0eHh4REREUFxocIBERFBcaHCAiERQXGhwgIiUUFxocICIlJRcaHCAiJSUlGhwgIiUlJSkcICIlJSUpKiAiJSUlKSoqEBAQFBgcICgQEBQYHCAoMBAUGBwgKDBAFBgcICgwQEAYHCAoMEBAQBwgKDBAQEBgICgwQEBAYIAoMEBAQGCAgAfF5cdH1e3Ow/L66wGmYnfIUbwdUTe3LMRbqON8B+5RJEvcGxkvrVUjTMrsXYhAnIwe0dTJfOYbWrDYyqUrz7dw/JO4hpmV2LsQQvkUeGq1BsZLx+cu5iV0e0eScJ91VIQYrmqfdVSK7GgjOU0oPaPOu5IcDK1mNvnD+K8LwS87f8Jx2mHtHnUkTGAurWZlNQa74ZLSFH9oF6FPGxzLsjQO5Qe0edcpttd7BXBSqMCL4k/4tFrHIPuEQ7m1/uIWkbDMWVoDdOSuRQ9286kvVUlQjzOE6VrNguN4oRXYGkgcnih7t13/9kxvLYKQezwLTrO44sVmMPgMqORo1E0sm1/9SludkcWHwfJwTSybR4LeAz6ugWVgRaY8mV/9SluQmtHrzsBtRF/wPY+X0JuYTs+ltgrXAmlk10xQHmTu9VSIAk1+vcvU4ml2oNzrNhEtQ3CysNP8UeR35wqpKUBdGdZMSjX4WVi8nJpdpHnbhzEIdx7mwf6W1FKAiucMXrWUWVjyRf23chNtR9mIzDoT/6ZLYailAjhFlZuvPtSeZ+2oREubDoWmT3TguY+JHPdRVSLKxfKH3vgNqJ/9emeEYikGXDFNzaLjvTeGAL61mogOoeG3y6oU4rW55ydoj0lUTSR/mmRhPmF86uwIfzp3FtiufQCmppaHDlGE0r2iTzXIw3zBq5hvaTldjG4CPb9wdxAme0SyedVKczJ9AtYbgPOzYKJvZZImsN7ecrxWZg5dR6ZLj/j4qpWsIA+vYwE+Tca9ounMIsrXMB4Stiib2SPQtZv+FVIpfEbzv8ncZoLBXc3YBqTG1HsskTTotZOYTG+oVUjLk6zhP8bg4RhMUNtfZdO7FdpBuXzhJ5Fh8IKlJG7wtD9ik8rWOJxy6iQ3NwzBpQ219mlyv+FLicYs2iJGSE0u2txzed++D61ZWCiHD/cZdQVCqkO2gJpdpNaObhnDfAPrT89RxdWFZ5hO3MseBSIlANppdZNIV/Rwe5eLTDvkfWKzFnH+QJ7m9QWV1KdwnuIwTNtZdJMoXBf74OhRnh2t+OTGL+AVUnIkyYY+QG7g9itHXyF3OIygG2s2kud679ZWKqSFa9n3IHD6MeLv1lZ0XyduRhiDRtrNnKoyiFVLcBm0ba5Yy3fQkDh4XsFE34isVpOzpa9nR8iCpS4HoxG2rJpnRhf3YboVa1PcRouh5LIJv/uQcPNd095ickTaiGBnWLKVWRc0OnYTSyex/n2FofEPnDG8y3PztHrzOLK1xo6RAml2k9owKajOC0Wr4D5x+3nA0UEhK2m198wuBHF3zlWWVKWLN1CHzLClUfuoYBcx4b1llpeBKmbayaR58njtE9onD66lUcsg0Spm2snsb+8HaJRn4dYcLbCuBuYwziB8/5U1C1DOOz2gZjSZtrLJk6vrLF3hwY4Io9xuT/ruUFRSBkNtUzTOWhjh26irLEPx4jPZL3Fo3QrReoGTTM21xYTT9oFdhTUIvjqTkfkvt0bzgVUjq/hOYY8j60IaO/0AzRBtqkTS6R5ellZd5uKdzzhb8BFlDdAcrwkE0rbXTOPB+7Y0FlZO96qFL4Ykg21StJs8qIW7h16H5hGiv8V2Cflau7QVDepTAHa6Lgt6feiEvJDM21StJsmOH/hynURrKxvUpQ8BH0JF7BiyG2qZpnL/7AOU66gt+reLEXY8pVOCQvSsBtqZTNM8bk9ohRcwD18o/WVkbvrceVKRb9I59IEKysjBeTMmmbA21xu/6iHadLRxuIzkLpi8wZYmmbbWi32RVAUjruxWlJ//iFxE38FI9hNKOoCdhwf5fDe4xZ81lgREhK2m1j78vW1CqkuMu/AjBNK210kzRUX/B+69cMMUG5bYrIeZxVSEZISmkzbXOi9yxwIfPgdsov7R71xuJ7rFcACjG/9PzApqFq7wEgzNJm2suWESPuwrQvejj7cbnQxMkxpm21lUYJL0fKmogPPqywn7e3FvB/FCNxPJ85iVUkCE9/tLKx31G4CgNtWTTPFhMvlu8G4/TrgaZttTChljfNJGgOT2X6EqpETy2tYd9cCBI4lIXJ1/3uVUllZEJz4baqGF64yxaZ+zPLYwde8Uqn1oKANtUrSaTOPHkhvuQP3bBlEJ/LFe4pqQOHUI8T8q7AXx3fLVBgSCVpMba55YxN3rv8U1Dv51bAPSOLlZWebkL8vSMGI21lJmmeVxPRwFlZF1CpqCN8uLwymaZyjbXHCRytogPN3o/n74CNykfT+qqRv5AQlHcRxYrC5KvGmbbUwmZY/29BvF6C1/93x4WVglXDLFpmbapmF89HKTogRwqqSlGbu+oiAkcWFbklC6Zhf+NtTLFpn8oWz+HsNRVSgIxZWON+yVyJlE5tq/+GWLTMutYX9ekTySEQPLVNQQ3OfycwJBM0zNtZcse7CvcKI0V/zh16Dr9OSA21MpmmcrHC+6pTAPHPwoit3LHHqs7jhFNRD6W8+EBGoSEoaZttTCZljfduH/fFisn+dRBGAZYtMzbVMwvul/T/crK1NQh8gN0SRRa9cOux6clC0/mDLFpmbarmF8/e6CopeOLCNW6S/IUUg3jJIYiAcDoMcGeRbOvuTPjXR/tyo79LK3kqqkbxkkMRAOB0GODPItnX3Jnxro/25Ud+llbyVVSN4ySGIgHA6DHBnkWzr7kz410f7cqO/Syt5KqpFVJwn6gBEvBM0zNtZcpGOEPiysW8vvRd2R0f7gtjhqUvXL+gWVwHm4XJDBiMpmmZtrLfPwd/IugP5+fKVSysH1EXreFAcEhelGmbbUmZY4Xdo1vQWVnK19P4RuEnbf0gQnR+lDCZlivNM22t1ESmopPIgfT0duOfQrsjgG4tPxli0zJmF5trdL1JDUIUT1ZXSqQDeR4B8mX3TrRro/2McGeUvLtwo6jIEKMkCUXWsLyZROd9P/rFYNtXPBli0z398iVUlVKAjFlY437JXImUTm2r/4ZYtMy61hf16RPJIQ==")); #endif } QTEST_MAIN(tst_QXmppCodec) #include "tst_qxmppcodec.moc" qxmpp-0.7.6/tests/qxmppversioniq/0000755000175000007640000000000012116723562017065 5ustar sharkyjerrywebqxmpp-0.7.6/tests/qxmppversioniq/qxmppversioniq.pro0000644000175000007640000000012412116723562022711 0ustar sharkyjerrywebinclude(../tests.pri) TARGET = tst_qxmppversioniq SOURCES += tst_qxmppversioniq.cpp qxmpp-0.7.6/tests/qxmppversioniq/tst_qxmppversioniq.cpp0000644000175000007640000000470312116723562023574 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Jeremy Lainé * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include "QXmppVersionIq.h" #include "util.h" class tst_QXmppVersionIq : public QObject { Q_OBJECT private slots: void testVersionGet(); void testVersionResult(); }; void tst_QXmppVersionIq::testVersionGet() { const QByteArray xmlGet( "" ""); QXmppVersionIq verIqGet; parsePacket(verIqGet, xmlGet); QCOMPARE(verIqGet.id(), QLatin1String("version_1")); QCOMPARE(verIqGet.to(), QLatin1String("juliet@capulet.com/balcony")); QCOMPARE(verIqGet.from(), QLatin1String("romeo@montague.net/orchard")); QCOMPARE(verIqGet.type(), QXmppIq::Get); serializePacket(verIqGet, xmlGet); } void tst_QXmppVersionIq::testVersionResult() { const QByteArray xmlResult( "" "" "qxmpp" "Windows-XP" "0.2.0" ""); QXmppVersionIq verIqResult; parsePacket(verIqResult, xmlResult); QCOMPARE(verIqResult.id(), QLatin1String("version_1")); QCOMPARE(verIqResult.to(), QLatin1String("romeo@montague.net/orchard")); QCOMPARE(verIqResult.from(), QLatin1String("juliet@capulet.com/balcony")); QCOMPARE(verIqResult.type(), QXmppIq::Result); QCOMPARE(verIqResult.name(), QString("qxmpp")); QCOMPARE(verIqResult.version(), QString("0.2.0")); QCOMPARE(verIqResult.os(), QString("Windows-XP")); serializePacket(verIqResult, xmlResult); } QTEST_MAIN(tst_QXmppVersionIq) #include "tst_qxmppversioniq.moc" qxmpp-0.7.6/tests/qxmpparchiveiq/0000755000175000007640000000000012116723562017021 5ustar sharkyjerrywebqxmpp-0.7.6/tests/qxmpparchiveiq/tst_qxmpparchiveiq.cpp0000644000175000007640000001560112116723562023463 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Jeremy Lainé * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "QXmppArchiveIq.h" #include "util.h" class tst_QXmppArchiveIq : public QObject { Q_OBJECT private slots: void testArchiveList_data(); void testArchiveList(); void testArchiveChat_data(); void testArchiveChat(); void testArchiveRemove(); void testArchiveRetrieve_data(); void testArchiveRetrieve(); }; void tst_QXmppArchiveIq::testArchiveList_data() { QTest::addColumn("xml"); QTest::addColumn("max"); QTest::newRow("no rsm") << QByteArray( "" "" "") << -1; QTest::newRow("with rsm") << QByteArray( "" "" "" "30" "" "" "") << 30; } void tst_QXmppArchiveIq::testArchiveList() { QFETCH(QByteArray, xml); QFETCH(int, max); QXmppArchiveListIq iq; parsePacket(iq, xml); QCOMPARE(iq.type(), QXmppIq::Get); QCOMPARE(iq.id(), QLatin1String("list_1")); QCOMPARE(iq.with(), QLatin1String("juliet@capulet.com")); QCOMPARE(iq.start(), QDateTime(QDate(1469, 7, 21), QTime(2, 0, 0), Qt::UTC)); QCOMPARE(iq.end(), QDateTime(QDate(1479, 7, 21), QTime(4, 0, 0), Qt::UTC)); QCOMPARE(iq.resultSetQuery().max(), max); serializePacket(iq, xml); } void tst_QXmppArchiveIq::testArchiveChat_data() { QTest::addColumn("xml"); QTest::addColumn("count"); QTest::newRow("no rsm") << QByteArray( "" "" "Art thou not Romeo, and a Montague?" "Neither, fair saint, if either thee dislike." "How cam'st thou hither, tell me, and wherefore?" "" "") << -1; QTest::newRow("with rsm") << QByteArray( "" "" "Art thou not Romeo, and a Montague?" "Neither, fair saint, if either thee dislike." "How cam'st thou hither, tell me, and wherefore?" "" "3" "" "" "") << 3; } void tst_QXmppArchiveIq::testArchiveChat() { QFETCH(QByteArray, xml); QFETCH(int, count); QXmppArchiveChatIq iq; parsePacket(iq, xml); QCOMPARE(iq.type(), QXmppIq::Result); QCOMPARE(iq.id(), QLatin1String("chat_1")); QCOMPARE(iq.chat().with(), QLatin1String("juliet@capulet.com")); QCOMPARE(iq.chat().messages().size(), 3); QCOMPARE(iq.chat().messages()[0].isReceived(), true); QCOMPARE(iq.chat().messages()[0].body(), QLatin1String("Art thou not Romeo, and a Montague?")); QCOMPARE(iq.chat().messages()[0].date(), QDateTime(QDate(1469, 7, 21), QTime(2, 56, 15), Qt::UTC)); QCOMPARE(iq.chat().messages()[1].isReceived(), false); QCOMPARE(iq.chat().messages()[1].date(), QDateTime(QDate(1469, 7, 21), QTime(2, 56, 26), Qt::UTC)); QCOMPARE(iq.chat().messages()[1].body(), QLatin1String("Neither, fair saint, if either thee dislike.")); QCOMPARE(iq.chat().messages()[2].isReceived(), true); QCOMPARE(iq.chat().messages()[2].date(), QDateTime(QDate(1469, 7, 21), QTime(2, 56, 33), Qt::UTC)); QCOMPARE(iq.chat().messages()[2].body(), QLatin1String("How cam'st thou hither, tell me, and wherefore?")); QCOMPARE(iq.resultSetReply().count(), count); serializePacket(iq, xml); } void tst_QXmppArchiveIq::testArchiveRemove() { const QByteArray xml( "" "" ""); QXmppArchiveRemoveIq iq; parsePacket(iq, xml); QCOMPARE(iq.type(), QXmppIq::Set); QCOMPARE(iq.id(), QLatin1String("remove_1")); QCOMPARE(iq.with(), QLatin1String("juliet@capulet.com")); QCOMPARE(iq.start(), QDateTime(QDate(1469, 7, 21), QTime(2, 0, 0), Qt::UTC)); QCOMPARE(iq.end(), QDateTime(QDate(1479, 7, 21), QTime(4, 0, 0), Qt::UTC)); serializePacket(iq, xml); } void tst_QXmppArchiveIq::testArchiveRetrieve_data() { QTest::addColumn("xml"); QTest::addColumn("max"); QTest::newRow("no rsm") << QByteArray( "" "" "") << -1; QTest::newRow("with rsm") << QByteArray( "" "" "" "30" "" "" "") << 30; } void tst_QXmppArchiveIq::testArchiveRetrieve() { QFETCH(QByteArray, xml); QFETCH(int, max); QXmppArchiveRetrieveIq iq; parsePacket(iq, xml); QCOMPARE(iq.type(), QXmppIq::Get); QCOMPARE(iq.id(), QLatin1String("retrieve_1")); QCOMPARE(iq.with(), QLatin1String("juliet@capulet.com")); QCOMPARE(iq.start(), QDateTime(QDate(1469, 7, 21), QTime(2, 0, 0), Qt::UTC)); QCOMPARE(iq.resultSetQuery().max(), max); serializePacket(iq, xml); } QTEST_MAIN(tst_QXmppArchiveIq) #include "tst_qxmpparchiveiq.moc" qxmpp-0.7.6/tests/qxmpparchiveiq/qxmpparchiveiq.pro0000644000175000007640000000012412116723562022601 0ustar sharkyjerrywebinclude(../tests.pri) TARGET = tst_qxmpparchiveiq SOURCES += tst_qxmpparchiveiq.cpp qxmpp-0.7.6/tests/qxmppjingleiq/0000755000175000007640000000000012116723562016650 5ustar sharkyjerrywebqxmpp-0.7.6/tests/qxmppjingleiq/tst_qxmppjingleiq.cpp0000644000175000007640000001151712116723562023143 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include "QXmppJingleIq.h" #include "util.h" class tst_QXmppJingleIq : public QObject { Q_OBJECT private slots: void testSession(); void testTerminate(); void testAudioPayloadType(); void testVideoPayloadType(); void testRinging(); }; void tst_QXmppJingleIq::testSession() { const QByteArray xml( "" "" "" "" "" "" "" ""); QXmppJingleIq session; parsePacket(session, xml); QCOMPARE(session.action(), QXmppJingleIq::SessionInitiate); QCOMPARE(session.initiator(), QLatin1String("romeo@montague.lit/orchard")); QCOMPARE(session.sid(), QLatin1String("a73sjjvkla37jfea")); QCOMPARE(session.content().creator(), QLatin1String("initiator")); QCOMPARE(session.content().name(), QLatin1String("this-is-a-stub")); QCOMPARE(session.reason().text(), QString()); QCOMPARE(session.reason().type(), QXmppJingleIq::Reason::None); serializePacket(session, xml); } void tst_QXmppJingleIq::testTerminate() { const QByteArray xml( "" "" "" "" "" "" ""); QXmppJingleIq session; parsePacket(session, xml); QCOMPARE(session.action(), QXmppJingleIq::SessionTerminate); QCOMPARE(session.initiator(), QString()); QCOMPARE(session.sid(), QLatin1String("a73sjjvkla37jfea")); QCOMPARE(session.reason().text(), QString()); QCOMPARE(session.reason().type(), QXmppJingleIq::Reason::Success); serializePacket(session, xml); } void tst_QXmppJingleIq::testAudioPayloadType() { const QByteArray xml(""); QXmppJinglePayloadType payload; parsePacket(payload, xml); QCOMPARE(payload.id(), static_cast(103)); QCOMPARE(payload.name(), QLatin1String("L16")); QCOMPARE(payload.channels(), static_cast(2)); QCOMPARE(payload.clockrate(), 16000u); serializePacket(payload, xml); } void tst_QXmppJingleIq::testVideoPayloadType() { const QByteArray xml( "" "" "" ""); QXmppJinglePayloadType payload; parsePacket(payload, xml); QCOMPARE(payload.id(), static_cast(98)); QCOMPARE(payload.name(), QLatin1String("theora")); QCOMPARE(payload.clockrate(), 90000u); QCOMPARE(payload.parameters().size(), 2); QCOMPARE(payload.parameters().value("height"), QLatin1String("768")); QCOMPARE(payload.parameters().value("width"), QLatin1String("1024")); serializePacket(payload, xml); } void tst_QXmppJingleIq::testRinging() { const QByteArray xml( "" "" "" "" ""); QXmppJingleIq iq; parsePacket(iq, xml); QCOMPARE(iq.ringing(), true); serializePacket(iq, xml); } QTEST_MAIN(tst_QXmppJingleIq) #include "tst_qxmppjingleiq.moc" qxmpp-0.7.6/tests/qxmppjingleiq/qxmppjingleiq.pro0000644000175000007640000000012212116723562022255 0ustar sharkyjerrywebinclude(../tests.pri) TARGET = tst_qxmppjingleiq SOURCES += tst_qxmppjingleiq.cpp qxmpp-0.7.6/tests/qxmppstreaminitiationiq/0000755000175000007640000000000012116723562020763 5ustar sharkyjerrywebqxmpp-0.7.6/tests/qxmppstreaminitiationiq/tst_qxmppstreaminitiationiq.cpp0000644000175000007640000001107512116723562027370 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Olivier Goffart * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "QXmppStreamInitiationIq_p.h" #include "QXmppTransferManager.h" #include "util.h" class tst_QXmppStreamInitiationIq : public QObject { Q_OBJECT private slots: void testFileInfo_data(); void testFileInfo(); void testOffer(); void testResult(); }; void tst_QXmppStreamInitiationIq::testFileInfo_data() { QTest::addColumn("xml"); QTest::addColumn("date"); QTest::addColumn("description"); QTest::addColumn("hash"); QTest::addColumn("name"); QTest::addColumn("size"); QTest::newRow("normal") << QByteArray("") << QDateTime() << QString() << QByteArray() << QString("test.txt") << qint64(1022); QTest::newRow("full") << QByteArray("" "This is a test. If this were a real file..." "") << QDateTime(QDate(1969, 7, 21), QTime(2, 56, 15), Qt::UTC) << QString("This is a test. If this were a real file...") << QByteArray::fromHex("552da749930852c69ae5d2141d3766b1") << QString("test.txt") << qint64(1022); } void tst_QXmppStreamInitiationIq::testFileInfo() { QFETCH(QByteArray, xml); QFETCH(QDateTime, date); QFETCH(QString, description); QFETCH(QByteArray, hash); QFETCH(QString, name); QFETCH(qint64, size); QXmppTransferFileInfo info; parsePacket(info, xml); QCOMPARE(info.date(), date); QCOMPARE(info.description(), description); QCOMPARE(info.hash(), hash); QCOMPARE(info.name(), name); QCOMPARE(info.size(), size); serializePacket(info, xml); } void tst_QXmppStreamInitiationIq::testOffer() { QByteArray xml( "" "" "" "" "" "" "" "" "" "" "" "" ""); QXmppStreamInitiationIq iq; parsePacket(iq, xml); QVERIFY(!iq.fileInfo().isNull()); QCOMPARE(iq.fileInfo().name(), QString("test.txt")); QCOMPARE(iq.fileInfo().size(), qint64(1022)); serializePacket(iq, xml); } void tst_QXmppStreamInitiationIq::testResult() { QByteArray xml( "" "" "" "" "" "http://jabber.org/protocol/bytestreams" "" "" "" "" ""); QXmppStreamInitiationIq iq; parsePacket(iq, xml); QVERIFY(iq.fileInfo().isNull()); serializePacket(iq, xml); } QTEST_MAIN(tst_QXmppStreamInitiationIq) #include "tst_qxmppstreaminitiationiq.moc" qxmpp-0.7.6/tests/qxmppstreaminitiationiq/qxmppstreaminitiationiq.pro0000644000175000007640000000014612116723562026511 0ustar sharkyjerrywebinclude(../tests.pri) TARGET = tst_qxmppstreaminitiationiq SOURCES += tst_qxmppstreaminitiationiq.cpp qxmpp-0.7.6/tests/util.h0000644000175000007640000000250712116723562015112 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Jeremy Lainé * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include template static void parsePacket(T &packet, const QByteArray &xml) { //qDebug() << "parsing" << xml; QDomDocument doc; QCOMPARE(doc.setContent(xml, true), true); QDomElement element = doc.documentElement(); packet.parse(element); } template static void serializePacket(T &packet, const QByteArray &xml) { QBuffer buffer; buffer.open(QIODevice::ReadWrite); QXmlStreamWriter writer(&buffer); packet.toXml(&writer); qDebug() << "expect " << xml; qDebug() << "writing" << buffer.data(); QCOMPARE(buffer.data(), xml); } qxmpp-0.7.6/tests/qxmppregisteriq/0000755000175000007640000000000012116723562017224 5ustar sharkyjerrywebqxmpp-0.7.6/tests/qxmppregisteriq/qxmppregisteriq.pro0000644000175000007640000000012612116723562023211 0ustar sharkyjerrywebinclude(../tests.pri) TARGET = tst_qxmppregisteriq SOURCES += tst_qxmppregisteriq.cpp qxmpp-0.7.6/tests/qxmppregisteriq/tst_qxmppregisteriq.cpp0000644000175000007640000001546112116723562024075 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include "QXmppRegisterIq.h" #include "util.h" class tst_QXmppRegisterIq : public QObject { Q_OBJECT private slots: void testGet(); void testResult(); void testResultWithForm(); void testSet(); void testSetWithForm(); }; void tst_QXmppRegisterIq::testGet() { const QByteArray xml( "" "" ""); QXmppRegisterIq iq; parsePacket(iq, xml); QCOMPARE(iq.id(), QLatin1String("reg1")); QCOMPARE(iq.to(), QLatin1String("shakespeare.lit")); QCOMPARE(iq.from(), QString()); QCOMPARE(iq.type(), QXmppIq::Get); QCOMPARE(iq.instructions(), QString()); QVERIFY(iq.username().isNull()); QVERIFY(iq.password().isNull()); QVERIFY(iq.email().isNull()); QVERIFY(iq.form().isNull()); serializePacket(iq, xml); } void tst_QXmppRegisterIq::testResult() { const QByteArray xml( "" "" "Choose a username and password for use with this service. Please also provide your email address." "" "" "" "" ""); QXmppRegisterIq iq; parsePacket(iq, xml); QCOMPARE(iq.id(), QLatin1String("reg1")); QCOMPARE(iq.to(), QString()); QCOMPARE(iq.from(), QString()); QCOMPARE(iq.type(), QXmppIq::Result); QCOMPARE(iq.instructions(), QLatin1String("Choose a username and password for use with this service. Please also provide your email address.")); QVERIFY(!iq.username().isNull()); QVERIFY(iq.username().isEmpty()); QVERIFY(!iq.password().isNull()); QVERIFY(iq.password().isEmpty()); QVERIFY(!iq.email().isNull()); QVERIFY(iq.email().isEmpty()); QVERIFY(iq.form().isNull()); serializePacket(iq, xml); } void tst_QXmppRegisterIq::testResultWithForm() { const QByteArray xml( "" "" "Use the enclosed form to register. If your Jabber client does not support Data Forms, visit http://www.shakespeare.lit/contests.php" "" "Contest Registration" "" "Please provide the following information" "to sign up for our special contests!" "" "" "jabber:iq:register" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""); QXmppRegisterIq iq; parsePacket(iq, xml); QCOMPARE(iq.id(), QLatin1String("reg3")); QCOMPARE(iq.to(), QLatin1String("juliet@capulet.com/balcony")); QCOMPARE(iq.from(), QLatin1String("contests.shakespeare.lit")); QCOMPARE(iq.type(), QXmppIq::Result); QCOMPARE(iq.instructions(), QLatin1String("Use the enclosed form to register. If your Jabber client does not support Data Forms, visit http://www.shakespeare.lit/contests.php")); QVERIFY(iq.username().isNull()); QVERIFY(iq.password().isNull()); QVERIFY(iq.email().isNull()); QVERIFY(!iq.form().isNull()); QCOMPARE(iq.form().title(), QLatin1String("Contest Registration")); serializePacket(iq, xml); } void tst_QXmppRegisterIq::testSet() { const QByteArray xml( "" "" "bill" "Calliope" "bard@shakespeare.lit" "" ""); QXmppRegisterIq iq; parsePacket(iq, xml); QCOMPARE(iq.id(), QLatin1String("reg2")); QCOMPARE(iq.to(), QString()); QCOMPARE(iq.from(), QString()); QCOMPARE(iq.type(), QXmppIq::Set); QCOMPARE(iq.username(), QLatin1String("bill")); QCOMPARE(iq.password(), QLatin1String("Calliope")); QCOMPARE(iq.email(), QLatin1String("bard@shakespeare.lit")); QVERIFY(iq.form().isNull()); serializePacket(iq, xml); } void tst_QXmppRegisterIq::testSetWithForm() { const QByteArray xml( "" "" "" "" "jabber:iq:register" "" "" "Juliet" "" "" "Capulet" "" "" "juliet@capulet.com" "" "" "F" "" "" "" ""); QXmppRegisterIq iq; parsePacket(iq, xml); QCOMPARE(iq.id(), QLatin1String("reg4")); QCOMPARE(iq.to(), QLatin1String("contests.shakespeare.lit")); QCOMPARE(iq.from(), QLatin1String("juliet@capulet.com/balcony")); QCOMPARE(iq.type(), QXmppIq::Set); QVERIFY(iq.username().isNull()); QVERIFY(iq.password().isNull()); QVERIFY(iq.email().isNull()); QVERIFY(!iq.form().isNull()); serializePacket(iq, xml); } QTEST_MAIN(tst_QXmppRegisterIq) #include "tst_qxmppregisteriq.moc" qxmpp-0.7.6/tests/qxmpppubsubiq/0000755000175000007640000000000012116723562016700 5ustar sharkyjerrywebqxmpp-0.7.6/tests/qxmpppubsubiq/qxmpppubsubiq.pro0000644000175000007640000000012212116723562022335 0ustar sharkyjerrywebinclude(../tests.pri) TARGET = tst_qxmpppubsubiq SOURCES += tst_qxmpppubsubiq.cpp qxmpp-0.7.6/tests/qxmpppubsubiq/tst_qxmpppubsubiq.cpp0000644000175000007640000001624312116723562023224 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include "QXmppPubSubIq.h" #include "util.h" class tst_QXmppPubSubIq : public QObject { Q_OBJECT private slots: void testItems(); void testItemsResponse(); void testPublish(); void testSubscribe(); void testSubscription(); void testSubscriptions(); }; void tst_QXmppPubSubIq::testItems() { const QByteArray xml( "" "" "" "" ""); QXmppPubSubIq iq; parsePacket(iq, xml); QCOMPARE(iq.id(), QLatin1String("items1")); QCOMPARE(iq.to(), QLatin1String("pubsub.shakespeare.lit")); QCOMPARE(iq.from(), QLatin1String("francisco@denmark.lit/barracks")); QCOMPARE(iq.type(), QXmppIq::Get); QCOMPARE(iq.queryType(), QXmppPubSubIq::ItemsQuery); QCOMPARE(iq.queryJid(), QString()); QCOMPARE(iq.queryNode(), QLatin1String("storage:bookmarks")); serializePacket(iq, xml); } void tst_QXmppPubSubIq::testItemsResponse() { const QByteArray xml( "" "" "" "" "" "" "JC" "" "" "" "" "" ""); QXmppPubSubIq iq; parsePacket(iq, xml); QCOMPARE(iq.id(), QLatin1String("items1")); QCOMPARE(iq.to(), QLatin1String("francisco@denmark.lit/barracks")); QCOMPARE(iq.from(), QLatin1String("pubsub.shakespeare.lit")); QCOMPARE(iq.type(), QXmppIq::Result); QCOMPARE(iq.queryType(), QXmppPubSubIq::ItemsQuery); QCOMPARE(iq.queryJid(), QString()); QCOMPARE(iq.queryNode(), QLatin1String("storage:bookmarks")); serializePacket(iq, xml); } void tst_QXmppPubSubIq::testPublish() { const QByteArray xml( "" "" "" "" "" "" "JC" "" "" "" "" "" ""); QXmppPubSubIq iq; parsePacket(iq, xml); QCOMPARE(iq.id(), QLatin1String("items1")); QCOMPARE(iq.to(), QLatin1String("pubsub.shakespeare.lit")); QCOMPARE(iq.from(), QLatin1String("francisco@denmark.lit/barracks")); QCOMPARE(iq.type(), QXmppIq::Result); QCOMPARE(iq.queryType(), QXmppPubSubIq::PublishQuery); QCOMPARE(iq.queryJid(), QString()); QCOMPARE(iq.queryNode(), QLatin1String("storage:bookmarks")); serializePacket(iq, xml); } void tst_QXmppPubSubIq::testSubscribe() { const QByteArray xml( "" "" "" "" ""); QXmppPubSubIq iq; parsePacket(iq, xml); QCOMPARE(iq.id(), QLatin1String("sub1")); QCOMPARE(iq.to(), QLatin1String("pubsub.shakespeare.lit")); QCOMPARE(iq.from(), QLatin1String("francisco@denmark.lit/barracks")); QCOMPARE(iq.type(), QXmppIq::Set); QCOMPARE(iq.queryType(), QXmppPubSubIq::SubscribeQuery); QCOMPARE(iq.queryJid(), QLatin1String("francisco@denmark.lit")); QCOMPARE(iq.queryNode(), QLatin1String("princely_musings")); serializePacket(iq, xml); } void tst_QXmppPubSubIq::testSubscription() { const QByteArray xml( "" "" "" "" ""); QXmppPubSubIq iq; parsePacket(iq, xml); QCOMPARE(iq.id(), QLatin1String("sub1")); QCOMPARE(iq.to(), QLatin1String("francisco@denmark.lit/barracks")); QCOMPARE(iq.from(), QLatin1String("pubsub.shakespeare.lit")); QCOMPARE(iq.type(), QXmppIq::Result); QCOMPARE(iq.queryType(), QXmppPubSubIq::SubscriptionQuery); QCOMPARE(iq.queryJid(), QLatin1String("francisco@denmark.lit")); QCOMPARE(iq.queryNode(), QLatin1String("princely_musings")); QCOMPARE(iq.subscriptionId(), QLatin1String("ba49252aaa4f5d320c24d3766f0bdcade78c78d3")); serializePacket(iq, xml); } void tst_QXmppPubSubIq::testSubscriptions() { const QByteArray xml( "" "" "" "" ""); QXmppPubSubIq iq; parsePacket(iq, xml); QCOMPARE(iq.id(), QLatin1String("subscriptions1")); QCOMPARE(iq.to(), QLatin1String("pubsub.shakespeare.lit")); QCOMPARE(iq.from(), QLatin1String("francisco@denmark.lit/barracks")); QCOMPARE(iq.type(), QXmppIq::Get); QCOMPARE(iq.queryType(), QXmppPubSubIq::SubscriptionsQuery); QCOMPARE(iq.queryJid(), QString()); QCOMPARE(iq.queryNode(), QString()); serializePacket(iq, xml); } QTEST_MAIN(tst_QXmppPubSubIq) #include "tst_qxmpppubsubiq.moc" qxmpp-0.7.6/tests/qxmppstanza/0000755000175000007640000000000012116723562016346 5ustar sharkyjerrywebqxmpp-0.7.6/tests/qxmppstanza/qxmppstanza.pro0000644000175000007640000000011612116723562021454 0ustar sharkyjerrywebinclude(../tests.pri) TARGET = tst_qxmppstanza SOURCES += tst_qxmppstanza.cpp qxmpp-0.7.6/tests/qxmppstanza/tst_qxmppstanza.cpp0000644000175000007640000000421112116723562022330 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include "QXmppStanza.h" #include "util.h" class tst_QXmppStanza : public QObject { Q_OBJECT private slots: void testExtendedAddress_data(); void testExtendedAddress(); }; void tst_QXmppStanza::testExtendedAddress_data() { QTest::addColumn("xml"); QTest::addColumn("delivered"); QTest::addColumn("description"); QTest::addColumn("jid"); QTest::addColumn("type"); QTest::newRow("simple") << QByteArray("
") << false << QString() << QString("foo@example.com/QXmpp") << QString("bcc"); QTest::newRow("full") << QByteArray("
") << true << QString("some description") << QString("foo@example.com/QXmpp") << QString("bcc"); } void tst_QXmppStanza::testExtendedAddress() { QFETCH(QByteArray, xml); QFETCH(bool, delivered); QFETCH(QString, description); QFETCH(QString, jid); QFETCH(QString, type); QXmppExtendedAddress address; parsePacket(address, xml); QCOMPARE(address.isDelivered(), delivered); QCOMPARE(address.description(), description); QCOMPARE(address.jid(), jid); QCOMPARE(address.type(), type); serializePacket(address, xml); } QTEST_MAIN(tst_QXmppStanza) #include "tst_qxmppstanza.moc" qxmpp-0.7.6/tests/qxmppserver/0000755000175000007640000000000012116723562016354 5ustar sharkyjerrywebqxmpp-0.7.6/tests/qxmppserver/qxmppserver.pro0000644000175000007640000000011612116723562021470 0ustar sharkyjerrywebinclude(../tests.pri) TARGET = tst_qxmppserver SOURCES += tst_qxmppserver.cpp qxmpp-0.7.6/tests/qxmppserver/tst_qxmppserver.cpp0000644000175000007640000000757512116723562022364 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "QXmppClient.h" #include "QXmppPasswordChecker.h" #include "QXmppServer.h" #include "util.h" class TestPasswordChecker : public QXmppPasswordChecker { public: TestPasswordChecker(const QString &username, const QString &password) : m_getPassword(true), m_username(username), m_password(password) { }; /// Retrieves the password for the given username. QXmppPasswordReply::Error getPassword(const QXmppPasswordRequest &request, QString &password) { if (request.username() == m_username) { password = m_password; return QXmppPasswordReply::NoError; } else { return QXmppPasswordReply::AuthorizationError; } }; /// Sets whether getPassword() is enabled. void setGetPassword(bool getPassword) { m_getPassword = getPassword; } /// Returns whether getPassword() is enabled. bool hasGetPassword() const { return m_getPassword; }; private: bool m_getPassword; QString m_username; QString m_password; }; class tst_QXmppServer : public QObject { Q_OBJECT private slots: void testConnect_data(); void testConnect(); }; void tst_QXmppServer::testConnect_data() { QTest::addColumn("username"); QTest::addColumn("password"); QTest::addColumn("mechanism"); QTest::addColumn("connected"); QTest::newRow("plain-good") << "testuser" << "testpwd" << "PLAIN" << true; QTest::newRow("plain-bad-username") << "baduser" << "testpwd" << "PLAIN" << false; QTest::newRow("plain-bad-password") << "testuser" << "badpwd" << "PLAIN" << false; QTest::newRow("digest-good") << "testuser" << "testpwd" << "DIGEST-MD5" << true; QTest::newRow("digest-bad-username") << "baduser" << "testpwd" << "DIGEST-MD5" << false; QTest::newRow("digest-bad-password") << "testuser" << "badpwd" << "DIGEST-MD5" << false; } void tst_QXmppServer::testConnect() { QFETCH(QString, username); QFETCH(QString, password); QFETCH(QString, mechanism); QFETCH(bool, connected); const QString testDomain("localhost"); const QHostAddress testHost(QHostAddress::LocalHost); const quint16 testPort = 12345; QXmppLogger logger; //logger.setLoggingType(QXmppLogger::StdoutLogging); // prepare server TestPasswordChecker passwordChecker("testuser", "testpwd"); QXmppServer server; server.setDomain(testDomain); server.setLogger(&logger); server.setPasswordChecker(&passwordChecker); server.listenForClients(testHost, testPort); // prepare client QXmppClient client; client.setLogger(&logger); QEventLoop loop; connect(&client, SIGNAL(connected()), &loop, SLOT(quit())); connect(&client, SIGNAL(disconnected()), &loop, SLOT(quit())); QXmppConfiguration config; config.setDomain(testDomain); config.setHost(testHost.toString()); config.setPort(testPort); config.setUser(username); config.setPassword(password); config.setSaslAuthMechanism(mechanism); client.connectToServer(config); loop.exec(); QCOMPARE(client.isConnected(), connected); } QTEST_MAIN(tst_QXmppServer) #include "tst_qxmppserver.moc" qxmpp-0.7.6/tests/tests.pro0000644000175000007640000000120612116723562015643 0ustar sharkyjerrywebTEMPLATE = subdirs SUBDIRS = \ qxmpparchiveiq \ qxmppbindiq \ qxmppdataform \ qxmppdiscoveryiq \ qxmppentitytimeiq \ qxmppiq \ qxmppjingleiq \ qxmppmessage \ qxmppnonsaslauthiq \ qxmpppresence \ qxmpppubsubiq \ qxmppregisteriq \ qxmppresultset \ qxmpprosteriq \ qxmpprpciq \ qxmpprtppacket \ qxmppserver \ qxmppsessioniq \ qxmppstanza \ qxmppstreamfeatures \ qxmppstunmessage \ qxmpputils \ qxmppvcardiq \ qxmppversioniq !isEmpty(QXMPP_AUTOTEST_INTERNAL) { SUBDIRS += qxmppcodec SUBDIRS += qxmppsasl SUBDIRS += qxmppstreaminitiationiq } qxmpp-0.7.6/tests/qxmppiq/0000755000175000007640000000000012116723562015457 5ustar sharkyjerrywebqxmpp-0.7.6/tests/qxmppiq/tst_qxmppiq.cpp0000644000175000007640000000374112116723562020561 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include "QXmppIq.h" #include "util.h" class tst_QXmppIq : public QObject { Q_OBJECT private slots: void testBasic_data(); void testBasic(); }; void tst_QXmppIq::testBasic_data() { QTest::addColumn("xml"); QTest::addColumn("type"); QTest::newRow("get") << QByteArray("") << int(QXmppIq::Get); QTest::newRow("set") << QByteArray("") << int(QXmppIq::Set); QTest::newRow("result") << QByteArray("") << int(QXmppIq::Result); QTest::newRow("error") << QByteArray("") << int(QXmppIq::Error); } void tst_QXmppIq::testBasic() { QFETCH(QByteArray, xml); QFETCH(int, type); QXmppIq iq; parsePacket(iq, xml); QCOMPARE(iq.to(), QString("foo@example.com/QXmpp")); QCOMPARE(iq.from(), QString("bar@example.com/QXmpp")); QCOMPARE(int(iq.type()), type); serializePacket(iq, xml); } QTEST_MAIN(tst_QXmppIq) #include "tst_qxmppiq.moc" qxmpp-0.7.6/tests/qxmppiq/qxmppiq.pro0000644000175000007640000000010612116723562017675 0ustar sharkyjerrywebinclude(../tests.pri) TARGET = tst_qxmppiq SOURCES += tst_qxmppiq.cpp qxmpp-0.7.6/tests/qxmppvcardiq/0000755000175000007640000000000012116723562016477 5ustar sharkyjerrywebqxmpp-0.7.6/tests/qxmppvcardiq/tst_qxmppvcardiq.cpp0000644000175000007640000002277312116723562022627 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include "QXmppVCardIq.h" #include "util.h" class tst_QXmppVCardIq : public QObject { Q_OBJECT private slots: void testAddress_data(); void testAddress(); void testEmail_data(); void testEmail(); void testPhone_data(); void testPhone(); void testVCard(); }; void tst_QXmppVCardIq::testAddress_data() { QTest::addColumn("xml"); QTest::addColumn("type"); QTest::addColumn("country"); QTest::addColumn("locality"); QTest::addColumn("postcode"); QTest::addColumn("region"); QTest::addColumn("street"); QTest::newRow("none") << QByteArray("") << int(QXmppVCardAddress::None) << "" << "" << "" << "" << ""; QTest::newRow("HOME") << QByteArray("") << int(QXmppVCardAddress::Home) << "" << "" << "" << "" << ""; QTest::newRow("WORK") << QByteArray("") << int(QXmppVCardAddress::Work) << "" << "" << "" << "" << ""; QTest::newRow("POSTAL") << QByteArray("") << int(QXmppVCardAddress::Postal) << "" << "" << "" << "" << ""; QTest::newRow("PREF") << QByteArray("") << int(QXmppVCardAddress::Preferred) << "" << "" << "" << "" << ""; QTest::newRow("country") << QByteArray("France") << int(QXmppVCardAddress::None) << "France" << "" << "" << "" << ""; QTest::newRow("locality") << QByteArray("Paris") << int(QXmppVCardAddress::None) << "" << "Paris" << "" << "" << ""; QTest::newRow("postcode") << QByteArray("75008") << int(QXmppVCardAddress::None) << "" << "" << "75008" << "" << ""; QTest::newRow("region") << QByteArray("Ile de France") << int(QXmppVCardAddress::None) << "" << "" << "" << "Ile de France" << ""; QTest::newRow("street") << QByteArray("55 rue du faubourg Saint-Honoré") << int(QXmppVCardAddress::None) << "" << "" << "" << "" << QString::fromUtf8("55 rue du faubourg Saint-Honoré"); } void tst_QXmppVCardIq::testAddress() { QFETCH(QByteArray, xml); QFETCH(int, type); QFETCH(QString, country); QFETCH(QString, locality); QFETCH(QString, postcode); QFETCH(QString, region); QFETCH(QString, street); QXmppVCardAddress address; parsePacket(address, xml); QCOMPARE(int(address.type()), type); QCOMPARE(address.country(), country); QCOMPARE(address.locality(), locality); QCOMPARE(address.postcode(), postcode); QCOMPARE(address.region(), region); QCOMPARE(address.street(), street); serializePacket(address, xml); } void tst_QXmppVCardIq::testEmail_data() { QTest::addColumn("xml"); QTest::addColumn("type"); QTest::newRow("none") << QByteArray("foo.bar@example.com") << int(QXmppVCardEmail::None); QTest::newRow("HOME") << QByteArray("foo.bar@example.com") << int(QXmppVCardEmail::Home); QTest::newRow("WORK") << QByteArray("foo.bar@example.com") << int(QXmppVCardEmail::Work); QTest::newRow("INTERNET") << QByteArray("foo.bar@example.com") << int(QXmppVCardEmail::Internet); QTest::newRow("X400") << QByteArray("foo.bar@example.com") << int(QXmppVCardEmail::X400); QTest::newRow("PREF") << QByteArray("foo.bar@example.com") << int(QXmppVCardEmail::Preferred); QTest::newRow("all") << QByteArray("foo.bar@example.com") << int(QXmppVCardEmail::Home | QXmppVCardEmail::Work | QXmppVCardEmail::Internet | QXmppVCardEmail::Preferred | QXmppVCardEmail::X400); } void tst_QXmppVCardIq::testEmail() { QFETCH(QByteArray, xml); QFETCH(int, type); QXmppVCardEmail email; parsePacket(email, xml); QCOMPARE(email.address(), QLatin1String("foo.bar@example.com")); QCOMPARE(int(email.type()), type); serializePacket(email, xml); } void tst_QXmppVCardIq::testPhone_data() { QTest::addColumn("xml"); QTest::addColumn("type"); QTest::newRow("none") << QByteArray("12345") << int(QXmppVCardPhone::None); QTest::newRow("HOME") << QByteArray("12345") << int(QXmppVCardPhone::Home); QTest::newRow("WORK") << QByteArray("12345") << int(QXmppVCardPhone::Work); QTest::newRow("VOICE") << QByteArray("12345") << int(QXmppVCardPhone::Voice); QTest::newRow("FAX") << QByteArray("12345") << int(QXmppVCardPhone::Fax); QTest::newRow("PAGER") << QByteArray("12345") << int(QXmppVCardPhone::Pager); QTest::newRow("MSG") << QByteArray("12345") << int(QXmppVCardPhone::Messaging); QTest::newRow("CELL") << QByteArray("12345") << int(QXmppVCardPhone::Cell); QTest::newRow("VIDEO") << QByteArray("") << int(QXmppVCardPhone::Video); QTest::newRow("BBS") << QByteArray("12345") << int(QXmppVCardPhone::BBS); QTest::newRow("MODEM") << QByteArray("12345") << int(QXmppVCardPhone::Modem); QTest::newRow("IDSN") << QByteArray("12345") << int(QXmppVCardPhone::ISDN); QTest::newRow("PCS") << QByteArray("12345") << int(QXmppVCardPhone::PCS); QTest::newRow("PREF") << QByteArray("12345") << int(QXmppVCardPhone::Preferred); } void tst_QXmppVCardIq::testPhone() { QFETCH(QByteArray, xml); QFETCH(int, type); QXmppVCardPhone phone; parsePacket(phone, xml); QCOMPARE(phone.number(), QLatin1String("12345")); QCOMPARE(int(phone.type()), type); serializePacket(phone, xml); } void tst_QXmppVCardIq::testVCard() { const QByteArray xml( "" "" "France" "1983-09-14" "I like XMPP." "foo.bar@example.com" "Foo Bar!" "FooBar" "FooWizBaz" "12345" "67890" "" "image/png" "" "iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAAXNSR0IArs4c6QAAAAlwSFlzAAA" "UIgAAFCIBjw1HyAAAAAd0SU1FB9oIHQInNvuJovgAAAAiSURBVAjXY2TQ+s/AwMDAwPD/GiMDlP" "WfgYGBiQEHGJwSAK2BBQ1f3uvpAAAAAElFTkSuQmCC" "" "" "http://code.google.com/p/qxmpp/" "" ""); QXmppVCardIq vcard; parsePacket(vcard, xml); QCOMPARE(vcard.addresses().size(), 1); QCOMPARE(vcard.addresses()[0].country(), QLatin1String("France")); QCOMPARE(int(vcard.addresses()[0].type()), int(QXmppVCardEmail::None)); QCOMPARE(vcard.birthday(), QDate(1983, 9, 14)); QCOMPARE(vcard.description(), QLatin1String("I like XMPP.")); QCOMPARE(vcard.email(), QLatin1String("foo.bar@example.com")); QCOMPARE(vcard.emails().size(), 1); QCOMPARE(vcard.emails()[0].address(), QLatin1String("foo.bar@example.com")); QCOMPARE(int(vcard.emails()[0].type()), int(QXmppVCardEmail::Internet)); QCOMPARE(vcard.nickName(), QLatin1String("FooBar")); QCOMPARE(vcard.fullName(), QLatin1String("Foo Bar!")); QCOMPARE(vcard.firstName(), QLatin1String("Foo")); QCOMPARE(vcard.middleName(), QLatin1String("Baz")); QCOMPARE(vcard.lastName(), QLatin1String("Wiz")); QCOMPARE(vcard.phones().size(), 2); QCOMPARE(vcard.phones()[0].number(), QLatin1String("12345")); QCOMPARE(int(vcard.phones()[0].type()), int(QXmppVCardEmail::Home)); QCOMPARE(vcard.phones()[1].number(), QLatin1String("67890")); QCOMPARE(int(vcard.phones()[1].type()), int(QXmppVCardEmail::Work)); QCOMPARE(vcard.photo(), QByteArray::fromBase64( "iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAAXNSR0IArs4c6QAAAAlwSFlzAAA" "UIgAAFCIBjw1HyAAAAAd0SU1FB9oIHQInNvuJovgAAAAiSURBVAjXY2TQ+s/AwMDAwPD/GiMDlP" "WfgYGBiQEHGJwSAK2BBQ1f3uvpAAAAAElFTkSuQmCC")); QCOMPARE(vcard.photoType(), QLatin1String("image/png")); QCOMPARE(vcard.url(), QLatin1String("http://code.google.com/p/qxmpp/")); serializePacket(vcard, xml); } QTEST_MAIN(tst_QXmppVCardIq) #include "tst_qxmppvcardiq.moc" qxmpp-0.7.6/tests/qxmppvcardiq/qxmppvcardiq.pro0000644000175000007640000000012012116723562021731 0ustar sharkyjerrywebinclude(../tests.pri) TARGET = tst_qxmppvcardiq SOURCES += tst_qxmppvcardiq.cpp qxmpp-0.7.6/tests/qxmpputils/0000755000175000007640000000000012116723562016206 5ustar sharkyjerrywebqxmpp-0.7.6/tests/qxmpputils/tst_qxmpputils.cpp0000644000175000007640000001105612116723562022035 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Jeremy Lainé * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include "QXmppUtils.h" #include "util.h" class tst_QXmppUtils : public QObject { Q_OBJECT private slots: void testCrc32(); void testHmac(); void testJid(); void testMime(); void testLibVersion(); void testTimezoneOffset(); }; void tst_QXmppUtils::testCrc32() { quint32 crc = QXmppUtils::generateCrc32(QByteArray()); QCOMPARE(crc, 0u); crc = QXmppUtils::generateCrc32(QByteArray("Hi There")); QCOMPARE(crc, 0xDB143BBEu); } void tst_QXmppUtils::testHmac() { QByteArray hmac = QXmppUtils::generateHmacMd5(QByteArray(16, 0x0b), QByteArray("Hi There")); QCOMPARE(hmac, QByteArray::fromHex("9294727a3638bb1c13f48ef8158bfc9d")); hmac = QXmppUtils::generateHmacMd5(QByteArray("Jefe"), QByteArray("what do ya want for nothing?")); QCOMPARE(hmac, QByteArray::fromHex("750c783e6ab0b503eaa86e310a5db738")); hmac = QXmppUtils::generateHmacMd5(QByteArray(16, 0xaa), QByteArray(50, 0xdd)); QCOMPARE(hmac, QByteArray::fromHex("56be34521d144c88dbb8c733f0e8b3f6")); } void tst_QXmppUtils::testJid() { QCOMPARE(QXmppUtils::jidToBareJid("foo@example.com/resource"), QLatin1String("foo@example.com")); QCOMPARE(QXmppUtils::jidToBareJid("foo@example.com"), QLatin1String("foo@example.com")); QCOMPARE(QXmppUtils::jidToBareJid("example.com"), QLatin1String("example.com")); QCOMPARE(QXmppUtils::jidToBareJid(QString()), QString()); QCOMPARE(QXmppUtils::jidToDomain("foo@example.com/resource"), QLatin1String("example.com")); QCOMPARE(QXmppUtils::jidToDomain("foo@example.com"), QLatin1String("example.com")); QCOMPARE(QXmppUtils::jidToDomain("example.com"), QLatin1String("example.com")); QCOMPARE(QXmppUtils::jidToDomain(QString()), QString()); QCOMPARE(QXmppUtils::jidToResource("foo@example.com/resource"), QLatin1String("resource")); QCOMPARE(QXmppUtils::jidToResource("foo@example.com"), QString()); QCOMPARE(QXmppUtils::jidToResource("example.com"), QString()); QCOMPARE(QXmppUtils::jidToResource(QString()), QString()); QCOMPARE(QXmppUtils::jidToUser("foo@example.com/resource"), QLatin1String("foo")); QCOMPARE(QXmppUtils::jidToUser("foo@example.com"), QLatin1String("foo")); QCOMPARE(QXmppUtils::jidToUser("example.com"), QString()); QCOMPARE(QXmppUtils::jidToUser(QString()), QString()); } // FIXME: how should we test MIME detection without expose getImageType? #if 0 QString getImageType(const QByteArray &contents); static void testMimeType(const QString &fileName, const QString fileType) { // load file from resources QFile file(":/" + fileName); QCOMPARE(file.open(QIODevice::ReadOnly), true); QCOMPARE(getImageType(file.readAll()), fileType); file.close(); } void tst_QXmppUtils::testMime() { testMimeType("test.bmp", "image/bmp"); testMimeType("test.gif", "image/gif"); testMimeType("test.jpg", "image/jpeg"); testMimeType("test.mng", "video/x-mng"); testMimeType("test.png", "image/png"); testMimeType("test.svg", "image/svg+xml"); testMimeType("test.xpm", "image/x-xpm"); } #else void tst_QXmppUtils::testMime() { } #endif void tst_QXmppUtils::testLibVersion() { QCOMPARE(QXmppVersion(), QString("0.7.6")); } void tst_QXmppUtils::testTimezoneOffset() { // parsing QCOMPARE(QXmppUtils::timezoneOffsetFromString("Z"), 0); QCOMPARE(QXmppUtils::timezoneOffsetFromString("+00:00"), 0); QCOMPARE(QXmppUtils::timezoneOffsetFromString("-00:00"), 0); QCOMPARE(QXmppUtils::timezoneOffsetFromString("+01:30"), 5400); QCOMPARE(QXmppUtils::timezoneOffsetFromString("-01:30"), -5400); // serialization QCOMPARE(QXmppUtils::timezoneOffsetToString(0), QLatin1String("Z")); QCOMPARE(QXmppUtils::timezoneOffsetToString(5400), QLatin1String("+01:30")); QCOMPARE(QXmppUtils::timezoneOffsetToString(-5400), QLatin1String("-01:30")); } QTEST_MAIN(tst_QXmppUtils) #include "tst_qxmpputils.moc" qxmpp-0.7.6/tests/qxmpputils/test.jpg0000644000175000007640000000054012116723562017666 0ustar sharkyjerrywebJFIFHHCreated with GIMP on a MacC  !"$"$C"656qt ?] image/svg+xml qxmpp-0.7.6/tests/qxmpputils/test.gif0000644000175000007640000000006212116723562017652 0ustar sharkyjerrywebGIF87a, L$ʹ|N;qxmpp-0.7.6/tests/qxmpputils/test.png0000644000175000007640000000026312116723562017674 0ustar sharkyjerrywebPNG  IHDRoxsRGB pHYs  tIME 5w"tEXtCommentCreated with GIMP on a MacwCIDATcD11`j @ IENDB`qxmpp-0.7.6/tests/qxmpputils/test.bmp0000644000175000007640000000025612116723562017670 0ustar sharkyjerrywebBM6(x  qxmpp-0.7.6/tests/qxmpputils/test.xpm0000644000175000007640000000023412116723562017712 0ustar sharkyjerryweb/* XPM */ static char * test_xpm[] = { "6 6 3 1", " c #FF0000", ". c #00FF00", "+ c #0000FF", " ..++", " ..++", " ..++", " ..++", " ..++", " ..++"}; qxmpp-0.7.6/tests/qxmpputils/test.mng0000644000175000007640000000033412116723562017670 0ustar sharkyjerrywebMNG  MHDRd7+<@TERMtEXtTitleCreated using GIMPe/FRAMdװc IHDRoxIDATcD11`j @ IENDB`MEND! qxmpp-0.7.6/tests/qxmpputils/tst_qxmpputils.qrc0000644000175000007640000000037012116723562022035 0ustar sharkyjerryweb test.bmp test.gif test.jpg test.mng test.png test.svg test.xpm qxmpp-0.7.6/tests/qxmpputils/qxmpputils.pro0000644000175000007640000000015412116723562021156 0ustar sharkyjerrywebinclude(../tests.pri) TARGET = tst_qxmpputils RESOURCES += tst_qxmpputils.qrc SOURCES += tst_qxmpputils.cpp qxmpp-0.7.6/tests/qxmppstunmessage/0000755000175000007640000000000012116723562017404 5ustar sharkyjerrywebqxmpp-0.7.6/tests/qxmppstunmessage/qxmppstunmessage.pro0000644000175000007640000000013012116723562023544 0ustar sharkyjerrywebinclude(../tests.pri) TARGET = tst_qxmppstunmessage SOURCES += tst_qxmppstunmessage.cpp qxmpp-0.7.6/tests/qxmppstunmessage/tst_qxmppstunmessage.cpp0000644000175000007640000001060212116723562024425 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include "QXmppStun.h" #include "util.h" class tst_QXmppStunMessage : public QObject { Q_OBJECT private slots: void testFingerprint(); void testIntegrity(); void testIPv4Address(); void testIPv6Address(); void testXorIPv4Address(); void testXorIPv6Address(); }; void tst_QXmppStunMessage::testFingerprint() { // without fingerprint QXmppStunMessage msg; msg.setType(0x0001); QCOMPARE(msg.encode(QByteArray(), false), QByteArray("\x00\x01\x00\x00\x21\x12\xA4\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", 20)); // with fingerprint QCOMPARE(msg.encode(QByteArray(), true), QByteArray("\x00\x01\x00\x08\x21\x12\xA4\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x28\x00\x04\xB2\xAA\xF9\xF6", 28)); } void tst_QXmppStunMessage::testIntegrity() { QXmppStunMessage msg; msg.setType(0x0001); QCOMPARE(msg.encode(QByteArray("somesecret"), false), QByteArray("\x00\x01\x00\x18\x21\x12\xA4\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x14\x96\x4B\x40\xD1\x84\x67\x6A\xFD\xB5\xE0\x7C\xC5\x1F\xFB\xBD\xA2\x61\xAF\xB1\x26", 44)); } void tst_QXmppStunMessage::testIPv4Address() { // encode QXmppStunMessage msg; msg.setType(0x0001); msg.mappedHost = QHostAddress("127.0.0.1"); msg.mappedPort = 12345; QByteArray packet = msg.encode(QByteArray(), false); QCOMPARE(packet, QByteArray("\x00\x01\x00\x0C\x21\x12\xA4\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x08\x00\x01\x30\x39\x7F\x00\x00\x01", 32)); // decode QXmppStunMessage msg2; msg2.decode(packet); QCOMPARE(msg2.mappedHost, QHostAddress("127.0.0.1")); QCOMPARE(msg2.mappedPort, quint16(12345)); } void tst_QXmppStunMessage::testIPv6Address() { // encode QXmppStunMessage msg; msg.setType(0x0001); msg.mappedHost = QHostAddress("::1"); msg.mappedPort = 12345; const QByteArray packet = msg.encode(QByteArray(), false); QCOMPARE(packet, QByteArray("\x00\x01\x00\x18\x21\x12\xA4\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x14\x00\x02\x30\x39\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01", 44)); // decode QXmppStunMessage msg2; msg2.decode(packet); QCOMPARE(msg2.mappedHost, QHostAddress("::1")); QCOMPARE(msg2.mappedPort, quint16(12345)); } void tst_QXmppStunMessage::testXorIPv4Address() { // encode QXmppStunMessage msg; msg.setType(0x0001); msg.xorMappedHost = QHostAddress("127.0.0.1"); msg.xorMappedPort = 12345; QByteArray packet = msg.encode(QByteArray(), false); QCOMPARE(packet, QByteArray("\x00\x01\x00\x0C\x21\x12\xA4\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x08\x00\x01\x11\x2B\x5E\x12\xA4\x43", 32)); // decode QXmppStunMessage msg2; msg2.decode(packet); QCOMPARE(msg2.xorMappedHost, QHostAddress("127.0.0.1")); QCOMPARE(msg2.xorMappedPort, quint16(12345)); } void tst_QXmppStunMessage::testXorIPv6Address() { // encode QXmppStunMessage msg; msg.setType(0x0001); msg.xorMappedHost = QHostAddress("::1"); msg.xorMappedPort = 12345; const QByteArray packet = msg.encode(QByteArray(), false); QCOMPARE(packet, QByteArray("\x00\x01\x00\x18\x21\x12\xA4\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x14\x00\x02\x11\x2B\x21\x12\xA4\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01", 44)); // decode QXmppStunMessage msg2; msg2.decode(packet); QCOMPARE(msg2.xorMappedHost, QHostAddress("::1")); QCOMPARE(msg2.xorMappedPort, quint16(12345)); } QTEST_MAIN(tst_QXmppStunMessage) #include "tst_qxmppstunmessage.moc" qxmpp-0.7.6/tests/qxmppsessioniq/0000755000175000007640000000000012116723562017063 5ustar sharkyjerrywebqxmpp-0.7.6/tests/qxmppsessioniq/qxmppsessioniq.pro0000644000175000007640000000012412116723562022705 0ustar sharkyjerrywebinclude(../tests.pri) TARGET = tst_qxmppsessioniq SOURCES += tst_qxmppsessioniq.cpp qxmpp-0.7.6/tests/qxmppsessioniq/tst_qxmppsessioniq.cpp0000644000175000007640000000254012116723562023565 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Jeremy Lainé * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include "QXmppSessionIq.h" #include "util.h" class TestPackets : public QObject { Q_OBJECT private slots: void testSession(); }; void TestPackets::testSession() { const QByteArray xml( "" "" ""); QXmppSessionIq session; parsePacket(session, xml); QCOMPARE(session.id(), QString("session_1")); QCOMPARE(session.to(), QString("example.com")); QCOMPARE(session.type(), QXmppIq::Set); serializePacket(session, xml); } QTEST_MAIN(TestPackets) #include "tst_qxmppsessioniq.moc" qxmpp-0.7.6/tests/qxmppmessage/0000755000175000007640000000000012116723562016472 5ustar sharkyjerrywebqxmpp-0.7.6/tests/qxmppmessage/qxmppmessage.pro0000644000175000007640000000012012116723562021717 0ustar sharkyjerrywebinclude(../tests.pri) TARGET = tst_qxmppmessage SOURCES += tst_qxmppmessage.cpp qxmpp-0.7.6/tests/qxmppmessage/tst_qxmppmessage.cpp0000644000175000007640000002734012116723562022610 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Jeremy Lainé * Manjeet Dahiya * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include "QXmppMessage.h" #include "util.h" class tst_QXmppMessage : public QObject { Q_OBJECT private slots: void testBasic_data(); void testBasic(); void testMessageAttention(); void testMessageReceipt(); void testDelay_data(); void testDelay(); void testExtendedAddresses(); void testMucInvitation(); void testState_data(); void testState(); void testXhtml(); }; void tst_QXmppMessage::testBasic_data() { QTest::addColumn("xml"); QTest::addColumn("type"); QTest::addColumn("body"); QTest::addColumn("subject"); QTest::addColumn("thread"); QTest::newRow("error") << QByteArray("") << int(QXmppMessage::Error) << QString() << QString() << QString(); QTest::newRow("normal") << QByteArray("") << int(QXmppMessage::Normal) << QString() << QString() << QString(); QTest::newRow("chat") << QByteArray("") << int(QXmppMessage::Chat) << QString() << QString() << QString(); QTest::newRow("groupchat") << QByteArray("") << int(QXmppMessage::GroupChat) << QString() << QString() << QString(); QTest::newRow("headline") << QByteArray("") << int(QXmppMessage::Headline) << QString() << QString() << QString(); QTest::newRow("full") << QByteArray("" "test subject" "test body & stuff" "test thread" "") << int(QXmppMessage::Normal) << "test body & stuff" << "test subject" << "test thread"; } void tst_QXmppMessage::testBasic() { QFETCH(QByteArray, xml); QFETCH(int, type); QFETCH(QString, body); QFETCH(QString, subject); QFETCH(QString, thread); QXmppMessage message; parsePacket(message, xml); QCOMPARE(message.to(), QString("foo@example.com/QXmpp")); QCOMPARE(message.from(), QString("bar@example.com/QXmpp")); QVERIFY(message.extendedAddresses().isEmpty()); QCOMPARE(int(message.type()), type); QCOMPARE(message.body(), body); QCOMPARE(message.subject(), subject); QCOMPARE(message.thread(), thread); QCOMPARE(message.state(), QXmppMessage::None); QCOMPARE(message.isAttentionRequested(), false); QCOMPARE(message.isReceiptRequested(), false); QCOMPARE(message.receiptId(), QString()); QCOMPARE(message.xhtml(), QString()); serializePacket(message, xml); } void tst_QXmppMessage::testMessageAttention() { const QByteArray xml( "" "" ""); QXmppMessage message; parsePacket(message, xml); QCOMPARE(message.to(), QString("foo@example.com/QXmpp")); QCOMPARE(message.from(), QString("bar@example.com/QXmpp")); QVERIFY(message.extendedAddresses().isEmpty()); QCOMPARE(message.type(), QXmppMessage::Normal); QCOMPARE(message.body(), QString()); QCOMPARE(message.isAttentionRequested(), true); QCOMPARE(message.isReceiptRequested(), false); QCOMPARE(message.receiptId(), QString()); serializePacket(message, xml); } void tst_QXmppMessage::testMessageReceipt() { const QByteArray xml( "" "My lord, dispatch; read o'er these articles." "" ""); QXmppMessage message; parsePacket(message, xml); QCOMPARE(message.id(), QString("richard2-4.1.247")); QCOMPARE(message.to(), QString("kingrichard@royalty.england.lit/throne")); QCOMPARE(message.from(), QString("northumberland@shakespeare.lit/westminster")); QVERIFY(message.extendedAddresses().isEmpty()); QCOMPARE(message.type(), QXmppMessage::Normal); QCOMPARE(message.body(), QString("My lord, dispatch; read o'er these articles.")); QCOMPARE(message.isAttentionRequested(), false); QCOMPARE(message.isReceiptRequested(), true); QCOMPARE(message.receiptId(), QString()); serializePacket(message, xml); const QByteArray receiptXml( "" "" ""); QXmppMessage receipt; parsePacket(receipt, receiptXml); QCOMPARE(receipt.id(), QString("bi29sg183b4v")); QCOMPARE(receipt.to(), QString("northumberland@shakespeare.lit/westminster")); QCOMPARE(receipt.from(), QString("kingrichard@royalty.england.lit/throne")); QVERIFY(receipt.extendedAddresses().isEmpty()); QCOMPARE(receipt.type(), QXmppMessage::Normal); QCOMPARE(receipt.body(), QString()); QCOMPARE(receipt.isAttentionRequested(), false); QCOMPARE(receipt.isReceiptRequested(), false); QCOMPARE(receipt.receiptId(), QString("richard2-4.1.247")); serializePacket(receipt, receiptXml); const QByteArray oldXml( "" "" ""); QXmppMessage old; parsePacket(old, oldXml); QCOMPARE(old.id(), QString("richard2-4.1.247")); QCOMPARE(old.to(), QString("northumberland@shakespeare.lit/westminster")); QCOMPARE(old.from(), QString("kingrichard@royalty.england.lit/throne")); QVERIFY(old.extendedAddresses().isEmpty()); QCOMPARE(old.type(), QXmppMessage::Normal); QCOMPARE(old.body(), QString()); QCOMPARE(old.isAttentionRequested(), false); QCOMPARE(old.isReceiptRequested(), false); QCOMPARE(old.receiptId(), QString("richard2-4.1.247")); } void tst_QXmppMessage::testDelay_data() { QTest::addColumn("xml"); QTest::addColumn("stamp"); QTest::newRow("delay") << QByteArray("" "" "") << QDateTime(QDate(2010, 06, 29), QTime(8, 23, 6), Qt::UTC); QTest::newRow("legacy") << QByteArray("" "" "") << QDateTime(QDate(2010, 06, 29), QTime(8, 23, 6), Qt::UTC); } void tst_QXmppMessage::testDelay() { QFETCH(QByteArray, xml); QFETCH(QDateTime, stamp); QXmppMessage message; parsePacket(message, xml); QCOMPARE(message.stamp(), stamp); serializePacket(message, xml); } void tst_QXmppMessage::testExtendedAddresses() { QByteArray xml( "" "" "
" "
" "" ""); QXmppMessage message; parsePacket(message, xml); QCOMPARE(message.extendedAddresses().size(), 2); QCOMPARE(message.extendedAddresses()[0].description(), QLatin1String("Joe Hildebrand")); QCOMPARE(message.extendedAddresses()[0].jid(), QLatin1String("hildjj@jabber.org/Work")); QCOMPARE(message.extendedAddresses()[0].type(), QLatin1String("to")); QCOMPARE(message.extendedAddresses()[1].description(), QLatin1String("Jeremie Miller")); QCOMPARE(message.extendedAddresses()[1].jid(), QLatin1String("jer@jabber.org/Home")); QCOMPARE(message.extendedAddresses()[1].type(), QLatin1String("cc")); serializePacket(message, xml); } void tst_QXmppMessage::testMucInvitation() { QByteArray xml( "" "" ""); QXmppMessage message; parsePacket(message, xml); QCOMPARE(message.mucInvitationJid(), QLatin1String("darkcave@macbeth.shakespeare.lit")); QCOMPARE(message.mucInvitationPassword(), QLatin1String("cauldronburn")); QCOMPARE(message.mucInvitationReason(), QLatin1String("Hey Hecate, this is the place for all good witches!")); serializePacket(message, xml); } void tst_QXmppMessage::testState_data() { QTest::addColumn("xml"); QTest::addColumn("state"); QTest::newRow("none") << QByteArray("") << int(QXmppMessage::None); QTest::newRow("active") << QByteArray("") << int(QXmppMessage::Active); QTest::newRow("inactive") << QByteArray("") << int(QXmppMessage::Inactive); QTest::newRow("gone") << QByteArray("") << int(QXmppMessage::Gone); QTest::newRow("composing") << QByteArray("") << int(QXmppMessage::Composing); QTest::newRow("paused") << QByteArray("") << int(QXmppMessage::Paused); } void tst_QXmppMessage::testState() { QFETCH(QByteArray, xml); QFETCH(int, state); QXmppMessage message; parsePacket(message, xml); QCOMPARE(int(message.state()), state); serializePacket(message, xml); } void tst_QXmppMessage::testXhtml() { const QByteArray xml("" "hi!" "" "" "

hi!

" "" "" "
"); QXmppMessage message; parsePacket(message, xml); QCOMPARE(message.xhtml(), QLatin1String("

hi!

")); serializePacket(message, xml); } QTEST_MAIN(tst_QXmppMessage) #include "tst_qxmppmessage.moc" qxmpp-0.7.6/tests/qxmppsasl/0000755000175000007640000000000012116723562016010 5ustar sharkyjerrywebqxmpp-0.7.6/tests/qxmppsasl/tst_qxmppsasl.cpp0000644000175000007640000003324012116723562021440 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include "QXmppSasl_p.h" #include "util.h" class tst_QXmppSasl : public QObject { Q_OBJECT private slots: void testParsing(); void testAuth_data(); void testAuth(); void testChallenge_data(); void testChallenge(); void testFailure(); void testResponse_data(); void testResponse(); void testSuccess(); // client void testClientAvailableMechanisms(); void testClientBadMechanism(); void testClientAnonymous(); void testClientDigestMd5(); void testClientDigestMd5_data(); void testClientFacebook(); void testClientGoogle(); void testClientPlain(); void testClientWindowsLive(); // server void testServerBadMechanism(); void testServerAnonymous(); void testServerDigestMd5(); void testServerPlain(); void testServerPlainChallenge(); }; void tst_QXmppSasl::testParsing() { // empty QMap empty = QXmppSaslDigestMd5::parseMessage(QByteArray()); QCOMPARE(empty.size(), 0); QCOMPARE(QXmppSaslDigestMd5::serializeMessage(empty), QByteArray()); // non-empty const QByteArray bytes("number=12345,quoted_plain=\"quoted string\",quoted_quote=\"quoted\\\\slash\\\"quote\",string=string"); QMap map = QXmppSaslDigestMd5::parseMessage(bytes); QCOMPARE(map.size(), 4); QCOMPARE(map["number"], QByteArray("12345")); QCOMPARE(map["quoted_plain"], QByteArray("quoted string")); QCOMPARE(map["quoted_quote"], QByteArray("quoted\\slash\"quote")); QCOMPARE(map["string"], QByteArray("string")); QCOMPARE(QXmppSaslDigestMd5::serializeMessage(map), bytes); } void tst_QXmppSasl::testAuth_data() { QTest::addColumn("xml"); QTest::addColumn("mechanism"); QTest::addColumn("value"); QTest::newRow("plain") << QByteArray("AGZvbwBiYXI=") << "PLAIN" << QByteArray("\0foo\0bar", 8); QTest::newRow("digest-md5") << QByteArray("") << "DIGEST-MD5" << QByteArray(); } void tst_QXmppSasl::testAuth() { QFETCH(QByteArray, xml); QFETCH(QString, mechanism); QFETCH(QByteArray, value); // no condition QXmppSaslAuth auth; parsePacket(auth, xml); QCOMPARE(auth.mechanism(), mechanism); QCOMPARE(auth.value(), value); serializePacket(auth, xml); } void tst_QXmppSasl::testChallenge_data() { QTest::addColumn("xml"); QTest::addColumn("value"); QTest::newRow("empty") << QByteArray("") << QByteArray(); QTest::newRow("value") << QByteArray("AGZvbwBiYXI=") << QByteArray("\0foo\0bar", 8); } void tst_QXmppSasl::testChallenge() { QFETCH(QByteArray, xml); QFETCH(QByteArray, value); // no condition QXmppSaslChallenge challenge; parsePacket(challenge, xml); QCOMPARE(challenge.value(), value); serializePacket(challenge, xml); } void tst_QXmppSasl::testFailure() { // no condition const QByteArray xml = ""; QXmppSaslFailure failure; parsePacket(failure, xml); QCOMPARE(failure.condition(), QString()); serializePacket(failure, xml); // not authorized const QByteArray xml2 = ""; QXmppSaslFailure failure2; parsePacket(failure2, xml2); QCOMPARE(failure2.condition(), QLatin1String("not-authorized")); serializePacket(failure2, xml2); } void tst_QXmppSasl::testResponse_data() { QTest::addColumn("xml"); QTest::addColumn("value"); QTest::newRow("empty") << QByteArray("") << QByteArray(); QTest::newRow("value") << QByteArray("AGZvbwBiYXI=") << QByteArray("\0foo\0bar", 8); } void tst_QXmppSasl::testResponse() { QFETCH(QByteArray, xml); QFETCH(QByteArray, value); // no condition QXmppSaslResponse response; parsePacket(response, xml); QCOMPARE(response.value(), value); serializePacket(response, xml); } void tst_QXmppSasl::testSuccess() { const QByteArray xml = ""; QXmppSaslSuccess stanza; parsePacket(stanza, xml); serializePacket(stanza, xml); } void tst_QXmppSasl::testClientAvailableMechanisms() { QCOMPARE(QXmppSaslClient::availableMechanisms(), QStringList() << "PLAIN" << "DIGEST-MD5" << "ANONYMOUS" << "X-FACEBOOK-PLATFORM" << "X-MESSENGER-OAUTH2" << "X-OAUTH2"); } void tst_QXmppSasl::testClientBadMechanism() { QXmppSaslClient *client = QXmppSaslClient::create("BAD-MECH"); QVERIFY(client == 0); } void tst_QXmppSasl::testClientAnonymous() { QXmppSaslClient *client = QXmppSaslClient::create("ANONYMOUS"); QVERIFY(client != 0); QCOMPARE(client->mechanism(), QLatin1String("ANONYMOUS")); // initial step returns nothing QByteArray response; QVERIFY(client->respond(QByteArray(), response)); QCOMPARE(response, QByteArray()); // any further step is an error QVERIFY(!client->respond(QByteArray(), response)); delete client; } void tst_QXmppSasl::testClientDigestMd5_data() { QTest::addColumn("qop"); QTest::newRow("qop-none") << QByteArray(); QTest::newRow("qop-auth") << QByteArray(",qop=\"auth\""); QTest::newRow("qop-multi") << QByteArray(",qop=\"auth,auth-int\""); } void tst_QXmppSasl::testClientDigestMd5() { QFETCH(QByteArray, qop); QXmppSaslDigestMd5::setNonce("AMzVG8Oibf+sVUCPPlWLR8lZQvbbJtJB9vJd+u3c6dw="); QXmppSaslClient *client = QXmppSaslClient::create("DIGEST-MD5"); QVERIFY(client != 0); QCOMPARE(client->mechanism(), QLatin1String("DIGEST-MD5")); client->setUsername("qxmpp1"); client->setPassword("qxmpp123"); client->setHost("jabber.ru"); client->setServiceType("xmpp"); // initial step returns nothing QByteArray response; QVERIFY(client->respond(QByteArray(), response)); QCOMPARE(response, QByteArray()); QVERIFY(client->respond(QByteArray("nonce=\"2530347127\"") + qop + QByteArray("charset=utf-8,algorithm=md5-sess"), response)); QCOMPARE(response, QByteArray("charset=utf-8,cnonce=\"AMzVG8Oibf+sVUCPPlWLR8lZQvbbJtJB9vJd+u3c6dw=\",digest-uri=\"xmpp/jabber.ru\",nc=00000001,nonce=2530347127,qop=auth,response=a61fbf4320577d74038b71a8546bc7ae,username=qxmpp1")); QVERIFY(client->respond(QByteArray("rspauth=d92bf7f4331700c24799cbab364a14b7"), response)); QCOMPARE(response, QByteArray()); // any further step is an error QVERIFY(!client->respond(QByteArray(), response)); delete client; } void tst_QXmppSasl::testClientFacebook() { QXmppSaslClient *client = QXmppSaslClient::create("X-FACEBOOK-PLATFORM"); QVERIFY(client != 0); QCOMPARE(client->mechanism(), QLatin1String("X-FACEBOOK-PLATFORM")); client->setUsername("123456789012345"); client->setPassword("abcdefghijlkmno"); // initial step returns nothing QByteArray response; QVERIFY(client->respond(QByteArray(), response)); QCOMPARE(response, QByteArray()); // challenge response QVERIFY(client->respond(QByteArray("version=1&method=auth.xmpp_login&nonce=AA4EFEE16F2AB64B131EEFFE6EACDDB8"), response)); QCOMPARE(response, QByteArray("access_token=abcdefghijlkmno&api_key=123456789012345&call_id=&method=auth.xmpp_login&nonce=AA4EFEE16F2AB64B131EEFFE6EACDDB8&v=1.0")); // any further step is an error QVERIFY(!client->respond(QByteArray(), response)); delete client; } void tst_QXmppSasl::testClientGoogle() { QXmppSaslClient *client = QXmppSaslClient::create("X-OAUTH2"); QVERIFY(client != 0); QCOMPARE(client->mechanism(), QLatin1String("X-OAUTH2")); client->setUsername("foo"); client->setPassword("bar"); // initial step returns data QByteArray response; QVERIFY(client->respond(QByteArray(), response)); QCOMPARE(response, QByteArray("\0foo\0bar", 8)); // any further step is an error QVERIFY(!client->respond(QByteArray(), response)); delete client; } void tst_QXmppSasl::testClientPlain() { QXmppSaslClient *client = QXmppSaslClient::create("PLAIN"); QVERIFY(client != 0); QCOMPARE(client->mechanism(), QLatin1String("PLAIN")); client->setUsername("foo"); client->setPassword("bar"); // initial step returns data QByteArray response; QVERIFY(client->respond(QByteArray(), response)); QCOMPARE(response, QByteArray("\0foo\0bar", 8)); // any further step is an error QVERIFY(!client->respond(QByteArray(), response)); delete client; } void tst_QXmppSasl::testClientWindowsLive() { QXmppSaslClient *client = QXmppSaslClient::create("X-MESSENGER-OAUTH2"); QVERIFY(client != 0); QCOMPARE(client->mechanism(), QLatin1String("X-MESSENGER-OAUTH2")); client->setPassword(QByteArray("footoken").toBase64()); // initial step returns data QByteArray response; QVERIFY(client->respond(QByteArray(), response)); QCOMPARE(response, QByteArray("footoken", 8)); // any further step is an error QVERIFY(!client->respond(QByteArray(), response)); delete client; } void tst_QXmppSasl::testServerBadMechanism() { QXmppSaslServer *server = QXmppSaslServer::create("BAD-MECH"); QVERIFY(server == 0); } void tst_QXmppSasl::testServerAnonymous() { QXmppSaslServer *server = QXmppSaslServer::create("ANONYMOUS"); QVERIFY(server != 0); QCOMPARE(server->mechanism(), QLatin1String("ANONYMOUS")); // initial step returns success QByteArray response; QCOMPARE(server->respond(QByteArray(), response), QXmppSaslServer::Succeeded); QCOMPARE(response, QByteArray()); // any further step is an error QCOMPARE(server->respond(QByteArray(), response), QXmppSaslServer::Failed); delete server; } void tst_QXmppSasl::testServerDigestMd5() { QXmppSaslDigestMd5::setNonce("OI08/m+QRm6Ma+fKOjuqVXtz40sR5u9/u5GN6sSW0rs="); QXmppSaslServer *server = QXmppSaslServer::create("DIGEST-MD5"); QVERIFY(server != 0); QCOMPARE(server->mechanism(), QLatin1String("DIGEST-MD5")); // initial step returns challenge QByteArray response; QCOMPARE(server->respond(QByteArray(), response), QXmppSaslServer::Challenge); QCOMPARE(response, QByteArray("algorithm=md5-sess,charset=utf-8,nonce=\"OI08/m+QRm6Ma+fKOjuqVXtz40sR5u9/u5GN6sSW0rs=\",qop=auth")); // password needed const QByteArray request = QByteArray("charset=utf-8,cnonce=\"AMzVG8Oibf+sVUCPPlWLR8lZQvbbJtJB9vJd+u3c6dw=\",digest-uri=\"xmpp/jabber.ru\",nc=00000001,nonce=\"OI08/m+QRm6Ma+fKOjuqVXtz40sR5u9/u5GN6sSW0rs=\",qop=auth,response=70e9063257ee2bf6bfd108975b917410,username=qxmpp1"); QCOMPARE(server->respond(request, response), QXmppSaslServer::InputNeeded); QCOMPARE(server->username(), QLatin1String("qxmpp1")); server->setPassword("qxmpp123"); // second challenge QCOMPARE(server->respond(request, response), QXmppSaslServer::Challenge); QCOMPARE(response, QByteArray("rspauth=2821a3add271b9ae02b813bed57ec878")); // success QCOMPARE(server->respond(QByteArray(), response), QXmppSaslServer::Succeeded); QCOMPARE(response, QByteArray()); // any further step is an error QCOMPARE(server->respond(QByteArray(), response), QXmppSaslServer::Failed); delete server; } void tst_QXmppSasl::testServerPlain() { QXmppSaslServer *server = QXmppSaslServer::create("PLAIN"); QVERIFY(server != 0); QCOMPARE(server->mechanism(), QLatin1String("PLAIN")); // initial step returns success QByteArray response; QCOMPARE(server->respond(QByteArray("\0foo\0bar", 8), response), QXmppSaslServer::InputNeeded); QCOMPARE(response, QByteArray()); QCOMPARE(server->username(), QLatin1String("foo")); QCOMPARE(server->password(), QLatin1String("bar")); // any further step is an error QCOMPARE(server->respond(QByteArray(), response), QXmppSaslServer::Failed); delete server; } void tst_QXmppSasl::testServerPlainChallenge() { QXmppSaslServer *server = QXmppSaslServer::create("PLAIN"); QVERIFY(server != 0); QCOMPARE(server->mechanism(), QLatin1String("PLAIN")); // initial step returns challenge QByteArray response; QCOMPARE(server->respond(QByteArray(), response), QXmppSaslServer::Challenge); QCOMPARE(response, QByteArray()); // initial step returns success QCOMPARE(server->respond(QByteArray("\0foo\0bar", 8), response), QXmppSaslServer::InputNeeded); QCOMPARE(response, QByteArray()); QCOMPARE(server->username(), QLatin1String("foo")); QCOMPARE(server->password(), QLatin1String("bar")); // any further step is an error QCOMPARE(server->respond(QByteArray(), response), QXmppSaslServer::Failed); delete server; } QTEST_MAIN(tst_QXmppSasl) #include "tst_qxmppsasl.moc" qxmpp-0.7.6/tests/qxmppsasl/qxmppsasl.pro0000644000175000007640000000011212116723562020554 0ustar sharkyjerrywebinclude(../tests.pri) TARGET = tst_qxmppsasl SOURCES += tst_qxmppsasl.cpp qxmpp-0.7.6/tests/qxmpprtppacket/0000755000175000007640000000000012116723562017043 5ustar sharkyjerrywebqxmpp-0.7.6/tests/qxmpprtppacket/tst_qxmpprtppacket.cpp0000644000175000007640000000523412116723562023530 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include #include "QXmppRtpChannel.h" class tst_QXmppRtpPacket : public QObject { Q_OBJECT private slots: void testBad(); void testSimple(); void testWithCsrc(); }; void tst_QXmppRtpPacket::testBad() { QXmppRtpPacket packet; // too short QCOMPARE(packet.decode(QByteArray()), false); QCOMPARE(packet.decode(QByteArray("\x80\x00\x3e", 3)), false); QCOMPARE(packet.decode(QByteArray("\x84\x00\x3e\xd2\x00\x00\x00\x90\x5f\xbd\x16\x9e", 12)), false); // wrong RTP version QCOMPARE(packet.decode(QByteArray("\x40\x00\x3e\xd2\x00\x00\x00\x90\x5f\xbd\x16\x9e", 12)), false); } void tst_QXmppRtpPacket::testSimple() { QByteArray data("\x80\x00\x3e\xd2\x00\x00\x00\x90\x5f\xbd\x16\x9e\x12\x34\x56", 15); QXmppRtpPacket packet; QCOMPARE(packet.decode(data), true); QCOMPARE(packet.version, quint8(2)); QCOMPARE(packet.marker, false); QCOMPARE(packet.type, quint8(0)); QCOMPARE(packet.sequence, quint16(16082)); QCOMPARE(packet.stamp, quint32(144)); QCOMPARE(packet.ssrc, quint32(1606227614)); QCOMPARE(packet.csrc, QList()); QCOMPARE(packet.payload, QByteArray("\x12\x34\x56", 3)); QCOMPARE(packet.encode(), data); } void tst_QXmppRtpPacket::testWithCsrc() { QByteArray data("\x84\x00\x3e\xd2\x00\x00\x00\x90\x5f\xbd\x16\x9e\xab\xcd\xef\x01\xde\xad\xbe\xef\x12\x34\x56", 23); QXmppRtpPacket packet; QCOMPARE(packet.decode(data), true); QCOMPARE(packet.version, quint8(2)); QCOMPARE(packet.marker, false); QCOMPARE(packet.type, quint8(0)); QCOMPARE(packet.sequence, quint16(16082)); QCOMPARE(packet.stamp, quint32(144)); QCOMPARE(packet.ssrc, quint32(1606227614)); qDebug() << packet.csrc; QCOMPARE(packet.csrc, QList() << quint32(0xabcdef01) << quint32(0xdeadbeef)); QCOMPARE(packet.payload, QByteArray("\x12\x34\x56", 3)); QCOMPARE(packet.encode(), data); } QTEST_MAIN(tst_QXmppRtpPacket) #include "tst_qxmpprtppacket.moc" qxmpp-0.7.6/tests/qxmpprtppacket/qxmpprtppacket.pro0000644000175000007640000000012412116723562022645 0ustar sharkyjerrywebinclude(../tests.pri) TARGET = tst_qxmpprtppacket SOURCES += tst_qxmpprtppacket.cpp qxmpp-0.7.6/tests/qxmppdataform/0000755000175000007640000000000012116723562016643 5ustar sharkyjerrywebqxmpp-0.7.6/tests/qxmppdataform/qxmppdataform.pro0000644000175000007640000000012212116723562022243 0ustar sharkyjerrywebinclude(../tests.pri) TARGET = tst_qxmppdataform SOURCES += tst_qxmppdataform.cpp qxmpp-0.7.6/tests/qxmppdataform/tst_qxmppdataform.cpp0000644000175000007640000000734612116723562023136 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Authors: * Andrey Batyiev * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include "QXmppDataForm.h" #include "util.h" class tst_QXmppDataForm : public QObject { Q_OBJECT private slots: void testSimple(); void testSubmit(); void testMedia(); }; void tst_QXmppDataForm::testSimple() { const QByteArray xml( "" "Joggle Search" "Fill out this form to search for information!" "" "" "" ""); QXmppDataForm form; parsePacket(form, xml); QCOMPARE(form.isNull(), false); QCOMPARE(form.title(), QLatin1String("Joggle Search")); QCOMPARE(form.instructions(), QLatin1String("Fill out this form to search for information!")); QCOMPARE(form.fields().size(), 1); QCOMPARE(form.fields().at(0).type(), QXmppDataForm::Field::TextSingleField); QCOMPARE(form.fields().at(0).isRequired(), true); QCOMPARE(form.fields().at(0).key(), QString("search_request")); serializePacket(form, xml); } void tst_QXmppDataForm::testSubmit() { const QByteArray xml( "" "" "verona" "" ""); QXmppDataForm form; parsePacket(form, xml); QCOMPARE(form.isNull(), false); serializePacket(form, xml); } void tst_QXmppDataForm::testMedia() { const QByteArray xml( "" "" "" "" "" "http://www.victim.com/challenges/ocr.jpeg?F3A6292C" "" "" "cid:sha1+f24030b8d91d233bac14777be5ab531ca3b9f102@bob.xmpp.org" "" "" "" ""); QXmppDataForm form; parsePacket(form, xml); QCOMPARE(form.isNull(), false); QCOMPARE(form.fields().size(), 1); QCOMPARE(form.fields().at(0).type(), QXmppDataForm::Field::TextSingleField); QCOMPARE(form.fields().at(0).isRequired(), false); QCOMPARE(form.fields().at(0).media().uris().size(), 2); QCOMPARE(form.fields().at(0).media().isNull(), false); QCOMPARE(form.fields().at(0).media().height(), 80); QCOMPARE(form.fields().at(0).media().width(), 290); QCOMPARE(form.fields().at(0).media().uris().at(0).first, QString("image/jpeg")); QCOMPARE(form.fields().at(0).media().uris().at(0).second, QString("http://www.victim.com/challenges/ocr.jpeg?F3A6292C")); QCOMPARE(form.fields().at(0).media().uris().at(1).first, QString("image/png")); QCOMPARE(form.fields().at(0).media().uris().at(1).second, QString("cid:sha1+f24030b8d91d233bac14777be5ab531ca3b9f102@bob.xmpp.org")); serializePacket(form, xml); } QTEST_MAIN(tst_QXmppDataForm) #include "tst_qxmppdataform.moc" qxmpp-0.7.6/tests/qxmpprpciq/0000755000175000007640000000000012116723562016164 5ustar sharkyjerrywebqxmpp-0.7.6/tests/qxmpprpciq/tst_qxmpprpciq.cpp0000644000175000007640000001464112116723562021774 0ustar sharkyjerryweb/* * Copyright (C) 2008-2012 The QXmpp developers * * Author: * Jeremy Lainé * * Source: * http://code.google.com/p/qxmpp * * This file is a part of QXmpp library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ #include #include "QXmppRpcIq.h" #include "util.h" static void checkVariant(const QVariant &value, const QByteArray &xml) { // serialise QBuffer buffer; buffer.open(QIODevice::ReadWrite); QXmlStreamWriter writer(&buffer); QXmppRpcMarshaller::marshall(&writer, value); qDebug() << "expect " << xml; qDebug() << "writing" << buffer.data(); QCOMPARE(buffer.data(), xml); // parse QDomDocument doc; QCOMPARE(doc.setContent(xml, true), true); QDomElement element = doc.documentElement(); QStringList errors; QVariant test = QXmppRpcMarshaller::demarshall(element, errors); if (!errors.isEmpty()) qDebug() << errors; QCOMPARE(errors, QStringList()); QCOMPARE(test, value); } class tst_QXmppRpcIq : public QObject { Q_OBJECT private slots: void testBase64(); void testBool(); void testDateTime(); void testDouble(); void testInt(); void testNil(); void testString(); void testArray(); void testStruct(); void testInvoke(); void testResponse(); void testResponseFault(); }; void tst_QXmppRpcIq::testBase64() { checkVariant(QByteArray("\0\1\2\3", 4), QByteArray("AAECAw==")); } void tst_QXmppRpcIq::testBool() { checkVariant(false, QByteArray("0")); checkVariant(true, QByteArray("1")); } void tst_QXmppRpcIq::testDateTime() { checkVariant(QDateTime(QDate(1998, 7, 17), QTime(14, 8, 55)), QByteArray("1998-07-17T14:08:55")); } void tst_QXmppRpcIq::testDouble() { checkVariant(double(-12.214), QByteArray("-12.214")); } void tst_QXmppRpcIq::testInt() { checkVariant(int(-12), QByteArray("-12")); } void tst_QXmppRpcIq::testNil() { checkVariant(QVariant(), QByteArray("")); } void tst_QXmppRpcIq::testString() { checkVariant(QString("hello world"), QByteArray("hello world")); } void tst_QXmppRpcIq::testArray() { checkVariant(QVariantList() << QString("hello world") << double(-12.214), QByteArray("" "hello world" "-12.214" "")); } void tst_QXmppRpcIq::testStruct() { QMap map; map["bar"] = QString("hello world"); map["foo"] = double(-12.214); checkVariant(map, QByteArray("" "" "bar" "hello world" "" "" "foo" "-12.214" "" "")); } void tst_QXmppRpcIq::testInvoke() { const QByteArray xml( "" "" "" "examples.getStateName" "" "" "6" "" "" "" "" ""); QXmppRpcInvokeIq iq; parsePacket(iq, xml); QCOMPARE(iq.method(), QLatin1String("examples.getStateName")); QCOMPARE(iq.arguments(), QVariantList() << int(6)); serializePacket(iq, xml); } void tst_QXmppRpcIq::testResponse() { const QByteArray xml( "" "" "" "" "" "Colorado" "" "" "" "" ""); QXmppRpcResponseIq iq; parsePacket(iq, xml); QCOMPARE(iq.faultCode(), 0); QCOMPARE(iq.faultString(), QString()); QCOMPARE(iq.values(), QVariantList() << QString("Colorado")); serializePacket(iq, xml); } void tst_QXmppRpcIq::testResponseFault() { const QByteArray xml( "" "" "" "" "" "" "" "faultCode" "404" "" "" "faultString" "Not found" "" "" "" "" "" "" ""); QXmppRpcResponseIq iq; parsePacket(iq, xml); QCOMPARE(iq.faultCode(), 404); QCOMPARE(iq.faultString(), QLatin1String("Not found")); QCOMPARE(iq.values(), QVariantList()); serializePacket(iq, xml); } QTEST_MAIN(tst_QXmppRpcIq) #include "tst_qxmpprpciq.moc" qxmpp-0.7.6/tests/qxmpprpciq/qxmpprpciq.pro0000644000175000007640000000011412116723562021106 0ustar sharkyjerrywebinclude(../tests.pri) TARGET = tst_qxmpprpciq SOURCES += tst_qxmpprpciq.cpp qxmpp-0.7.6/CHANGELOG0000644000175000007640000002517512116723562014042 0ustar sharkyjerrywebQXmpp 0.7.6 (Mar 9, 2013) ------------------------- - Add QXmppClient::insertExtension to insert an extension at a given index. - Disable Facebook / Google / Facebook specific mechanisms if we do not have the corresponding credentials. QXmpp 0.7.5 (Jan 11, 2013) -------------------------- - Replace toAscii/fromAscii with toLatin1/fromLatin1 for Qt 5 compatibility. - Fix build using clang in pedantic mode. QXmpp 0.7.4 (Oct 1, 2012) ------------------------- - Add XEP-0249: Direct MUC Invitations attributes to QXmppMessage. - Add XEP-0045: Multi-User Chat attributes to QXmppPresence. - Improve GuiClient, stop using deprecated APIs. - Improve QXmppServer: * Move statistics to a counter / gauge system. * Make it possible to call listenForClients and listenForServers multiple times to supported multiple IP address / ports. - Improve QXmppTransferManager: * Change third argument of QXmppTransferManager::sendFile to a description. * Enable file transfer using IPv6. * Allow StreamHost::host to contain a host name. QXmpp 0.7.3 (Sep 7, 2012) ------------------------- - Fix QXmppMucRoom::name(), only consider discovery IQs from the room. QXmpp 0.7.2 (Sep 6, 2012) ------------------------- - Handle Error replies in QXmppDiscoveryManager so that library users can know about errors. - If building with Qt 5, use Qt's QDnsLookup instead of our backport. - Improve MUC scriptability: * Add QXmppMucRoom::ban() to ban users. * Add QXmppMucRoom::name() to get the room's human-readable name. * Add QXmppMucRoom::participantFullJid() to lookup an occupant full JID. - With Qt >= 4.8, verify peer SSL certificate against domain name as specified by RFC 3920. - Add support for X-OAUTH2 authentication for Google Talk. - Add links to RFCs in generated HTML documentation. QXmpp 0.7.1 (Sep 3, 2012) ------------------------- - Fix export of QXmppVCardPhone class. QXmpp 0.7.0 (Sep 3, 2012) ------------------------- - New XEPs: * XEP-0033: Extended Stanza Addressing - Remove deprecated APIs: * QXmppRosterManager::rosterChanged() * QXmppConfiguration::sASLAuthMechanism() - Improve vCard support: * Add support for free-form descriptive text. * Make it possible to have several addresses. * Make it possible to have several e-mail addresses. * Make it possible to have several phone numbers. - Make it possible to set the client's extended information form (XEP-0128). - Make sure QXmppDiscoveryManager only emits results. - Fix XEP-0115 verification strings (remove duplicate features, sort form values) - Fix issues: * Issue 144: QXmppBookmarkConference autojoin parsing - Add support for see-other-host server change. - Add support for X-MESSENGER-OAUTH2 authentication for Windows Live Messenger. - Make it possible to disable non-SASL authentication. - Add QXmppClient::isAuthenticated() to query whether authentication has been performed. QXmpp 0.6.3 (Jul 24, 2012) -------------------------- - Fix regression in X-FACEBOOK-PLATFORM authentication. QXmpp 0.6.2 (Jul 22, 2012) -------------------------- - New XEPs * XEP-0071: XHTML-IM - Improve SASL code test coverage. - Improve QXmppMessage test coverage. - Add a "reason" argument to QXmppRosterManager's subscription methods. - Refactor QXmppPresence: * add availableStatusType(), priority(), statusText() * deprecate QXmppPresence::Status - Remove deprecated QXmppRosterManager::removeRosterEntry(). QXmpp 0.6.1 (Jul 20, 2012) -------------------------- - New XEPs * XEP-0221: Data Forms Media Element - Fix data form title/instructions XML serialization. - Remove confusing QXmppPresence::Status::Offline status type. - Deprecate QXmppConfiguration::setSASLAuthMechanism(), replaced by the string-based QXmppConfiguration::setSaslAuthMechanism(). - Fix issues: * Issue 111: QXmppPresence::Status::getTypeStr() gives warning if type is invisible * Issue 126: Modularize SASL mechanisms QXmpp 0.5.0 (Jul 18, 2012) -------------------------- - New XEPs * XEP-0059: Result Set Management - Build a shared library by default. - Advertise support for XEP-0249: Direct MUC Invitations - Make QXmppTransferManager fully asynchronous. - Remove QXmppPacket class. - Move utility methods to a QXmppUtils class. - Remove QXmppReconnectionManager, QXmppClient handles reconnections. - Improve QXmppArchiveManager to allow paginated navigation (Olivier Goffart). - Only emit QXmppVersionManager::versionReceived() for results. - Remove deprecated QXmppClient::discoveryIqReceived() signal. - Fix issues: * Issue 64: Compile qxmpp as shared library by default * Issue 79: Export classes for Visual C++ Compiler * Issue 140: Proper XEP-0115 ver string generation with dataforms * Issue 142: qxmpp does not build in Qt5 QXmpp 0.4.0 (Apr 12, 2012) -------------------------- - New XEPs * XEP-0048: Bookmarks * XEP-0184: Message Delivery Receipts * XEP-0224: Attention - Remove deprecated "get*" getter accessors from: QXmppClient QXmppConfiguration QXmppMessage QXmppPresence QXmppIq QXmppStanza QXmppVCardIq QXmppRosterIq - Remove deprecated headers: * QXmppRoster.h * QXmppVCard.h - Add TURN support for VoIP calls to use a relay in double-NAT network topologies. - Overhaul Multi-User Chat support to make it easier and more fully featured. - Improve QXmppServer packet routing performance. - Add support for X-FACEBOOK-PLATFORM SASL method. - Improve XEP-0136 support to enable archive deletion. - Set default keep-alive timeout to 20 seconds, enables detection of broken connections. - Make install path configurable using the PREFIX variable instead of Qt's installation path. - Make it possible to build a shared library by invoking "qmake QXMPP_LIBRARY_TYPE=lib". - Fix issues: * Issue 95: Patch for several utility methods in RosterManager * Issue 103: Does not compile for Symbian^3 with NokiaQtSDK 1.1 Beta * Issue 105: Initial presence is set before the roster request * Issue 106: QXmppClient can't override Qt's set of trusted SSL CAs * Issue 109: Patch for XEP-0224 (Attention) * Issue 113: qxmpp.pc sets incorrect include path * Issue 116: sessionStarted not set for non-SASL connections * Issue 119: ICE negotiation time out after successful ICE check * Issue 120: QXmppIceComponent doesn't accept interfaces with 255.255.255.255 netmask as a local candidate * Issue 132: [FreeBSD]: build error * Issue 135: qxmpp won't reconnect when disconnected QXmpp 0.3.0 (Mar 05, 2011) ------------------------ - New XEPs * XEP-0153: vCard-Based Avatars * XEP-0202: Entity Time - New Classes * QXmppClientExtension: base class for QXmppClient extensions (managers) * QXmppServer: base class for building XMPP servers * QXmppServerExtension: base class for QXmppServer extensions * QXmppDiscoveryManager: manager class for XEP-0030: Service Discovery * QXmppVersionManager: manager class for XEP-0092: Software Version * QXmppIceConnection: class representing an Interactive Connectivity Establishment (ICE) over UDP "connection" * QXmppRtpChannel: class representing an RTP audio channel for VoIP calls - Refactor QXmppVCardManager to use QXmppClientExtension - New Examples * example_9_vCard: vCard handling example * GuiClient: Graphical chat client, test bench for QXmpp functionalities - Deprecation * QXmppVCard class name changed to QXmppVCardIq * Signal QXmppClient::discoveryIqReceived in favour of QXmppDiscoveryManager::infoReceived and QXmppDiscoveryManager::itemsReceived - Removal Extensions QXmppArchiveManager, QXmppMucManager, QXmppCallManager, QXmppTransferManager will not load by default. Therefore following functions to provide the reference have been removed. QXmppClient::transferManager() QXmppClient::archiveManager() QXmppClient::callManager() QXmppClient::mucManager() Note: Once should use QXmppClient::addExtension() and QXmppClient::findExtension() to load or enable these extensions. - Add support for DNS SRV lookups, meaning you can connect to nearly all servers using only a JID and a password. - Improve support for SASL authentication, with a verification of the second challenge message sent by the server. - Add support for the birthday and URL attributes in vCards. - Improve STUN support for VoIP calls by detecting server-reflexive address. - Add QXMPP_VERSION and QXmppVersion() for compile and run time version checks. - Improve code documentation coverage and quality. - Remove dependency on QtGui, making it easier to write console applications. - Fix MSVC 2005 and 2008 build issues. - Fix Symbian build issues, add DNS SRV support for Symbian devices. QXmpp 0.2.0 (Aug 22, 2010) -------------------------- - New XEPs * XEP-0030: Service Discovery * XEP-0045: Multi-User Chat * XEP-0047: In-Band Bytestreams * XEP-0054: vcard-temp * XEP-0065: SOCKS5 Bytestreams * XEP-0078: Non-SASL Authentication * XEP-0082: XMPP Date and Time Profiles * XEP-0085: Chat State Notifications * XEP-0091: Legacy Delayed Delivery * XEP-0092: Software Version * XEP-0095: Stream Initiation * XEP-0096: SI File Transfer * XEP-0115: Entity Capabilities * XEP-0128: Service Discovery Extensions * XEP-0166: Jingle * XEP-0167: Jingle RTP Sessions * XEP-0199: XMPP Ping * XEP-0203: Delayed Delivery * XEP-0009: Jabber-RPC * XEP-0004: Data Forms - New XEPs (Initial Support) * XEP-0136: Message Archiving * XEP-0176: Jingle ICE-UDP Transport Method [Experimental] - New authentication schemes * DIGEST-MD5 * SASL * NonSASL * Anonymous - Add doxygen documentation - Add targets in *.pro file for packaging, installing and generating documentation - Use QXmlStreamWriter while creating stanzas to be sent to the server - Clean up getter accessors from "getFoo" to "foo" - Add proper file transfer management - Add support for keep-alive pings - Report authentication errors - Automatic reconnection mechanism - Test suite for stanza parsing/serialisation - Refactor the logging code - Add proxy support - Fixed compile time warning messages - New examples - Support for attaching an extension element to messages and presences (QXmppElement) - Move parsing to the stanzas itself QXmppStanza::parse() - QXMPP_NO_GUI define to remove dependency on QtGui - Change QXmppRoster to QXmppRosterManager to have a consistent API QXmpp 0.1 (Jun 14, 2009) ------------------------ - First public release qxmpp-0.7.6/README0000644000175000007640000000727012116723562013504 0ustar sharkyjerrywebABOUT QXMPP ----------- QXmpp is cross-platform C++ client library for XMPP. It is based on Qt. QXmpp is released under the terms of the GNU Lesser General Public License, version 2.1 or later. BUILDING QXMPP -------------- You need to have Qt 4.5 or higher (with SSL enabled) to build the QXmpp. The project uses qmake build system of Qt. Building from the command line: cd qmake You can pass the following arguments to qmake: PREFIX= to change the install prefix default: unix: /usr/local on unix other: $$[QT_INSTALL_PREFIX] QXMPP_AUTOTEST_INTERNAL=1 to enabled internal autotests QXMPP_LIBRARY_TYPE=staticlib to build a static version of QXmpp QXMPP_USE_SPEEX=1 to enable speex audio codec QXMPP_USE_THEORA=1 to enable theora video codec QXMPP_USE_VPX=1 to enable vpx video codec Note: by default QXmpp is built as a shared library. If you decide to build a static library instead, you will need to pass -DQXMPP_STATIC when building your programs against QXmpp. Building using Qt Creator: Open the qxmpp.pro file in Qt Creator and hit "Build All" to build all the examples and library. INSTALLING QXMPP -------------- After building QXmpp the you can install the Headers, Libraries and Documentation using the following command: Installing from the command line: install Path of installations: Headers: PREFIX/include/qxmpp Library: PREFIX/lib API Documentation: PREFIX/share/doc/qxmpp To link against the shared version of QXmpp, you need to add -DQXMPP_SHARED to your C++ flags. EXAMPLES -------- Look at the example directory for various examples. * example_0_connected This example just connects to the xmpp server and start receiving presences (updates) from the server. After running this example, you can see this user online, if it's added in your roster (friends list). * example_1_echoClient This is a very simple bot which echoes the message sent to it. Run this example, send it a message from a friend of this bot and you will receive the message back. This example shows how to receive and send messages. * GuiClient This is a full fledged Graphical XMPP client. This example will uses most of the part of this library. DOCUMENTATION ------------- You can find information about QXmpp, on the project homepage: http://code.google.com/p/qxmpp SUPPORTED PLATFORMS ------------------- For this release, the following platforms have been tested: win32-g++ (Qt SDK) win32-msvc2008 (Qt MSVC-2008) win64-msvc2008 (Qt MSVC-2008) symbian-gcce (Nokia Qt SDK) linux-g++ (32-bit and 64-bit) macos-g++ (32-bit and 64-bit) It should work on all the plaforms supported by Qt. For a complete list of platforms support by Qt, see: http://qt-project.org/doc/supported-platforms.html Please note that on Symbian, you will need to make sure your add the "NetworkServices" to your application to enable it to access the network. You can do this by adding the following to your .pro file: TARGET.CAPABILITY = "NetworkServices" HOW TO REPORT A BUG ------------------- If you think you have found a bug in QXmpp, we would like to hear about it so that we can fix it. Before reporting a bug, please check if the issue is already know at: http://code.google.com/p/qxmpp/issues/ DISCUSSION GROUP ------------------- Join QXmpp Discussion Group for queries, discussions and updates. http://groups.google.com/group/qxmpp