diff options
Diffstat (limited to 'libusbmuxd/sock_stuff.h')
-rw-r--r-- | libusbmuxd/sock_stuff.h | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/libusbmuxd/sock_stuff.h b/libusbmuxd/sock_stuff.h deleted file mode 100644 index eb9622c..0000000 --- a/libusbmuxd/sock_stuff.h +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | /* | ||
2 | libusbmuxd - client library to talk to usbmuxd | ||
3 | |||
4 | Copyright (C) 2009 Nikias Bassen <nikias@gmx.li> | ||
5 | Copyright (C) 2009 Paul Sladen <libiphone@paul.sladen.org> | ||
6 | Copyright (C) 2009 Martin Szulecki <opensuse@sukimashita.com> | ||
7 | |||
8 | This library is free software; you can redistribute it and/or modify | ||
9 | it under the terms of the GNU Lesser General Public License as | ||
10 | published by the Free Software Foundation, either version 2.1 of the | ||
11 | License, or (at your option) any later version. | ||
12 | |||
13 | This library is distributed in the hope that it will be useful, | ||
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | GNU General Public License for more details. | ||
17 | |||
18 | You should have received a copy of the GNU Lesser General Public | ||
19 | License along with this program; if not, write to the Free Software | ||
20 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
21 | |||
22 | */ | ||
23 | |||
24 | #ifndef __SOCK_STUFF_H | ||
25 | #define __SOCK_STUFF_H | ||
26 | |||
27 | #include <stdint.h> | ||
28 | |||
29 | enum fd_mode { | ||
30 | FDM_READ, | ||
31 | FDM_WRITE, | ||
32 | FDM_EXCEPT | ||
33 | }; | ||
34 | typedef enum fd_mode fd_mode; | ||
35 | |||
36 | #ifndef WIN32 | ||
37 | int create_unix_socket(const char *filename); | ||
38 | int connect_unix_socket(const char *filename); | ||
39 | #endif | ||
40 | int create_socket(uint16_t port); | ||
41 | #if defined(WIN32) || defined(__CYGWIN__) | ||
42 | int connect_socket(const char *addr, uint16_t port); | ||
43 | #endif | ||
44 | int check_fd(int fd, fd_mode fdm, unsigned int timeout); | ||
45 | |||
46 | int close_socket(int fd); | ||
47 | |||
48 | int recv_buf(int fd, void *data, size_t size); | ||
49 | int peek_buf(int fd, void *data, size_t size); | ||
50 | int recv_buf_timeout(int fd, void *data, size_t size, int flags, | ||
51 | unsigned int timeout); | ||
52 | |||
53 | int send_buf(int fd, void *data, size_t size); | ||
54 | |||
55 | void sock_stuff_set_verbose(int level); | ||
56 | |||
57 | #endif /* __SOCK_STUFF_H */ | ||