Unity Scopes API
Reply.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/Object.h>
22 #include <unity/scopes/OperationInfo.h>
23 #include <unity/scopes/ReplyProxyFwd.h>
24 
25 #include <exception>
26 
27 namespace unity
28 {
29 
30 namespace scopes
31 {
32 
37 class Reply : public virtual Object
38 {
39 public:
53  virtual void finished() = 0;
54 
63  virtual void error(std::exception_ptr ex) = 0;
64 
76  virtual void info(OperationInfo const& op_info) = 0;
77 
84  virtual ~Reply();
85 
86 protected:
88  Reply();
90 };
91 
92 } // namespace scopes
93 
94 } // namespace unity
virtual void info(OperationInfo const &op_info)=0
Informs the source of a query that additional information regarding the reply is available.
Allows query termination to be sent to the source of a query.
Definition: Reply.h:37
Top-level namespace for all things Unity-related.
Definition: Version.h:49
The root base class for all proxies.
Definition: Object.h:34
virtual ~Reply()
Destroys a Reply.
virtual void finished()=0
Informs the source of a query that the query results are complete.
virtual void error(std::exception_ptr ex)=0
Informs the source of a query that the query was terminated due to an error.
A container for details about something of interest that occurs during the operation of a request...
Definition: OperationInfo.h:42