[Csmail-patches] CVS: csmail/src/CSMail ChangeLog,1.35,1.36 ContentType.cs,1.2,1.3 MimeMultipart.cs,
Status: Pre-Alpha
Brought to you by:
mastergaurav
From: Gaurav V. <mas...@us...> - 2002-09-12 07:13:29
|
Update of /cvsroot/csmail/csmail/src/CSMail In directory usw-pr-cvs1:/tmp/cvs-serv3731/csmail/src/CSMail Modified Files: ChangeLog ContentType.cs MimeMultipart.cs Multipart.cs Log Message: 2002-09-12 * ContentType.cs : SubType - Writable : PrimaryType - Writable * Multipart.cs : bodyParts - Protected : ParseBodyParts() - Added * MimeMultipart.cs : ctor()'s - Implemented : SubType {get; set;} - Implemented Index: ChangeLog =================================================================== RCS file: /cvsroot/csmail/csmail/src/CSMail/ChangeLog,v retrieving revision 1.35 retrieving revision 1.36 diff -u -r1.35 -r1.36 --- ChangeLog 10 Sep 2002 10:43:37 -0000 1.35 +++ ChangeLog 12 Sep 2002 07:13:25 -0000 1.36 @@ -1,4 +1,13 @@ +2002-09-12 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + + * ContentType.cs : SubType - Writable + : PrimaryType - Writable + * Multipart.cs : bodyParts - Protected + : ParseBodyParts() - Added + * MimeMultipart.cs : ctor()'s - Implemented + : SubType {get; set;} - Implemented + 2002-09-10 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * Service.cs : Close() - Implemented Index: ContentType.cs =================================================================== RCS file: /cvsroot/csmail/csmail/src/CSMail/ContentType.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ContentType.cs 5 Sep 2002 05:17:49 -0000 1.2 +++ ContentType.cs 12 Sep 2002 07:13:25 -0000 1.3 @@ -61,6 +61,10 @@ return primaryType; return String.Empty; } + set + { + primaryType = value; + } } /// <summary> @@ -76,6 +80,10 @@ if(subType != null) return subType; return String.Empty; + } + set + { + subType = value; } } Index: MimeMultipart.cs =================================================================== RCS file: /cvsroot/csmail/csmail/src/CSMail/MimeMultipart.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- MimeMultipart.cs 9 Sep 2002 09:37:54 -0000 1.1 +++ MimeMultipart.cs 12 Sep 2002 07:13:25 -0000 1.2 @@ -15,48 +15,58 @@ { public class MimeMultipart : Multipart { - [MailTODO] - public MimeMultipart() + protected bool isParsed; + + public MimeMultipart(): this("mixed") { - throw new NotImplementedException(); } - [MailTODO] public MimeMultipart(string subPart) { - throw new NotImplementedException(); + isParsed = true; + CType = new ContentType("multipart", subPart); + // Have to set a new Boundary Value; } - [MailTODO] public string SubType { get { - throw new NotImplementedException(); + return CType.SubType; } set { - throw new NotImplementedException(); + CType.SubType = value; } } [MailTODO] - public int Count + public BodyPart GetBodyPart(int index) { - get - { - throw new NotImplementedException(); - } + throw new NotImplementedException(); } [MailTODO] - public BodyPart GetBodyPart(int index) + public BodyPart GetBodyPart(string contentID) { throw new NotImplementedException(); } + /// <summary> + /// See remarks + /// </summary> + /// <remarks> + /// 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? + /// 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? + /// </remarks> [MailTODO] - public BodyPart GetBodyPart(string contentID) + protected override void ParseBodyParts() { throw new NotImplementedException(); } Index: Multipart.cs =================================================================== RCS file: /cvsroot/csmail/csmail/src/CSMail/Multipart.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Multipart.cs 6 Sep 2002 11:52:29 -0000 1.3 +++ Multipart.cs 12 Sep 2002 07:13:25 -0000 1.4 @@ -30,7 +30,11 @@ public abstract class Multipart { private IPart parent; - private BodyPartList bodyParts; + + /// <summary> + /// Encapsulates all the parts of this multipart. + /// </summary> + protected BodyPartList bodyParts; /// <summary> /// The associated content type. @@ -80,6 +84,7 @@ { get { + ParseBodyParts(); return bodyParts; } } @@ -89,5 +94,14 @@ /// </summary> /// <param name="writer">The stream to write to.</param> public abstract void WriteTo(StreamWriter writer); + + /// <summary> + /// Parse the raw data to generate bodyparts. + /// </summary> + /// <remarks> + /// I have to get some stream from somewhere. + /// But from where and how? + /// </remarks> + protected abstract void ParseBodyParts(); } } |