4c1a23255250f2c0a25a353e64ee12c03cf9d6ac
[cascardo/gnio.git] / gnio / ginetsocketaddress.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 "ginetsocketaddress.h"
27
28
29 G_DEFINE_TYPE (GInetSocketAddress, g_inet_socket_address, G_TYPE_SOCKET_ADDRESS);
30
31 struct _GInetSocketAddressPrivate {
32
33     GInetAddress *address;
34     guint16       port;
35 };
36
37
38 static void
39 g_inet_socket_address_finalize (GObject *object)
40 {
41   GInetSocketAddress *address;
42
43   address = G_INET_SOCKET_ADDRESS (object);
44   
45   if (G_OBJECT_CLASS (g_inet_socket_address_parent_class)->finalize)
46     (*G_OBJECT_CLASS (g_inet_socket_address_parent_class)->finalize) (object);
47 }
48
49 static void
50 g_inet_socket_address_dispose (GObject *object)
51 {
52   GInetSocketAddress *address;
53
54   address = G_INET_SOCKET_ADDRESS (object);
55   
56   if (G_OBJECT_CLASS (g_inet_socket_address_parent_class)->dispose)
57     (*G_OBJECT_CLASS (g_inet_socket_address_parent_class)->dispose) (object);
58 }
59
60
61 static void
62 g_inet_socket_address_class_init (GInetSocketAddressClass *klass)
63 {
64   GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
65   
66   g_type_class_add_private (klass, sizeof (GInetSocketAddressPrivate));
67   
68   gobject_class->finalize = g_inet_socket_address_finalize;
69   gobject_class->dispose = g_inet_socket_address_dispose;
70
71 }
72
73 static void
74 g_inet_socket_address_init (GInetSocketAddress *address)
75 {
76   address->priv = G_TYPE_INSTANCE_GET_PRIVATE (address,
77                                                G_TYPE_INET_SOCKET_ADDRESS,
78                                                GInetSocketAddressPrivate);
79 }
80
81
82 GInetSocketAddress *
83 g_inet_socket_address_new (GInetAddress *address, guint16 port)
84 {
85     return NULL;
86 }
87
88
89 GInetAddress *
90 g_inet_socket_address_get_address (GInetSocketAddress *sockaddr)
91 {
92     return NULL;
93 }
94
95 guint16 
96 g_inet_socket_address_get_port (GInetSocketAddress *sockaddr)
97 {
98     return 0;
99 }
100