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 @@ | |||
38 | #include <nm-device-wifi.h> | 38 | #include <nm-device-wifi.h> |
39 | #include <nm-setting-ip4-config.h> | 39 | #include <nm-setting-ip4-config.h> |
40 | 40 | ||
41 | #if !defined(NM_CHECK_VERSION) | ||
42 | #define NM_CHECK_VERSION(x,y,z) 0 | ||
43 | #endif | ||
44 | |||
41 | #include "connectivity-networkmanager.h" | 45 | #include "connectivity-networkmanager.h" |
42 | 46 | ||
43 | static void geoclue_networkmanager_connectivity_init (GeoclueConnectivityInterface *iface); | 47 | static void geoclue_networkmanager_connectivity_init (GeoclueConnectivityInterface *iface); |
@@ -285,10 +289,19 @@ nmstate_to_geocluenetworkstatus (NMState status) | |||
285 | return GEOCLUE_CONNECTIVITY_UNKNOWN; | 289 | return GEOCLUE_CONNECTIVITY_UNKNOWN; |
286 | case NM_STATE_ASLEEP: | 290 | case NM_STATE_ASLEEP: |
287 | case NM_STATE_DISCONNECTED: | 291 | case NM_STATE_DISCONNECTED: |
292 | #if NM_CHECK_VERSION(0,8,992) | ||
293 | case NM_STATE_DISCONNECTING: | ||
294 | #endif | ||
288 | return GEOCLUE_CONNECTIVITY_OFFLINE; | 295 | return GEOCLUE_CONNECTIVITY_OFFLINE; |
289 | case NM_STATE_CONNECTING: | 296 | case NM_STATE_CONNECTING: |
290 | return GEOCLUE_CONNECTIVITY_ACQUIRING; | 297 | return GEOCLUE_CONNECTIVITY_ACQUIRING; |
298 | #if NM_CHECK_VERSION(0,8,992) | ||
299 | case NM_STATE_CONNECTED_LOCAL: | ||
300 | case NM_STATE_CONNECTED_SITE: | ||
301 | case NM_STATE_CONNECTED_GLOBAL: | ||
302 | #else | ||
291 | case NM_STATE_CONNECTED: | 303 | case NM_STATE_CONNECTED: |
304 | #endif | ||
292 | return GEOCLUE_CONNECTIVITY_ONLINE; | 305 | return GEOCLUE_CONNECTIVITY_ONLINE; |
293 | default: | 306 | default: |
294 | g_warning ("Unknown NMStatus: %d", status); | 307 | g_warning ("Unknown NMStatus: %d", status); |