Public Types | Public Member Functions | Public Attributes

Swift::MUC Class Reference

Collaboration diagram for Swift::MUC:

List of all members.

Public Types

enum  JoinResult { JoinSucceeded, JoinFailed }
enum  LeavingType {
  LeavePart, LeaveKick, LeaveBan, LeaveDestroy,
  LeaveNotMember, Disconnect
}
typedef boost::shared_ptr< MUCref

Public Member Functions

 MUC (StanzaChannel *stanzaChannel, IQRouter *iqRouter, DirectedPresenceSender *presenceSender, const JID &muc, MUCRegistry *mucRegistry)
JID getJID () const
 Returns the (bare) JID of the MUC.
void joinAs (const std::string &nick)
void joinWithContextSince (const std::string &nick, const boost::posix_time::ptime &since)
std::string getCurrentNick ()
void part ()
void handleIncomingMessage (Message::ref message)
void handleUserLeft (LeavingType)
 Expose public so it can be called when e.g.
const MUCOccupantgetOccupant (const std::string &nick)
 Get occupant information.
bool hasOccupant (const std::string &nick)
void kickOccupant (const JID &jid)
void changeOccupantRole (const JID &jid, MUCOccupant::Role role)
void requestAffiliationList (MUCOccupant::Affiliation)
void changeAffiliation (const JID &jid, MUCOccupant::Affiliation affiliation)
void changeSubject (const std::string &subject)
void requestConfigurationForm ()
void configureRoom (Form::ref)
void cancelConfigureRoom ()
void destroyRoom ()
void invitePerson (const JID &person, const std::string &reason="")
 Send an invite for the person to join the MUC.
void setCreateAsReservedIfNew ()
void setPassword (const boost::optional< std::string > &password)

Public Attributes

boost::signal< void(const
std::string &)> 
onJoinComplete
boost::signal< void(ErrorPayload::ref)> onJoinFailed
boost::signal< void(ErrorPayload::ref,
const JID &, MUCOccupant::Role)> 
onRoleChangeFailed
boost::signal< void(ErrorPayload::ref,
const JID
&, MUCOccupant::Affiliation)> 
onAffiliationChangeFailed
boost::signal< void(ErrorPayload::ref)> onConfigurationFailed
boost::signal< void(ErrorPayload::ref)> onAffiliationListFailed
boost::signal< void(Presence::ref)> onOccupantPresenceChange
boost::signal< void(const
std::string &, const
MUCOccupant &, const
MUCOccupant::Role &)> 
onOccupantRoleChanged
boost::signal< void(const
std::string &, const
MUCOccupant::Affiliation
&, const
MUCOccupant::Affiliation &)> 
onOccupantAffiliationChanged
boost::signal< void(const
MUCOccupant &)> 
onOccupantJoined
boost::signal< void(const
MUCOccupant &, LeavingType,
const std::string &)> 
onOccupantLeft
boost::signal< void(Form::ref)> onConfigurationFormReceived
boost::signal< void(MUCOccupant::Affiliation,
const std::vector< JID > &)> 
onAffiliationListReceived

Detailed Description

Definition at line 23 of file MUC.h.


Member Typedef Documentation

typedef boost::shared_ptr<MUC> Swift::MUC::ref

Definition at line 25 of file MUC.h.


Member Enumeration Documentation

Enumerator:
JoinSucceeded 
JoinFailed 

Definition at line 27 of file MUC.h.

Enumerator:
LeavePart 
LeaveKick 
LeaveBan 
LeaveDestroy 
LeaveNotMember 
Disconnect 

Definition at line 28 of file MUC.h.


Constructor & Destructor Documentation

Swift::MUC::MUC ( StanzaChannel stanzaChannel,
IQRouter iqRouter,
DirectedPresenceSender presenceSender,
const JID muc,
MUCRegistry mucRegistry 
)

Member Function Documentation

void Swift::MUC::cancelConfigureRoom (  ) 
void Swift::MUC::changeAffiliation ( const JID jid,
MUCOccupant::Affiliation  affiliation 
)
void Swift::MUC::changeOccupantRole ( const JID jid,
MUCOccupant::Role  role 
)
void Swift::MUC::changeSubject ( const std::string &  subject  ) 
void Swift::MUC::configureRoom ( Form::ref   ) 
void Swift::MUC::destroyRoom (  ) 
std::string Swift::MUC::getCurrentNick (  ) 
JID Swift::MUC::getJID (  )  const [inline]

Returns the (bare) JID of the MUC.

Definition at line 36 of file MUC.h.

const MUCOccupant& Swift::MUC::getOccupant ( const std::string &  nick  ) 

Get occupant information.

void Swift::MUC::handleIncomingMessage ( Message::ref  message  ) 
void Swift::MUC::handleUserLeft ( LeavingType   ) 

Expose public so it can be called when e.g.

user goes offline

bool Swift::MUC::hasOccupant ( const std::string &  nick  ) 
void Swift::MUC::invitePerson ( const JID person,
const std::string &  reason = "" 
)

Send an invite for the person to join the MUC.

void Swift::MUC::joinAs ( const std::string &  nick  ) 
void Swift::MUC::joinWithContextSince ( const std::string &  nick,
const boost::posix_time::ptime &  since 
)
void Swift::MUC::kickOccupant ( const JID jid  ) 
void Swift::MUC::part (  ) 
void Swift::MUC::requestAffiliationList ( MUCOccupant::Affiliation   ) 
void Swift::MUC::requestConfigurationForm (  ) 
void Swift::MUC::setCreateAsReservedIfNew (  )  [inline]

Definition at line 63 of file MUC.h.

void Swift::MUC::setPassword ( const boost::optional< std::string > &  password  ) 

Member Data Documentation

Definition at line 70 of file MUC.h.

Definition at line 72 of file MUC.h.

boost::signal<void (MUCOccupant::Affiliation, const std::vector<JID>&)> Swift::MUC::onAffiliationListReceived

Definition at line 79 of file MUC.h.

Definition at line 71 of file MUC.h.

Definition at line 78 of file MUC.h.

boost::signal<void (const std::string& )> Swift::MUC::onJoinComplete

Definition at line 67 of file MUC.h.

Definition at line 68 of file MUC.h.

boost::signal<void (const std::string&, const MUCOccupant::Affiliation& , const MUCOccupant::Affiliation& )> Swift::MUC::onOccupantAffiliationChanged

Definition at line 75 of file MUC.h.

boost::signal<void (const MUCOccupant&)> Swift::MUC::onOccupantJoined

Definition at line 76 of file MUC.h.

boost::signal<void (const MUCOccupant&, LeavingType, const std::string& )> Swift::MUC::onOccupantLeft

Definition at line 77 of file MUC.h.

Definition at line 73 of file MUC.h.

boost::signal<void (const std::string&, const MUCOccupant& , const MUCOccupant::Role& )> Swift::MUC::onOccupantRoleChanged

Definition at line 74 of file MUC.h.

Definition at line 69 of file MUC.h.