mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 14:38:09 +02:00
settings: add nm_settings_connection_persist_mode_to_string()
This commit is contained in:
parent
064f20aa62
commit
a48b7fe7b9
2 changed files with 27 additions and 0 deletions
|
|
@ -226,6 +226,29 @@ static guint _get_seen_bssids(NMSettingsConnection *self,
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
char *
|
||||||
|
nm_settings_connection_persist_mode_to_string(NMSettingsConnectionPersistMode mode)
|
||||||
|
{
|
||||||
|
switch (mode) {
|
||||||
|
case NM_SETTINGS_CONNECTION_PERSIST_MODE_IN_MEMORY:
|
||||||
|
return "in-memory";
|
||||||
|
case NM_SETTINGS_CONNECTION_PERSIST_MODE_IN_MEMORY_DETACHED:
|
||||||
|
return "in-memory-detached";
|
||||||
|
case NM_SETTINGS_CONNECTION_PERSIST_MODE_IN_MEMORY_ONLY:
|
||||||
|
return "in-memory-only";
|
||||||
|
case NM_SETTINGS_CONNECTION_PERSIST_MODE_KEEP:
|
||||||
|
return "keep";
|
||||||
|
case NM_SETTINGS_CONNECTION_PERSIST_MODE_NO_PERSIST:
|
||||||
|
return "no-persist";
|
||||||
|
case NM_SETTINGS_CONNECTION_PERSIST_MODE_TO_DISK:
|
||||||
|
return "to-disk";
|
||||||
|
}
|
||||||
|
|
||||||
|
return nm_assert_unreachable_val(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
NMSettings *
|
NMSettings *
|
||||||
nm_settings_connection_get_settings(NMSettingsConnection *self)
|
nm_settings_connection_get_settings(NMSettingsConnection *self)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -379,4 +379,8 @@ void _nm_settings_connection_emit_signal_updated_internal(
|
||||||
|
|
||||||
void _nm_settings_connection_cleanup_after_remove(NMSettingsConnection *self);
|
void _nm_settings_connection_cleanup_after_remove(NMSettingsConnection *self);
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
char *nm_settings_connection_persist_mode_to_string(NMSettingsConnectionPersistMode mode);
|
||||||
|
|
||||||
#endif /* __NETWORKMANAGER_SETTINGS_CONNECTION_H__ */
|
#endif /* __NETWORKMANAGER_SETTINGS_CONNECTION_H__ */
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue