• Skip to content
  • Skip to link menu
KDE 4.2 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 #include <QtCore/QMap>
00029 
00030 #include "bluetoothremotedevice.h"
00031 #include "bluetoothinputdevice.h"
00032 #include "ifaces/bluetoothremotedevice.h"
00033 #include "ifaces/bluetoothinputdevice.h"
00034 
00035 
00036 
00037 namespace Solid
00038 {
00039 namespace Control
00040 {
00041 class BluetoothRemoteDevice;
00042 typedef QList<BluetoothRemoteDevice*> BluetoothRemoteDeviceList;
00043 class BluetoothInterfacePrivate;
00044 
00048 class SOLIDCONTROL_EXPORT BluetoothInterface : public QObject
00049 {
00050     Q_OBJECT
00051 
00052 
00053 public:
00061     //enum Mode { Off, Discoverable, Connectable };
00062 
00063 
00067     BluetoothInterface();
00068 
00069 
00070 
00076     explicit BluetoothInterface(const QString &ubi);
00077 
00083     explicit BluetoothInterface(QObject *backendObject);
00084 
00090     BluetoothInterface(const BluetoothInterface &device);
00091 
00095     ~BluetoothInterface();
00096 
00097 
00104     BluetoothInterface &operator=(const BluetoothInterface &device);
00105 
00112     QString ubi() const;
00113 
00120     //Solid::Control::BluetoothRemoteDevice* createBluetoothRemoteDevice(const QString &address);
00121     void createBluetoothRemoteDevice(const QString &address);
00122 
00129     const QString getBluetoothRemoteDeviceUBI(const QString &address) const;
00130 
00131     Solid::Control::BluetoothRemoteDevice findBluetoothRemoteDeviceAddr(const QString &addr) const;
00132 
00133     Solid::Control::BluetoothRemoteDevice* findBluetoothRemoteDeviceUBI(const QString &ubi) const;
00134 
00135     Solid::Control::BluetoothInputDevice* findBluetoothInputDeviceUBI(const QString &ubi) const;
00136 
00142     QString address() const;
00143 
00150     //QString version() const;
00151 
00158     //QString revision() const;
00159 
00166     //QString manufacturer() const;
00167 
00175     //QString company() const;
00176 
00183     int discoverableTimeout() const;
00184 
00190     bool isDiscoverable() const;
00191 
00197     bool isDiscovering() const;
00198 
00199 
00206     //BluetoothRemoteDeviceList listConnections() const;
00207 
00213     //QString majorClass() const;
00214 
00221     //QStringList listAvailableMinorClasses() const;
00222 
00230     //QString minorClass() const;
00231 
00238     //QStringList serviceClasses() const;
00239 
00246     QString name() const;
00247 
00253     //QString getRemoteName(const QString & mac);
00254 
00261     //QStringList listBondings() const;
00262 
00268    // bool isPeriodicDiscoveryActive() const;
00269 
00276     //bool isPeriodicDiscoveryNameResolvingActive() const;
00277 
00286     //QStringList listRemoteDevices() const;
00287 
00298   //  QStringList listRecentRemoteDevices(const QDateTime &date) const;
00299 
00305 //    bool isTrusted(const QString &);
00306 
00307 
00308     void createPairedDevice(const QString &, const QString &, const QString &) const;
00309 
00310     QMap< QString, QVariant > getProperties() const;
00311 
00312     BluetoothRemoteDeviceList listDevices() const;
00313 
00314 
00315 
00316 
00317 public Q_SLOTS:
00323     void setDiscoverable(bool status);
00324 
00330     void setDiscoverableTimeout(int timeout);
00331 
00337     //void setMinorClass(const QString &minor);
00338 
00344     void setName(const QString &name);
00345 
00349     //void discoverDevices();
00353     //void discoverDevicesWithoutNameResolving();
00357     //void cancelDiscovery();
00358 
00363     //void startPeriodicDiscovery();
00364 
00368     //void stopPeriodicDiscovery();
00369 
00375     //void setPeriodicDiscoveryNameResolving(bool resolveNames);
00376 
00382     //void setTrusted(const QString &);
00383 
00389     //void removeTrust(const QString &);
00390 
00391     void registerAgent(const QString &,const QString &) const;
00392 
00393     void releaseSession() const;
00394 
00395     void removeDevice(const QString &) const;
00396 
00397     void requestSession() const;
00398 
00399     void setProperty(const QString &, const QVariant &) const;
00400 
00401     void startDiscovery() const;
00402 
00403     void stopDiscovery() const;
00404 
00405     void unregisterAgent(const QString &) const;
00406 
00407     void cancelDeviceCreation(const QString &) const;
00408 
00409 
00410 Q_SIGNALS:
00411 
00418     //void modeChanged(Solid::Control::BluetoothInterface::Mode);
00419 
00426     //void discoverableTimeoutChanged(int timeout);
00427 
00433     //void minorClassChanged(const QString &minor);
00434 
00440     //void nameChanged(const QString &name);
00441 
00445     //void discoveryStarted();
00446 
00450     //void discoveryCompleted();
00451 
00461     //void remoteDeviceFound(const QString &ubi, int deviceClass, int rssi);
00462 
00469     //void remoteDeviceDisappeared(const QString &ubi);
00470 
00478     //void remoteNameUpdated(const QString &address, const QString &name);
00479 
00485     //void remoteDeviceConnected(const QString &address);
00486 
00492     //void remoteDeviceDisconnected(const QString &address);
00493 
00499     //void trustAdded(const QString &address);
00500 
00506     //void trustRemoved(const QString &address);
00507 
00513     //void bondingCreated(const QString &address);
00514 
00520     //void bondingRemoved(const QString &address);
00526     void deviceCreated(const QString &ubi);
00527 
00534     void deviceDisappeared(const QString &address);
00535 
00543     void deviceFound(const QString &address, const QMap< QString, QVariant > &properties);
00544 
00550     void deviceRemoved(const QString &ubi);
00551 
00558     void propertyChanged(const QString &property, const QVariant &value);
00559 
00560 
00561 
00562 
00563 private:
00564     Q_PRIVATE_SLOT(d, void _k_destroyed(QObject *))
00565 
00566     QVariant getProperty(const QString&) const;
00567     BluetoothInterfacePrivate * const d;
00568 
00569 private Q_SLOTS:
00570     void slotDeviceCreated(const QString& ubi);
00571 
00572 };
00573 
00574 } //Control
00575 } //Solid
00576 
00577 
00578 #endif
00579 

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