• Main Page
  • Classes
  • Files
  • File List

Swiften/Elements/MUCOccupant.h

00001 /*
00002  * Copyright (c) 2010 Kevin Smith
00003  * Licensed under the GNU General Public License v3.
00004  * See Documentation/Licenses/GPLv3.txt for more information.
00005  */
00006 
00007 #pragma once
00008 
00009 #include <boost/optional.hpp>
00010 #include <string>
00011 
00012 #include <Swiften/Base/API.h>
00013 #include <Swiften/JID/JID.h>
00014 
00015 namespace Swift {
00016   class Client;
00017 
00018   class SWIFTEN_API MUCOccupant {
00019     public:
00020       enum Role {Moderator, Participant, Visitor, NoRole};
00021       enum Affiliation {Owner, Admin, Member, Outcast, NoAffiliation};
00022 
00023       MUCOccupant(const std::string &nick, Role role, Affiliation affiliation);
00024       MUCOccupant(const MUCOccupant& other);
00025       ~MUCOccupant();
00026 
00027       std::string getNick() const;
00028       Role getRole() const;
00029       Affiliation getAffiliation() const;
00030       boost::optional<JID> getRealJID() const;
00031       void setRealJID(const JID& jid);
00032       void setNick(const std::string& nick);
00033 
00034     private:
00035       std::string nick_;
00036       Role role_;
00037       Affiliation affiliation_;
00038       boost::optional<JID> realJID_;
00039       /* If you add a field, remember to update the const copy constructor */
00040   };
00041 }
00042 

Generated on Fri Oct 12 2012 21:00:19 for Swiften by  doxygen 1.7.1