mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-06 16:21:50 +00:00
settings-connection: expose Filename property on D-Bus
This allows implementing some convenience features in nmcli -- listing the backing store for the connection in "nmcli c show", and using the filename for specifying connection in "nmcli c up/down". Eventually, paired with ReloadConnections(), this could be used to implement something similar to what "systemctl edit" does for units (though we'd need to pick another command name as we aready use "nmcli c edit" for something different).
This commit is contained in:
parent
f3c63ca4b1
commit
87f5ff6927
|
@ -170,6 +170,15 @@
|
|||
-->
|
||||
<property name="Flags" type="u" access="read"/>
|
||||
|
||||
<!--
|
||||
Filename:
|
||||
|
||||
File that stores the connection in case the connection is file-backed.
|
||||
|
||||
Since: 1.12
|
||||
-->
|
||||
<property name="Filename" type="s" access="read"/>
|
||||
|
||||
<!--
|
||||
PropertiesChanged:
|
||||
@properties: A dictionary mapping property names to variant boxed values.
|
||||
|
|
|
@ -3189,8 +3189,9 @@ static const NMDBusInterfaceInfoExtended interface_info_settings_connection = {
|
|||
&signal_info_removed,
|
||||
),
|
||||
.properties = NM_DEFINE_GDBUS_PROPERTY_INFOS (
|
||||
NM_DEFINE_DBUS_PROPERTY_INFO_EXTENDED_READABLE_L ("Unsaved", "b", NM_SETTINGS_CONNECTION_UNSAVED),
|
||||
NM_DEFINE_DBUS_PROPERTY_INFO_EXTENDED_READABLE ("Flags", "u", NM_SETTINGS_CONNECTION_FLAGS),
|
||||
NM_DEFINE_DBUS_PROPERTY_INFO_EXTENDED_READABLE_L ("Unsaved", "b", NM_SETTINGS_CONNECTION_UNSAVED),
|
||||
NM_DEFINE_DBUS_PROPERTY_INFO_EXTENDED_READABLE ("Flags", "u", NM_SETTINGS_CONNECTION_FLAGS),
|
||||
NM_DEFINE_DBUS_PROPERTY_INFO_EXTENDED_READABLE ("Filename", "s", NM_SETTINGS_CONNECTION_FILENAME),
|
||||
),
|
||||
),
|
||||
.legacy_property_changed = TRUE,
|
||||
|
|
|
@ -42,11 +42,11 @@
|
|||
|
||||
/* Properties */
|
||||
#define NM_SETTINGS_CONNECTION_UNSAVED "unsaved"
|
||||
#define NM_SETTINGS_CONNECTION_FLAGS "flags"
|
||||
#define NM_SETTINGS_CONNECTION_FILENAME "filename"
|
||||
|
||||
/* Internal properties */
|
||||
#define NM_SETTINGS_CONNECTION_READY "ready"
|
||||
#define NM_SETTINGS_CONNECTION_FLAGS "flags"
|
||||
#define NM_SETTINGS_CONNECTION_FILENAME "filename"
|
||||
|
||||
/**
|
||||
* NMSettingsConnectionIntFlags:
|
||||
|
|
Loading…
Reference in a new issue