Blob Blame History Raw
diff -ur kdebase-workspace-4.2.0/libs/solid/control/backends/CMakeLists.txt kdebase-workspace-4.2.0-bluetooth-revert/libs/solid/control/backends/CMakeLists.txt
--- kdebase-workspace-4.2.0/libs/solid/control/backends/CMakeLists.txt	2008-10-17 13:00:21.000000000 +0200
+++ kdebase-workspace-4.2.0-bluetooth-revert/libs/solid/control/backends/CMakeLists.txt	2008-01-05 00:55:29.000000000 +0100
@@ -1,3 +1,3 @@
 add_subdirectory( fakenet )
-#add_subdirectory( fakebluetooth )
+add_subdirectory( fakebluetooth )
 
diff -ur kdebase-workspace-4.2.0/libs/solid/control/backends/fakebluetooth/fakebluetoothinterface.h kdebase-workspace-4.2.0-bluetooth-revert/libs/solid/control/backends/fakebluetooth/fakebluetoothinterface.h
--- kdebase-workspace-4.2.0/libs/solid/control/backends/fakebluetooth/fakebluetoothinterface.h	2008-07-03 07:05:34.000000000 +0200
+++ kdebase-workspace-4.2.0-bluetooth-revert/libs/solid/control/backends/fakebluetooth/fakebluetoothinterface.h	2008-08-28 10:06:55.000000000 +0200
@@ -134,6 +134,7 @@
     }
     bool isTrusted(const QString& mac)
     {
+	Q_UNUSED(mac)
 	return true;
     }
 
diff -ur kdebase-workspace-4.2.0/libs/solid/control/bluetoothinputdevice.cpp kdebase-workspace-4.2.0-bluetooth-revert/libs/solid/control/bluetoothinputdevice.cpp
--- kdebase-workspace-4.2.0/libs/solid/control/bluetoothinputdevice.cpp	2008-10-30 15:13:17.000000000 +0100
+++ kdebase-workspace-4.2.0-bluetooth-revert/libs/solid/control/bluetoothinputdevice.cpp	2008-05-21 10:33:09.000000000 +0200
@@ -19,6 +19,7 @@
 
 */
 
+#include <QMap>
 #include <QStringList>
 
 #include "ifaces/bluetoothinputdevice.h"
@@ -71,19 +72,39 @@
     return_SOLID_CALL(Ifaces::BluetoothInputDevice *, d->backendObject(), QString(), ubi());
 }
 
-QMap<QString,QVariant> Solid::Control::BluetoothInputDevice::getProperties() const
+bool Solid::Control::BluetoothInputDevice::isConnected() const
 {
-    return_SOLID_CALL(Ifaces::BluetoothInputDevice *, d->backendObject(), (QMap< QString,QVariant >()), getProperties());
+    return_SOLID_CALL(Ifaces::BluetoothInputDevice *, d->backendObject(), false, isConnected());
 }
 
-void Solid::Control::BluetoothInputDevice::connect()
+QString Solid::Control::BluetoothInputDevice::name() const
 {
-    SOLID_CALL(Ifaces::BluetoothInputDevice *, d->backendObject(), connect());
+    return_SOLID_CALL(Ifaces::BluetoothInputDevice *, d->backendObject(), QString(), name());
 }
 
-void Solid::Control::BluetoothInputDevice::disconnect()
+QString Solid::Control::BluetoothInputDevice::address() const
 {
-    SOLID_CALL(Ifaces::BluetoothInputDevice *, d->backendObject(), disconnect());
+    return_SOLID_CALL(Ifaces::BluetoothInputDevice *, d->backendObject(), QString(), address());
+}
+
+QString Solid::Control::BluetoothInputDevice::productID() const
+{
+    return_SOLID_CALL(Ifaces::BluetoothInputDevice *, d->backendObject(), QString(), productID());
+}
+
+QString Solid::Control::BluetoothInputDevice::vendorID() const
+{
+    return_SOLID_CALL(Ifaces::BluetoothInputDevice *, d->backendObject(), QString(), vendorID());
+}
+
+void Solid::Control::BluetoothInputDevice::slotConnect()
+{
+    SOLID_CALL(Ifaces::BluetoothInputDevice *, d->backendObject(), slotConnect());
+}
+
+void Solid::Control::BluetoothInputDevice::slotDisconnect()
+{
+    SOLID_CALL(Ifaces::BluetoothInputDevice *, d->backendObject(), slotDisconnect());
 }
 
 void Solid::Control::BluetoothInputDevicePrivate::setBackendObject(QObject *object)
@@ -91,8 +112,10 @@
     FrontendObjectPrivate::setBackendObject(object);
 
     if (object) {
-        QObject::connect(object, SIGNAL(propertyChanged(QString,QVariant)),
-                         parent(), SIGNAL(propertyChanged(QString,QVariant)));
+        QObject::connect(object, SIGNAL(connected()),
+                         parent(), SIGNAL(connected()));
+        QObject::connect(object, SIGNAL(disconnected()),
+                         parent(), SIGNAL(disconnected()));
     }
 }
 
diff -ur kdebase-workspace-4.2.0/libs/solid/control/bluetoothinputdevice.h kdebase-workspace-4.2.0-bluetooth-revert/libs/solid/control/bluetoothinputdevice.h
--- kdebase-workspace-4.2.0/libs/solid/control/bluetoothinputdevice.h	2008-10-30 15:13:17.000000000 +0100
+++ kdebase-workspace-4.2.0-bluetooth-revert/libs/solid/control/bluetoothinputdevice.h	2008-06-10 13:41:04.000000000 +0200
@@ -1,7 +1,6 @@
 /*  This file is part of the KDE project
     Copyright (C) 2007 Will Stephenson <wstephenson@kde.org>
     Copyright (C) 2007 Daniel Gollub <dgollub@suse.de>
-    Copyright (C) 2008 Tom Patzig <tpatzig@suse.de>
 
 
     This library is free software; you can redistribute it and/or
@@ -24,8 +23,6 @@
 #define SOLID_CONTROL_BLUETOOTHINPUTDEVICE_H
 
 #include <QtCore/QObject>
-#include <QtCore/QMap>
-#include <QtCore/QVariant>
 
 #include "solid_control_export.h"
 
@@ -77,36 +74,65 @@
      * @returns the Universal Network Identifier of the current bluetooth remote device
      */
     QString ubi() const;
+
+    /**
+     * Retrieves connection status of bluetooth input device.
+     *
+     * @returns true if bluetooth input device is connected
+     */
+    bool isConnected() const;
+
+    /**
+     * Retrieves MAC address of bluetooth input device.
+     *
+     * @returns MAC address of bluetooth input device
+     */
+    QString address() const;
+
+    /**
+     * Retrievies Name of bluetooth input device.
+     *
+     * @returns Name of bluetooth input device
+     */
+    QString name() const;
+
     /**
-     * Retrieve all properties from the input device.
+     * Retrieves Product ID of bluetooth input device.
      *
-     * @returns a hash of named properties
+     * @returns Product ID of bluetooth input device
      */
-    QMap<QString,QVariant> getProperties() const;
+    QString productID() const;
 
+    /**
+     * Retrieves Vendor ID of bluetooth input device.
+     *
+     * @returns Vendor ID of bluetooth input device
+     */
+    QString vendorID() const;
 
 
 public Q_SLOTS:
     /**
      * Connect bluetooth input device.
      */
-    void connect();
+    void slotConnect();
 
     /**
      * Disconnect bluetooth input device.
      */
-    void disconnect();
+    void slotDisconnect();
 
 
 Q_SIGNALS:
-     /**
-     * A Property for the input device has changed.
-     *
-     * @param name the name of the changed property
-     * @param value the new value
+    /**
+     * This signal is emitted when the bluetooth input device is connected.
      */
-    void propertyChanged(const QString &name, const QVariant &value);
+    void connected();
 
+    /**
+     * This signal is emitted when the bluetooth input device is not available anymore.
+     */
+    void disconnected();
 
 private:
     Q_PRIVATE_SLOT(d, void _k_destroyed(QObject *))
diff -ur kdebase-workspace-4.2.0/libs/solid/control/bluetoothinterface.cpp kdebase-workspace-4.2.0-bluetooth-revert/libs/solid/control/bluetoothinterface.cpp
--- kdebase-workspace-4.2.0/libs/solid/control/bluetoothinterface.cpp	2008-12-04 09:34:54.000000000 +0100
+++ kdebase-workspace-4.2.0-bluetooth-revert/libs/solid/control/bluetoothinterface.cpp	2008-07-03 07:05:34.000000000 +0200
@@ -1,7 +1,6 @@
 /*  This file is part of the KDE project
     Copyright (C) 2006 Will Stephenson <wstephenson@kde.org>
     Copyright (C) 2007 Daniel Gollub <dgollub@suse.de>
-    Copyright (C) 2008 Tom Patzig <tpatzig@suse.de>
 
 
     This library is free software; you can redistribute it and/or
@@ -23,7 +22,6 @@
 #include <QMap>
 #include <QPair>
 #include <QStringList>
-#include <QVariant>
 
 #include <kdebug.h>
 
@@ -85,7 +83,7 @@
     typedef QPair<BluetoothRemoteDevice *, Ifaces::BluetoothRemoteDevice *> BluetoothRemoteDeviceIfacePair;
 
     // Delete all the devices, they are now outdated
-    foreach (const BluetoothRemoteDeviceIfacePair &pair, d->remoteDeviceMap) {
+    foreach (const BluetoothRemoteDeviceIfacePair &pair, d->remoteDeviceMap.values()) {
         delete pair.first;
         delete pair.second;
     }
@@ -103,95 +101,8 @@
     return_SOLID_CALL(Ifaces::BluetoothInterface *, d->backendObject(), QString(), ubi());
 }
 
-void Solid::Control::BluetoothInterface::cancelDeviceCreation(const QString &address) const
+Solid::Control::BluetoothRemoteDevice Solid::Control::BluetoothInterface::findBluetoothRemoteDevice(const QString &ubi) const
 {
-    SOLID_CALL(Ifaces::BluetoothInterface *, d->backendObject(), cancelDeviceCreation(address));
-}
-
-QString Solid::Control::BluetoothInterface::createPairedDevice(const QString &address,const QString &adapterPath, const QString &capab) const
-{
-    return_SOLID_CALL(Ifaces::BluetoothInterface *, d->backendObject(), QString(), createPairedDevice(address,adapterPath,capab));
-}
-
-QMap<QString, QVariant> Solid::Control::BluetoothInterface::getProperties() const
-{
-    return_SOLID_CALL(Ifaces::BluetoothInterface *, d->backendObject(), (QMap<QString,QVariant>()), getProperties());
-}
-
-QVariant Solid::Control::BluetoothInterface::getProperty(const QString &key) const
-{
-    QMap<QString, QVariant> props = getProperties();
-    if (props.contains(key))
-        return props[key];
-    else
-        return QVariant();
-}
-
-Solid::Control::BluetoothRemoteDeviceList Solid::Control::BluetoothInterface::listDevices() const
-{
-    Ifaces::BluetoothInterface *backend = qobject_cast<Ifaces::BluetoothInterface *>(d->backendObject());
-    if (backend == 0) 
-        return Solid::Control::BluetoothRemoteDeviceList();
-
-    QStringList ubis = backend->listDevices();
-
-    Solid::Control::BluetoothRemoteDeviceList list;
-    foreach (const QString& ubi,ubis) {
-        BluetoothRemoteDevice remoteDevice = findBluetoothRemoteDevice(ubi);
-        list.append(remoteDevice);
-    }
-    return list;
-}
-
-void Solid::Control::BluetoothInterface::registerAgent(const QString &path, const QString &capab) const
-{
-    SOLID_CALL(Ifaces::BluetoothInterface *, d->backendObject(), registerAgent(path,capab));
-}
-
-void Solid::Control::BluetoothInterface::releaseSession() const
-{
-    SOLID_CALL(Ifaces::BluetoothInterface *, d->backendObject(), releaseSession());
-}
-
-void Solid::Control::BluetoothInterface::requestSession() const
-{
-    SOLID_CALL(Ifaces::BluetoothInterface *, d->backendObject(), requestSession());
-}
-
-void Solid::Control::BluetoothInterface::removeDevice(const QString &path) const
-{
-    SOLID_CALL(Ifaces::BluetoothInterface *, d->backendObject(), removeDevice(path));
-}
-
-void Solid::Control::BluetoothInterface::setProperty(const QString &property, const QVariant &value) const
-{
-    SOLID_CALL(Ifaces::BluetoothInterface *, d->backendObject(), setProperty(property,value));
-}
-
-void Solid::Control::BluetoothInterface::startDiscovery() const
-{
-    SOLID_CALL(Ifaces::BluetoothInterface *, d->backendObject(), startDiscovery());
-}
-
-void Solid::Control::BluetoothInterface::stopDiscovery() const
-{
-    SOLID_CALL(Ifaces::BluetoothInterface *, d->backendObject(), stopDiscovery());
-}
-
-void Solid::Control::BluetoothInterface::unregisterAgent(const QString &path) const
-{
-    SOLID_CALL(Ifaces::BluetoothInterface *, d->backendObject(), unregisterAgent(path));
-}
-
-
-Solid::Control::BluetoothRemoteDevice Solid::Control::BluetoothInterface::findBluetoothRemoteDevice(const QString &address) const
-{
-    Ifaces::BluetoothInterface *backend = qobject_cast<Ifaces::BluetoothInterface *>(d->backendObject());
-    if (backend == 0) 
-        return d->invalidDevice;
-
-    const QString ubi = backend->findDevice(address);
-
     QPair<BluetoothRemoteDevice *, Ifaces::BluetoothRemoteDevice *> pair = d->findRegisteredBluetoothRemoteDevice(ubi);
 
     if (pair.first != 0) {
@@ -203,30 +114,22 @@
 
 Solid::Control::BluetoothRemoteDevice * Solid::Control::BluetoothInterface::createBluetoothRemoteDevice(const QString &address)
 {
-    Ifaces::BluetoothInterface *backend = qobject_cast<Ifaces::BluetoothInterface *>(d->backendObject());
-    if (backend == 0) 
-        return 0;
-
-    const QString ubi = backend->createDevice(address);
-
+    QString ubi;
+    if (address.startsWith("/org/bluez"))
+	ubi = address;
+    else
+    	ubi = this->ubi() + "/" + address;
+   
+    kDebug() << "UBI iam using: " << ubi; 
     QPair<BluetoothRemoteDevice *, Ifaces::BluetoothRemoteDevice *> pair = d->findRegisteredBluetoothRemoteDevice(ubi);
     return pair.first;
-}
-
 
+}
 QString Solid::Control::BluetoothInterface::address() const
 {
-    QVariant var = getProperty("Address");
-
-    if (var.isValid())
-        return var.value<QString>();
-    else
-        return QString();
-
-//    return_SOLID_CALL(Ifaces::BluetoothInterface *, d->backendObject(), QString(), address());
+    return_SOLID_CALL(Ifaces::BluetoothInterface *, d->backendObject(), QString(), address());
 }
 
-/*
 QString Solid::Control::BluetoothInterface::version() const
 {
     return_SOLID_CALL(Ifaces::BluetoothInterface *, d->backendObject(), QString(), version());
@@ -246,44 +149,22 @@
 {
     return_SOLID_CALL(Ifaces::BluetoothInterface *, d->backendObject(), QString(), company());
 }
-*/
 
-
-int Solid::Control::BluetoothInterface::discoverableTimeout() const
+Solid::Control::BluetoothInterface::Mode Solid::Control::BluetoothInterface::mode() const
 {
-    QVariant var = getProperty("DiscoverableTimeout");
-
-    if (var.isValid())
-        return var.value<int>();
-    else
-        return 0;
-
-//  return_SOLID_CALL(Ifaces::BluetoothInterface *, d->backendObject(), 0, discoverableTimeout());
+    return_SOLID_CALL(Ifaces::BluetoothInterface *, d->backendObject(), Solid::Control::BluetoothInterface::Off, mode());
 }
 
-bool Solid::Control::BluetoothInterface::isDiscoverable() const
+int Solid::Control::BluetoothInterface::discoverableTimeout() const
 {
-    QVariant var = getProperty("Discoverable");
-
-    if (var.isValid())
-        return var.value<bool>();
-    else
-        return false;
-
-//   return_SOLID_CALL(Ifaces::BluetoothInterface *, d->backendObject(), false, isDiscoverable());
+    return_SOLID_CALL(Ifaces::BluetoothInterface *, d->backendObject(), 0, discoverableTimeout());
 }
 
-bool Solid::Control::BluetoothInterface::isDiscovering() const
+bool Solid::Control::BluetoothInterface::isDiscoverable() const
 {
-    QVariant var = getProperty("Discovering");
-
-    if (var.isValid())
-        return var.value<bool>();
-    else
-        return false;
+    return_SOLID_CALL(Ifaces::BluetoothInterface *, d->backendObject(), false, isDiscoverable());
 }
 
-/*
 Solid::Control::BluetoothRemoteDeviceList Solid::Control::BluetoothInterface::listConnections() const
 {
     BluetoothRemoteDeviceList list;
@@ -320,21 +201,12 @@
 {
     return_SOLID_CALL(Ifaces::BluetoothInterface *, d->backendObject(), QStringList(), serviceClasses());
 }
-*/
 
 QString Solid::Control::BluetoothInterface::name() const
 {
-    QVariant var = getProperty("Name");
-
-    if (var.isValid())
-        return var.value<QString>();
-    else
-        return QString();
-
-//    return_SOLID_CALL(Ifaces::BluetoothInterface *, d->backendObject(), QString(), name());
+    return_SOLID_CALL(Ifaces::BluetoothInterface *, d->backendObject(), QString(), name());
 }
 
-/*
 QString Solid::Control::BluetoothInterface::getRemoteName(const QString &mac)
 {
     return_SOLID_CALL(Ifaces::BluetoothInterface *, d->backendObject(), QString(), getRemoteName(mac));
@@ -375,34 +247,28 @@
                       listRecentRemoteDevices(date));
 }
 
-*/
-
 /***************************************************************/
 
-void Solid::Control::BluetoothInterface::setDiscoverable(bool status)
+void Solid::Control::BluetoothInterface::setMode(const Solid::Control::BluetoothInterface::Mode mode)
 {
-    QVariant var(status);
-    setProperty("Discoverable",var);
+    SOLID_CALL(Ifaces::BluetoothInterface *, d->backendObject(), setMode(mode));
 }
 
 void Solid::Control::BluetoothInterface::setDiscoverableTimeout(int timeout)
 {
-    QVariant var(timeout);
-    setProperty("DiscoverableTimeout",var);
+    SOLID_CALL(Ifaces::BluetoothInterface *, d->backendObject(), setDiscoverableTimeout(timeout));
 }
 
-/*
 void Solid::Control::BluetoothInterface::setMinorClass(const QString &minor)
 {
     SOLID_CALL(Ifaces::BluetoothInterface *, d->backendObject(), setMinorClass(minor));
 }
-*/
+
 void Solid::Control::BluetoothInterface::setName(const QString &name)
 {
-    QVariant var(name);
-    setProperty("Name",var);
+    SOLID_CALL(Ifaces::BluetoothInterface *, d->backendObject(), setName(name));
 }
-/*
+
 void Solid::Control::BluetoothInterface::discoverDevices()
 {
     SOLID_CALL(Ifaces::BluetoothInterface *, d->backendObject(), discoverDevices());
@@ -443,14 +309,11 @@
     SOLID_CALL(Ifaces::BluetoothInterface *, d->backendObject(), removeTrust(address));
 }
 
-*/
-
 void Solid::Control::BluetoothInterfacePrivate::setBackendObject(QObject *object)
 {
     FrontendObjectPrivate::setBackendObject(object);
 
     if (object) {
-/*        
         QObject::connect(object, SIGNAL(modeChanged(Solid::Control::BluetoothInterface::Mode)),parent(), SIGNAL(modeChanged(Solid::Control::BluetoothInterface::Mode)));
         QObject::connect(object, SIGNAL(discoverableTimeoutChanged(int)),
                          parent(), SIGNAL(discoverableTimeoutChanged(int)));
@@ -480,19 +343,6 @@
                          parent(), SIGNAL(bondingCreated(const QString &)));
         QObject::connect(object, SIGNAL(bondingRemoved(const QString &)),
                          parent(), SIGNAL(bondingRemoved(const QString &)));
-*/
-        QObject::connect(object, SIGNAL(deviceCreated(const QString &)),
-                                 parent(), SIGNAL(deviceCreated(const QString &)));
-        QObject::connect(object, SIGNAL(deviceDisappeared(const QString &)),
-                                 parent(), SIGNAL(deviceDisappeared(const QString &)));
-        QObject::connect(object, SIGNAL(deviceFound(const QString &, const QMap<QString,QVariant> &)),
-                                 parent(), SIGNAL(deviceFound(const QString &, const QMap<QString,QVariant> &)));
-        QObject::connect(object, SIGNAL(deviceRemoved(const QString &)),
-                                 parent(), SIGNAL(deviceRemoved(const QString &)));
-        QObject::connect(object, SIGNAL(propertyChanged(const QString &,const QVariant &)),
-                                 parent(), SIGNAL(propertyChanged(const QString &, const QVariant &)));
-
-
 
     }
 }
diff -ur kdebase-workspace-4.2.0/libs/solid/control/bluetoothinterface.h kdebase-workspace-4.2.0-bluetooth-revert/libs/solid/control/bluetoothinterface.h
--- kdebase-workspace-4.2.0/libs/solid/control/bluetoothinterface.h	2008-12-04 09:34:54.000000000 +0100
+++ kdebase-workspace-4.2.0-bluetooth-revert/libs/solid/control/bluetoothinterface.h	2008-07-03 07:05:34.000000000 +0200
@@ -25,7 +25,6 @@
 #include <QtCore/QDateTime>
 #include <QtCore/QPair>
 #include <QtCore/QObject>
-#include <QtCore/QMap>
 
 #include "bluetoothremotedevice.h"
 #include "ifaces/bluetoothremotedevice.h"
@@ -47,7 +46,6 @@
 {
     Q_OBJECT
 
-
 public:
     /**
      * Describes the operating mode of a bluetooth interface
@@ -56,16 +54,12 @@
      * - Discoverable : The interface may be discovered by other devices and connected to
      * - Connectable : The interface may only be connected to but not discovered
      */
-    //enum Mode { Off, Discoverable, Connectable };
-
-
+    enum Mode { Off, Discoverable, Connectable };
     /**
      * Constructs an invalid bluetooth interface
      */
     BluetoothInterface();
 
-
-
     /**
      * Constructs a bluetooth interface for a given Unique Bluetooth Identifier (UBI).
      * This object will be auto deleted, DON'T delete it.
@@ -115,7 +109,7 @@
      * @param 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
      */
-    Solid::Control::BluetoothRemoteDevice* createBluetoothRemoteDevice(const QString &address);
+    BluetoothRemoteDevice *createBluetoothRemoteDevice(const QString &address);
 
     /**
      * Finds a BluetoothRemoteDevice object given its UBI.
@@ -123,7 +117,7 @@
      * @param 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.
      */
-    Solid::Control::BluetoothRemoteDevice findBluetoothRemoteDevice(const QString &address) const;
+    BluetoothRemoteDevice findBluetoothRemoteDevice(const QString &ubi) const;
 
     /**
      * Retrieves the MAC address of the bluetooth interface/adapter.
@@ -138,7 +132,7 @@
      *
      * @returns bluetooth chip version
      */
-    //QString version() const;
+    QString version() const;
 
     /**
      * Retrieves the revision of the chip of the bluetooth interface/adapter.
@@ -146,7 +140,7 @@
      *
      * @returns bluetooth chip revision
      */
-    //QString revision() const;
+    QString revision() const;
 
     /**
      * Retrieves the name of the bluetooth chip manufacturer.
@@ -154,7 +148,7 @@
      *
      * @returns manufacturer string of bluetooth interface/adapter
      */
-    //QString manufacturer() const;
+    QString manufacturer() const;
 
     /**
      * Retrieves the name of the manufacturer of the bluetooth interface,
@@ -163,7 +157,14 @@
      *
      * @returns company string of bluetooth interface/adapter
      */
-    //QString company() const;
+    QString company() const;
+
+    /**
+     * Retrieves the current mode of the bluetooth interface/adapter.
+     *
+     * @returns the current mode of bluetooth interface/adapter
+     */
+    Mode mode() const;
 
     /**
      * Retrieves the discoverable timeout of the bluetooth interface/adapter.
@@ -181,27 +182,19 @@
     bool isDiscoverable() const;
 
     /**
-     * Retrieves the current status of a discovering session for the adapter.
-     *
-     * @returns true if a discovering session is running for the adapter
-     */
-    bool isDiscovering() const;
-
-
-    /**
      * List all UBIs of connected remote bluetooth devices of this handled bluetooth
      * interface/adapter.
      *
      * @returns list UBIs of connected bluetooth remote devices
      */
-    //BluetoothRemoteDeviceList listConnections() const;
+    BluetoothRemoteDeviceList listConnections() const;
 
     /**
      * Retrieves major class of the bluetooth interface/adapter.
      * @todo enum
      * @returns current major class of the bluetooth interface/adapter
      */
-    //QString majorClass() const;
+    QString majorClass() const;
 
     /**
      * List supported minor classes of the bluetooth interface/adapter.
@@ -209,7 +202,7 @@
      *
      * @returns list of supported minor classes by bluetooth interface/adapter
      */
-    //QStringList listAvailableMinorClasses() const;
+    QStringList listAvailableMinorClasses() const;
 
     /**
      * Retrieves minor class of the bluetooth interface/adapter.
@@ -218,7 +211,7 @@
      *
      * @returns minor class of the bluetooth interface/adapter.
      */
-    //QString minorClass() const;
+    QString minorClass() const;
 
     /**
      * List services class of the bluetooth interface/adapter.
@@ -226,7 +219,7 @@
      *
      * @returns list of service classes or empty list if no services registered
      */
-    //QStringList serviceClasses() const;
+    QStringList serviceClasses() const;
 
     /**
      * Retrieves name of bluetooth interface/adapter.
@@ -241,7 +234,7 @@
      *
      * @return the name of the remote device
      */
-    //QString getRemoteName(const QString & mac);
+    QString getRemoteName(const QString & mac);
 
     /**
      * List UBIs of bonded/paired remote bluetooth devices with this bluetooth
@@ -249,14 +242,14 @@
      *
      * @returns UBIs of bonded/paired bluetooth remote devices
      */
-    //QStringList listBondings() const;
+    QStringList listBondings() const;
 
     /**
      * Periodic discovery status of this bluetooth interface/adapter.
      *
      * @returns true if periodic discovery is already active otherwise false
      */
-   // bool isPeriodicDiscoveryActive() const;
+    bool isPeriodicDiscoveryActive() const;
 
     /**
      * Name resolving status of periodic discovery routing.
@@ -264,7 +257,7 @@
      * @returns true if name got resolved while periodic discovery of this bluetooth
      * interface/adapter
      */
-    //bool isPeriodicDiscoveryNameResolvingActive() const;
+    bool isPeriodicDiscoveryNameResolvingActive() const;
 
     /**
      * List the Unique Bluetooth Identifier (UBI) of all known remote devices, 
@@ -274,7 +267,7 @@
      *
      * @returns a QStringList of UBIs of all known remote bluetooth devices
      */
-    //QStringList listRemoteDevices() const;
+    QStringList listRemoteDevices() const;
 
     /**
      * List the Unique Bluetooth Identifier (UBI) of all known remote devices since a specific
@@ -286,32 +279,24 @@
      * @param date the datestamp of the beginning of recent used devices
      * @returns a QStringList of UBIs of all known remote bluetooth devices
      */
-  //  QStringList listRecentRemoteDevices(const QDateTime &date) const;
+    QStringList listRecentRemoteDevices(const QDateTime &date) const;
 
     /**
      * Returns true if the remote bluetooth device is trusted otherwise false.
      *
      * @param mac the address of the remote device
      */
-//    bool isTrusted(const QString &);
-
-
-    QString createPairedDevice(const QString &, const QString &, const QString &) const;
-
-    QMap< QString, QVariant > getProperties() const;
-
-    BluetoothRemoteDeviceList listDevices() const;
-
-
+    bool isTrusted(const QString &);
 
 
 public Q_SLOTS:
     /**
-     * Set the discoverable state of the interface/adapter.
+     * Set mode of bluetooth interface/adapter.
+     * Valid modes, see mode()
      *
-     * @param status the discoverable state of the bluetooth interface/adapter
+     * @param mode the mode of the bluetooth interface/adapter
      */
-    void setDiscoverable(bool status);
+    void setMode(const Mode mode);
 
     /**
      * Set discoverable timeout of bluetooth interface/adapter.
@@ -325,7 +310,7 @@
      *
      * @param minor set minor class. Valid mode see listAvaliableMinorClasses()
      */
-    //void setMinorClass(const QString &minor);
+    void setMinorClass(const QString &minor);
 
     /**
      * Set name of bluetooth interface/adapter.
@@ -337,65 +322,47 @@
     /**
      * Start discovery of remote bluetooth devices with device name resolving.
      */
-    //void discoverDevices();
+    void discoverDevices();
     /**
      * Start discovery of remote bluetooth devices without device name resolving.
      */
-    //void discoverDevicesWithoutNameResolving();
+    void discoverDevicesWithoutNameResolving();
     /**
      * Cancel discovery of remote bluetooth devices.
      */
-    //void cancelDiscovery();
+    void cancelDiscovery();
 
     /**
      * Start periodic discovery of remote bluetooth devices.
      * See stopPeriodicDiscovery()
      */
-    //void startPeriodicDiscovery();
+    void startPeriodicDiscovery();
 
     /**
      * Stop periodic discovery of remote bluetooth devices.
      */
-    //void stopPeriodicDiscovery();
+    void stopPeriodicDiscovery();
 
     /**
      * Enable/Disable name resolving of remote bluetooth devices in periodic discovery.
      *
      * @param resolveName true to enable name resolving otherwise false
      */
-    //void setPeriodicDiscoveryNameResolving(bool resolveNames);
+    void setPeriodicDiscoveryNameResolving(bool resolveNames);
 
     /**
      * Marks the device as trusted.
      *
      * @param mac the address of the remote device
      */
-    //void setTrusted(const QString &);
+    void setTrusted(const QString &);
 
     /**
      * Marks the device as not trusted.
      *
      * @param mac the address of the remote device
      */
-    //void removeTrust(const QString &);
-
-    void registerAgent(const QString &,const QString &) const;
-
-    void releaseSession() const;
-
-    void removeDevice(const QString &) const;
-
-    void requestSession() const;
-
-    void setProperty(const QString &, const QVariant &) const;
-
-    void startDiscovery() const;
-
-    void stopDiscovery() const;
-
-    void unregisterAgent(const QString &) const;
-
-    void cancelDeviceCreation(const QString &) const;
+    void removeTrust(const QString &);
 
 
 Q_SIGNALS:
@@ -406,7 +373,7 @@
      *
      * @param mode the changed mode
      */
-    //void modeChanged(Solid::Control::BluetoothInterface::Mode);
+    void modeChanged(Solid::Control::BluetoothInterface::Mode);
 
     /**
      * The signal is emitted if the discoverable timeout of the bluetooth interface/adapter
@@ -414,31 +381,31 @@
      *
      * @param timeout the changed timeout in seconds
      */
-    //void discoverableTimeoutChanged(int timeout);
+    void discoverableTimeoutChanged(int timeout);
 
     /**
      * The signal is emitted if the minor class of the bluetooth interface/adapter has changed.
      *
      * @param minor the new minor class
      */
-    //void minorClassChanged(const QString &minor);
+    void minorClassChanged(const QString &minor);
 
     /**
      * The signal is emitted if the name of the bluetooth interface/adapter has changed.
      *
      * @param name the new name of the device
      */
-    //void nameChanged(const QString &name);
+    void nameChanged(const QString &name);
 
     /**
      * This signal is emitted if a discovery has started.
      */
-    //void discoveryStarted();
+    void discoveryStarted();
 
     /**
      * This signal is emitted if a discovery has completed.
      */
-    //void discoveryCompleted();
+    void discoveryCompleted();
 
     /**
      * This signal is emitted if the bluetooth interface/adapter detects a new remote bluetooth device.
@@ -449,7 +416,7 @@
      * @param deviceClass the device class of the remote device
      * @param rssi the Received Signal Strength Information (RSSI) of the remote device
      */
-    //void remoteDeviceFound(const QString &ubi, int deviceClass, int rssi);
+    void remoteDeviceFound(const QString &ubi, int deviceClass, int rssi);
 
     /**
      * This signal is emitted if the bluetooth interface/adapter detectes a bluetooth device
@@ -457,7 +424,7 @@
      *
      * @param ubi the ubi of the disappering bluetooth remote device
      */
-    //void remoteDeviceDisappeared(const QString &ubi);
+    void remoteDeviceDisappeared(const QString &ubi);
 
     /**
      * This signal is emitted if the bluetooth interface/adapter detectes a new name for a 
@@ -466,102 +433,58 @@
      * @param address the address of the bluetooth remote device
      * @param name the name of the bluetooth remote device
      */
-    //void remoteNameUpdated(const QString &address, const QString &name);
+    void remoteNameUpdated(const QString &address, const QString &name);
 
     /**
      * This signal is emitted if a bluetooth connection has been created. 
      *
      * @param address the address of the connected bluetooth remote device
      */
-    //void remoteDeviceConnected(const QString &address);
+    void remoteDeviceConnected(const QString &address);
 
     /**
      * This signal is emitted if a bluetooth connection has been terminated.
      *
      * @param address the address of the disconnected bluetooth remote device
      */
-    //void remoteDeviceDisconnected(const QString &address);
+    void remoteDeviceDisconnected(const QString &address);
 
     /**
      * This signal is emitted if a bluetooth device was set trusted.
      *
      * @param address the address of the trusted bluetooth remote device
      */
-    //void trustAdded(const QString &address);
+    void trustAdded(const QString &address);
 
     /**
      * This signal is emitted if the trust to the bluetooth device was removed. 
      *
      * @param address the address of the bluetooth remote device
      */
-    //void trustRemoved(const QString &address);
+    void trustRemoved(const QString &address);
 
     /**
      * This signal is emitted if a successful bonding has been created. 
      *
      * @param address the address of the bluetooth remote device
      */
-    //void bondingCreated(const QString &address);
+    void bondingCreated(const QString &address);
 
     /**
      * This signal is emitted if the bonding to a bluetooth device has been removed. 
      *
      * @param address the address of the bluetooth remote device
      */
-    //void bondingRemoved(const QString &address);
-/**
-     * This signal is emitted when a remote device is created.
-     *
-     * @param ubi the object path of the device on the system bus
-     */
-    void deviceCreated(const QString &ubi);
-
-    /**
-     * This signal is emitted when an inquiry session for a periodic discovery finishes and previously found
-     * devices are no longer in range or visible.
-     *
-     * @param address the address of the remote device
-     */
-    void deviceDisappeared(const QString &address);
-
-    /**
-     * 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.
-     *
-     * @param address the address of the remote device
-     * @param properties the properties of the remote device
-     */
-    void deviceFound(const QString &address, const QMap< QString, QVariant > &properties);
-
-    /**
-     * This signal is emitted when a remote device is removed from the system bus.
-     *
-     * @param ubi the object path on the system bus from the remote device
-     */
-    void deviceRemoved(const QString &ubi);
-
-    /**
-     * This signal is emitted when a property of the adapter is set to a new value.
-     *
-     * @param property the named property of the adapter
-     * @value the new value for the property
-     */
-    void propertyChanged(const QString &property, const QVariant &value);
-
-
-
+    void bondingRemoved(const QString &address);
 
 private:
     Q_PRIVATE_SLOT(d, void _k_destroyed(QObject *))
 
-    QVariant getProperty(const QString&) const;
     BluetoothInterfacePrivate * const d;
-
 };
 
 } //Control
 } //Solid
 
-
 #endif
 
diff -ur kdebase-workspace-4.2.0/libs/solid/control/bluetoothmanager.cpp kdebase-workspace-4.2.0-bluetooth-revert/libs/solid/control/bluetoothmanager.cpp
--- kdebase-workspace-4.2.0/libs/solid/control/bluetoothmanager.cpp	2008-12-04 09:34:54.000000000 +0100
+++ kdebase-workspace-4.2.0-bluetooth-revert/libs/solid/control/bluetoothmanager.cpp	2008-04-10 11:30:14.000000000 +0200
@@ -2,7 +2,6 @@
     Copyright (C) 2006 Will Stephenson <wstephenson@kde.org>
     Copyright (C) 2006 Kévin Ottens <ervin@kde.org>
     Copyright (C) 2007 Daniel Gollub <dgollub@suse.de>
-    Copyright (C) 2008 Tom Patzig <tpatzig@suse.de>
 
 
     This library is free software; you can redistribute it and/or
@@ -59,11 +58,10 @@
     void _k_interfaceAdded(const QString &ubi);
     void _k_interfaceRemoved(const QString &ubi);
     void _k_interfaceDestroyed(QObject *object);
-/*
+
     void _k_inputDeviceCreated(const QString &ubi);
     void _k_inputDeviceRemoved(const QString &ubi);
     void _k_inputDeviceDestroyed(QObject *object);
-*/
 
     mutable QMap<QString, QPair<BluetoothInterface *, Ifaces::BluetoothInterface *> > bluetoothInterfaceMap;
     mutable QMap<QString, QPair<BluetoothInputDevice *, Ifaces::BluetoothInputDevice *> > bluetoothInputDeviceMap;
@@ -95,7 +93,7 @@
     typedef QPair<BluetoothInterface *, Ifaces::BluetoothInterface *> BluetoothInterfaceIfacePair;
 
     // Delete all the devices, they are now outdated
-    foreach (const BluetoothInterfaceIfacePair &pair, d->bluetoothInterfaceMap) {
+    foreach (const BluetoothInterfaceIfacePair &pair, d->bluetoothInterfaceMap.values()) {
         delete pair.first;
         delete pair.second;
     }
@@ -121,7 +119,6 @@
     return list;
 }
 
-
 Solid::Control::BluetoothInterfaceList Solid::Control::BluetoothManager::bluetoothInterfaces() const
 {
     Ifaces::BluetoothManager *backend = qobject_cast<Ifaces::BluetoothManager *>(d->managerBackend());
@@ -132,12 +129,7 @@
         return BluetoothInterfaceList();
     }
 }
-/*
-QStringList Solid::Control::BluetoothManager::bluetoothInterfaces() const
-{
-    return_SOLID_CALL(Ifaces::BluetoothManager *, d->managerBackend(), QStringList(), bluetoothInterfaces());
-}
-*/
+
 QString Solid::Control::BluetoothManager::defaultInterface() const
 {
     return_SOLID_CALL(Ifaces::BluetoothManager *, d->managerBackend(), QString(), defaultInterface());
@@ -158,12 +150,6 @@
     }
 }
 
-QString Solid::Control::BluetoothManager::findInterface(const QString &dev) const
-{
-    return_SOLID_CALL(Ifaces::BluetoothManager *, d->managerBackend(), QString(), findInterface(dev));
-}
-
-/*
 Solid::Control::BluetoothInputDevice Solid::Control::BluetoothManager::findBluetoothInputDevice(const QString &ubi) const
 {
     Ifaces::BluetoothManager *backend = qobject_cast<Ifaces::BluetoothManager *>(d->managerBackend());
@@ -178,9 +164,7 @@
         return d->invalidInputDevice;
     }
 }
-*/
 
-/*
 Solid::Control::BluetoothInputDevice* Solid::Control::BluetoothManager::createBluetoothInputDevice(const QString &ubi)
 {
         Ifaces::BluetoothManager *backend = qobject_cast<Ifaces::BluetoothManager *>(d->managerBackend());
@@ -236,7 +220,7 @@
 {
     SOLID_CALL(Ifaces::BluetoothManager *, d->managerBackend(), removeInputDevice(ubi));
 }
-*/
+
 void Solid::Control::BluetoothManagerPrivate::_k_interfaceAdded(const QString &ubi)
 {
     QPair<BluetoothInterface *, Ifaces::BluetoothInterface *> pair = bluetoothInterfaceMap.take(ubi);
@@ -275,7 +259,6 @@
     }
 }
 
-/*
 void Solid::Control::BluetoothManagerPrivate::_k_inputDeviceCreated(const QString &ubi)
 {
     QPair<BluetoothInputDevice *, Ifaces::BluetoothInputDevice *> pair = bluetoothInputDeviceMap.take(ubi);
@@ -313,7 +296,7 @@
         delete pair.first;
     }
 }
-*/
+
 
 /***************************************************************************/
 
@@ -323,12 +306,11 @@
                      q, SLOT(_k_interfaceAdded(const QString &)));
     QObject::connect(newBackend, SIGNAL(interfaceRemoved(const QString &)),
                      q, SLOT(_k_interfaceRemoved(const QString &)));
-/*
+
     QObject::connect(newBackend, SIGNAL(inputDeviceCreated(const QString &)),
                      q, SLOT(_k_inputDeviceCreated(const QString &)));
     QObject::connect(newBackend, SIGNAL(inputDeviceRemoved(const QString &)),
                      q, SLOT(_k_inputDeviceRemoved(const QString &)));
-*/
 
 }
 
@@ -357,7 +339,6 @@
     }
 }
 
-/*
 QPair<Solid::Control::BluetoothInputDevice *, Solid::Control::Ifaces::BluetoothInputDevice *> Solid::Control::BluetoothManagerPrivate::findRegisteredBluetoothInputDevice(const QString &ubi) const
 {
 
@@ -383,7 +364,6 @@
         }
     }
 }
-*/
 
 
 
diff -ur kdebase-workspace-4.2.0/libs/solid/control/bluetoothmanager.h kdebase-workspace-4.2.0-bluetooth-revert/libs/solid/control/bluetoothmanager.h
--- kdebase-workspace-4.2.0/libs/solid/control/bluetoothmanager.h	2008-12-04 09:34:54.000000000 +0100
+++ kdebase-workspace-4.2.0-bluetooth-revert/libs/solid/control/bluetoothmanager.h	2008-06-10 13:41:04.000000000 +0200
@@ -2,7 +2,6 @@
     Copyright (C) 2006 Will Stephenson <wstephenson@kde.org>
     Copyright (C) 2006 Kevin Ottens <ervin@kde.org>
     Copyright (C) 2007 Daniel Gollub <dgollub@suse.de>
-    Copyright (C) 2008 Tom Patzig <tpatzig@suse.de>
 
 
     This library is free software; you can redistribute it and/or
@@ -70,7 +69,6 @@
      * @return the list of bluetooth interfaces available in this system
      */
     BluetoothInterfaceList bluetoothInterfaces() const;
-    //QStringList bluetoothInterfaces() const;
 
     /**
      * Retrieves the default bluetooth interface Universal Bluetooth Identifiers (UBIs)
@@ -81,15 +79,6 @@
     QString defaultInterface() const;
 
     /**
-     * Returns the UBI of the Bluetooth Interface given its name (e.g. 'hci0'),
-     * if found on the system.
-     *
-     * @return the found UBI of the named bluetooth interface
-     */
-    QString findInterface(const QString & name) const;
-
-
-    /**
      * Find a new BluetoothInterface object given its UBI.
      *
      * @param ubi the identifier of the bluetooth interface to find
@@ -104,7 +93,7 @@
      * @param ubi the identifier of the bluetooth input device to find
      * @returns a valid BlueoothInputDevice object if there's a device having the given UBI, an invalid one otherwise
      */
-  //  BluetoothInputDevice findBluetoothInputDevice(const QString  & ubi) const;
+    BluetoothInputDevice findBluetoothInputDevice(const QString  & ubi) const;
 
     /**
      * Retrieves the list of Universal Bluetooth Identifiers (UBIs) of bluetooth input devices
@@ -112,7 +101,7 @@
      *
      * @return the list of bluetooth input devices configured in this system
      */
-    //BluetoothInputDeviceList bluetoothInputDevices() const;
+    BluetoothInputDeviceList bluetoothInputDevices() const;
 
     /**
      * Instantiates a new BluetoothInputDevice object from this backend given its UBI.
@@ -120,7 +109,7 @@
      * @param ubi the identifier of the bluetooth input device instantiated
      * @returns a new BluetoothInputDevice object if there's a device having the given UBI, 0 otherwise
      */
-    //BluetoothInputDevice *createBluetoothInputDevice(const QString &ubi);
+    BluetoothInputDevice *createBluetoothInputDevice(const QString &ubi);
 
     /**
      * Setup a new bluetooth input device.
@@ -128,12 +117,12 @@
      * @param ubi the ubi of the bluetooth input device
      * @returns the job handling of the operation.
      */
-    //KJob *setupInputDevice(const QString &ubi);
+    KJob *setupInputDevice(const QString &ubi);
 
     /**
      * Gets an instance of BluetoothSecurity to handle pairing/authorization requests
      */
-    //BluetoothSecurity *security(const QString &interface = QString());
+    BluetoothSecurity *security(const QString &interface = QString());
 
 public Q_SLOTS:
     /**
@@ -141,7 +130,7 @@
      *
      * @param ubi the bluetooth input device identifier
      */
-//  void removeInputDevice(const QString  & ubi);
+    void removeInputDevice(const QString  & ubi);
 
 Q_SIGNALS:
     /**
@@ -170,14 +159,14 @@
      *
      * @param ubi the bluetooth input device identifier
      */
-//  void inputDeviceCreated(const QString  & ubi);
+    void inputDeviceCreated(const QString  & ubi);
 
     /**
      * This signal is emitted when a bluetooth input device configuration is not available anymore.
      *
      * @param ubi the bluetooth input device identifier
      */
-//  void inputDeviceRemoved(const QString  & ubi);
+    void inputDeviceRemoved(const QString  & ubi);
 
 
 private:
@@ -189,11 +178,10 @@
     Q_PRIVATE_SLOT(d, void _k_interfaceAdded(const QString &))
     Q_PRIVATE_SLOT(d, void _k_interfaceRemoved(const QString &))
     Q_PRIVATE_SLOT(d, void _k_interfaceDestroyed(QObject *))
-/*
+
     Q_PRIVATE_SLOT(d, void _k_inputDeviceCreated(const QString &))
     Q_PRIVATE_SLOT(d, void _k_inputDeviceRemoved(const QString &))
     Q_PRIVATE_SLOT(d, void _k_inputDeviceDestroyed(QObject *))
-*/
 
     BluetoothManagerPrivate * const d;
     friend class BluetoothManagerPrivate;
diff -ur kdebase-workspace-4.2.0/libs/solid/control/bluetoothremotedevice.cpp kdebase-workspace-4.2.0-bluetooth-revert/libs/solid/control/bluetoothremotedevice.cpp
--- kdebase-workspace-4.2.0/libs/solid/control/bluetoothremotedevice.cpp	2008-10-17 13:00:21.000000000 +0200
+++ kdebase-workspace-4.2.0-bluetooth-revert/libs/solid/control/bluetoothremotedevice.cpp	2008-05-21 10:33:09.000000000 +0200
@@ -1,7 +1,6 @@
 /*  This file is part of the KDE project
     Copyright (C) 2006 Will Stephenson <wstephenson@kde.org>
     Copyright (C) 2007 Daniel Gollub <dgollub@suse.de>
-    Copyright (C) 2008 Tom Patzig <tpatzig@suse.de>
 
 
     This library is free software; you can redistribute it and/or
@@ -82,39 +81,6 @@
     return_SOLID_CALL(Ifaces::BluetoothRemoteDevice *, d->backendObject(), QString(), ubi());
 }
 
-QMap<QString,QVariant> Solid::Control::BluetoothRemoteDevice::getProperties()
-{
-    Q_D(const BluetoothRemoteDevice);
-    return_SOLID_CALL(Ifaces::BluetoothRemoteDevice *, d->backendObject(), (QMap< QString,QVariant >()), getProperties());
-}
-
-QStringList Solid::Control::BluetoothRemoteDevice::listNodes()
-{
-    Q_D(const BluetoothRemoteDevice);
-    return_SOLID_CALL(Ifaces::BluetoothRemoteDevice *, d->backendObject(), QStringList(), listNodes());
-}
-
-void Solid::Control::BluetoothRemoteDevice::setProperty(const QString &name, const QVariant &value)
-{
-    Q_D(const BluetoothRemoteDevice);
-    SOLID_CALL(Ifaces::BluetoothRemoteDevice *, d->backendObject(), setProperty(name,value));
-}
-
-void Solid::Control::BluetoothRemoteDevice::cancelDiscovery()
-{
-    Q_D(const BluetoothRemoteDevice);
-    SOLID_CALL(Ifaces::BluetoothRemoteDevice *, d->backendObject(), cancelDiscovery());
-}
-
-void Solid::Control::BluetoothRemoteDevice::disconnect()
-{
-    Q_D(const BluetoothRemoteDevice);
-    SOLID_CALL(Ifaces::BluetoothRemoteDevice *, d->backendObject(), disconnect());
-}
-
-
-
-/*
 QString Solid::Control::BluetoothRemoteDevice::address() const
 {
     Q_D(const BluetoothRemoteDevice);
@@ -256,20 +222,12 @@
     Q_D(const BluetoothRemoteDevice);
     SOLID_CALL(Ifaces::BluetoothRemoteDevice *, d->backendObject(), serviceRecordAsXml(handle));
 }
-*/
-
-void Solid::Control::BluetoothRemoteDevice::discoverServices(const QString &filter)
-{
-    Q_D(const BluetoothRemoteDevice);
-    SOLID_CALL(Ifaces::BluetoothRemoteDevice *, d->backendObject(), discoverServices(filter));
-}
 
 void Solid::Control::BluetoothRemoteDevicePrivate::setBackendObject(QObject *object)
 {
     FrontendObjectPrivate::setBackendObject(object);
 
     if (object) {
-        /*
         QObject::connect(object, SIGNAL(classChanged(uint)),
                          parent(), SIGNAL(classChanged(uint)));
         QObject::connect(object, SIGNAL(nameChanged(const QString &)),
@@ -294,20 +252,6 @@
 			 parent(), SIGNAL(serviceHandlesAvailable(const QString &, const QList<uint> &)));
 	QObject::connect(object, SIGNAL(serviceRecordXmlAvailable(const QString &, const QString &)),
 			 parent(), SIGNAL(serviceRecordXmlAvailable(const QString &, const QString &)));
-        */
-
-        QObject::connect(object, SIGNAL(serviceDiscoverAvailable(const QString &, const QMap< uint,QString> &)),
-                         parent(), SIGNAL(serviceDiscoverAvailable(const QString &, const QMap< uint,QString > &)));
-        QObject::connect(object, SIGNAL(propertyChanged(const QString &, const QVariant &)),
-                         parent(), SIGNAL(propertyChanged(const QString &, const QVariant &)));
-        QObject::connect(object, SIGNAL(disconnectRequested()),
-                         parent(), SIGNAL(disconnectRequested()));
-        QObject::connect(object, SIGNAL(nodeCreated(const QString &)),
-                         parent(), SIGNAL(nodeCreated(const QString &)));
-        QObject::connect(object, SIGNAL(nodeRemoved(const QString &)),
-                         parent(), SIGNAL(nodeRemoved(const QString &)));
-
-
 	
     }
 }
diff -ur kdebase-workspace-4.2.0/libs/solid/control/bluetoothremotedevice.h kdebase-workspace-4.2.0-bluetooth-revert/libs/solid/control/bluetoothremotedevice.h
--- kdebase-workspace-4.2.0/libs/solid/control/bluetoothremotedevice.h	2008-10-17 13:00:21.000000000 +0200
+++ kdebase-workspace-4.2.0-bluetooth-revert/libs/solid/control/bluetoothremotedevice.h	2008-06-10 13:41:04.000000000 +0200
@@ -1,7 +1,6 @@
 /*  This file is part of the KDE project
     Copyright (C) 2007 Will Stephenson <wstephenson@kde.org>
     Copyright (C) 2007 Daniel Gollub <dgollub@suse.de>
-    Copyright (C) 2008 Tom Patzig <tpatzig@suse.de>
 
 
     This library is free software; you can redistribute it and/or
@@ -26,7 +25,6 @@
 #include <QtCore/QObject>
 #include <QtCore/QStringList>
 #include <QtCore/QMap>
-#include <QtCore/QVariant>
 
 #include "bluetoothmanager.h"
 #include "bluetoothinterface.h"
@@ -82,76 +80,256 @@
     bool operator==(const BluetoothRemoteDevice  & other) const;
 
     /**
-     * The UBI of the remote de device.
+     * Retrieves the Universal Bluetooth Identifier (UBI) of the remote device.
+     * This identifier is unique for each remote device and bluetooth interface in the system.
+     *
+     * @returns the Universal Bluetooth Identifier of the current remote device.
      */
     QString ubi() const;
 
     /**
-     * Retrieve all properties from the remote device.
+     * Retrieves MAC address of the bluetooth remote device.
      *
-     * @returns a hash of named properties
+     * @returns MAC address of remote device.
      */
-    QMap<QString,QVariant> getProperties();
+    QString address() const;
+
 
     /**
-     * Discover all available Services from the remote Device.
-     * When the call is finished serviceDiscoverAvailable is thrown.
+     * Retrieves true if remote device is connected.
      *
-     * @param pattern a service handle pattern to search for
+     * @returns true if remote bluetooth device is connected otherwise false.
      */
-    void discoverServices(const QString &pattern);
+    bool isConnected() const;
 
     /**
-     * List all defined Nodes.
+     * Retrieves the bluetooth version of the remote device.
+     * LMP version (+ EDR support)
      *
-     * @returns a List of ObjectPaths from all defined Nodes
+     * @returns version of bluetooth chip.
      */
-    QStringList listNodes();
+    QString version() const;
 
