Interface for CMaemoWLANListener.cc, implements MAbstractListener
Inheritance:
Public Methods
-
CMaemoWLANListener(MAbstractStateConverter* aConverter)
- Parametrizised constructor
-
~CMaemoWLANListener()
- Default destructor
-
bool Connect()
- Connects listener to source and sets up the connection to D-Bus
-
void Disconnect()
- Disconnects the listener
-
void CheckInitialState()
- Checks the initial state of the WLAN adapter
-
void CheckState()
- Checks the current state of WLAN adapter
-
const std::string& GetName()
- Returns listener name
-
bool SetupConnection()
- Sets up connection to D-Bus
-
bool RegisterSignals()
- Registers listener to certain D-Bus interface
-
void HandleMessage(DBusMessage* message)
- Handles the given message and reacts based on the content of the msg
Documentation
Implementation of this declared interface should be used by WLAN plugin
only in Maemo environment. Implementation listens signals from ICD and changes
the state of the owner component accordingly. Initial state of the owner plugin (WLAN)
should be checked at the start up stage of the owner plugin (CheckInitialState()). Initial
check is conducted with blocking method call via D-BUS. Currently a private connection
to D-Bus is used. When the implementation of this class is created it automatically
registers to the given owner component.
CMaemoWLANListener(MAbstractStateConverter* aConverter)
-
Constructor for creating a instance of this class, requires a reference to owner
component as parameter. The created instance of this class will be registered to that
given owner (WLAN plugin).
- Parameters:
- aConverter - reference to owner
~CMaemoWLANListener()
-
Destructor, closes connection to D-Bus if not already closed.
bool Connect()
-
Setups the connection to D-Bus (SetupConnection()) and registers
listener to certain signals (RegisterSignals()).
- Returns:
- bool true if success
void Disconnect()
-
Closes the connection to D-Bus.
void CheckInitialState()
-
Sends a pending method call (blocking) that requests current WLAN
state from ICD in Maemo through D-Bus. Based on the return value (that
is an unsigned 32-bit integer) the state of the WLAN adapter is changed
(value=1 - WLAN on).
void CheckState()
-
Checks the first message from the D-Bus receive
queue, always takes the first one off from the queue.
Message is checked by HandleMessage() that executes
necessary operations related to message content. If
there are no messages in the queue nothing will be done.
The connection to D-Bus is accessed in non-blocking way.
const std::string& GetName()
-
Returns the name of this listener (hardcoded atm.)
- Returns:
- string Name of this listener
bool SetupConnection()
-
Sets up the connection to D-Bus by using private connection.
- Returns:
- bool true if no errors were detected
bool RegisterSignals()
-
Registers to listen signals from interface ICD_DBUS_INTERFACE
(defined in osso-ic-dbus.h).
- Returns:
- bool true if no errors were detected
void HandleMessage(DBusMessage* message)
-
Handles the message that is given as parameter. Allows only ICD_STATUS_CHANGED_SIG
signals that are emitted from ICD_DBUS_INTERFACE. With "CONNECTED" as 3rd parameter
WLAN plugin is set as active, with "DISCONNECTING" (about to disconnect) plugin is set to passive.
- Parameters:
- message - Message to be handled.
- This class has no child classes.
- See Also:
- MAbstractListener
MAbstractStateConverter
CMaemoWLANCreator
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.