File indexing completed on 2024-04-21 05:25:57

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 #pragma once
0008 
0009 #include <KQuickConfigModule>
0010 #include <QObject>
0011 
0012 class Bluetooth : public KQuickConfigModule
0013 {
0014     Q_OBJECT
0015 
0016 public:
0017     Bluetooth(QObject *parent, const KPluginMetaData &data);
0018 
0019     Q_INVOKABLE void runWizard();
0020     Q_INVOKABLE void runSendFile(const QString &ubi);
0021 
0022     Q_INVOKABLE void checkNetworkConnection(const QStringList &uuids, const QString &address);
0023     Q_INVOKABLE void setupNetworkConnection(const QString &service, const QString &address, const QString &deviceName);
0024 
0025     Q_PROPERTY(QString bluetoothStatusAtLogin READ bluetoothStatusAtLogin WRITE setBluetoothStatusAtLogin NOTIFY bluetoothStatusAtLoginChanged)
0026 
0027     QString bluetoothStatusAtLogin() const;
0028     void setBluetoothStatusAtLogin(const QString &newStatus);
0029 
0030 Q_SIGNALS:
0031     void networkAvailable(const QString &service, bool available);
0032     QString bluetoothStatusAtLoginChanged(QString newStatus);
0033     void errorOccured(const QString &errorMessage);
0034 
0035 private:
0036     void checkNetworkInternal(const QString &service, const QString &address);
0037 };