diff options
author | Kevin Smith <git@kismith.co.uk> | 2010-05-22 20:45:53 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2010-05-23 08:15:20 (GMT) |
commit | a68530cbbfeb17e01fd684b1ef41b960bc173f66 (patch) | |
tree | 98b5cd195f04d781164cf1394cee9092bb7b2497 /Swiften/MUC/MUC.h | |
parent | c9659b556b932e2f887cf1d8ab6c5a0bead835eb (diff) | |
download | swift-contrib-a68530cbbfeb17e01fd684b1ef41b960bc173f66.zip swift-contrib-a68530cbbfeb17e01fd684b1ef41b960bc173f66.tar.bz2 |
Implement XEP-0045 joining, and appropriate error handling.
Resolves: #211
Diffstat (limited to 'Swiften/MUC/MUC.h')
-rw-r--r-- | Swiften/MUC/MUC.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Swiften/MUC/MUC.h b/Swiften/MUC/MUC.h index e306f11..fc691f1 100644 --- a/Swiften/MUC/MUC.h +++ b/Swiften/MUC/MUC.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010 Remko Tronçon + * Copyright (c) 2010 Kevin Smith * Licensed under the GNU General Public License v3. * See Documentation/Licenses/GPLv3.txt for more information. */ @@ -25,10 +25,7 @@ namespace Swift { class MUC { public: enum JoinResult { JoinSucceeded, JoinFailed }; - enum LeavingType { Part }; - enum Roles {Moderator, Participant, Visitor, NoRole}; - enum Affiliations {Owner, Admin, Member, Outcast, NoAffiliation}; - + enum LeavingType { Part }; public: MUC(StanzaChannel* stanzaChannel, PresenceSender* presenceSender, const JID &muc); @@ -41,8 +38,11 @@ namespace Swift { void handleIncomingMessage(boost::shared_ptr<Message> message); public: - boost::signal<void (JoinResult)> onJoinComplete; + boost::signal<void (const String& /*nick*/)> onJoinComplete; + boost::signal<void (boost::shared_ptr<ErrorPayload>)> onJoinFailed; boost::signal<void (boost::shared_ptr<Presence>)> onOccupantPresenceChange; + boost::signal<void (const String&, const MUCOccupant::Role& /*new*/, const MUCOccupant::Role& /*old*/)> onOccupantRoleChanged; + boost::signal<void (const String&, const MUCOccupant::Affiliation& /*new*/, const MUCOccupant::Affiliation& /*old*/)> onOccupantAffiliationChanged; boost::signal<void (const MUCOccupant&)> onOccupantJoined; boost::signal<void (const MUCOccupant&, LeavingType, const String& /*reason*/)> onOccupantLeft; /* boost::signal<void (const MUCInfo&)> onInfoResult; */ @@ -66,7 +66,7 @@ namespace Swift { StanzaChannel* stanzaChannel; PresenceSender* presenceSender; std::map<String, MUCOccupant> occupants; - bool firstPresenceSeen; + bool joinComplete_; boost::bsignals::scoped_connection scopedConnection_; }; } |