Sonde v1.1.0
Embeddable Model Context Protocol server for Qt applications
Loading...
Searching...
No Matches
Sonde::EventFilter Struct Reference

Filter shared by event_read and event_wait. More...

#include <server_p.h>

Public Member Functions

bool matches (const Event &event) const
 Whether event passes the filter.

Static Public Member Functions

static std::optional< EventFilter > fromArguments (const QJsonObject &args, QString *error)
 Parses the common filter arguments of event_read/event_wait.

Public Attributes

QStringList sources
 Accepted source names; empty accepts all.
LogLevel minLevel = LogLevel::Debug
 Minimum severity.
QString contains
 Case-insensitive substring of message or category.
QRegularExpression regex
 Pattern matched against message or category.
quint64 since = 0
 Only events with a greater sequence number.

Detailed Description

Filter shared by event_read and event_wait.

Member Function Documentation

◆ fromArguments()

std::optional< EventFilter > Sonde::EventFilter::fromArguments ( const QJsonObject & args,
QString * error )
static

Parses the common filter arguments of event_read/event_wait.

Returns
The filter, or std::nullopt with error set.

The documentation for this struct was generated from the following files: