From af9315c575b8788b28bb3c5d959a9462b12b9a15 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Sat, 25 Apr 2009 22:11:44 +0100 Subject: More work --- librabbitmq/codegen.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'librabbitmq/codegen.py') diff --git a/librabbitmq/codegen.py b/librabbitmq/codegen.py index 00159ae..474be78 100644 --- a/librabbitmq/codegen.py +++ b/librabbitmq/codegen.py @@ -392,6 +392,26 @@ extern "C" { print "#define %s %s" % (cConstantName(c), v) print + print """/* Function prototypes. */ +extern char const *amqp_method_name(amqp_method_number_t methodNumber); +extern amqp_boolean_t amqp_method_has_content(amqp_method_number_t methodNumber); +extern int amqp_decode_method(amqp_method_number_t methodNumber, + amqp_pool_t *pool, + amqp_bytes_t encoded, + void **decoded); +extern int amqp_decode_properties(uint16_t class_id, + amqp_pool_t *pool, + amqp_bytes_t encoded, + void **decoded); +extern int amqp_encode_method(amqp_method_number_t methodNumber, + void *decoded, + amqp_bytes_t encoded); +extern int amqp_encode_properties(uint16_t class_id, + void *decoded, + amqp_bytes_t encoded); +extern int amqp_exception_category(uint16_t code); +""" + print "/* Method field records. */" for m in methods: methodid = m.klass.index << 16 | m.index -- cgit v1.2.1