Logging improvements to allow prettier displays in the server GUI.
[dcpomatic.git] / src / lib / emailer.h
index 4b4d1f6f77d4013905d2609decbb2bd9ef430c57..89993ca48f4923cd6668e29aa923370102c13a9f 100644 (file)
@@ -27,13 +27,16 @@ public:
 
        void add_cc (std::string cc);
        void add_bcc (std::string bcc);
-       void add_attachment (boost::filesystem::path attachment, std::string);
+       void add_attachment (boost::filesystem::path file, std::string name, std::string mime_type);
 
        void send (boost::shared_ptr<Job> job);
 
-       std::string notes () const;
+       std::string notes () const {
+               return _notes;
+       }
 
        size_t get_data (void* ptr, size_t size, size_t nmemb);
+       int debug (CURL* curl, curl_infotype type, char* data, size_t size);
 
 private:
        static std::string address_list (std::list<std::string> addresses);
@@ -44,8 +47,15 @@ private:
        std::string _body;
        std::list<std::string> _cc;
        std::list<std::string> _bcc;
-       std::list<std::pair<boost::filesystem::path, std::string> > _attachments;
+
+       struct Attachment {
+               boost::filesystem::path file;
+               std::string name;
+               std::string mime_type;
+       };
+
+       std::list<Attachment> _attachments;
        std::string _email;
        size_t _offset;
-       boost::scoped_array<char> _notes_buffer;
+       std::string _notes;
 };