00001 00034 #ifndef EMAILSENDER_H 00035 #define EMAILSENDER_H 00036 00037 #include "oldgcccompat.h" // Compatibilty macros for GCC < 4.7 00038 00039 #include <vector> 00040 00041 #include <QString> 00042 00043 #include "alarmstatusentry.h" 00044 00045 namespace AlarmNotifications 00046 { 00047 00057 class EMailSender 00058 { 00059 private: 00065 EMailSender(); 00073 void sendAlarmNotification_internal ( const std::vector< AlarmStatusEntry > alarms ); 00081 QString composeMessageText ( const std::vector< AlarmStatusEntry >& alarms ); 00082 public: 00089 static EMailSender& instance() noexcept; 00095 ~EMailSender(); 00102 EMailSender ( const EMailSender& other ) = delete; 00109 EMailSender ( EMailSender&& other ) = delete; 00117 EMailSender& operator= ( const EMailSender& other ) = delete; 00125 EMailSender& operator= ( EMailSender&& other ) = delete; 00133 static void sendAlarmNotification ( const std::vector<AlarmStatusEntry> alarms ) noexcept; 00134 }; 00135 00136 } 00137 #endif // EMAILSENDER_H