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.h65
1 files changed, 0 insertions, 65 deletions
diff --git a/libusbmuxd/sock_stuff.h b/libusbmuxd/sock_stuff.h
deleted file mode 100644
index 5efcd27..0000000
--- a/libusbmuxd/sock_stuff.h
+++ /dev/null
@@ -1,65 +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#ifdef WIN32
37#include <winsock2.h>
38#define SHUT_RD SD_READ
39#define SHUT_WR SD_WRITE
40#define SHUT_RDWR SD_BOTH
41#endif
42
43#ifndef WIN32
44int create_unix_socket(const char *filename);
45int connect_unix_socket(const char *filename);
46#endif
47int create_socket(uint16_t port);
48#if defined(WIN32) || defined(__CYGWIN__)
49int connect_socket(const char *addr, uint16_t port);
50#endif
51int check_fd(int fd, fd_mode fdm, unsigned int timeout);
52
53int shutdown_socket(int fd, int how);
54int close_socket(int fd);
55
56int recv_buf(int fd, void *data, size_t size);
57int peek_buf(int fd, void *data, size_t size);
58int recv_buf_timeout(int fd, void *data, size_t size, int flags,
59 unsigned int timeout);
60
61int send_buf(int fd, void *data, size_t size);
62
63void sock_stuff_set_verbose(int level);
64
65#endif /* __SOCK_STUFF_H */