| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#include <stdint.h> |
| 5 |
|
| 6 |
#include <popt.h> |
| 7 |
|
| 8 |
#include <rabbitmq-c/amqp.h> |
| 9 |
#include <rabbitmq-c/framing.h> |
| 10 |
|
| 11 |
extern const char *amqp_server_exception_string(amqp_rpc_reply_t r); |
| 12 |
extern const char *amqp_rpc_reply_string(amqp_rpc_reply_t r); |
| 13 |
|
| 14 |
extern void die(const char *fmt, ...) __attribute__((format(printf, 1, 2))); |
| 15 |
extern void die_errno(int err, const char *fmt, ...) |
| 16 |
__attribute__((format(printf, 2, 3))); |
| 17 |
extern void die_amqp_error(int err, const char *fmt, ...) |
| 18 |
__attribute__((format(printf, 2, 3))); |
| 19 |
extern void die_rpc(amqp_rpc_reply_t r, const char *fmt, ...) |
| 20 |
__attribute__((format(printf, 2, 3))); |
| 21 |
|
| 22 |
extern const char *connect_options_title; |
| 23 |
extern struct poptOption connect_options[]; |
| 24 |
extern amqp_connection_state_t make_connection(void); |
| 25 |
extern void close_connection(amqp_connection_state_t conn); |
| 26 |
|
| 27 |
extern amqp_bytes_t read_all(int fd); |
| 28 |
extern void write_all(int fd, amqp_bytes_t data); |
| 29 |
|
| 30 |
extern void copy_body(amqp_connection_state_t conn, int fd); |
| 31 |
|
| 32 |
#define INCLUDE_OPTIONS(options) \ |
| 33 |
{ NULL, 0, POPT_ARG_INCLUDE_TABLE, options, 0, options##_title, NULL } |
| 34 |
|
| 35 |
extern poptContext process_options(int argc, const char **argv, |
| 36 |
struct poptOption *options, |
| 37 |
const char *help); |
| 38 |
extern void process_all_options(int argc, const char **argv, |
| 39 |
struct poptOption *options); |
| 40 |
|
| 41 |
extern amqp_bytes_t cstring_bytes(const char *str); |