JULEA
Data Structures | Macros | Typedefs | Enumerations | Functions
jmessage.c File Reference
#include <julea-config.h>
#include <glib.h>
#include <gio/gio.h>
#include <math.h>
#include <string.h>
#include <jmessage.h>
#include <jhelper.h>
#include <jlist.h>
#include <jlist-iterator.h>
#include <jsemantics.h>
#include <jtrace.h>

Data Structures

struct  JMessageData
 
struct  JMessageHeader
 
struct  JMessage
 

Macros

#define SERIALIZE_SEMANTICS(type, key)
 
#define DESERIALIZE_SEMANTICS(type, key)
 

Typedefs

typedef enum JMessageSemantics JMessageSemantics
 
typedef struct JMessageData JMessageData
 
typedef struct JMessageHeader JMessageHeader
 

Enumerations

enum  JMessageSemantics {
  J_MESSAGE_SEMANTICS_ATOMICITY_BATCH = 1 << 0 , J_MESSAGE_SEMANTICS_ATOMICITY_OPERATION = 1 << 1 , J_MESSAGE_SEMANTICS_ATOMICITY_NONE = 1 << 2 , J_MESSAGE_SEMANTICS_CONSISTENCY_IMMEDIATE = 1 << 3 ,
  J_MESSAGE_SEMANTICS_CONSISTENCY_SESSION = 1 << 4 , J_MESSAGE_SEMANTICS_CONSISTENCY_EVENTUAL = 1 << 5 , J_MESSAGE_SEMANTICS_PERSISTENCY_STORAGE = 1 << 6 , J_MESSAGE_SEMANTICS_PERSISTENCY_NETWORK = 1 << 7 ,
  J_MESSAGE_SEMANTICS_PERSISTENCY_NONE = 1 << 8 , J_MESSAGE_SEMANTICS_SECURITY_STRICT = 1 << 9 , J_MESSAGE_SEMANTICS_SECURITY_NONE = 1 << 10
}
 

Functions

 G_STATIC_ASSERT (sizeof(JMessageHeader)==5 *sizeof(guint32))
 
G_END_DECLS G_BEGIN_DECLS JMessagej_message_new (JMessageType op_type, gsize length)
 
JMessagej_message_new_reply (JMessage *message)
 
JMessagej_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_receive (JMessage *message, gpointer stream)
 
gboolean j_message_send (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)
 
JSemanticsj_message_get_semantics (JMessage *message)
 

Macro Definition Documentation

◆ DESERIALIZE_SEMANTICS

#define DESERIALIZE_SEMANTICS (   type,
  key 
)
Value:
if (serialized_semantics & J_MESSAGE_SEMANTICS_##type##_##key) \
{ \
j_semantics_set(semantics, J_SEMANTICS_##type, J_SEMANTICS_##type##_##key); \
}

◆ SERIALIZE_SEMANTICS

#define SERIALIZE_SEMANTICS (   type,
  key 
)
Value:
{ \
gint tmp; \
tmp = j_semantics_get(semantics, J_SEMANTICS_##type); \
if (tmp == J_SEMANTICS_##type##_##key) \
{ \
serialized_semantics |= J_MESSAGE_SEMANTICS_##type##_##key; \
} \
}
gint j_semantics_get(JSemantics *semantics, JSemanticsType key)
Definition: jsemantics.c:293