YAMI4 C++
agent_impl_base.h
1 // Copyright Maciej Sobczak 2008-2019.
2 // This file is part of YAMI4.
3 //
4 // YAMI4 is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // YAMI4 is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with YAMI4. If not, see <http://www.gnu.org/licenses/>.
16 
17 #ifndef YAMICPP_AGENT_IMPL_BASE_H_INCLUDED
18 #define YAMICPP_AGENT_IMPL_BASE_H_INCLUDED
19 
20 #include "connection_event_dispatcher_base.h"
21 #include "incoming_message_dispatcher_base.h"
22 #include "io_error_dispatcher_base.h"
23 #include "outgoing_message_dispatcher_base.h"
24 #include <yami4-core/dll.h>
25 
26 #include <memory>
27 #include <string>
28 
29 namespace yami
30 {
31 
32 class serializable;
33 
34 namespace details
35 {
36 
37 class DLL agent_impl_base
38 {
39 public:
40  virtual ~agent_impl_base() {}
41 
42  virtual void register_object(
43  const std::string & object_name,
44  std::unique_ptr<incoming_message_dispatcher_base> & object) = 0;
45 
46  virtual long long send(
47  std::unique_ptr<outgoing_message_dispatcher_base> &
48  outgoing_message_callback,
49  const std::string & target,
50  const std::string & object_name,
51  const std::string & message_name,
52  const serializable & content,
53  std::size_t priority,
54  bool auto_connect) = 0;
55 
56  virtual void register_connection_event_monitor(
57  std::unique_ptr<connection_event_dispatcher_base> & monitor) = 0;
58 
59  virtual void register_io_error_logger(
60  std::unique_ptr<io_error_dispatcher_base> & logger) = 0;
61 };
62 
63 } // namespace details
64 
65 } // namespace yami
66 
67 #endif // YAMICPP_AGENT_IMPL_BASE_H_INCLUDED
Namespace devoted to everything related to YAMI4.
Definition: activity_statistics_monitor.cpp:27