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/ListenerBase.h>
23 #include <unity/util/DefinesPtrs.h>
24 #include <unity/util/NonCopyable.h>
25 #include <unity/scopes/Category.h>
26 #include <unity/scopes/Annotation.h>
27 #include <unity/scopes/Department.h>
28 #include <unity/scopes/FilterBase.h>
29 
30 #include <string>
31 
32 namespace unity
33 {
34 
35 namespace scopes
36 {
37 
38 class CategorisedResult;
39 class FilterState;
40 
41 namespace experimental
42 {
43 class Annotation;
44 }
45 
60 {
61 public:
63  NONCOPYABLE(SearchListenerBase);
64  UNITY_DEFINES_PTRS(SearchListenerBase);
65 
66  virtual ~SearchListenerBase();
68 
74  virtual void push(Department::SCPtr const& parent);
75 
79  virtual void push(CategorisedResult result) = 0;
80 
86  virtual void push(experimental::Annotation annotation);
87 
97  virtual void push(Category::SCPtr const& category);
98 
104  virtual void push(Filters const& filters, FilterState const& filter_state);
105 
106 protected:
110 };
111 
112 } // namespace scopes
113 
114 } // namespace unity
115 
116 #endif
std::list< FilterBase::SCPtr > Filters
List of filters.
Definition: FilterBase.h:106
Abstract base interface for a client to receive the results of a query.
Definition: SearchListenerBase.h:59
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:42