9#include <QtCore/QObject>
51 void emitEvent(
LogLevel level,
const QString &message,
const QString &category = { },
52 const QJsonObject &data = { });
EventSource's private part.
Definition eventsource.cpp:12
void eventOccurred(const Sonde::Event &event)
An event was emitted (sequence is still 0; the server assigns it).
QString description() const
Human-readable description shown in tool descriptions.
Definition eventsource.cpp:32
~EventSource() override
Destroys the source; the server forgets it.
PrivatePtr< EventSourcePrivate > d
Implementation.
Definition eventsource.h:62
void emitEvent(LogLevel level, const QString &message, const QString &category={ }, const QJsonObject &data={ })
Emits an event.
Definition eventsource.cpp:37
QString name() const
The source's name.
Definition eventsource.cpp:27
EventSource(QString name, QString description={ }, QObject *parent=nullptr)
Creates a source called name (used in filters and resource URIs), described by description in the eve...
Definition eventsource.cpp:18
Owns a class's private part, like std::unique_ptr, but a const owner only gets a const pointer,...
Definition privateptr.h:20
Embeddable Model Context Protocol server for Qt applications.
Definition dispatch.cpp:10
LogLevel
MCP (RFC 5424) log levels, from lowest to highest severity.
Definition types.h:31
Sonde::PrivatePtr: the owning, const-correct pointer to a class's private part (design 0031).
One entry of an event stream (see EventSource).
Definition types.h:235
Value types shared by the Sonde API: tool definitions and results, asynchronous tool-call handles,...