NULL =
-INCLUDES = \
- $(SAMBA_CFLAGS) \
- -I$(top_srcdir) \
- -I$(top_builddir) \
- $(GLIB_CFLAGS) \
- -DG_DISABLE_DEPRECATED
+#INCLUDES = \
+# $(SAMBA_CFLAGS) \
+# -I$(top_srcdir) \
+# -I$(top_builddir) \
+# $(GLIB_CFLAGS) \
+# -DG_DISABLE_DEPRECATED
+
+AM_CPPFLAGS = \
+ -DG_LOG_DOMAIN=\"GLib-GIO\" \
+ -I$(top_builddir) \
+ -I$(top_srcdir) \
+ $(GLIB_CFLAGS) \
+ $(GLIB_DEBUG_FLAGS) \
+ -DG_DISABLE_DEPRECATED \
+ -DGIO_COMPILATION
lib_LTLIBRARIES=libgnio.la
#include <glib.h>
#include <gio/gio.h>
-#include <string.h>
-#ifndef G_OS_WIN32
-# include <netinet/in.h>
-# include <arpa/inet.h>
-# include <netdb.h>
-#else
-# include <winsock2.h>
-# include <winerror.h>
-# include <ws2tcpip.h>
-# undef HAVE_GETADDRINFO
-# define HAVE_GETHOSTBYNAME_THREADSAFE 1
-#endif
-#include <errno.h>
-
-#include "ginetaddress.h"
-#include "ginet4address.h"
-#include "ginet6address.h"
#include "gnetworkinputstream.h"
-#include "gnioerror.h"
G_DEFINE_TYPE (GNetworkInputStream, g_network_input_stream, G_TYPE_INPUT_STREAM);
#include <glib-object.h>
#include <gio/gio.h>
-#include "gsocket.h"
-
G_BEGIN_DECLS
#define G_TYPE_NETWORK_INPUT_STREAM (g_socket_get_type ())
GType g_network_input_stream_get_type (void) G_GNUC_CONST;
-GNetworkInputStream * g_network_input_stream_new (GSocket *socket);
+GNetworkInputStream * g_network_input_stream_new (void);
G_END_DECLS
#include <glib.h>
#include <gio/gio.h>
-#include <string.h>
-#ifndef G_OS_WIN32
-# include <netinet/in.h>
-# include <arpa/inet.h>
-# include <netdb.h>
-#else
-# include <winsock2.h>
-# include <winerror.h>
-# include <ws2tcpip.h>
-# undef HAVE_GETADDRINFO
-# define HAVE_GETHOSTBYNAME_THREADSAFE 1
-#endif
-#include <errno.h>
-
-#include "ginetaddress.h"
-#include "ginet4address.h"
-#include "ginet6address.h"
#include "gnetworkoutputstream.h"
-#include "gnioerror.h"
G_DEFINE_TYPE (GNetworkOutputStream, g_network_output_stream, G_TYPE_OUTPUT_STREAM);
#include <glib-object.h>
#include <gio/gio.h>
-#include "gsocket.h"
-
G_BEGIN_DECLS
#define G_TYPE_NETWORK_OUTPUT_STREAM (g_socket_get_type ())
GType g_network_output_stream_get_type (void) G_GNUC_CONST;
-GNetworkOutputStream * g_network_output_stream_new (GSocket *socket);
+GNetworkOutputStream * g_network_output_stream_new (void);
G_END_DECLS
#include <gio/gio.h>
#include <gnio/ginetsocketaddress.h>
+#include <gnio/gnetworkinputstream.h>
+#include <gnio/gnetworkoutputstream.h>
G_BEGIN_DECLS
GObjectClass parent_class;
};
-GType g_tcp_client_get_type (void) G_GNUC_CONST;
+GType g_tcp_client_get_type (void) G_GNUC_CONST;
-GTcpClient * g_tcp_client_new (const gchar *hostname,
- gushort port);
+GTcpClient * g_tcp_client_new (const gchar *hostname,
+ gushort port);
-GTcpClient * g_tcp_client_new_from_address (GInetSocketAddress *address);
+GTcpClient * g_tcp_client_new_from_address (GInetSocketAddress *address);
-gboolean g_tcp_client_connect (GTcpClient *client,
- GCancellable *cancellable,
- GError **error);
+GNetworkInputStream * g_tcp_client_get_input_stream (GTcpClient *client);
-void g_tcp_client_connect_async (GTcpClient *client,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data);
+GNetworkOutputStream * g_tcp_client_get_output_stream (GTcpClient *client);
-gboolean g_tcp_client_connect_finish (GTcpClient *client,
- GAsyncResult *result,
- GError **error);
+gboolean g_tcp_client_connect (GTcpClient *client,
+ GCancellable *cancellable,
+ GError **error);
-void g_tcp_client_close (GTcpClient *client);
+void g_tcp_client_connect_async (GTcpClient *client,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+
+gboolean g_tcp_client_connect_finish (GTcpClient *client,
+ GAsyncResult *result,
+ GError **error);
+
+void g_tcp_client_close (GTcpClient *client);
G_END_DECLS
static void
g_tcp_server_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
{
- GTcpServer *server = G_TCP_SERVER (object);
+ GTcpServer *server G_GNUC_UNUSED = G_TCP_SERVER (object);
switch (prop_id)
{
static void
g_tcp_server_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
{
- GTcpServer *server = G_TCP_SERVER (object);
+ GTcpServer *server G_GNUC_UNUSED = G_TCP_SERVER (object);
switch (prop_id)
{
static void
g_tcp_server_finalize (GObject *object)
{
- GTcpServer *server = G_TCP_SERVER (object);
+ GTcpServer *server G_GNUC_UNUSED = G_TCP_SERVER (object);
if (G_OBJECT_CLASS (g_tcp_server_parent_class)->finalize)
(*G_OBJECT_CLASS (g_tcp_server_parent_class)->finalize) (object);
static void
g_tcp_server_dispose (GObject *object)
{
- GTcpServer *server = G_TCP_SERVER (object);
+ GTcpServer *server G_GNUC_UNUSED = G_TCP_SERVER (object);
if (G_OBJECT_CLASS (g_tcp_server_parent_class)->dispose)
(*G_OBJECT_CLASS (g_tcp_server_parent_class)->dispose) (object);
if (!g_tcp_client_connect (client, NULL, &error)) {
g_warning (error->message);
- return;
+ return 1;
}
g_print ("connected!\n");