mucroomhandler.h
/*
Copyright (c) 2006-2023 by Jakob Schröter <js@camaya.net>
This file is part of the gloox library. http://camaya.net/gloox
This software is distributed under a license. The full license
agreement can be found in the file LICENSE in this distribution.
This software may not be copied, modified, sold or distributed
other than expressed in the named license agreement.
This software is distributed without any warranty.
*/
#ifndef MUCROOMHANDLER_H__
#define MUCROOMHANDLER_H__
#include "gloox.h"
#include "presence.h"
#include "disco.h"
#include <string>
namespace gloox
{
class JID;
class MUCRoom;
class Message;
class DataForm;
struct MUCRoomParticipant
{
JID* nick;
MUCRoomAffiliation affiliation;
MUCRoomRole role;
JID* jid;
int flags;
std::string reason;
JID* actor;
std::string newNick;
std::string status;
JID* alternate;
};
class GLOOX_API MUCRoomHandler
{
public:
virtual ~MUCRoomHandler() {}
virtual void handleMUCParticipantPresence( MUCRoom* room, const MUCRoomParticipant participant,
const Presence& presence ) = 0;
virtual void handleMUCMessage( MUCRoom* room, const Message& msg, bool priv ) = 0;
virtual bool handleMUCRoomCreation( MUCRoom* room ) = 0;
virtual void handleMUCSubject( MUCRoom* room, const std::string& nick,
const std::string& subject ) = 0;
virtual void handleMUCInviteDecline( MUCRoom* room, const JID& invitee,
const std::string& reason ) = 0;
virtual void handleMUCError( MUCRoom* room, StanzaError error ) = 0;
virtual void handleMUCInfo( MUCRoom* room, int features, const std::string& name,
const DataForm* infoForm ) = 0;
virtual void handleMUCItems( MUCRoom* room, const Disco::ItemList& items ) = 0;
};
}
#endif// MUCROOMHANDLER_H__
gloox::DataForm
An abstraction of a XEP-0004 Data Form.
Definition dataform.h:57
gloox::Disco::ItemList
std::list< Item * > ItemList
Definition disco.h:266
gloox::JID
An abstraction of a JID.
Definition jid.h:31
gloox::MUCRoomHandler
This interface enables inheriting classes to be notified about certain events in a MUC room.
Definition mucroomhandler.h:91
gloox::MUCRoomHandler::handleMUCParticipantPresence
virtual void handleMUCParticipantPresence(MUCRoom *room, const MUCRoomParticipant participant, const Presence &presence)=0
gloox::MUCRoomHandler::handleMUCInfo
virtual void handleMUCInfo(MUCRoom *room, int features, const std::string &name, const DataForm *infoForm)=0
gloox::MUCRoomHandler::handleMUCMessage
virtual void handleMUCMessage(MUCRoom *room, const Message &msg, bool priv)=0
gloox::MUCRoomHandler::handleMUCSubject
virtual void handleMUCSubject(MUCRoom *room, const std::string &nick, const std::string &subject)=0
gloox::MUCRoomHandler::~MUCRoomHandler
virtual ~MUCRoomHandler()
Definition mucroomhandler.h:96
gloox::MUCRoomHandler::handleMUCInviteDecline
virtual void handleMUCInviteDecline(MUCRoom *room, const JID &invitee, const std::string &reason)=0
gloox::MUCRoomHandler::handleMUCError
virtual void handleMUCError(MUCRoom *room, StanzaError error)=0
gloox::MUCRoomHandler::handleMUCItems
virtual void handleMUCItems(MUCRoom *room, const Disco::ItemList &items)=0
gloox::MUCRoomHandler::handleMUCRoomCreation
virtual bool handleMUCRoomCreation(MUCRoom *room)=0
gloox::MUCRoom
This is an implementation of XEP-0045 (Multi-User Chat).
Definition mucroom.h:87
gloox::Message
An abstraction of a message stanza.
Definition message.h:34
gloox::Presence
An abstraction of a presence stanza.
Definition presence.h:33
gloox
The namespace for the gloox library.
Definition adhoc.cpp:28
gloox::MUCRoomRole
MUCRoomRole
Definition gloox.h:1164
gloox::StanzaError
StanzaError
Definition gloox.h:872
gloox::MUCRoomAffiliation
MUCRoomAffiliation
Definition gloox.h:1151
gloox::MUCRoomParticipant
Definition mucroomhandler.h:36
gloox::MUCRoomParticipant::nick
JID * nick
Definition mucroomhandler.h:37
gloox::MUCRoomParticipant::role
MUCRoomRole role
Definition mucroomhandler.h:44
gloox::MUCRoomParticipant::jid
JID * jid
Definition mucroomhandler.h:45
gloox::MUCRoomParticipant::status
std::string status
Definition mucroomhandler.h:72
gloox::MUCRoomParticipant::affiliation
MUCRoomAffiliation affiliation
Definition mucroomhandler.h:43
gloox::MUCRoomParticipant::alternate
JID * alternate
Definition mucroomhandler.h:74
gloox::MUCRoomParticipant::reason
std::string reason
Definition mucroomhandler.h:54
gloox::MUCRoomParticipant::flags
int flags
Definition mucroomhandler.h:49
gloox::MUCRoomParticipant::actor
JID * actor
Definition mucroomhandler.h:57
gloox::MUCRoomParticipant::newNick
std::string newNick
Definition mucroomhandler.h:62