summaryrefslogtreecommitdiff
path: root/libnm/nm-active-connection.c
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2014-05-15 14:25:07 -0400
committerDan Winship <danw@gnome.org>2014-08-01 14:34:40 -0400
commit258e74eb0c191cdd86719ad65864ab3c27ada80c (patch)
tree29d5a0d72ca94d1ea7daaa6c19ef745db31806fd /libnm/nm-active-connection.c
parent8ca2998d81ca7534c59262b10f5bf3c480177b88 (diff)
downloadNetworkManager-258e74eb0c191cdd86719ad65864ab3c27ada80c.tar.gz
libnm: make the the use of GInitable mandatory
Remove _nm_object_ensure_inited(), etc; objects that implement GInitable are now mandatory-to-init(). Remove constructor() implementations that sometimes return NULL; do all the relevant checking in init() instead. Make nm_client_new() and nm_remote_settings_new() take a GCancellable and a GError**.
Diffstat (limited to 'libnm/nm-active-connection.c')
-rw-r--r--libnm/nm-active-connection.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/libnm/nm-active-connection.c b/libnm/nm-active-connection.c
index 3f970f001c..1f008b1c04 100644
--- a/libnm/nm-active-connection.c
+++ b/libnm/nm-active-connection.c
@@ -199,7 +199,6 @@ nm_active_connection_get_connection (NMActiveConnection *connection)
{
g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), NULL);
- _nm_object_ensure_inited (NM_OBJECT (connection));
return NM_ACTIVE_CONNECTION_GET_PRIVATE (connection)->connection;
}
@@ -217,7 +216,6 @@ nm_active_connection_get_id (NMActiveConnection *connection)
{
g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), NULL);
- _nm_object_ensure_inited (NM_OBJECT (connection));
return NM_ACTIVE_CONNECTION_GET_PRIVATE (connection)->id;
}
@@ -235,7 +233,6 @@ nm_active_connection_get_uuid (NMActiveConnection *connection)
{
g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), NULL);
- _nm_object_ensure_inited (NM_OBJECT (connection));
return NM_ACTIVE_CONNECTION_GET_PRIVATE (connection)->uuid;
}
@@ -253,7 +250,6 @@ nm_active_connection_get_connection_type (NMActiveConnection *connection)
{
g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), NULL);
- _nm_object_ensure_inited (NM_OBJECT (connection));
return NM_ACTIVE_CONNECTION_GET_PRIVATE (connection)->type;
}
@@ -271,7 +267,6 @@ nm_active_connection_get_specific_object (NMActiveConnection *connection)
{
g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), NULL);
- _nm_object_ensure_inited (NM_OBJECT (connection));
return NM_ACTIVE_CONNECTION_GET_PRIVATE (connection)->specific_object;
}
@@ -289,7 +284,6 @@ nm_active_connection_get_devices (NMActiveConnection *connection)
{
g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), NULL);
- _nm_object_ensure_inited (NM_OBJECT (connection));
return handle_ptr_array_return (NM_ACTIVE_CONNECTION_GET_PRIVATE (connection)->devices);
}
@@ -306,7 +300,6 @@ nm_active_connection_get_state (NMActiveConnection *connection)
{
g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), NM_ACTIVE_CONNECTION_STATE_UNKNOWN);
- _nm_object_ensure_inited (NM_OBJECT (connection));
return NM_ACTIVE_CONNECTION_GET_PRIVATE (connection)->state;
}
@@ -324,7 +317,6 @@ nm_active_connection_get_default (NMActiveConnection *connection)
{
g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), FALSE);
- _nm_object_ensure_inited (NM_OBJECT (connection));
return NM_ACTIVE_CONNECTION_GET_PRIVATE (connection)->is_default;
}
@@ -343,7 +335,6 @@ nm_active_connection_get_ip4_config (NMActiveConnection *connection)
{
g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), NULL);
- _nm_object_ensure_inited (NM_OBJECT (connection));
return NM_ACTIVE_CONNECTION_GET_PRIVATE (connection)->ip4_config;
}
@@ -363,7 +354,6 @@ nm_active_connection_get_dhcp4_config (NMActiveConnection *connection)
{
g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), NULL);
- _nm_object_ensure_inited (NM_OBJECT (connection));
return NM_ACTIVE_CONNECTION_GET_PRIVATE (connection)->dhcp4_config;
}
@@ -381,7 +371,6 @@ nm_active_connection_get_default6 (NMActiveConnection *connection)
{
g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), FALSE);
- _nm_object_ensure_inited (NM_OBJECT (connection));
return NM_ACTIVE_CONNECTION_GET_PRIVATE (connection)->is_default6;
}
@@ -400,7 +389,6 @@ nm_active_connection_get_ip6_config (NMActiveConnection *connection)
{
g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), NULL);
- _nm_object_ensure_inited (NM_OBJECT (connection));
return NM_ACTIVE_CONNECTION_GET_PRIVATE (connection)->ip6_config;
}
@@ -420,7 +408,6 @@ nm_active_connection_get_dhcp6_config (NMActiveConnection *connection)
{
g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), NULL);
- _nm_object_ensure_inited (NM_OBJECT (connection));
return NM_ACTIVE_CONNECTION_GET_PRIVATE (connection)->dhcp6_config;
}
@@ -437,7 +424,6 @@ nm_active_connection_get_vpn (NMActiveConnection *connection)
{
g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), FALSE);
- _nm_object_ensure_inited (NM_OBJECT (connection));
return NM_ACTIVE_CONNECTION_GET_PRIVATE (connection)->is_vpn;
}
@@ -455,7 +441,6 @@ nm_active_connection_get_master (NMActiveConnection *connection)
{
g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), NULL);
- _nm_object_ensure_inited (NM_OBJECT (connection));
return NM_ACTIVE_CONNECTION_GET_PRIVATE (connection)->master;
}
@@ -508,8 +493,6 @@ get_property (GObject *object,
{
NMActiveConnection *self = NM_ACTIVE_CONNECTION (object);
- _nm_object_ensure_inited (NM_OBJECT (object));
-
switch (prop_id) {
case PROP_CONNECTION:
g_value_set_string (value, nm_active_connection_get_connection (self));