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>
4 Copyright (C) 2008 Tom Patzig <tpatzig@suse.de>
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public
9 License version 2 as published by the Free Software Foundation.
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
23 #ifndef SOLID_CONTROL_BLUETOOTHINPUTDEVICE_H
24 #define SOLID_CONTROL_BLUETOOTHINPUTDEVICE_H
26 #include <QtCore/QObject>
27 #include <QtCore/QMap>
28 #include <QtCore/QVariant>
30 #include "solid_control_export.h"
36 class BluetoothInputDevicePrivate
;
39 * Represents a bluetooth remote device as seen by the bluetoothing subsystem.
41 class SOLIDCONTROL_EXPORT BluetoothInputDevice
: public QObject
47 * Creates a new BluetoothInputDevice object.
49 * @param backendObject the bluetooth remote device object provided by the backend
51 BluetoothInputDevice(QObject
*backendObject
= 0);
54 * Constructs a copy of a bluetooth remote device.
56 * @param device the bluetooth remote device to copy
58 BluetoothInputDevice(const BluetoothInputDevice
&device
);
61 * Destroys the device.
63 ~BluetoothInputDevice();
66 * Assigns a bluetooth remote device to this bluetooth remote device and returns a reference to it.
68 * @param device the bluetooth remote device to assign
69 * @return a reference to the bluetooth remote device
71 BluetoothInputDevice
&operator=(const BluetoothInputDevice
&device
);
74 * Retrieves the Universal Network Identifier (UBI) of the BluetoothInputDevice.
75 * This identifier is ubique for each bluetooth and bluetooth remote device in the system.
77 * @returns the Universal Network Identifier of the current bluetooth remote device
81 * Retrieve all properties from the input device.
83 * @returns a hash of named properties
85 QMap
<QString
,QVariant
> getProperties() const;
91 * Connect bluetooth input device.
96 * Disconnect bluetooth input device.
103 * A Property for the input device has changed.
105 * @param name the name of the changed property
106 * @param value the new value
108 void propertyChanged(const QString
&name
, const QVariant
&value
);
112 Q_PRIVATE_SLOT(d
, void _k_destroyed(QObject
*))
114 BluetoothInputDevicePrivate
* const d
;
121 //Q_DECLARE_OPERATORS_FOR_FLAGS(Solid::Control::BluetoothInputDevice::Capabilities)