-typedef unsigned int gras_msgid_t;
-typedef struct gras_msgheader_s gras_msgheader_t;
-typedef struct gras_msgentry_s gras_msgentry_t;
-
-/**
- * A message sent or received to/from the network
- *
- * Do not mess with the content of this structure. Only access it through the following functions:
- * @gras_msg_new() or @gras_msg_copy() to create such struct.
- * @gras_msg_free() to get ride of it.
- * @gras_msg_ctn() to read its content.
- *
- */
-typedef struct {
- /* public */
- gras_socket_t *sock; /** the socket on which the message was received (to answer) */
-
- /* private */
- gras_msgheader_t *header;
- gras_msgentry_t *entry;
- unsigned int *dataCount;
- void **data;
- e_gras_free_directive_t freeDirective;
-} gras_msg_t;
-
-/**
- * gras_msgtype_register:
- * @msgId: identificator of such messages
- * @name: name as it should be used for logging messages
- * @sequence_count: number of groups in variadics
- * @Varargs: List of (const DataDescriptor *, int DDcount), describing the
- * elements in each sequence (DDlength is the length of the corresponding
- * DataDescriptor).
- * @Returns: the error code (or no_error).
- *
- * Registers a message to the GRAS mecanism.
- */
-gras_error_t
-gras_msgtype_register(gras_msgid_t msgId,
- const char *name,
- int sequence_count,
- ...);
-
-/**
- * gras_msg_new_and_send:
- * @sd: Socket on which the message should be sent
- * @msgId: identificator this messages
- * @Varargs: List of (void **data, int seqLen) forming the payload of the message.
- * The number of sequences is given by the registration of ht
- * @Returns: the error code (or no_error).
- *
- * Create a new message, and send it on the network through the given socket.
- */
-gras_error_t
-gras_msg_new_and_send(gras_socket_t *sd,
- gras_msgid_t msgId,
- int seqCount,
- ...);
-
-
-/**
- * gras_msg_new:
- * @msgId: identificator this messages
- * @free_data_on_free: boolean indicating wheater the data must be freed when the msg get freed.
- * @seqCount: number of sequences in this message (must be the same than the value
- * registered using gras_msgtype_register() for that msgId)
- * @Varargs: List of (void **data, int seqLen) forming the payload of the message.
- * The number of sequences is given by the registration of ht
- * @Returns: the message built or NULL on error
- *
- * Build a message to be sent
- */
-
-gras_msg_t *gras_msg_new(gras_msgid_t msgId,
- e_gras_free_directive_t free_data_on_free,
- int seqCount,
- ...);
-
-/**
- * gras_msg_new_va:
- *
- * Build a new message in the exact same way than gras_msg_new(), but taking its arguments as
- * variadic ones.
- */
-gras_msg_t *gras_msg_new_va(gras_msgid_t msgId,
- e_gras_free_directive_t free_data,
- int seqCount,
- va_list ap);
-
-/**
- * gras_msg_copy:
- * @msg: original to copy.
- *
- * Copy a message.
- */