msgs.h File Reference


Detailed Description

Dynamic array of dba_msg.

#include <dballe/msg/msg.h>

Go to the source code of this file.

Data Structures

struct  _dba_msgs
 Dynamic array of dba_msg. More...

Typedefs

typedef struct _dba_msgsdba_msgs
 Dynamic array of dba_msg.

Functions

dba_err dba_msgs_create (dba_msgs *msgs)
 Create a new message array.
void dba_msgs_delete (dba_msgs msgs)
 Delete a message array, and all messages it contains.
dba_err dba_msgs_append_acquire (dba_msgs msgs, dba_msg msg)
 Append a message to the array, taking over its memory management.
void dba_msgs_print (dba_msgs msgs, FILE *out)
 Dump all the contents of the message to the given stream.
void dba_msgs_diff (dba_msgs msgs1, dba_msgs msgs2, int *diffs, FILE *out)
 Print the differences between two dba_msgs to a stream.


Function Documentation

dba_err dba_msgs_append_acquire ( dba_msgs  msgs,
dba_msg  msg 
)

Append a message to the array, taking over its memory management.

Parameters:
msgs The message array to which the message is to be appended.
msg The message to append. The dba_msgs array will take over memory management for it.
Returns:
The error indicator for the function (See error.h)

References _dba_msgs::alloclen, _dba_msgs::len, and _dba_msgs::msgs.

dba_err dba_msgs_create ( dba_msgs msgs  ) 

Create a new message array.

Return values:
msgs The newly created dba_msgs.
Returns:
The error indicator for the function (See error.h)

void dba_msgs_delete ( dba_msgs  msgs  ) 

Delete a message array, and all messages it contains.

Parameters:
msgs The message array to delete.

References _dba_msgs::len, and _dba_msgs::msgs.

void dba_msgs_diff ( dba_msgs  msgs1,
dba_msgs  msgs2,
int *  diffs,
FILE *  out 
)

Print the differences between two dba_msgs to a stream.

Parameters:
msgs1 First dba_msgs to compare
msgs2 Second dba_msgs to compare
Return values:
diffs Integer variable that will be incremented by the number of differences found.
Parameters:
out The stream to dump a description of the differences to.

References _dba_msgs::len, and _dba_msgs::msgs.

void dba_msgs_print ( dba_msgs  msgs,
FILE *  out 
)

Dump all the contents of the message to the given stream.

Parameters:
msgs The dba_msgs to dump
out The stream to dump the contents of the dba_msg to.

References _dba_msgs::len, and _dba_msgs::msgs.


Generated on Sun May 18 20:42:41 2008 for libdballe by  doxygen 1.5.5