cleanup
[platform/upstream/glib.git] / gio / gnetworkingprivate.h
index c41f598..b28ff44 100644 (file)
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General
- * Public License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
 #ifndef __G_NETWORKINGPRIVATE_H__
 #define __G_NETWORKINGPRIVATE_H__
 
-#ifdef G_OS_WIN32
-
-#define WINVER 0x0501 // FIXME?
-#include <winsock2.h>
-#undef interface
-#include <ws2tcpip.h>
-#include <windns.h>
-
-#else /* !G_OS_WIN32 */
-
-#define BIND_4_COMPAT
-
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-/* We're supposed to define _GNU_SOURCE to get EAI_NODATA, but that
- * won't actually work since <features.h> has already been included at
- * this point. So we define __USE_GNU instead.
- */
-#define __USE_GNU
-#include <netdb.h>
-#undef __USE_GNU
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#include <resolv.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-
-#endif
+#include "gnetworking.h"
 
 G_BEGIN_DECLS
 
-extern struct addrinfo _g_resolver_addrinfo_hints;
-
-GList *_g_resolver_addresses_from_addrinfo (const char       *hostname,
-                                           struct addrinfo  *res,
-                                           gint              gai_retval,
-                                           GError          **error);
-
-void   _g_resolver_address_to_sockaddr     (GInetAddress            *address,
-                                           struct sockaddr_storage *sa,
-                                           gsize                   *sa_len);
-char  *_g_resolver_name_from_nameinfo      (GInetAddress     *address,
-                                           const gchar      *name,
-                                           gint              gni_retval,
-                                           GError          **error);
-
-#if defined(G_OS_UNIX)
-GList *_g_resolver_targets_from_res_query  (const gchar      *rrname,
-                                           guchar           *answer,
-                                           gint              len,
-                                           gint              herr,
-                                           GError          **error);
-#elif defined(G_OS_WIN32)
-GList *_g_resolver_targets_from_DnsQuery   (const gchar      *rrname,
-                                           DNS_STATUS        status,
-                                           DNS_RECORD       *results,
-                                           GError          **error);
-#endif
+gboolean _g_uri_parse_authority            (const char       *uri,
+                                           char            **host,
+                                           guint16          *port,
+                                           char            **userinfo);
+gchar *  _g_uri_from_authority             (const gchar      *protocol,
+                                           const gchar      *host,
+                                           guint             port,
+                                           const gchar      *userinfo);
+
+guint64  g_resolver_get_serial             (GResolver        *resolver);
+
+gint g_socket (gint     domain,
+               gint     type,
+               gint     protocol,
+               GError **error);
 
 G_END_DECLS