2 #ifndef __SFI_COM_WIRE_H__
3 #define __SFI_COM_WIRE_H__
14 typedef gboolean (*SfiComDispatch) (gpointer data,
16 const gchar *request_msg,
23 guint remote_input_broke : 1;
24 guint remote_output_broke : 1;
25 guint standard_input_broke : 1;
26 guint standard_output_broke : 1;
27 guint standard_error_broke : 1;
29 SfiComDispatch dispatch_func;
30 gpointer dispatch_data;
31 GDestroyNotify destroy_data;
48 GString *gstring_stdout;
49 GString *gstring_stderr;
64 SFI_COM_MSG_INVALID = 0,
65 SFI_COM_MSG_RESERVED1 = 1,
66 SFI_COM_MSG_RESERVED2 = 2,
67 SFI_COM_MSG_RESERVED3 = 3,
68 SFI_COM_MSG_RESERVED4 = 4,
69 SFI_COM_MSG_REQUEST = 5,
70 SFI_COM_MSG_RESULT = 6
72 #define BSE_MAGIC_BSEm (0x4253456d)
84 SfiComWire* sfi_com_wire_from_pipe (
const gchar *ident,
87 SfiComWire* sfi_com_wire_from_child (
const gchar *ident,
96 guint sfi_com_wire_send_request (SfiComWire *wire,
97 const gchar *request_msg);
98 gchar* sfi_com_wire_receive_result (SfiComWire *wire,
100 void sfi_com_wire_forget_request (SfiComWire *wire,
102 guint sfi_com_wire_peek_first_result (SfiComWire *wire);
105 const gchar* sfi_com_wire_receive_request (SfiComWire *wire,
107 void sfi_com_wire_send_result (SfiComWire *wire,
109 const gchar *result_msg);
110 void sfi_com_wire_discard_request (SfiComWire *wire,
114 void sfi_com_wire_set_dispatcher (SfiComWire *wire,
115 SfiComDispatch dispatch_func,
116 gpointer dispatch_data,
117 GDestroyNotify destroy_data);
118 void sfi_com_wire_dispatch (SfiComWire *wire,
120 gboolean sfi_com_wire_need_dispatch (SfiComWire *wire);
123 gint* sfi_com_wire_get_read_fds (SfiComWire *wire,
125 gint* sfi_com_wire_get_write_fds (SfiComWire *wire,
127 GPollFD* sfi_com_wire_get_poll_fds (SfiComWire *wire,
129 void sfi_com_wire_process_io (SfiComWire *wire);
130 gchar* sfi_com_wire_collect_stdout (SfiComWire *wire,
132 gchar* sfi_com_wire_collect_stderr (SfiComWire *wire,
136 void sfi_com_wire_close_remote (SfiComWire *wire,
138 void sfi_com_wire_destroy (SfiComWire *wire);
142 gboolean sfi_com_wire_receive_dispatch (SfiComWire *wire);
143 void sfi_com_wire_select (SfiComWire *wire,
145 gchar* sfi_com_wire_ping_pong (SfiComWire *wire,
151 void sfi_com_set_spawn_dir (
const gchar *cwd);
152 const char* sfi_com_spawn_async (
const gchar *executable,
154 gint *standard_input,
155 gint *standard_output,
156 gint *standard_error,
157 const gchar *command_fd_option,
159 gint *command_output,
Definition: sficomwire.hh:73
Definition: sfiring.hh:23
Definition: sficomwire.hh:18