diff options
Diffstat (limited to 'libusbmuxd/sock_stuff.h')
| -rw-r--r-- | libusbmuxd/sock_stuff.h | 65 |
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 | |||
| 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 | #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 | ||
| 44 | int create_unix_socket(const char *filename); | ||
| 45 | int connect_unix_socket(const char *filename); | ||
| 46 | #endif | ||
| 47 | int create_socket(uint16_t port); | ||
| 48 | #if defined(WIN32) || defined(__CYGWIN__) | ||
| 49 | int connect_socket(const char *addr, uint16_t port); | ||
| 50 | #endif | ||
| 51 | int check_fd(int fd, fd_mode fdm, unsigned int timeout); | ||
| 52 | |||
| 53 | int shutdown_socket(int fd, int how); | ||
| 54 | int close_socket(int fd); | ||
| 55 | |||
| 56 | int recv_buf(int fd, void *data, size_t size); | ||
| 57 | int peek_buf(int fd, void *data, size_t size); | ||
| 58 | int recv_buf_timeout(int fd, void *data, size_t size, int flags, | ||
| 59 | unsigned int timeout); | ||
| 60 | |||
| 61 | int send_buf(int fd, void *data, size_t size); | ||
| 62 | |||
| 63 | void sock_stuff_set_verbose(int level); | ||
| 64 | |||
| 65 | #endif /* __SOCK_STUFF_H */ | ||
