mutterkey
KDE-first push-to-talk transcription tool for KDE Plasma
Loading...
Searching...
No Matches
DaemonControlServer Class Referencefinal

Serves daemon status and config requests over a local socket. More...

#include <daemoncontrolserver.h>

Public Member Functions

 DaemonControlServer (QString configPath, AppConfig config, const MutterkeyService *service, QObject *parent=nullptr)
 Creates the local control server for a running daemon.
 
 DaemonControlServer (QString configPath, AppConfig config, const MutterkeyService *service, QString socketName, QObject *parent)
 Creates the local control server for a running daemon on a custom socket name.
 
 ~DaemonControlServer () override
 Stops the local server and releases the socket name.
 
bool start (QString *errorMessage=nullptr)
 Starts listening on the local daemon control socket.
 
void stop ()
 Stops listening and removes the local socket endpoint.
 

Detailed Description

Serves daemon status and config requests over a local socket.

Definition at line 20 of file daemoncontrolserver.h.

Constructor & Destructor Documentation

◆ DaemonControlServer() [1/2]

DaemonControlServer::DaemonControlServer ( QString  configPath,
AppConfig  config,
const MutterkeyService service,
QObject *  parent = nullptr 
)
explicit

Creates the local control server for a running daemon.

Parameters
configPathResolved daemon config path.
configStartup config snapshot exposed through the control API.
serviceNon-owning pointer to the running daemon service.
parentOptional QObject parent.

◆ DaemonControlServer() [2/2]

DaemonControlServer::DaemonControlServer ( QString  configPath,
AppConfig  config,
const MutterkeyService service,
QString  socketName,
QObject *  parent 
)
explicit

Creates the local control server for a running daemon on a custom socket name.

Parameters
configPathResolved daemon config path.
configStartup config snapshot exposed through the control API.
serviceNon-owning pointer to the running daemon service.
socketNameInjected local socket name for deterministic tests or alternate local control endpoints.
parentOptional QObject parent.

Member Function Documentation

◆ start()

bool DaemonControlServer::start ( QString *  errorMessage = nullptr)

Starts listening on the local daemon control socket.

Parameters
errorMessageOptional output for startup failures.
Returns
true when the server is listening.

The documentation for this class was generated from the following file: