Logo

Cake Planner

Backend

notification_service.cpp

File Header Information

FieldValue
SPDX CommentNotification Service Implementation
SPDX TypeSOURCE
ContributorZHENG Robert
License IDMIT
Filenotification_service.cpp
DescriptionNotification Service Implementation
Version0.15.0
Date2026-01-24
AuthorZHENG Robert (robert@hase-zheng.net)
CopyrightCopyright (c) 2026 ZHENG Robert
LicenseMIT

Table of Contents

API Documentation

namespace rz

rz namespace.


namespace service

service namespace.


NotificationService::NotificationService(SmtpService* smtp)

Constructs the NotificationService.

ParameterDescription
smtpPointer to the SMTP service used for sending emails.

std::vector NotificationService::getGlobalAdminEmails()

Retrieves the email addresses of all global administrators.

Returns: A vector of admin email addresses.


QSqlQuery query(db)

Function implementation.


void NotificationService::notifyAdminsNewUser(const QString& newUserName, const QString& newUserEmail)

Notifies admins about a new user registration.

ParameterDescription
newUserNameThe name of the new user.
newUserEmailThe email of the new user.

void NotificationService::notifyGroupNewEvent(const QString& groupName, const QString& bakerName, const QString& date, const std::vector& recipientsDe, const std::vector& recipientsEn, const QByteArray& icsData)

Notifies group members about a new event (e.g., someone bringing cake).

ParameterDescription
groupNameThe name of the group.
bakerNameThe name of the user bringing the cake.
dateThe date of the event.
recipientsDeList of email addresses for German notifications.
recipientsEnList of email addresses for English notifications.

void NotificationService::notifyAccountActivated(const QString& email, const QString& name, const QString& lang)

Notifies a user that their account has been activated.

ParameterDescription
emailThe user's email address.
nameThe user's name.
langThe user's preferred language ("de" or "en").

void NotificationService::notifyAccountDeactivated(const QString& email, const QString& name, const QString& lang)

Notifies a user that their account has been deactivated.

ParameterDescription
emailThe user's email address.
nameThe user's name.
langThe user's preferred language ("de" or "en").

void NotificationService::notifyAccountDeleted(const QString& email, const QString& name, const QString& lang)

Notifies a user that their account has been deleted.

ParameterDescription
emailThe user's email address.
nameThe user's name.
langThe user's preferred language ("de" or "en").

void NotificationService::notifyPasswordChanged(const QString& email, const QString& name, const QString& lang)

Notifies a user that their password has been changed.

ParameterDescription
emailThe user's email address.
nameThe user's name.
langThe user's preferred language ("de" or "en").

void NotificationService::notifyForgotPassword(const QString& email, const QString& name, const QString& tempPassword, const QString& lang)

Sends a temporary password to the user.

ParameterDescription
emailThe user's email address.
nameThe user's name.
tempPasswordThe temporary password.
langThe user's preferred language.