• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

libsolidcontrol

Solid::Control::BluetoothInterface

Solid::Control::BluetoothInterface Class Reference

#include <bluetoothinterface.h>

Inheritance diagram for Solid::Control::BluetoothInterface:

Inheritance graph
[legend]

List of all members.


Detailed Description

Represents a bluetooth interface as seen by the bluetooth subsystem.

Definition at line 45 of file bluetoothinterface.h.


Public Types

enum  Mode { Off, Discoverable, Connectable }

Public Slots

void cancelDiscovery ()
void discoverDevices ()
void discoverDevicesWithoutNameResolving ()
void removeTrust (const QString &)
void setDiscoverableTimeout (int timeout)
void setMinorClass (const QString &minor)
void setMode (const Mode mode)
void setName (const QString &name)
void setPeriodicDiscoveryNameResolving (bool resolveNames)
void setTrusted (const QString &)
void startPeriodicDiscovery ()
void stopPeriodicDiscovery ()

Signals

void bondingCreated (const QString &address)
void bondingRemoved (const QString &address)
void discoverableTimeoutChanged (int timeout)
void discoveryCompleted ()
void discoveryStarted ()
void minorClassChanged (const QString &minor)
void modeChanged (Solid::Control::BluetoothInterface::Mode)
void nameChanged (const QString &name)
void remoteDeviceConnected (const QString &address)
void remoteDeviceDisappeared (const QString &ubi)
void remoteDeviceDisconnected (const QString &address)
void remoteDeviceFound (const QString &ubi, int deviceClass, int rssi)
void remoteNameUpdated (const QString &address, const QString &name)
void trustAdded (const QString &address)
void trustRemoved (const QString &address)

Public Member Functions

QString address () const
 BluetoothInterface (const BluetoothInterface &device)
 BluetoothInterface (QObject *backendObject)
 BluetoothInterface (const QString &ubi)
 BluetoothInterface ()
QString company () const
BluetoothRemoteDevice * createBluetoothRemoteDevice (const QString &address)
int discoverableTimeout () const
BluetoothRemoteDevice findBluetoothRemoteDevice (const QString &ubi) const
QString getRemoteName (const QString &mac)
bool isDiscoverable () const
bool isPeriodicDiscoveryActive () const
bool isPeriodicDiscoveryNameResolvingActive () const
bool isTrusted (const QString &)
QStringList listAvailableMinorClasses () const
QStringList listBondings () const
BluetoothRemoteDeviceList listConnections () const
QStringList listRecentRemoteDevices (const QDateTime &date) const
QStringList listRemoteDevices () const
QString majorClass () const
QString manufacturer () const
QString minorClass () const
Mode mode () const
QString name () const
BluetoothInterface & operator= (const BluetoothInterface &device)
QString revision () const
QStringList serviceClasses () const
QString ubi () const
QString version () const
 ~BluetoothInterface ()

Member Enumeration Documentation

enum Solid::Control::BluetoothInterface::Mode

Describes the operating mode of a bluetooth interface.

  • Off : The interface's transceiver is turned off
  • Discoverable : The interface may be discovered by other devices and connected to
  • Connectable : The interface may only be connected to but not discovered
Enumerator:
Off 
Discoverable 
Connectable 

Definition at line 57 of file bluetoothinterface.h.


Constructor & Destructor Documentation

Solid::Control::BluetoothInterface::BluetoothInterface (  ) 

Constructs an invalid bluetooth interface.

Definition at line 57 of file bluetoothinterface.cpp.

Solid::Control::BluetoothInterface::BluetoothInterface ( const QString &  ubi  )  [explicit]

Constructs a bluetooth interface for a given Unique Bluetooth Identifier (UBI).

This object will be auto deleted, DON'T delete it.

Parameters:
ubi the ubi of the bluetooth interface to create

Definition at line 61 of file bluetoothinterface.cpp.

Solid::Control::BluetoothInterface::BluetoothInterface ( QObject *  backendObject  )  [explicit]

Constructs a new bluetooth interface taking its data from a backend.

Parameters:
backendObject the object given by the backend

Definition at line 68 of file bluetoothinterface.cpp.

Solid::Control::BluetoothInterface::BluetoothInterface ( const BluetoothInterface &  device  ) 

Constructs a copy of a bluetooth interface.

Parameters:
device the bluetooth interface to copy

Definition at line 74 of file bluetoothinterface.cpp.

Solid::Control::BluetoothInterface::~BluetoothInterface (  ) 

Destroys the device.

Definition at line 80 of file bluetoothinterface.cpp.


Member Function Documentation

QString Solid::Control::BluetoothInterface::address (  )  const

Retrieves the MAC address of the bluetooth interface/adapter.

Returns:
MAC address of bluetooth interface

Definition at line 128 of file bluetoothinterface.cpp.

void Solid::Control::BluetoothInterface::bondingCreated ( const QString &  address  )  [signal]

This signal is emitted if a successful bonding has been created.

Parameters:
address the address of the bluetooth remote device

void Solid::Control::BluetoothInterface::bondingRemoved ( const QString &  address  )  [signal]

This signal is emitted if the bonding to a bluetooth device has been removed.

Parameters:
address the address of the bluetooth remote device

void Solid::Control::BluetoothInterface::cancelDiscovery (  )  [slot]

Cancel discovery of remote bluetooth devices.

Definition at line 282 of file bluetoothinterface.cpp.

QString Solid::Control::BluetoothInterface::company (  )  const

Retrieves the name of the manufacturer of the bluetooth interface, using the chip supplied by BluetoothInterface::manufacterer() Based on device address.

Returns:
company string of bluetooth interface/adapter

Definition at line 148 of file bluetoothinterface.cpp.

Solid::Control::BluetoothRemoteDevice * Solid::Control::BluetoothInterface::createBluetoothRemoteDevice ( const QString &  address  ) 

Create new BluetoothRemoteDevice object from this interface given its address.

Parameters:
ubi the identifier of the bluetooth device to instantiate
Returns:
a bluetooth object, if a bluetooth device having the given UBI, for this interface exists, 0 otherwise

Definition at line 115 of file bluetoothinterface.cpp.

int Solid::Control::BluetoothInterface::discoverableTimeout (  )  const

Retrieves the discoverable timeout of the bluetooth interface/adapter.

Discoverable timeout of 0 means never disappear.

Returns:
current discoverable timeout in seconds

Definition at line 158 of file bluetoothinterface.cpp.

void Solid::Control::BluetoothInterface::discoverableTimeoutChanged ( int  timeout  )  [signal]

The signal is emitted if the discoverable timeout of the bluetooth interface/adapter has changed.

Parameters:
timeout the changed timeout in seconds

void Solid::Control::BluetoothInterface::discoverDevices (  )  [slot]

Start discovery of remote bluetooth devices with device name resolving.

Definition at line 272 of file bluetoothinterface.cpp.

void Solid::Control::BluetoothInterface::discoverDevicesWithoutNameResolving (  )  [slot]

Start discovery of remote bluetooth devices without device name resolving.

Definition at line 277 of file bluetoothinterface.cpp.

void Solid::Control::BluetoothInterface::discoveryCompleted (  )  [signal]

This signal is emitted if a discovery has completed.

void Solid::Control::BluetoothInterface::discoveryStarted (  )  [signal]

This signal is emitted if a discovery has started.

Solid::Control::BluetoothRemoteDevice Solid::Control::BluetoothInterface::findBluetoothRemoteDevice ( const QString &  ubi  )  const

Finds a BluetoothRemoteDevice object given its UBI.

Parameters:
ubi the identifier of the bluetooth remote device to find from this bluetooth interface
Returns:
a valid BluetoothRemoteDevice object if a remote device having the given UBI for this interface exists, an invalid BluetoothRemoteDevice object otherwise.

Definition at line 104 of file bluetoothinterface.cpp.

QString Solid::Control::BluetoothInterface::getRemoteName ( const QString &  mac  ) 

Returns the name of the remote device, given its mac address (mac).

Returns:
the name of the remote device

Definition at line 210 of file bluetoothinterface.cpp.

bool Solid::Control::BluetoothInterface::isDiscoverable (  )  const

Retrieves the current discoverable staut of the bluetooth interface/adapter.

Returns:
current discoverable status of bluetooth interface/adapter

Definition at line 163 of file bluetoothinterface.cpp.

bool Solid::Control::BluetoothInterface::isPeriodicDiscoveryActive (  )  const

Periodic discovery status of this bluetooth interface/adapter.

Returns:
true if periodic discovery is already active otherwise false

Definition at line 220 of file bluetoothinterface.cpp.

bool Solid::Control::BluetoothInterface::isPeriodicDiscoveryNameResolvingActive (  )  const

Name resolving status of periodic discovery routing.

Returns:
true if name got resolved while periodic discovery of this bluetooth interface/adapter

Definition at line 225 of file bluetoothinterface.cpp.

bool Solid::Control::BluetoothInterface::isTrusted ( const QString &  address  ) 

Returns true if the remote bluetooth device is trusted otherwise false.

Parameters:
mac the address of the remote device

Definition at line 231 of file bluetoothinterface.cpp.

QStringList Solid::Control::BluetoothInterface::listAvailableMinorClasses (  )  const

List supported minor classes of the bluetooth interface/adapter.

Todo:
enum
Returns:
list of supported minor classes by bluetooth interface/adapter

Definition at line 190 of file bluetoothinterface.cpp.

