diff options
author | Timo Dörr <timo@latecrew.de> | 2013-10-04 17:18:41 +0200 |
---|---|---|
committer | Timo Dörr <timo@latecrew.de> | 2013-10-23 14:08:07 +0200 |
commit | 921d9015736205bb03a02985f6046d931cdd26c9 (patch) | |
tree | eeb00d06512f51c2140c5d342d40eb7da4ef19e2 /ufo/ufo-remote-node.h | |
parent | 89fc1edf44ca48086c193d5ad64d6a0f7ee12660 (diff) |
Abstract away communication into interface
* Create generic interface ufo_messenger_iface
* Move all zmq_* stuff into ufo_zmq_messenger that implements that
interface
* also fixes a bug that happened when closing the zmq_socket from
another thread by introducing a special TERMINATE message that
will kill ufo-daemon
Diffstat (limited to 'ufo/ufo-remote-node.h')
-rw-r--r-- | ufo/ufo-remote-node.h | 46 |
1 files changed, 1 insertions, 45 deletions
diff --git a/ufo/ufo-remote-node.h b/ufo/ufo-remote-node.h index 1124ddd..c73ec00 100644 --- a/ufo/ufo-remote-node.h +++ b/ufo/ufo-remote-node.h @@ -27,6 +27,7 @@ #include <ufo/ufo-node.h> #include <ufo/ufo-buffer.h> #include <ufo/ufo-task-iface.h> +#include <ufo/ufo-messenger-iface.h> G_BEGIN_DECLS @@ -40,7 +41,6 @@ G_BEGIN_DECLS typedef struct _UfoRemoteNode UfoRemoteNode; typedef struct _UfoRemoteNodeClass UfoRemoteNodeClass; typedef struct _UfoRemoteNodePrivate UfoRemoteNodePrivate; -typedef struct _UfoMessage UfoMessage; /** * UfoRemoteNode: @@ -78,50 +78,6 @@ typedef enum { } UfoRemoteMode; -/** - * UfoMessageType: (skip) - * @UFO_MESSAGE_STREAM_JSON: insert - * @UFO_MESSAGE_REPLICATE_JSON: insert - * @UFO_MESSAGE_GET_NUM_DEVICES: insert - * @UFO_MESSAGE_SETUP: insert - * @UFO_MESSAGE_GET_STRUCTURE: insert - * @UFO_MESSAGE_STRUCTURE: insert - * @UFO_MESSAGE_GET_REQUISITION: insert - * @UFO_MESSAGE_REQUISITION: insert - * @UFO_MESSAGE_SEND_INPUTS: insert - * @UFO_MESSAGE_GET_RESULT: insert - * @UFO_MESSAGE_RESULT: insert - * @UFO_MESSAGE_CLEANUP: insert - * @UFO_MESSAGE_ACK: insert - */ -typedef enum { - UFO_MESSAGE_STREAM_JSON = 0, - UFO_MESSAGE_REPLICATE_JSON, - UFO_MESSAGE_GET_NUM_DEVICES, - UFO_MESSAGE_SETUP, - UFO_MESSAGE_GET_STRUCTURE, - UFO_MESSAGE_STRUCTURE, - UFO_MESSAGE_GET_REQUISITION, - UFO_MESSAGE_REQUISITION, - UFO_MESSAGE_SEND_INPUTS, - UFO_MESSAGE_GET_RESULT, - UFO_MESSAGE_RESULT, - UFO_MESSAGE_CLEANUP, - UFO_MESSAGE_ACK -} UfoMessageType; - -/** - * UfoMessage: (skip) - * @type: Type of the wire message - */ -struct _UfoMessage { - UfoMessageType type; - - union { - guint16 n_inputs; - guint16 n_devices; - } d; -}; UfoNode *ufo_remote_node_new (const gchar *address); guint ufo_remote_node_get_num_gpus (UfoRemoteNode *node); |