LeechCraft  0.6.70-16373-g319c272718
Modular cross-platform feature rich live environment.
ifinder.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 INTERFACES_IFINDER_H
10 #define INTERFACES_IFINDER_H
11 #include <memory>
12 #include <QStringList>
13 #include <QHash>
14 #include <QVariant>
15 
16 class QAbstractItemModel;
17 
18 namespace LC
19 {
26  struct Request
27  {
30  enum Type
31  {
36  };
37 
41 
45 
48  QString Plugin_;
49 
52  QString Category_;
53 
56  QString String_;
59  QHash<QString, QVariant> Params_;
60  };
61 }
62 
69 class Q_DECL_EXPORT IFindProxy
70 {
71 public:
72  virtual ~IFindProxy () {}
73 
83  virtual QAbstractItemModel* GetModel () = 0;
84 
101  virtual QByteArray GetUniqueSearchID () const = 0;
102 
111  virtual QStringList GetCategories () const = 0;
112 };
113 
114 typedef std::shared_ptr<IFindProxy> IFindProxy_ptr;
115 
123 class Q_DECL_EXPORT IFinder
124 {
125 public:
126  virtual ~IFinder () {}
127 
138  virtual QStringList GetCategories () const = 0;
139 
152  virtual QList<IFindProxy_ptr> GetProxy (const LC::Request& r) = 0;
153 
160  virtual void categoriesChanged (const QStringList& newCats,
161  const QStringList& oldCats) = 0;
162 };
163 
164 Q_DECLARE_INTERFACE (IFinder, "org.Deviant.LeechCraft.IFinder/1.0")
165 Q_DECLARE_INTERFACE (IFindProxy, "org.Deviant.LeechCraft.IFinder/1.0")
166 
167 #endif
168 
QString Plugin_
Definition: ifinder.h:48
QString String_
Definition: ifinder.h:56
virtual ~IFindProxy()
Definition: ifinder.h:72
Fixed string.
Definition: ifinder.h:32
bool CaseSensitive_
Definition: ifinder.h:40
Base class for search providers.
Definition: ifinder.h:123
Regular expression.
Definition: ifinder.h:34
Tag filtering.
Definition: ifinder.h:35
QHash< QString, QVariant > Params_
Definition: ifinder.h:59
Type Type_
Definition: ifinder.h:44
QString Category_
Definition: ifinder.h:52
Represents search results for a single Request.
Definition: ifinder.h:69
std::shared_ptr< IFindProxy > IFindProxy_ptr
Definition: ifinder.h:114
virtual ~IFinder()
Definition: ifinder.h:126
Describes the elementary subrequest.
Definition: ifinder.h:26