Main Page | Class List | File List | Class Members | File Members

cddb_net.h

Go to the documentation of this file.
00001 /* 00002 $Id: cddb_net.h,v 1.10 2004/07/21 16:11:06 airborne Exp $ 00003 00004 Copyright (C) 2003, 2004 Kris Verbeeck <airborne@advalvas.be> 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Library General Public 00008 License as published by the Free Software Foundation; either 00009 version 2 of the License, or (at your option) any later version. 00010 00011 This library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Library General Public License for more details. 00015 00016 You should have received a copy of the GNU Library General Public 00017 License along with this library; if not, write to the 00018 Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00019 Boston, MA 02111-1307, USA. 00020 */ 00021 00022 #ifndef CDDB_NET_H 00023 #define CDDB_NET_H 1 00024 00025 #ifdef __cplusplus 00026 extern "C" { 00027 #endif 00028 00029 00030 #include <stdarg.h> 00031 00032 #if defined( UNDER_CE ) 00033 # include <winsock.h> 00034 #elif defined( WIN32 ) 00035 # include <winsock2.h> 00036 # include <ws2tcpip.h> 00037 #endif 00038 00039 #include <cddb/cddb_ni.h> 00040 #include <cddb/cddb_config.h> 00041 00042 #if defined(CDDB_NEED_SYS_SOCKET_H) || defined(HAVE_SYS_SOCKET_H) 00043 #include <sys/socket.h> 00044 #endif 00045 00046 00047 /* --- socket-based work-alikes --- */ 00048 00049 00061 char *sock_fgets(char *s, int size, cddb_conn_t *c); 00062 00074 size_t sock_fwrite(const void *ptr, size_t size, size_t nmemb, cddb_conn_t *c); 00075 00085 int sock_fprintf(cddb_conn_t *c, const char *format, ...); 00086 00098 int sock_vfprintf(cddb_conn_t *c, const char *format, va_list ap); 00099 00100 /* --- time-out enabled work-alikes --- */ 00101 00112 struct hostent *timeout_gethostbyname(const char *hostname, int timeout); 00113 00125 int timeout_connect(int sockfd, const struct sockaddr *addr, size_t len, 00126 int timeout); 00127 00128 00129 #ifdef __cplusplus 00130 } 00131 #endif 00132 00133 #endif /* CDDB_NET_H */

Generated on Wed Jul 21 18:56:32 2004 for libcddb by doxygen 1.3.7