1/**
2 * \file
3 * \brief Trigger API for terminal client library.
4 */
5
6/*
7 * Copyright (c) 2012, ETH Zurich.
8 * All rights reserved.
9 *
10 * This file is distributed under the terms in the attached LICENSE file.
11 * If you do not find this file, copies can be found by writing to:
12 * ETH Zurich D-INFK, CAB F.78, Universitaetstr. 6, CH-8092 Zurich,
13 * Attn: Systems Group.
14 */
15
16#ifndef LIBTERM_CLIENT_TRIGGER_H
17#define LIBTERM_CLIENT_TRIGGER_H
18
19#include <barrelfish/waitset.h>
20#include <errors/errno.h>
21#include <term/client/client.h>
22#include <term/client/defs.h>
23
24/* ASCII C0 control characters */
25#include <sys/ttydefaults.h>
26
27struct term_trigger {
28    struct event_closure closure;
29    char trigger_character;
30};
31
32term_trigger_id_t term_client_add_trigger(struct term_client *client,
33                                          struct term_trigger trigger);
34
35errval_t term_client_remove_trigger(struct term_client *client,
36                                    term_trigger_id_t id);
37
38void term_client_remove_all_triggers(struct term_client *client);
39
40#endif // LIBTERM_CLIENT_TRIGGER_H
41