Implemented connection type "tcp" (GCT_TCP), use <hostname>:<port> as "port"
[gnokii.git] / include / devices / unixserial.h
1 /*
2
3   $Id$
4
5   G N O K I I
6
7   A Linux/Unix toolset and driver for Nokia mobile phones.
8
9   Copyright (C) 1999, 2000 Hugh Blemings & Pavel Janík ml.
10
11   Released under the terms of the GNU GPL, see file COPYING for more details.
12
13   $Log$
14   Revision 1.1.1.5  2002/04/03 01:44:15  short
15   Implemented connection type "tcp" (GCT_TCP), use <hostname>:<port> as "port"
16
17   Revision 1.1.1.4  2002/04/03 00:08:20  short
18   Found in "gnokii-working" directory, some November-patches version
19
20   Revision 1.2  2001/08/20 23:27:37  pkot
21   Add hardware shakehand to the link layer (Manfred Jonsson)
22
23   Revision 1.1  2001/02/21 19:57:12  chris
24   More fiddling with the directory layout
25
26
27 */
28
29 #ifndef __devices_unixserial_h
30 #define __devices_unixserial_h
31
32 #ifdef WIN32
33   #include <stddef.h>
34   /* FIXME: this should be solved in config.h in 0.4.0 */
35   #define __const const
36   typedef void * __ptr_t;
37 #else
38   #include <unistd.h>
39 #endif  /* WIN32 */
40
41 #include "misc.h"
42
43 int serial_open(__const char *__file, int __oflag);
44 int serial_close(int __fd);
45
46 int serial_opendevice(__const char *__file, int __with_odd_parity, int __with_async, int __with_hw_handshake);
47
48 void serial_setdtrrts(int __fd, int __dtr, int __rts);
49 bool serial_changespeed(int __fd, int __speed);
50
51 size_t serial_read(int __fd, __ptr_t __buf, size_t __nbytes);
52 size_t serial_write(int __fd, __const __ptr_t __buf, size_t __n);
53
54 int serial_select(int fd, struct timeval *timeout);
55
56 extern int serial_close_all_openfds[0x10];
57 extern void serial_close_all(void);
58 extern int device_script(int fd, const char *section);
59 extern void unixserial_interrupted(int signo);
60
61 #endif  /* __devices_unixserial_h */
62
63
64
65