QStringList Solid::Control::BluetoothInterface::listBondings (  )  const

List UBIs of bonded/paired remote bluetooth devices with this bluetooth interface/adapter.

Returns:
UBIs of bonded/paired bluetooth remote devices

Definition at line 215 of file bluetoothinterface.cpp.

Solid::Control::BluetoothRemoteDeviceList Solid::Control::BluetoothInterface::listConnections (  )  const

List all UBIs of connected remote bluetooth devices of this handled bluetooth interface/adapter.

Returns:
list UBIs of connected bluetooth remote devices

Definition at line 168 of file bluetoothinterface.cpp.

QStringList Solid::Control::BluetoothInterface::listRecentRemoteDevices ( const QDateTime &  date  )  const

List the Unique Bluetooth Identifier (UBI) of all known remote devices since a specific datestamp.

Known remote devices means remote bluetooth which are seen, used or paired/bonded.

See listConnections(), listRemoteDevices()

Parameters:
date the datestamp of the beginning of recent used devices
Returns:
a QStringList of UBIs of all known remote bluetooth devices

Definition at line 244 of file bluetoothinterface.cpp.

QStringList Solid::Control::BluetoothInterface::listRemoteDevices (  )  const

List the Unique Bluetooth Identifier (UBI) of all known remote devices, whether they are seen, used or paired/bonded.

See listConnections()

Returns:
a QStringList of UBIs of all known remote bluetooth devices

Definition at line 237 of file bluetoothinterface.cpp.

QString Solid::Control::BluetoothInterface::majorClass (  )  const

Retrieves major class of the bluetooth interface/adapter.

Todo:
enum
Returns:
current major class of the bluetooth interface/adapter

Definition at line 185 of file bluetoothinterface.cpp.

QString Solid::Control::BluetoothInterface::manufacturer (  )  const

Retrieves the name of the bluetooth chip manufacturer.

Example: "Boston Silicon Radio"

Returns:
manufacturer string of bluetooth interface/adapter

Definition at line 143 of file bluetoothinterface.cpp.

QString Solid::Control::BluetoothInterface::minorClass (  )  const

Retrieves minor class of the bluetooth interface/adapter.

Valid classes, see listAvailableMinorClasses()

Todo:
enum
Returns:
minor class of the bluetooth interface/adapter.

Definition at line 195 of file bluetoothinterface.cpp.

void Solid::Control::BluetoothInterface::minorClassChanged ( const QString &  minor  )  [signal]

The signal is emitted if the minor class of the bluetooth interface/adapter has changed.

Parameters:
minor the new minor class

Solid::Control::BluetoothInterface::Mode Solid::Control::BluetoothInterface::mode (  )  const

Retrieves the current mode of the bluetooth interface/adapter.

Returns:
the current mode of bluetooth interface/adapter

Definition at line 153 of file bluetoothinterface.cpp.

void Solid::Control::BluetoothInterface::modeChanged ( Solid::Control::BluetoothInterface::Mode   )  [signal]

This signal is emitted if the mode of the bluetooth interface/adapter has changed.

See mode() for valid modes.

Parameters:
mode the changed mode

QString Solid::Control::BluetoothInterface::name (  )  const

Retrieves name of bluetooth interface/adapter.

Todo:
enum
Returns:
name of bluetooth interface/adapter

Definition at line 205 of file bluetoothinterface.cpp.

void Solid::Control::BluetoothInterface::nameChanged ( const QString &  name  )  [signal]

The signal is emitted if the name of the bluetooth interface/adapter has changed.

Parameters:
name the new name of the device

Solid::Control::BluetoothInterface & Solid::Control::BluetoothInterface::operator= ( const BluetoothInterface &  device  ) 

Assigns a bluetooth interface to this bluetooth interface and returns a reference to it.

Parameters:
device the bluetooth interface to assign
Returns:
a reference to the bluetooth interface

Definition at line 92 of file bluetoothinterface.cpp.

void Solid::Control::BluetoothInterface::remoteDeviceConnected ( const QString &  address  )  [signal]

This signal is emitted if a bluetooth connection has been created.

Parameters:
address the address of the connected bluetooth remote device

void Solid::Control::BluetoothInterface::remoteDeviceDisappeared ( const QString &  ubi  )  [signal]

This signal is emitted if the bluetooth interface/adapter detectes a bluetooth device disappeared.

Parameters:
ubi the ubi of the disappering bluetooth remote device

void Solid::Control::BluetoothInterface::remoteDeviceDisconnected ( const QString &  address  )  [signal]

This signal is emitted if a bluetooth connection has been terminated.

Parameters:
address the address of the disconnected bluetooth remote device

void Solid::Control::BluetoothInterface::remoteDeviceFound ( const QString &  ubi,
int  deviceClass,
int  rssi 
) [signal]

