From 3c2674ca72a5c7249357885d4a2e0b7944b5dc5e Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Wed, 23 Jun 2010 09:29:08 +0000 Subject: initial integration of QXmppMucManager --- source/QXmppClient.cpp | 12 +++++++++++- source/QXmppClient.h | 7 +++++++ 2 files changed, 18 insertions(+), 1 deletion(-) (limited to 'source') diff --git a/source/QXmppClient.cpp b/source/QXmppClient.cpp index 4e3f9267..fc93ba88 100644 --- a/source/QXmppClient.cpp +++ b/source/QXmppClient.cpp @@ -29,8 +29,9 @@ #include "QXmppMessage.h" #include "QXmppArchiveManager.h" -#include "QXmppReconnectionManager.h" #include "QXmppInvokable.h" +#include "QXmppMucManager.h" +#include "QXmppReconnectionManager.h" #include "QXmppRpcIq.h" #include "QXmppRemoteMethod.h" #include "QXmppUtils.h" @@ -94,6 +95,7 @@ QXmppClient::QXmppClient(QObject *parent) // create managers m_roster = new QXmppRoster(m_stream, this); m_archiveManager = new QXmppArchiveManager(m_stream, this); + m_mucManager = new QXmppMucManager(m_stream, this); m_transferManager = new QXmppTransferManager(m_stream, this); m_vCardManager = new QXmppVCardManager(m_stream, this); } @@ -528,6 +530,14 @@ QXmppArchiveManager& QXmppClient::getArchiveManager() return *m_archiveManager; } +/// Returns the reference to QXmppMucManager, implementation of XEP-0045. +/// http://xmpp.org/extensions/xep-045.html +/// +QXmppMucManager& QXmppClient::mucManager() +{ + return *m_mucManager; +} + /// Returns the reference to QXmppTransferManager, implementation of: /// /// * XEP-0047: In-Band Bytestreams diff --git a/source/QXmppClient.h b/source/QXmppClient.h index 321e9d15..f87656a8 100644 --- a/source/QXmppClient.h +++ b/source/QXmppClient.h @@ -38,6 +38,7 @@ class QXmppPresence; class QXmppMessage; class QXmppPacket; class QXmppIq; +class QXmppMucManager; class QXmppRoster; class QXmppReconnectionManager; class QXmppVCardManager; @@ -100,6 +101,11 @@ public: const QXmppPresence& initialPresence = QXmppPresence()); void disconnect(); + + QXmppMucManager& mucManager(); + + // FIXME : these accessors should be deprecated in favour of + // versions without the "get". QXmppRoster& getRoster(); QXmppConfiguration& getConfiguration(); const QXmppConfiguration& getConfiguration() const; @@ -217,6 +223,7 @@ private: ///< TCP socket and XMPP protocol QXmppPresence m_clientPresence; ///< Stores the current presence of the connected client QXmppArchiveManager *m_archiveManager; ///< Pointer to the archive manager + QXmppMucManager* m_mucManager; ///< Pointer to the multi-user chat manager QXmppReconnectionManager* m_reconnectionManager; ///< Pointer to the reconnection manager QXmppRoster *m_roster; ///< Pointer to the roster manager QXmppTransferManager *m_transferManager;///< Pointer to the transfer manager -- cgit v1.2.3