Implementation of MAbstracListner for Bluetooth listerner using Bluez D-Bus interface.
Inheritance:
Public Methods
-
CBluezBTListener()
- Constructor, as private - not used.
-
CBluezBTListener(MAbstractStateConverter* aConverter)
- Constructor
-
~CBluezBTListener()
- Destructor, closes connection to D-Bus.
-
bool Connect()
- Connects the listener to source
-
void Disconnect()
- Disconnects this listener from D-Bus
-
void CheckInitialState()
- Checks the initial state of the bluetooth device via Bluez
-
void CheckState()
- Check the current state - not implemented
-
const std::string& GetName()
- Returns the name of this listener
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.
CBluezBTListener()
-
Default constructor isn't used (cannot be used)
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!
~CBluezBTListener()
-
Closes the connection if it wasn't closed.
bool 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
void Disconnect()
-
Disconnects listener if it wasn't already disconnected (error)
void 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.
void CheckState()
-
Not ipmlemented - does nothing.
const 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++.