class CMaemoWLANListener

Interface for CMaemoWLANListener.cc, implements MAbstractListener

Inheritance:


Public Methods

[more] CMaemoWLANListener(MAbstractStateConverter* aConverter)
Parametrizised constructor
[more] ~CMaemoWLANListener()
Default destructor
[more]bool Connect()
Connects listener to source and sets up the connection to D-Bus
[more]void Disconnect()
Disconnects the listener
[more]void CheckInitialState()
Checks the initial state of the WLAN adapter
[more]void CheckState()
Checks the current state of WLAN adapter
[more]const std::string& GetName()
Returns listener name
[more]bool SetupConnection()
Sets up connection to D-Bus
[more]bool RegisterSignals()
Registers listener to certain D-Bus interface
[more]void HandleMessage(DBusMessage* message)
Handles the given message and reacts based on the content of the msg


Inherited from MAbstractListener:


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.

o 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

o ~CMaemoWLANListener()
Destructor, closes connection to D-Bus if not already closed.

obool Connect()
Setups the connection to D-Bus (SetupConnection()) and registers listener to certain signals (RegisterSignals()).

Returns:
bool true if success

ovoid Disconnect()
Closes the connection to D-Bus.

ovoid 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).

ovoid 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.

oconst std::string& GetName()
Returns the name of this listener (hardcoded atm.)

Returns:
string Name of this listener

obool SetupConnection()
Sets up the connection to D-Bus by using private connection.

Returns:
bool true if no errors were detected

obool RegisterSignals()
Registers to listen signals from interface ICD_DBUS_INTERFACE (defined in osso-ic-dbus.h).

Returns:
bool true if no errors were detected

ovoid 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++.