-public Q_SLOTS:
+    /**
+     * Retrieves the revision of the bluetooth chip of the remote device.
+     *
+     * @returns revision of bluetooth chip.
+     */
+    QString revision() const;
+
+    /**
+     * Retrieves company name based on the device address.
+     *
+     * @returns manufacturer string of bluetooth chip.
+     */
+    QString manufacturer() const;
+
+    /**
+     * Retrieves the manufacturer of the bluetooth chip of the remote device.
+     *
+     * @returns company string of the bluetooth chip.
+     */
+    QString company() const;
+
+    /**
+     * Retrieves the major class of the remote device.
+     * Example: "computer"
+     *
+     * @returns major class of remote device.
+     */
+    QString majorClass() const;
+
+    /**
+     * Retrieves the minor class of the remote device.
+     * Exampe: "laptop"
+     *
+     * @returns minor class of the remote device.
+     */
+    QString minorClass() const;
+
+    /**
+     * Retrieves a list of service classes of the remote device.
+     * Example: ["networking", "object transfer"]
+     *
+     * @returns list of service classes of the remote device.
+     */
+    QStringList serviceClasses() const;
+
+    /**
+     * Retrieves the real name of the remote device. See also alias().
+     * Example: "Daniel's mobile"
+     *
+     * @returns name of remote device.
+     */
+    QString name() const;
 
     /**
-     * Set a new Value for a named property.
+     * Retrieves alias of remote device. This is a local alias name for the remote device.
+     * If this string is empty the frontend should should use name(). This is handy if
+     * someone is using several bluetooth remote device with the same name. alias() should
+     * be preferred used by the frontend.
+     * Example: "Company mobile"
      *
-     * @param name the name of the property
-     * @param value the new value to be set
+     * @retuns local alias of remote device.
      */
-    void setProperty(const QString &name, const QVariant &value);
+    QString alias() const;
 
     /**
-     * Cancel a started service Discovery.
+     * Retrieves the date and time when the remote device has been seen.
+     * Example: "2007-03-20 22:14:00 GMT"
+     *
+     * @returns date and time when the remote device has been seen.
      */
-    void cancelDiscovery();
+    QString lastSeen() const;
 
     /**
-     * Request a disconnect from the remote device.
+     * Retrieves the date and time when the remote device has been used.
+     * Example: "2007-03-20 22:14:00 GMT"
+     *
+     * @returns date and time when the remote device has been used.
+     */
+    QString lastUsed() const;
+
+    /**
+     * Retrieves true if remote device has bonding.
+     *
+     * @returns true if remote device has bonding.
+     */
+    bool hasBonding() const;
+
+    /**
+     * Retrieves PIN code length that was used in the pairing process of remote device.
+     *
+     * @returns PIN code length of pairing.
+     */
+    int pinCodeLength() const;
+
+    /**
+     * Retrieves currently used encryption key size of remote device.
+     *
+     * @returns encryption key size.
+     */
+    int encryptionKeySize() const;
+
+    /**
+     * Create bonding ("pairing") with remote device.
+     *
+     * @returns the job handling of the operation.
+     */
+    KJob *createBonding();
+
+public Q_SLOTS:
+    /**
+     * Set alias for remote device.
+     *
+     * @param alias new alias name
+     */
+    void setAlias(const QString &alias);
+
+    /**
+     * Clear alias for remote device.
+     */
+    void clearAlias();
+
+    /**
+     * Disconnect remote device.
      */
     void disconnect();
 
+    /**
+     * Cancel bonding process of remote device.
+     */
+    void cancelBondingProcess();
+
+    /**
+     * Remove bonding bonding of remote device.
+     */
+    void removeBonding();
+    /**
+     * Obtains a list of unique identifiers to each service provided by this remote device.
+     * As this is a slow operation, this method only queues the message
+     * in the dbus and returns the list of handles using the serviceHandlesAvailable signal
+     * 
+     * NOTE: Most local adapters won't support more than one search at a time, so serialize your requests
+     * 
+     * @param filter A filter to apply to the search (look at http://wiki.bluez.org/wiki/HOWTO/DiscoveringServices#Searchpatterns)
+     */
+    void serviceHandles(const QString &filter ="") const;
+    /**
+     * Requests the service record associated with the given handle.
+     * As this is a slow operation, this method only queues the message
+     * in the dbus and returns the XML record using the serviceRecordXmlAvailable signal.
+     * 
+     * NOTE: Most local adapters won't support more than one search at a time, so serialize your requests
+     * 
+     * @param handle The handle that uniquely identifies the service record requested.
+     */
+    void serviceRecordAsXml(uint handle) const;
 Q_SIGNALS:
+    /**
+     * Class has been changed of remote device.
+     *
+     * @params deviceClass the device class of the remote device
+     */
+    void classChanged(uint deviceClass);
 
     /**
-     * Search for services is done.
+     * Name has beend changed of remote device.
      *
-     * @param status the result of the discovering.
-     * @param services the discovered Services.
+     * @params name the name of the remote device
+     */
+    void nameChanged(const QString &name);
+
+    /**
+     * Resolving of remote device name failed.
      */
-    void serviceDiscoverAvailable(const QString &status, const QMap<uint,QString> &services);
+    void nameResolvingFailed();
 
     /**
-     * A Property for the remote device has changed.
+     * Alias has been changed of remote device.
      *
-     * @param name the name of the changed property
-     * @param value the new value
+     * @params alias the alias of the remote device
+     */
+    void aliasChanged(const QString &alias);
+
+    /**
+     * Alias got cleared of remote device.
+     */
+    void aliasCleared();
+
+    /**
+     * Remote device has been connected.
      */
-    void propertyChanged(const QString &name, const QVariant &value);
+    void connected();
 
     /**
-     * Disconnect to the remote device requested.
+     * Disconnection has been requested for remote device.
      */
-    void disconnectRequested();
+    void requestDisconnection();
 
+    /**
+     * Remote device has been disconnected.
+     */
+    void disconnected();
+
+    /**
+     * Bonding with remote device has been created.
+     */
+    void bondingCreated();
 
+    /**
+     * Bonding has been removed of remote device.
+     */
+    void bondingRemoved();
+    
+    /**
+     * Search for service handles is done
+     */
+    void serviceHandlesAvailable(const QString &ubi, const QList<uint> &handles);
+    /**
+     * A new service record is available
+     */
+    void serviceRecordXmlAvailable(const QString &ubi, const QString &record);
 protected:
     BluetoothRemoteDevicePrivate *d_ptr;
 
diff -ur kdebase-workspace-4.2.0/libs/solid/control/ifaces/bluetoothinputdevice.h kdebase-workspace-4.2.0-bluetooth-revert/libs/solid/control/ifaces/bluetoothinputdevice.h
--- kdebase-workspace-4.2.0/libs/solid/control/ifaces/bluetoothinputdevice.h	2008-10-30 15:13:17.000000000 +0100
+++ kdebase-workspace-4.2.0-bluetooth-revert/libs/solid/control/ifaces/bluetoothinputdevice.h	2008-05-21 10:33:09.000000000 +0200
@@ -23,9 +23,6 @@
 #define SOLID_IFACES_BLUETOOTHINPUTDEVICE
 
 #include <QtCore/QObject>
-#include <QtCore/QMap>
-#include <QtCore/QVariant>
-
 #include "../solid_control_export.h"
 
 namespace Solid
@@ -59,34 +56,67 @@
      * @returns ubi of bluetooth input device
      */
     virtual QString ubi() const = 0;
+
     /**
-     * Retrieve all properties from the input device.
+     * Retrieves connection status of bluetooth input device.
      *
-     * @returns a hash of named properties
+     * @returns true if bluetooth input device is connected
      */
-    virtual QMap<QString,QVariant> getProperties() const = 0;
+    virtual bool isConnected() const = 0;
 
+    /**
+     * Retrieves MAC address of bluetooth input device.
+     *
+     * @returns MAC address of bluetooth input device
+     */
+    virtual QString address() const = 0;
+
+    /**
+     * Retrievies Name of bluetooth input device.
+     *
+     * @returns Name of bluetooth input device
+     */
+    virtual QString name() const = 0;
+
+    /**
+     * Retrieves Product ID of bluetooth input device.
+     *
+     * @returns Product ID of bluetooth input device
+     */
+    virtual QString productID() const = 0;
+
+    /**
+     * Retrieves Vendor ID of bluetooth input device.
+     *
+     * @returns Vendor ID of bluetooth input device
+     */
+    virtual QString vendorID() const = 0;
 
 public Q_SLOTS:
     /**
      * Connect bluetooth input device.
      */
-    virtual void connect() = 0;
+    virtual void slotConnect() = 0;
 
     /**
      * Disconnect bluetooth input device.
      */
-    virtual void disconnect() = 0;
+    virtual void slotDisconnect() = 0;
 
 Q_SIGNALS:
-     /**
-     * A Property for the input device has changed.
+    /**
+     * This signal is emitted when the bluetooth input device is connected.
      *
-     * @param name the name of the changed property
-     * @param value the new value
+     * @param ubi the bluetooth input device identifier
      */
-    virtual void propertyChanged(const QString &name, const QVariant &value) = 0;
+    virtual void connected() = 0;
 
+    /**
+     * This signal is emitted when the bluetooth input device is not available anymore.
+     *
+     * @param ubi the bluetooth input device identifier
+     */
+    virtual void disconnected() = 0;
 };
 
 } // Ifaces
diff -ur kdebase-workspace-4.2.0/libs/solid/control/ifaces/bluetoothinterface.h kdebase-workspace-4.2.0-bluetooth-revert/libs/solid/control/ifaces/bluetoothinterface.h
--- kdebase-workspace-4.2.0/libs/solid/control/ifaces/bluetoothinterface.h	2008-12-04 09:34:54.000000000 +0100
+++ kdebase-workspace-4.2.0-bluetooth-revert/libs/solid/control/ifaces/bluetoothinterface.h	2008-07-03 07:05:34.000000000 +0200
@@ -68,7 +68,7 @@
      *
      * @returns MAC address of bluetooth interface
      */
-    //virtual QString address() const = 0;
+    virtual QString address() const = 0;
 
     /**
      * Retrieves the version of the chip of the bluetooth interface/adapter.
@@ -76,7 +76,7 @@
      *
      * @returns bluetooth chip version
      */
-    //virtual QString version() const = 0;
+    virtual QString version() const = 0;
 
     /**
      * Retrieves the revision of the chip of the bluetooth interface/adapter.
@@ -84,7 +84,7 @@
      *
      * @returns bluetooth chip revision
      */
-    //virtual QString revision() const = 0;
+    virtual QString revision() const = 0;
 
     /**
      * Retrieves the name of the bluetooth chip manufacturer.
@@ -92,7 +92,7 @@
      *
      * @returns manufacturer string of bluetooth interface/adapter
      */
-    //virtual QString manufacturer() const = 0;
+    virtual QString manufacturer() const = 0;
 
     /**
      * Retrieves the name of the bluetooth chip company.
@@ -100,7 +100,7 @@
      *
      * @returns company string of bluetooth interface/adapter
      */
-    //virtual QString company() const = 0;
+    virtual QString company() const = 0;
 
 
     /**
@@ -112,7 +112,7 @@
      *
      * @returns current mode of bluetooth interface/adaoter
      */
-    //virtual Solid::Control::BluetoothInterface::Mode mode() const = 0;
+    virtual Solid::Control::BluetoothInterface::Mode mode() const = 0;
 
     /**
      * Retrieves the discoverable timeout of the bluetooth interface/adapter.
@@ -120,14 +120,14 @@
      *
      * @returns current discoverable timeout in seconds
      */
-    //virtual int discoverableTimeout() const = 0;
+    virtual int discoverableTimeout() const = 0;
 
     /**
      * Retrieves the current discoverable staut of the bluetooth interface/adapter.
      *
      * @returns current discoverable status of bluetooth interface/adapter
      */
-    //virtual bool isDiscoverable() const = 0;
+    virtual bool isDiscoverable() const = 0;
 
 
     /**
@@ -136,7 +136,7 @@
      *
      * @returns list UBIs of connected bluetooth remote devices
      */
-    //virtual QStringList listConnections() const = 0;
+    virtual QStringList listConnections() const = 0;
 
 
     /**
@@ -144,14 +144,14 @@
      *
      * @returns current major class of the bluetooth interface/adapter
      */
-    //virtual QString majorClass() const = 0;
+    virtual QString majorClass() const = 0;
 
     /**
      * List supported minor classes of the bluetooth interface/adapter.
      *
      * @returns list of supported minor classes by bluetooth interface/adapter
      */
-    //virtual QStringList listAvailableMinorClasses() const = 0;
+    virtual QStringList listAvailableMinorClasses() const = 0;
 
     /**
      * Retrievies minor class of the bluetooth interface/adapter.
@@ -159,27 +159,27 @@
      *
      * @returns minor class of the bluetooth interface/adapter.
      */
-    //virtual QString minorClass() const = 0;
+    virtual QString minorClass() const = 0;
 
     /**
      * List services class of the bluetooth interface/adapter.
      *
      * @returns list of service classes or empty list if no services registered
      */
-    //virtual QStringList serviceClasses() const = 0;
+    virtual QStringList serviceClasses() const = 0;
     /**
      * Retrieves name of bluetooth interface/adapter.
      *
      * @returns name of bluetooth interface/adapter
      */
-    //virtual QString name() const = 0;
+    virtual QString name() const = 0;
 
     /**
      * Returns the name of the remote device, given its mac address (mac).
      *
      * @return the name of the remote device
      */
-    //virtual QString getRemoteName(const QString & mac) = 0;
+    virtual QString getRemoteName(const QString & mac) = 0;
 
     /**
      * List UBIs of bonded/paired remote bluetooth devices with this bluetooth
@@ -187,14 +187,14 @@
      *
      * @returns UBIs of bonded/paired bluetooth remote devices
      */
-    //virtual QStringList listBondings() const = 0;
+    virtual QStringList listBondings() const = 0;
 
     /**
      * Periodic discovery status of this bluetooth interface/adapter.
      *
      * @returns true if periodic discovery is already active otherwise false
      */
-    //virtual bool isPeriodicDiscoveryActive() const = 0;
+    virtual bool isPeriodicDiscoveryActive() const = 0;
 
     /**
      * Name resolving status of periodic discovery routing. 
@@ -202,7 +202,7 @@
      * @returns true if name got resolved while periodic discovery of this bluetooth
      * interface/adapter
      */
-    //virtual bool isPeriodicDiscoveryNameResolvingActive() const = 0;
+    virtual bool isPeriodicDiscoveryNameResolvingActive() const = 0;
 
     /**
      * List the Universal Bluetooth Identifier (UBI) of all known remote devices, which are
@@ -212,7 +212,7 @@
      *
      * @returns a QStringList of UBIs of all known remote bluetooth devices
      */
-    //virtual QStringList listRemoteDevices() const = 0;
+    virtual QStringList listRemoteDevices() const = 0;
 
     /**
      * List the Universal Bluetooth Identifier (UBI) of all known remote devices since a specific
@@ -224,95 +224,77 @@
      * @param date the datestamp of the beginning of recent used devices
      * @returns a QStringList of UBIs of all known remote bluetooth devices
      */
-  //  virtual QStringList listRecentRemoteDevices(const QDateTime &date) const = 0;
+    virtual QStringList listRecentRemoteDevices(const QDateTime &date) const = 0;
 
     /**
      * Returns true if the remote bluetooth device is trusted otherwise false.
      *
      * @param mac the address of the remote device
      */
-//    virtual bool isTrusted(const QString &) = 0;
+    virtual bool isTrusted(const QString &) = 0;
 
-    /**
-     *
-     *
-     *
-     */
-
-
-    virtual QString createPairedDevice(const QString &, const QString &, const QString &) const = 0;
-
-    virtual QMap< QString, QVariant > getProperties() const = 0;
-
-    virtual QStringList listDevices() const = 0;
-
-    virtual QString findDevice(const QString &) const = 0;
-
-    virtual QString createDevice(const QString &) const = 0;
 
-
-
-//public Q_SLOTS:
+public Q_SLOTS:
     /**
      * Set mode of bluetooth interface/adapter.
      * Valid modes, see mode()
      *
      * @param mode the mode of the bluetooth interface/adapter
      */
-    //virtual void setMode(const Solid::Control::BluetoothInterface::Mode mode) = 0;
+    virtual void setMode(const Solid::Control::BluetoothInterface::Mode mode) = 0;
 
     /**
      * Set discoverable timeout of bluetooth interface/adapter.
      *
      * @param timeout timeout in seconds
      */
-    //virtual void setDiscoverableTimeout(int timeout) = 0;
+    virtual void setDiscoverableTimeout(int timeout) = 0;
 
     /**
      * Set minor class of bluetooth interface/adapter.
      *
      * @param minor set minor class. Valid mode see listAvaliableMinorClasses()
      */
-    //virtual void setMinorClass(const QString &minor) = 0;
+    virtual void setMinorClass(const QString &minor) = 0;
 
     /**
      * Set name of bluetooth interface/adapter.
      *
      * @param name the name of bluetooth interface/adapter
      */
-    //virtual void setName(const QString &name) = 0;
+    virtual void setName(const QString &name) = 0;
 
 
     /**
      * Start discovery of remote bluetooth devices with device name resolving.
      */
-    //virtual void discoverDevices() = 0;
+    virtual void discoverDevices() = 0;
     /**
      * Start discovery of remote bluetooth devices without device name resolving.
      */
-    //virtual void discoverDevicesWithoutNameResolving() = 0;
+    virtual void discoverDevicesWithoutNameResolving() = 0;
     /**
      * Cancel discovery of remote bluetooth devices.
      */
-    //virtual void cancelDiscovery() = 0;
+    virtual void cancelDiscovery() = 0;
 
     /**
      * Start periodic discovery of remote bluetooth devices.
      * See stopPeriodicDiscovery()
      */
-    //virtual void startPeriodicDiscovery() = 0;
+    virtual void startPeriodicDiscovery() = 0;
 
     /**
      * Stop periodic discovery of remote bluetooth devices.
      */
-    //virtual void stopPeriodicDiscovery() = 0;
+    virtual void stopPeriodicDiscovery() = 0;
 
     /**
      * Enable/Disable name resolving of remote bluetooth devices in periodic discovery.
      *
      * @param resolveName true to enable name resolving otherwise false
      */
-    //virtual void setPeriodicDiscoveryNameResolving(bool resolveNames) = 0;
+    virtual void setPeriodicDiscoveryNameResolving(bool resolveNames) = 0;
 
     /**
      * Instantiates a new BluetoothRemoteDevice object from this backend given its address.
@@ -327,32 +309,14 @@
      *
      * @param mac the address of the remote device
      */
-    //virtual void setTrusted(const QString &) = 0;
+    virtual void setTrusted(const QString &) = 0;
 
     /**
      * Marks the device as not trusted.
      *
      * @param mac the address of the remote device
      */
