Unity Scopes API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
PreviewQueryBase.h
1 /*
2  * Copyright (C) 2013 Canonical Ltd
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License version 3 as
6  * published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by: Michi Henning <michi.henning@canonical.com>
17  */
18 
19 #ifndef UNITY_SCOPES_PREVIEWQUERYBASE_H
20 #define UNITY_SCOPES_PREVIEWQUERYBASE_H
21 
22 #include <unity/scopes/PreviewReplyProxyFwd.h>
23 #include <unity/scopes/QueryCtrlProxyFwd.h>
24 #include <unity/scopes/ScopeProxyFwd.h>
25 #include <unity/scopes/Variant.h>
26 #include <unity/scopes/QueryBase.h>
27 
28 #include <unity/util/DefinesPtrs.h>
29 #include <unity/util/NonCopyable.h>
30 
31 namespace unity
32 {
33 
34 namespace scopes
35 {
36 
37 namespace internal
38 {
39 
40 class QueryBaseImpl;
41 class QueryObject;
42 
43 } // namespace internal
44 
55 {
56 public:
58  NONCOPYABLE(PreviewQueryBase);
59  UNITY_DEFINES_PTRS(PreviewQueryBase);
61 
79  virtual void run(PreviewReplyProxy const& reply) = 0; // Called by the run time to start this query
80 
81  // TODO: Add a method for subpreview request?
82 
84  virtual ~PreviewQueryBase();
86 
87 protected:
91 };
92 
93 } // namespace scopes
94 
95 } // namespace unity
96 
97 #endif
Abstract server-side base interface for a query that is executed inside a scope.
Definition: QueryBase.h:60
virtual void run(PreviewReplyProxy const &reply)=0
Called by scopes run time to start the preview.
Abstract base class to represent a particular preview.
Definition: PreviewQueryBase.h:54
std::shared_ptr< PreviewReply > PreviewReplyProxy
Convenience type definition.
Definition: PreviewReplyProxyFwd.h:35