File indexing completed on 2024-04-21 16:11:32

0001 /**
0002  * SPDX-FileCopyrightText: 2020 Nicolas Fella <nicolas.fella@gmx.de>
0003  * SPDX-FileCopyrightText: 2021 Nate Graham <nate@kde.org>
0004  * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005  */
0006 
0007 #ifndef BLUETOOTH_H
0008 #define BLUETOOTH_H
0009 
0010 #include <KQuickAddons/ConfigModule>
0011 #include <QObject>
0012 
0013 class Bluetooth : public KQuickAddons::ConfigModule
0014 {
0015     Q_OBJECT
0016 
0017 public:
0018     Bluetooth(QObject *parent, const KPluginMetaData &data, const QVariantList &args);
0019 
0020     Q_INVOKABLE void runWizard();
0021     Q_INVOKABLE void runSendFile(const QString &ubi);
0022 
0023     Q_INVOKABLE void checkNetworkConnection(const QStringList &uuids, const QString &address);
0024     Q_INVOKABLE void setupNetworkConnection(const QString &service, const QString &address, const QString &deviceName);
0025 
0026     Q_PROPERTY(QString bluetoothStatusAtLogin READ bluetoothStatusAtLogin WRITE setBluetoothStatusAtLogin NOTIFY bluetoothStatusAtLoginChanged)
0027 
0028     QString bluetoothStatusAtLogin() const;
0029     void setBluetoothStatusAtLogin(const QString &newStatus);
0030 
0031 Q_SIGNALS:
0032     void networkAvailable(const QString &service, bool available);
0033     QString bluetoothStatusAtLoginChanged(QString newStatus);
0034     void errorOccured(const QString &errorMessage);
0035 
0036 private:
0037     void checkNetworkInternal(const QString &service, const QString &address);
0038 };
0039 
0040 #endif // BLUETOOTHKCM_H