libsolidcontrol
bluetoothremotedevice.h
Go to the documentation of this file.00001 /* This file is part of the KDE project 00002 Copyright (C) 2007 Will Stephenson <wstephenson@kde.org> 00003 Copyright (C) 2007 Daniel Gollub <dgollub@suse.de> 00004 Copyright (C) 2008 Tom Patzig <tpatzig@suse.de> 00005 00006 00007 This library is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU Library General Public 00009 License version 2 as published by the Free Software Foundation. 00010 00011 This library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Library General Public License for more details. 00015 00016 You should have received a copy of the GNU Library General Public License 00017 along with this library; see the file COPYING.LIB. If not, write to 00018 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00019 Boston, MA 02110-1301, USA. 00020 00021 */ 00022 00023 #ifndef SOLID_CONTROL_BLUETOOTHREMOTEDEVICE_H 00024 #define SOLID_CONTROL_BLUETOOTHREMOTEDEVICE_H 00025 00026 #include <QtCore/QObject> 00027 #include <QtCore/QStringList> 00028 #include <QtCore/QMap> 00029 #include <QtCore/QVariant> 00030 00031 #include "bluetoothmanager.h" 00032 #include "bluetoothinterface.h" 00033 00034 class KJob; 00035 00036 namespace Solid 00037 { 00038 namespace Control 00039 { 00040 class BluetoothRemoteDevicePrivate; 00044 class SOLIDCONTROL_EXPORT BluetoothRemoteDevice : public QObject 00045 { 00046 Q_OBJECT 00047 Q_DECLARE_PRIVATE(BluetoothRemoteDevice) 00048 00049 public: 00055 BluetoothRemoteDevice(QObject *backendObject = 0); 00056 00062 BluetoothRemoteDevice(const BluetoothRemoteDevice &device); 00063 00067 ~BluetoothRemoteDevice(); 00068 00075 BluetoothRemoteDevice &operator=(const BluetoothRemoteDevice &device); 00076 00082 bool operator==(const BluetoothRemoteDevice & other) const; 00083 00087 QString ubi() const; 00088 00092 QString address(); 00093 00097 QString name(); 00098 00102 QString icon(); 00103 00107 bool isTrusted(); 00108 00112 void setTrusted(bool); 00113 00117 QStringList uuids(); 00118 00122 bool isConnected(); 00123 00129 QMap<QString,QVariant> getProperties(); 00130 00137 void discoverServices(const QString &pattern); 00138 00144 QStringList listNodes(); 00145 00146 public Q_SLOTS: 00147 00154 void setProperty(const QString &name, const QVariant &value); 00155 00159 void cancelDiscovery(); 00160 00164 void disconnect(); 00165 00166 Q_SIGNALS: 00167 00174 void serviceDiscoverAvailable(const QString &status, const QMap<uint,QString> &services); 00175 00182 void propertyChanged(const QString &name, const QVariant &value); 00183 00187 void disconnectRequested(); 00188 00189 00190 protected: 00191 BluetoothRemoteDevicePrivate *d_ptr; 00192 00193 private: 00194 Q_PRIVATE_SLOT(d_func(), void _k_destroyed(QObject *)) 00195 00196 00197 QVariant getProperty(const QString &key); 00198 }; 00199 00200 } //Control 00201 } //Solid 00202 00203 #endif