1/**
2 * \file
3 * \brief Terminal emulator.
4 */
5
6/*
7 * Copyright (c) 2007, 2008, 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 BARRELFISH_TERMINAL_H
17#define BARRELFISH_TERMINAL_H
18
19#include <sys/cdefs.h>
20#include <term/client/defs.h>
21
22struct terminal_state {
23    /**
24     * Is domain part of a session or a daemon?
25     */
26    bool session_domain;
27
28    /**
29     * Terminal device used from stdin, stdout and stderr.
30     */
31    struct term_client client;
32};
33
34__BEGIN_DECLS
35
36size_t terminal_write(const char *data, size_t length);
37size_t terminal_read(char *data, size_t count);
38
39errval_t terminal_init(void);
40void terminal_exit(void);
41
42__END_DECLS
43
44#endif // BARRELFISH_TERMINAL_H
45