2021-04-22 07:29:46 +00:00
|
|
|
/*
|
|
|
|
|
* synergy -- mouse and keyboard sharing utility
|
2024-08-07 14:05:18 +00:00
|
|
|
* Copyright (C) 2021 Symless Ltd.
|
2021-04-22 07:29:46 +00:00
|
|
|
*
|
|
|
|
|
* This package is free software; you can redistribute it and/or
|
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
|
* found in the file LICENSE that should have accompanied this file.
|
|
|
|
|
*
|
|
|
|
|
* This package is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
|
|
|
|
|
2024-08-07 14:05:18 +00:00
|
|
|
#pragma once
|
2021-04-22 07:29:46 +00:00
|
|
|
|
|
|
|
|
#include <QString>
|
|
|
|
|
|
2024-08-07 14:05:18 +00:00
|
|
|
namespace synergy::gui {
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
class ServerMessage {
|
|
|
|
|
QString m_message;
|
|
|
|
|
QString m_clienName;
|
2021-04-22 07:29:46 +00:00
|
|
|
|
|
|
|
|
public:
|
2024-07-02 19:07:06 +00:00
|
|
|
explicit ServerMessage(const QString &message);
|
2021-04-22 07:29:46 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
bool isNewClientMessage() const;
|
|
|
|
|
bool isExitMessage() const;
|
|
|
|
|
bool isConnectedMessage() const;
|
|
|
|
|
bool isDisconnectedMessage() const;
|
2021-04-22 07:29:46 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
const QString &getClientName() const;
|
2021-04-22 07:29:46 +00:00
|
|
|
|
|
|
|
|
private:
|
2024-07-02 19:07:06 +00:00
|
|
|
QString parseClientName(const QString &line) const;
|
2021-04-22 07:29:46 +00:00
|
|
|
};
|
|
|
|
|
|
2024-08-07 14:05:18 +00:00
|
|
|
} // namespace synergy::gui
|