1 #ifndef _ECORE_EXE_EO_LEGACY_H_
2 #define _ECORE_EXE_EO_LEGACY_H_
3 
4 #ifndef _ECORE_EXE_EO_CLASS_TYPE
5 #define _ECORE_EXE_EO_CLASS_TYPE
6 
7 typedef Eo Ecore_Exe;
8 
9 #endif
10 
11 #ifndef _ECORE_EXE_EO_TYPES
12 #define _ECORE_EXE_EO_TYPES
13 
14 /** A structure which stores information on lines data from a child process.
15  *
16  * @ingroup Ecore_Exe_Event_Data
17  */
18 typedef struct _Ecore_Exe_Event_Data_Line
19 {
20   char *line; /**< The bytes of a line of buffered data */
21   int size; /**< The size of the line buffer in bytes */
22 } Ecore_Exe_Event_Data_Line;
23 
24 /** Ecore exe event data structure
25  *
26  * @ingroup Ecore_Exe
27  */
28 typedef struct _Ecore_Exe_Event_Data
29 {
30   Efl_Object *exe; /**< The handle to the process. FIXME: should actually be
31                     * Ecore.Exe, workaround cyclic */
32   void *data; /**< The raw binary data from the child process received */
33   int size; /**< The size of this data in bytes */
34   Ecore_Exe_Event_Data_Line *lines; /**< An array of line data if line buffered.
35                                      * The last one has its line member set to
36                                      * @c NULL */
37 } Ecore_Exe_Event_Data;
38 
39 /** Flags for executing a child with its stdin and/or stdout piped back.
40  *
41  * @ingroup Ecore
42  */
43 typedef enum
44 {
45   ECORE_EXE_NONE = 0, /**< No exe flags at all */
46   ECORE_EXE_PIPE_READ = 1, /**< Exe Pipe Read mask */
47   ECORE_EXE_PIPE_WRITE = 2, /**< Exe Pipe Write mask */
48   ECORE_EXE_PIPE_ERROR = 4, /**< Exe Pipe error mask */
49   ECORE_EXE_PIPE_READ_LINE_BUFFERED = 8, /**< Reads are buffered until a newline
50                                           * and split 1 line per
51                                           * Ecore_Exe_Event_Data_Line */
52   ECORE_EXE_PIPE_ERROR_LINE_BUFFERED = 16, /**< Errors are buffered until a
53                                             * newline and split 1 line per
54                                             * Ecore_Exe_Event_Data_Line */
55   ECORE_EXE_PIPE_AUTO = 32, /**< stdout and stderr are buffered automatically */
56   ECORE_EXE_RESPAWN = 64, /**< FIXME: Exe is restarted if it dies */
57   ECORE_EXE_USE_SH = 128, /**< Use /bin/sh to run the command. */
58   ECORE_EXE_NOT_LEADER = 256, /**< Do not use setsid() to set the executed
59                                * process as its own session leader */
60   ECORE_EXE_TERM_WITH_PARENT = 512, /**< Makes child receive SIGTERM when parent
61                                      * dies. */
62   ECORE_EXE_ISOLATE_IO = 1024 /**< Try and isolate stdin/out and err of the
63                                * process so it isn't shared with the parent. */
64 } Ecore_Exe_Flags;
65 
66 
67 #endif
68 
69 
70 
71 #endif
72