LeechCraft Azoth  0.6.70-13729-g7046a9d2a7
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  * Boost Software License - Version 1.0 - August 17th, 2003
6  *
7  * Permission is hereby granted, free of charge, to any person or organization
8  * obtaining a copy of the software and accompanying documentation covered by
9  * this license (the "Software") to use, reproduce, display, distribute,
10  * execute, and transmit the Software, and to prepare derivative works of the
11  * Software, and to permit third-parties to whom the Software is furnished to
12  * do so, all subject to the following:
13  *
14  * The copyright notices in the Software and this entire statement, including
15  * the above license grant, this restriction and the following disclaimer,
16  * must be included in all copies of the Software, in whole or in part, and
17  * all derivative works of the Software, unless such copies or derivative
18  * works are solely in the form of machine-executable object code generated by
19  * a source language processor.
20  *
21  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23  * FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
24  * SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
25  * FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
26  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
27  * DEALINGS IN THE SOFTWARE.
28  **********************************************************************/
29 
30 #ifndef PLUGINS_AZOTH_INTERFACES_IMUCENTRY_H
31 #define PLUGINS_AZOTH_INTERFACES_IMUCENTRY_H
32 #include <QFlags>
33 #include <QMetaType>
34 #include <QVariant>
35 
36 namespace LC
37 {
38 namespace Azoth
39 {
40  class ICLEntry;
41 
52  class IMUCEntry
53  {
54  Q_GADGET
55  public:
56  virtual ~IMUCEntry () {}
57 
59  {
64 
69 
72  MUCFCanInvite = 0x0004
73  };
74 
75  Q_DECLARE_FLAGS (MUCFeatures, MUCFeature)
76 
77 
81  virtual MUCFeatures GetMUCFeatures () const = 0;
82 
91  virtual QString GetMUCSubject () const = 0;
92 
101  virtual void SetMUCSubject (const QString& subject) = 0;
102 
110  virtual bool CanChangeSubject () const = 0;
111 
121  virtual QList<QObject*> GetParticipants () = 0;
122 
130  virtual bool IsAutojoined () const = 0;
131 
138  virtual void Join () = 0;
139 
152  virtual void Leave (const QString& msg = QString ()) = 0;
153 
158  virtual QString GetNick () const = 0;
159 
168  virtual void SetNick (const QString& nick) = 0;
169 
177  virtual QString GetGroupName () const = 0;
178 
190  virtual QString GetRealID (QObject *participant) const = 0;
191 
201  virtual QVariantMap GetIdentifyingData () const = 0;
202 
221  virtual void InviteToMUC (const QString& userId, const QString& msg) = 0;
222 
232  virtual void gotNewParticipants (const QList<QObject*>& parts) = 0;
233 
243  virtual void mucSubjectChanged (const QString& newSubj) = 0;
244 
263  virtual void nicknameConflict (const QString& usedNick) = 0;
264 
274  virtual void beenKicked (const QString& reason) = 0;
275 
285  virtual void beenBanned (const QString& reason) = 0;
286  };
287 }
288 }
289 
290 Q_DECLARE_INTERFACE (LC::Azoth::IMUCEntry,
291  "org.Deviant.LeechCraft.Azoth.IMUCEntry/1.0")
292 Q_DECLARE_OPERATORS_FOR_FLAGS (LC::Azoth::IMUCEntry::MUCFeatures)
293 
294 #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:72
Definition: imucentry.h:63
virtual void SetMUCSubject(const QString &subject)=0
Updates the subject of this MUC.
virtual void beenBanned(const QString &reason)=0
Notifies about participant being banned.
virtual void nicknameConflict(const QString &usedNick)=0
Notifies about nick conflict.
virtual MUCFeatures GetMUCFeatures() const =0
The list of features of this MUC.
virtual void beenKicked(const QString &reason)=0
Notifies about participant being kicked.
virtual void mucSubjectChanged(const QString &newSubj)=0
Notifies about subject change.
MUCFeature
Definition: imucentry.h:58
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 gotNewParticipants(const QList< QObject *> &parts)=0
Notifies about new participants in the room.
virtual QString GetRealID(QObject *participant) const =0
Returns the real ID of a participant.
virtual void InviteToMUC(const QString &userId, const QString &msg)=0
Invites the user to this MUC.
Definition: imucentry.h:68
virtual QList< QObject * > GetParticipants()=0
The list of participants of this MUC.
virtual void SetNick(const QString &nick)=0
Changes the nick of our participant.
virtual ~IMUCEntry()
Definition: imucentry.h:56
virtual QString GetNick() const =0
Returns the nick of our participant.
Represents a single MUC entry in the CL.
Definition: imucentry.h:52
virtual QVariantMap GetIdentifyingData() const =0
Returns the data identifying this room.
virtual void Leave(const QString &msg=QString())=0
Requests to leave the room.