Flight mode is a simple API to grant applications or components to propose a shortcut to cut any wireless engine available on a device (Bluetooth, WiFi, Telephony) everywhere we have to cut such devices (hospitals, theatres, planes, ...)
aka Wireless Off Mode
|
|
Broadcast "has changed" notification Should be used only once to notify a change. Should never be used under normal condition. Should be used only by component that knows how Flight mode operates.
|
|
||||||||||||||||
|
Wireless Component Activation Confirmation Each Wireless component, application, component has to call this function before to active or re-active its wireless engine. (Bluetooth, Wifi, Phone) When Flight Mode is:
Note: The Wireless component, application, component have to take appropriate actions: this function will change "flight mode", it will not change the wanted wireless device state.
|
|
||||||||||||
|
Change current Flight Mode / WirelessOff state When "Flight Mode"/ "WirelessOff" state is : -Active: Opens the Active Wireless Window, That grants user to activate all wireless components previously active or a new set using checkboxes -Not active: Opens the Deactive Wireless Window, that grants user to : 1 - Save the state of currently active wireless components 2 - Deactive all wireless components 3 - Shows the Deactive Wireless mode status gadget in the status bar both cases: set flight mode /Wireless Off appropriately, eventually sending the Has changed notification and progress information
|
|
|
Close any opened Fligth Mode dialog This function should be used when flight mode caller is receiving a VObject or Incoming call as well as any other possible issue when flight mode dialog should be closed
|
|
||||||||||||
|
to be called on ALP_FLIGHTMODE_ENABLER_STATE_CONFIRMATION reception For Internal Use Only. Confirm or not last wireless off state changes depending on last enablers states changes the notification is sent by wireless enablers once their received their new state Sometimes a flight mode enabler plug in cannot respond instantly for states changes activating or deactivating a wireless device. In this case plug ins have to wait ofor the last wanted chage to be confirmed. This notification should be sent by the code that is waiting for this confirmation. In the , the flight mode was set accordingly to the original request, this means that when the internal confirmation is received the fligth mode state could be invalidated if one of the wireless component did not succeeded to change.
|
|
|
Free Flight Mode data structure storage kept by caller Should be called by any Flight Mode client that previously initializes an external storage calling alp_flightmode_init(...)
|
|
|
Retrieve Pending state for each wireless enabler For Internal Use Only. To be called only by flight mode status gadget.
|
|
|
Initialize Flight mode data structure in order to be kept by caller
|
|
||||||||||||
|
Check for flight mode / Wireless Off availability Version can be NULL if client if tou are not interested in checking version. Returns true when flight mode was installed, false if not. This function should be called before further use of Flight Mode API.
|
|
|
Request flight mode wireless enablers to registers their callbacks For Internal Use Only. To be called only by flight mode status gadget
|
|
|
Request flight mode wireless enablers to unregister their callbacks For Internal Use Only. Flight mode enabler plug ins can register callbacks in case they have to wait for a confirmation when they change their state. (activating or deactivating their wireless device) To be called only by flight mode status gadget
|
|
||||||||||||
|
active all wireless enablers set flight mode appropriately, eventually sending the "has changed" notification when "notify" is true
|
|
||||||||||||
|
Deactive all wireless enablers Set flight mode appropriately, eventually sending the "Has changed" notification when "notify" is true
|
|
||||||||||||||||
|
Get wireless enabler current activity Get current state for a specific enabler given its enabler id. Standard enabler ids are defined in flight mode header. To insure future compatibility use only the constant defined for enabler ids in flight mode header: define ALP_FLIGHTMODE_PHONE_ID 0 define ALP_FLIGHTMODE_BLUETOOTH_ID 1 define ALP_FLIGHTMODE_WIFI_ID 2
|
|
||||||||||||||||||||
|
Set wireless enabler activity Set up the activity for a specific enabler given its enabler id. Standard enabler ids are defined in flight mode header. To insure future compatibility use only the constant defined for enabler ids in flight mode header: define ALP_FLIGHTMODE_PHONE_ID 0 define ALP_FLIGHTMODE_BLUETOOTH_ID 1 define ALP_FLIGHTMODE_WIFI_ID 2 It broadcasts the has change notification when notify is true.
|
|
||||||||||||
|
restore all wireless enablers It uses their previous states saved last time flight mode was deactivated. If none were saved (aka flight mode / Wireless Off was never activated) then nothing is done (no wireless enablers activates) Set flight mode / Wireless Off appropriately, eventually sending the "Has changed" notification
|
|
|
Get Current Flight Mode state When Flight Mode is:
|
Copyright © 1999-2008 ACCESS CO., LTD. All rights reserved.