summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/MUC/MUC.h')
m---------Swiften0
-rw-r--r--Swiften/MUC/MUC.h59
2 files changed, 0 insertions, 59 deletions
diff --git a/Swiften b/Swiften
new file mode 160000
+Subproject 8213ba16d0043d2461f4b031c881d61dda5a38c
diff --git a/Swiften/MUC/MUC.h b/Swiften/MUC/MUC.h
deleted file mode 100644
index 1ef974f..0000000
--- a/Swiften/MUC/MUC.h
+++ /dev/null
@@ -1,59 +0,0 @@
-#pragma once
-
-#include "Swiften/JID/JID.h"
-#include "Swiften/Base/String.h"
-#include "Swiften/Elements/Message.h"
-#include "Swiften/Elements/Presence.h"
-#include "Swiften/MUC/MUCOccupant.h"
-
-#include <boost/shared_ptr.hpp>
-#include <boost/signals.hpp>
-#include <boost/signals/connection.hpp>
-
-#include <map>
-
-namespace Swift {
- class StanzaChannel;
- class PresenceSender;
-
- class MUC {
- public:
- enum JoinResult { JoinSucceeded, JoinFailed };
- enum LeavingType { Part };
-
- public:
- MUC(StanzaChannel* stanzaChannel, PresenceSender* presenceSender, const JID &muc);
-
- void joinAs(const String &nick);
- String getCurrentNick();
- void part();
- void handleIncomingMessage(boost::shared_ptr<Message> message);
-
- public:
- boost::signal<void (JoinResult)> onJoinComplete;
- boost::signal<void (boost::shared_ptr<Presence>)> onOccupantPresenceChange;
- boost::signal<void (const MUCOccupant&)> onOccupantJoined;
- /**Occupant, type, and reason. */
- boost::signal<void (const MUCOccupant&, LeavingType, const String&)> onOccupantLeft;
-
- private:
- bool isFromMUC(const JID& j) const {
- return ownMUCJID.equals(j, JID::WithoutResource);
- }
-
- const String& getOwnNick() const {
- return ownMUCJID.getResource();
- }
-
- private:
- void handleIncomingPresence(boost::shared_ptr<Presence> presence);
-
- private:
- JID ownMUCJID;
- StanzaChannel* stanzaChannel;
- PresenceSender* presenceSender;
- std::map<String, MUCOccupant> occupants;
- bool firstPresenceSeen;
- boost::bsignals::scoped_connection scopedConnection_;
- };
-}