7016ff05e10fe2587a3e9c22b0e76a60459a58f4
[cascardo/gnio.git] / gnio / ginet6address.c
1 /* GNIO - GLib Network Layer of GIO
2  * 
3  * Copyright (C) 2008 Christian Kellner 
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General
16  * Public License along with this library; if not, write to the
17  * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
18  * Boston, MA 02111-1307, USA.
19  *
20  * Author: Christian Kellner <gicmo@gnome.org>
21  */
22
23 #include <config.h>
24 #include <glib.h>
25
26 #include "ginet6address.h"
27
28
29 G_DEFINE_TYPE (GInet6Address, g_inet6_address, G_TYPE_INET_ADDRESS);
30
31 struct _GInet6AddressPrivate {
32
33     union {
34         guint8  u6_addr8[16];
35         guint16 u6_addr16[8];
36         guint32 u6_addr32[4];
37
38     } addr;
39 };
40
41
42 static void
43 g_inet6_address_finalize (GObject *object)
44 {
45   GInet6Address *address;
46
47   address = G_INET6_ADDRESS (object);
48   
49   if (G_OBJECT_CLASS (g_inet6_address_parent_class)->finalize)
50     (*G_OBJECT_CLASS (g_inet6_address_parent_class)->finalize) (object);
51 }
52
53 static void
54 g_inet6_address_dispose (GObject *object)
55 {
56   GInet6Address *address;
57
58   address = G_INET6_ADDRESS (object);
59   
60   if (G_OBJECT_CLASS (g_inet6_address_parent_class)->dispose)
61     (*G_OBJECT_CLASS (g_inet6_address_parent_class)->dispose) (object);
62 }
63
64
65 static void
66 g_inet6_address_class_init (GInet6AddressClass *klass)
67 {
68   GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
69   
70   g_type_class_add_private (klass, sizeof (GInet6AddressPrivate));
71   
72   gobject_class->finalize = g_inet6_address_finalize;
73   gobject_class->dispose = g_inet6_address_dispose;
74
75 }
76
77 static void
78 g_inet6_address_init (GInet6Address *address)
79 {
80   address->priv = G_TYPE_INSTANCE_GET_PRIVATE (address,
81                                                G_TYPE_INET6_ADDRESS,
82                                                GInet6AddressPrivate);
83 }
84
85 /* ************************************************************************* */
86 /* Public Functions */
87
88 GInet6Address *
89 g_inet6_address_from_string (const char *string)
90 {
91     return NULL;
92 }
93
94 char *
95 g_inet6_address_to_string (GInet6Address *address)
96 {
97   return NULL;
98 }
99
100 GInet6Address *
101 g_inet6_address_from_bytes (guint8 bytes[])
102 {
103   return NULL;
104 }
105
106 const guint8 *
107 g_inet6_address_to_bytes (GInet6Address *address)
108 {
109   return NULL;
110 }
111
112 GInetAddress  *
113 g_inet6address_new_loopback (void)
114 {
115   return NULL;
116 }
117
118 GInetAddress  *
119 g_inet6address_new_any (void)
120 {
121   return NULL; 
122 }
123