diff options
author | Dan Williams <dcbw@redhat.com> | 2011-03-07 23:45:45 +0000 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2011-03-07 23:45:45 +0000 |
commit | f2f988bfdda6a347a8190612af1501466b64d76b (patch) | |
tree | 19140f0a29d10d0654f242b1be2f07e71477a80b | |
parent | 59f49112b023310487142d48891f1d86b43b1e42 (diff) |
master: Support NetworkManager 0.9
-rw-r--r-- | src/connectivity-networkmanager.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/connectivity-networkmanager.c b/src/connectivity-networkmanager.c index a545073..09630a0 100644 --- a/src/connectivity-networkmanager.c +++ b/src/connectivity-networkmanager.c @@ -38,6 +38,10 @@ #include <nm-device-wifi.h> #include <nm-setting-ip4-config.h> +#if !defined(NM_CHECK_VERSION) +#define NM_CHECK_VERSION(x,y,z) 0 +#endif + #include "connectivity-networkmanager.h" static void geoclue_networkmanager_connectivity_init (GeoclueConnectivityInterface *iface); @@ -285,10 +289,19 @@ nmstate_to_geocluenetworkstatus (NMState status) return GEOCLUE_CONNECTIVITY_UNKNOWN; case NM_STATE_ASLEEP: case NM_STATE_DISCONNECTED: +#if NM_CHECK_VERSION(0,8,992) + case NM_STATE_DISCONNECTING: +#endif return GEOCLUE_CONNECTIVITY_OFFLINE; case NM_STATE_CONNECTING: return GEOCLUE_CONNECTIVITY_ACQUIRING; +#if NM_CHECK_VERSION(0,8,992) + case NM_STATE_CONNECTED_LOCAL: + case NM_STATE_CONNECTED_SITE: + case NM_STATE_CONNECTED_GLOBAL: +#else case NM_STATE_CONNECTED: +#endif return GEOCLUE_CONNECTIVITY_ONLINE; default: g_warning ("Unknown NMStatus: %d", status); |