| 1 |
/* |
| 2 |
* SPDX-FileCopyrightText: 2015 David Rosca <[email protected]> |
| 3 |
* |
| 4 |
* SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
| 5 |
*/ |
| 6 |
|
| 7 |
#ifndef CHATPROFILE_H |
| 8 |
#define CHATPROFILE_H |
| 9 |
|
| 10 |
#include "device.h" |
| 11 |
#include "profile.h" |
| 12 |
|
| 13 |
class QLocalSocket; |
| 14 |
|
| 15 |
class ChatProfile : public BluezQt::Profile |
| 16 |
{ |
| 17 |
Q_OBJECT |
| 18 |
|
| 19 |
public: |
| 20 |
explicit ChatProfile(QObject *parent); |
| 21 |
|
| 22 |
QDBusObjectPath objectPath() const override; |
| 23 |
QString uuid() const override; |
| 24 |
|
| 25 |
void newConnection(BluezQt::DevicePtr device, const QDBusUnixFileDescriptor &fd, const QVariantMap &properties, const BluezQt::Request<> &request) override; |
| 26 |
void requestDisconnection(BluezQt::DevicePtr device, const BluezQt::Request<> &request) override; |
| 27 |
void release() override; |
| 28 |
|
| 29 |
private Q_SLOTS: |
| 30 |
void socketReadyRead(); |
| 31 |
void socketDisconnected(); |
| 32 |
void writeToSocket(); |
| 33 |
|
| 34 |
private: |
| 35 |
QSharedPointer<QLocalSocket> m_socket; |
| 36 |
}; |
| 37 |
|
| 38 |
#endif // CHATPROFILE_H |