-    //virtual void removeTrust(const QString &) = 0;
-
-    virtual void registerAgent(const QString &,const QString &) = 0; 
-
-    virtual void releaseSession() = 0;
-
-    virtual void removeDevice(const QString &) = 0;
-
-    virtual void requestSession() = 0;
-
-    virtual void setProperty(const QString &, const QVariant &) = 0;
-
-    virtual void startDiscovery() = 0;
-
-    virtual void stopDiscovery() = 0;
-
-    virtual void unregisterAgent(const QString &) = 0;
-
-    virtual void cancelDeviceCreation(const QString &) = 0;
+    virtual void removeTrust(const QString &) = 0;
 
 
 Q_SIGNALS:
@@ -363,7 +327,7 @@
      *
      * @param mode the changed mode
      */
-    //void modeChanged(Solid::Control::BluetoothInterface::Mode);
+    void modeChanged(Solid::Control::BluetoothInterface::Mode);
 
     /**
      * The signal is emitted if the discoverable timeout of the bluetooth interface/adapter
@@ -371,31 +335,31 @@
      *
      * @param timeout the changed timeout in seconds
      */
-    //void discoverableTimeoutChanged(int timeout);
+    void discoverableTimeoutChanged(int timeout);
 
     /**
      * The signal is emitted if the minor class of the bluetooth interface/adapter has changed.
      *
      * @param minor the new minor class
      */
-    //void minorClassChanged(const QString &minor);
+    void minorClassChanged(const QString &minor);
 
     /**
      * The signal is emitted if the name of the bluetooth interface/adapter has changed.
      *
      * @param name the new name of the device
      */
-    //void nameChanged(const QString &name);
+    void nameChanged(const QString &name);
 
     /**
      * This signal is emitted if a discovery has started.
      */
-    //void discoveryStarted();
+    void discoveryStarted();
 
     /**
      * This signal is emitted if a discovery has completed.
      */
-    //void discoveryCompleted();
+    void discoveryCompleted();
 
     /**
      * This signal is emitted if the bluetooth interface/adapter detects a new remote bluetooth device.
@@ -406,7 +370,7 @@
      * @param deviceClass the device Class of the remote device
      * @param rssi the RSSI link of the remote device
      */
-    //void remoteDeviceFound(const QString &ubi, int deviceClass, int rssi);
+    void remoteDeviceFound(const QString &ubi, int deviceClass, int rssi);
 
     /**
      * This signal is emitted if the bluetooth interface/adapter detectes a bluetooth device
@@ -414,7 +378,7 @@
      *
      * @param ubi the ubi of the disappering bluetooth remote device
      */
-    //void remoteDeviceDisappeared(const QString &ubi);
+    void remoteDeviceDisappeared(const QString &ubi);
 
     /**
      * This signal is emitted if the bluetooth interface/adapter detectes a new name for a 
@@ -423,88 +387,49 @@
      * @param address the address of the bluetooth remote device
      * @param name the name of the bluetooth remote device
      */
-    //void remoteNameUpdated(const QString &address, const QString &name);
+    void remoteNameUpdated(const QString &address, const QString &name);
 
     /**
      * This signal is emitted if a bluetooth connection has been created. 
      *
      * @param address the address of the connected bluetooth remote device
      */
-    //void remoteDeviceConnected(const QString &address);
+    void remoteDeviceConnected(const QString &address);
 
     /**
      * This signal is emitted if a bluetooth connection has been terminated.
      *
      * @param address the address of the disconnected bluetooth remote device
      */
-    //void remoteDeviceDisconnected(const QString &address);
+    void remoteDeviceDisconnected(const QString &address);
 
     /**
      * This signal is emitted if a bluetooth device was set trusted.
      *
      * @param address the address of the trusted bluetooth remote device
      */
-    //void trustAdded(const QString &address);
+    void trustAdded(const QString &address);
 
     /**
      * This signal is emitted if the trust to the bluetooth device was removed. 
      *
      * @param address the address of the bluetooth remote device
      */
-    //void trustRemoved(const QString &address);
+    void trustRemoved(const QString &address);
 
     /**
      * This signal is emitted if a successful bonding has been created. 
      *
      * @param address the address of the bluetooth remote device
      */
-    //void bondingCreated(const QString &address);
+    void bondingCreated(const QString &address);
 
     /**
      * This signal is emitted if the bonding to a bluetooth device has been removed. 
      *
      * @param address the address of the bluetooth remote device
      */
-    //void bondingRemoved(const QString &address);
-
-    /**
-     * This signal is emitted when a remote device is created.
-     *
-     * @param ubi the object path of the device on the system bus
-     */
-    void deviceCreated(const QString &ubi);
-
-    /**
-     * This signal is emitted when an inquiry session for a periodic discovery finishes and previously found
-     * devices are no longer in range or visible.
-     *
-     * @param address the address of the remote device
-     */
-    void deviceDisappeared(const QString &address);
-
-    /**
-     * 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.
-     *
-     * @param address the address of the remote device
-     * @param properties the properties of the remote device
-     */
-    void deviceFound(const QString &address, const QMap< QString,QVariant > &properties);
-
-    /**
-     * This signal is emitted when a remote device is removed from the system bus.
-     *
-     * @param ubi the object path on the system bus from the remote device
-     */
-    void deviceRemoved(const QString &ubi);
-
-    /**
-     * This signal is emitted when a property of the adapter is set to a new value.
-     *
-     * @param property the named property of the adapter
-     * @value the new value for the property
-     */
-    void propertyChanged(const QString &property, const QVariant &value);
+    void bondingRemoved(const QString &address);
 
 
 };
diff -ur kdebase-workspace-4.2.0/libs/solid/control/ifaces/bluetoothmanager.h kdebase-workspace-4.2.0-bluetooth-revert/libs/solid/control/ifaces/bluetoothmanager.h
--- kdebase-workspace-4.2.0/libs/solid/control/ifaces/bluetoothmanager.h	2008-10-17 13:00:21.000000000 +0200
+++ kdebase-workspace-4.2.0-bluetooth-revert/libs/solid/control/ifaces/bluetoothmanager.h	2008-05-21 10:33:09.000000000 +0200
@@ -73,20 +73,12 @@
     virtual QString defaultInterface() const = 0;
 
     /**
-     * Returns the UBI of the Bluetooth Interface given its name (e.g. 'hci0'),
-     * if found on the system.
-     *
-     * @return the found UBI of the named bluetooth interface
-     */
-    virtual QString findInterface(const QString &name) const = 0;
-
-    /**
      * Instantiates a new BluetoothInterface object from this backend given its UBI.
      *
      * @param ubi the identifier of the bluetooth interface instantiated
      * @returns a new BluetoothInterface object if there's a device having the given UBI, 0 otherwise
      */
-     virtual QObject *createInterface(const QString &ubi) = 0;
+    virtual QObject *createInterface(const QString &ubi) = 0;
 
     /**
      * Retrieves the list of Universal Bluetooth Identifiers (UBIs) of bluetooth input devices
@@ -94,7 +86,7 @@
      *
      * @return the list of bluetooth input devices configured in this system
      */
-//  virtual QStringList bluetoothInputDevices() const = 0;
+    virtual QStringList bluetoothInputDevices() const = 0;
 
     /**
      * Instantiates a new BluetoothInputDevice object from this backend given its UBI.
@@ -102,7 +94,7 @@
      * @param ubi the identifier of the bluetooth input device instantiated
      * @returns a new BluetoothInputDevice object if there's a device having the given UBI, 0 otherwise
      */
-//  virtual QObject *createBluetoothInputDevice(const QString &ubi) = 0;
+    virtual QObject *createBluetoothInputDevice(const QString &ubi) = 0;
 
     /**
      * Setup a new bluetooth input device.
@@ -110,12 +102,12 @@
      * @param ubi the ubi of the bluetooth input device
      * @returns job handling of the operation.
      */
-//  virtual KJob *setupInputDevice(const QString &ubi) = 0;
+    virtual KJob *setupInputDevice(const QString &ubi) = 0;
     
     /**
      * Gets an instance of BluetoothSecurity to handle pairing/authorization requests
      */
-//  virtual Solid::Control::Ifaces::BluetoothSecurity* security(const QString &interface) = 0;
+    virtual Solid::Control::Ifaces::BluetoothSecurity* security(const QString &interface) = 0;
 
 public Q_SLOTS:
     /**
@@ -123,7 +115,7 @@
      *
      * @param ubi the bluetooth input device identifier
      */
-//  virtual void removeInputDevice(const QString  & ubi) = 0;
+    virtual void removeInputDevice(const QString  & ubi) = 0;
 
 Q_SIGNALS:
     /**
@@ -152,14 +144,14 @@
      *
      * @param ubi the bluetooth input device identifier
      */
-//   void inputDeviceCreated(const QString  & ubi);
+    void inputDeviceCreated(const QString  & ubi);
 
     /**
      * This signal is emitted when a bluetooth input device configuration is not available anymore.
      *
      * @param ubi the bluetooth input device identifier
      */
-//    void inputDeviceRemoved(const QString  & ubi);
+    void inputDeviceRemoved(const QString  & ubi);
 
 };
 
diff -ur kdebase-workspace-4.2.0/libs/solid/control/ifaces/bluetoothremotedevice.h kdebase-workspace-4.2.0-bluetooth-revert/libs/solid/control/ifaces/bluetoothremotedevice.h
--- kdebase-workspace-4.2.0/libs/solid/control/ifaces/bluetoothremotedevice.h	2008-10-17 13:00:21.000000000 +0200
+++ kdebase-workspace-4.2.0-bluetooth-revert/libs/solid/control/ifaces/bluetoothremotedevice.h	2008-05-21 10:33:09.000000000 +0200
@@ -52,72 +52,257 @@
      * Destructs a BluetoothRemoteDevice object.
      */
     virtual ~BluetoothRemoteDevice();
+
     /**
-     * Retrieve all properties from the remote device.
+     * Retrieves the Universal Bluetooth Identifier (UBI) of the remote device.
+     * This identifier is unique for each remote device and bluetooth interface in the system.
      *
-     * @returns a hash of named properties
+     * @returns the Universal Bluetooth Identifier of the current remote device.
      */
-    virtual QMap<QString,QVariant> getProperties() const = 0;
+    virtual QString ubi() const = 0;
+
     /**
-     * Discover all available Services from the remote Device.
-     * When the call is finished serviceDiscoverAvailable is thrown.
+     * Retrieves MAC address of the bluetooth remote device.
      *
-     * @param pattern a service handle pattern to search for
+     * @returns MAC address of remote device.
      */
-    virtual void discoverServices(const QString &pattern) const = 0;
+    virtual QString address() const = 0;
+
+
     /**
-     * List all defined Nodes.
+     * Retrieves true if remote device is connected.
      *
-     * @returns a List of ObjectPaths from all defined Nodes
+     * @returns true if remote bluetooth device is connected otherwise false.
      */
-    virtual QStringList listNodes() const = 0;
+    virtual bool isConnected() const = 0;
+
     /**
-     * The UBI of the remote device.
+     * Retrieves the bluetooth version of the remote device.
+     * LMP version (+ EDR support)
+     *
+     * @returns version of bluetooth chip.
      */
-    virtual QString ubi() const = 0;
+    virtual QString version() const = 0;
+
+    /**
+     * Retrieves the revision of the bluetooth chip of the remote device.
+     *
+     * @returns revision of bluetooth chip.
+     */
+    virtual QString revision() const = 0;
+
+    /**
+     * Retrieves company name based on the device address.
+     *
+     * @returns manufacturer string of bluetooth chip.
+     */
+    virtual QString manufacturer() const = 0;
+
+    /**
+     * Retrieves the manufacturer of the bluetooth chip of the remote device.
+     *
+     * @returns company string of the bluetooth chip.
+     */
+    virtual QString company() const = 0;
+
+    /**
+     * Retrieves the major class of the remote device.
+     * Example: "computer"
+     *
+     * @returns major class of remote device.
+     */
+    virtual QString majorClass() const = 0;
+
+    /**
+     * Retrieves the minor class of the remote device.
+     * Exampe: "laptop"
+     *
+     * @returns minor class of the remote device.
+     */
+    virtual QString minorClass() const = 0;
+
+    /**
+     * Retrieves a list of service classes of the remote device.
+     * Example: ["networking", "object transfer"]
+     *
+     * @returns list of service classes of the remote device.
+     */
+    virtual QStringList serviceClasses() const = 0;
+    /**
+     * Retrieves the real name of the remote device. See also alias().
+     * Example: "Daniel's mobile"
+     *
+     * @returns name of remote device.
+     */
+    virtual QString name() const = 0;
+
+    /**
+     * Retrieves alias of remote device. This is a local alias name for the remote device.
+     * If this string is empty the frontend should should use name(). This is handy if
+     * someone is using several bluetooth remote device with the same name. alias() should
+     * be preferred used by the frontend.
+     * Example: "Company mobile"
+     *
+     * @retuns local alias of remote device.
+     */
+    virtual QString alias() const = 0;
+
+    /**
+     * Retrieves the date and time when the remote device has been seen.
+     * Example: "2007-03-20 22:14:00 GMT"
+     *
+     * @returns date and time when the remote device has been seen.
+     */
+    virtual QString lastSeen() const = 0;
+
+    /**
+     * Retrieves the date and time when the remote device has been used.
+     * Example: "2007-03-20 22:14:00 GMT"
+     *
+     * @returns date and time when the remote device has been used.
+     */
+    virtual QString lastUsed() const = 0;
+
+    /**
+     * Retrieves true if remote device has bonding.
+     *
+     * @returns true if remote device has bonding.
+     */
+    virtual bool hasBonding() const = 0;
+
+    /**
+     * Retrieves PIN code length that was used in the pairing process of remote device.
+     *
+     * @returns PIN code length of pairing.
+     */
+    virtual int pinCodeLength() const = 0;
+
+    /**
+     * Retrieves currently used encryption key size of remote device.
+     *
+     * @returns encryption key size.
+     */
+    virtual int encryptionKeySize() const = 0;
+
+    /**
+     * Create bonding ("pairing") with remote device.
+     *
+     * @returns the job handling of the operation.
+     */
+    virtual KJob *createBonding() = 0;
 
 
 public Q_SLOTS:
     /**
-     * Set a new Value for a named property.
+     * Set alias for remote device.
      *
-     * @param name the name of the property
-     * @param value the new value to be set
+     * @param alias new alias name
      */
-    virtual void setProperty(const QString &name, const QVariant &value) = 0;
+    virtual void setAlias(const QString &alias) = 0;
+
     /**
-     * Cancel a started service Discovery.
+     * Clear alias for remote device.
      */
-    virtual void cancelDiscovery() = 0;
+    virtual void clearAlias() = 0;
+
     /**
-     * Request a disconnect from the remote device.
+     * Disconnect remote device.
      */
     virtual void disconnect() = 0;
 
+    /**
+     * Cancel bonding process of remote device.
+     */
+    virtual void cancelBondingProcess() = 0;
 
-
+    /**
+     * Remove bonding bonding of remote device.
+     */
+    virtual void removeBonding() = 0;
+    /**
+     * Obtains a list of unique identifiers to each service provided by this remote device.
+     * As this is a slow operation, this method only queues the message
+     * in the dbus and returns the list of handles using the serviceHandlesAvailable signal
+     * 
+     * NOTE: Most local adapters won't support more than one search at a time, so serialize your requests
+     * 
+     * @param filter A filter to apply to the search (look at http://wiki.bluez.org/wiki/HOWTO/DiscoveringServices#Searchpatterns)
+     */
+    virtual void serviceHandles(const QString &filter) const = 0;
+    /**
+     * Requests the service record associated with the given handle.
+     * As this is a slow operation, this method only queues the message
+     * in the dbus and returns the XML record using the serviceRecordXmlAvailable signal.
+     * 
+     * NOTE: Most local adapters won't support more than one search at a time, so serialize your requests
+     * 
+     * @param handle The handle that uniquely identifies the service record requested.
+       */
+    virtual void serviceRecordAsXml(uint handle) const = 0;
 Q_SIGNALS:
     /**
-     * Search for services is done.
+     * Class has been changed of remote device.
      *
-     * @param status the result of the discovering.
-     * @param services the discovered Services.
+     * @params deviceClass the device class of the remote device
      */
-    virtual void serviceDiscoverAvailable(const QString &status, const QMap<uint,QString> &services) = 0;
+    virtual void classChanged(uint deviceClass) = 0;
+
     /**
-     * A Property for the remote device has changed.
+     * Name has beend changed of remote device.
      *
-     * @param name the name of the changed property
-     * @param value the new value
+     * @params name the name of the remote device
      */
-    virtual void propertyChanged(const QString &name, const QVariant &value) = 0;
+    virtual void nameChanged(const QString &name) = 0;
+
+    /**
+     * Resolving of remote device name failed.
+     */
+    virtual void nameResolvingFailed() = 0;
+
+    /**
+     * Alias has been changed of remote device.
+     *
+     * @params alias the alias of the remote device
+     */
+    virtual void aliasChanged(const QString &alias) = 0;
+
+    /**
+     * Alias got cleared of remote device.
+     */
+    virtual void aliasCleared() = 0;
+
+    /**
+     * Remote device has been connected.
+     */
+    virtual void connected() = 0;
+
     /**
-     * Disconnect to the remote device requested.
+     * Disconnection has been requested for remote device.
      */
-    virtual void disconnectRequested() = 0;
+    virtual void requestDisconnection() = 0;
 
+    /**
+     * Remote device has been disconnected.
+     */
+    virtual void disconnected() = 0;
 
+    /**
+     * Bonding with remote device has been created.
+     */
+    virtual void bondingCreated() = 0;
 
+    /**
+     * Bonding has been removed of remote device.
+     */
+    virtual void bondingRemoved() = 0;
+    /**
+     * A new service record is available
+     */
+    virtual void serviceRecordXmlAvailable(const QString &ubi, const QString &record) = 0;
+    /**
+     * Search for service handles is done
+     */
+    virtual void serviceHandlesAvailable(const QString &ubi, const QList<uint> &handles) = 0;
 };
 
 } // Ifaces
