From dd428301eb6f02542015121d7b08d9997f137e50 Mon Sep 17 00:00:00 2001
From: Sebastien Bacher
To add a new network connection to the NetworkManager settings service, first -build up a template NMConnection object. Since this connection is not yet +build up a template NMConnection object. Since this connection is not yet added to NetworkManager, it is known only to your program and is not yet an NMRemoteConnection. Then ask NMRemoteSettings to add your connection. When the connection is added successfully, the supplied callback is called @@ -368,7 +368,7 @@ the stored object known to NetworkManager.
if (error) g_print ("Error adding connection: %s", error->message); else { - g_print ("Added: %s\n", nm_connection_get_path (NM_CONNECTION (remote))); + g_print ("Added: %s\n", nm_connection_get_path (NM_CONNECTION (remote))); /* Use 'remote' with nm_remote_connection_commit_changes() to save * changes and nm_remote_connection_delete() to delete the connection */ } @@ -383,28 +383,28 @@ the stored object known to NetworkManager. char *uuid; gboolean success; - connection = nm_connection_new (); + connection = nm_connection_new (); /* Build up the 'connection' setting */ - s_con = (NMSettingConnection *) nm_setting_connection_new (); - uuid = nm_utils_uuid_generate (); + s_con = (NMSettingConnection *) nm_setting_connection_new (); + uuid = nm_utils_uuid_generate (); g_object_set (G_OBJECT (s_con), - NM_SETTING_CONNECTION_UUID, uuid, - NM_SETTING_CONNECTION_ID, human_name, - NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRED_SETTING_NAME, + NM_SETTING_CONNECTION_UUID, uuid, + NM_SETTING_CONNECTION_ID, human_name, + NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRED_SETTING_NAME, NULL); g_free (uuid); - nm_connection_add_setting (connection, NM_SETTING (s_con)); + nm_connection_add_setting (connection, NM_SETTING (s_con)); /* Add the required 'wired' setting as this is a wired connection */ - nm_connection_add_setting (connection, nm_setting_wired_new ()); + nm_connection_add_setting (connection, nm_setting_wired_new ()); /* Add an 'ipv4' setting using AUTO configuration (eg DHCP) */ - s_ip4 = (NMSettingIP4Config *) nm_setting_ip4_config_new (); + s_ip4 = (NMSettingIP4Config *) nm_setting_ip4_config_new (); g_object_set (G_OBJECT (s_ip4), - NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO, + NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO, NULL); - nm_connection_add_setting (connection, NM_SETTING (s_ip4)); + nm_connection_add_setting (connection, NM_SETTING (s_ip4)); /* Ask NetworkManager to store the connection */ success = nm_remote_settings_add_connection (settings, connection, added_cb, loop); @@ -725,7 +725,7 @@ not known.gboolean nm_remote_settings_add_connection (NMRemoteSettings *settings, -NMConnection *connection, +NMConnection *connection,NMRemoteSettingsAddConnectionFunc callback,gpointer user_data);
Requests that the remote settings service add the given settings to a new @@ -785,7 +785,7 @@ added, not the object itself
gboolean nm_remote_settings_add_connection_unsaved (NMRemoteSettings *settings, -NMConnection *connection, +NMConnection *connection,NMRemoteSettingsAddConnectionFunc callback,gpointer user_data);
Requests that the remote settings service add the given settings to a new -- cgit 1.3.0-6-gf8a5