gloox  1.0.27
Public Member Functions | List of all members
MUCMessageSession Class Reference

#include <mucmessagesession.h>

Inheritance diagram for MUCMessageSession:
Inheritance graph
[legend]

Public Member Functions

 MUCMessageSession (ClientBase *parent, const JID &jid)
 
virtual ~MUCMessageSession ()
 
virtual void send (const std::string &message)
 
virtual void send (const std::string &message, const std::string &subject, const StanzaExtensionList &sel=StanzaExtensionList())
 
virtual void setSubject (const std::string &subject)
 
virtual void handleMessage (Message &msg)
 
- Public Member Functions inherited from MessageSession
 MessageSession (ClientBase *parent, const JID &jid, bool wantUpgrade=true, int types=0, bool honorTID=true)
 
virtual ~MessageSession ()
 
const JIDtarget () const
 
const std::string & threadID () const
 
void setThreadID (const std::string &thread)
 
bool honorThreadID () const
 
void registerMessageHandler (MessageHandler *mh)
 
void removeMessageHandler ()
 
void registerMessageFilter (MessageFilter *mf)
 
void removeMessageFilter (MessageFilter *mf)
 
void disposeMessageFilter (MessageFilter *mf)
 
int types () const
 
void resetResource ()
 

Additional Inherited Members

- Protected Member Functions inherited from MessageSession
virtual void send (const Message &msg)
 

Detailed Description

This is a MessageSession, adapted to be used in a MUC context.

This class is used internally by MUCRoom. You should not need to use it directly.

Author
Jakob Schröter js@ca.nosp@m.maya.nosp@m..net
Since
0.9

Definition at line 32 of file mucmessagesession.h.

Constructor & Destructor Documentation

◆ MUCMessageSession()

MUCMessageSession ( ClientBase parent,
const JID jid 
)

Creates a new MUCMessageSession.

Parameters
parentThe ClientBase to use for communication.
jidThe bare JID of the MUC room.

Definition at line 22 of file mucmessagesession.cpp.

◆ ~MUCMessageSession()

~MUCMessageSession ( )
virtual

Virtual Destructor.

Definition at line 29 of file mucmessagesession.cpp.

Member Function Documentation

◆ handleMessage()

void handleMessage ( Message msg)
virtual

This function can be used to feed a message into the session. Ususally, only ClientBase should call this function.

Parameters
msgA Message to feed into the session.

Reimplemented from MessageSession.

Definition at line 33 of file mucmessagesession.cpp.

◆ send() [1/2]

void send ( const std::string &  message)
virtual

Use this function to send a message to all room occupants.

Parameters
messageThe message to send.

Reimplemented from MessageSession.

Definition at line 39 of file mucmessagesession.cpp.

◆ send() [2/2]

void send ( const std::string &  message,
const std::string &  subject,
const StanzaExtensionList sel = StanzaExtensionList() 
)
virtual

A convenience function to quickly send a message (optionally with subject). This is the preferred way to send a message from a MessageSession.

Parameters
messageThe message to send.
subjectThe optional subject to send.
selAn optional list of StanzaExtensions. The extensions will be owned by the message-to-be-sent; do not attempt to re-use or delete them.

Reimplemented from MessageSession.

Definition at line 44 of file mucmessagesession.cpp.

◆ setSubject()

void setSubject ( const std::string &  subject)
virtual

Use this function to set a new room subject.

Parameters
subjectThe new room subject.

Definition at line 66 of file mucmessagesession.cpp.


The documentation for this class was generated from the following files: