Added SILC Thread Queue API
[crypto.git] / apps / irssi / src / fe-common / core / fe-exec.h
1 #ifndef __FE_EXEC_H
2 #define __FE_EXEC_H
3
4 #include "fe-windows.h"
5
6 #define EXEC_WI(query) \
7         MODULE_CHECK_CAST_MODULE(query, EXEC_WI_REC, type, \
8                               "WINDOW ITEM TYPE", "EXEC")
9
10 #define IS_EXEC_WI(query) \
11         (EXEC_WI(query) ? TRUE : FALSE)
12
13 typedef struct PROCESS_REC PROCESS_REC;
14
15 #define STRUCT_SERVER_REC void
16 typedef struct {
17 #include "window-item-rec.h"
18         PROCESS_REC *process;
19         unsigned int destroying:1;
20 } EXEC_WI_REC;
21
22 struct PROCESS_REC {
23         int id;
24         char *name;
25         char *args;
26
27         int pid;
28         GIOChannel *in;
29         NET_SENDBUF_REC *out;
30         LINEBUF_REC *databuf;
31         int read_tag;
32
33         int level; /* what level to use when printing the text */
34         char *target; /* send text with /msg <target> ... */
35         char *target_server;
36         WINDOW_REC *target_win; /* print text to this window */
37         EXEC_WI_REC *target_item; /* print text to this exec window item */
38
39         unsigned int shell:1; /* start the program via /bin/sh */
40         unsigned int notice:1; /* send text with /notice, not /msg if target is set */
41         unsigned int silent:1; /* don't print "process exited with level xx" */
42         unsigned int quiet:1; /* don't print process output at all */
43         unsigned int target_channel:1; /* target is a channel */
44         unsigned int target_nick:1; /* target is a nick */
45 };
46
47 extern GSList *processes;
48
49 void fe_exec_init(void);
50 void fe_exec_deinit(void);
51
52 #endif