Unity Scopes API
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 #pragma once
20 
21 #include <unity/scopes/CompletionDetails.h>
22 #include <unity/scopes/OperationInfo.h>
23 #include <unity/util/DefinesPtrs.h>
24 #include <unity/util/NonCopyable.h>
25 
26 #include <string>
27 
28 namespace unity
29 {
30 
31 namespace scopes
32 {
33 
44 {
45 public:
47  NONCOPYABLE(ListenerBase);
48  UNITY_DEFINES_PTRS(ListenerBase);
49 
50  virtual ~ListenerBase();
52 
62  virtual void finished(CompletionDetails const& details) = 0;
63 
75  virtual void info(OperationInfo const& op_info);
76 
77 protected:
79  ListenerBase();
81 };
82 
83 } // namespace scopes
84 
85 } // namespace unity
virtual void finished(CompletionDetails const &details)=0
Called once by the scopes run time after the final result for a request was sent. ...
Top-level namespace for all things Unity-related.
Definition: Version.h:49
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:45
A container for details about something of interest that occurs during the operation of a request...
Definition: OperationInfo.h:42
Abstract base class to be notified of request completion (such as a query or activation request)...
Definition: ListenerBase.h:43