Some more stuff for GSockets
[cascardo/gnio.git] / gnio / gsocketaddress.h
index 09a5a9b..d2b7db3 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
 
@@ -17,15 +40,25 @@ typedef struct _GSocketAddressClass   GSocketAddressClass;
 
 struct _GSocketAddress
 {
-  GObject parent;
+  GInitiallyUnowned parent;
 };
 
 struct _GSocketAddressClass
 {
-  GObjectClass parent_class;
+  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;
+GType            g_socket_address_get_type    (void) G_GNUC_CONST;
+
+gboolean         g_socket_address_to_native   (GSocketAddress *address, gpointer dest);
+
+gssize           g_socket_address_native_size (GSocketAddress *address);
+
+GSocketAddress * g_socket_address_from_native (gpointer native, gsize len);
 
 G_END_DECLS