diff -ur kdebase-workspace-4.2.0/libs/solid/control/ifaces/bluetoothsecurity.h kdebase-workspace-4.2.0-bluetooth-revert/libs/solid/control/ifaces/bluetoothsecurity.h
--- kdebase-workspace-4.2.0/libs/solid/control/ifaces/bluetoothsecurity.h	2008-10-23 01:03:36.000000000 +0200
+++ kdebase-workspace-4.2.0-bluetooth-revert/libs/solid/control/ifaces/bluetoothsecurity.h	2008-05-21 10:33:09.000000000 +0200
@@ -25,7 +25,7 @@
 #include "../solid_control_export.h"
 #include "../bluetoothsecurity.h" // So we know about Solid::Control::BluetoothPassKeyAgent
 
-#include <QtCore/QObject>
+#include <QObject>
 
 namespace Solid
 {
diff -ur kdebase-workspace-4.2.0/solid/bluez/bluez-bluetoothinputdevice.cpp kdebase-workspace-4.2.0-bluetooth-revert/solid/bluez/bluez-bluetoothinputdevice.cpp
--- kdebase-workspace-4.2.0/solid/bluez/bluez-bluetoothinputdevice.cpp	2008-10-30 15:13:11.000000000 +0100
+++ kdebase-workspace-4.2.0-bluetooth-revert/solid/bluez/bluez-bluetoothinputdevice.cpp	2008-04-18 09:21:51.000000000 +0200
@@ -1,7 +1,6 @@
 /*  This file is part of the KDE project
     Copyright (C) 2007 Will Stephenson <wstephenson@kde.org>
     Copyright (C) 2007 Daniel Gollub <dgollub@suse.de>
-    Copyright (C) 2008 Tom Patzig <tpatzig@suse.de>
 
 
     This library is free software; you can redistribute it and/or
@@ -26,16 +25,11 @@
 
 #include <kdebug.h>
 
-BluezBluetoothInputDevice::BluezBluetoothInputDevice(const QString &objectPath) : BluetoothInputDevice(0), m_objectPath(objectPath)
+BluezBluetoothInputDevice::BluezBluetoothInputDevice(const QString &objectPath,
+        const QString &dest) : BluetoothInputDevice(0), m_objectPath(objectPath)
 {
-    device = new QDBusInterface("org.bluez", m_objectPath,
-                                "org.bluez.Input", QDBusConnection::systemBus());
-    #define connectInputDeviceToThis(signal, slot) \
-        device->connection().connect("org.bluez", \
-            objectPath, \
-            "org.bluez.Input", \
-            signal, this, SLOT(slot))
-    connectInputDeviceToThis("PropertyChanged",slotPropertyChanged(const QString &,const QDBusVariant &));
+    device = new QDBusInterface(dest, m_objectPath,
+                                "org.bluez.input.Device", QDBusConnection::systemBus());
 
 }
 
@@ -49,25 +43,40 @@
     return m_objectPath;
 }
 
-QMap<QString,QVariant> BluezBluetoothInputDevice::getProperties() const
+QString BluezBluetoothInputDevice::address() const
 {
-    QDBusReply< QMap<QString,QVariant> > path = device->call("GetProperties");
-        if (!path.isValid())
-	    return QMap<QString,QVariant>();
+    return stringReply("GetAddress");
+}
 
-	return path.value();
+bool BluezBluetoothInputDevice::isConnected() const
+{
+    return boolReply("IsConnected");
 }
 
-void BluezBluetoothInputDevice::disconnect()
+QString BluezBluetoothInputDevice::name() const
 {
-    device->call("Disconnect");
+    return stringReply("GetName");
+}
+
+QString BluezBluetoothInputDevice::productID() const
+{
+    return stringReply("GetProductID");
+}
+
+QString BluezBluetoothInputDevice::vendorID() const
+{
+    return stringReply("GetVendorID");
 }
 
-void BluezBluetoothInputDevice::connect()
+void BluezBluetoothInputDevice::slotConnect()
 {
     device->call("Connect");
 }
 
+void BluezBluetoothInputDevice::slotDisconnect()
+{
+    device->call("Disconnect");
+}
 
 /******************************/
 
@@ -89,11 +98,4 @@
     return reply.value();
 }
 
-/******************************/
-
-void BluezBluetoothInputDevice::slotPropertyChanged(const QString & name, const QDBusVariant& value)
-{
-    emit propertyChanged(name,value.variant());
-}
-
 #include "bluez-bluetoothinputdevice.moc"
diff -ur kdebase-workspace-4.2.0/solid/bluez/bluez-bluetoothinputdevice.h kdebase-workspace-4.2.0-bluetooth-revert/solid/bluez/bluez-bluetoothinputdevice.h
--- kdebase-workspace-4.2.0/solid/bluez/bluez-bluetoothinputdevice.h	2008-10-30 15:13:11.000000000 +0100
+++ kdebase-workspace-4.2.0-bluetooth-revert/solid/bluez/bluez-bluetoothinputdevice.h	2008-04-18 09:21:51.000000000 +0200
@@ -1,7 +1,6 @@
 /*  This file is part of the KDE project
     Copyright (C) 2007 Will Stephenson <wstephenson@kde.org>
     Copyright (C) 2007 Daniel Gollub <dgollub@suse.de>
-    Copyright (C) 2008 Tom Patzig <tpatzig@suse.de>
 
 
     This library is free software; you can redistribute it and/or
@@ -24,8 +23,6 @@
 #define BLUEZ_BLUETOOTHINPUTDEVICE_H
 
 #include <kdemacros.h>
-#include <QMap>
-#include <QtDBus>
 
 #include <solid/control/ifaces/bluetoothinputdevice.h>
 
@@ -36,22 +33,22 @@
     Q_OBJECT
     Q_INTERFACES(Solid::Control::Ifaces::BluetoothInputDevice)
 public:
-    BluezBluetoothInputDevice(const QString &objectPath);
+    BluezBluetoothInputDevice(const QString &objectPath, const QString &dest);
     virtual ~BluezBluetoothInputDevice();
     QString ubi() const;
-    QMap<QString,QVariant> getProperties() const;
-
-private Q_SLOTS:
-    void slotPropertyChanged(const QString &, const QDBusVariant &);
-
+    QString address() const;
+    bool isConnected() const;
+    QString name() const;
+    QString productID() const;
+    QString vendorID() const;
 
 public Q_SLOTS:
-    void disconnect();
-    void connect();
+    void slotConnect();
+    void slotDisconnect();
 
 Q_SIGNALS:
-
-    void propertyChanged(const QString &, const QVariant &);
+    void connected();
+    void disconnected();
 
 private:
     QString m_objectPath;
diff -ur kdebase-workspace-4.2.0/solid/bluez/bluez-bluetoothinterface.cpp kdebase-workspace-4.2.0-bluetooth-revert/solid/bluez/bluez-bluetoothinterface.cpp
--- kdebase-workspace-4.2.0/solid/bluez/bluez-bluetoothinterface.cpp	2008-12-04 09:34:48.000000000 +0100
+++ kdebase-workspace-4.2.0-bluetooth-revert/solid/bluez/bluez-bluetoothinterface.cpp	2008-07-03 07:05:32.000000000 +0200
@@ -1,7 +1,6 @@
 /*  This file is part of the KDE project
     Copyright (C) 2007 Will Stephenson <wstephenson@kde.org>
     Copyright (C) 2007 Daniel Gollub <dgollub@suse.de>
-    Copyright (C) 2008 Tom Patzig <tpatzig@suse.de>
 
 
     This library is free software; you can redistribute it and/or
@@ -22,13 +21,14 @@
 
 #include "bluez-bluetoothinterface.h"
 
+#include <QtDBus>
+
 #include <solid/control/bluetoothinterface.h>
 
 #include "bluez-bluetoothremotedevice.h"
 #include <KDebug>
 
 
-
 class BluezBluetoothInterfacePrivate
 {
 public:
@@ -45,8 +45,6 @@
     QMap<QString, BluezBluetoothRemoteDevice *> devices;
 };
 
-
-
 BluezBluetoothInterface::BluezBluetoothInterface(const QString  & objectPath)
         : BluetoothInterface(0), d(new BluezBluetoothInterfacePrivate(objectPath))
 {
@@ -56,7 +54,7 @@
                                    objectPath, \
                                    "org.bluez.Adapter", \
                                    signal, this, SLOT(slot));
-/*  
+
     connectInterfaceToThis("ModeChanged", slotModeChanged(const QString &));
     connectInterfaceToThis("DiscoverableTimeoutChanged", slotDiscoverableTimeoutChanged(int));
     connectInterfaceToThis("MinorClassChanged", slotMinorClassChanged(const QString &));
@@ -72,15 +70,6 @@
     connectInterfaceToThis("TrustRemoved", slotTrustRemoved(const QString &));
     connectInterfaceToThis("BondingCreated", slotBondingCreated(const QString &));
     connectInterfaceToThis("BondingRemoved", slotBondingRemoved(const QString &));
-*/
-
-    connectInterfaceToThis("PropertyChanged", slotPropertyChanged(const QString &, const QVariant &));
-    connectInterfaceToThis("DeviceCreated", slotDeviceCreated(const QDBusObjectPath &));
-    connectInterfaceToThis("DeviceRemoved", slotDeviceRemoved(const QDBusObjectPath &));
-    connectInterfaceToThis("DeviceDisappeared", slotDeviceDisappeared(const QString &));
-    connectInterfaceToThis("DeviceFound", slotDeviceFound(const QString &, const QMap< QString,QVariant > &));
-
-
 }
 
 BluezBluetoothInterface::~BluezBluetoothInterface()
@@ -93,103 +82,6 @@
     return d->objectPath;
 }
 
-void BluezBluetoothInterface::cancelDeviceCreation(const QString &addr)
-{
-    d->iface.call("CancelDeviceCreation",addr);
-}
-
-QString BluezBluetoothInterface::createDevice(const QString &addr) const
-{
-    QDBusObjectPath path = objectReply("CreateDevice",addr);
-    return path.path();
-}
-
-QString BluezBluetoothInterface::createPairedDevice(const QString &addr, const QString &agentUBI, const QString &capab) const
-{
-    QDBusReply< QDBusObjectPath > reply;
-    reply = d->iface.call("CreatePairedDevice",addr,agentUBI,capab);
-
-    if (!reply.isValid()) {
-        return QString();
-    }
-    return reply.value().path();
-}
-
-QString BluezBluetoothInterface::findDevice(const QString &addr) const
-{
-    QDBusObjectPath path = objectReply("FindDevice",addr);
-    return path.path();
-}
-
-
-QMap<QString, QVariant> BluezBluetoothInterface::getProperties() const
-{
-    QDBusReply< QMap<QString,QVariant> > prop = d->iface.call("GetProperties");
-    if (!prop.isValid()) {
-        return QMap< QString,QVariant >();
-    }
-    return prop.value();
-}
-
-QStringList BluezBluetoothInterface::listDevices() const
-{
-    QStringList deviceList;
-
-    QDBusReply< QList<QDBusObjectPath> > devices = d->iface.call("ListDevices");
-    if(!devices.isValid()) {
-        return QStringList();
-    }
-    foreach(QDBusObjectPath path, devices.value()) {
-        deviceList.append(path.path());
-    }
-    return deviceList;
-}
-
-void BluezBluetoothInterface::registerAgent(const QString &agentUBI, const QString &capab)
-{
-    d->iface.call("RegisterAgent",agentUBI,capab);
-}
-
-void BluezBluetoothInterface::releaseSession()
-{
-    d->iface.call("ReleaseSession");
-}
-
-void BluezBluetoothInterface::removeDevice(const QString &deviceUBI )
-{
-    d->iface.call("RemoveDevice",deviceUBI);
-}
-
-void BluezBluetoothInterface::requestSession()
-{
-    d->iface.call("RequestSession");
-}
-
-void BluezBluetoothInterface::setProperty(const QString &property, const QVariant &value)
-{
-    d->iface.call("SetProperty",property, qVariantFromValue(QDBusVariant(value)));
-}
-
-
-void BluezBluetoothInterface::startDiscovery()
-{
-    d->iface.call("StartDiscovery");
-}
-
-void BluezBluetoothInterface::stopDiscovery()
-{
-    d->iface.call("StopDiscovery");
-}
-
-void BluezBluetoothInterface::unregisterAgent(const QString &agentUBI)
-{
-    d->iface.call("UnregisterAgent",agentUBI);
-}
-
-
-
-/*
-
 QString BluezBluetoothInterface::address() const
 {
     return stringReply("GetAddress");
@@ -394,12 +286,6 @@
     d->iface.call("RemoveTrust", mac);
 }
 
-*/
-
-
-
-/*
-
 void BluezBluetoothInterface::slotModeChanged(const Solid::Control::BluetoothInterface::Mode mode)
 {
     emit modeChanged(mode);
@@ -477,40 +363,6 @@
    emit bondingRemoved(address);
 }
 
-*/
-
-void BluezBluetoothInterface::slotDeviceCreated(const QDBusObjectPath &path)
-{
-    kDebug() << "device created";
-    emit deviceCreated(path.path());
-}
-
-void BluezBluetoothInterface::slotDeviceDisappeared(const QString &address)
-{
-    kDebug() << "device disappeared";
-    emit deviceDisappeared(address);
-}
-
-void BluezBluetoothInterface::slotDeviceFound(const QString &address, const QMap< QString, QVariant > &properties)
-{
-    kDebug() << "device found " << address << " " << properties["Name"];
-    emit deviceFound(address,properties);
-}
-
-void BluezBluetoothInterface::slotDeviceRemoved(const QDBusObjectPath &path)
-{
-    kDebug() << "device removed";
-    emit deviceRemoved(path.path());
-}
-
-void BluezBluetoothInterface::slotPropertyChanged(const QString & property, const QVariant &value)
-{
-    kDebug() << "Property " << property << " changed to " << value;
-    emit propertyChanged(property,value);
-}
-
-
-
 QObject *BluezBluetoothInterface::createBluetoothRemoteDevice(const QString &ubi)
 {
     BluezBluetoothRemoteDevice *bluetoothInterface;
@@ -523,8 +375,7 @@
     return bluetoothInterface;
 }
 
-
-/******************* DBus Calls *******************************/
+/*******************************/
 
 QStringList BluezBluetoothInterface::listReply(const QString &method) const
 {
@@ -568,20 +419,4 @@
     return false;
 }
 
-QDBusObjectPath BluezBluetoothInterface::objectReply(const QString &method, const QString &param) const
-{
-    QDBusReply< QDBusObjectPath > reply;
-
-    if (param.isEmpty())
-	    reply = d->iface.call(method);
-    else
-	    reply = d->iface.call(method, param);
-	    	
-    if (reply.isValid()) {
-        return reply.value();
-    }
-
-    return QDBusObjectPath();
-}
-
 #include "bluez-bluetoothinterface.moc"
diff -ur kdebase-workspace-4.2.0/solid/bluez/bluez-bluetoothinterface.h kdebase-workspace-4.2.0-bluetooth-revert/solid/bluez/bluez-bluetoothinterface.h
--- kdebase-workspace-4.2.0/solid/bluez/bluez-bluetoothinterface.h	2008-12-04 09:34:48.000000000 +0100
+++ kdebase-workspace-4.2.0-bluetooth-revert/solid/bluez/bluez-bluetoothinterface.h	2008-07-03 07:05:32.000000000 +0200
@@ -1,7 +1,6 @@
 /*  This file is part of the KDE project
     Copyright (C) 2007 Will Stephenson <wstephenson@kde.org>
     Copyright (C) 2007 Daniel Gollub <dgollub@suse.de>
-    Copyright (C) 2008 Tom Patzig <tpatzig@suse.de>
 
 
     This library is free software; you can redistribute it and/or
@@ -24,25 +23,19 @@
 #define BLUEZ_BLUETOOTHINTERFACE_H
 
 #include <kdemacros.h>
-#include <QtDBus>
-#include <QDBusVariant>
-#include <QDBusObjectPath>
 
 #include <solid/control/ifaces/bluetoothinterface.h>
 
 class BluezBluetoothInterfacePrivate;
 
-
 class KDE_EXPORT BluezBluetoothInterface : public Solid::Control::Ifaces::BluetoothInterface
 {
     Q_OBJECT
     Q_INTERFACES(Solid::Control::Ifaces::BluetoothInterface)
-    
 public:
     BluezBluetoothInterface(const QString  & objectPath);
     virtual ~BluezBluetoothInterface();
     QString ubi() const;
-/*
     QString address() const;
     QString version() const;
     QString revision() const;
@@ -65,29 +58,9 @@
     QString getRemoteName(const QString &);
     bool isTrusted(const QString &);
 
-*/    
     QObject *createBluetoothRemoteDevice(const QString &);
 
-    QString createDevice(const QString &) const;
-    QString createPairedDevice(const QString &,const QString &,const QString &) const;
-    QString findDevice(const QString &) const;
-    QMap< QString, QVariant > getProperties() const;
-    QStringList listDevices() const;
-
-
 public Q_SLOTS:
-
-    void cancelDeviceCreation(const QString &);
-    void registerAgent(const QString &,const QString &);
-    void releaseSession();
-    void removeDevice(const QString &);
-    void requestSession();
-    void setProperty(const QString &,const QVariant&);
-    void startDiscovery();
-    void stopDiscovery();
-    void unregisterAgent(const QString &);
-
-/*
     void setMode(const Solid::Control::BluetoothInterface::Mode);
     void setDiscoverableTimeout(int);
     void setMinorClass(const QString &);
@@ -116,12 +89,6 @@
     void slotTrustRemoved(const QString&);
     void slotBondingCreated(const QString&);
     void slotBondingRemoved(const QString&);
-*/    
-    void slotDeviceCreated(const QDBusObjectPath &);
-    void slotDeviceDisappeared(const QString &);
-    void slotDeviceFound(const QString &, const QMap< QString, QVariant > &);
-    void slotDeviceRemoved(const QDBusObjectPath &);
-    void slotPropertyChanged(const QString &,const QVariant &);
 
 private:
     BluezBluetoothInterfacePrivate * d;
@@ -129,9 +96,6 @@
     QStringList listReply(const QString &method) const;
     QString stringReply(const QString &method, const QString &param = "") const;
     bool boolReply(const QString &method, const QString &param = "") const;
-    QDBusObjectPath objectReply(const QString &method, const QString &param = "" ) const;
-
-
 };
 
 #endif
