18 #include "discohandler.h"
19 #include "disconodehandler.h"
20 #include "presencehandler.h"
21 #include "iqhandler.h"
22 #include "messagehandler.h"
23 #include "mucroomhandler.h"
24 #include "mucroomconfighandler.h"
33 class MUCMessageSession;
130 void setPassword(
const std::string& password ) { m_password = password; }
136 const std::string
name()
const {
return m_nick.username(); }
143 const std::string
service()
const {
return m_nick.server(); }
149 const std::string
nick()
const {
return m_nick.resource(); }
160 void leave(
const std::string& msg =
"" );
166 void send(
const std::string& message );
174 void setSubject(
const std::string& subject );
194 void setNick(
const std::string& nick );
202 void setPresence(
Presence presence,
const std::string& msg =
"" );
211 void invite(
const JID& invitee,
const std::string& reason,
bool cont =
false );
236 void setPublish(
bool publish,
bool publishNick );
272 void addHistory(
const std::string& message,
const JID& from,
const std::string& stamp );
284 void setRequestHistory(
int value, HistoryRequestType type );
294 void setRequestHistory(
const std::string& since );
303 static Stanza* declineInvitation(
const JID& room,
const JID& invitor,
304 const std::string& reason =
"");
320 void kick(
const std::string& nick,
const std::string& reason =
"" );
331 void ban(
const std::string& nick,
const std::string& reason );
342 void grantVoice(
const std::string& nick,
const std::string& reason );
363 void revokeVoice(
const std::string& nick,
const std::string& reason );
372 void setRole(
const std::string& nick,
MUCRoomRole role,
const std::string& reason =
"" );
382 const std::string& reason );
391 void requestRoomConfig();
400 void setRoomConfig(
DataForm* form );
407 void acknowledgeInstantRoom();
413 void cancelRoomCreation();
424 void destroy(
const std::string& reason =
"",
425 const JID* alternate = 0,
const std::string& password =
"" );
472 int flags()
const {
return m_flags; }
475 virtual void handleDiscoInfoResult(
Stanza *stanza,
int context );
478 virtual void handleDiscoItemsResult(
Stanza *stanza,
int context );
481 virtual void handleDiscoError(
Stanza *stanza,
int context );
484 virtual void handlePresence(
Stanza *stanza );
490 virtual bool handleIq(
Stanza* ) {
return false; }
493 virtual bool handleIqID( Stanza *stanza,
int context );
496 virtual StringList handleDiscoNodeFeatures(
const std::string& node );
499 virtual StringMap handleDiscoNodeIdentities(
const std::string& node, std::string& name );
505 void setName(
const std::string& name ) { m_nick.setUsername( name ); }
506 virtual bool instantRoomHook()
const {
return false; }
508 ClientBase *m_parent;
514 bool handleIqResult( Stanza *stanza,
int context );
515 bool handleIqError( Stanza *stanza,
int context );
516 void setNonAnonymous();
517 void setSemiAnonymous();
518 void setFullyAnonymous();
519 void modifyOccupant(
const std::string& nick,
int state,
const std::string roa,
520 const std::string& reason );
521 void acknowledgeRoomCreation();
523 MUCRoomRole getEnumRole(
const std::string& role );
525 MUCRoomHandler *m_roomHandler;
526 MUCRoomConfigHandler *m_roomConfigHandler;
527 MUCMessageSession *m_session;
529 typedef std::list<MUCRoomParticipant> ParticipantList;
530 ParticipantList m_participants;
532 std::string m_password;
533 std::string m_newNick;
538 HistoryRequestType m_historyType;
540 std::string m_historySince;
543 bool m_creationInProgress;
544 bool m_configChanged;
553 #endif // MUCROOM_H__