Mir
rpc_report.h
Go to the documentation of this file.
1 /*
2  * Copyright © 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: Alexandros Frantzis <alexandros.frantzis@canonical.com>
17  */
18 
19 #ifndef MIR_CLIENT_RPC_RPC_REPORT_H_
20 #define MIR_CLIENT_RPC_RPC_REPORT_H_
21 
22 #include "mir_toolkit/event.h"
23 #include "mir/fd.h"
24 
25 #include <exception>
26 #include <vector>
27 
28 namespace google
29 {
30 namespace protobuf
31 {
32 class MessageLite;
33 }
34 }
35 
36 namespace mir
37 {
38 namespace protobuf
39 {
40 class Event;
41 
42 namespace wire
43 {
44 class Invocation;
45 class Result;
46 }
47 }
48 namespace client
49 {
50 namespace rpc
51 {
52 
53 class RpcReport
54 {
55 public:
56  virtual ~RpcReport() = default;
57 
58  virtual void invocation_requested(mir::protobuf::wire::Invocation const& invocation) = 0;
59  virtual void invocation_succeeded(mir::protobuf::wire::Invocation const& invocation) = 0;
60  virtual void invocation_failed(mir::protobuf::wire::Invocation const& invocation,
61  std::exception const& ex) = 0;
62 
63  virtual void result_receipt_succeeded(mir::protobuf::wire::Result const& result) = 0;
64  virtual void result_receipt_failed(std::exception const& ex) = 0;
65 
66  virtual void event_parsing_succeeded(MirEvent const& event) = 0;
67  virtual void event_parsing_failed(mir::protobuf::Event const& event) = 0;
68 
69  virtual void orphaned_result(mir::protobuf::wire::Result const& result) = 0;
70  virtual void complete_response(mir::protobuf::wire::Result const& result) = 0;
71 
72  virtual void result_processing_failed(mir::protobuf::wire::Result const& result,
73  std::exception const& ex) = 0;
74 
75  virtual void file_descriptors_received(google::protobuf::MessageLite const& response,
76  std::vector<mir::Fd> const& fds) = 0;
77 
78 protected:
79  RpcReport() = default;
80  RpcReport(RpcReport const&) = delete;
81  RpcReport& operator=(RpcReport const&) = delete;
82 };
83 
84 }
85 }
86 }
87 
88 #endif /* MIR_CLIENT_RPC_RPC_REPORT_H_ */
All things Mir.
Definition: atomic_callback.h:25
virtual void invocation_succeeded(mir::protobuf::wire::Invocation const &invocation)=0
virtual void orphaned_result(mir::protobuf::wire::Result const &result)=0
virtual void result_processing_failed(mir::protobuf::wire::Result const &result, std::exception const &ex)=0
virtual void file_descriptors_received(google::protobuf::MessageLite const &response, std::vector< mir::Fd > const &fds)=0
Definition: rpc_report.h:53
virtual void result_receipt_succeeded(mir::protobuf::wire::Result const &result)=0
virtual void event_parsing_succeeded(MirEvent const &event)=0
virtual void complete_response(mir::protobuf::wire::Result const &result)=0
RpcReport & operator=(RpcReport const &)=delete
virtual ~RpcReport()=default
virtual void invocation_requested(mir::protobuf::wire::Invocation const &invocation)=0
Definition: event_private.h:178
virtual void result_receipt_failed(std::exception const &ex)=0
Definition: mir_basic_rpc_channel.h:28
virtual void event_parsing_failed(mir::protobuf::Event const &event)=0
virtual void invocation_failed(mir::protobuf::wire::Invocation const &invocation, std::exception const &ex)=0

Copyright © 2012-2015 Canonical Ltd.
Generated on Thu Oct 8 16:20:16 UTC 2015