Main Page   Class Hierarchy   Compound List   File List   Compound Members  

email.h

00001 /*
00002  * Purpose: wxWindows email implementation
00003  * Author:  Frank Buß
00004  * Created: 2002
00005  */
00006 
00007 #ifndef EMAIL_H
00008 #define EMAIL_H
00009 
00010 #include <wx/wx.h>
00011 #include <wx/filename.h>
00012 #include <wx/wfstream.h>
00013 
00014 #include "mime.h"
00015 
00016 // forward declaration
00017 class wxRecipientsIterator;
00018 
00022 class wxEmailMessage
00023 {
00024 public:
00031     wxEmailMessage(const wxString& subject, const wxString& text, const wxString& from);
00032 
00037     const wxString& GetFrom();
00038 
00046     void AddRecipient(const wxString& address);
00047 
00052     void AddTo(const wxString& address);
00053 
00058     void AddCc(const wxString& address);
00059 
00064     void AddBcc(const wxString& address);
00065 
00066     // loads the file in memory and adds it to the message.
00067 
00075     void AddFile(const wxFileName& fileName, const wxString mimeMainType = "", const wxString mimeSubType = "");
00076 
00082     wxRecipientsIterator GetRecipientsIterator();
00083 
00088     // 
00089     void Encode(wxOutputStream& out);
00090 
00091 private:
00092     wxString m_subject;
00093     wxString m_text;
00094     wxString m_from;
00095     wxArrayString m_rcptArray;
00096     wxArrayString m_toArray;
00097     wxArrayString m_ccArray;
00098     wxArrayString m_bccArray;
00099     wxArrayMimePart m_mimeParts;
00100 
00101     friend class wxRecipientsIterator;
00102 };
00103 
00104 
00108 class wxRecipientsIterator
00109 { 
00110 public:
00116     wxRecipientsIterator(const wxEmailMessage& emailMessage);
00117 
00123     bool HasNext();
00124 
00129     wxString GetNext();
00130 
00131 private:
00132     const wxEmailMessage& m_emailMessage;
00133     size_t m_rcptCount;
00134     size_t m_toCount;
00135     size_t m_ccCount;
00136     size_t m_bccCount;
00137 
00138 };
00139 
00140 
00141 #endif

Generated on Mon May 6 01:14:20 2002 for Wino by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001