diff -ur kdebase-workspace-4.2.0/solid/bluez/bluez-bluetoothmanager.cpp kdebase-workspace-4.2.0-bluetooth-revert/solid/bluez/bluez-bluetoothmanager.cpp
--- kdebase-workspace-4.2.0/solid/bluez/bluez-bluetoothmanager.cpp	2008-10-17 13:00:20.000000000 +0200
+++ kdebase-workspace-4.2.0-bluetooth-revert/solid/bluez/bluez-bluetoothmanager.cpp	2008-04-18 09:21:51.000000000 +0200
@@ -1,7 +1,6 @@
 /*  This file is part of the KDE project
     Copyright (C) 2007 Will Stephenson <wstephenson@kde.org>
     Copyright (C) 2007 Daniel Gollub <dgollub@suse.de>
-    Copyright (C) 2008 Tom Patzig <tpatzig@suse.de>
 
 
     This library is free software; you can redistribute it and/or
@@ -37,14 +36,14 @@
 public:
 
 
-    BluezBluetoothManagerPrivate() : manager("org.bluez", "/", "org.bluez.Manager", QDBusConnection::systemBus())
+    BluezBluetoothManagerPrivate() : manager("org.bluez", "/org/bluez", "org.bluez.Manager", QDBusConnection::systemBus())
     {}
 
     QDBusInterface manager;
-//  QDBusInterface *inputManager;
+    QDBusInterface *inputManager;
 
     QMap<QString, BluezBluetoothInterface *> interfaces;
-//  QMap<QString, BluezBluetoothInputDevice *> inputDevices;
+    QMap<QString, BluezBluetoothInputDevice *> inputDevices;
 
 };
 
@@ -53,21 +52,19 @@
 {
 #define connectManagerToThis(signal, slot) \
     d->manager.connection().connect("org.bluez", \
-                                     "/", \
+                                     "/org/bluez", \
                                      "org.bluez.Manager", \
                                      signal, this, SLOT(slot));
-    connectManagerToThis("AdapterAdded", slotDeviceAdded(const QDBusObjectPath &));
-    connectManagerToThis("AdapterRemoved", slotDeviceRemoved(const QDBusObjectPath &));
-    connectManagerToThis("DefaultAdapterChanged", slotDefaultDeviceChanged(const QDBusObjectPath &));
+    connectManagerToThis("AdapterAdded", slotDeviceAdded(const QString &));
+    connectManagerToThis("AdapterRemoved", slotDeviceRemoved(const QString &));
+    connectManagerToThis("DefaultAdapterChanged", slotDefaultDeviceChanged(const QString &));
 
-// in bluez4 no input Manager needed
 
-/*  QDBusReply< QString > busId = d->manager.call("ActivateService", "input");
+    QDBusReply< QString > busId = d->manager.call("ActivateService", "input");
     if (busId.isValid()) {
         m_inputManagerDest = busId.value();
     }
 
-
     d->inputManager = new QDBusInterface(m_inputManagerDest, "/org/bluez/input",
                                          "org.bluez.input.Manager", QDBusConnection::systemBus());
 
@@ -79,12 +76,11 @@
 
     connectInputManagerToThis("DeviceCreated", inputDeviceCreated(const QString &));
     connectInputManagerToThis("DeviceRemoved", inputDeviceRemoved(const QString &));
-*/
 }
 
 BluezBluetoothManager::~BluezBluetoothManager()
 {
-//  delete d->inputManager;
+    delete d->inputManager;
     delete d;
 }
 
@@ -92,11 +88,11 @@
 {
     QStringList bluetoothInterfaces;
 
-    QDBusReply< QList<QDBusObjectPath> > deviceList = d->manager.call("ListAdapters");
+    QDBusReply< QStringList > deviceList = d->manager.call("ListAdapters");
     if (deviceList.isValid()) {
-        QList<QDBusObjectPath> devices = deviceList.value();
-        foreach (const QDBusObjectPath& path, devices) {
-            bluetoothInterfaces.append(path.path());
+        QStringList devices = deviceList.value();
+        foreach (QString path, devices) {
+            bluetoothInterfaces.append(path);
         }
     }
     return bluetoothInterfaces;
@@ -104,20 +100,11 @@
 
 QString BluezBluetoothManager::defaultInterface() const
 {
-    QDBusReply< QDBusObjectPath > path = d->manager.call("DefaultAdapter");
+    QDBusReply< QString > path = d->manager.call("DefaultAdapter");
     if (!path.isValid())
         return QString();
 
-    return path.value().path();
-}
-
-QString BluezBluetoothManager::findInterface(const QString &adapterName) const
-{
-    QDBusReply< QDBusObjectPath > devicePath = d->manager.call("FindAdapter",adapterName);
-    if (!devicePath.isValid())
-        return QString();
-
-    return devicePath.value().path();
+    return path.value();
 }
 
 QObject * BluezBluetoothManager::createInterface(const QString  & ubi)
@@ -132,7 +119,6 @@
     return bluetoothInterface;
 }
 
-/*
 KJob *BluezBluetoothManager::setupInputDevice(const QString &ubi)
 {
     QString address = ubi.right(17);
@@ -143,9 +129,7 @@
     return new BluezCallJob(QDBusConnection::systemBus(), m_inputManagerDest, "/org/bluez/input", "org.bluez.input.Manager",
                             "CreateDevice", params);
 }
-*/
 
-/*
 QStringList BluezBluetoothManager::bluetoothInputDevices() const
 {
     QStringList bluetoothInputDevices;
@@ -153,7 +137,7 @@
     QDBusReply< QStringList > deviceList = d->inputManager->call("ListDevices");
     if (deviceList.isValid()) {
         QStringList devices = deviceList.value();
-        foreach (const QString& path, devices) {
+        foreach (QString path, devices) {
             bluetoothInputDevices.append(path);
         }
     }
@@ -176,28 +160,23 @@
     }
     return bluetoothInputDevice;
 }
-*/
 
-void BluezBluetoothManager::slotDeviceAdded(const QDBusObjectPath &adapter)
+void BluezBluetoothManager::slotDeviceAdded(const QString &adapter)
 {
     // TODO free the adapter device...
-    kDebug() << "interfaceAdded " << adapter.path();
-    emit interfaceAdded(adapter.path());
+    emit interfaceAdded(adapter);
 }
 
-void BluezBluetoothManager::slotDeviceRemoved(const QDBusObjectPath &adapter)
+void BluezBluetoothManager::slotDeviceRemoved(const QString &adapter)
 {
-    kDebug() << "interfaceRemoved " << adapter.path();
-    emit interfaceRemoved(adapter.path());
+    emit interfaceRemoved(adapter);
 }
 
-void BluezBluetoothManager::slotDefaultDeviceChanged(const QDBusObjectPath &adapter)
+void BluezBluetoothManager::slotDefaultDeviceChanged(const QString &adapter)
 {
-    kDebug() << "defaultDeviceChanged " << adapter.path();
-    emit defaultInterfaceChanged(adapter.path());
+    emit defaultInterfaceChanged(adapter);
 }
 
-/*
 void BluezBluetoothManager::slotInputDeviceCreated(const QString &path)
 {
     emit inputDeviceCreated(path);
@@ -208,9 +187,7 @@
     // TODO free the input device...
     emit inputDeviceRemoved(path);
 }
-*/
 
-/*
 Solid::Control::Ifaces::BluetoothSecurity *BluezBluetoothManager::security(const QString &interface)
 {
     BluezBluetoothSecurity *out;
@@ -223,7 +200,7 @@
     new BluezBluetoothSecurityAuthorizationAgentAdaptor(out);
     return out;
 }
-*/
+
 #include "bluez-bluetoothmanager.moc"
 
 
diff -ur kdebase-workspace-4.2.0/solid/bluez/bluez-bluetoothmanager.h kdebase-workspace-4.2.0-bluetooth-revert/solid/bluez/bluez-bluetoothmanager.h
--- kdebase-workspace-4.2.0/solid/bluez/bluez-bluetoothmanager.h	2008-10-17 13:00:20.000000000 +0200
+++ kdebase-workspace-4.2.0-bluetooth-revert/solid/bluez/bluez-bluetoothmanager.h	2008-01-05 00:55:19.000000000 +0100
@@ -1,7 +1,6 @@
 /*  This file is part of the KDE project
     Copyright (C) 2007 Will Stephenson <wstephenson@kde.org>
     Copyright (C) 2007 Daniel Gollub <dgollub@suse.de>
-    Copyright (C) 2008 Tom Patzig <tpatzig@suse.de>
 
 
     This library is free software; you can redistribute it and/or
@@ -32,7 +31,7 @@
 
 #include <solid/control/ifaces/bluetoothmanager.h>
 
-//class BluezBluetoothSecurity;
+class BluezBluetoothSecurity;
 class BluezBluetoothManagerPrivate;
 class KDE_EXPORT BluezBluetoothManager : public Solid::Control::Ifaces::BluetoothManager
 {
@@ -43,28 +42,27 @@
     virtual ~BluezBluetoothManager();
     QStringList bluetoothInterfaces() const;
     QObject * createInterface(const QString &);
-//  QStringList bluetoothInputDevices() const;
+    QStringList bluetoothInputDevices() const;
     QString defaultInterface() const;
-    QString findInterface(const QString &) const;
 
-//  QObject * createBluetoothInputDevice(const QString &);
-//  KJob *setupInputDevice(const QString &);
-//  Solid::Control::Ifaces::BluetoothSecurity* security(const QString &interface);
+    QObject * createBluetoothInputDevice(const QString &);
+    KJob *setupInputDevice(const QString &);
+    Solid::Control::Ifaces::BluetoothSecurity* security(const QString &interface);
 public Q_SLOTS:
-//  void removeInputDevice(const QString &);
+    void removeInputDevice(const QString &);
 
 protected Q_SLOTS:
 
-    void slotDeviceAdded(const QDBusObjectPath &);
-    void slotDeviceRemoved(const QDBusObjectPath &);
-    void slotDefaultDeviceChanged(const QDBusObjectPath &);
+    void slotDeviceAdded(const QString &);
+    void slotDeviceRemoved(const QString &);
+    void slotDefaultDeviceChanged(const QString &);
 
-//  void slotInputDeviceCreated(const QString &);
-//  void slotInputDeviceRemoved(const QString &);
+    void slotInputDeviceCreated(const QString &);
+    void slotInputDeviceRemoved(const QString &);
 
 private:
     BluezBluetoothManagerPrivate * d;
-//  QString m_inputManagerDest;
+    QString m_inputManagerDest;
 };
 
 #endif
diff -ur kdebase-workspace-4.2.0/solid/bluez/bluez-bluetoothremotedevice.cpp kdebase-workspace-4.2.0-bluetooth-revert/solid/bluez/bluez-bluetoothremotedevice.cpp
--- kdebase-workspace-4.2.0/solid/bluez/bluez-bluetoothremotedevice.cpp	2008-10-17 13:00:20.000000000 +0200
+++ kdebase-workspace-4.2.0-bluetooth-revert/solid/bluez/bluez-bluetoothremotedevice.cpp	2008-04-18 09:21:51.000000000 +0200
@@ -1,7 +1,6 @@
 /*  This file is part of the KDE project
     Copyright (C) 2007 Will Stephenson <wstephenson@kde.org>
     Copyright (C) 2007 Daniel Gollub <dgollub@suse.de>
-    Copyright (C) 2008 Tom Patzig <tpatzig@suse.de>
 
 
     This library is free software; you can redistribute it and/or
@@ -38,24 +37,28 @@
 {
 
     // size("/FF:FF:FF:FF:FF:FF") == 18
-	//Q_ASSERT(objectPath.startsWith('/'));
+	Q_ASSERT(objectPath.startsWith('/'));
 	m_adapter = m_objectPath.left(objectPath.size() - 18);
 	m_address = m_objectPath.right(17);
 
 
-	device = new QDBusInterface("org.bluez", objectPath,
-				    "org.bluez.Device", QDBusConnection::systemBus());
-	#define connectDeviceToThis(signal, slot) \
+	device = new QDBusInterface("org.bluez", m_adapter,
+				    "org.bluez.Adapter", QDBusConnection::systemBus());
+	#define connectAdapterToThis(signal, slot) \
 		device->connection().connect("org.bluez", \
-			objectPath, \
-			"org.bluez.Device", \
+			m_adapter, \
+			"org.bluez.Adapter", \
 			signal, this, SLOT(slot))
-        connectDeviceToThis("PropertyChanged",slotPropertyChanged(const QString &,const QDBusVariant &));
-        connectDeviceToThis("DisconnectRequested",slotDisconnectRequested());
-        connectDeviceToThis("NodeCreated",slotNodeCreated(const QDBusObjectPath &));
-        connectDeviceToThis("NodeRemoved",slotNodeRemoved(const QDBusObjectPath &));
-
-
+	connectAdapterToThis("RemoteClassUpdated",slotClassChanged(const QString&, uint));
+	connectAdapterToThis("RemoteNameUpdated",slotNameUpdated(const QString &,const QString &));
+	connectAdapterToThis("RemoteNameFailed",slotNameResolvingFailed(const QString &));
+	connectAdapterToThis("RemoteAliasChanged",slotAliasChanged(const QString &,const QString &));
+	connectAdapterToThis("RemoteAliasCleared",slotAliasCleared(const QString &));
+	connectAdapterToThis("RemoteDeviceConnected",slotConnected(const QString &));
+	connectAdapterToThis("RemoteDeviceDisconnectRequested",slotRequestDisconnection(const QString &));
+	connectAdapterToThis("RemoteDeviceDisconnected",slotDisconnected(const QString &));
+	connectAdapterToThis("BondingCreated",slotBonded(const QString &));
+	connectAdapterToThis("BondingRemoved",slotUnbonded(const QString &));
 }
 
 BluezBluetoothRemoteDevice::~BluezBluetoothRemoteDevice()
@@ -65,60 +68,98 @@
 
 QString BluezBluetoothRemoteDevice::ubi() const
 {
-    return device->path();
+	return m_objectPath;
 }
 
-QMap<QString,QVariant> BluezBluetoothRemoteDevice::getProperties() const
+QString BluezBluetoothRemoteDevice::address() const
 {
-    QDBusReply< QMap<QString,QVariant> > path = device->call("GetProperties");
-        if (!path.isValid())
-	    return QMap<QString,QVariant>();
+	return m_address;
+}
 
-	return path.value();
+bool BluezBluetoothRemoteDevice::isConnected() const
+{
+	return boolReply("IsConnected");
 }
 
-void BluezBluetoothRemoteDevice::setProperty(const QString &name, const QVariant &value)
+QString BluezBluetoothRemoteDevice::name() const
 {
-    device->call("SetProperty",name,value);
+	return stringReply("GetRemoteName");
 }
 
-void BluezBluetoothRemoteDevice::discoverServices(const QString& pattern) const
+QString BluezBluetoothRemoteDevice::version() const
 {
-    QList<QVariant> args;
-    args << pattern;
-    device->callWithCallback("DiscoverServices",
-            args,
-            (QObject*)this,
-            SLOT(slotServiceDiscover(const QMap<uint,QString> &)),
-            SLOT(dbusErrorServiceDiscover(const QDBusError &)));
-   
+	return stringReply("GetRemoteVersion");
 }
 
-void BluezBluetoothRemoteDevice::cancelDiscovery()
+QString BluezBluetoothRemoteDevice::revision() const
 {
-    device->call("CancelDiscovery");
+	return stringReply("GetRemoteRevision");
 }
 
-void BluezBluetoothRemoteDevice::disconnect()
+QString BluezBluetoothRemoteDevice::manufacturer() const
 {
-    device->call("Disconnect");
+	return stringReply("GetRemoteManufacturer");
 }
 
-QStringList BluezBluetoothRemoteDevice::listNodes() const
+QString BluezBluetoothRemoteDevice::company() const
 {
-    QStringList list;
-    QDBusReply< QList<QDBusObjectPath> > path = device->call("ListNodes");
-        if (path.isValid()) {
-            foreach(QDBusObjectPath objectPath, path.value()) {
-                list.append(objectPath.path());
-            }
-	    return list;
-        }
+	return stringReply("GetRemoteCompany");
+}
 
-	return QStringList();
+QString BluezBluetoothRemoteDevice::majorClass() const
+{
+	return stringReply("GetRemoteMajorClass");
+}
+
+QString BluezBluetoothRemoteDevice::minorClass() const
+{
+	return stringReply("GetRemoteMinorClass");
+}
+
+QStringList BluezBluetoothRemoteDevice::serviceClasses() const
+{
+	return listReply("GetRemoteServiceClasses");
+}
+
+QString BluezBluetoothRemoteDevice::alias() const
+{
+	return stringReply("GetRemoteAlias");
+}
+
+QString BluezBluetoothRemoteDevice::lastSeen() const
+{
+	return stringReply("LastSeen");
+}
+
+QString BluezBluetoothRemoteDevice::lastUsed() const
+{
+	return stringReply("LastUsed");
+}
+
+bool BluezBluetoothRemoteDevice::hasBonding() const
+{
+
+	return boolReply("HasBonding");
+}
+
+int BluezBluetoothRemoteDevice::pinCodeLength() const
+{
+	QDBusReply< int > path = device->call("PinCodeLength", m_address);
+	if (!path.isValid())
+		return false;
+
+	return path.value();
+}
+
+int BluezBluetoothRemoteDevice::encryptionKeySize() const
+{
+	QDBusReply< int > path = device->call("EncryptionKeySize", m_address);
+	if (!path.isValid())
+		return false;
+
+	return path.value();
 }
 
-/*
 KJob *BluezBluetoothRemoteDevice::createBonding()
 {
 	QList<QVariant> params;
@@ -128,6 +169,30 @@
 				"org.bluez.Adapter", "CreateBonding", params);
 }
 
+void BluezBluetoothRemoteDevice::setAlias(const QString &alias)
+{
+	device->call("SetRemoteAlias",m_address,alias);
+}
+
+void BluezBluetoothRemoteDevice::clearAlias()
+{
+	device->call("ClearRemoteAlias", m_address);
+}
+
+void BluezBluetoothRemoteDevice::disconnect()
+{
+	device->call("DisconnectRemoteDevice", m_address);
+}
+
+void BluezBluetoothRemoteDevice::cancelBondingProcess()
+{
+	device->call("CancelBondingProcess", m_address);
+}
+
+void BluezBluetoothRemoteDevice::removeBonding()
+{
+	device->call("RemoveBonding", m_address);
+}
 
 void BluezBluetoothRemoteDevice::serviceHandles(const QString &filter) const
 {
@@ -151,18 +216,15 @@
 				 SLOT(slotServiceRecordAsXml(const QString &)),
 				 SLOT(dbusErrorRecordAsXml(const QDBusError &)));
 }
+void BluezBluetoothRemoteDevice::slotServiceHandles(const QList< uint > & handles)
+{
+	emit serviceHandlesAvailable(ubi(),handles);
+}
 
 void BluezBluetoothRemoteDevice::slotServiceRecordAsXml(const QString & record)
 {
 	emit serviceRecordXmlAvailable(ubi(),record);
 }
-*/
-void BluezBluetoothRemoteDevice::slotServiceDiscover(const QMap< uint,QString > & handles)
-{
-	emit serviceDiscoverAvailable("success",handles);
-}
-
-
 /******************************/
 
 QStringList BluezBluetoothRemoteDevice::listReply(const QString &method) const
@@ -192,31 +254,86 @@
 	return reply.value();
 }
 
