summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-01-20 17:44:01 +0100
committerMarcel Holtmann <marcel@holtmann.org>2009-01-20 17:44:01 +0100
commit31200365b3a59e89ee6d2d00b01b6cec33075688 (patch)
treed958fba2f61e6d30a97eeb9cd97d5005cbc9c037
parent7b9ccd0409be6c683f4954d417d507e06ed561d5 (diff)
downloadconnman-31200365b3a59e89ee6d2d00b01b6cec33075688.tar.gz
connman-31200365b3a59e89ee6d2d00b01b6cec33075688.tar.bz2
connman-31200365b3a59e89ee6d2d00b01b6cec33075688.zip
Rename FlightMode to OfflineMode
-rw-r--r--doc/manager-api.txt10
-rw-r--r--src/connman.h2
-rw-r--r--src/device.c12
-rw-r--r--src/manager.c18
-rwxr-xr-xtest/test-manager2
5 files changed, 22 insertions, 22 deletions
diff --git a/doc/manager-api.txt b/doc/manager-api.txt
index bf3d1de9..5ff5f6a8 100644
--- a/doc/manager-api.txt
+++ b/doc/manager-api.txt
@@ -57,15 +57,15 @@ Properties string State [readonly]
device defines which becomes the default connection
when multiple are available.
- boolean FlightMode [readwrite]
+ boolean OfflineMode [readwrite]
- The flight mode indicates the global setting for
- switching all radios on or off. Changing flight mode
+ The offline mode indicates the global setting for
+ switching all radios on or off. Changing offline mode
to true results in powering down all devices. When
- leaving flight mode the individual policy of each
+ leaving offline mode the individual policy of each
device decides to switch the radio back on or not.
- During flight mode, it is still possible to switch
+ During offline mode, it is still possible to switch
certain technologies manually back on. For example
the limited usage of WiFi or Bluetooth devices might
be allowed in some situations.
diff --git a/src/connman.h b/src/connman.h
index 545183e3..b944465d 100644
--- a/src/connman.h
+++ b/src/connman.h
@@ -163,7 +163,7 @@ void __connman_device_decrease_connections(struct connman_device *device);
connman_bool_t __connman_device_has_driver(struct connman_device *device);
-int __connman_device_set_flightmode(connman_bool_t flightmode);
+int __connman_device_set_offlinemode(connman_bool_t offlinemode);
#include <connman/network.h>
diff --git a/src/device.c b/src/device.c
index d107bf4d..f9c153d2 100644
--- a/src/device.c
+++ b/src/device.c
@@ -1159,10 +1159,10 @@ const char *connman_device_get_string(struct connman_device *device,
return NULL;
}
-static void set_flightmode(struct connman_element *element, gpointer user_data)
+static void set_offlinemode(struct connman_element *element, gpointer user_data)
{
struct connman_device *device = element->device;
- connman_bool_t flightmode = GPOINTER_TO_UINT(user_data);
+ connman_bool_t offlinemode = GPOINTER_TO_UINT(user_data);
connman_bool_t powered;
DBG("element %p name %s", element, element->name);
@@ -1170,7 +1170,7 @@ static void set_flightmode(struct connman_element *element, gpointer user_data)
if (device == NULL)
return;
- powered = (flightmode == TRUE) ? FALSE : TRUE;
+ powered = (offlinemode == TRUE) ? FALSE : TRUE;
if (device->powered == powered)
return;
@@ -1178,12 +1178,12 @@ static void set_flightmode(struct connman_element *element, gpointer user_data)
set_powered(device, powered);
}
-int __connman_device_set_flightmode(connman_bool_t flightmode)
+int __connman_device_set_offlinemode(connman_bool_t offlinemode)
{
- DBG("flightmode %d", flightmode);
+ DBG("offlinmode %d", offlinemode);
__connman_element_foreach(NULL, CONNMAN_ELEMENT_TYPE_DEVICE,
- set_flightmode, GUINT_TO_POINTER(flightmode));
+ set_offlinemode, GUINT_TO_POINTER(offlinemode));
return 0;
}
diff --git a/src/manager.c b/src/manager.c
index f943720e..a2f1be81 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -35,7 +35,7 @@ enum connman_policy {
};
static enum connman_policy global_policy = CONNMAN_POLICY_SINGLE;
-static connman_bool_t global_flightmode = FALSE;
+static connman_bool_t global_offlinemode = FALSE;
static const char *policy2string(enum connman_policy policy)
{
@@ -185,8 +185,8 @@ static DBusMessage *get_properties(DBusConnection *conn,
connman_dbus_dict_append_variant(&dict, "Policy",
DBUS_TYPE_STRING, &str);
- connman_dbus_dict_append_variant(&dict, "FlightMode",
- DBUS_TYPE_BOOLEAN, &global_flightmode);
+ connman_dbus_dict_append_variant(&dict, "OfflineMode",
+ DBUS_TYPE_BOOLEAN, &global_offlinemode);
dbus_message_iter_close_container(&array, &dict);
@@ -222,17 +222,17 @@ static DBusMessage *set_property(DBusConnection *conn,
return __connman_error_invalid_arguments(msg);
global_policy = policy;
- } else if (g_str_equal(name, "FlightMode") == TRUE) {
- connman_bool_t flightmode;
+ } else if (g_str_equal(name, "OfflineMode") == TRUE) {
+ connman_bool_t offlinemode;
- dbus_message_iter_get_basic(&value, &flightmode);
+ dbus_message_iter_get_basic(&value, &offlinemode);
- if (global_flightmode == flightmode)
+ if (global_offlinemode == offlinemode)
return __connman_error_invalid_arguments(msg);
- global_flightmode = flightmode;
+ global_offlinemode = offlinemode;
- __connman_device_set_flightmode(flightmode);
+ __connman_device_set_offlinemode(offlinemode);
}
return g_dbus_create_reply(msg, DBUS_TYPE_INVALID);
diff --git a/test/test-manager b/test/test-manager
index e9f12313..7915eaf5 100755
--- a/test/test-manager
+++ b/test/test-manager
@@ -54,7 +54,7 @@ def print_properties(key, value):
for key in properties.keys():
if key in ["Profiles", "Devices", "Connections"]:
print_properties(key, properties[key])
- elif key in ["FlightMode"]:
+ elif key in ["OfflineMode"]:
print "%s" % (key)
if properties[key] == dbus.Boolean(1):
print " true"