Implemented connection type "tcp" (GCT_TCP), use <hostname>:<port> as "port"
[gnokii.git] / include / devices / tcp.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) 2002 Jan Kratochvil
10
11   Released under the terms of the GNU GPL, see file COPYING for more details.
12
13 */
14
15 #ifndef __devices_tcp_h
16 #define __devices_tcp_h
17
18 #ifdef WIN32
19   #include <stddef.h>
20   /* FIXME: this should be solved in config.h in 0.4.0 */
21   #define __const const
22   typedef void * __ptr_t;
23 #else
24   #include <unistd.h>
25 #endif  /* WIN32 */
26
27 #include "misc.h"
28
29 int tcp_open(__const char *__file);
30 int tcp_close(int __fd);
31
32 int tcp_opendevice(__const char *__file, int __with_async);
33
34 size_t tcp_read(int __fd, __ptr_t __buf, size_t __nbytes);
35 size_t tcp_write(int __fd, __const __ptr_t __buf, size_t __n);
36
37 int tcp_select(int fd, struct timeval *timeout);
38
39 #endif  /* __devices_tcp_h */