Local daemon control protocol types and JSON serialization helpers.
More...
#include <cstdint>
#include <QByteArray>
#include <QJsonObject>
#include <QString>
Go to the source code of this file.
Local daemon control protocol types and JSON serialization helpers.
Definition in file daemoncontrolprotocol.h.
◆ DaemonControlMethod
Supported operations on the local daemon control socket.
| Enumerator |
|---|
| Ping | Lightweight health check that returns daemon identity information.
|
| GetStatus | Returns daemon-authoritative runtime status and service diagnostics.
|
| GetConfig | Returns the daemon's current config snapshot and config-path metadata.
|
Definition at line 17 of file daemoncontrolprotocol.h.
◆ daemonControlMethodToString()
Converts a control method enum to its wire-format string name.
- Parameters
-
| method | Method value to convert. |
- Returns
- Canonical protocol string for the method.
◆ daemonControlSocketName()
| QString daemonControlSocketName |
( |
| ) |
|
Returns the local server name used by the daemon control socket.
- Returns
- Transport-specific socket/server name.
◆ parseDaemonControlMethod()
Parses a wire-format control method name.
- Parameters
-
| value | Method string from a protocol payload. |
| methodOut | Output target for the parsed method. |
- Returns
true when the method is recognized.
◆ parseDaemonControlRequest()
| bool parseDaemonControlRequest |
( |
const QByteArray & |
payload, |
|
|
DaemonControlRequest * |
requestOut, |
|
|
QString * |
errorMessage = nullptr |
|
) |
| |
Parses a line-delimited JSON request payload.
- Parameters
-
| payload | UTF-8 request payload. |
| requestOut | Output target for the parsed request. |
| errorMessage | Optional output for parse failures. |
- Returns
true when the payload is valid.
◆ parseDaemonControlResponse()
| bool parseDaemonControlResponse |
( |
const QByteArray & |
payload, |
|
|
DaemonControlResponse * |
responseOut, |
|
|
QString * |
errorMessage = nullptr |
|
) |
| |
Parses a line-delimited JSON response payload.
- Parameters
-
| payload | UTF-8 response payload. |
| responseOut | Output target for the parsed response. |
| errorMessage | Optional output for parse failures. |
- Returns
true when the payload is valid.
◆ serializeDaemonControlRequest()
Serializes a request to compact line-delimited JSON.
- Parameters
-
| request | Request value to serialize. |
- Returns
- UTF-8 payload terminated with
\n.
◆ serializeDaemonControlResponse()
Serializes a response to compact line-delimited JSON.
- Parameters
-
| response | Response value to serialize. |
- Returns
- UTF-8 payload terminated with
\n.