2021-04-22 14:00:42 +00:00
|
|
|
/*
|
2024-09-17 19:00:25 +00:00
|
|
|
* Deskflow -- mouse and keyboard sharing utility
|
2025-11-28 18:37:01 +00:00
|
|
|
* SPDX-FileCopyrightText: (C) 2025 Deskflow Developers
|
2025-01-24 00:11:17 +00:00
|
|
|
* SPDX-FileCopyrightText: (C) 2021 Symless Ltd.
|
|
|
|
|
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
|
2021-04-22 14:00:42 +00:00
|
|
|
*/
|
|
|
|
|
|
2024-08-07 14:05:18 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
2025-11-28 17:55:57 +00:00
|
|
|
#include "common/Enums.h"
|
2024-08-08 17:41:59 +00:00
|
|
|
|
2021-04-22 14:00:42 +00:00
|
|
|
#include <QString>
|
2024-08-07 14:05:18 +00:00
|
|
|
#include <QWidget>
|
2024-08-08 17:41:59 +00:00
|
|
|
|
|
|
|
|
class QWidget;
|
2021-04-22 14:00:42 +00:00
|
|
|
|
2024-09-17 19:00:25 +00:00
|
|
|
namespace deskflow::gui {
|
2021-04-22 14:00:42 +00:00
|
|
|
|
2024-10-17 18:04:35 +00:00
|
|
|
class ClientConnection : public QObject
|
|
|
|
|
{
|
2024-08-08 17:41:59 +00:00
|
|
|
Q_OBJECT
|
|
|
|
|
|
2021-04-22 14:00:42 +00:00
|
|
|
public:
|
2025-11-28 18:37:01 +00:00
|
|
|
explicit ClientConnection(QWidget *parent) : m_pParent(parent)
|
2024-10-17 18:04:35 +00:00
|
|
|
{
|
2025-05-20 14:39:18 +00:00
|
|
|
// do nothing
|
2024-10-17 18:04:35 +00:00
|
|
|
}
|
2024-08-08 17:41:59 +00:00
|
|
|
|
|
|
|
|
void handleLogLine(const QString &line);
|
|
|
|
|
|
2025-05-31 15:35:37 +00:00
|
|
|
Q_SIGNALS:
|
2025-11-27 14:21:43 +00:00
|
|
|
/**
|
|
|
|
|
* @brief requestShowError, This signal is emitted when the client
|
|
|
|
|
* connection would like the owning process to report an error message
|
|
|
|
|
* @param error the type of error being reported
|
|
|
|
|
* @param address of the host
|
|
|
|
|
*/
|
2025-11-28 17:55:57 +00:00
|
|
|
void requestShowError(deskflow::client::ErrorType error, const QString &address);
|
2026-03-25 04:28:37 +00:00
|
|
|
void updateTimeoutDelay(int newTimeout);
|
2021-04-22 14:00:42 +00:00
|
|
|
|
|
|
|
|
private:
|
2024-08-08 17:41:59 +00:00
|
|
|
void showMessage(const QString &logLine);
|
2024-08-07 14:05:18 +00:00
|
|
|
|
2024-08-08 17:41:59 +00:00
|
|
|
QWidget *m_pParent;
|
2025-11-28 18:37:01 +00:00
|
|
|
bool m_supressMessage = false;
|
2021-04-22 14:00:42 +00:00
|
|
|
};
|
|
|
|
|
|
2024-09-17 19:00:25 +00:00
|
|
|
} // namespace deskflow::gui
|