class CBluezBTListener

Implementation of MAbstracListner for Bluetooth listerner using Bluez D-Bus interface.

Inheritance:


Public Methods

[more] CBluezBTListener()
Constructor, as private - not used.
[more] CBluezBTListener(MAbstractStateConverter* aConverter)
Constructor
[more] ~CBluezBTListener()
Destructor, closes connection to D-Bus.
[more]bool Connect()
Connects the listener to source
[more]void Disconnect()
Disconnects this listener from D-Bus
[more]void CheckInitialState()
Checks the initial state of the bluetooth device via Bluez
[more]void CheckState()
Check the current state - not implemented
[more]const std::string& GetName()
Returns the name of this listener


Inherited from MAbstractListener:


Documentation

A listener for Bluetooth adapter, uses the default adapter reported by hcid. This listener plugin can be used in normal Linux that has BlueZ libraries (including development) installed. Paths,interfaces etc. of BlueZ D-Bus API are defined by hand, doesn't use any BlueZ D-Bus-header (there isn't one?). Uses a private connection to D-Bus. Currently only changes the state of the Bluetooth plugin if the actual state of the device (removed or added) is changed.

o CBluezBTListener()
Default constructor isn't used (cannot be used)

o CBluezBTListener(MAbstractStateConverter* aConverter)
Use this constructor to create instances of this class. A reference to the component that will own the instance will have to be given as a parameter. Created component will be registered into that component.

Parameters:
Reference - to component that owns the instance. CANNOT BE NULL!

o ~CBluezBTListener()
Closes the connection if it wasn't closed.

obool Connect()
Connects this listener to D-Bus. Uses private connection. Also registers this listener to listen for signals from appropriate interface. Uses SetupConnection() and RegisterSignals().

Returns:
bool true if listener could connect

ovoid Disconnect()
Disconnects listener if it wasn't already disconnected (error)

ovoid CheckInitialState()
Used by the plugin that owns this listener, this function is called only after successful connection to D-Bus. Sends a pending call via D-Bus to BlueZ request interface. Uses a blocking call to get the reply and reacts to the reply by changing the state of the component that owns this listener. Uses hci0 device at the moment.

ovoid CheckState()
Not ipmlemented - does nothing.

oconst std::string& GetName()
Returns the name that was set in the constructor for this listener.

Returns:
The name of this listener


This class has no child classes.
See Also:
MAbstractListener
MAbstractStateConverter

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.