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.
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>
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);
if (device == NULL)
return;
- powered = (flightmode == TRUE) ? FALSE : TRUE;
+ powered = (offlinemode == TRUE) ? FALSE : TRUE;
if (device->powered == powered)
return;
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;
}
};
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)
{
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);
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);
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"