LeechCraft Azoth  0.6.70-15082-g543737046d
Modular multiprotocol IM plugin for LeechCraft
isupportriex.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_ISUPPORTRIEX_H
10 #define PLUGINS_AZOTH_INTERFACES_ISUPPORTRIEX_H
11 #include <QFlags>
12 #include <QMetaType>
13 #include <QStringList>
14 
15 namespace LC
16 {
17 namespace Azoth
18 {
21  struct RIEXItem
22  {
30  enum Action
31  {
34  AAdd,
35 
38  ADelete,
39 
42  AModify
43  } Action_;
44 
57  QString ID_;
58 
63  QString Nick_;
64 
72  QStringList Groups_;
73  };
74 
75  inline bool operator== (const RIEXItem& r1, const RIEXItem& r2)
76  {
77  return r1.Action_ == r2.Action_ &&
78  r1.ID_ == r2.ID_ &&
79  r1.Nick_ == r2.Nick_ &&
80  r1.Groups_ == r2.Groups_;
81  }
82 
91  {
92  public:
93  virtual ~ISupportRIEX () {}
94 
105  virtual void SuggestItems (QList<RIEXItem> items, QObject *entry, QString message) = 0;
106 
125  QObject *from, QString message) = 0;
126  };
127 }
128 }
129 
130 Q_DECLARE_INTERFACE (LC::Azoth::ISupportRIEX,
131  "org.Deviant.LeechCraft.Azoth.ISupportRIEX/1.0")
132 Q_DECLARE_METATYPE (LC::Azoth::RIEXItem)
133 
134 #endif
LC::Azoth::RIEXItem::Action
Action
What should be done with this item.
Definition: isupportriex.h:48
LC::Azoth::RIEXItem::Action_
enum LC::Azoth::RIEXItem::Action Action_
QList
Definition: iaccountactionsprovider.h:16
LC::Azoth::RIEXItem::AAdd
@ AAdd
Definition: isupportriex.h:58
LC::Azoth::ISupportRIEX
Interface representing Roster Item Exchange-like things.
Definition: isupportriex.h:102
LC::Azoth::ISupportRIEX::SuggestItems
virtual void SuggestItems(QList< RIEXItem > items, QObject *entry, QString message)=0
Sends exchange request to the given entry.
LC::Azoth::RIEXItem::ADelete
@ ADelete
This item should be removed from the roster.
Definition: isupportriex.h:62
LC::Azoth::RIEXItem::Groups_
QStringList Groups_
The suggested groups for the entry.
Definition: isupportriex.h:90
LC::Azoth::ISupportRIEX::riexItemsSuggested
virtual void riexItemsSuggested(QList< LC::Azoth::RIEXItem > items, QObject *from, QString message)=0
Notifies that other part suggested modifying roster.
LC::Azoth::RIEXItem::ID_
QString ID_
The human-readable ID of the entry.
Definition: isupportriex.h:75
LC::Azoth::RIEXItem
Represents a single exchange entry.
Definition: isupportriex.h:33
LC::Azoth::operator==
bool operator==(const ActivityInfo &i1, const ActivityInfo &i2)
Checks whether the activity info structures are equal.
Definition: activityinfo.h:61
LC
Definition: activityinfo.h:13
LC::Azoth::RIEXItem::AModify
@ AModify
This item should be updated in the roster.
Definition: isupportriex.h:66
LC::Azoth::RIEXItem::Nick_
QString Nick_
The suggested nickname of the entry.
Definition: isupportriex.h:81
LC::Azoth::ISupportRIEX::~ISupportRIEX
virtual ~ISupportRIEX()
Definition: isupportriex.h:105