17 #ifndef YAMICORE_AGENT_H_INCLUDED 18 #define YAMICORE_AGENT_H_INCLUDED 20 #include "allocator.h" 21 #include "channel_descriptor.h" 104 void * dispatch_hint,
106 void * disconnection_hook_hint = NULL,
107 void * working_area = NULL, std::size_t area_size = 0);
118 void * dispatch_hint,
120 void * disconnection_hook_hint = NULL,
121 void * working_area = NULL, std::size_t area_size = 0);
131 void install_event_notifications(
133 void * event_notification_hint);
143 void install_io_error_logger(
145 void * io_error_callback_hint);
193 result open(
const char * target);
211 bool & created_new_channel);
220 bool & created_new_channel,
const parameters * overriding_options);
232 result is_open(
const char * target,
262 result close(
const char * target, std::size_t priority = 0);
282 result hard_close(
const char * target);
322 std::size_t priority = 0,
324 void * progress_hint = NULL);
333 result post(
const char * target,
336 std::size_t priority = 0,
338 void * progress_hint = NULL);
375 result add_listener(
const char * target,
377 void * connection_hook_hint = NULL,
378 const char * * resolved_target = NULL);
390 result remove_listener(
const char * target);
421 result do_some_work(std::size_t timeout,
422 bool allow_outgoing_traffic =
true,
423 bool allow_incoming_traffic =
true);
426 result interrupt_work_waiter();
429 void get_channel_usage(
int & max_allowed,
int & used);
432 result get_pending_outgoing_bytes(
434 result get_pending_outgoing_bytes(
435 const char * target, std::size_t & bytes);
440 void operator=(
const agent &);
444 void * dispatch_hint,
446 void * disconnection_hook_hint,
447 void * working_area, std::size_t area_size);
451 details::allocator alloc_;
452 bool uses_private_area_;
454 details::channel_group * ch_group_;
456 int max_channels_allowed_;
464 #endif // YAMICORE_AGENT_H_INCLUDED Descriptor handle for the physical channel.
Definition: channel_descriptor.h:38
void(* closed_connection_function)(void *hint, const char *name, result reason)
Definition: core.h:103
void(* io_error_function)(void *hint, int error_code, const char *description)
Type of function callback for internal I/O error logging.
Definition: core.h:149
Collection of message parameters.
Definition: parameters.h:91
void(* message_progress_function)(void *hint, std::size_t sent_bytes, std::size_t total_byte_count)
Definition: core.h:121
void(* new_incoming_connection_function)(void *hint, const char *source, std::size_t index, std::size_t sequence_number)
Definition: core.h:90
Message broker.
Definition: agent.h:51
Namespace devoted for everything related to YAMI4.
Definition: agent.h:25
void(* incoming_message_dispatch_function)(void *hint, const char *source, const char *header_buffers[], std::size_t header_buffer_sizes[], std::size_t num_of_header_buffers, const char *body_buffers[], std::size_t body_buffer_sizes[], std::size_t num_of_body_buffers)
Definition: core.h:70
void(* event_notification_function)(void *hint, event_notification e, const char *str, std::size_t size)
Definition: core.h:142
Common interface for serializable data source.
Definition: serializable.h:35
result
General type for reporting success and error states.
Definition: core.h:32