notification_service.cpp
File Header Information
| Field | Value |
|---|---|
| SPDX Comment | Notification Service Implementation |
| SPDX Type | SOURCE |
| Contributor | ZHENG Robert |
| License ID | MIT |
| File | notification_service.cpp |
| Description | Notification Service Implementation |
| Version | 0.15.0 |
| Date | 2026-01-24 |
| Author | ZHENG Robert (robert@hase-zheng.net) |
| Copyright | Copyright (c) 2026 ZHENG Robert |
| License | MIT |
Table of Contents
- File Header Information
- API Documentation
- namespace rz
- namespace service
- NotificationService::NotificationService(SmtpService* smtp)
- std::vector
NotificationService::getGlobalAdminEmails() - QSqlQuery query(db)
- void NotificationService::notifyAdminsNewUser(const QString& newUserName, const QString& newUserEmail)
- void NotificationService::notifyGroupNewEvent(const QString& groupName, const QString& bakerName, const QString& date, const std::vector
& recipientsDe, const std::vector & recipientsEn, const QByteArray& icsData) - void NotificationService::notifyAccountActivated(const QString& email, const QString& name, const QString& lang)
- void NotificationService::notifyAccountDeactivated(const QString& email, const QString& name, const QString& lang)
- void NotificationService::notifyAccountDeleted(const QString& email, const QString& name, const QString& lang)
- void NotificationService::notifyPasswordChanged(const QString& email, const QString& name, const QString& lang)
- void NotificationService::notifyForgotPassword(const QString& email, const QString& name, const QString& tempPassword, const QString& lang)
API Documentation
namespace rz
rz namespace.
namespace service
service namespace.
NotificationService::NotificationService(SmtpService* smtp)
Constructs the NotificationService.
| Parameter | Description |
|---|---|
smtp | Pointer 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.
| Parameter | Description |
|---|---|
newUserName | The name of the new user. |
newUserEmail | The 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).
| Parameter | Description |
|---|---|
groupName | The name of the group. |
bakerName | The name of the user bringing the cake. |
date | The date of the event. |
recipientsDe | List of email addresses for German notifications. |
recipientsEn | List 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.
| Parameter | Description |
|---|---|
email | The user's email address. |
name | The user's name. |
lang | The 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.
| Parameter | Description |
|---|---|
email | The user's email address. |
name | The user's name. |
lang | The 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.
| Parameter | Description |
|---|---|
email | The user's email address. |
name | The user's name. |
lang | The 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.
| Parameter | Description |
|---|---|
email | The user's email address. |
name | The user's name. |
lang | The 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.
| Parameter | Description |
|---|---|
email | The user's email address. |
name | The user's name. |
tempPassword | The temporary password. |
lang | The user's preferred language. |