File indexing completed on 2024-05-12 04:58:50
0001 /** 0002 * SPDX-FileCopyrightText: 2016 Saikrishna Arcot <saiarcot895@gmail.com> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0005 */ 0006 0007 #ifndef BLUETOOTHDEVICELINK_H 0008 #define BLUETOOTHDEVICELINK_H 0009 0010 #include <QBluetoothSocket> 0011 #include <QObject> 0012 #include <QSslCertificate> 0013 #include <QString> 0014 0015 #include "../devicelink.h" 0016 0017 class ConnectionMultiplexer; 0018 class MultiplexChannel; 0019 class BluetoothLinkProvider; 0020 0021 class KDECONNECTCORE_EXPORT BluetoothDeviceLink : public DeviceLink 0022 { 0023 Q_OBJECT 0024 0025 public: 0026 BluetoothDeviceLink(const DeviceInfo &deviceInfo, 0027 BluetoothLinkProvider *parent, 0028 ConnectionMultiplexer *connection, 0029 QSharedPointer<MultiplexChannel> socket); 0030 0031 bool sendPacket(NetworkPacket &np) override; 0032 0033 DeviceInfo deviceInfo() const override 0034 { 0035 return mDeviceInfo; 0036 } 0037 0038 private Q_SLOTS: 0039 void dataReceived(); 0040 0041 private: 0042 ConnectionMultiplexer *mConnection; 0043 QSharedPointer<MultiplexChannel> mChannel; 0044 DeviceInfo mDeviceInfo; 0045 0046 void sendMessage(const QString mMessage); 0047 }; 0048 0049 #endif