Unity Scopes API
CategorisedResult.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: Pawel Stolowski <pawel.stolowski@canonical.com>
17  */
18 
19 #pragma once
20 
21 #include <unity/scopes/Result.h>
22 #include <unity/scopes/Category.h>
23 
24 namespace unity
25 {
26 
27 namespace scopes
28 {
29 
30 namespace internal
31 {
32  class CategorisedResultImpl;
33  class ResultReplyObject;
34  class SearchReplyImpl;
35 }
36 
42 {
43 public:
45  UNITY_DEFINES_PTRS(CategorisedResult);
47 
53  explicit CategorisedResult(Category::SCPtr category);
54 
58  //{@
60  CategorisedResult& operator=(CategorisedResult const& other);
64 
69  void set_category(Category::SCPtr category);
70 
76  Category::SCPtr category() const;
77 
78 private:
79  CategorisedResult(internal::ResultImpl* impl);
80  internal::CategorisedResultImpl* fwd() const;
81 
82  friend class internal::CategorisedResultImpl;
83  friend class internal::ResultReplyObject;
84  friend class internal::SearchReplyImpl;
85 };
86 
87 } // namespace scopes
88 
89 } // namespace unity
CategorisedResult(Category::SCPtr category)
Creates a CategorisedResult with given category, with all base attributes initially empty...
void set_category(Category::SCPtr category)
Updates the category of this result.
Definition: CategorisedResult.cpp:60
The attributes of a result returned by a Scope.
Definition: Result.h:50
Category::SCPtr category() const
Return category of this result. Get the category instance this result belongs to. ...
Definition: CategorisedResult.cpp:65
Top-level namespace for all things Unity-related.
Definition: Version.h:49
Definition: ActionMetadata.h:31
A result, including the category it belongs to.
Definition: CategorisedResult.h:41