rendered paste body#ifndef BIRO_H
#define BIRO_H
typedef struct _biro biro_t;
typedef struct _biro_message biro_message_t;
typedef enum _biro_status {
BIRO_STATUS_SUCCESS = 0,
BIRO_STATUS_NO_MEMORY,
} biro_status_t;
/**
* Message handling
**/
typedef enum _biro_message_type {
BIRO_MESSAGE_TYPE_INVALID,
BIRO_MESSAGE_TYPE_METHOD_CALL,
BIRO_MESSAGE_TYPE_METHOD_RETURN,
BIRO_MESSAGE_TYPE_ERROR,
BIRO_MESSAGE_TYPE_SIGNAL,
} biro_message_type_t;
biro_message_t *biro_message_create (biro_message_type_t type);
biro_message_t *biro_message_create_reply (biro_message_type_t type, biro_message_t *request);
void biro_message_reference (biro_message_t *message);
void biro_message_release (biro_message_t *message);
biro_status_t biro_message_status (biro_message_t *message);
/**
* Message context
**/
biro_t *biro_create (biro_message_t *message);
void biro_reference (biro_t *br);
void biro_release (biro_t *br);
biro_status_t biro_status (biro_t *br);
void biro_append_byte (biro_t *br, char value);
void biro_append_boolean (biro_t *br, int value);
void biro_append_int16 (biro_t *br, short value);
void biro_append_uint16 (biro_t *br, unsigned short value);
void biro_append_int32 (biro_t *br, int value);
void biro_append_uint32 (biro_t *br, unsigned int value);
void biro_append_int64 (biro_t *br, long value);
void biro_append_uint64 (biro_t *br, unsigned long value);
void biro_append_float (biro_t *br, float value);
void biro_append_double (biro_t *br, double value);
void biro_append_string (biro_t *br, const char *utf8);
void biro_append_object_path (biro_t *br, const char *utf8);
void biro_append_signature (biro_t *br, const char *ascii);
void biro_append_reference (biro_t *br, biro_message_t *content);
void biro_push_array (biro_t *br);
void biro_push_dict (biro_t *br);
void biro_push_struct (biro_t *br);
void biro_push_variant (biro_t *br);
void biro_pop (biro_t *br);
void biro_save (biro_t *br);
void biro_restore (biro_t *br);
#endif /* BIRO_H */