summaryrefslogtreecommitdiff
path: root/src/plugins/scripts/script-api.h
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2009-03-06 18:22:34 +0100
committerSebastien Helleu <flashcode@flashtux.org>2009-03-06 18:22:34 +0100
commit8e551473641151d1e5f043ac279eca399daff5fb (patch)
tree0374c21edec94e29b550c61819bff51c1381c16f /src/plugins/scripts/script-api.h
parent0fd8bbc2de94705d94b56966d681264f73b48dd2 (diff)
downloadweechat-8e551473641151d1e5f043ac279eca399daff5fb.zip
Add new hook type "process": launch command with fork and catch result (rc/stdout/stderr) via callback
Diffstat (limited to 'src/plugins/scripts/script-api.h')
-rw-r--r--src/plugins/scripts/script-api.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/plugins/scripts/script-api.h b/src/plugins/scripts/script-api.h
index 37e3c6ca3..1bb20f0e5 100644
--- a/src/plugins/scripts/script-api.h
+++ b/src/plugins/scripts/script-api.h
@@ -129,7 +129,8 @@ extern struct t_hook *script_api_hook_timer (struct t_weechat_plugin *weechat_pl
struct t_plugin_script *script,
int interval, int align_second,
int max_calls,
- int (*callback)(void *data),
+ int (*callback)(void *data,
+ int remaining_calls),
const char *function);
extern struct t_hook *script_api_hook_fd (struct t_weechat_plugin *weechat_plugin,
struct t_plugin_script *script,
@@ -137,6 +138,16 @@ extern struct t_hook *script_api_hook_fd (struct t_weechat_plugin *weechat_plugi
int flag_write, int flag_exception,
int (*callback)(void *data, int fd),
const char *function);
+extern struct t_hook *script_api_hook_process (struct t_weechat_plugin *weechat_plugin,
+ struct t_plugin_script *script,
+ const char *command,
+ int timeout,
+ int (*callback)(void *data,
+ const char *command,
+ int return_code,
+ const char *stdout,
+ const char *stderr),
+ const char *function);
extern struct t_hook *script_api_hook_connect (struct t_weechat_plugin *weechat_plugin,
struct t_plugin_script *script,
const char *proxy,