From cdb7ae4c729b6a6c51b57eeefd21574952a4b767 Mon Sep 17 00:00:00 2001 From: eportnov Date: Mon, 12 Sep 2022 16:46:44 +0300 Subject: refactoring --- src/message_sender.hpp | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) delete mode 100644 src/message_sender.hpp (limited to 'src/message_sender.hpp') diff --git a/src/message_sender.hpp b/src/message_sender.hpp deleted file mode 100644 index 0728f0e..0000000 --- a/src/message_sender.hpp +++ /dev/null @@ -1,48 +0,0 @@ -#pragma once - -#include -#include - -#include - -#include "settings_storage.hpp" - -namespace smtp -{ - struct WriteThis - { - int counter; - }; - - class MessageSender - { - public: - MessageSender( SettingsStorage const& settings_storage ); - ~MessageSender() = default; - - bool Send( std::string const& mail_from, std::string const& mail_to, std::list const& cc, - std::string const& subject, std::string const& text ); - private: - std::string GetText( std::string const& mail_from, std::string const& mail_to, std::list const& cc, - std::string const& subject, std::string const& textt ) const; - void InitSenders( std::string const& mail_from, std::list const& mail_to ); - void FillRecipients( CURL* curl, std::string const& mail_to, std::list const& cc, curl_slist* recipients ); - std::string GetHostPortData() const; - void ProcessSending(const std::string &mail_from, const std::list &mail_to, const std::string &subject, const std::string &text); - timeval GetNowTime() const noexcept; - bool IsTimeOut( timeval const& start_time ) const noexcept; - long GetTimeDiff( timeval const& left, timeval const& right ) const noexcept; - timeval GetTimeout() const; - int ProcessHandle( timeval& timeout ) const; - void ClearPtrs(); - static size_t ReadCallBack( void *ptr, size_t size, size_t nmemb, void *userp ); - -// CURL *curl; -// CURLM *mcurl; - struct WriteThis pooh; - struct curl_slist* recipients = NULL; - SettingsStorage const& mSettingsStorage; - }; -} - - -- cgit v1.2.3