Commit 6fc5e814 authored by Dan Williams's avatar Dan Williams

2008-03-29 Dan Williams <dcbw@redhat.com>

	* libnm-util/nm-setting-8021x.c
	  libnm-util/nm-setting-ip4-config.c
	  libnm-util/nm-setting-vpn-properties.c
	  libnm-util/nm-setting-vpn.c
	  libnm-util/nm-setting-wireless-security.c
	  libnm-util/nm-setting-wireless.c
	  libnm-util/nm-utils.c
	  src/dhcp-manager/nm-dhcp-manager.c
	  src/nm-activation-request.c
	  src/nm-ip4-config.c
	  src/nm-manager.c
	  src/nm-properties-changed-signal.c
	  src/ppp-manager/nm-pppd-plugin.c
	  src/supplicant-manager/nm-supplicant-interface.c
	  src/vpn-manager/nm-vpn-connection.c
		- consistently use nm-dbus-glib-types.h



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3514 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
parent 0f4c0fca
2008-03-29 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting-8021x.c
libnm-util/nm-setting-ip4-config.c
libnm-util/nm-setting-vpn-properties.c
libnm-util/nm-setting-vpn.c
libnm-util/nm-setting-wireless-security.c
libnm-util/nm-setting-wireless.c
libnm-util/nm-utils.c
src/dhcp-manager/nm-dhcp-manager.c
src/nm-activation-request.c
src/nm-ip4-config.c
src/nm-manager.c
src/nm-properties-changed-signal.c
src/ppp-manager/nm-pppd-plugin.c
src/supplicant-manager/nm-supplicant-interface.c
src/vpn-manager/nm-vpn-connection.c
- consistently use nm-dbus-glib-types.h
2008-03-29 Dan Williams <dcbw@redhat.com>
* src/vpn-manager/nm-vpn-connection.c
......
......@@ -6,6 +6,7 @@
#include "nm-setting-8021x.h"
#include "nm-param-spec-specialized.h"
#include "nm-utils.h"
#include "nm-dbus-glib-types.h"
G_DEFINE_TYPE (NMSetting8021x, nm_setting_802_1x, NM_TYPE_SETTING)
......@@ -493,7 +494,7 @@ nm_setting_802_1x_class_init (NMSetting8021xClass *setting_class)
nm_param_spec_specialized (NM_SETTING_802_1X_EAP,
"EAP",
"EAP",
dbus_g_type_get_collection ("GSList", G_TYPE_STRING),
DBUS_TYPE_G_LIST_OF_STRING,
G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE));
g_object_class_install_property
......
......@@ -6,6 +6,7 @@
#include "nm-setting-ip4-config.h"
#include "nm-param-spec-specialized.h"
#include "nm-utils.h"
#include "nm-dbus-glib-types.h"
G_DEFINE_TYPE (NMSettingIP4Config, nm_setting_ip4_config, NM_TYPE_SETTING)
......@@ -233,7 +234,7 @@ nm_setting_ip4_config_class_init (NMSettingIP4ConfigClass *setting_class)
nm_param_spec_specialized (NM_SETTING_IP4_CONFIG_DNS_SEARCH,
"DNS search",
"List of DNS search domains",
dbus_g_type_get_collection ("GSList", G_TYPE_STRING),
DBUS_TYPE_G_LIST_OF_STRING,
G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE));
g_object_class_install_property
......@@ -241,6 +242,6 @@ nm_setting_ip4_config_class_init (NMSettingIP4ConfigClass *setting_class)
nm_param_spec_specialized (NM_SETTING_IP4_CONFIG_ADDRESSES,
"Addresses",
"List of NMSettingIP4Addresses",
dbus_g_type_get_collection ("GPtrArray", dbus_g_type_get_collection ("GArray", G_TYPE_UINT)),
DBUS_TYPE_G_ARRAY_OF_ARRAY_OF_UINT,
G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE));
}
......@@ -3,6 +3,7 @@
#include <dbus/dbus-glib.h>
#include "nm-setting-vpn-properties.h"
#include "nm-param-spec-specialized.h"
#include "nm-dbus-glib-types.h"
G_DEFINE_TYPE (NMSettingVPNProperties, nm_setting_vpn_properties, NM_TYPE_SETTING)
......@@ -140,6 +141,6 @@ nm_setting_vpn_properties_class_init (NMSettingVPNPropertiesClass *setting_class
nm_param_spec_specialized (NM_SETTING_VPN_PROPERTIES_DATA,
"Data",
"VPN Service specific data",
dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE),
DBUS_TYPE_G_MAP_OF_VARIANT,
G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE));
}
......@@ -5,6 +5,7 @@
#include "nm-setting-vpn.h"
#include "nm-param-spec-specialized.h"
#include "nm-utils.h"
#include "nm-dbus-glib-types.h"
G_DEFINE_TYPE (NMSettingVPN, nm_setting_vpn, NM_TYPE_SETTING)
......@@ -137,6 +138,6 @@ nm_setting_vpn_class_init (NMSettingVPNClass *setting_class)
nm_param_spec_specialized (NM_SETTING_VPN_ROUTES,
"Routes",
"Routes",
dbus_g_type_get_collection ("GSList", G_TYPE_STRING),
DBUS_TYPE_G_LIST_OF_STRING,
G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE));
}
......@@ -7,6 +7,7 @@
#include "nm-setting-8021x.h"
#include "nm-param-spec-specialized.h"
#include "nm-utils.h"
#include "nm-dbus-glib-types.h"
G_DEFINE_TYPE (NMSettingWirelessSecurity, nm_setting_wireless_security, NM_TYPE_SETTING)
......@@ -418,7 +419,7 @@ nm_setting_wireless_security_class_init (NMSettingWirelessSecurityClass *setting
nm_param_spec_specialized (NM_SETTING_WIRELESS_SECURITY_PROTO,
"Proto",
"Proto",
dbus_g_type_get_collection ("GSList", G_TYPE_STRING),
DBUS_TYPE_G_LIST_OF_STRING,
G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE));
g_object_class_install_property
......@@ -426,7 +427,7 @@ nm_setting_wireless_security_class_init (NMSettingWirelessSecurityClass *setting
nm_param_spec_specialized (NM_SETTING_WIRELESS_SECURITY_PAIRWISE,
"Pairwise",
"Pairwise",
dbus_g_type_get_collection ("GSList", G_TYPE_STRING),
DBUS_TYPE_G_LIST_OF_STRING,
G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE));
g_object_class_install_property
......@@ -434,7 +435,7 @@ nm_setting_wireless_security_class_init (NMSettingWirelessSecurityClass *setting
nm_param_spec_specialized (NM_SETTING_WIRELESS_SECURITY_GROUP,
"Group",
"Group",
dbus_g_type_get_collection ("GSList", G_TYPE_STRING),
DBUS_TYPE_G_LIST_OF_STRING,
G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE));
g_object_class_install_property
......
......@@ -2,16 +2,15 @@
#include <string.h>
#include <netinet/ether.h>
#include <dbus/dbus-glib.h>
#include "wireless-helper.h"
#include <dbus/dbus-glib.h>
#include "NetworkManager.h"
#include "nm-setting-wireless.h"
#include "nm-param-spec-specialized.h"
#include "nm-utils.h"
#include "nm-dbus-glib-types.h"
G_DEFINE_TYPE (NMSettingWireless, nm_setting_wireless, NM_TYPE_SETTING)
......@@ -499,7 +498,7 @@ nm_setting_wireless_class_init (NMSettingWirelessClass *setting_class)
nm_param_spec_specialized (NM_SETTING_WIRELESS_SEEN_BSSIDS,
"Seen BSSIDS",
"Seen BSSIDs",
dbus_g_type_get_collection ("GSList", G_TYPE_STRING),
DBUS_TYPE_G_LIST_OF_STRING,
G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE | NM_SETTING_PARAM_FUZZY_IGNORE));
g_object_class_install_property
......
......@@ -34,6 +34,7 @@
#include <dbus/dbus-glib.h>
#include "nm-utils.h"
#include "NetworkManager.h"
#include "nm-dbus-glib-types.h"
struct EncodingTriplet
{
......@@ -428,10 +429,6 @@ nm_utils_string_slist_validate (GSList *list, const char **valid_values)
return TRUE;
}
#define TYPE_GSLIST_OF_STRINGS dbus_g_type_get_collection ("GSList", G_TYPE_STRING)
#define TYPE_ARRAY_OF_IP4ADDR_STRUCTS dbus_g_type_get_collection ("GPtrArray", dbus_g_type_get_collection ("GArray", G_TYPE_UINT))
#define TYPE_HASH_OF_GVALUES dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE)
static void
nm_utils_convert_strv_to_slist (const GValue *src_value, GValue *dest_value)
{
......@@ -456,7 +453,7 @@ nm_utils_convert_strv_to_string (const GValue *src_value, GValue *dest_value)
GString *printable;
GSList *iter;
g_return_if_fail (g_type_is_a (G_VALUE_TYPE (src_value), TYPE_GSLIST_OF_STRINGS));
g_return_if_fail (g_type_is_a (G_VALUE_TYPE (src_value), DBUS_TYPE_G_LIST_OF_STRING));
strings = (GSList *) g_value_get_boxed (src_value);
......@@ -512,7 +509,7 @@ nm_utils_convert_ip4_addr_struct_array_to_string (const GValue *src_value, GValu
GString *printable;
guint i = 0;
g_return_if_fail (g_type_is_a (G_VALUE_TYPE (src_value), TYPE_ARRAY_OF_IP4ADDR_STRUCTS));
g_return_if_fail (g_type_is_a (G_VALUE_TYPE (src_value), DBUS_TYPE_G_ARRAY_OF_ARRAY_OF_UINT));
ptr_array = (GPtrArray *) g_value_get_boxed (src_value);
......@@ -577,7 +574,7 @@ nm_utils_convert_gvalue_hash_to_string (const GValue *src_value, GValue *dest_va
GHashTable *hash;
GString *printable;
g_return_if_fail (g_type_is_a (G_VALUE_TYPE (src_value), TYPE_HASH_OF_GVALUES));
g_return_if_fail (g_type_is_a (G_VALUE_TYPE (src_value), DBUS_TYPE_G_MAP_OF_VARIANT));
hash = (GHashTable *) g_value_get_boxed (src_value);
......@@ -596,18 +593,18 @@ nm_utils_register_value_transformations (void)
if (G_UNLIKELY (!registered)) {
g_value_register_transform_func (G_TYPE_STRV,
TYPE_GSLIST_OF_STRINGS,
DBUS_TYPE_G_LIST_OF_STRING,
nm_utils_convert_strv_to_slist);
g_value_register_transform_func (TYPE_GSLIST_OF_STRINGS,
g_value_register_transform_func (DBUS_TYPE_G_LIST_OF_STRING,
G_TYPE_STRING,
nm_utils_convert_strv_to_string);
g_value_register_transform_func (DBUS_TYPE_G_UINT_ARRAY,
G_TYPE_STRING,
nm_utils_convert_uint_array_to_string);
g_value_register_transform_func (TYPE_ARRAY_OF_IP4ADDR_STRUCTS,
g_value_register_transform_func (DBUS_TYPE_G_ARRAY_OF_ARRAY_OF_UINT,
G_TYPE_STRING,
nm_utils_convert_ip4_addr_struct_array_to_string);
g_value_register_transform_func (TYPE_HASH_OF_GVALUES,
g_value_register_transform_func (DBUS_TYPE_G_MAP_OF_VARIANT,
G_TYPE_STRING,
nm_utils_convert_gvalue_hash_to_string);
registered = TRUE;
......
......@@ -36,6 +36,7 @@
#include "nm-utils.h"
#include "NetworkManagerUtils.h"
#include "nm-dbus-manager.h"
#include "nm-dbus-glib-types.h"
#define NM_DHCP_CLIENT_DBUS_SERVICE "org.freedesktop.nm_dhcp_client"
#define NM_DHCP_CLIENT_DBUS_IFACE "org.freedesktop.nm_dhcp_client"
......@@ -441,8 +442,6 @@ out:
g_free (reason);
}
#define DBUS_TYPE_G_STRING_VARIANT_HASHTABLE (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE))
static NMDHCPManager *
nm_dhcp_manager_new (void)
{
......@@ -477,7 +476,7 @@ nm_dhcp_manager_new (void)
dbus_g_proxy_add_signal (priv->proxy,
"Event",
DBUS_TYPE_G_STRING_VARIANT_HASHTABLE,
DBUS_TYPE_G_MAP_OF_VARIANT,
G_TYPE_INVALID);
dbus_g_proxy_connect_signal (priv->proxy, "Event",
......
......@@ -31,6 +31,7 @@
#include "nm-device.h"
#include "nm-properties-changed-signal.h"
#include "nm-active-connection.h"
#include "nm-dbus-glib-types.h"
#include "nm-manager.h" /* FIXME! */
......@@ -254,7 +255,7 @@ nm_act_request_class_init (NMActRequestClass *req_class)
g_param_spec_boxed (NM_ACTIVE_CONNECTION_DEVICES,
"Devices",
"Devices",
dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH),
DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH,
G_PARAM_READABLE));
g_object_class_install_property
(object_class, PROP_VPN,
......@@ -378,9 +379,6 @@ settings_order_func (gconstpointer a, gconstpointer b)
return 0;
}
#define DBUS_TYPE_G_STRING_VARIANT_HASHTABLE (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE))
#define DBUS_TYPE_G_DICT_OF_DICTS (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, DBUS_TYPE_G_STRING_VARIANT_HASHTABLE))
static void
get_secrets_cb (DBusGProxy *proxy, DBusGProxyCall *call, gpointer user_data)
{
......@@ -399,7 +397,7 @@ get_secrets_cb (DBusGProxy *proxy, DBusGProxyCall *call, gpointer user_data)
g_object_set_data (G_OBJECT (priv->connection), CONNECTION_GET_SECRETS_CALL_TAG, NULL);
if (!dbus_g_proxy_end_call (proxy, call, &err,
DBUS_TYPE_G_DICT_OF_DICTS, &settings,
DBUS_TYPE_G_MAP_OF_MAP_OF_VARIANT, &settings,
G_TYPE_INVALID)) {
nm_warning ("Couldn't get connection secrets: %s.", err->message);
g_error_free (err);
......@@ -448,8 +446,6 @@ out:
g_hash_table_destroy (settings);
}
#define DBUS_TYPE_STRING_ARRAY (dbus_g_type_get_collection ("GPtrArray", G_TYPE_STRING))
gboolean
nm_act_request_request_connection_secrets (NMActRequest *req,
const char *setting_name,
......@@ -493,7 +489,7 @@ nm_act_request_request_connection_secrets (NMActRequest *req,
free_get_secrets_info,
G_MAXINT32,
G_TYPE_STRING, setting_name,
DBUS_TYPE_STRING_ARRAY, hints,
DBUS_TYPE_G_ARRAY_OF_STRING, hints,
G_TYPE_BOOLEAN, request_new,
G_TYPE_INVALID);
g_ptr_array_free (hints, TRUE);
......
......@@ -33,6 +33,7 @@
#include <netinet/in.h>
#include "nm-ip4-config-glue.h"
#include "nm-dbus-glib-types.h"
G_DEFINE_TYPE (NMIP4Config, nm_ip4_config, G_TYPE_OBJECT)
......@@ -599,7 +600,7 @@ nm_ip4_config_class_init (NMIP4ConfigClass *config_class)
g_param_spec_boxed (NM_IP4_CONFIG_DOMAINS,
"Domains",
"Domains",
dbus_g_type_get_collection ("GPtrArray", G_TYPE_STRING),
DBUS_TYPE_G_ARRAY_OF_STRING,
G_PARAM_READABLE));
g_object_class_install_property
(object_class, PROP_NIS_DOMAIN,
......
......@@ -15,6 +15,7 @@
#include "nm-setting-wireless.h"
#include "nm-setting-vpn.h"
#include "nm-marshal.h"
#include "nm-dbus-glib-types.h"
static gboolean impl_manager_get_devices (NMManager *manager, GPtrArray **devices, GError **err);
static void impl_manager_activate_connection (NMManager *manager,
......@@ -427,7 +428,7 @@ nm_manager_class_init (NMManagerClass *manager_class)
g_param_spec_boxed (NM_MANAGER_ACTIVE_CONNECTIONS,
"Active connections",
"Active connections",
dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH),
DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH,
G_PARAM_READABLE));
/* signals */
......@@ -522,9 +523,6 @@ nm_manager_class_init (NMManagerClass *manager_class)
dbus_g_error_domain_register (NM_MANAGER_ERROR, NULL, NM_TYPE_MANAGER_ERROR);
}
#define DBUS_TYPE_G_STRING_VARIANT_HASHTABLE (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE))
#define DBUS_TYPE_G_DICT_OF_DICTS (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, DBUS_TYPE_G_STRING_VARIANT_HASHTABLE))
static NMConnectionScope
get_scope_for_proxy (DBusGProxy *proxy)
{
......@@ -593,7 +591,7 @@ connection_get_settings_cb (DBusGProxy *proxy,
g_return_if_fail (info != NULL);
if (!dbus_g_proxy_end_call (proxy, call_id, &err,
DBUS_TYPE_G_DICT_OF_DICTS, &settings,
DBUS_TYPE_G_MAP_OF_MAP_OF_VARIANT, &settings,
G_TYPE_INVALID)) {
nm_warning ("Couldn't retrieve connection settings: %s.", err->message);
g_error_free (err);
......@@ -779,7 +777,7 @@ internal_new_connection_cb (DBusGProxy *proxy,
}
dbus_g_proxy_add_signal (con_proxy, "Updated",
DBUS_TYPE_G_DICT_OF_DICTS,
DBUS_TYPE_G_MAP_OF_MAP_OF_VARIANT,
G_TYPE_INVALID);
dbus_g_proxy_connect_signal (con_proxy, "Updated",
G_CALLBACK (connection_updated_cb),
......@@ -807,8 +805,6 @@ internal_new_connection_cb (DBusGProxy *proxy,
*(info->calls) = g_slist_prepend (*(info->calls), call);
}
#define DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH (dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH))
static void
list_connections_cb (DBusGProxy *proxy,
DBusGProxyCall *call_id,
......
......@@ -5,6 +5,7 @@
#include <dbus/dbus-glib.h>
#include "nm-properties-changed-signal.h"
#include "nm-dbus-glib-types.h"
#define NM_DBUS_PROPERTY_CHANGED "NM_DBUS_PROPERTY_CHANGED"
......@@ -171,7 +172,7 @@ nm_properties_changed_signal_new (GObjectClass *object_class,
class_offset,
NULL, NULL,
g_cclosure_marshal_VOID__BOXED,
G_TYPE_NONE, 1, dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE));
G_TYPE_NONE, 1, DBUS_TYPE_G_MAP_OF_VARIANT);
return id;
}
......@@ -14,6 +14,7 @@
#include "nm-pppd-plugin.h"
#include "nm-ppp-status.h"
#include "nm-pppd-plugin-glue.h"
#include "nm-dbus-glib-types.h"
int plugin_init (void);
......@@ -196,9 +197,7 @@ nm_ip_up (void *data, int arg)
}
dbus_g_proxy_call_no_reply (proxy, "SetIp4Config",
dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE),
hash,
G_TYPE_INVALID,
DBUS_TYPE_G_MAP_OF_VARIANT, hash, G_TYPE_INVALID,
G_TYPE_INVALID);
g_hash_table_destroy (hash);
......
......@@ -30,6 +30,7 @@
#include "nm-supplicant-config.h"
#include "nm-dbus-manager.h"
#include "nm-call-store.h"
#include "nm-dbus-glib-types.h"
#define WPAS_DBUS_IFACE_INTERFACE WPAS_DBUS_INTERFACE ".Interface"
#define WPAS_DBUS_IFACE_BSSID WPAS_DBUS_INTERFACE ".BSSID"
......@@ -472,7 +473,7 @@ bssid_properties_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_
GHashTable *hash = NULL;
if (!dbus_g_proxy_end_call (proxy, call_id, &err,
dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE), &hash,
DBUS_TYPE_G_MAP_OF_VARIANT, &hash,
G_TYPE_INVALID)) {
if (!strstr (err->message, "The BSSID requested was invalid"))
nm_warning ("Couldn't retrieve BSSID properties: %s.", err->message);
......@@ -517,7 +518,7 @@ scan_results_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data)
GPtrArray *array = NULL;
if (!dbus_g_proxy_end_call (proxy, call_id, &err,
dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH), &array,
DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH, &array,
G_TYPE_INVALID)) {
nm_warning ("could not get scan results: %s.", err->message);
g_error_free (err);
......@@ -768,7 +769,7 @@ nm_supplicant_interface_add_to_supplicant (NMSupplicantInterface * self,
info,
nm_supplicant_info_destroy,
G_TYPE_STRING, priv->dev,
dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE), hash,
DBUS_TYPE_G_MAP_OF_VARIANT, hash,
G_TYPE_INVALID);
g_hash_table_destroy (hash);
......@@ -1022,7 +1023,7 @@ call_set_network (NMSupplicantInfo *info)
call = dbus_g_proxy_begin_call (priv->net_proxy, "set", set_network_cb,
info,
nm_supplicant_info_destroy,
dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE), config_hash,
DBUS_TYPE_G_MAP_OF_VARIANT, config_hash,
G_TYPE_INVALID);
nm_supplicant_info_set_call (info, call);
g_hash_table_destroy (config_hash);
......@@ -1076,8 +1077,6 @@ convert_blob (const char *key, const GByteArray *value, GHashTable *hash)
g_hash_table_insert (hash, g_strdup (key), val);
}
#define DBUS_TYPE_G_STRING_VARIANT_HASHTABLE (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE))
static void
call_set_blobs (NMSupplicantInfo *info, GHashTable *orig_blobs)
{
......@@ -1102,7 +1101,7 @@ call_set_blobs (NMSupplicantInfo *info, GHashTable *orig_blobs)
call = dbus_g_proxy_begin_call (priv->iface_proxy, "setBlobs", set_blobs_cb,
info,
nm_supplicant_info_destroy,
DBUS_TYPE_G_STRING_VARIANT_HASHTABLE, blobs,
DBUS_TYPE_G_MAP_OF_VARIANT, blobs,
G_TYPE_INVALID);
nm_supplicant_info_set_call (info, call);
g_hash_table_destroy (blobs);
......
......@@ -41,6 +41,7 @@
#include "nm-marshal.h"
#include "nm-active-connection.h"
#include "nm-properties-changed-signal.h"
#include "nm-dbus-glib-types.h"
#define CONNECTION_GET_SECRETS_CALL_TAG "get-secrets-call"
......@@ -401,7 +402,7 @@ really_activate (NMVPNConnection *connection)
dbus_g_object_register_marshaller (g_cclosure_marshal_VOID__BOXED,
G_TYPE_NONE, G_TYPE_VALUE, G_TYPE_INVALID);
dbus_g_proxy_add_signal (priv->proxy, "Ip4Config",
dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE),
DBUS_TYPE_G_MAP_OF_VARIANT,
G_TYPE_INVALID);
dbus_g_proxy_connect_signal (priv->proxy, "Ip4Config",
G_CALLBACK (nm_vpn_connection_ip4_config_get),
......@@ -556,10 +557,6 @@ free_get_secrets_info (gpointer data)
g_slice_free (GetSecretsInfo, info);
}
#define DBUS_TYPE_STRING_ARRAY (dbus_g_type_get_collection ("GPtrArray", G_TYPE_STRING))
#define DBUS_TYPE_G_STRING_VARIANT_HASHTABLE (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE))
#define DBUS_TYPE_G_DICT_OF_DICTS (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, DBUS_TYPE_G_STRING_VARIANT_HASHTABLE))
static void
update_vpn_properties_secrets (gpointer key, gpointer data, gpointer user_data)
{
......@@ -589,7 +586,7 @@ get_secrets_cb (DBusGProxy *proxy, DBusGProxyCall *call, gpointer user_data)
g_object_set_data (G_OBJECT (info->vpn_connection), CONNECTION_GET_SECRETS_CALL_TAG, NULL);
if (!dbus_g_proxy_end_call (proxy, call, &err,
DBUS_TYPE_G_DICT_OF_DICTS, &settings,
DBUS_TYPE_G_MAP_OF_MAP_OF_VARIANT, &settings,
G_TYPE_INVALID)) {
nm_warning ("Couldn't get connection secrets: %s.", err->message);
g_error_free (err);
......@@ -654,7 +651,7 @@ get_connection_secrets (NMVPNConnection *vpn_connection,
free_get_secrets_info,
G_MAXINT32,
G_TYPE_STRING, setting_name,
DBUS_TYPE_STRING_ARRAY, hints,
DBUS_TYPE_G_ARRAY_OF_STRING, hints,
G_TYPE_BOOLEAN, request_new,
G_TYPE_INVALID);
g_ptr_array_free (hints, TRUE);
......@@ -928,7 +925,7 @@ nm_vpn_connection_class_init (NMVPNConnectionClass *connection_class)
g_param_spec_boxed (NM_ACTIVE_CONNECTION_DEVICES,
"Devices",
"Devices",
dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH),
DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH,
G_PARAM_READABLE));
g_object_class_install_property
(object_class, PROP_VPN,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment