diff options
author | Dan Williams <dcbw@redhat.com> | 2010-05-22 08:55:30 -0700 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2010-05-22 09:51:22 -0700 |
commit | fa70542c618665cf203a2b71fa0e504f759f7902 (patch) | |
tree | 0628eaab6011cedd8b644406d6c5fef269d231f5 /libnm-glib/nm-client.h | |
parent | c1b3b137d977f97f101751d0aea80e5a8d595962 (diff) | |
download | NetworkManager-fa70542c618665cf203a2b71fa0e504f759f7902.tar.gz |
core: add networking enable/disable knob distinct from sleep/wake (rh #589108) (bgo #346615)
Since forever we've used sleep/wake as the way to implement
Networking Enabled. When the state file was introduced to make the
networking and wifi states persistent, we ran into a bug where
a failed suspend (like if the machine ran out of power while
suspended) would result in networking being disabled on reboot
since suspend/resume used the same knob as enable/disable.
This patch adds a distinct call for enable/disable networking
which changes the state file, while sleep/wake no longer change
the state file.
Diffstat (limited to 'libnm-glib/nm-client.h')
-rw-r--r-- | libnm-glib/nm-client.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libnm-glib/nm-client.h b/libnm-glib/nm-client.h index 6aafc0872c..6b912e05aa 100644 --- a/libnm-glib/nm-client.h +++ b/libnm-glib/nm-client.h @@ -18,7 +18,7 @@ * Boston, MA 02110-1301 USA. * * Copyright (C) 2007 - 2008 Novell, Inc. - * Copyright (C) 2007 - 2008 Red Hat, Inc. + * Copyright (C) 2007 - 2010 Red Hat, Inc. */ #ifndef NM_CLIENT_H @@ -43,6 +43,7 @@ G_BEGIN_DECLS #define NM_CLIENT_STATE "state" #define NM_CLIENT_MANAGER_RUNNING "manager-running" +#define NM_CLIENT_NETWORKING_ENABLED "networking-enabled" #define NM_CLIENT_WIRELESS_ENABLED "wireless-enabled" #define NM_CLIENT_WIRELESS_HARDWARE_ENABLED "wireless-hardware-enabled" #define NM_CLIENT_WWAN_ENABLED "wwan-enabled" @@ -88,6 +89,9 @@ void nm_client_activate_connection (NMClient *client, void nm_client_deactivate_connection (NMClient *client, NMActiveConnection *active); +gboolean nm_client_networking_get_enabled (NMClient *client); +void nm_client_networking_set_enabled (NMClient *client, gboolean enabled); + gboolean nm_client_wireless_get_enabled (NMClient *client); void nm_client_wireless_set_enabled (NMClient *client, gboolean enabled); gboolean nm_client_wireless_hardware_get_enabled (NMClient *client); |