diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2009-07-24 00:54:31 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-07-24 00:54:31 +0200 |
commit | 90af3934ffbb9df5ab68d2b0b3f404488ff48686 (patch) | |
tree | cc9450f2994fcb7104b15a5c967a57c3d7325f76 /src/notifier.c | |
parent | 8bdd2e999bd2466908224a2e53b0b9ef77c52c90 (diff) | |
download | connman-90af3934ffbb9df5ab68d2b0b3f404488ff48686.tar.gz connman-90af3934ffbb9df5ab68d2b0b3f404488ff48686.tar.bz2 connman-90af3934ffbb9df5ab68d2b0b3f404488ff48686.zip |
Add function to check if technology is enabled
Diffstat (limited to 'src/notifier.c')
-rw-r--r-- | src/notifier.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/notifier.c b/src/notifier.c index 2403e919..63e2a9d5 100644 --- a/src/notifier.c +++ b/src/notifier.c @@ -406,6 +406,27 @@ void __connman_notifier_offlinemode(connman_bool_t enabled) } } +connman_bool_t __connman_notifier_is_enabled(enum connman_service_type type) +{ + DBG("type %d", type); + + switch (type) { + case CONNMAN_SERVICE_TYPE_UNKNOWN: + return FALSE; + case CONNMAN_SERVICE_TYPE_ETHERNET: + case CONNMAN_SERVICE_TYPE_WIFI: + case CONNMAN_SERVICE_TYPE_WIMAX: + case CONNMAN_SERVICE_TYPE_BLUETOOTH: + case CONNMAN_SERVICE_TYPE_CELLULAR: + break; + } + + if (g_atomic_int_get(&enabled[type]) > 0) + return TRUE; + + return FALSE; +} + int __connman_notifier_init(void) { DBG(""); |