LeechCraft Azoth  0.6.70-15082-g543737046d
Modular multiprotocol IM plugin for LeechCraft
ihaveservicediscovery.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_IHAVESERVICEDISCOVERY_H
10 #define PLUGINS_AZOTH_INTERFACES_IHAVESERVICEDISCOVERY_H
11 #include <QMetaType>
12 
13 class QAbstractItemModel;
14 class QModelIndex;
15 class QString;
16 
17 namespace LC
18 {
19 namespace Azoth
20 {
36  class ISDSession
37  {
38  public:
39  virtual ~ISDSession () {}
40 
52  virtual void SetQuery (const QString& query) = 0;
53 
64  virtual QString GetQuery () const = 0;
65 
84  virtual QAbstractItemModel* GetRepresentationModel () const = 0;
85 
107  virtual QList<QPair<QByteArray, QString>> GetActionsFor (const QModelIndex& index) = 0;
108 
123  virtual void ExecuteAction (const QModelIndex& index, const QByteArray& id) = 0;
124  };
125 
158  {
159  public:
161 
175  virtual QObject* CreateSDSession () = 0;
176 
188  virtual QString GetDefaultQuery () const = 0;
189 
203  virtual void gotSDSession (QObject *session) = 0;
204  };
205 }
206 }
207 
208 Q_DECLARE_INTERFACE (LC::Azoth::ISDSession,
209  "org.Deviant.LeechCraft.Azoth.ISDSession/1.0")
210 Q_DECLARE_INTERFACE (LC::Azoth::IHaveServiceDiscovery,
211  "org.Deviant.LeechCraft.Azoth.IHaveServiceDiscovery/1.0")
212 
213 #endif
LC::Azoth::ISDSession::GetQuery
virtual QString GetQuery() const =0
Returns the query of this SD session.
LC::Azoth::IHaveServiceDiscovery::CreateSDSession
virtual QObject * CreateSDSession()=0
Creates a new service discovery session.
QList
Definition: iaccountactionsprovider.h:16
LC::Azoth::ISDSession::GetRepresentationModel
virtual QAbstractItemModel * GetRepresentationModel() const =0
Returns the model representing discovery results.
LC::Azoth::ISDSession
Interface for service discovery sessions.
Definition: ihaveservicediscovery.h:36
LC::Azoth::IHaveServiceDiscovery
Interface for accounts supporting service discovery.
Definition: ihaveservicediscovery.h:157
LC::Azoth::ISDSession::~ISDSession
virtual ~ISDSession()
Definition: ihaveservicediscovery.h:39
LC::Azoth::ISDSession::SetQuery
virtual void SetQuery(const QString &query)=0
Sets the service discovery query.
LC
Definition: activityinfo.h:13
LC::Azoth::ISDSession::ExecuteAction
virtual void ExecuteAction(const QModelIndex &index, const QByteArray &id)=0
Executes the action with the given id.
LC::Azoth::IHaveServiceDiscovery::~IHaveServiceDiscovery
virtual ~IHaveServiceDiscovery()
Definition: ihaveservicediscovery.h:160
LC::Azoth::IHaveServiceDiscovery::gotSDSession
virtual void gotSDSession(QObject *session)=0
Notifies about a new service discovery session.
LC::Azoth::ISDSession::GetActionsFor
virtual QList< QPair< QByteArray, QString > > GetActionsFor(const QModelIndex &index)=0
Returns the list of actions for the given index.
LC::Azoth::IHaveServiceDiscovery::GetDefaultQuery
virtual QString GetDefaultQuery() const =0
Returns the default query for this account.