Update of /cvsroot/mahogany/M/include
In directory usw-pr-cvs1:/tmp/cvs-serv14708/include
Modified Files:
FolderType.h Message.h MessageCC.h SendMessage.h
SendMessageCC.h
Log Message:
implemented "Bounce" command
Index: FolderType.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/FolderType.h,v
retrieving revision 1.52
retrieving revision 1.53
diff -b -u -2 -r1.52 -r1.53
--- FolderType.h 15 Feb 2002 18:49:14 -0000 1.52
+++ FolderType.h 11 Jun 2002 20:22:27 -0000 1.53
@@ -134,12 +134,16 @@
/// invalid value
Prot_Illegal,
+
/// use SMTP
Prot_SMTP,
+
/// use NNTP
Prot_NNTP,
+
/// use local sendmail agent
Prot_Sendmail,
- /// default delivery mode
- Prot_Default = Prot_SMTP
+
+ /// default mail delivery mode, i.e. either Prot_SMTP or Prot_Sendmail
+ Prot_Default
};
Index: Message.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/Message.h,v
retrieving revision 1.62
retrieving revision 1.63
diff -b -u -2 -r1.62 -r1.63
--- Message.h 16 Mar 2002 23:38:47 -0000 1.62
+++ Message.h 11 Jun 2002 20:22:27 -0000 1.63
@@ -316,5 +316,5 @@
@return the uninterpreted message body
*/
- virtual String FetchText(void) = 0;
+ virtual String FetchText(void) const = 0;
/** Write the message to a String.
Index: MessageCC.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/MessageCC.h,v
retrieving revision 1.51
retrieving revision 1.52
diff -b -u -2 -r1.51 -r1.52
--- MessageCC.h 16 Mar 2002 23:38:47 -0000 1.51
+++ MessageCC.h 11 Jun 2002 20:22:27 -0000 1.52
@@ -77,5 +77,5 @@
@return the uninterpreted message body
*/
- virtual String FetchText(void);
+ virtual String FetchText(void) const;
/** get the decoded part text
Index: SendMessage.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/SendMessage.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -b -u -2 -r1.9 -r1.10
--- SendMessage.h 16 Mar 2002 23:38:47 -0000 1.9
+++ SendMessage.h 11 Jun 2002 20:22:27 -0000 1.10
@@ -14,4 +14,5 @@
#define SENDMESSAGE_H
+class Message;
class Profile;
@@ -20,4 +21,11 @@
// ----------------------------------------------------------------------------
+/**
+ SendMessage represents an outgoing message: usually you first create an
+ object of this class, then fill the headers and finally call SendOrQueue()
+ which either sends the message or stores it in the Outbox to be sent later.
+
+ Alternatively, you may use CreateResent() to redirect an existing message.
+ */
class SendMessage
{
@@ -35,13 +43,32 @@
};
+ /** @name Creating outgoing messages
+
+ A new message is created with Create(), to redirect/bounce an existing
+ one, use CreateResent()
+ */
+ //@{
+
/** Creates an empty object, setting some initial values.
- @param prof pointer to the profile to use
+ @param profile pointer to the profile to use (must be non NULL)
@param protocol which protocol to use for sending
@param frame the parent window for dialogs, may be NULL
*/
- static SendMessage *Create(Profile *prof,
+ static SendMessage *Create(Profile *profile,
Protocol protocol = Prot_Default,
wxFrame *frame = NULL);
+
+ /** Creates a duplicate of an existing message.
+
+ @param profile pointer to the profile to use (must be non NULL)
+ @param message the original message (can't be NULL)
+ @param frame the parent window for dialogs, may be NULL
+ */
+ static SendMessage *CreateResent(Profile *profile,
+ const Message *message,
+ wxFrame *frame = NULL);
+
+ //@}
/** @name Standard headers */
Index: SendMessageCC.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/SendMessageCC.h,v
retrieving revision 1.50
retrieving revision 1.51
diff -b -u -2 -r1.50 -r1.51
--- SendMessageCC.h 16 Mar 2002 23:38:47 -0000 1.50
+++ SendMessageCC.h 11 Jun 2002 20:22:27 -0000 1.51
@@ -46,7 +46,4 @@
{
public:
- // ctor for base class static Create()
- SendMessageCC(Profile *profile, Protocol protocol, wxFrame *frame);
-
// implement the base class pure virtuals
@@ -106,4 +103,23 @@
protected:
+ /** @name Construction */
+ //@{
+
+ /**
+ Ctor for base class static Create()
+ */
+ SendMessageCC(Profile *profile,
+ Protocol protocol,
+ wxFrame *frame,
+ const Message *message = NULL);
+
+ /// init the fields for a new message
+ void InitNew();
+
+ /// init the fields for a resent message
+ void InitResent(const Message *message);
+
+ //@}
+
/** Sends the message.
@@ -183,4 +199,7 @@
#endif // USE_SSL
+ /// has the message been properly created (set by Build())?
+ bool m_wasBuilt;
+
/** @name Address fields
*/
@@ -223,7 +242,4 @@
wxFontEncoding m_encHeaders;
- /// 2nd stage constructor, see constructor
- void Create(Protocol protocol, Profile *prof, wxFrame *frame);
-
/// Protocol used for sending
Protocol m_Protocol;
@@ -253,4 +269,7 @@
/// the parent frame (only used for the dialogs)
wxFrame *m_frame;
+
+ // it uses our ctor
+ friend class SendMessage;
// give it access to m_headerNames nad m_headerValues
_______________________________________________________________
Multimillion Dollar Computer Inventory
Live Webcast Auctions Thru Aug. 2002 - http://www.cowanalexander.com/calendar
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates