![]() |
LeechCraft Azoth 0.6.70-17609-g3dde4097dd
Modular multiprotocol IM plugin for LeechCraft
|
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 | |
virtual | ~IMUCEntry () |
virtual MUCFeatures | GetMUCFeatures () const =0 |
The list of features of this MUC. | |
virtual QString | GetMUCSubject () const =0 |
Returns subject of this MUC. | |
virtual void | SetMUCSubject (const QString &subject)=0 |
Updates the subject of this MUC. | |
virtual bool | CanChangeSubject () const =0 |
Returns whether MUC subject can be changed. | |
virtual QList< QObject * > | GetParticipants ()=0 |
The list of participants of this MUC. | |
virtual bool | IsAutojoined () const =0 |
Whether this MUC room was automatically joined. | |
virtual void | Join ()=0 |
Requests to join the room. | |
virtual void | Leave (const QString &msg=QString())=0 |
Requests to leave the room. | |
virtual QString | GetNick () const =0 |
Returns the nick of our participant. | |
virtual void | SetNick (const QString &nick)=0 |
Changes the nick of our participant. | |
virtual QString | GetGroupName () const =0 |
Returns human-readable name of participants' group. | |
virtual QString | GetRealID (QObject *participant) const =0 |
Returns the real ID of a participant. | |
virtual QVariantMap | GetIdentifyingData () const =0 |
Returns the data identifying this room. | |
virtual void | InviteToMUC (const QString &userId, const QString &msg)=0 |
Invites the user to this MUC. | |
virtual void | gotNewParticipants (const QList< QObject * > &parts)=0 |
Notifies about new participants in the room. | |
virtual void | mucSubjectChanged (const QString &newSubj)=0 |
Notifies about subject change. | |
virtual void | nicknameConflict (const QString &usedNick)=0 |
Notifies about nick conflict. | |
virtual void | beenKicked (const QString &reason)=0 |
Notifies about participant being kicked. | |
virtual void | beenBanned (const QString &reason)=0 |
Notifies about participant being banned. |
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.
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 37 of file imucentry.h.
|
inlinevirtual |
Definition at line 35 of file imucentry.h.
|
pure virtual |
Notifies about participant being banned.
This signal should be emitted whenever our user gets banned from this room.
[out] | reason | The optional reason message. |
References beenBanned().
Referenced by beenBanned().
|
pure virtual |
Notifies about participant being kicked.
This signal should be emitted whenever our user gets kicked from this room.
[out] | reason | The optional reason message. |
References beenKicked().
Referenced by beenKicked().
|
pure virtual |
Returns whether MUC subject can be changed.
This function should return whether our user can change this MUC's subject.
References CanChangeSubject().
Referenced by CanChangeSubject().
|
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.
References GetGroupName().
Referenced by GetGroupName().
|
pure virtual |
Returns the data identifying this room.
The returned variant map should have the same format as the one from IMUCJoinWidget::GetIdentifyingData().
References GetIdentifyingData().
Referenced by GetIdentifyingData().
|
pure virtual |
The list of features of this MUC.
Returns the list of features supported by this MUC.
References GetMUCFeatures().
Referenced by GetMUCFeatures().
|
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.
References GetMUCSubject().
Referenced by GetMUCSubject().
|
pure virtual |
|
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.
References GetParticipants().
Referenced by GetParticipants().
|
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.
[in] | participant | The participant for which to return the real JID. |
References GetRealID().
Referenced by GetRealID().
|
pure virtual |
Notifies about new participants in the room.
This signal should emitted when new participants join this room.
[out] | parts | The list of participants that joined. |
References gotNewParticipants().
Referenced by gotNewParticipants().
|
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.
[in] | userId | The protocol-specific ID of the user to invite. |
[in] | msg | The optional message to send along with the invite. |
References InviteToMUC().
Referenced by InviteToMUC().
|
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.
References IsAutojoined().
Referenced by IsAutojoined().
|
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.
References Join().
Referenced by Join().
|
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.
[in] | msg | The leave message (if applicable). |
References Leave().
Referenced by Leave().
|
pure virtual |
Notifies about subject change.
This signal should be emitted when room subject is changed to newSubj.
[out] | newSubj | The new subject of this room. |
References mucSubjectChanged().
Referenced by mucSubjectChanged().
|
pure virtual |
Notifies about nick conflict.
This signal should be emitted when room gets the error from the server that the nickname is already in use.
The signal handler could either call SetNick() with some other nickname (in this case the room should automatically try to rejoin) or do nothing it all (in this case the room should, well, do nothing as well).
This signal should be emitted only if the error arises while joining, not as result of SetNick().
[out] | usedNick | The nickname that was used to join the room. |
References nicknameConflict().
Referenced by nicknameConflict().
|
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.
[in] | subject | The new subject of this room to set. |
References SetMUCSubject().
Referenced by SetMUCSubject().
|
pure virtual |
Changes the nick of our participant.
If changing nicks is not allowed or is not supported, nothing should be done.
[in] | nick | New nick for our participant in this room. |
References SetNick().
Referenced by SetNick().