1 #ifndef _OPENSYNC_QUEUE_INTERNALS_H 2 #define _OPENSYNC_QUEUE_INTERNALS_H 14 OSYNC_QUEUE_EVENT_NONE,
15 OSYNC_QUEUE_EVENT_READ,
16 OSYNC_QUEUE_EVENT_ERROR,
39 GSource *incoming_source;
42 GMainContext *incomingContext;
46 GAsyncQueue *incoming;
47 GAsyncQueue *outgoing;
49 GList *pendingReplies;
52 GSourceFuncs *write_functions;
53 GSource *write_source;
55 GSourceFuncs *read_functions;
64 osync_bool _osync_queue_write_long_long_int(
OSyncQueue *queue,
const long long int message,
OSyncError **error);
73 osync_bool osync_queue_exists(
OSyncQueue *queue);
78 osync_bool osync_queue_is_connected(
OSyncQueue *queue);
87 OSyncQueueEvent osync_queue_poll(
OSyncQueue *queue);
91 osync_bool osync_queue_is_alive(
OSyncQueue *queue);
OSyncMessageHandler message_handler
void osync_queue_set_message_handler(OSyncQueue *queue, OSyncMessageHandler handler, gpointer user_data)
Sets the message handler for a queue.
void(* OSyncMessageHandler)(OSyncMessage *message, void *user_data)
Function which can receive messages.
void osync_queue_setup_with_gmainloop(OSyncQueue *queue, GMainContext *context)
Sets the queue to use the gmainloop with the given context.
OSyncQueue * osync_queue_new(const char *name, OSyncError **error)
Creates a new asynchronous queue.
GSourceFuncs * incoming_functions
Represents a Queue which can be used to receive messages.
OSyncMessage * osync_queue_get_message(OSyncQueue *queue)