[Csmail-patches] CVS: csmail/src/CSMail ChangeLog,1.44,1.45 MimeBodyPart.cs,1.3,1.4 MimeMultipart.cs
Status: Pre-Alpha
Brought to you by:
mastergaurav
From: Gaurav V. <mas...@us...> - 2002-09-24 06:37:23
|
Update of /cvsroot/csmail/csmail/src/CSMail In directory usw-pr-cvs1:/tmp/cvs-serv18400 Modified Files: ChangeLog MimeBodyPart.cs MimeMultipart.cs Log Message: 2002-09-17 * MimeBodyPart.cs : Documented. And raised doubts and questions. * MimeMultipart.cs : UpdateHeaders - Marked virtual : CreateMimeBodyPart(...)- Marked virtual : CreateHeaders(...) - Marked virtual : Parse() - Marked virtual Index: ChangeLog =================================================================== RCS file: /cvsroot/csmail/csmail/src/CSMail/ChangeLog,v retrieving revision 1.44 retrieving revision 1.45 diff -u -r1.44 -r1.45 --- ChangeLog 19 Sep 2002 11:13:35 -0000 1.44 +++ ChangeLog 24 Sep 2002 06:37:20 -0000 1.45 @@ -1,6 +1,14 @@ 2002-09-17 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + * MimeBodyPart.cs : Documented. And raised doubts and questions. + * MimeMultipart.cs : UpdateHeaders - Marked virtual + : CreateMimeBodyPart(...)- Marked virtual + : CreateHeaders(...) - Marked virtual + : Parse() - Marked virtual + +2002-09-17 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + * MimeBodyPart.cs : TransferEncoding - Marked virtual : Text - Marked virtual : ContentMD5 - Marked virtual Index: MimeBodyPart.cs =================================================================== RCS file: /cvsroot/csmail/csmail/src/CSMail/MimeBodyPart.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- MimeBodyPart.cs 19 Sep 2002 11:13:35 -0000 1.3 +++ MimeBodyPart.cs 24 Sep 2002 06:37:20 -0000 1.4 @@ -13,28 +13,55 @@ namespace CSMail { + /// <summary> + /// Class that encapsulates a part of a + /// <see cref="MimeMessage"/>. + /// </summary> public class MimeBodyPart : BodyPart, IMimePart { + /// <summary> + /// List of headers for this part. + /// </summary> protected HeaderList headers; + /// <summary> + /// The content of this part. + /// </summary> protected byte[] content; + /// <summary> + /// Creates an empty part. + /// </summary> public MimeBodyPart() { headers = new HeaderList(); } + /// <summary> + /// Tries to create a part from the given + /// input stream. + /// </summary> + /// <param name="reader">Stream from where to + /// read the contents for the part.</param> [MailTODO] public MimeBodyPart(StreamReader reader) { throw new NotImplementedException(); } + /// <summary> + /// Creates a part with given headers and content. + /// </summary> + /// <param name="headers">The headers of this part.</param> + /// <param name="content">Content of this part.</param> public MimeBodyPart(HeaderList headers, byte[] content) { this.headers = headers; this.content = content; } + /// <summary> + /// Returns the size of the part in bytes. + /// </summary> [MailTODO] public override int Size { @@ -44,6 +71,12 @@ } } + /// <summary> + /// Gets or sets the headers for this part. + /// </summary> + /// <value> + /// Contains the headers related to the body part held. + /// </value> public override HeaderList Headers { get @@ -56,6 +89,9 @@ } } + /// <summary> + /// Gets or sets the content for this part. + /// </summary> [MailTODO] public override Multipart Content { @@ -69,6 +105,14 @@ } } + /// <summary> + /// Gets or sets the value of "Content-Type" header. + /// </summary> + /// <remarks> + /// I will changed the implementation to read from or + /// write to the headers of this part, and not as a part + /// of the PartState. + /// </remarks> public override ContentType ContentType { get @@ -84,6 +128,14 @@ } } + /// <summary> + /// Gets or sets the value of "Description" header. + /// </summary> + /// <remarks> + /// I will changed the implementation to read from or + /// write to the headers of this part, and not as a part + /// of the PartState. + /// </remarks> public override string Description { get @@ -99,6 +151,14 @@ } } + /// <summary> + /// Gets or sets the value of "Content-Disposition" header. + /// </summary> + /// <remarks> + /// I will changed the implementation to read from or + /// write to the headers of this part, and not as a part + /// of the PartState. + /// </remarks> public override ContentDisposition Disposition { get @@ -116,6 +176,15 @@ } } + /// <summary> + /// Gets or sets the value of filename associated with this part, + /// if any. + /// </summary> + /// <remarks> + /// I will changed the implementation to read from or + /// write to the headers of this part, and not as a part + /// of the PartState. + /// </remarks> public override string Filename { get @@ -131,6 +200,14 @@ } } + /// <summary> + /// Gets or sets the value of "Content-ID" header. + /// </summary> + /// <remarks> + /// I will changed the implementation to read from or + /// write to the headers of this part, and not as a part + /// of the PartState. + /// </remarks> public virtual string ContentID { get @@ -146,6 +223,14 @@ } } + /// <summary> + /// Gets or sets the value of "Content-Language" header. + /// </summary> + /// <remarks> + /// I will changed the implementation to read from or + /// write to the headers of this part, and not as a part + /// of the PartState. + /// </remarks> public virtual string ContentLanguage { get @@ -161,6 +246,14 @@ } } + /// <summary> + /// Gets or sets the value of "Content-MD5" header. + /// </summary> + /// <remarks> + /// I will changed the implementation to read from or + /// write to the headers of this part, and not as a part + /// of the PartState. + /// </remarks> public virtual string ContentMD5 { get @@ -176,6 +269,10 @@ } } + /// <summary> + /// Gets or sets the value of text for a body + /// whose "ContentType" is "text/plain". + /// </summary> public virtual string Text { get @@ -191,6 +288,14 @@ } } + /// <summary> + /// Gets or sets the value of "Transfer-Encoding" header. + /// </summary> + /// <remarks> + /// I will changed the implementation to read from or + /// write to the headers of this part, and not as a part + /// of the PartState. + /// </remarks> public virtual TransferEncoding TransferEncoding { get @@ -206,12 +311,34 @@ } } + /// <summary> + /// Updates the headers for this part. + /// </summary> + /// <remarks> + /// <para> + /// Though I have copied this method (signature at least), + /// but I don't think there should be any use. I am still + /// confused as to where and when will it be used. + /// </para> + /// <para> + /// May be just before <see cref="Write(TextWriter)"/> is + /// called. + /// </para> + /// </remarks> [MailTODO] public virtual void UpdateHeaders() { throw new NotImplementedException(); } + /// <summary> + /// Writes the headers and content to the given + /// writer. + /// </summary> + /// <remarks> + /// I am thinking of moving from <see cref="TextWriter"/> + /// to <see cref="StreamWriter"/>. + /// </remarks> [MailTODO] public override void Write(TextWriter writer) { Index: MimeMultipart.cs =================================================================== RCS file: /cvsroot/csmail/csmail/src/CSMail/MimeMultipart.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- MimeMultipart.cs 19 Sep 2002 08:16:15 -0000 1.5 +++ MimeMultipart.cs 24 Sep 2002 06:37:20 -0000 1.6 @@ -57,14 +57,18 @@ /// See remarks /// </summary> /// <remarks> + /// <para> /// I have to get raw data (stream) from somewhere. /// Not this makes me think over the issue of /// a DataSource. Do I need it now? + /// </para> + /// <para> /// But that will mean looking into the /// whole of Activation framework and understanding it. /// Now, how does Java-Mail get the DataSource /// when <c>default constructor</c> or /// <c>ctor(string)</c> is called? + /// </para> /// </remarks> [MailTODO] protected override void ParseBodyParts() @@ -73,7 +77,7 @@ } [MailTODO] - protected void UpdateHeaders() + protected virtual void UpdateHeaders() { throw new NotImplementedException(); } @@ -85,25 +89,25 @@ } [MailTODO] - protected MimeBodyPart CreateMimeBodyPart(StreamReader reader) + protected virtual MimeBodyPart CreateMimeBodyPart(StreamReader reader) { throw new NotImplementedException(); } [MailTODO] - protected MimeBodyPart CreateMimeBodyPart(HeaderList headers, byte[] content) + protected virtual MimeBodyPart CreateMimeBodyPart(HeaderList headers, byte[] content) { throw new NotImplementedException(); } [MailTODO] - protected MimeBodyPart CreateHeaders(StreamReader reader) + protected virtual HeaderList CreateHeaders(StreamReader reader) { throw new NotImplementedException(); } [MailTODO] - protected void Parse() + protected virtual void Parse() { throw new NotImplementedException(); } |