1 /* GNIO - GLib Network Layer of GIO
3 * Copyright (C) 2008 Christian Kellner
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.
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.
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.
20 * Author: Christian Kellner <gicmo@gnome.org>
26 #include "ginetsocketaddress.h"
29 G_DEFINE_TYPE (GInetSocketAddress, g_inet_socket_address, G_TYPE_SOCKET_ADDRESS);
31 struct _GInetSocketAddressPrivate {
33 GInetAddress *address;
39 g_inet_socket_address_finalize (GObject *object)
41 GInetSocketAddress *address;
43 address = G_INET_SOCKET_ADDRESS (object);
45 if (G_OBJECT_CLASS (g_inet_socket_address_parent_class)->finalize)
46 (*G_OBJECT_CLASS (g_inet_socket_address_parent_class)->finalize) (object);
50 g_inet_socket_address_dispose (GObject *object)
52 GInetSocketAddress *address;
54 address = G_INET_SOCKET_ADDRESS (object);
56 if (G_OBJECT_CLASS (g_inet_socket_address_parent_class)->dispose)
57 (*G_OBJECT_CLASS (g_inet_socket_address_parent_class)->dispose) (object);
62 g_inet_socket_address_class_init (GInetSocketAddressClass *klass)
64 GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
66 g_type_class_add_private (klass, sizeof (GInetSocketAddressPrivate));
68 gobject_class->finalize = g_inet_socket_address_finalize;
69 gobject_class->dispose = g_inet_socket_address_dispose;
74 g_inet_socket_address_init (GInetSocketAddress *address)
76 address->priv = G_TYPE_INSTANCE_GET_PRIVATE (address,
77 G_TYPE_INET_SOCKET_ADDRESS,
78 GInetSocketAddressPrivate);
83 g_inet_socket_address_new (GInetAddress *address, guint16 port)
90 g_inet_socket_address_get_address (GInetSocketAddress *sockaddr)
96 g_inet_socket_address_get_port (GInetSocketAddress *sockaddr)