<chapter>
<title>Utility API Reference</title>
<xi:include href="xml/nm-utils.xml"/>
- <xi:include href="xml/nm-types.xml"/>
</chapter>
<chapter>
nm-remote-connection.h \
nm-remote-settings.h \
nm-secret-agent.h \
- nm-types.h \
nm-vpn-connection.h \
nm-wimax-nsp.h
nm-device-private.h \
nm-object-cache.h \
nm-object-private.h \
- nm-remote-connection-private.h \
- nm-types-private.h
+ nm-remote-connection-private.h
libnm_la_csources = \
nm-access-point.c \
nm-remote-connection.c \
nm-remote-settings.c \
nm-secret-agent.c \
- nm-types.c \
nm-vpn-connection.c \
nm-wimax-nsp.c
#include <nm-setting-wireless.h>
#include <nm-setting.h>
#include <nm-simple-connection.h>
-#include <nm-types.h>
#include <nm-utils.h>
#include <nm-version.h>
#include <nm-vpn-connection.h>
nm_ip6_address_get_prefix;
nm_ip6_address_get_type;
nm_ip6_address_new;
- nm_ip6_address_object_array_get_type;
nm_ip6_address_ref;
nm_ip6_address_set_address;
nm_ip6_address_set_gateway;
nm_ip6_route_get_prefix;
nm_ip6_route_get_type;
nm_ip6_route_new;
- nm_ip6_route_object_array_get_type;
nm_ip6_route_ref;
nm_ip6_route_set_dest;
nm_ip6_route_set_metric;
#include "nm-dhcp4-config.h"
#include "nm-dbus-interface.h"
-#include "nm-types-private.h"
#include "nm-object-private.h"
#include "nm-utils.h"
#include "nm-dhcp6-config.h"
#include "nm-dbus-interface.h"
-#include "nm-types-private.h"
#include "nm-object-private.h"
#include "nm-utils.h"
#include <nm-setting-ip4-config.h>
#include "nm-ip4-config.h"
#include "nm-dbus-interface.h"
-#include "nm-types-private.h"
#include "nm-object-private.h"
#include "nm-utils.h"
+#include "nm-core-internal.h"
G_DEFINE_TYPE (NMIP4Config, nm_ip4_config, NM_TYPE_OBJECT)
g_value_set_string (value, nm_ip4_config_get_gateway (self));
break;
case PROP_ADDRESSES:
- nm_utils_ip4_addresses_to_gvalue (priv->addresses, value);
+ g_value_take_boxed (value, _nm_utils_copy_slist_to_array (priv->addresses,
+ (NMUtilsCopyFunc) nm_ip4_address_dup,
+ (GDestroyNotify) nm_ip4_address_unref));
break;
case PROP_ROUTES:
- nm_utils_ip4_routes_to_gvalue (priv->routes, value);
+ g_value_take_boxed (value, _nm_utils_copy_slist_to_array (priv->routes,
+ (NMUtilsCopyFunc) nm_ip4_route_dup,
+ (GDestroyNotify) nm_ip4_route_unref));
break;
case PROP_NAMESERVERS:
g_value_set_boxed (value, (char **) nm_ip4_config_get_nameservers (self));
/**
* NMIP4Config:addresses:
*
- * The #GPtrArray containing #NMIP4Address<!-- -->es of the configuration.
+ * A #GPtrArray containing the addresses (#NMIP4Address) of the configuration.
**/
g_object_class_install_property
(object_class, PROP_ADDRESSES,
- g_param_spec_pointer (NM_IP4_CONFIG_ADDRESSES, "", "",
- G_PARAM_READABLE |
- G_PARAM_STATIC_STRINGS));
+ g_param_spec_boxed (NM_IP4_CONFIG_ADDRESSES, "", "",
+ G_TYPE_PTR_ARRAY,
+ G_PARAM_READABLE |
+ G_PARAM_STATIC_STRINGS));
/**
* NMIP4Config:routes:
*
- * The #GPtrArray containing #NMSettingIP4Routes of the configuration.
+ * A #GPtrArray containing the routes (#NMIP4Route) of the configuration.
**/
g_object_class_install_property
(object_class, PROP_ROUTES,
- g_param_spec_pointer (NM_IP4_CONFIG_ROUTES, "", "",
- G_PARAM_READABLE |
- G_PARAM_STATIC_STRINGS));
+ g_param_spec_boxed (NM_IP4_CONFIG_ROUTES, "", "",
+ G_TYPE_PTR_ARRAY,
+ G_PARAM_READABLE |
+ G_PARAM_STATIC_STRINGS));
/**
* NMIP4Config:nameservers:
#include <nm-setting-ip6-config.h>
#include "nm-ip6-config.h"
#include "nm-dbus-interface.h"
-#include "nm-types-private.h"
#include "nm-object-private.h"
#include "nm-utils.h"
#include "nm-dbus-glib-types.h"
+#include "nm-core-internal.h"
G_DEFINE_TYPE (NMIP6Config, nm_ip6_config, NM_TYPE_OBJECT)
g_value_set_string (value, nm_ip6_config_get_gateway (self));
break;
case PROP_ADDRESSES:
- nm_utils_ip6_addresses_to_gvalue (priv->addresses, value);
+ g_value_take_boxed (value, _nm_utils_copy_slist_to_array (priv->addresses,
+ (NMUtilsCopyFunc) nm_ip6_address_dup,
+ (GDestroyNotify) nm_ip6_address_unref));
break;
case PROP_ROUTES:
- nm_utils_ip6_routes_to_gvalue (priv->routes, value);
+ g_value_take_boxed (value, _nm_utils_copy_slist_to_array (priv->routes,
+ (NMUtilsCopyFunc) nm_ip6_route_dup,
+ (GDestroyNotify) nm_ip6_route_unref));
break;
case PROP_NAMESERVERS:
g_value_set_boxed (value, (char **) nm_ip6_config_get_nameservers (self));
/**
* NMIP6Config:addresses:
*
- * The #GPtrArray containing the IPv6 addresses; use
- * nm_utils_ip6_addresses_from_gvalue() to return a #GSList of
- * #NMSettingIP6Address objects that is more usable than the raw data.
+ * The #GPtrArray containing the IPv6 addresses (#NMIP6Address).
**/
g_object_class_install_property
(object_class, PROP_ADDRESSES,
g_param_spec_boxed (NM_IP6_CONFIG_ADDRESSES, "", "",
- NM_TYPE_IP6_ADDRESS_OBJECT_ARRAY,
+ G_TYPE_PTR_ARRAY,
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS));
/**
* NMIP6Config:routes:
*
- * The #GPtrArray containing the IPv6 routes; use
- * nm_utils_ip6_routes_from_gvalue() to return a #GSList of
- * #NMSettingIP6Address objects that is more usable than the raw data.
+ * The #GPtrArray containing the IPv6 routes (#NMIP6Route).
**/
g_object_class_install_property
(object_class, PROP_ROUTES,
g_param_spec_boxed (NM_IP6_CONFIG_ROUTES, "", "",
- NM_TYPE_IP6_ROUTE_OBJECT_ARRAY,
+ G_TYPE_PTR_ARRAY,
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS));
#include "nm-object-private.h"
#include "nm-dbus-glib-types.h"
#include "nm-glib-compat.h"
-#include "nm-types.h"
#include "nm-dbus-helpers-private.h"
static gboolean debug = FALSE;
+++ /dev/null
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/*
- * 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., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- *
- * Copyright 2007 - 2008 Red Hat, Inc.
- */
-
-#ifndef __NM_TYPES_PRIVATE_H__
-#define __NM_TYPES_PRIVATE_H__
-
-#include <dbus/dbus-glib.h>
-#include "nm-types.h"
-#include "nm-object-private.h"
-
-gboolean _nm_ip6_address_array_demarshal (GValue *value, GSList **dest);
-
-#endif /* __NM_TYPES_PRIVATE_H__ */
+++ /dev/null
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/*
- * 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., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- *
- * Copyright 2008 Red Hat, Inc.
- */
-
-#include <glib.h>
-#include <dbus/dbus-glib.h>
-#include <string.h>
-#include "nm-types.h"
-#include "nm-types-private.h"
-#include "nm-object-private.h"
-#include "nm-object-cache.h"
-#include "nm-dbus-glib-types.h"
-#include "nm-setting-ip6-config.h"
-
-static gpointer
-_nm_ip6_address_object_array_copy (GPtrArray *src)
-{
- GPtrArray *dest;
- int i;
-
- dest = g_ptr_array_sized_new (src->len);
- for (i = 0; i < src->len; i++)
- g_ptr_array_add (dest, nm_ip6_address_dup (g_ptr_array_index (src, i)));
- return dest;
-}
-
-static void
-_nm_ip6_address_object_array_free (GPtrArray *array)
-{
- int i;
-
- for (i = 0; i < array->len; i++)
- nm_ip6_address_unref (g_ptr_array_index (array, i));
- g_ptr_array_free (array, TRUE);
-}
-
-GType
-nm_ip6_address_object_array_get_type (void)
-{
- static GType our_type = 0;
-
- if (our_type == 0)
- our_type = g_boxed_type_register_static (g_intern_static_string ("NMIP6AddressObjectArray"),
- (GBoxedCopyFunc) _nm_ip6_address_object_array_copy,
- (GBoxedFreeFunc) _nm_ip6_address_object_array_free);
- return our_type;
-}
-
-/*****************************/
-
-static gpointer
-_nm_ip6_route_object_array_copy (GPtrArray *src)
-{
- GPtrArray *dest;
- int i;
-
- dest = g_ptr_array_sized_new (src->len);
- for (i = 0; i < src->len; i++)
- g_ptr_array_add (dest, nm_ip6_route_dup (g_ptr_array_index (src, i)));
- return dest;
-}
-
-static void
-_nm_ip6_route_object_array_free (GPtrArray *array)
-{
- int i;
-
- for (i = 0; i < array->len; i++)
- nm_ip6_route_unref (g_ptr_array_index (array, i));
- g_ptr_array_free (array, TRUE);
-}
-
-GType
-nm_ip6_route_object_array_get_type (void)
-{
- static GType our_type = 0;
-
- if (our_type == 0)
- our_type = g_boxed_type_register_static (g_intern_static_string ("NMIP6RouteObjectArray"),
- (GBoxedCopyFunc) _nm_ip6_route_object_array_copy,
- (GBoxedFreeFunc) _nm_ip6_route_object_array_free);
- return our_type;
-}
+++ /dev/null
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/*
- * 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., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- *
- * Copyright 2008 Red Hat, Inc.
- */
-
-#ifndef __NM_TYPES_H__
-#define __NM_TYPES_H__
-
-#if !defined (__NETWORKMANAGER_H_INSIDE__) && !defined (NETWORKMANAGER_COMPILATION)
-#error "Only <NetworkManager.h> can be included directly."
-#endif
-
-#include <glib.h>
-#include <glib-object.h>
-
-#include <nm-enum-types.h>
-
-G_BEGIN_DECLS
-
-#define NM_TYPE_IP6_ADDRESS_OBJECT_ARRAY (nm_ip6_address_object_array_get_type ())
-GType nm_ip6_address_object_array_get_type (void) G_GNUC_CONST;
-
-#define NM_TYPE_IP6_ROUTE_OBJECT_ARRAY (nm_ip6_route_object_array_get_type ())
-GType nm_ip6_route_object_array_get_type (void) G_GNUC_CONST;
-
-G_END_DECLS
-
-#endif /* __NM_TYPES_H__ */
#include "nm-wimax-nsp.h"
#include "nm-dbus-interface.h"
-#include "nm-types-private.h"
#include "nm-object-private.h"
G_DEFINE_TYPE (NMWimaxNsp, nm_wimax_nsp, NM_TYPE_OBJECT)