summaryrefslogtreecommitdiffstats
path: root/libusbmuxd/sock_stuff.h
diff options
context:
space:
mode:
Diffstat (limited to 'libusbmuxd/sock_stuff.h')
-rw-r--r--libusbmuxd/sock_stuff.h57
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
4Copyright (C) 2009 Nikias Bassen <nikias@gmx.li>
5Copyright (C) 2009 Paul Sladen <libiphone@paul.sladen.org>
6Copyright (C) 2009 Martin Szulecki <opensuse@sukimashita.com>
7
8This library is free software; you can redistribute it and/or modify
9it under the terms of the GNU Lesser General Public License as
10published by the Free Software Foundation, either version 2.1 of the
11License, or (at your option) any later version.
12
13This library is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16GNU General Public License for more details.
17
18You should have received a copy of the GNU Lesser General Public
19License along with this program; if not, write to the Free Software
20Foundation, 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
29enum fd_mode {
30 FDM_READ,
31 FDM_WRITE,
32 FDM_EXCEPT
33};
34typedef enum fd_mode fd_mode;
35
36#ifndef WIN32
37int create_unix_socket(const char *filename);
38int connect_unix_socket(const char *filename);
39#endif
40int create_socket(uint16_t port);
41#if defined(WIN32) || defined(__CYGWIN__)
42int connect_socket(const char *addr, uint16_t port);
43#endif
44int check_fd(int fd, fd_mode fdm, unsigned int timeout);
45
46int close_socket(int fd);
47
48int recv_buf(int fd, void *data, size_t size);
49int peek_buf(int fd, void *data, size_t size);
50int recv_buf_timeout(int fd, void *data, size_t size, int flags,
51 unsigned int timeout);
52
53int send_buf(int fd, void *data, size_t size);
54
55void sock_stuff_set_verbose(int level);
56
57#endif /* __SOCK_STUFF_H */