AlarmNotifications
PANDA Slow Control Alarm Daemon
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
emailsender.h
Go to the documentation of this file.
1 
34 #ifndef EMAILSENDER_H
35 #define EMAILSENDER_H
36 
37 #include "oldgcccompat.h" // Compatibilty macros for GCC < 4.7
38 
39 #include <vector>
40 
41 #include <QString>
42 
43 #include "alarmstatusentry.h"
44 
45 namespace AlarmNotifications
46 {
47 
58 {
59 private:
65  EMailSender();
73  void sendAlarmNotification_internal ( const std::vector< AlarmStatusEntry > alarms );
81  QString composeMessageText ( const std::vector< AlarmStatusEntry >& alarms );
82 public:
89  static EMailSender& instance() noexcept;
95  ~EMailSender();
102  EMailSender ( const EMailSender& other ) = delete;
109  EMailSender ( EMailSender&& other ) = delete;
117  EMailSender& operator= ( const EMailSender& other ) = delete;
125  EMailSender& operator= ( EMailSender&& other ) = delete;
133  static void sendAlarmNotification ( const std::vector<AlarmStatusEntry> alarms ) noexcept;
134 };
135 
136 }
137 #endif // EMAILSENDER_H
static EMailSender & instance() noexcept
Get singleton instance.
Definition: emailsender.cpp:47
Compatibility macros for older versions of the GCC.
Alarm entry for the AlarmServerConnector.
QString composeMessageText(const std::vector< AlarmStatusEntry > &alarms)
Compose message text.
Namespace for Alarm Notifications application.
static void sendAlarmNotification(const std::vector< AlarmStatusEntry > alarms) noexcept
Send an alarm notification via e-mail.
Definition: emailsender.cpp:53
#define noexcept
Allow using the noexcept keyword with GCC < 4.6.
Definition: oldgcccompat.h:52
EMailSender & operator=(const EMailSender &other)=delete
Copy assignment (deleted)
Send alarm notifications via e-mail.
Definition: emailsender.h:57
void sendAlarmNotification_internal(const std::vector< AlarmStatusEntry > alarms)
Compose and send the e-mail notification.
Definition: emailsender.cpp:78