Update of /cvsroot/csmail/csmail/src/CSMail
In directory usw-pr-cvs1:/tmp/cvs-serv17739
Modified Files:
ChangeLog Session.cs
Added Files:
MailEventArgs.cs MailEventHandler.cs Transport.cs
Log Message:
2002-09-02
* Session.cs : GetTransport(...) - Implemented all
: GetTransport(URLName, Provider)
- Stubbed
* Transport.cs : Stubbed class.
* MailEventHandler.cs : Added delegate
* MailEventArgs.cs : Partial implementation.
--- NEW FILE ---
/**
* Namespace: CSMail
* Class: MailEventArgs
*
* Author: Gaurav Vaish
* Maintainer: mastergaurav AT users DOT sf DOT net
*
* (C) Gaurav Vaish (2002)
*/
namespace CSMail
{
public class MailEventArgs
{
private object obj;
public MailEventArgs(object obj)
{
this.obj = obj;
}
}
}
--- NEW FILE ---
/**
* Namespace: CSMail
* Class: MailEventHandler
*
* Author: Gaurav Vaish
* Maintainer: mastergaurav AT users DOT sf DOT net
*
* (C) Gaurav Vaish (2002)
*/
namespace CSMail
{
public delegate void MailEventHandler(object sender,
MailEventArgs e);
}
--- NEW FILE ---
/**
* Namespace: CSMail
* Class: Transport
*
* Author: Gaurav Vaish
* Maintainer: mastergaurav AT users DOT sf DOT net
*
* (C) Gaurav Vaish (2002)
*/
namespace CSMail
{
public abstract class Transport : Service
{
protected Transport(Session session, URLName urlname)
: base(session, urlname)
{
}
[MailTODO]
public static void Send(Message message)
{
throw new NotImplementedException();
}
[MailTODO]
public static void Send(Message message, IAddressList addresses)
{
throw new NotImplementedException();
}
public abstract void SendMessage(Message msg, IAddressList addresses);
}
}
Index: ChangeLog
===================================================================
RCS file: /cvsroot/csmail/csmail/src/CSMail/ChangeLog,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- ChangeLog 2 Sep 2002 12:49:17 -0000 1.21
+++ ChangeLog 2 Sep 2002 13:07:54 -0000 1.22
@@ -1,6 +1,15 @@
2002-09-02 Gaurav Vaish <mastergaurav AT users DOT sf DOT net>
+ * Session.cs : GetTransport(...) - Implemented all
+ : GetTransport(URLName, Provider)
+ - Stubbed
+ * Transport.cs : Stubbed class.
+ * MailEventHandler.cs : Added delegate
+ * MailEventArgs.cs : Partial implementation.
+
+2002-09-02 Gaurav Vaish <mastergaurav AT users DOT sf DOT net>
+
* Service.cs : Why do I need destructor? or have I forgotten
something that I thought earlier?
* Session.cs : GetStore(...) - Implemented all.
Index: Session.cs
===================================================================
RCS file: /cvsroot/csmail/csmail/src/CSMail/Session.cs,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- Session.cs 2 Sep 2002 12:49:17 -0000 1.11
+++ Session.cs 2 Sep 2002 13:07:54 -0000 1.12
@@ -73,6 +73,36 @@
throw new NotImplementedException();
}
+ public Transport GetTransport()
+ {
+ return GetTransport("mail.transport.protocol");
+ }
+
+ public Transport GetTransport(string protocol)
+ {
+ return GetTransport(new URLName(protocol, null, -1, null, null, null));
+ }
+
+ public Transport GetTransport(URLName url)
+ {
+ return GetTransport(url, (url == null ? null : Providers[url.Protocol]));
+ }
+
+ public Transport GetTransport(Provider provider)
+ {
+ return GetTransport(null, provider);
+ }
+
+ [MailTODO]
+ private Transport GetTransport(URLName url, Provider provider)
+ {
+ if(provider == null || provider.Type != ProviderType.Store)
+ {
+ throw new NoSuchProviderException("Invalid provider");
+ }
+ throw new NotImplementedException();
+ }
+
private Session(Properties properties, Authenticator authenticator)
{
this.properties = properties;
|