1 | #ifndef librabbitmq_examples_utils_h |
---|
2 | #define librabbitmq_examples_utils_h |
---|
3 | |
---|
4 | /* |
---|
5 | * ***** BEGIN LICENSE BLOCK ***** |
---|
6 | * Version: MIT |
---|
7 | * |
---|
8 | * Portions created by VMware are Copyright (c) 2007-2012 VMware, Inc. |
---|
9 | * All Rights Reserved. |
---|
10 | * |
---|
11 | * Portions created by Tony Garnock-Jones are Copyright (c) 2009-2010 |
---|
12 | * VMware, Inc. and Tony Garnock-Jones. All Rights Reserved. |
---|
13 | * |
---|
14 | * Permission is hereby granted, free of charge, to any person |
---|
15 | * obtaining a copy of this software and associated documentation |
---|
16 | * files (the "Software"), to deal in the Software without |
---|
17 | * restriction, including without limitation the rights to use, copy, |
---|
18 | * modify, merge, publish, distribute, sublicense, and/or sell copies |
---|
19 | * of the Software, and to permit persons to whom the Software is |
---|
20 | * furnished to do so, subject to the following conditions: |
---|
21 | * |
---|
22 | * The above copyright notice and this permission notice shall be |
---|
23 | * included in all copies or substantial portions of the Software. |
---|
24 | * |
---|
25 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
---|
26 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
---|
27 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
---|
28 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS |
---|
29 | * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN |
---|
30 | * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
---|
31 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
---|
32 | * SOFTWARE. |
---|
33 | * ***** END LICENSE BLOCK ***** |
---|
34 | */ |
---|
35 | |
---|
36 | extern void die_on_error(int x, char const *context); |
---|
37 | extern void die_on_amqp_error(amqp_rpc_reply_t x, char const *context); |
---|
38 | |
---|
39 | extern void amqp_dump(void const *buffer, size_t len); |
---|
40 | |
---|
41 | extern uint64_t now_microseconds(void); |
---|
42 | extern void microsleep(int usec); |
---|
43 | |
---|
44 | #endif |
---|