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

libsolidcontrol

Solid::Control::BluetoothInterface

Solid::Control::BluetoothInterface Class Reference

Represents a bluetooth interface as seen by the bluetooth subsystem. More...

#include <bluetoothinterface.h>

Inheritance diagram for Solid::Control::BluetoothInterface:

Inheritance graph
[legend]

List of all members.


Public Slots

void cancelDeviceCreation (const QString &) const
void registerAgent (const QString &, const QString &) const
void releaseSession () const
void removeDevice (const QString &) const
void requestSession () const
void setDiscoverable (bool status)
void setDiscoverableTimeout (int timeout)
void setName (const QString &name)
void setProperty (const QString &, const QVariant &) const
void startDiscovery () const
void stopDiscovery () const
void unregisterAgent (const QString &) const

Signals

void deviceCreated (const QString &ubi)
void deviceDisappeared (const QString &address)
void deviceFound (const QString &address, const QMap< QString, QVariant > &properties)
void deviceRemoved (const QString &ubi)
void propertyChanged (const QString &property, const QVariant &value)

Public Member Functions

QString address () const
 BluetoothInterface (const BluetoothInterface &device)
 BluetoothInterface (QObject *backendObject)
 BluetoothInterface (const QString &ubi)
 BluetoothInterface ()
void createBluetoothRemoteDevice (const QString &address)
void createPairedDevice (const QString &, const QString &, const QString &) const
int discoverableTimeout () const
Solid::Control::BluetoothInputDevice * findBluetoothInputDeviceUBI (const QString &ubi) const
Solid::Control::BluetoothRemoteDevice findBluetoothRemoteDeviceAddr (const QString &addr) const
Solid::Control::BluetoothRemoteDevice * findBluetoothRemoteDeviceUBI (const QString &ubi) const
const QString getBluetoothRemoteDeviceUBI (const QString &address) const
QMap< QString, QVariant > getProperties () const
bool isDiscoverable () const
bool isDiscovering () const
BluetoothRemoteDeviceList listDevices () const
QString name () const
BluetoothInterface & operator= (const BluetoothInterface &device)
QString ubi () const
 ~BluetoothInterface ()

Detailed Description

Represents a bluetooth interface as seen by the bluetooth subsystem.

Definition at line 48 of file bluetoothinterface.h.


Constructor & Destructor Documentation

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

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 Constructs an invalid bluetooth interface

Definition at line 62 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 66 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 74 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 81 of file bluetoothinterface.cpp.

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

Destroys the device.

Definition at line 88 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 270 of file bluetoothinterface.cpp.

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

Definition at line 118 of file bluetoothinterface.cpp.

void 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 231 of file bluetoothinterface.cpp.

void Solid::Control::BluetoothInterface::createPairedDevice ( const QString &  address,
const QString &  adapterPath,
const QString &  capab 
) const

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

Returns:
the name of the remote device List UBIs of bonded/paired remote bluetooth devices with this bluetooth interface/adapter.

UBIs of bonded/paired bluetooth remote devices Periodic discovery status of this bluetooth interface/adapter.

true if periodic discovery is already active otherwise false Name resolving status of periodic discovery routing.

true if name got resolved while periodic discovery of this bluetooth interface/adapter 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 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 Returns true if the remote bluetooth device is trusted otherwise false.
Parameters:
mac the address of the remote device

Definition at line 123 of file bluetoothinterface.cpp.

