summaryrefslogtreecommitdiff
path: root/src/libsystemd-shared/include/systemd-shared/ptyfwd.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd-shared/include/systemd-shared/ptyfwd.h')
-rw-r--r--src/libsystemd-shared/include/systemd-shared/ptyfwd.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libsystemd-shared/include/systemd-shared/ptyfwd.h b/src/libsystemd-shared/include/systemd-shared/ptyfwd.h
index ae9ef32d79..b57f421eb3 100644
--- a/src/libsystemd-shared/include/systemd-shared/ptyfwd.h
+++ b/src/libsystemd-shared/include/systemd-shared/ptyfwd.h
@@ -37,12 +37,18 @@ typedef enum PTYForwardFlags {
PTY_FORWARD_IGNORE_INITIAL_VHANGUP = 4,
} PTYForwardFlags;
+typedef int (*PTYForwardHandler)(PTYForward *f, int rcode, void*userdata);
+
int pty_forward_new(sd_event *event, int master, PTYForwardFlags flags, PTYForward **f);
PTYForward *pty_forward_free(PTYForward *f);
int pty_forward_get_last_char(PTYForward *f, char *ch);
int pty_forward_set_ignore_vhangup(PTYForward *f, bool ignore_vhangup);
-int pty_forward_get_ignore_vhangup(PTYForward *f);
+bool pty_forward_get_ignore_vhangup(PTYForward *f);
+
+bool pty_forward_is_done(PTYForward *f);
+
+void pty_forward_set_handler(PTYForward *f, PTYForwardHandler handler, void *userdata);
DEFINE_TRIVIAL_CLEANUP_FUNC(PTYForward*, pty_forward_free);