Logo

Cake Planner

Backend

event_controller.cpp

File Header Information

FieldValue
SPDX CommentEvent Controller Implementation (Safe Blocking Long Polling)
SPDX TypeSOURCE
ContributorZHENG Robert
License IDMIT
Fileevent_controller.cpp
DescriptionEvent Controller Implementation (Safe Blocking Long Polling)
Version0.15.0
Date2026-01-24
AuthorZHENG Robert (robert@hase-zheng.net)
CopyrightCopyright (c) 2026 ZHENG Robert
LicenseMIT

Table of Contents

API Documentation

struct LatestEventData

LatestEventData struct.


void broadcastNewEvent(const Event& evt)

Thread-safe helper to broadcast a new event to all waiting SSE clients.

ParameterDescription
evtThe event to broadcast.

std::lock_guard lock(event_mutex)

Function implementation.


namespace rz

rz namespace.


namespace controller

controller namespace.


void EventController::registerRoutes(crow::App &app, service::NotificationService* notifyService)

Registers event-related routes with the Crow application.

ParameterDescription
appThe Crow application instance to register routes with.
notifyServicePointer to the notification service for email notifications.

std::lock_guard lock(event_mutex)

Function implementation.


std::unique_lock lock(event_mutex)

Function implementation.


crow::multipart::message msg(req)

Function implementation.


QFile file(fullPath)

Function implementation.


crow::multipart::message msg(req)

Function implementation.


QFile file(fullPath)

Function implementation.