YAMI4Industry
callbacks.h
Go to the documentation of this file.
1 /* Copyright Inspirel Sp. z o.o. 2013-2015.
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 
18 #ifndef YAMI4INDUSTRY_CALLBACKS_H
19 #define YAMI4INDUSTRY_CALLBACKS_H
20 
21 #include <stddef.h>
22 #include <stdint.h>
23 
24 #ifdef __cplusplus
25 extern "C"
26 {
27 #endif /* __cplusplus */
28 
29 struct yami_agent;
30 
39 typedef void (*yami_raw_message_function)(const char target[],
40  const uint8_t header[], size_t header_size,
41  const uint8_t body[], size_t body_size);
42 
46 {
47  yami_incoming_message, /* new incoming message */
48  yami_message_reply, /* reply from remote receiver */
49  yami_message_rejected, /* outgoing message was rejected */
50  yami_message_abandoned /* outgoing message was abandoned */
51 };
52 
69 typedef void (*yami_message_function)(const char target[],
70  enum yami_message_type message_type,
71  const char object_name[], const char message_name[], const char exception_msg[],
72  int64_t message_id,
73  const uint8_t body[], size_t body_size);
74 
81 typedef void (*yami_io_error_function)(int32_t error_code,
82  const char description[]);
83 
87 {
91 };
92 
99  enum yami_connection_event event, const char target[]);
100 
101 #ifdef __cplusplus
102 }
103 #endif /* __cplusplus */
104 
105 #endif /* YAMI4INDUSTRY_CALLBACKS_H */
void(* yami_io_error_function)(int32_t error_code, const char description[])
Definition: callbacks.h:81
void(* yami_message_function)(const char target[], enum yami_message_type message_type, const char object_name[], const char message_name[], const char exception_msg[], int64_t message_id, const uint8_t body[], size_t body_size)
Definition: callbacks.h:69
Definition: callbacks.h:49
Definition: callbacks.h:90
Definition: callbacks.h:48
void(* yami_connection_event_function)(enum yami_connection_event event, const char target[])
Definition: callbacks.h:98
yami_message_type
Definition: callbacks.h:45
Message broker.
Definition: agent.h:44
Definition: callbacks.h:88
Definition: callbacks.h:50
Definition: callbacks.h:89
void(* yami_raw_message_function)(const char target[], const uint8_t header[], size_t header_size, const uint8_t body[], size_t body_size)
Definition: callbacks.h:39
Definition: callbacks.h:47
yami_connection_event
Definition: callbacks.h:86