Unity Scopes API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
SearchListenerBase.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_SEARCHLISTENERBASE_H
20 #define UNITY_SCOPES_SEARCHLISTENERBASE_H
21 
22 #include <unity/scopes/Annotation.h>
23 #include <unity/scopes/CategorisedResult.h>
24 #include <unity/scopes/Category.h>
25 #include <unity/scopes/Department.h>
26 #include <unity/scopes/FilterBase.h>
27 #include <unity/scopes/ListenerBase.h>
28 #include <unity/util/DefinesPtrs.h>
29 #include <unity/util/NonCopyable.h>
30 
31 #include <string>
32 
33 namespace unity
34 {
35 
36 namespace scopes
37 {
38 
39 namespace experimental
40 {
41 class Annotation;
42 }
43 
58 {
59 public:
61  NONCOPYABLE(SearchListenerBase);
62  UNITY_DEFINES_PTRS(SearchListenerBase);
63 
64  virtual ~SearchListenerBase();
66 
72  virtual void push(Department::SCPtr const& parent);
73 
77  virtual void push(CategorisedResult result) = 0;
78 
84  virtual void push(experimental::Annotation annotation);
85 
95  virtual void push(Category::SCPtr const& category);
96 
102  virtual void push(Filters const& filters, FilterState const& filter_state);
103 
104 protected:
108 };
109 
110 } // namespace scopes
111 
112 } // namespace unity
113 
114 #endif
std::list< FilterBase::SCPtr > Filters
List of filters.
Definition: FilterBase.h:106
Top-level namespace for all things Unity-related.
Definition: Version.h:50
Abstract base interface for a client to receive the results of a query.
Definition: SearchListenerBase.h:57
virtual void push(Department::SCPtr const &parent)
Called at most once by the scopes run time for a tree of departments returned by a query...
Captures state of multiple filters.
Definition: FilterState.h:47
A result, including the category it belongs to.
Definition: CategorisedResult.h:41
Abstract base class to be notified of request completion (such as a query or activation request)...
Definition: ListenerBase.h:44