1/** 2 * \file 3 * \brief Filter 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_FILTER_H 17#define LIBTERM_CLIENT_FILTER_H 18 19#include <errors/errno.h> 20#include <term/client/client.h> 21#include <term/client/defs.h> 22 23/* input filter */ 24term_filter_id_t term_client_add_input_filter(struct term_client *client, 25 term_filter_fn *filter); 26 27errval_t term_client_remove_input_filter(struct term_client *client, 28 term_filter_id_t id); 29 30void term_client_remove_all_input_filter(struct term_client *client); 31 32/* output filter */ 33term_filter_id_t term_client_add_output_filter(struct term_client *client, 34 term_filter_fn *filter); 35 36errval_t term_client_remove_output_filter(struct term_client *client, 37 term_filter_id_t id); 38 39void term_remove_all_output_filter(struct term_client *client); 40 41/* echo filter */ 42term_filter_id_t term_client_add_echo_filter(struct term_client *client, 43 term_filter_fn *filter); 44 45errval_t term_client_remove_echo_filter(struct term_client *client, 46 term_filter_id_t id); 47 48void term_client_remove_all_echo_filter(struct term_client *client); 49 50#endif // LIBTERM_CLIENT_FILTER_H 51