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

libsolidcontrol

bluetoothinterface.h

Go to the documentation of this file.
00001 /*  This file is part of the KDE project
00002     Copyright (C) 2006 Will Stephenson <wstephenson@kde.org>
00003     Copyright (C) 2007 Daniel Gollub <dgollub@suse.de>
00004 
00005 
00006     This library is free software; you can redistribute it and/or
00007     modify it under the terms of the GNU Library General Public
00008     License version 2 as published by the Free Software Foundation.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Library General Public License for more details.
00014 
00015     You should have received a copy of the GNU Library General Public License
00016     along with this library; see the file COPYING.LIB.  If not, write to
00017     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018     Boston, MA 02110-1301, USA.
00019 
00020 */
00021 
00022 #ifndef SOLID_CONTROL_BLUETOOTHINTERFACE_H
00023 #define SOLID_CONTROL_BLUETOOTHINTERFACE_H
00024 
00025 #include <QtCore/QDateTime>
00026 #include <QtCore/QPair>
00027 #include <QtCore/QObject>
00028 
00029 #include "bluetoothremotedevice.h"
00030 #include "ifaces/bluetoothremotedevice.h"
00031 
00032 
00033 
00034 namespace Solid
00035 {
00036 namespace Control
00037 {
00038 class BluetoothRemoteDevice;
00039 typedef QList<BluetoothRemoteDevice> BluetoothRemoteDeviceList;
00040 class BluetoothInterfacePrivate;
00041 
00045 class SOLIDCONTROL_EXPORT BluetoothInterface : public QObject
00046 {
00047     Q_OBJECT
00048 
00049 public:
00057     enum Mode { Off, Discoverable, Connectable };
00061     BluetoothInterface();
00062 
00068     explicit BluetoothInterface(const QString &ubi);
00069 
00075     explicit BluetoothInterface(QObject *backendObject);
00076 
00082     BluetoothInterface(const BluetoothInterface &device);
00083 
00087     ~BluetoothInterface();
00088 
00089 
00096     BluetoothInterface &operator=(const BluetoothInterface &device);
00097 
00104     QString ubi() const;
00105 
00112     BluetoothRemoteDevice *createBluetoothRemoteDevice(const QString &address);
00113 
00120     BluetoothRemoteDevice findBluetoothRemoteDevice(const QString &ubi) const;
00121 
00127     QString address() const;
00128 
00135     QString version() const;
00136 
00143     QString revision() const;
00144 
00151     QString manufacturer() const;
00152 
00160     QString company() const;
00161 
00167     Mode mode() const;
00168 
00175     int discoverableTimeout() const;
00176 
00182     bool isDiscoverable() const;
00183 
00190     BluetoothRemoteDeviceList listConnections() const;
00191 
00197     QString majorClass() const;
00198 
00205     QStringList listAvailableMinorClasses() const;
00206 
00214     QString minorClass() const;
00215 
00222     QStringList serviceClasses() const;
00223 
00230     QString name() const;
00231 
00237     QString getRemoteName(const QString & mac);
00238 
00245     QStringList listBondings() const;
00246 
00252     bool isPeriodicDiscoveryActive() const;
00253 
00260     bool isPeriodicDiscoveryNameResolvingActive() const;
00261 
00270     QStringList listRemoteDevices() const;
00271 
00282     QStringList listRecentRemoteDevices(const QDateTime &date) const;
00283 
00289     bool isTrusted(const QString &);
00290 
00291 
00292 public Q_SLOTS:
00299     void setMode(const Mode mode);
00300 
00306     void setDiscoverableTimeout(int timeout);
00307 
00313     void setMinorClass(const QString &minor);
00314 
00320     void setName(const QString &name);
00321 
00325     void discoverDevices();
00329     void discoverDevicesWithoutNameResolving();
00333     void cancelDiscovery();
00334 
00339     void startPeriodicDiscovery();
00340 
00344     void stopPeriodicDiscovery();
00345 
00351     void setPeriodicDiscoveryNameResolving(bool resolveNames);
00352 
00358     void setTrusted(const QString &);
00359 
00365     void removeTrust(const QString &);
00366 
00367 
00368 Q_SIGNALS:
00369 
00376     void modeChanged(Solid::Control::BluetoothInterface::Mode);
00377 
00384     void discoverableTimeoutChanged(int timeout);
00385 
00391     void minorClassChanged(const QString &minor);
00392 
00398     void nameChanged(const QString &name);
00399 
00403     void discoveryStarted();
00404 
00408     void discoveryCompleted();
00409 
00419     void remoteDeviceFound(const QString &ubi, int deviceClass, int rssi);
00420 
00427     void remoteDeviceDisappeared(const QString &ubi);
00428 
00436     void remoteNameUpdated(const QString &address, const QString &name);
00437 
00443     void remoteDeviceConnected(const QString &address);
00444 
00450     void remoteDeviceDisconnected(const QString &address);
00451 
00457     void trustAdded(const QString &address);
00458 
00464     void trustRemoved(const QString &address);
00465 
00471     void bondingCreated(const QString &address);
00472 
00478     void bondingRemoved(const QString &address);
00479 
00480 private:
00481     Q_PRIVATE_SLOT(d, void _k_destroyed(QObject *))
00482 
00483     BluetoothInterfacePrivate * const d;
00484 };
00485 
00486 } //Control
00487 } //Solid
00488 
00489 #endif
00490 

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