Phosphor
Qt6 / Wayland library suite for window-management tools
Loading...
Searching...
No Matches
IpcProtocol.h File Reference
#include <PhosphorIpc/phosphoripc_export.h>
#include <QByteArray>
#include <QJsonObject>
#include <QJsonValue>
#include <QString>
#include <QVariant>
#include <QVariantList>
#include <optional>

Go to the source code of this file.

Classes

struct  PhosphorIpc::Request

Namespaces

namespace  PhosphorIpc
namespace  PhosphorIpc::Field
namespace  PhosphorIpc::RequestType
namespace  PhosphorIpc::ResponseType
namespace  PhosphorIpc::ErrorCode

Functions

PHOSPHORIPC_EXPORT std::optional< Request > PhosphorIpc::parseRequest (const QByteArray &line, QString *parseError)
PHOSPHORIPC_EXPORT QJsonObject PhosphorIpc::buildReply (qint64 id, const QJsonValue &result)
PHOSPHORIPC_EXPORT QJsonObject PhosphorIpc::buildEvent (qint64 subscriptionId, const QJsonValue &args)
PHOSPHORIPC_EXPORT QJsonObject PhosphorIpc::buildEvent (const QString &target, const QString &signalName, const QJsonValue &args)
PHOSPHORIPC_EXPORT QJsonObject PhosphorIpc::buildError (qint64 id, const QString &code, const QString &message, const QJsonObject &detail={})
PHOSPHORIPC_EXPORT QByteArray PhosphorIpc::writeLine (const QJsonObject &obj)
PHOSPHORIPC_EXPORT QJsonValue PhosphorIpc::variantToJson (const QVariant &v)

Variables

constexpr int PhosphorIpc::ProtocolVersion = 1
constexpr auto PhosphorIpc::Field::Type = "type"
constexpr auto PhosphorIpc::Field::Id = "id"
constexpr auto PhosphorIpc::Field::Target = "target"
constexpr auto PhosphorIpc::Field::Fn = "fn"
constexpr auto PhosphorIpc::Field::Args = "args"
constexpr auto PhosphorIpc::Field::Signal = "signal"
constexpr auto PhosphorIpc::Field::SubscriptionId = "subscriptionId"
constexpr auto PhosphorIpc::Field::Result = "result"
constexpr auto PhosphorIpc::Field::Code = "code"
constexpr auto PhosphorIpc::Field::Message = "message"
constexpr auto PhosphorIpc::Field::Detail = "detail"
constexpr auto PhosphorIpc::RequestType::Call = "call"
constexpr auto PhosphorIpc::RequestType::List = "list"
constexpr auto PhosphorIpc::RequestType::Schema = "schema"
constexpr auto PhosphorIpc::RequestType::Subscribe = "subscribe"
constexpr auto PhosphorIpc::RequestType::Unsubscribe = "unsubscribe"
constexpr auto PhosphorIpc::ResponseType::Reply = "reply"
constexpr auto PhosphorIpc::ResponseType::Event = "event"
constexpr auto PhosphorIpc::ResponseType::Error = "error"
constexpr auto PhosphorIpc::ErrorCode::NoSuchTarget = "NO_SUCH_TARGET"
constexpr auto PhosphorIpc::ErrorCode::NoSuchFn = "NO_SUCH_FN"
constexpr auto PhosphorIpc::ErrorCode::NoSuchSignal = "NO_SUCH_SIGNAL"
constexpr auto PhosphorIpc::ErrorCode::NoSuchSubscription = "NO_SUCH_SUBSCRIPTION"
constexpr auto PhosphorIpc::ErrorCode::InvalidArg = "INVALID_ARG"
constexpr auto PhosphorIpc::ErrorCode::InvocationFailed = "INVOCATION_FAILED"
constexpr auto PhosphorIpc::ErrorCode::MalformedRequest = "MALFORMED_REQUEST"
constexpr auto PhosphorIpc::ErrorCode::CallFailed = "CALL_FAILED"
constexpr auto PhosphorIpc::ErrorCode::CallAbandoned = "CALL_ABANDONED"