X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=plugins%2Fiospm.c;h=fcb4cea1346bcd805c0af8ac9dee53a9aff33efb;hb=69efc565b595bb39ebdbe635f063675ecf59278c;hp=a36e4aa008280439b1b70f652abe4b2710f95b99;hpb=c48061ba2f015b7a8e82c5c12e1ac30bf06c1f38;p=platform%2Fupstream%2Fconnman.git diff --git a/plugins/iospm.c b/plugins/iospm.c old mode 100644 new mode 100755 index a36e4aa..fcb4cea --- a/plugins/iospm.c +++ b/plugins/iospm.c @@ -2,7 +2,7 @@ * * Connection Manager * - * Copyright (C) 2007-2010 Intel Corporation. All rights reserved. + * Copyright (C) 2007-2012 Intel Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -37,21 +37,21 @@ static DBusConnection *connection; -static void send_indication(const char *path, connman_bool_t enabled) +static void send_indication(const char *path, bool enabled) { DBusMessage *message; const char *method; DBG("path %s enabled %d", path, enabled); - if (enabled == TRUE) + if (enabled) method = "IndicateStart"; else method = "IndicateStop"; message = dbus_message_new_method_call(IOSPM_SERVICE, path, IOSPM_INTERFACE, method); - if (message == NULL) + if (!message) return; dbus_message_set_no_reply(message, TRUE); @@ -62,18 +62,18 @@ static void send_indication(const char *path, connman_bool_t enabled) } static void iospm_service_enabled(enum connman_service_type type, - connman_bool_t enabled) + bool enabled) { switch (type) { case CONNMAN_SERVICE_TYPE_UNKNOWN: case CONNMAN_SERVICE_TYPE_SYSTEM: case CONNMAN_SERVICE_TYPE_ETHERNET: case CONNMAN_SERVICE_TYPE_WIFI: - case CONNMAN_SERVICE_TYPE_WIMAX: case CONNMAN_SERVICE_TYPE_CELLULAR: case CONNMAN_SERVICE_TYPE_GPS: case CONNMAN_SERVICE_TYPE_VPN: case CONNMAN_SERVICE_TYPE_GADGET: + case CONNMAN_SERVICE_TYPE_P2P: break; case CONNMAN_SERVICE_TYPE_BLUETOOTH: send_indication(IOSPM_BLUETOOTH, enabled); @@ -81,7 +81,7 @@ static void iospm_service_enabled(enum connman_service_type type, } } -static void iospm_offline_mode(connman_bool_t enabled) +static void iospm_offline_mode(bool enabled) { send_indication(IOSPM_FLIGHT_MODE, enabled); }