<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>libcddb: cddb_net.h Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.3.9.1 --> <div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="globals.html">File Members</a></div> <div class="nav"> <a class="el" href="dir_000000.html">include</a> / <a class="el" href="dir_000001.html">cddb</a></div> <h1>cddb_net.h</h1><a href="cddb__net_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span> 00002 <span class="comment"> $Id: cddb_net.h,v 1.11 2005/03/11 21:29:29 airborne Exp $</span> 00003 <span class="comment"></span> 00004 <span class="comment"> Copyright (C) 2003, 2004, 2005 Kris Verbeeck <airborne@advalvas.be></span> 00005 <span class="comment"></span> 00006 <span class="comment"> This library is free software; you can redistribute it and/or</span> 00007 <span class="comment"> modify it under the terms of the GNU Library General Public</span> 00008 <span class="comment"> License as published by the Free Software Foundation; either</span> 00009 <span class="comment"> version 2 of the License, or (at your option) any later version.</span> 00010 <span class="comment"></span> 00011 <span class="comment"> This library is distributed in the hope that it will be useful,</span> 00012 <span class="comment"> but WITHOUT ANY WARRANTY; without even the implied warranty of</span> 00013 <span class="comment"> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span> 00014 <span class="comment"> Library General Public License for more details.</span> 00015 <span class="comment"></span> 00016 <span class="comment"> You should have received a copy of the GNU Library General Public</span> 00017 <span class="comment"> License along with this library; if not, write to the</span> 00018 <span class="comment"> Free Software Foundation, Inc., 59 Temple Place - Suite 330,</span> 00019 <span class="comment"> Boston, MA 02111-1307, USA.</span> 00020 <span class="comment">*/</span> 00021 00022 <span class="preprocessor">#ifndef CDDB_NET_H</span> <a name="l00023"></a><a class="code" href="cddb__net_8h.html#a0">00023</a> <span class="preprocessor"></span><span class="preprocessor">#define CDDB_NET_H 1</span> 00024 <span class="preprocessor"></span> 00025 <span class="preprocessor">#ifdef __cplusplus</span> 00026 <span class="preprocessor"></span> <span class="keyword">extern</span> <span class="stringliteral">"C"</span> { 00027 <span class="preprocessor">#endif</span> 00028 <span class="preprocessor"></span> 00029 00030 <span class="preprocessor">#include <stdarg.h></span> 00031 00032 <span class="preprocessor">#if defined( UNDER_CE )</span> 00033 <span class="preprocessor"></span><span class="preprocessor"># include <winsock.h></span> 00034 <span class="preprocessor">#elif defined( WIN32 )</span> 00035 <span class="preprocessor"></span><span class="preprocessor"># include <winsock2.h></span> 00036 <span class="preprocessor"># include <ws2tcpip.h></span> 00037 <span class="preprocessor">#endif </span> 00038 <span class="preprocessor"></span> 00039 <span class="preprocessor">#include <cddb/cddb_ni.h></span> 00040 <span class="preprocessor">#include <cddb/cddb_config.h></span> 00041 00042 <span class="preprocessor">#if defined(CDDB_NEED_SYS_SOCKET_H) || defined(HAVE_SYS_SOCKET_H)</span> 00043 <span class="preprocessor"></span><span class="preprocessor">#include <sys/socket.h></span> 00044 <span class="preprocessor">#endif</span> 00045 <span class="preprocessor"></span> 00046 00047 <span class="comment">/* --- socket-based work-alikes --- */</span> 00048 00049 00061 <span class="keywordtype">char</span> *<a class="code" href="cddb__net_8h.html#a1">sock_fgets</a>(<span class="keywordtype">char</span> *s, <span class="keywordtype">int</span> size, <a class="code" href="cddb__conn_8h.html#a2">cddb_conn_t</a> *c); 00062 00074 size_t <a class="code" href="cddb__net_8h.html#a2">sock_fwrite</a>(<span class="keyword">const</span> <span class="keywordtype">void</span> *ptr, size_t size, size_t nmemb, <a class="code" href="cddb__conn_8h.html#a2">cddb_conn_t</a> *c); 00075 00085 <span class="keywordtype">int</span> <a class="code" href="cddb__net_8h.html#a3">sock_fprintf</a>(<a class="code" href="cddb__conn_8h.html#a2">cddb_conn_t</a> *c, <span class="keyword">const</span> <span class="keywordtype">char</span> *format, ...); 00086 00098 <span class="keywordtype">int</span> <a class="code" href="cddb__net_8h.html#a4">sock_vfprintf</a>(<a class="code" href="cddb__conn_8h.html#a2">cddb_conn_t</a> *c, <span class="keyword">const</span> <span class="keywordtype">char</span> *format, va_list ap); 00099 00100 <span class="comment">/* --- time-out enabled work-alikes --- */</span> 00101 00112 <span class="keyword">struct </span>hostent *<a class="code" href="cddb__net_8h.html#a5">timeout_gethostbyname</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *hostname, <span class="keywordtype">int</span> timeout); 00113 00125 <span class="keywordtype">int</span> <a class="code" href="cddb__net_8h.html#a6">timeout_connect</a>(<span class="keywordtype">int</span> sockfd, <span class="keyword">const</span> <span class="keyword">struct</span> sockaddr *addr, size_t len, 00126 <span class="keywordtype">int</span> timeout); 00127 00128 00129 <span class="preprocessor">#ifdef __cplusplus</span> 00130 <span class="preprocessor"></span> } 00131 <span class="preprocessor">#endif</span> 00132 <span class="preprocessor"></span> 00133 <span class="preprocessor">#endif </span><span class="comment">/* CDDB_NET_H */</span> </pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Jul 9 11:18:30 2005 for libcddb by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.3.9.1 </small></address> </body> </html>