~ubuntu-branches/ubuntu/gutsy/kdebase-workspace/gutsy-backports

« back to all changes in this revision

Viewing changes to solid/bluez/bluez-bluetoothinterface.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2007-09-05 20:45:14 UTC
  • Revision ID: james.westby@ubuntu.com-20070905204514-632hhspl0nvrc84i
Tags: upstream-3.93.0
ImportĀ upstreamĀ versionĀ 3.93.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
 
5
 
 
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.
 
9
 
 
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.
 
14
 
 
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.
 
19
 
 
20
*/
 
21
 
 
22
#ifndef BLUEZ_BLUETOOTHINTERFACE_H
 
23
#define BLUEZ_BLUETOOTHINTERFACE_H
 
24
 
 
25
#include <kdemacros.h>
 
26
 
 
27
#include <solid/control/ifaces/bluetoothinterface.h>
 
28
 
 
29
class BluezBluetoothInterfacePrivate;
 
30
 
 
31
class KDE_EXPORT BluezBluetoothInterface : public Solid::Control::Ifaces::BluetoothInterface
 
32
{
 
33
    Q_OBJECT
 
34
    Q_INTERFACES(Solid::Control::Ifaces::BluetoothInterface)
 
35
public:
 
36
    BluezBluetoothInterface(const QString  & objectPath);
 
37
    virtual ~BluezBluetoothInterface();
 
38
    QString ubi() const;
 
39
    QString address() const;
 
40
    QString version() const;
 
41
    QString revision() const;
 
42
    QString manufacturer() const;
 
43
    QString company() const;
 
44
    Solid::Control::BluetoothInterface::Mode mode() const;
 
45
    int discoverableTimeout() const;
 
46
    bool isDiscoverable() const;
 
47
    QStringList listConnections() const;
 
48
    QString majorClass() const;
 
49
    QStringList listAvailableMinorClasses() const;
 
50
    QString minorClass() const;
 
51
    QStringList serviceClasses() const;
 
52
    QString name() const;
 
53
    QStringList listBondings() const;
 
54
    bool isPeriodicDiscoveryActive() const;
 
55
    bool isPeriodicDiscoveryNameResolvingActive() const;
 
56
    QStringList listRemoteDevices() const;
 
57
    QStringList listRecentRemoteDevices(const QDateTime &) const;
 
58
 
 
59
    QObject *createBluetoothRemoteDevice(const QString &);
 
60
 
 
61
public Q_SLOTS:
 
62
    void setMode(const Solid::Control::BluetoothInterface::Mode);
 
63
    void setDiscoverableTimeout(int);
 
64
    void setMinorClass(const QString &);
 
65
    void setName(const QString &);
 
66
    void discoverDevices();
 
67
    void discoverDevicesWithoutNameResolving();
 
68
    void cancelDiscovery();
 
69
    void startPeriodicDiscovery();
 
70
    void stopPeriodicDiscovery();
 
71
    void setPeriodicDiscoveryNameResolving(bool);
 
72
 
 
73
    void slotModeChanged(const Solid::Control::BluetoothInterface::Mode mode);
 
74
    void slotDiscoverableTimeoutChanged(int timeout);
 
75
    void slotMinorClassChanged(const QString &minor);
 
76
    void slotNameChanged(const QString &name);
 
77
    void slotDiscoveryStarted();
 
78
    void slotDiscoveryCompleted();
 
79
    void slotRemoteDeviceFound(const QString &ubi, uint deviceClass, short rssi);
 
80
    void slotRemoteDeviceDisappeared(const QString &ubi);
 
81
 
 
82
private:
 
83
    BluezBluetoothInterfacePrivate * d;
 
84
 
 
85
    QStringList listReply(const QString &method) const;
 
86
    QString stringReply(const QString &method) const;
 
87
    bool boolReply(const QString &method) const;
 
88
};
 
89
 
 
90
#endif