Unity Scopes API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ListenerBase.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_LISTENERBASE_H
20 #define UNITY_SCOPES_LISTENERBASE_H
21 
22 #include <unity/scopes/CompletionDetails.h>
23 #include <unity/scopes/OperationInfo.h>
24 #include <unity/util/DefinesPtrs.h>
25 #include <unity/util/NonCopyable.h>
26 
27 #include <string>
28 
29 namespace unity
30 {
31 
32 namespace scopes
33 {
34 
45 {
46 public:
48  NONCOPYABLE(ListenerBase);
49  UNITY_DEFINES_PTRS(ListenerBase);
50 
51  virtual ~ListenerBase();
53 
63  virtual void finished(CompletionDetails const& details) = 0;
64 
76  virtual void info(OperationInfo const& op_info);
77 
78 protected:
80  ListenerBase();
82 };
83 
84 } // namespace scopes
85 
86 } // namespace unity
87 
88 #endif
virtual void finished(CompletionDetails const &details)=0
Called once by the scopes run time after the final result for a request was sent. ...
virtual void info(OperationInfo const &op_info)
Called by the scopes run time each time a scope reports additional information about the reply to a q...
A container for details about the completion status of a query as well as any additional information ...
Definition: CompletionDetails.h:46
A container for details about something of interest that occurs during the operation of a request...
Definition: OperationInfo.h:43
Abstract base class to be notified of request completion (such as a query or activation request)...
Definition: ListenerBase.h:44