2 * FreeRDP: A Remote Desktop Protocol client.
3 * Serial Port Device Service Virtual Channel
5 * Copyright 2011 O.S. Systems Software Ltda.
6 * Copyright 2011 Eduardo Fiss Beloni <beloni@ossystems.com.br>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
21 #ifndef __SERIAL_TTY_H
22 #define __SERIAL_TTY_H
24 #include <sys/types.h>
28 typedef struct _SERIAL_TTY SERIAL_TTY;
42 uint32 queue_out_size;
44 uint32 read_interval_timeout;
45 uint32 read_total_timeout_multiplier;
46 uint32 read_total_timeout_constant;
47 uint32 write_total_timeout_multiplier;
48 uint32 write_total_timeout_constant;
53 struct termios* ptermios;
54 struct termios* pold_termios;
63 SERIAL_TTY* serial_tty_new(const char* path, uint32 id);
64 void serial_tty_free(SERIAL_TTY* tty);
66 boolean serial_tty_read(SERIAL_TTY* tty, uint8* buffer, uint32* Length);
67 boolean serial_tty_write(SERIAL_TTY* tty, uint8* buffer, uint32 Length);
68 uint32 serial_tty_control(SERIAL_TTY* tty, uint32 IoControlCode, STREAM* input, STREAM* output, uint32* abort_io);
70 boolean serial_tty_get_event(SERIAL_TTY* tty, uint32* result);
72 #endif /* __SERIAL_TTY_H */