about summary refs log tree commit diff
path: root/libnm/nm-client.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2015-08-28 01:13:48 +0200
committerMichael Biebl <biebl@debian.org>2015-08-28 01:13:48 +0200
commit81836c2d44802b4cca833d7775dd627e0797a7e2 (patch)
tree91154e6cefc0465306603f51ec0010d9963bbea4 /libnm/nm-client.c
parent50a58f0fabd8a34c1b6108a107e08abe3c1ccd24 (diff)
Imported Upstream version 1.0.6 upstream/1.0.6
Diffstat (limited to 'libnm/nm-client.c')
-rw-r--r--libnm/nm-client.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/libnm/nm-client.c b/libnm/nm-client.c
index e0a2a7b4..982717ce 100644
--- a/libnm/nm-client.c
+++ b/libnm/nm-client.c
@@ -76,6 +76,7 @@ enum {
 	PROP_CONNECTIONS,
 	PROP_HOSTNAME,
 	PROP_CAN_MODIFY,
+	PROP_METERED,
 
 	LAST_PROP
 };
@@ -1288,7 +1289,7 @@ nm_client_add_connection_async (NMClient *client,
 	}
 
 	simple = g_simple_async_result_new (G_OBJECT (client), callback, user_data,
-	                                    nm_client_deactivate_connection_async);
+	                                    nm_client_add_connection_async);
 	nm_remote_settings_add_connection_async (NM_CLIENT_GET_PRIVATE (client)->settings,
 	                                         connection, save_to_disk,
 	                                         cancellable, add_connection_cb, simple);
@@ -1871,6 +1872,7 @@ get_property (GObject *object, guint prop_id,
 	case PROP_PRIMARY_CONNECTION:
 	case PROP_ACTIVATING_CONNECTION:
 	case PROP_DEVICES:
+	case PROP_METERED:
 		g_object_get_property (G_OBJECT (NM_CLIENT_GET_PRIVATE (object)->manager),
 		                       pspec->name, value);
 		break;
@@ -2143,6 +2145,20 @@ nm_client_class_init (NMClientClass *client_class)
 		                       G_PARAM_READABLE |
 		                       G_PARAM_STATIC_STRINGS));
 
+	/**
+	 * NMClient:metered:
+	 *
+	 * Whether the connectivity is metered.
+	 *
+	 * Since: 1.0.6
+	 **/
+	g_object_class_install_property
+		(object_class, PROP_METERED,
+		 g_param_spec_uint (NM_CLIENT_METERED, "", "",
+		                    0, G_MAXUINT32, NM_METERED_UNKNOWN,
+		                    G_PARAM_READABLE |
+		                    G_PARAM_STATIC_STRINGS));
+
 	/* signals */
 
 	/**