Deskflow
1.26.0.418
Keyboard and mouse sharing utility
Toggle main menu visibility
Loading...
Searching...
No Matches
IpcServer.h
Go to the documentation of this file.
1
/*
2
* Deskflow -- mouse and keyboard sharing utility
3
* SPDX-FileCopyrightText: (C) 2025-2026 Synergy App Ltd
4
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
5
*/
6
7
#pragma once
8
9
#include <QObject>
10
#include <QSet>
11
12
class
QLocalServer;
13
class
QLocalSocket;
14
15
namespace
deskflow::core::ipc
{
16
17
class
IpcServer
:
public
QObject
18
{
19
Q_OBJECT
20
21
public
:
22
explicit
IpcServer
(QObject *parent,
const
QString &serverName,
const
QString &typeName);
23
~IpcServer
()
override
;
24
25
void
listen
();
26
void
broadcastCommand
(
const
QString &command,
const
QString &args =
""
);
27
28
Q_SIGNALS:
29
void
logLevelChanged
(
const
QString &logLevel);
30
void
configFileChanged
(
const
QString &configFile);
31
void
startProcessRequested
();
32
void
stopProcessRequested
();
33
void
clearSettingsRequested
();
34
35
protected
:
42
void
writeToClientSocket
(QLocalSocket *&clientSocket,
const
QString &message)
const
;
43
44
private
:
45
void
processMessage(QLocalSocket *clientSocket,
const
QString &message);
46
virtual
void
processCommand(QLocalSocket *clientSocket,
const
QString &command,
const
QStringList &parts) = 0;
47
void
handleNewConnection();
48
void
handleReadyRead();
49
void
handleDisconnected();
50
void
handleErrorOccurred();
51
52
QLocalServer *m_server;
53
QSet<QLocalSocket *> m_clients;
54
QString m_serverName;
55
QStringList m_pendingMessages;
56
QByteArray m_typeName;
57
};
58
59
}
// namespace deskflow::core::ipc
deskflow::core::ipc::IpcServer::broadcastCommand
void broadcastCommand(const QString &command, const QString &args="")
Definition
IpcServer.cpp:157
deskflow::core::ipc::IpcServer::IpcServer
IpcServer(QObject *parent, const QString &serverName, const QString &typeName)
Definition
IpcServer.cpp:17
deskflow::core::ipc::IpcServer::listen
void listen()
Definition
IpcServer.cpp:31
deskflow::core::ipc::IpcServer::configFileChanged
void configFileChanged(const QString &configFile)
deskflow::core::ipc::IpcServer::logLevelChanged
void logLevelChanged(const QString &logLevel)
deskflow::core::ipc::IpcServer::stopProcessRequested
void stopProcessRequested()
deskflow::core::ipc::IpcServer::startProcessRequested
void startProcessRequested()
deskflow::core::ipc::IpcServer::clearSettingsRequested
void clearSettingsRequested()
deskflow::core::ipc::IpcServer::writeToClientSocket
void writeToClientSocket(QLocalSocket *&clientSocket, const QString &message) const
Definition
IpcServer.cpp:179
deskflow::core::ipc
Definition
DaemonApp.h:18
src
lib
deskflow
ipc
IpcServer.h
Generated by
1.18.0