LeechCraft Azoth  0.6.70-15082-g543737046d
Modular multiprotocol IM plugin for LeechCraft
imucentry.h
Go to the documentation of this file.
1 /**********************************************************************
2  * LeechCraft - modular cross-platform feature rich internet client.
3  * Copyright (C) 2006-2014 Georg Rudoy
4  *
5  * Distributed under the Boost Software License, Version 1.0.
6  * (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7  **********************************************************************/
8 
9 #ifndef PLUGINS_AZOTH_INTERFACES_IMUCENTRY_H
10 #define PLUGINS_AZOTH_INTERFACES_IMUCENTRY_H
11 #include <QFlags>
12 #include <QMetaType>
13 #include <QVariant>
14 
15 namespace LC
16 {
17 namespace Azoth
18 {
19  class ICLEntry;
20 
31  class IMUCEntry
32  {
33  Q_GADGET
34  public:
35  virtual ~IMUCEntry () {}
36 
37  enum MUCFeature
38  {
42  MUCFCanBeConfigured = 0x0001,
43 
48 
51  MUCFCanInvite = 0x0004
52  };
53 
54  Q_DECLARE_FLAGS (MUCFeatures, MUCFeature)
55 
56 
60  virtual MUCFeatures GetMUCFeatures () const = 0;
61 
70  virtual QString GetMUCSubject () const = 0;
71 
80  virtual void SetMUCSubject (const QString& subject) = 0;
81 
89  virtual bool CanChangeSubject () const = 0;
90 
100  virtual QList<QObject*> GetParticipants () = 0;
101 
109  virtual bool IsAutojoined () const = 0;
110 
117  virtual void Join () = 0;
118 
131  virtual void Leave (const QString& msg = QString ()) = 0;
132 
137  virtual QString GetNick () const = 0;
138 
147  virtual void SetNick (const QString& nick) = 0;
148 
156  virtual QString GetGroupName () const = 0;
157 
169  virtual QString GetRealID (QObject *participant) const = 0;
170 
180  virtual QVariantMap GetIdentifyingData () const = 0;
181 
200  virtual void InviteToMUC (const QString& userId, const QString& msg) = 0;
201 
211  virtual void gotNewParticipants (const QList<QObject*>& parts) = 0;
212 
222  virtual void mucSubjectChanged (const QString& newSubj) = 0;
223 
242  virtual void nicknameConflict (const QString& usedNick) = 0;
243 
253  virtual void beenKicked (const QString& reason) = 0;
254 
264  virtual void beenBanned (const QString& reason) = 0;
265  };
266 }
267 }
268 
269 Q_DECLARE_INTERFACE (LC::Azoth::IMUCEntry,
270  "org.Deviant.LeechCraft.Azoth.IMUCEntry/1.0")
271 Q_DECLARE_OPERATORS_FOR_FLAGS (LC::Azoth::IMUCEntry::MUCFeatures)
272 
273 #endif
LC::Azoth::IMUCEntry::SetNick
virtual void SetNick(const QString &nick)=0
Changes the nick of our participant.
LC::Azoth::IMUCEntry::InviteToMUC
virtual void InviteToMUC(const QString &userId, const QString &msg)=0
Invites the user to this MUC.
LC::Azoth::IMUCEntry::GetIdentifyingData
virtual QVariantMap GetIdentifyingData() const =0
Returns the data identifying this room.
LC::Azoth::IMUCEntry::GetMUCFeatures
virtual MUCFeatures GetMUCFeatures() const =0
The list of features of this MUC.
QList
Definition: iaccountactionsprovider.h:16
LC::Azoth::IMUCEntry::beenBanned
virtual void beenBanned(const QString &reason)=0
Notifies about participant being banned.
LC::Azoth::IMUCEntry::IsAutojoined
virtual bool IsAutojoined() const =0
Whether this MUC room was automatically joined.
LC::Azoth::IMUCEntry::gotNewParticipants
virtual void gotNewParticipants(const QList< QObject * > &parts)=0
Notifies about new participants in the room.
LC::Azoth::IMUCEntry
Represents a single MUC entry in the CL.
Definition: imucentry.h:43
LC::Azoth::IMUCEntry::MUCFCanInvite
@ MUCFCanInvite
Definition: imucentry.h:63
LC::Azoth::IMUCEntry::MUCFeature
MUCFeature
Definition: imucentry.h:49
LC::Azoth::IMUCEntry::nicknameConflict
virtual void nicknameConflict(const QString &usedNick)=0
Notifies about nick conflict.
LC::Azoth::IMUCEntry::beenKicked
virtual void beenKicked(const QString &reason)=0
Notifies about participant being kicked.
LC::Azoth::IMUCEntry::SetMUCSubject
virtual void SetMUCSubject(const QString &subject)=0
Updates the subject of this MUC.
LC::Azoth::IMUCEntry::CanChangeSubject
virtual bool CanChangeSubject() const =0
Returns whether MUC subject can be changed.
LC::Azoth::IMUCEntry::mucSubjectChanged
virtual void mucSubjectChanged(const QString &newSubj)=0
Notifies about subject change.
LC::Azoth::IMUCEntry::~IMUCEntry
virtual ~IMUCEntry()
Definition: imucentry.h:47
LC::Azoth::IMUCEntry::GetRealID
virtual QString GetRealID(QObject *participant) const =0
Returns the real ID of a participant.
LC::Azoth::IMUCEntry::GetParticipants
virtual QList< QObject * > GetParticipants()=0
The list of participants of this MUC.
LC
Definition: activityinfo.h:13
LC::Azoth::IMUCEntry::GetGroupName
virtual QString GetGroupName() const =0
Returns human-readable name of participants' group.
LC::Azoth::IMUCEntry::Leave
virtual void Leave(const QString &msg=QString())=0
Requests to leave the room.
LC::Azoth::IMUCEntry::MUCFCanHaveSubject
@ MUCFCanHaveSubject
Definition: imucentry.h:59
LC::Azoth::IMUCEntry::GetNick
virtual QString GetNick() const =0
Returns the nick of our participant.
LC::Azoth::IMUCEntry::MUCFCanBeConfigured
@ MUCFCanBeConfigured
Definition: imucentry.h:54
LC::Azoth::IMUCEntry::Join
virtual void Join()=0
Requests to join the room.
LC::Azoth::IMUCEntry::GetMUCSubject
virtual QString GetMUCSubject() const =0
Returns subject of this MUC.