summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2009-05-08 19:27:44 (GMT)
committerAlexander Larsson <alexl@redhat.com>2009-05-08 19:27:44 (GMT)
commit334efef4295dafb332269a9d89ba08e6c98d2277 (patch)
treeb5fa39ad20b91bc7414d8f00c4717169d3658070
parentda15109b0f884083a80fc744dff82515d70a3e99 (diff)
downloadgnio-334efef4295dafb332269a9d89ba08e6c98d2277.tar.gz
gnio-334efef4295dafb332269a9d89ba08e6c98d2277.tar.xz
Remove GTcpClient and GUnixClient
These classes are now very minimal helpers that avoid some casting and hides the constructing of an intermediate GSocketConnectable The casting is imho not necessary, since in most cases a GSocketClient is what you use, even if you later may want to downcast to some other connection type. All the extra classes and code to avoid constructing the intermediate connectable are imho misguided. The really common helper now exists as g_socket_client_connect_to_host(_async), and the rest just explodes the API with seldom used functions that removes the nice connectable abstraction.
-rw-r--r--gio/Makefile.am4
-rw-r--r--gio/gnio.h2
-rw-r--r--gio/gtcpclient.c353
-rw-r--r--gio/gtcpclient.h106
-rw-r--r--gio/gunixclient.c167
-rw-r--r--gio/gunixclient.h89
6 files changed, 0 insertions, 721 deletions
diff --git a/gio/Makefile.am b/gio/Makefile.am
index 1381a5a..672d3e4 100644
--- a/gio/Makefile.am
+++ b/gio/Makefile.am
@@ -25,14 +25,12 @@ sources = \
gsocketoutputstream.c \
gsocketoutputstream.h \
gsocketservice.c \
- gtcpclient.c \
gtcpconnection.c \
gtcplistener.c \
gthreadedsocketservice.c
if OS_UNIX
unix_sources = \
- gunixclient.c \
gunixconnection.c \
gunixfdmessage.c \
gunixlistener.c
@@ -61,11 +59,9 @@ headers = \
gsocketcontrolmessage.h \
gsocketlistener.h \
gsocketservice.h \
- gtcpclient.h \
gtcpconnection.h \
gtcplistener.h \
gthreadedsocketservice.h \
- gunixclient.h \
gunixfdmessage.h \
gunixconnection.h \
gunixlistener.h
diff --git a/gio/gnio.h b/gio/gnio.h
index 2d49d8d..3bde0a3 100644
--- a/gio/gnio.h
+++ b/gio/gnio.h
@@ -30,12 +30,10 @@
#include <gio/gsocketconnection.h>
#include <gio/gsocketlistener.h>
#include <gio/gsocketservice.h>
-#include <gio/gtcpclient.h>
#include <gio/gtcpconnection.h>
#include <gio/gtcplistener.h>
#include <gio/gthreadedsocketservice.h>
#include <gio/gtls.h>
-#include <gio/gunixclient.h>
#include <gio/gunixconnection.h>
#include <gio/gunixlistener.h>
diff --git a/gio/gtcpclient.c b/gio/gtcpclient.c
deleted file mode 100644
index 9f6fb82..0000000
--- a/gio/gtcpclient.c
+++ /dev/null
@@ -1,353 +0,0 @@
-/*
- * Copyright © 2008, 2009 Codethink Limited
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation; either version 2 of the licence or (at
- * your option) any later version.
- *
- * See the included COPYING file for more information.
- */
-
-/**
- * SECTION: gtcpclient
- * @title: GTcpClient
- * @short_description: a #GSocketClient for making a #GTcpConnection
- * @see_also: #GSocketClient, #GTcpConnection.
- *
- * This #GSocketClient is capable of creating outgoing #GTcpConnection
- * instances and contains convenience functions to automatically
- * perform DNS lookups.
- *
- * If you are interested in connecting to servers over TCP with a
- * simple interface then this is the correct class to use.
- **/
-
-#include "gtcpclient.h"
-
-#include <string.h>
-
-#include <gio/gsimpleasyncresult.h>
-#include <gio/gsocketconnectable.h>
-#include <gio/ginetsocketaddress.h>
-#include <gio/gnetworkaddress.h>
-#include <gio/gnetworkservice.h>
-#include <gio/ginetaddress.h>
-#include "gtcpconnection.h"
-#include "gsocketclient.h"
-#include "gsocket.h"
-
-G_DEFINE_TYPE (GTcpClient, g_tcp_client, G_TYPE_SOCKET_CLIENT);
-
-void
-g_tcp_client_set_local (GTcpClient *client,
- GInetAddress *address)
-{
- g_assert_not_reached ();
-}
-
-/**
- * g_tcp_client_connect:
- * @client: a #GTcpClient
- * @connectable: a #GSocketConnectable
- * @cancellable: a #GCancellable, or %NULL
- * @error: a pointer to a #GError, or %NULL
- *
- * This call is provided as a convenience to allow for fewer pointer
- * casts. Its functionality is exactly the same as
- * g_socket_client_connect().
- **/
-GTcpConnection *
-g_tcp_client_connect (GTcpClient *client,
- GSocketConnectable *connectable,
- GCancellable *cancellable,
- GError **error)
-{
- GSocketConnection *socket_connection;
- GSocketClient *socket_client;
-
- g_return_val_if_fail (G_IS_TCP_CLIENT (client), NULL);
- socket_client = G_SOCKET_CLIENT (client);
-
- socket_connection = g_socket_client_connect (socket_client, connectable,
- cancellable, error);
-
- if (socket_connection)
- {
- g_assert (G_IS_TCP_CONNECTION (socket_connection));
- return G_TCP_CONNECTION (socket_connection);
- }
- else
- return NULL;
-}
-
-/**
- * g_tcp_client_connect_async:
- * @client: a #GTcpClient
- * @connectable: a #GSocketConnectable
- * @cancellable: a #GCancellable, or %NULL
- * @callback: a #GAsyncReadyCallback
- * @user_data: user data for the callback
- *
- * This is the asynchronous version of g_tcp_client_connect().
- **/
-void
-g_tcp_client_connect_async (GTcpClient *client,
- GSocketConnectable *connectable,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data)
-{
- GSocketClient *socket_client;
-
- g_return_if_fail (G_IS_TCP_CLIENT (client));
- socket_client = G_SOCKET_CLIENT (client);
-
- g_socket_client_connect_async (socket_client, connectable,
- cancellable, callback, user_data);
-}
-
-/**
- * g_tcp_client_connect_finish:
- * @client: a #GTcpClient
- * @result: the #GAsyncResult that was given to the callback
- * @error: a pointer to a #GError, or %NULL
- * @returns: a #GTcpConnection if successful, or %NULL on error
- *
- * Collects the result of an asynchronous call started by
- * g_tcp_client_connect_async().
- **/
-GTcpConnection *
-g_tcp_client_connect_finish (GTcpClient *client,
- GAsyncResult *result,
- GError **error)
-{
- GSocketConnection *socket_connection;
- GSocketClient *socket_client;
-
- g_return_val_if_fail (G_IS_TCP_CLIENT (client), NULL);
- socket_client = G_SOCKET_CLIENT (client);
-
- socket_connection =
- g_socket_client_connect_finish (socket_client, result, error);
-
- if (socket_connection)
- {
- g_assert (G_IS_TCP_CONNECTION (socket_connection));
- return G_TCP_CONNECTION (socket_connection);
- }
- else
- return NULL;
-}
-
-/**
- * g_tcp_client_connect_to_host:
- * @client: a #GTcpClient
- * @host: the name of the host to connect to
- * @port: the port to connect to
- * @cancellable: a #GCancellable, or %NULL
- * @error: a pointer to a #GError, or %NULL
- * @returns: a #GTcpConnection if successful, or %NULL on error
- *
- * Attempts to create a TCP connection to the named host.
- *
- * @host may be in any of a number of recognised formats: an IPv6
- * address, an IPv4 address, or a domain name (in which case a DNS
- * lookup is performed).
- *
- * In the case that an IP address is given, a single connection
- * attempt is made. In the case that a name is given, multiple
- * connection attempts may be made, in turn and according to the
- * number of address records in DNS, until a connection succeeds.
- *
- * Upon a successful connection, a new #GTcpConnection is constructed
- * and returned. The caller owns this new object and must drop their
- * reference to it when finished with it.
- *
- * In the event of any failure (DNS error, service not found, no hosts
- * connectable) %NULL is returned and @error (if non-%NULL) is set
- * accordingly.
- **/
-GTcpConnection *
-g_tcp_client_connect_to_host (GTcpClient *client,
- const gchar *host,
- int port,
- GCancellable *cancellable,
- GError **error)
-{
- GSocketConnectable *connectable;
- GTcpConnection *connection;
-
- g_return_val_if_fail (G_IS_TCP_CLIENT (client), NULL);
-
- connectable = g_network_address_new (host, port);
- connection = g_tcp_client_connect (client, connectable,
- cancellable, error);
- g_object_unref (connectable);
-
- return connection;
-}
-
-/**
- * g_tcp_client_connect_to_host_async:
- * @client: a #GTcpClient
- * @host: the name of the host to connect to
- * @port: the port to connect to
- * @cancellable: a #GCancellable, or %NULL
- * @callback: a #GAsyncReadyCallback
- * @user_data: user data for the callback
- *
- * This is the asynchronous version of g_tcp_client_connect_to_host().
- **/
-void
-g_tcp_client_connect_to_host_async (GTcpClient *client,
- const gchar *host,
- int port,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data)
-{
- GSocketConnectable *connectable;
-
- g_return_if_fail (G_IS_TCP_CLIENT (client));
-
- connectable = g_network_address_new (host, port);
- g_tcp_client_connect_async (client,
- connectable, cancellable,
- callback, user_data);
- g_object_unref (connectable);
-}
-
-/**
- * g_tcp_client_connect_to_host_finish:
- * @client: a #GTcpClient
- * @result: the #GAsyncResult that was given to the callback
- * @error: a pointer to a #GError, or %NULL
- * @returns: a #GTcpConnection if successful, or %NULL on error
- *
- * Collects the result of an asynchronous call started by
- * g_tcp_client_connect_to_host_async().
- **/
-GTcpConnection *
-g_tcp_client_connect_to_host_finish (GTcpClient *client,
- GAsyncResult *result,
- GError **error)
-{
- return g_tcp_client_connect_finish (client, result, error);
-}
-
-/**
- * g_tcp_client_connect_to_service:
- * @client: a #GTcpClient
- * @domain: a domain name
- * @service: the name of the service to connect to
- * @cancellable: a #GCancellable, or %NULL
- * @error: a pointer to a #GError, or %NULL
- * @returns: a #GTcpConnection if successful, or %NULL on error
- *
- * Attempts to create a TCP connection to a service.
- *
- * This call looks up the SRV record for @service at @domain for the
- * "tcp" protocol. It then attempts to connect, in turn, to each of
- * the hosts providing the service until either a connection succeeds
- * or there are no hosts remaining.
- *
- * Upon a successful connection, a new #GTcpConnection is constructed
- * and returned. The caller owns this new object and must drop their
- * reference to it when finished with it.
- *
- * In the event of any failure (DNS error, service not found, no hosts
- * connectable) %NULL is returned and @error (if non-%NULL) is set
- * accordingly.
- **/
-GTcpConnection *
-g_tcp_client_connect_to_service (GTcpClient *client,
- const gchar *domain,
- const gchar *service,
- GCancellable *cancellable,
- GError **error)
-{
- GSocketConnectable *connectable;
- GTcpConnection *connection;
-
- g_return_val_if_fail (G_IS_TCP_CLIENT (client), NULL);
-
- connectable = g_network_service_new (service, "tcp", domain);
- connection = g_tcp_client_connect (client, connectable,
- cancellable, error);
- g_object_unref (connectable);
-
- return connection;
-}
-
-/**
- * g_tcp_client_connect_to_service_async:
- * @client: a #GTcpClient
- * @domain: a domain name
- * @service: the name of the service to connect to
- * @cancellable: a #GCancellable, or %NULL
- * @callback: a #GAsyncReadyCallback
- * @user_data: user data for the callback
- *
- * This is the asynchronous version of
- * g_tcp_client_connect_to_service().
- **/
-void
-g_tcp_client_connect_to_service_async (GTcpClient *client,
- const gchar *domain,
- const gchar *service,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data)
-{
- GSocketConnectable *connectable;
-
- g_return_if_fail (G_IS_TCP_CLIENT (client));
-
- connectable = g_network_service_new (service, "tcp", domain);
- g_tcp_client_connect_async (client,
- connectable, cancellable,
- callback, user_data);
- g_object_unref (connectable);
-}
-
-/**
- * g_tcp_client_connect_to_service_finish:
- * @client: a #GTcpClient
- * @result: the #GAsyncResult that was given to the callback
- * @error: a pointer to a #GError, or %NULL
- * @returns: a #GTcpConnection if successful, or %NULL on error
- *
- * Collects the result of an asynchronous call started by
- * g_tcp_client_connect_to_service_async().
- **/
-GTcpConnection *
-g_tcp_client_connect_to_service_finish (GTcpClient *client,
- GAsyncResult *result,
- GError **error)
-{
- return g_tcp_client_connect_finish (client, result, error);
-}
-
-static void
-g_tcp_client_init (GTcpClient *client)
-{
-}
-
-static void
-g_tcp_client_class_init (GTcpClientClass *class)
-{
-}
-
-/**
- * g_tcp_client_new:
- * @returns: a new #GTcpClient
- *
- * Creates a new #GTcpClient to be used for creating outgoing TCP
- * connections.
- **/
-GTcpClient *
-g_tcp_client_new (void)
-{
- return g_object_new (G_TYPE_TCP_CLIENT, NULL);
-}
diff --git a/gio/gtcpclient.h b/gio/gtcpclient.h
deleted file mode 100644
index 6e48453..0000000
--- a/gio/gtcpclient.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright © 2008, 2009 Codethink Limited
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation; either version 2 of the licence or (at
- * your option) any later version.
- *
- * See the included COPYING file for more information.
- *
- * Authors: Ryan Lortie <desrt@desrt.ca>
- */
-
-#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
-#error "Only <gio/gio.h> can be included directly."
-#endif
-
-#ifndef _gtcpclient_h_
-#define _gtcpclient_h_
-
-#include <gio/gtcpconnection.h>
-#include <gio/gsocketclient.h>
-
-G_BEGIN_DECLS
-
-#define G_TYPE_TCP_CLIENT (g_tcp_client_get_type ())
-#define G_TCP_CLIENT(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
- G_TYPE_TCP_CLIENT, GTcpClient))
-#define G_TCP_CLIENT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \
- G_TYPE_TCP_CLIENT, GTcpClientClass))
-#define G_IS_TCP_CLIENT(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
- G_TYPE_TCP_CLIENT))
-#define G_IS_TCP_CLIENT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \
- G_TYPE_TCP_CLIENT))
-#define G_TCP_CLIENT_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \
- G_TYPE_TCP_CLIENT, GTcpClientClass))
-
-typedef struct _GTcpClientPrivate GTcpClientPrivate;
-typedef struct _GTcpClientClass GTcpClientClass;
-typedef struct _GTcpClient GTcpClient;
-
-struct _GTcpClientClass
-{
- GSocketClientClass parent_class;
-};
-
-struct _GTcpClient
-{
- GSocketClient parent_instance;
- GTcpClientPrivate *priv;
-};
-
-GType g_tcp_client_get_type (void);
-
-GTcpClient * g_tcp_client_new (void);
-void g_tcp_client_set_local (GTcpClient *client,
- GInetAddress *address);
-
-
-GTcpConnection * g_tcp_client_connect (GTcpClient *client,
- GSocketConnectable *connectable,
- GCancellable *cancellable,
- GError **error);
-void g_tcp_client_connect_async (GTcpClient *client,
- GSocketConnectable *connectable,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data);
-GTcpConnection * g_tcp_client_connect_finish (GTcpClient *client,
- GAsyncResult *result,
- GError **error);
-
-
-GTcpConnection * g_tcp_client_connect_to_host (GTcpClient *client,
- const gchar *host,
- int port,
- GCancellable *cancellable,
- GError **error);
-void g_tcp_client_connect_to_host_async (GTcpClient *client,
- const gchar *host,
- int port,
- GCancellable *cancelalble,
- GAsyncReadyCallback callback,
- gpointer user_data);
-GTcpConnection * g_tcp_client_connect_to_host_finish (GTcpClient *client,
- GAsyncResult *result,
- GError **error);
-
-
-GTcpConnection * g_tcp_client_connect_to_service (GTcpClient *client,
- const gchar *domain,
- const gchar *service,
- GCancellable *cancellable,
- GError **error);
-void g_tcp_client_connect_to_service_async (GTcpClient *client,
- const gchar *domain,
- const gchar *service,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data);
-GTcpConnection * g_tcp_client_connect_to_service_finish (GTcpClient *client,
- GAsyncResult *result,
- GError **error);
-G_END_DECLS
-
-#endif /* _gtcpclient_h_ */
diff --git a/gio/gunixclient.c b/gio/gunixclient.c
deleted file mode 100644
index f6a1b79..0000000
--- a/gio/gunixclient.c
+++ /dev/null
@@ -1,167 +0,0 @@
-/* GNIO - GLib Network Layer of GIO
- *
- * Copyright © 2008, 2009 codethink
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * 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.
- *
- * Authors: Ryan Lortie <desrt@desrt.ca>
- */
-
-#include "gunixclient.h"
-
-#include <string.h>
-#include <netdb.h>
-
-#include <gio/gsimpleasyncresult.h>
-#include <gio/gsocketconnectable.h>
-#include <gio/ginetsocketaddress.h>
-#include <gio/gnetworkaddress.h>
-#include <gio/gnetworkservice.h>
-#include <gio/ginetaddress.h>
-#include <gio/gunixsocketaddress.h>
-#include "gunixconnection.h"
-#include "gsocketclient.h"
-#include "gsocket.h"
-
-G_DEFINE_TYPE (GUnixClient, g_unix_client, G_TYPE_SOCKET_CLIENT);
-
-GUnixConnection *
-g_unix_client_connect (GUnixClient *client,
- GSocketConnectable *connectable,
- GCancellable *cancellable,
- GError **error)
-{
- GSocketConnection *socket_connection;
- GSocketClient *socket_client;
-
- g_return_val_if_fail (G_IS_UNIX_CLIENT (client), NULL);
- socket_client = G_SOCKET_CLIENT (client);
-
- socket_connection = g_socket_client_connect (socket_client, connectable,
- cancellable, error);
-
- if (socket_connection)
- {
- g_assert (G_IS_UNIX_CONNECTION (socket_connection));
- return G_UNIX_CONNECTION (socket_connection);
- }
- else
- return NULL;
-}
-
-
-void
-g_unix_client_connect_async (GUnixClient *client,
- GSocketConnectable *connectable,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data)
-{
- GSocketClient *socket_client;
-
- g_return_if_fail (G_IS_UNIX_CLIENT (client));
- socket_client = G_SOCKET_CLIENT (client);
-
- g_socket_client_connect_async (socket_client, connectable,
- cancellable, callback, user_data);
-}
-
-GUnixConnection *
-g_unix_client_connect_finish (GUnixClient *client,
- GAsyncResult *result,
- GError **error)
-{
- GSocketConnection *socket_connection;
- GSocketClient *socket_client;
-
- g_return_val_if_fail (G_IS_UNIX_CLIENT (client), NULL);
- socket_client = G_SOCKET_CLIENT (client);
-
- socket_connection =
- g_socket_client_connect_finish (socket_client, result, error);
-
- if (socket_connection)
- {
- g_assert (G_IS_UNIX_CONNECTION (socket_connection));
- return G_UNIX_CONNECTION (socket_connection);
- }
- else
- return NULL;
-}
-
-GUnixConnection *
-g_unix_client_connect_to_path (GUnixClient *client,
- const gchar *path,
- GCancellable *cancellable,
- GError **error)
-{
- GUnixConnection *connection;
- GSocketAddress *address;
-
- g_return_val_if_fail (G_IS_UNIX_CLIENT (client), NULL);
-
- address = g_unix_socket_address_new (path);
-
- connection = g_unix_client_connect (client,
- G_SOCKET_CONNECTABLE (address),
- cancellable, error);
- g_object_unref (address);
-
- return connection;
-}
-
-void
-g_unix_client_connect_to_path_async (GUnixClient *client,
- const gchar *path,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data)
-{
- GSocketAddress *address;
-
- g_return_if_fail (G_IS_UNIX_CLIENT (client));
-
- address = g_unix_socket_address_new (path);
-
- g_unix_client_connect_async (client,
- G_SOCKET_CONNECTABLE (address),
- cancellable, callback, user_data);
- g_object_unref (address);
-}
-
-GUnixConnection *
-g_unix_client_connect_to_path_finish (GUnixClient *client,
- GAsyncResult *result,
- GError **error)
-{
- return g_unix_client_connect_finish (client, result, error);
-}
-
-static void
-g_unix_client_init (GUnixClient *client)
-{
-}
-
-static void
-g_unix_client_class_init (GUnixClientClass *class)
-{
-}
-
-GUnixClient *
-g_unix_client_new (void)
-{
- return g_object_new (G_TYPE_UNIX_CLIENT, NULL);
-}
diff --git a/gio/gunixclient.h b/gio/gunixclient.h
deleted file mode 100644
index 40fb1db..0000000
--- a/gio/gunixclient.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright © 2008, 2009 Codethink Limited
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation; either version 2 of the licence or (at
- * your option) any later version.
- *
- * See the included COPYING file for more information.
- *
- * Authors: Ryan Lortie <desrt@desrt.ca>
- */
-
-#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
-#error "Only <gio/gio.h> can be included directly."
-#endif
-
-#ifndef _gunixclient_h_
-#define _gunixclient_h_
-
-#include <gio/gunixconnection.h>
-#include <gio/gsocketclient.h>
-
-G_BEGIN_DECLS
-
-#define G_TYPE_UNIX_CLIENT (g_unix_client_get_type ())
-#define G_UNIX_CLIENT(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
- G_TYPE_UNIX_CLIENT, GUnixClient))
-#define G_UNIX_CLIENT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \
- G_TYPE_UNIX_CLIENT, GUnixClientClass))
-#define G_IS_UNIX_CLIENT(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
- G_TYPE_UNIX_CLIENT))
-#define G_IS_UNIX_CLIENT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \
- G_TYPE_UNIX_CLIENT))
-#define G_UNIX_CLIENT_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \
- G_TYPE_UNIX_CLIENT, GUnixClientClass))
-
-typedef struct _GUnixClientPrivate GUnixClientPrivate;
-typedef struct _GUnixClientClass GUnixClientClass;
-typedef struct _GUnixClient GUnixClient;
-
-struct _GUnixClientClass
-{
- GSocketClientClass parent_class;
-};
-
-struct _GUnixClient
-{
- GSocketClient parent_instance;
- GUnixClientPrivate *priv;
-};
-
-GType g_unix_client_get_type (void);
-
-GUnixClient * g_unix_client_new (void);
-void g_unix_client_set_local (GUnixClient *client,
- GInetAddress *address);
-
-
-GUnixConnection * g_unix_client_connect (GUnixClient *client,
- GSocketConnectable *connectable,
- GCancellable *cancellable,
- GError **error);
-void g_unix_client_connect_async (GUnixClient *client,
- GSocketConnectable *connectable,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data);
-GUnixConnection * g_unix_client_connect_finish (GUnixClient *client,
- GAsyncResult *result,
- GError **error);
-
-
-GUnixConnection * g_unix_client_connect_to_path (GUnixClient *client,
- const gchar *path,
- GCancellable *cancellable,
- GError **error);
-void g_unix_client_connect_to_path_async (GUnixClient *client,
- const gchar *path,
- GCancellable *cancelalble,
- GAsyncReadyCallback callback,
- gpointer user_data);
-GUnixConnection * g_unix_client_connect_to_path_finish (GUnixClient *client,
- GAsyncResult *result,
- GError **error);
-
-G_END_DECLS
-
-#endif /* _gunixclient_h_ */