1 /* This file is part of the KDE project
2 Copyright (C) 2007 Will Stephenson <wstephenson@kde.org>
3 Copyright (C) 2007 Daniel Gollub <dgollub@suse.de>
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License version 2 as published by the Free Software Foundation.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
22 #ifndef SOLID_IFACES_BLUETOOTHREMOTEDEVICE
23 #define SOLID_IFACES_BLUETOOTHREMOTEDEVICE
25 #include <QtCore/QObject>
26 #include <QtCore/QStringList>
27 #include "../solid_control_export.h"
38 * This interface represents a remote bluetooth device which we may be connected to.
40 class SOLIDCONTROLIFACES_EXPORT BluetoothRemoteDevice
: public QObject
45 * Create a BluetoothRemoteDevice.
47 * @param parent the parent object
49 BluetoothRemoteDevice(QObject
*parent
= 0);
52 * Destructs a BluetoothRemoteDevice object.
54 virtual ~BluetoothRemoteDevice();
56 * Retrieve all properties from the remote device.
58 * @returns a hash of named properties
60 virtual QMap
<QString
,QVariant
> getProperties() const = 0;
62 * Discover all available Services from the remote Device.
63 * When the call is finished serviceDiscoverAvailable is thrown.
65 * @param pattern a service handle pattern to search for
67 virtual void discoverServices(const QString
&pattern
) const = 0;
69 * List all defined Nodes.
71 * @returns a List of ObjectPaths from all defined Nodes
73 virtual QStringList
listNodes() const = 0;
75 * The UBI of the remote device.
77 virtual QString
ubi() const = 0;
82 * Set a new Value for a named property.
84 * @param name the name of the property
85 * @param value the new value to be set
87 virtual void setProperty(const QString
&name
, const QVariant
&value
) = 0;
89 * Cancel a started service Discovery.
91 virtual void cancelDiscovery() = 0;
93 * Request a disconnect from the remote device.
95 virtual void disconnect() = 0;
101 * Search for services is done.
103 * @param status the result of the discovering.
104 * @param services the discovered Services.
106 virtual void serviceDiscoverAvailable(const QString
&status
, const QMap
<uint
,QString
> &services
) = 0;
108 * A Property for the remote device has changed.
110 * @param name the name of the changed property
111 * @param value the new value
113 virtual void propertyChanged(const QString
&name
, const QVariant
&value
) = 0;
115 * Disconnect to the remote device requested.
117 virtual void disconnectRequested() = 0;
129 Q_DECLARE_INTERFACE(Solid::Control::Ifaces::BluetoothRemoteDevice
, "org.kde.Solid.Control.Ifaces.BluetoothRemoteDevice/0.1")