void Solid::Control::BluetoothInterface::deviceCreated ( const QString &  ubi  )  [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 The signal is emitted if the discoverable timeout of the bluetooth interface/adapter has changed.
timeout the changed timeout in seconds The signal is emitted if the minor class of the bluetooth interface/adapter has changed.
minor the new minor class The signal is emitted if the name of the bluetooth interface/adapter has changed.
name the new name of the device This signal is emitted if a discovery has started. This signal is emitted if a discovery has completed. 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 This signal is emitted if the bluetooth interface/adapter detectes a bluetooth device disappeared.
ubi the ubi of the disappering bluetooth remote device This signal is emitted if the bluetooth interface/adapter detectes a new name for a bluetooth device.
address the address of the bluetooth remote device
name the name of the bluetooth remote device This signal is emitted if a bluetooth connection has been created.
address the address of the connected bluetooth remote device This signal is emitted if a bluetooth connection has been terminated.
address the address of the disconnected bluetooth remote device This signal is emitted if a bluetooth device was set trusted.
address the address of the trusted bluetooth remote device This signal is emitted if the trust to the bluetooth device was removed.
address the address of the bluetooth remote device This signal is emitted if a successful bonding has been created.
address the address of the bluetooth remote device This signal is emitted if the bonding to a bluetooth device has been removed.
address the address of the bluetooth remote device This signal is emitted when a remote device is created.
ubi the object path of the device on the system bus

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

This signal is emitted when an inquiry session for a periodic discovery finishes and previously found devices are no longer in range or visible.

Parameters:
address the address of the remote device

void Solid::Control::BluetoothInterface::deviceFound ( const QString &  address,
const QMap< QString, QVariant > &  properties 
) [signal]

This signal will be emitted every time an inquiry result has been found by the service daemon.

In general they only appear during a device discovery.

Parameters:
address the address of the remote device
properties the properties of the remote device

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

This signal is emitted when a remote device is removed from the system bus.

Parameters:
ubi the object path on the system bus from the remote device

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

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

Example: "Bluetooth 2.0 + EDR"

Returns:
bluetooth chip version Retrieves the revision of the chip of the bluetooth interface/adapter. Example: "HCI 19.2"

bluetooth chip revision Retrieves the name of the bluetooth chip manufacturer. Example: "Boston Silicon Radio"

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

company string of bluetooth interface/adapter Retrieves the discoverable timeout of the bluetooth interface/adapter. Discoverable timeout of 0 means never disappear.

current discoverable timeout in seconds

Definition at line 305 of file bluetoothinterface.cpp.

Solid::Control::BluetoothInputDevice * Solid::Control::BluetoothInterface::findBluetoothInputDeviceUBI ( const QString &  ubi  )  const

Definition at line 246 of file bluetoothinterface.cpp.

Solid::Control::BluetoothRemoteDevice Solid::Control::BluetoothInterface::findBluetoothRemoteDeviceAddr ( const QString &  addr  )  const

Definition at line 202 of file bluetoothinterface.cpp.

Solid::Control::BluetoothRemoteDevice * Solid::Control::BluetoothInterface::findBluetoothRemoteDeviceUBI ( const QString &  ubi  )  const

Definition at line 240 of file bluetoothinterface.cpp.

const QString Solid::Control::BluetoothInterface::getBluetoothRemoteDeviceUBI ( const QString &  address  )  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 220 of file bluetoothinterface.cpp.

QMap< QString, QVariant > Solid::Control::BluetoothInterface::getProperties (  )  const

Definition at line 131 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 317 of file bluetoothinterface.cpp.

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

Retrieves the current status of a discovering session for the adapter.

Returns:
true if a discovering session is running for the adapter

Definition at line 329 of file bluetoothinterface.cpp.

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

Definition at line 145 of file bluetoothinterface.cpp.

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

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

Returns:
list UBIs of connected bluetooth remote devices Retrieves major class of the bluetooth interface/adapter.
Todo:
enum
Returns:
current major class of the bluetooth interface/adapter List supported minor classes of the bluetooth interface/adapter.
Todo:
enum
Returns:
list of supported minor classes by bluetooth interface/adapter Retrieves minor class of the bluetooth interface/adapter. Valid classes, see listAvailableMinorClasses()
Todo:
enum
Returns:
minor class of the bluetooth interface/adapter. List services class of the bluetooth interface/adapter.
Todo:
enum
Returns:
list of service classes or empty list if no services registered Retrieves name of bluetooth interface/adapter.
Todo:
enum
Returns:
name of bluetooth interface/adapter

Definition at line 378 of file bluetoothinterface.cpp.

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 106 of file bluetoothinterface.cpp.

void Solid::Control::BluetoothInterface::propertyChanged ( const QString &  property,
const QVariant &  value 
) [signal]

This signal is emitted when a property of the adapter is set to a new value.

Parameters:
property the named property of the adapter the new value for the property

void Solid::Control::BluetoothInterface::registerAgent ( const QString &  path,
const QString &  capab 
) const [slot]

Start discovery of remote bluetooth devices with device name resolving.

Start discovery of remote bluetooth devices without device name resolving. Cancel discovery of remote bluetooth devices. Start periodic discovery of remote bluetooth devices. See stopPeriodicDiscovery() Stop periodic discovery of remote bluetooth devices. Enable/Disable name resolving of remote bluetooth devices in periodic discovery.

Parameters:
resolveName true to enable name resolving otherwise false Marks the device as trusted.
mac the address of the remote device Marks the device as not trusted.
mac the address of the remote device

Definition at line 161 of file bluetoothinterface.cpp.

void Solid::Control::BluetoothInterface::releaseSession (  )  const [slot]

Definition at line 166 of file bluetoothinterface.cpp.

void Solid::Control::BluetoothInterface::removeDevice ( const QString &  path  )  const [slot]

Definition at line 176 of file bluetoothinterface.cpp.

void Solid::Control::BluetoothInterface::requestSession (  )  const [slot]

Definition at line 171 of file bluetoothinterface.cpp.

void Solid::Control::BluetoothInterface::setDiscoverable ( bool  status  )  [slot]

Set the discoverable state of the interface/adapter.

Parameters:
status the discoverable state of the bluetooth interface/adapter

Definition at line 435 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 441 of file bluetoothinterface.cpp.

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

Set minor class of bluetooth interface/adapter.

Parameters:
minor set minor class. Valid mode see listAvaliableMinorClasses() Set name of bluetooth interface/adapter.
name the name of bluetooth interface/adapter

Definition at line 453 of file bluetoothinterface.cpp.

void Solid::Control::BluetoothInterface::setProperty ( const QString &  property,
const QVariant &  value 
) const [slot]

Definition at line 181 of file bluetoothinterface.cpp.

void Solid::Control::BluetoothInterface::startDiscovery (  )  const [slot]

Definition at line 186 of file bluetoothinterface.cpp.

void Solid::Control::BluetoothInterface::stopDiscovery (  )  const [slot]

Definition at line 191 of file bluetoothinterface.cpp.

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 113 of file bluetoothinterface.cpp.

void Solid::Control::BluetoothInterface::unregisterAgent ( const QString &  path  )  const [slot]

Definition at line 196 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
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.7
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