Top |
org.freedesktop.NetworkManager.Settingsorg.freedesktop.NetworkManager.Settings — Connection Settings Profile Manager. |
ListConnections (OUT ao connections); GetConnectionByUuid (IN s uuid, OUT o connection); AddConnection (IN a{sa{sv}} connection, OUT o path); AddConnectionUnsaved (IN a{sa{sv}} connection, OUT o path); AddConnection2 (IN a{sa{sv}} settings, IN u flags, IN a{sv} args, OUT o path, OUT a{sv} result); LoadConnections (IN as filenames, OUT b status, OUT as failures); ReloadConnections (OUT b status); SaveHostname (IN s hostname);
The Settings interface allows clients to view and administrate the connections stored and used by NetworkManager.
ListConnections (OUT ao connections);
List the saved network connections known to NetworkManager.
|
List of connections. |
GetConnectionByUuid (IN s uuid, OUT o connection);
Retrieve the object path of a connection, given that connection's UUID.
|
The UUID to find the connection object path for. |
|
The connection's object path. |
AddConnection (IN a{sa{sv}} connection, OUT o path);
Add new connection and save it to disk. This operation does not start the network connection unless (1) device is idle and able to connect to the network described by the new connection, and (2) the connection is allowed to be started automatically.
|
Connection settings and properties. |
|
Object path of the new connection that was just added. |
AddConnectionUnsaved (IN a{sa{sv}} connection, OUT o path);
Add new connection but do not save it to disk immediately. This operation does not start the network connection unless (1) device is idle and able to connect to the network described by the new connection, and (2) the connection is allowed to be started automatically. Use the 'Save' method on the connection to save these changes to disk.
|
Connection settings and properties. |
|
Object path of the new connection that was just added. |
AddConnection2 (IN a{sa{sv}} settings, IN u flags, IN a{sv} args, OUT o path, OUT a{sv} result);
Add a new connection profile.
AddConnection2 is an alternative to
AddConnection and
AddConnectionUnsaved.
The new variant can do everything that the older variants could, and more.
Its behavior is extensible via extra flags
and args
arguments.
The flags
argument accepts the combination of following values,
logically or-ed together:
|
The connection is persisted to disk. |
|
The change is only made in memory (without touching an eventual profile on disk). If neither 0x1 nor 0x2 is set, the change is made in memory only, if the connection is already in memory only. |
|
Blocks auto-connect on the new profile |
The args
argument accepts the following keys:
|
The settings plugin the newly added connection will use, such as "keyfile" or "ifcfg-rh". Since 1.38 |
Either the flags 0x1 (to-disk) or 0x2 (in-memory) must be specified. The effect is whether to behave like AddConnection or AddConnectionUnsaved.
|
New connection settings, properties, and (optionally) secrets. |
|
Flags. Unknown flags cause the call to fail. |
|
Optional arguments dictionary, for extentibility. Specifying unknown keys causes the call to fail. |
|
Object path of the new connection that was just added. |
|
Output argument, currently no additional results are returned. |
Since 1.20
LoadConnections (IN as filenames, OUT b status, OUT as failures);
Loads or reloads the indicated connections from disk. You should call this after making changes directly to an on-disk connection file to make sure that NetworkManager sees the changes. As with AddConnection(), this operation does not necessarily start the network connection.
Note that before 1.20, NetworkManager had a bug and this status
value was wrong.
It is better to assume success if the method does not return with a D-Bus error.
On top of that, you can look at failures
to know whether any of the requested files failed.
|
Array of paths to on-disk connection profiles in directories monitored by NetworkManager. |
|
Success or failure of the operation as a whole. True if NetworkManager at least tried to load the indicated connections, even if it did not succeed. False if an error occurred before trying to load the connections (eg, permission denied). |
|
Paths of connection files that could not be loaded. |
ReloadConnections (OUT b status);
Tells NetworkManager to reload all connection files from disk, including noticing any added or deleted connection files.
|
This always returns |
NewConnection (o connection);
Emitted when a new connection has been added after NetworkManager has started up and initialized. This signal is not emitted for connections read while starting up, because NetworkManager's D-Bus service is only available after all connections have been read, and to prevent spamming listeners with too many signals at one time. To retrieve the initial connection list, call the ListConnections() method once, and then listen for individual Settings.NewConnection and Settings.Connection.Deleted signals for further updates.
|
Object path of the new connection. |
ConnectionRemoved (o connection);
Emitted when a connection is no longer available. This happens when the connection is deleted or if it is no longer accessible by any of the system's logged-in users. After receipt of this signal, the connection no longer exists and cannot be used. Also see the Settings.Connection.Removed signal.
|
Object path of the removed connection. |