This signal is emitted if the bluetooth interface/adapter detects a new remote bluetooth device.

Todo:
change arguments types of deviceClass (uint32) and rssi (int16)
Parameters:
ubi the new bluetooth identifier
deviceClass the device class of the remote device
rssi the Received Signal Strength Information (RSSI) of the remote device

void Solid::Control::BluetoothInterface::remoteNameUpdated ( const QString &  address,
const QString &  name 
) [signal]

This signal is emitted if the bluetooth interface/adapter detectes a new name for a bluetooth device.

Parameters:
address the address of the bluetooth remote device
name the name of the bluetooth remote device

void Solid::Control::BluetoothInterface::removeTrust ( const QString &  address  )  [slot]

Marks the device as not trusted.

Parameters:
mac the address of the remote device

Definition at line 307 of file bluetoothinterface.cpp.

QString Solid::Control::BluetoothInterface::revision (  )  const

Retrieves the revision of the chip of the bluetooth interface/adapter.

Example: "HCI 19.2"

Returns:
bluetooth chip revision

Definition at line 138 of file bluetoothinterface.cpp.

QStringList Solid::Control::BluetoothInterface::serviceClasses (  )  const

List services class of the bluetooth interface/adapter.

Todo:
enum
Returns:
list of service classes or empty list if no services registered

Definition at line 200 of file bluetoothinterface.cpp.

void Solid::Control::BluetoothInterface::setDiscoverableTimeout ( int  timeout  )  [slot]

Set discoverable timeout of bluetooth interface/adapter.

Parameters:
timeout timeout in seconds

Definition at line 257 of file bluetoothinterface.cpp.

void Solid::Control::BluetoothInterface::setMinorClass ( const QString &  minor  )  [slot]

Set minor class of bluetooth interface/adapter.

Parameters:
minor set minor class. Valid mode see listAvaliableMinorClasses()

Definition at line 262 of file bluetoothinterface.cpp.

void Solid::Control::BluetoothInterface::setMode ( const Mode  mode  )  [slot]

Set mode of bluetooth interface/adapter.

Valid modes, see mode()

Parameters:
mode the mode of the bluetooth interface/adapter

Definition at line 252 of file bluetoothinterface.cpp.

void Solid::Control::BluetoothInterface::setName ( const QString &  name  )  [slot]

Set name of bluetooth interface/adapter.

Parameters:
name the name of bluetooth interface/adapter

Definition at line 267 of file bluetoothinterface.cpp.

void Solid::Control::BluetoothInterface::setPeriodicDiscoveryNameResolving ( bool  resolveNames  )  [slot]

Enable/Disable name resolving of remote bluetooth devices in periodic discovery.

Parameters:
resolveName true to enable name resolving otherwise false

Definition at line 297 of file bluetoothinterface.cpp.

void Solid::Control::BluetoothInterface::setTrusted ( const QString &  address  )  [slot]

Marks the device as trusted.

Parameters:
mac the address of the remote device

Definition at line 302 of file bluetoothinterface.cpp.

void Solid::Control::BluetoothInterface::startPeriodicDiscovery (  )  [slot]

Start periodic discovery of remote bluetooth devices.

See stopPeriodicDiscovery()

Definition at line 287 of file bluetoothinterface.cpp.

void Solid::Control::BluetoothInterface::stopPeriodicDiscovery (  )  [slot]

Stop periodic discovery of remote bluetooth devices.

Definition at line 292 of file bluetoothinterface.cpp.

void Solid::Control::BluetoothInterface::trustAdded ( const QString &  address  )  [signal]

This signal is emitted if a bluetooth device was set trusted.

Parameters:
address the address of the trusted bluetooth remote device

void Solid::Control::BluetoothInterface::trustRemoved ( const QString &  address  )  [signal]

This signal is emitted if the trust to the bluetooth device was removed.

Parameters:
address the address of the bluetooth remote device

QString Solid::Control::BluetoothInterface::ubi (  )  const

Retrieves the Unique Bluetooth Identifier (UBI) of the BluetoothInterface.

This identifier is ubique for each bluetooth and bluetooth interface in the system.

Returns:
the Unique Bluetooth Identifier of the current bluetooth interface

Definition at line 99 of file bluetoothinterface.cpp.

QString Solid::Control::BluetoothInterface::version (  )  const

Retrieves the version of the chip of the bluetooth interface/adapter.

Example: "Bluetooth 2.0 + EDR"

Returns:
bluetooth chip version

Definition at line 133 of file bluetoothinterface.cpp.


The documentation for this class was generated from the following files:
  • bluetoothinterface.h
  • bluetoothinterface.cpp

libsolidcontrol

Skip menu "libsolidcontrol"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libplasma
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal