summaryrefslogtreecommitdiff
path: root/src/nm-config.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/nm-config.h')
-rw-r--r--src/nm-config.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/nm-config.h b/src/nm-config.h
index 8bbab2ac6f..36007fa895 100644
--- a/src/nm-config.h
+++ b/src/nm-config.h
@@ -83,6 +83,24 @@ G_BEGIN_DECLS
typedef struct NMConfigCmdLineOptions NMConfigCmdLineOptions;
+typedef enum {
+ NM_CONFIG_RUN_STATE_PROPERTY_NONE,
+
+ /* 1 set-argument: (gboolean enabled) */
+ NM_CONFIG_RUN_STATE_PROPERTY_NETWORKING_ENABLED,
+ NM_CONFIG_RUN_STATE_PROPERTY_WIFI_ENABLED,
+ NM_CONFIG_RUN_STATE_PROPERTY_WWAN_ENABLED,
+} NMConfigRunStatePropertyType;
+
+typedef struct {
+ bool net_enabled;
+ bool wifi_enabled;
+ bool wwan_enabled;
+
+ /* Whether the runstate is modified and not saved to disk. */
+ bool dirty;
+} NMConfigRunState;
+
struct _NMConfig {
GObject parent;
};
@@ -131,6 +149,15 @@ NMConfig *nm_config_new (const NMConfigCmdLineOptions *cli, char **atomic_sectio
NMConfig *nm_config_setup (const NMConfigCmdLineOptions *cli, char **atomic_section_prefixes, GError **error);
void nm_config_reload (NMConfig *config, int signal);
+const NMConfigRunState *nm_config_run_state_get (NMConfig *config);
+
+void _nm_config_run_state_set (NMConfig *config,
+ gboolean allow_persist,
+ gboolean force_persist,
+ ...);
+#define nm_config_run_state_set(config, allow_persist, force_persist, ...) \
+ _nm_config_run_state_set (config, allow_persist, force_persist, ##__VA_ARGS__, 0)
+
gint nm_config_parse_boolean (const char *str, gint default_value);
GKeyFile *nm_config_create_keyfile (void);