Starting on TcpClient, some formatting fixes
[cascardo/gnio.git] / gnio / ginetaddress.c
index ed02fc3..3890727 100644 (file)
@@ -1,6 +1,6 @@
 /* GNIO - GLib Network Layer of GIO
- * 
- * Copyright (C) 2008 Christian Kellner 
+ *
+ * Copyright (C) 2008 Christian Kellner, Samuel Cormier-Iijima
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -17,7 +17,8 @@
  * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
  * Boston, MA 02111-1307, USA.
  *
- * Author: Christian Kellner <gicmo@gnome.org>
+ * Authors: Christian Kellner <gicmo@gnome.org>
+ *          Samuel Cormier-Iijima <sciyoshi@gmail.com>
  */
 
 #include <config.h>
@@ -33,7 +34,7 @@
  * 
  **/
 
-G_DEFINE_ABSTRACT_TYPE (GInetAddress, g_inet_address, G_TYPE_OBJECT);
+G_DEFINE_ABSTRACT_TYPE (GInetAddress, g_inet_address, G_TYPE_INITIALLY_UNOWNED);
 
 enum
 {
@@ -51,7 +52,10 @@ enum
 };
 
 static void
-g_inet_address_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+g_inet_address_get_property (GObject    *object,
+                             guint       prop_id,
+                             GValue     *value,
+                             GParamSpec *pspec)
 {
   GInetAddress *address = G_INET_ADDRESS (object);
 
@@ -75,7 +79,10 @@ g_inet_address_get_property (GObject *object, guint prop_id, GValue *value, GPar
 }
 
 static void
-g_inet_address_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+g_inet_address_set_property (GObject      *object,
+                             guint         prop_id,
+                             const GValue *value,
+                             GParamSpec   *pspec)
 {
   GInetAddress *address G_GNUC_UNUSED = G_INET_ADDRESS (object);
 
@@ -171,6 +178,14 @@ g_inet_address_init (GInetAddress *address)
 
 }
 
+gchar *
+g_inet_address_to_string (GInetAddress *address)
+{
+  g_return_val_if_fail (G_IS_INET_ADDRESS (address), NULL);
+
+  return G_INET_ADDRESS_GET_CLASS (address)->to_string (address);
+}
+
 /* ******************************************* */
 /* Getters for properties */