LeechCraft Azoth  0.6.70-18450-gabe19ee3b0
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 <QVariant>
13 #include <util/azoth/emitters/mucentry.h>
14 
15 namespace LC
16 {
17 namespace Azoth
18 {
19  class ICLEntry;
20 
31  class IMUCEntry
32  {
33  protected:
34  Emitters::MUCEntry MUCEmitter_;
35 
36  virtual ~IMUCEntry () = default;
37  public:
38  Emitters::MUCEntry& GetMUCEntryEmitter () { return MUCEmitter_; }
39 
41  {
46 
51 
54  MUCFCanInvite = 0x0004
55  };
56 
57  Q_DECLARE_FLAGS (MUCFeatures, MUCFeature)
58 
59 
63  virtual MUCFeatures GetMUCFeatures () const = 0;
64 
73  virtual QString GetMUCSubject () const = 0;
74 
83  virtual void SetMUCSubject (const QString& subject) = 0;
84 
92  virtual bool CanChangeSubject () const = 0;
93 
103  virtual QList<ICLEntry*> GetParticipants () = 0;
104 
112  virtual bool IsAutojoined () const = 0;
113 
120  virtual void Join () = 0;
121 
134  virtual void Leave (const QString& msg = QString ()) = 0;
135 
140  virtual QString GetNick () const = 0;
141 
150  virtual void SetNick (const QString& nick) = 0;
151 
159  virtual QString GetGroupName () const = 0;
160 
172  virtual QString GetRealID (const ICLEntry& participant) const = 0;
173 
183  virtual QVariantMap GetIdentifyingData () const = 0;
184 
203  virtual void InviteToMUC (const QString& userId, const QString& msg) = 0;
204  };
205 }
206 }
207 
208 Q_DECLARE_INTERFACE (LC::Azoth::IMUCEntry, "org.Deviant.LeechCraft.Azoth.IMUCEntry/1.0")
209 Q_DECLARE_OPERATORS_FOR_FLAGS (LC::Azoth::IMUCEntry::MUCFeatures)
210 
211 #endif
virtual QString GetGroupName() const =0
Returns human-readable name of participants&#39; group.
virtual bool IsAutojoined() const =0
Whether this MUC room was automatically joined.
Definition: imucentry.h:54
Emitters::MUCEntry & GetMUCEntryEmitter()
Definition: imucentry.h:38
virtual ~IMUCEntry()=default
Definition: imucentry.h:45
virtual void SetMUCSubject(const QString &subject)=0
Updates the subject of this MUC.
virtual MUCFeatures GetMUCFeatures() const =0
The list of features of this MUC.
MUCFeature
Definition: imucentry.h:40
Emitters::MUCEntry MUCEmitter_
Definition: imucentry.h:34
virtual void Join()=0
Requests to join the room.
virtual bool CanChangeSubject() const =0
Returns whether MUC subject can be changed.
virtual QString GetMUCSubject() const =0
Returns subject of this MUC.
virtual void InviteToMUC(const QString &userId, const QString &msg)=0
Invites the user to this MUC.
Definition: imucentry.h:50
virtual void SetNick(const QString &nick)=0
Changes the nick of our participant.
virtual QString GetNick() const =0
Returns the nick of our participant.
Represents a single MUC entry in the CL.
Definition: imucentry.h:31
virtual QList< ICLEntry * > GetParticipants()=0
The list of participants of this MUC.
virtual QString GetRealID(const ICLEntry &participant) const =0
Returns the real ID of a participant.
virtual QVariantMap GetIdentifyingData() const =0
Returns the data identifying this room.
Represents a single entry in contact list.
Definition: iclentry.h:56
virtual void Leave(const QString &msg=QString())=0
Requests to leave the room.