Unity Scopes API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
PreviewListenerBase.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_PREVIEWLISTENERBASE_H
20 #define UNITY_SCOPES_PREVIEWLISTENERBASE_H
21 
22 #include <unity/scopes/ListenerBase.h>
23 #include <unity/util/DefinesPtrs.h>
24 #include <unity/util/NonCopyable.h>
25 #include <unity/scopes/PreviewWidget.h>
26 #include <unity/scopes/ColumnLayout.h>
27 #include <unity/scopes/Variant.h>
28 
29 #include <string>
30 
31 namespace unity
32 {
33 
34 namespace scopes
35 {
36 
46 {
47 public:
49  NONCOPYABLE(PreviewListenerBase);
50  UNITY_DEFINES_PTRS(PreviewListenerBase);
51 
52  virtual ~PreviewListenerBase();
54 
58  virtual void push(ColumnLayoutList const& layouts) = 0;
59 
63  virtual void push(PreviewWidgetList const&) = 0;
64 
68  virtual void push(std::string const& key, Variant const& value) = 0;
69 
70 protected:
74 };
75 
76 } // namespace scopes
77 
78 } // namespace unity
79 
80 #endif
Abstract base class for a scope to respond to preview requests.
Definition: PreviewListenerBase.h:45
std::list< ColumnLayout > ColumnLayoutList
List of column layouts (see unity::scopes::ColumnLayout)
Definition: ColumnLayout.h:112
Simple variant class that can hold an integer, boolean, string, double, dictionary, array or null value.
Definition: Variant.h:58
Top-level namespace for all things Unity-related.
Definition: Version.h:50
virtual void push(ColumnLayoutList const &layouts)=0
Called by the scopes runtime for each column layout definition returned by preview().
std::list< PreviewWidget > PreviewWidgetList
List of preview widgets (see unity::scopes::PreviewWidget)
Definition: PreviewWidget.h:46
Abstract base class to be notified of request completion (such as a query or activation request)...
Definition: ListenerBase.h:44