Unity Scopes API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ActivationListenerBase.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 #ifndef UNITY_SCOPES_ACTIVATIONLISTENERBASE_H
20 #define UNITY_SCOPES_ACTIVATIONLISTENERBASE_H
21 
22 #include <unity/scopes/ListenerBase.h>
23 #include <unity/util/NonCopyable.h>
24 
25 namespace unity
26 {
27 
28 namespace scopes
29 {
30 class ActivationResponse;
31 
37 {
38 public:
40  NONCOPYABLE(ActivationListenerBase);
41  UNITY_DEFINES_PTRS(ActivationListenerBase);
42 
45 
52  virtual void activated(ActivationResponse const& response);
53 
66  virtual void finished(Reason r, std::string const& error_message) override;
67 
68 protected:
72 };
73 
74 } // namespace scopes
75 
76 } // namespace unity
77 
78 #endif
Base class to receive a response to a result activation request.
Definition: ActivationListenerBase.h:36
Reason
Indicates the cause of a call to finished().
Definition: ListenerBase.h:58
virtual void finished(Reason r, std::string const &error_message) override
Called once by the scopes run time after receiving an activation response.
Definition: ActivationListenerBase.cpp:42
virtual void activated(ActivationResponse const &response)
Called once by the scopes run time with the activation response.
Definition: ActivationListenerBase.cpp:37
Abstract base class to be notified of query completion.
Definition: ListenerBase.h:42
Response to a result activation.
Definition: ActivationResponse.h:41