-void BluezBluetoothRemoteDevice::dbusErrorServiceDiscover(const QDBusError &error)
+void BluezBluetoothRemoteDevice::dbusErrorHandles(const QDBusError &error)
 {
-	kDebug() << "Error on dbus call for DiscoverServices: " << error.message();
-	emit serviceDiscoverAvailable("failed",QMap<uint,QString>());
+	kDebug() << "Error on dbus call for handles: " << error.message();
+	emit serviceHandlesAvailable("failed",QList<uint>());
 }
 
-void BluezBluetoothRemoteDevice::slotPropertyChanged(const QString &prop, const QDBusVariant &value)
+void BluezBluetoothRemoteDevice::dbusErrorRecordAsXml(const QDBusError & error)
 {
-    emit propertyChanged(prop, value.variant());
+	kDebug() << "Error on dbus call for record as xml: " << error.message();
+	emit serviceRecordXmlAvailable("failed","");
 }
 
-void BluezBluetoothRemoteDevice::slotDisconnectRequested()
+void BluezBluetoothRemoteDevice::slotClassChanged(const QString & address, uint newClass)
 {
-    emit disconnectRequested();
+	if (address == this->address()) {
+		emit classChanged(newClass);
+	}
 }
 
-void BluezBluetoothRemoteDevice::slotNodeCreated(const QDBusObjectPath &path)
+void BluezBluetoothRemoteDevice::slotNameResolvingFailed(const QString & address)
 {
-    emit nodeCreated(path.path());
+	if (address == this->address()) {
+		emit nameResolvingFailed();
+	}
 }
 
-void BluezBluetoothRemoteDevice::slotNodeRemoved(const QDBusObjectPath &path)
+void BluezBluetoothRemoteDevice::slotNameUpdated(const QString & address, const QString & newName)
 {
-    emit nodeRemoved(path.path());
+	if (address == this->address()) {
+		emit nameChanged(newName);
+	}
 }
 
+void BluezBluetoothRemoteDevice::slotAliasChanged(const QString & address, const QString & newAlias)
+{
+	if (address == this->address()) {
+		emit aliasChanged(newAlias);
+	}
+}
+
+void BluezBluetoothRemoteDevice::slotAliasCleared(const QString & address)
+{
+	if (address == this->address()) {
+		emit aliasCleared();
+	}
+}
+
+void BluezBluetoothRemoteDevice::slotConnected(const QString & address)
+{
+	if (address == this->address()) {
+		emit connected();
+	}
+}
+
+void BluezBluetoothRemoteDevice::slotRequestDisconnection(const QString & address)
+{
+	if (address == this->address()) {
+		emit requestDisconnection();
+	}
+}
+
+void BluezBluetoothRemoteDevice::slotDisconnected(const QString & address)
+{
+	if (address == this->address()) {
+		emit disconnected();
+	}
+}
+
+void BluezBluetoothRemoteDevice::slotBonded(const QString & address)
+{
+	if (address == this->address()) {
+		emit bondingCreated();
+	}
+}
+
+void BluezBluetoothRemoteDevice::slotUnbonded(const QString & address)
+{
+	if (address == this->address()) {
+		emit bondingRemoved();
+	}
+}
 
 #include "bluez-bluetoothremotedevice.moc"
diff -ur kdebase-workspace-4.2.0/solid/bluez/bluez-bluetoothremotedevice.h kdebase-workspace-4.2.0-bluetooth-revert/solid/bluez/bluez-bluetoothremotedevice.h
--- kdebase-workspace-4.2.0/solid/bluez/bluez-bluetoothremotedevice.h	2008-10-17 13:00:20.000000000 +0200
+++ kdebase-workspace-4.2.0-bluetooth-revert/solid/bluez/bluez-bluetoothremotedevice.h	2008-01-05 00:55:19.000000000 +0100
@@ -1,7 +1,6 @@
 /*  This file is part of the KDE project
     Copyright (C) 2007 Will Stephenson <wstephenson@kde.org>
     Copyright (C) 2007 Daniel Gollub <dgollub@suse.de>
-    Copyright (C) 2008 Tom Patzig <tpatzig@suse.de>
 
 
     This library is free software; you can redistribute it and/or
@@ -36,35 +35,63 @@
 public:
     BluezBluetoothRemoteDevice(const QString &objectPath);
     virtual ~BluezBluetoothRemoteDevice();
-
     QString ubi() const;
-    QMap<QString,QVariant> getProperties() const;
-    void discoverServices(const QString &pattern) const;
-    QStringList listNodes() const;
+    QString address() const;
+    bool isConnected() const;
+    QString version() const;
+    QString revision() const;
+    QString manufacturer() const;
+    QString company() const;
+    QString majorClass() const;
+    QString minorClass() const;
+    QStringList serviceClasses() const;
+    QString name() const;
+    QString alias() const;
+    QString lastSeen() const;
+    QString lastUsed() const;
+    bool hasBonding() const;
+    int pinCodeLength() const;
+    int encryptionKeySize() const;
 
+    KJob *createBonding();
 private Q_SLOTS:
-
-    void slotPropertyChanged(const QString &, const QDBusVariant &);
-    void slotDisconnectRequested();
-    void slotNodeCreated(const QDBusObjectPath &); 
-    void slotNodeRemoved(const QDBusObjectPath &);
-
-    void slotServiceDiscover(const QMap<uint,QString> &handles);
-    void dbusErrorServiceDiscover(const QDBusError &error);
+    void slotClassChanged(const QString &address, uint newClass);
+    void slotNameUpdated(const QString &address,const QString &newName);
+    void slotNameResolvingFailed(const QString &address);
+    void slotAliasChanged(const QString &address,const QString &newAlias);
+    void slotAliasCleared(const QString &address);
+    void slotConnected(const QString &address);
+    void slotRequestDisconnection(const QString &address);
+    void slotDisconnected(const QString &address);
+    void slotBonded(const QString &address);
+    void slotUnbonded(const QString &address);
+    
+    void slotServiceHandles(const QList<uint> &handles);
+    void dbusErrorHandles(const QDBusError &error);
+    void slotServiceRecordAsXml(const QString &record);
+    void dbusErrorRecordAsXml(const QDBusError &error);
 
 public Q_SLOTS:
-
-    void setProperty(const QString &, const QVariant &);
-    void cancelDiscovery();
+    void setAlias(const QString &alias);
+    void clearAlias();
     void disconnect();
-
+    void cancelBondingProcess();
+    void removeBonding();
+    void serviceHandles(const QString &filter ="") const;
+    void serviceRecordAsXml(uint handle) const;
 Q_SIGNALS:
-
-    void serviceDiscoverAvailable(const QString &state, const QMap<uint,QString> &handles);
-    void propertyChanged(const QString &, const QVariant &);
-    void disconnectRequested();
-    void nodeCreated(const QString &);
-    void nodeRemoved(const QString &);
+    void classChanged(uint deviceClass);
+    void nameChanged(const QString &name);
+    void nameResolvingFailed();
+    void aliasChanged(const QString &alias);
+    void aliasCleared();
+    void connected();
+    void requestDisconnection();
+    void disconnected();
+    void bondingCreated();
+    void bondingRemoved();
+    void serviceRecordXmlAvailable(const QString &ubi, const QString &record);
+    void serviceHandlesAvailable(const QString &ubi, const QList<uint> &handles);
 
 private:
     QString m_objectPath;
diff -ur kdebase-workspace-4.2.0/solid/bluez/tests/blueztest.cpp kdebase-workspace-4.2.0-bluetooth-revert/solid/bluez/tests/blueztest.cpp
--- kdebase-workspace-4.2.0/solid/bluez/tests/blueztest.cpp	2008-10-17 13:00:20.000000000 +0200
+++ kdebase-workspace-4.2.0-bluetooth-revert/solid/bluez/tests/blueztest.cpp	2008-01-05 00:55:19.000000000 +0100
@@ -4,7 +4,7 @@
 
 #include "bluez-bluetoothmanager.h"
 #include "bluez-bluetoothinterface.h"
-//#include "bluez-bluetoothremotedevice.h"
+#include "bluez-bluetoothremotedevice.h"
 
 int main(int argc, char **argv)
 {
@@ -14,23 +14,14 @@
 
     kDebug() << "Interfaces: " << mgr.bluetoothInterfaces();
     kDebug() << "Default Interface: " << mgr.defaultInterface();
-    kDebug() << "Finding Interface hci0: " << mgr.findInterface("hci0");
 
-
-//  kDebug() << "Bluetooth Input Devices: " << mgr.bluetoothInputDevices();
+    kDebug() << "Bluetooth Input Devices: " << mgr.bluetoothInputDevices();
 
     BluezBluetoothInterface iface(mgr.defaultInterface());
 
-    iface.setProperty("Name","testNAME");
-
-    QMap<QString, QVariant> props =  iface.getProperties();
-
-    foreach(QString key, props.keys()) {
-        kDebug() << "Interface Property: " << key << " : " << props[key];
-    }
-
+//    iface.discoverDevices();
 
-    iface.startDiscovery();
+    iface.startPeriodicDiscovery();
 
 #if 0
     BluezBluetoothRemoteDevice remote("/org/bluez/hci0/00:16:BC:15:A3:FF");
diff -ur kdebase-workspace-4.2.0/solid/solidshell/solid-bluetooth.cpp kdebase-workspace-4.2.0-bluetooth-revert/solid/solidshell/solid-bluetooth.cpp
--- kdebase-workspace-4.2.0/solid/solidshell/solid-bluetooth.cpp	2008-12-04 09:34:48.000000000 +0100
+++ kdebase-workspace-4.2.0-bluetooth-revert/solid/solidshell/solid-bluetooth.cpp	2008-04-02 14:18:23.000000000 +0200
@@ -70,8 +70,8 @@
 
         QStringList list = value.toStringList();
 
-        QStringList::ConstIterator it = list.constBegin();
-        QStringList::ConstIterator end = list.constEnd();
+        QStringList::ConstIterator it = list.begin();
+        QStringList::ConstIterator end = list.end();
 
         for (; it!=end; ++it)
         {
@@ -149,7 +149,7 @@
 
 std::ostream &operator<<(std::ostream &out, const QMap<QString,QVariant> &properties)
 {
-    foreach (const QString& key, properties.keys())
+    foreach (QString key, properties.keys())
     {
         out << "  " << key << " = " << properties[key] << endl;
     }
@@ -205,17 +205,6 @@
       cout << "  solid-bluetooth defaultadapter" << endl;
       cout << i18n("             # List bluetooth default adapter/interface\n") << endl;
 
-      cout << "  solid-bluetooth createdevice (interface 'ubi') 'remote-mac'" << endl;
-      cout << i18n("             # Request to create a remote bluetooth device on the bus\n") << endl;
-
-      cout << "  solid-bluetooth removedevice (interface 'ubi') 'remote-mac'" << endl;
-      cout << i18n("             # Request to remove the remote bluetooth device from the bus\n") << endl;
-
-      cout << "  solid-bluetooth getproperties (interface 'ubi') " << endl;
-      cout << i18n("             # Request the properties from the bluetooth adapter\n") << endl;
-
-
-/*
       cout << "  solid-bluetooth getremotename (interface 'ubi') 'remote-mac'" << endl;
       cout << i18n("             # Query the name from the remote device 'remote-mac' with 'ubi'\n") << endl;
 
@@ -242,7 +231,7 @@
       cout << i18n("             # Create bonding (pairing) with bluetooth remote device.\n"
                     "             # Remove bonding of bluetooth remote device.\n"
                     "             # Check for bonding of bluetooth remote device.\n") << endl;
-*/
+
       return 0;
   }
 
@@ -263,35 +252,11 @@
     if (command == "listadapters")
     {
         return shell.bluetoothListAdapters();
-    } 
+    }
     else if (command == "defaultadapter")
     {
         return shell.bluetoothDefaultAdapter();
     }
-    else if (command == "createdevice")
-    {
-        checkArgumentCount(3, 3);
-    	QString adapterUbi(args->arg(1));
-    	QString mac(args->arg(2));		
-    	return shell.bluetoothCreateDevice(adapterUbi, mac);
-    }
-    else if (command == "removedevice")
-    {
-        checkArgumentCount(3, 3);
-    	QString adapterUbi(args->arg(1));
-    	QString remoteUbi(args->arg(2));		
-    	return shell.bluetoothRemoveDevice(adapterUbi, remoteUbi);
-    }
-    else if (command == "getproperties")
-    {
-        checkArgumentCount(2, 2);
-        QString ubi (args->arg(1));
-        return shell.bluetoothGetProperties(ubi);
-    }
-
-
-
-#if 0    
     else if (command == "getremotename")
     {
         checkArgumentCount(3, 3);
@@ -401,7 +366,6 @@
         }
 
     }
-#endif    
     else
     {
         cerr << i18n("Syntax Error: Unknown command '%1'" , command) << endl;
@@ -414,7 +378,9 @@
 {
     Solid::Control::BluetoothManager &manager = Solid::Control::BluetoothManager::self();
 
-    foreach (Solid::Control::BluetoothInterface device, manager.bluetoothInterfaces())
+    const Solid::Control::BluetoothInterfaceList all = manager.bluetoothInterfaces();
+
+    foreach (const Solid::Control::BluetoothInterface device, all)
     {
         cout << "UBI = '" << device.ubi() << "'" << endl;
     }
@@ -430,36 +396,6 @@
     return true;
 }
 
-bool SolidBluetooth::bluetoothCreateDevice(const QString &adapterUbi, const QString &/*mac*/)
-{
-    Solid::Control::BluetoothManager &manager = Solid::Control::BluetoothManager::self();
-    Solid::Control::BluetoothInterface adapter = manager.findBluetoothInterface(adapterUbi);
-//    QString remoteDeviceUBI = adapter.createDevice(mac);
-//    cout << "Remote Device UBI: " << remoteDeviceUBI << endl;
-    return true;
-}
-
-bool SolidBluetooth::bluetoothRemoveDevice(const QString &adapterUbi, const QString &/*remoteDeviceUbi*/)
-{
-    Solid::Control::BluetoothManager &manager = Solid::Control::BluetoothManager::self();
-    Solid::Control::BluetoothInterface adapter = manager.findBluetoothInterface(adapterUbi);
-//    adapter.removeDevice(remoteDeviceUbi);
-    return true;
-}
-
-bool SolidBluetooth::bluetoothGetProperties(const QString &adapterUbi)
-{
-    Solid::Control::BluetoothManager &manager = Solid::Control::BluetoothManager::self();
-    Solid::Control::BluetoothInterface adapter = manager.findBluetoothInterface(adapterUbi);
-    QMap<QString,QVariant> props = adapter.getProperties();
-    foreach (QString valName, props.keys()) {
-        cout << valName << ": " << props[valName] << endl;
-    }
-    return true;
-}
-
-
-#if 0
 bool SolidBluetooth::bluetoothGetRemoteName(const QString &adapterUbi, const QString &mac)
 {
     Solid::Control::BluetoothManager &manager = Solid::Control::BluetoothManager::self();
@@ -749,6 +685,5 @@
     }
     m_loop.exit();
 }
-#endif
 
 #include "solid-bluetooth.moc"
diff -ur kdebase-workspace-4.2.0/solid/solidshell/solid-bluetooth.h kdebase-workspace-4.2.0-bluetooth-revert/solid/solidshell/solid-bluetooth.h
--- kdebase-workspace-4.2.0/solid/solidshell/solid-bluetooth.h	2008-10-17 13:00:20.000000000 +0200
+++ kdebase-workspace-4.2.0-bluetooth-revert/solid/solidshell/solid-bluetooth.h	2008-04-02 14:18:23.000000000 +0200
@@ -44,10 +44,6 @@
 
     bool bluetoothListAdapters();
     bool bluetoothDefaultAdapter();
-    bool bluetoothCreateDevice(const QString &adapterUbi, const QString &mac);
-    bool bluetoothRemoveDevice(const QString &adapterUbi, const QString &mac);
-    bool bluetoothGetProperties(const QString &adapterUbi);
-#if 0    
     bool bluetoothGetRemoteName(const QString &adapterUbi, const QString &mac);
     bool bluetoothAdapterAddress(const QString &ubi);
     bool bluetoothAdapterName(const QString &ubi);
@@ -67,7 +63,6 @@
     bool bluetoothRemoteCreateBonding(const QString &adapterUbi, const QString &deviceUbi);
     bool bluetoothRemoteRemoveBonding(const QString &adapterUbi, const QString &deviceUbi);
     bool bluetoothRemoteHasBonding(const QString &adapterUbi, const QString &deviceUbi);
-#endif
 
 private:
     void connectJob(KJob *job);
@@ -76,14 +71,12 @@
     int m_error;
     QString m_errorString;
 private slots:
-#if 0
     void slotStorageResult(Solid::ErrorType error, const QVariant &errorData);
     void slotResult(KJob *job);
     void slotPercent(KJob *job, unsigned long percent);
     void slotInfoMessage(KJob *job, const QString &message);
     void slotBluetoothDeviceFound(const QString &ubi, int deviceClass, int rssi);
     void slotBluetoothDiscoveryCompleted();
-#endif    
 };