LeechCraft Azoth  0.6.70-18450-gabe19ee3b0
Modular multiprotocol IM plugin for LeechCraft
LC::Azoth::IMUCEntry Class Referenceabstract

Represents a single MUC entry in the CL. More...

#include "imucentry.h"

Public Types

enum  MUCFeature { MUCFCanBeConfigured = 0x0001, MUCFCanHaveSubject = 0x0002, MUCFCanInvite = 0x0004 }
 

Public Member Functions

Emitters::MUCEntry & GetMUCEntryEmitter ()
 
virtual MUCFeatures GetMUCFeatures () const =0
 The list of features of this MUC. More...
 
virtual QString GetMUCSubject () const =0
 Returns subject of this MUC. More...
 
virtual void SetMUCSubject (const QString &subject)=0
 Updates the subject of this MUC. More...
 
virtual bool CanChangeSubject () const =0
 Returns whether MUC subject can be changed. More...
 
virtual QList< ICLEntry * > GetParticipants ()=0
 The list of participants of this MUC. More...
 
virtual bool IsAutojoined () const =0
 Whether this MUC room was automatically joined. More...
 
virtual void Join ()=0
 Requests to join the room. More...
 
virtual void Leave (const QString &msg=QString())=0
 Requests to leave the room. More...
 
virtual QString GetNick () const =0
 Returns the nick of our participant. More...
 
virtual void SetNick (const QString &nick)=0
 Changes the nick of our participant. More...
 
virtual QString GetGroupName () const =0
 Returns human-readable name of participants' group. More...
 
virtual QString GetRealID (const ICLEntry &participant) const =0
 Returns the real ID of a participant. More...
 
virtual QVariantMap GetIdentifyingData () const =0
 Returns the data identifying this room. More...
 
virtual void InviteToMUC (const QString &userId, const QString &msg)=0
 Invites the user to this MUC. More...
 

Protected Member Functions

virtual ~IMUCEntry ()=default
 

Protected Attributes

Emitters::MUCEntry MUCEmitter_
 

Detailed Description

Represents a single MUC entry in the CL.

This class extends ICLEntry by providing methods and data specific to MUCs. A well-written plugin should implement this interface along with ICLEntry for MUC entries.

See IConfigurableMUC if the MUC supports being configured and IMUCPerms if the MUC supports adjusting permissions for its participants.

Definition at line 31 of file imucentry.h.

Member Enumeration Documentation

◆ MUCFeature

Enumerator
MUCFCanBeConfigured 

This room has a configuration dialog and can be configured.

MUCFCanHaveSubject 

Room can have a (possibly empty) subject which may be retrieved by GetMUCSubject().

MUCFCanInvite 

Room supports invitations.

Definition at line 40 of file imucentry.h.

Constructor & Destructor Documentation

◆ ~IMUCEntry()

virtual LC::Azoth::IMUCEntry::~IMUCEntry ( )
protectedvirtualdefault

Member Function Documentation

◆ CanChangeSubject()

virtual bool LC::Azoth::IMUCEntry::CanChangeSubject ( ) const
pure virtual

Returns whether MUC subject can be changed.

This function should return whether our user can change this MUC's subject.

Returns
Whether the MUC subject can be changed by the user.

◆ GetGroupName()

virtual QString LC::Azoth::IMUCEntry::GetGroupName ( ) const
pure virtual

Returns human-readable name of participants' group.

This function should return the human-readable name of the group which holds the participants of this room.

Returns
The human-readable name.

◆ GetIdentifyingData()

virtual QVariantMap LC::Azoth::IMUCEntry::GetIdentifyingData ( ) const
pure virtual

Returns the data identifying this room.

The returned variant map should have the same format as the one from IMUCJoinWidget::GetIdentifyingData().

Returns
The identifying data.
See also
IMUCJoinWidget::GetIdentifyingData()

◆ GetMUCEntryEmitter()

Emitters::MUCEntry& LC::Azoth::IMUCEntry::GetMUCEntryEmitter ( )
inline

Definition at line 38 of file imucentry.h.

References MUCEmitter_.

◆ GetMUCFeatures()

virtual MUCFeatures LC::Azoth::IMUCEntry::GetMUCFeatures ( ) const
pure virtual

The list of features of this MUC.

Returns the list of features supported by this MUC.

◆ GetMUCSubject()

virtual QString LC::Azoth::IMUCEntry::GetMUCSubject ( ) const
pure virtual

Returns subject of this MUC.

Returns the subject/topic of this MUC room, possibly empty. If the protocol or smth doesn't support subjects for MUCs, this function should return an empty string.

Returns
The subject of this MUC.

◆ GetNick()

virtual QString LC::Azoth::IMUCEntry::GetNick ( ) const
pure virtual

Returns the nick of our participant.

Returns
The nickname or null string if not applicable.

◆ GetParticipants()

virtual QList<ICLEntry*> LC::Azoth::IMUCEntry::GetParticipants ( )
pure virtual

The list of participants of this MUC.

If the protocol plugin chooses to return info about participants via the IAccount interface, the ICLEntry objects returned from this function and from IAccount should be the same for the same participants.

Returns
The list of participants of this MUC.

◆ GetRealID()

virtual QString LC::Azoth::IMUCEntry::GetRealID ( const ICLEntry participant) const
pure virtual

Returns the real ID of a participant.

This function should return a real protocol ID of the given participant (JID for XMPP protocol, for example), or a null string if the ID is unknown, or the given participant doesn't belong to this room.

Parameters
[in]participantThe participant for which to return the real JID.
Returns
The real ID of a participant.

◆ InviteToMUC()

virtual void LC::Azoth::IMUCEntry::InviteToMUC ( const QString &  userId,
const QString &  msg 
)
pure virtual

Invites the user to this MUC.

This function should invite the given user to this MUC by means of the protocol, if applicable, or by a plain message if not.

User is identified by its protocol-specific ID, as returned by ICLEntry::GetHumanReadableID().

The invitation may contain an optional message.

Parameters
[in]userIdThe protocol-specific ID of the user to invite.
[in]msgThe optional message to send along with the invite.
See also
ICLEntry::GetHumanReadableID()

◆ IsAutojoined()

virtual bool LC::Azoth::IMUCEntry::IsAutojoined ( ) const
pure virtual

Whether this MUC room was automatically joined.

Azoth uses this, for example, to avoid auto-opening MUCs that where joined as a result of bookmarks/autojoin list.

Returns
Whether the room was autojoined.

◆ Join()

virtual void LC::Azoth::IMUCEntry::Join ( )
pure virtual

Requests to join the room.

If the we aren't joined to this MUC (for example, there was a nick conflict, or this entry represents a bookmark), the room should be tried to be joined.

◆ Leave()

virtual void LC::Azoth::IMUCEntry::Leave ( const QString &  msg = QString())
pure virtual

Requests to leave the room.

The protocol implementation is expected to leave the room with the given leave message. If leaving is impossible for some reason, it's ok to stay.

If the room is successfully left, the parent account should take care of removing the contact list entries corresponding to its participants and the room itself.

Parameters
[in]msgThe leave message (if applicable).

◆ SetMUCSubject()

virtual void LC::Azoth::IMUCEntry::SetMUCSubject ( const QString &  subject)
pure virtual

Updates the subject of this MUC.

Sets the subject of the conference. If it fails for some reason, for example, due to insufficient rights, this function should do nothing.

Parameters
[in]subjectThe new subject of this room to set.

◆ SetNick()

virtual void LC::Azoth::IMUCEntry::SetNick ( const QString &  nick)
pure virtual

Changes the nick of our participant.

If changing nicks is not allowed or is not supported, nothing should be done.

Parameters
[in]nickNew nick for our participant in this room.

Member Data Documentation

◆ MUCEmitter_

Emitters::MUCEntry LC::Azoth::IMUCEntry::MUCEmitter_
protected

Definition at line 34 of file imucentry.h.

Referenced by GetMUCEntryEmitter().


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