X-Git-Url: https://git.jankratochvil.net/?p=gnokii.git;a=blobdiff_plain;f=include%2Fdevices%2Ftcp.h;fp=include%2Fdevices%2Ftcp.h;h=0786ae4cb3bc2e94e15a35aac061e6d0078f1058;hp=0000000000000000000000000000000000000000;hb=56289d787a96f7d74273e0d1d1875b487f6cfe39;hpb=e1413f172e2c080b63889db8a957f7f7c984a33e diff --git a/include/devices/tcp.h b/include/devices/tcp.h new file mode 100644 index 0000000..0786ae4 --- /dev/null +++ b/include/devices/tcp.h @@ -0,0 +1,39 @@ +/* + + $Id$ + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Copyright (C) 2002 Jan Kratochvil + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ + +#ifndef __devices_tcp_h +#define __devices_tcp_h + +#ifdef WIN32 + #include + /* FIXME: this should be solved in config.h in 0.4.0 */ + #define __const const + typedef void * __ptr_t; +#else + #include +#endif /* WIN32 */ + +#include "misc.h" + +int tcp_open(__const char *__file); +int tcp_close(int __fd); + +int tcp_opendevice(__const char *__file, int __with_async); + +size_t tcp_read(int __fd, __ptr_t __buf, size_t __nbytes); +size_t tcp_write(int __fd, __const __ptr_t __buf, size_t __n); + +int tcp_select(int fd, struct timeval *timeout); + +#endif /* __devices_tcp_h */