add more spacing
[personal-kdebase.git] / workspace / solid / solidshell / solid-bluetooth.h
blobed025486335c1d8ecf9f96e242fe513b62f834cd
1 /* This file is part of the KDE project
2 Copyright (C) 2006 Kevin Ottens <ervin@kde.org>
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License version 2 as published by the Free Software Foundation.
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
13 You should have received a copy of the GNU Library General Public License
14 along with this library; see the file COPYING.LIB. If not, write to
15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 Boston, MA 02110-1301, USA.
20 #ifndef MAIN_H
21 #define MAIN_H
23 #include <QCoreApplication>
24 #include <QEventLoop>
26 #include <solid/storageaccess.h>
27 #include <solid/opticaldrive.h>
29 class KJob;
31 namespace Solid {
32 namespace Control {
33 class Authentication;
37 class SolidBluetooth : public QCoreApplication
39 Q_OBJECT
40 public:
41 SolidBluetooth(int &argc, char **argv) : QCoreApplication(argc, argv), m_error(0) {}
43 static bool doIt();
45 bool bluetoothListAdapters();
46 bool bluetoothDefaultAdapter();
47 bool bluetoothCreateDevice(const QString &adapterUbi, const QString &mac);
48 bool bluetoothRemoveDevice(const QString &adapterUbi, const QString &mac);
49 bool bluetoothGetProperties(const QString &adapterUbi);
50 #if 0
51 bool bluetoothGetRemoteName(const QString &adapterUbi, const QString &mac);
52 bool bluetoothAdapterAddress(const QString &ubi);
53 bool bluetoothAdapterName(const QString &ubi);
54 bool bluetoothAdapterSetName(const QString &ubi, const QString &name);
55 bool bluetoothAdapterMode(const QString &ubi);
56 bool bluetoothAdapterSetMode(const QString &ubi, const QString &mode);
57 bool bluetoothAdapterListConnections(const QString &ubi);
58 bool bluetoothAdapterListBondings(const QString &ubi);
59 bool bluetoothAdapterScan(const QString &ubi);
61 bool bluetoothInputListDevices();
62 bool bluetoothInputSetup(const QString &deviceUbi);
63 bool bluetoothInputRemoveSetup(const QString &deviceUbi);
64 bool bluetoothInputConnect(const QString &deviceUbi);
65 bool bluetoothInputDisconnect(const QString &deviceUbi);
67 bool bluetoothRemoteCreateBonding(const QString &adapterUbi, const QString &deviceUbi);
68 bool bluetoothRemoteRemoveBonding(const QString &adapterUbi, const QString &deviceUbi);
69 bool bluetoothRemoteHasBonding(const QString &adapterUbi, const QString &deviceUbi);
70 #endif
72 private:
73 void connectJob(KJob *job);
75 QEventLoop m_loop;
76 int m_error;
77 QString m_errorString;
78 private slots:
79 #if 0
80 void slotStorageResult(Solid::ErrorType error, const QVariant &errorData);
81 void slotResult(KJob *job);
82 void slotPercent(KJob *job, unsigned long percent);
83 void slotInfoMessage(KJob *job, const QString &message);
84 void slotBluetoothDeviceFound(const QString &ubi, int deviceClass, int rssi);
85 void slotBluetoothDiscoveryCompleted();
86 #endif
90 #endif