]> git.saurik.com Git - wxWidgets.git/blob - contrib/include/wx/net/msg.h
added missing wxSTD
[wxWidgets.git] / contrib / include / wx / net / msg.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: msg.h
3 // Purpose: wxMailMessage
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 2001-08-21
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifdef __GNUG__
13 #pragma interface "msg.h"
14 #endif
15
16 #ifndef _WX_MSG_H_
17 #define _WX_MSG_H_
18
19 /*
20 * wxMailMessage
21 * Encapsulates an email message
22 */
23
24 class wxMailMessage
25 {
26 public:
27
28 // A common usage
29 wxMailMessage(const wxString& subject, const wxString& to,
30 const wxString& body, const wxString& attachment = wxEmptyString,
31 const wxString& attachmentTitle = wxEmptyString)
32 {
33 m_to.Add(to);
34 m_subject = subject;
35 m_body = body;
36 if (!attachment.IsEmpty())
37 {
38 m_attachments.Add(attachment);
39 m_attachmentTitles.Add(attachmentTitle);
40 }
41 }
42
43 wxMailMessage() {};
44
45 //// Accessors
46
47 void AddTo(const wxString& to) { m_to.Add(to); }
48 void AddCc(const wxString& cc) { m_cc.Add(cc); }
49 void AddBcc(const wxString& bcc) { m_bcc.Add(bcc); }
50 void AddAttachment(const wxString& attach, const wxString& title = wxEmptyString)
51 { m_attachments.Add(attach); m_attachmentTitles.Add(title); }
52
53 void SetSubject(const wxString& subject) { m_subject = subject; }
54 void SetBody(const wxString& body) { m_body = body; }
55
56 public:
57 wxArrayString m_to; //The To: Recipients
58 wxArrayString m_cc; //The CC: Recipients
59 wxArrayString m_bcc; //The BCC Recipients
60 wxString m_subject; //The Subject of the message
61 wxString m_body; //The Body of the message
62 wxArrayString m_attachments; //Files to attach to the email
63 wxArrayString m_attachmentTitles; //Titles to use for the email file attachments
64 };
65
66 #endif // _WX_MSG_H_
67