1 /* GNIO - GLib Network Layer of GIO
3 * Copyright (C) 2008 Christian Kellner, Samuel Cormier-Iijima
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 * Authors: Christian Kellner <gicmo@gnome.org>
21 * Samuel Cormier-Iijima <sciyoshi@gmail.com>
27 #include "gsocketaddress.h"
29 G_DEFINE_ABSTRACT_TYPE (GSocketAddress, g_socket_address, G_TYPE_OBJECT);
32 g_socket_address_class_init (GSocketAddressClass *klass)
34 GObjectClass *gobject_class G_GNUC_UNUSED = G_OBJECT_CLASS (klass);
38 g_socket_address_init (GSocketAddress *address)
44 g_socket_address_native_size (GSocketAddress *address)
46 g_return_val_if_fail (G_IS_SOCKET_ADDRESS (address), -1);
48 return G_SOCKET_ADDRESS_GET_CLASS (address)->native_size (address);
52 g_socket_address_to_native (GSocketAddress *address, gpointer dest)
54 g_return_val_if_fail (G_IS_SOCKET_ADDRESS (address), FALSE);
56 return G_SOCKET_ADDRESS_GET_CLASS (address)->to_native (address, dest);