diff options
| author | Thomas Haller <thaller@redhat.com> | 2018-04-05 21:07:34 +0200 |
|---|---|---|
| committer | Thomas Haller <thaller@redhat.com> | 2018-04-16 15:30:07 +0200 |
| commit | aae483c0a95813ceccfb466f7e5dfbc894af6b20 (patch) | |
| tree | d533f262a7aa7a8f709303900d1903f50fe550f2 /src/settings | |
| parent | acc8244ca2dce5f977f2a2552f598c79169ff909 (diff) | |
| download | NetworkManager-aae483c0a95813ceccfb466f7e5dfbc894af6b20.tar.gz | |
settings: add NMSettingsConnectionFlags flags
Up to now, it was not visible on D-Bus whether a connection
was generated by NetworkManager and/or volatile.
That is for example interesting for firewalld, which aims
to store persistant configuration in NetworkManager's profile.
However, that doesn't make sense for external connections
(which are nm-generated & volatile). In fact, it probably
makes no sense for volatile connections in general, because
modifying them, likely makes them non-volatile (depending on
how the profile is modified).
Also, the Update2() D-Bus operation allows to carefully
make connections volatile and unsaved. As we have public
API to set these flags, we should also expose them on D-Bus.
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1460295
Diffstat (limited to 'src/settings')
| -rw-r--r-- | src/settings/nm-settings-connection.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/settings/nm-settings-connection.h b/src/settings/nm-settings-connection.h index f7ee28528d..589016996c 100644 --- a/src/settings/nm-settings-connection.h +++ b/src/settings/nm-settings-connection.h @@ -52,13 +52,16 @@ /** * NMSettingsConnectionIntFlags: * @NM_SETTINGS_CONNECTION_INT_FLAGS_NONE: no flag set - * @NM_SETTINGS_CONNECTION_INT_FLAGS_UNSAVED: the connection is not saved to disk + * @NM_SETTINGS_CONNECTION_INT_FLAGS_UNSAVED: the connection is not saved to disk. + * See also #NM_SETTINGS_CONNECTION_FLAG_UNSAVED. * @NM_SETTINGS_CONNECTION_INT_FLAGS_NM_GENERATED: A connection is "nm-generated" if * it was generated by NetworkManger. If the connection gets modified or saved * by the user, the flag gets cleared. A nm-generated is implicitly unsaved. + * See also #NM_SETTINGS_CONNECTION_FLAG_NM_GENERATED. * @NM_SETTINGS_CONNECTION_INT_FLAGS_VOLATILE: The connection will be deleted * when it disconnects. That is for in-memory connections (unsaved), which are * currently active but cleanup on disconnect. + * See also #NM_SETTINGS_CONNECTION_FLAG_VOLATILE. * @NM_SETTINGS_CONNECTION_INT_FLAGS_VISIBLE: The connection is visible * @NM_SETTINGS_CONNECTION_INT_FLAGS_EXPORTED_MASK: the entire enum is * internal, however, parts of it is public API as #NMSettingsConnectionFlags. @@ -70,15 +73,19 @@ typedef enum { NM_SETTINGS_CONNECTION_INT_FLAGS_NONE = 0, - NM_SETTINGS_CONNECTION_INT_FLAGS_UNSAVED = (1LL << 0), - NM_SETTINGS_CONNECTION_INT_FLAGS_NM_GENERATED = (1LL << 1), - NM_SETTINGS_CONNECTION_INT_FLAGS_VOLATILE = (1LL << 2), + NM_SETTINGS_CONNECTION_INT_FLAGS_UNSAVED = NM_SETTINGS_CONNECTION_FLAG_UNSAVED, + NM_SETTINGS_CONNECTION_INT_FLAGS_NM_GENERATED = NM_SETTINGS_CONNECTION_FLAG_NM_GENERATED, + NM_SETTINGS_CONNECTION_INT_FLAGS_VOLATILE = NM_SETTINGS_CONNECTION_FLAG_VOLATILE, NM_SETTINGS_CONNECTION_INT_FLAGS_VISIBLE = (1LL << 3), __NM_SETTINGS_CONNECTION_INT_FLAGS_LAST, - NM_SETTINGS_CONNECTION_INT_FLAGS_EXPORTED_MASK = 0, + NM_SETTINGS_CONNECTION_INT_FLAGS_EXPORTED_MASK = 0 + | NM_SETTINGS_CONNECTION_INT_FLAGS_UNSAVED + | NM_SETTINGS_CONNECTION_INT_FLAGS_NM_GENERATED + | NM_SETTINGS_CONNECTION_INT_FLAGS_VOLATILE + | 0, NM_SETTINGS_CONNECTION_INT_FLAGS_ALL = ((__NM_SETTINGS_CONNECTION_INT_FLAGS_LAST - 1) << 1) - 1, } NMSettingsConnectionIntFlags; |
