JULEA
|
Data Structures | |
struct | JMessageData |
struct | JMessageHeader |
struct | JMessage |
Typedefs | |
typedef enum JMessageType | JMessageType |
typedef struct JMessage | JMessage |
typedef enum JMessageSemantics | JMessageSemantics |
typedef struct JMessageData | JMessageData |
typedef struct JMessageHeader | JMessageHeader |
Functions | |
G_END_DECLS G_BEGIN_DECLS JMessage * | j_message_new (JMessageType op_type, gsize length) |
JMessage * | j_message_new_reply (JMessage *message) |
JMessage * | j_message_ref (JMessage *message) |
void | j_message_unref (JMessage *message) |
JMessageType | j_message_get_type (JMessage const *message) |
guint32 | j_message_get_count (JMessage const *message) |
gboolean | j_message_append_1 (JMessage *message, gconstpointer data) |
gboolean | j_message_append_4 (JMessage *message, gconstpointer data) |
gboolean | j_message_append_8 (JMessage *message, gconstpointer data) |
gboolean | j_message_append_n (JMessage *message, gconstpointer data, gsize length) |
gboolean | j_message_append_string (JMessage *message, gchar const *str) |
gchar | j_message_get_1 (JMessage *message) |
gint32 | j_message_get_4 (JMessage *message) |
gint64 | j_message_get_8 (JMessage *message) |
gpointer | j_message_get_n (JMessage *message, gsize length) |
gchar const * | j_message_get_string (JMessage *message) |
gboolean | j_message_send (JMessage *message, gpointer stream) |
gboolean | j_message_receive (JMessage *message, gpointer stream) |
gboolean | j_message_read (JMessage *message, GInputStream *stream) |
gboolean | j_message_write (JMessage *message, GOutputStream *stream) |
void | j_message_add_send (JMessage *message, gconstpointer data, guint64 length) |
void | j_message_add_operation (JMessage *message, gsize length) |
void | j_message_set_semantics (JMessage *message, JSemantics *semantics) |
JSemantics * | j_message_get_semantics (JMessage *message) |
G_STATIC_ASSERT (sizeof(JMessageHeader)==5 *sizeof(guint32)) | |
typedef struct JMessageData JMessageData |
typedef struct JMessageHeader JMessageHeader |
typedef enum JMessageSemantics JMessageSemantics |
typedef enum JMessageType JMessageType |
enum JMessageSemantics |
enum JMessageType |
G_STATIC_ASSERT | ( | sizeof(JMessageHeader) | = =5 *sizeof(guint32) | ) |
void j_message_add_operation | ( | JMessage * | message, |
gsize | length | ||
) |
Adds a new operation to a message.
message | A message. |
length | A length. |
void j_message_add_send | ( | JMessage * | message, |
gconstpointer | data, | ||
guint64 | length | ||
) |
Adds new data to send to a message.
message | A message. |
data | Data. |
length | A length. |
gboolean j_message_append_1 | ( | JMessage * | message, |
gconstpointer | data | ||
) |
Appends 1 byte to a message.
message | A message. |
data | Data to append. |
gboolean j_message_append_4 | ( | JMessage * | message, |
gconstpointer | data | ||
) |
Appends 4 bytes to a message. The bytes are converted to little endian automatically.
message | A message. |
data | Data to append. |
gboolean j_message_append_8 | ( | JMessage * | message, |
gconstpointer | data | ||
) |
Appends 8 bytes to a message. The bytes are converted to little endian automatically.
message | A message. |
data | Data to append. |
gboolean j_message_append_n | ( | JMessage * | message, |
gconstpointer | data, | ||
gsize | length | ||
) |
Appends a number of bytes to a message.
message | A message. |
data | Data to append. |
length | Length of data. |
gboolean j_message_append_string | ( | JMessage * | message, |
gchar const * | str | ||
) |
Appends a string to a message.
message | A message. |
str | String to append. |
gchar j_message_get_1 | ( | JMessage * | message | ) |
Gets 1 byte from a message.
message | A message. |
gint32 j_message_get_4 | ( | JMessage * | message | ) |
Gets 4 bytes from a message. The bytes are converted from little endian automatically.
message | A message. |
gint64 j_message_get_8 | ( | JMessage * | message | ) |
Gets 8 bytes from a message. The bytes are converted from little endian automatically.
message | A message. |
guint32 j_message_get_count | ( | JMessage const * | message | ) |
Returns a message's count.
message | A message. |
gpointer j_message_get_n | ( | JMessage * | message, |
gsize | length | ||
) |
Gets n bytes from a message.
message | A message. |
length | Number of bytes to get. |
JSemantics * j_message_get_semantics | ( | JMessage * | message | ) |
get the semantics of a message.
message | A message. |
gchar const * j_message_get_string | ( | JMessage * | message | ) |
Gets a string from a message.
message | A message. |
JMessageType j_message_get_type | ( | JMessage const * | message | ) |
Returns a message's type.
message | A message. |
JMessage * j_message_new | ( | JMessageType | op_type, |
gsize | length | ||
) |
Creates a new message.
op_type | An operation type. |
length | A length. |
Creates a new reply message.
message | A message. |
gboolean j_message_read | ( | JMessage * | message, |
GInputStream * | stream | ||
) |
Reads a message from the network.
message | A message. |
stream | A network stream. |
gboolean j_message_receive | ( | JMessage * | message, |
gpointer | stream | ||
) |
Reads a message from the network.
message | A message. |
stream | A network stream. |
Increases a message's reference count.
message | A message. |
message
. gboolean j_message_send | ( | JMessage * | message, |
gpointer | stream | ||
) |
Writes a message to the network.
message | A message. |
stream | A network stream. |
void j_message_set_semantics | ( | JMessage * | message, |
JSemantics * | semantics | ||
) |
Set the semantics of a message.
message | A message. |
semantics | A semantics object. |
void j_message_unref | ( | JMessage * | message | ) |
Decreases a message's reference count. When the reference count reaches zero, frees the memory allocated for the message.
message | A message. |
gboolean j_message_write | ( | JMessage * | message, |
GOutputStream * | stream | ||
) |
Writes a message to the network.
message | A message. |
stream | A network stream. |