Make things inherit from GInitiallyUnowned, some more socket changes
[cascardo/gnio.git] / gnio / gsocketaddress.h
index 4b861b9..a770574 100644 (file)
@@ -1,3 +1,26 @@
+/* GNIO - GLib Network Layer of GIO
+ *
+ * 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
+ * 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: Christian Kellner <gicmo@gnome.org>
+ *          Samuel Cormier-Iijima <sciyoshi@gmail.com>
+ */
+
 #ifndef G_SOCKET_ADDRESS_H
 #define G_SOCKET_ADDRESS_H
 
@@ -15,21 +38,26 @@ G_BEGIN_DECLS
 typedef struct _GSocketAddress        GSocketAddress;
 typedef struct _GSocketAddressClass   GSocketAddressClass;
 
-struct _GSocketAddress {
-    
-    GObject parent;
-
+struct _GSocketAddress
+{
+  GInitiallyUnowned parent;
 };
 
-struct _GSocketAddressClass {
-    
-    GObjectClass parent_class;
+struct _GSocketAddressClass
+{
+  GInitiallyUnownedClass parent_class;
+
+  gssize (*native_size) (GSocketAddress *address);
+
+  gboolean (*to_native) (GSocketAddress *address, gpointer dest);
 };
 
+GType          g_socket_address_get_type    (void) G_GNUC_CONST;
+
+gboolean       g_socket_address_to_native   (GSocketAddress *address, gpointer dest);
 
-GType          g_socket_address_get_type (void) G_GNUC_CONST;
+gssize         g_socket_address_native_size (GSocketAddress *address);
 
 G_END_DECLS
 
 #endif /* G_SOCKET_ADDRESS_H */
-