nmailserver-commits Mailing List for NMail (Page 6)
Brought to you by:
dframpton-oss,
tmyroadctfig
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(13) |
Jun
(14) |
Jul
(8) |
Aug
|
Sep
|
Oct
(8) |
Nov
(22) |
Dec
(9) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(21) |
Feb
(31) |
Mar
(24) |
Apr
(8) |
May
(23) |
Jun
(40) |
Jul
(14) |
Aug
(5) |
Sep
(7) |
Oct
(10) |
Nov
|
Dec
|
| 2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <tmy...@us...> - 2007-03-04 05:28:35
|
Revision: 162
http://svn.sourceforge.net/nmailserver/?rev=162&view=rev
Author: tmyroadctfig
Date: 2007-03-03 21:28:35 -0800 (Sat, 03 Mar 2007)
Log Message:
-----------
Changes to CalendarEntry.
Modified Paths:
--------------
NMail/trunk/NMail/DataTypes/Calendar/CalendarEntry.cs
NMail/trunk/NMail/NMail.csproj
Modified: NMail/trunk/NMail/DataTypes/Calendar/CalendarEntry.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/Calendar/CalendarEntry.cs 2007-03-04 05:27:53 UTC (rev 161)
+++ NMail/trunk/NMail/DataTypes/Calendar/CalendarEntry.cs 2007-03-04 05:28:35 UTC (rev 162)
@@ -34,15 +34,15 @@
set { classification = value; }
}
- private List<string> categories;
+ private IList<string> categories = new List<string>();
/// <summary>
/// The categories associated with the entry. (iCal "CATEGORIES")
/// </summary>
- public List<string> Categories {
+ public IList<string> Categories {
get { return categories; }
set { categories = value; }
- }
+ }
private string description;
@@ -90,8 +90,20 @@
#region Relationship Component Properties
- // TODO: array of attendees
+ private IList<Attendee> attendees = new List<Attendee>();
+ /// <summary>
+ /// A list of attendees for the event. (iCal "ATTENDEE")
+ /// </summary>
+ public IList<Attendee> Attendees {
+ get {
+ return this.attendees;
+ }
+ set {
+ this.attendees = value;
+ }
+ }
+
// TODO: contact list
private EmailAddress organiser;
@@ -105,10 +117,36 @@
set { organiser = value;}
}
- // TODO: UID
+ private long entryId;
- // TODO: URL?
+ /// <summary>
+ /// The unique Id for this calendar entry. Specific recurrences of this instance
+ /// can be obtain using this Id in combination with RecurrenceId. (iCal "UID")
+ /// </summary>
+ public long EntryId {
+ get { return entryId; }
+ set { entryId = value; }
+ }
+ private int ownerUserId;
+
+ /// <summary>
+ /// The Id of the user who owns the calender entry.
+ /// </summary>
+ public int OwnerUserId {
+ get { return ownerUserId; }
+ set { ownerUserId = value; }
+ }
+
+ private Calendar calendar;
+
+ /// <summary>
+ /// The calendar that this entry belongs to.
+ /// </summary>
+ public Calendar Calendar {
+ get { return calendar; }
+ set { calendar = value; }
+ }
#endregion
#region Recurrence Component Properties
@@ -125,8 +163,15 @@
// TODO: exdate, exrule
- //TODO: RECURRENCE-ID
+ private DateTime recurrenceId;
+ /// <summary>
+ /// The recurrence Id for this recurrence of the entry. (iCal "RECURRENCE-ID-")
+ /// </summary>
+ public DateTime RecurrenceId {
+ get { return recurrenceId; }
+ set { recurrenceId = value; }
+ }
#endregion
#region Change Management Component Properties
Modified: NMail/trunk/NMail/NMail.csproj
===================================================================
--- NMail/trunk/NMail/NMail.csproj 2007-03-04 05:27:53 UTC (rev 161)
+++ NMail/trunk/NMail/NMail.csproj 2007-03-04 05:28:35 UTC (rev 162)
@@ -137,10 +137,12 @@
<Compile Include="DataTypes\Calendar\Calendar.cs" />
<Compile Include="DataTypes\Calendar\CalendarAlarm.cs" />
<Compile Include="DataTypes\Calendar\CalendarEntry.cs" />
- <Compile Include="DataTypes\Calendar\CalendarEntryStatus.cs" />
- <Compile Include="DataTypes\Calendar\CalendarEvent.cs" />
+ <Compile Include="DataTypes\Calendar\CalendarEntryStatus.cs">
+ <SubType>Code</SubType>
+ </Compile>
<Compile Include="DataTypes\Calendar\CountRecurreneRule.cs" />
<Compile Include="DataTypes\Calendar\DateRecurrenceRule.cs" />
+ <Compile Include="DataTypes\Calendar\EventEntry.cs" />
<Compile Include="DataTypes\Calendar\JournalEntry.cs" />
<Compile Include="DataTypes\Calendar\RecurrenceFrequency.cs" />
<Compile Include="DataTypes\Calendar\RecurrenceRule.cs" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-03-04 05:27:53
|
Revision: 161
http://svn.sourceforge.net/nmailserver/?rev=161&view=rev
Author: tmyroadctfig
Date: 2007-03-03 21:27:53 -0800 (Sat, 03 Mar 2007)
Log Message:
-----------
Minor project file changes.
Modified Paths:
--------------
NMail/trunk/NMail.Server.Console/NMail.Server.Console.csproj
NMail/trunk/NMail.Server.Service/NMail.Server.Service.csproj
NMail/trunk/NMail.sln
Modified: NMail/trunk/NMail.Server.Console/NMail.Server.Console.csproj
===================================================================
--- NMail/trunk/NMail.Server.Console/NMail.Server.Console.csproj 2007-03-04 05:25:05 UTC (rev 160)
+++ NMail/trunk/NMail.Server.Console/NMail.Server.Console.csproj 2007-03-04 05:27:53 UTC (rev 161)
@@ -142,10 +142,9 @@
<Project>{AEFF4DA8-7243-44C2-8223-69035380B042}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
</ProjectReference>
- <ProjectReference Include="..\NMail.SpoolData.MySql\NMail.SpoolData.MySql.csproj">
- <Name>NMail.SpoolData.MySql</Name>
- <Project>{68D6D57F-02CC-419F-8D69-3B479A1BFBED}</Project>
- <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
+ <ProjectReference Include="..\NMail.SpoolData.NHibernate\NMail.SpoolData.NHibernate.csproj">
+ <Project>{A5EAEF38-D326-40B0-A51F-8A96D0621EEC}</Project>
+ <Name>NMail.SpoolData.NHibernate</Name>
</ProjectReference>
<ProjectReference Include="..\NMail.SpoolFilter.RegexAddressRewriter\NMail.SpoolFilter.RegexAddressRewriter.csproj">
<Name>NMail.SpoolFilter.RegexAddressRewriter</Name>
Modified: NMail/trunk/NMail.Server.Service/NMail.Server.Service.csproj
===================================================================
--- NMail/trunk/NMail.Server.Service/NMail.Server.Service.csproj 2007-03-04 05:25:05 UTC (rev 160)
+++ NMail/trunk/NMail.Server.Service/NMail.Server.Service.csproj 2007-03-04 05:27:53 UTC (rev 161)
@@ -139,11 +139,6 @@
<Project>{AEFF4DA8-7243-44C2-8223-69035380B042}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
</ProjectReference>
- <ProjectReference Include="..\NMail.SpoolData.MySql\NMail.SpoolData.MySql.csproj">
- <Name>NMail.SpoolData.MySql</Name>
- <Project>{68D6D57F-02CC-419F-8D69-3B479A1BFBED}</Project>
- <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
- </ProjectReference>
<ProjectReference Include="..\NMail.SpoolFilter.RegexAddressRewriter\NMail.SpoolFilter.RegexAddressRewriter.csproj">
<Name>NMail.SpoolFilter.RegexAddressRewriter</Name>
<Project>{557B24C8-98B1-4033-B3E2-F7B1B6C50033}</Project>
Modified: NMail/trunk/NMail.sln
===================================================================
--- NMail/trunk/NMail.sln 2007-03-04 05:25:05 UTC (rev 160)
+++ NMail/trunk/NMail.sln 2007-03-04 05:27:53 UTC (rev 161)
@@ -2,8 +2,6 @@
# Visual C# Express 2005
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NMail.LocalStoreData.MySql", "NMail.LocalStoreData.MySql\NMail.LocalStoreData.MySql.csproj", "{90B33C2B-F945-478A-BBA0-4F66EF78B870}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NMail.SpoolData.MySql", "NMail.SpoolData.MySql\NMail.SpoolData.MySql.csproj", "{68D6D57F-02CC-419F-8D69-3B479A1BFBED}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NMail.ImapService", "NMail.ImapService\NMail.ImapService.csproj", "{A6C6E9C2-5A17-4E00-9CE7-550C0359E023}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoPrivileges", "MonoPrivileges\MonoPrivileges.csproj", "{18586CD8-276B-44E7-B0C1-B8537D8A8090}"
@@ -46,104 +44,240 @@
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NMail.RemoteAccessService.Serializers", "NMail.RemoteAccessService.Serializers\NMail.RemoteAccessService.Serializers.csproj", "{A54F735E-454A-4C65-8A61-66330AA64678}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NMail.SpoolData.NHibernate", "NMail.SpoolData.NHibernate\NMail.SpoolData.NHibernate.csproj", "{A5EAEF38-D326-40B0-A51F-8A96D0621EEC}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunit-gui.exe_VS2005", "..\..\..\NUnit-src\GuiRunner\nunit-gui-exe\nunit-gui.exe_VS2005.csproj", "{AAB186A4-FA3D-404D-AD78-7EB5BB861655}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NHibernate-2.0", "..\..\..\..\..\..\Program Files\NHibernate\src\src\NHibernate\NHibernate-2.0.csproj", "{5909BFE7-93CF-4E5F-BE22-6293368AF01D}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NMail.LocalStoreData.NHibernate", "NMail.LocalStoreData.NHibernate\NMail.LocalStoreData.NHibernate.csproj", "{72F7E307-F0A9-4750-9ED5-5A1F97725A11}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NMail.SpoolData.MySql", "NMail.SpoolData.MySql\NMail.SpoolData.MySql.csproj", "{68D6D57F-02CC-419F-8D69-3B479A1BFBED}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
+ Debug2005|Any CPU = Debug2005|Any CPU
Release|Any CPU = Release|Any CPU
+ Release2005|Any CPU = Release2005|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{90B33C2B-F945-478A-BBA0-4F66EF78B870}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{90B33C2B-F945-478A-BBA0-4F66EF78B870}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {90B33C2B-F945-478A-BBA0-4F66EF78B870}.Debug2005|Any CPU.ActiveCfg = Debug|Any CPU
+ {90B33C2B-F945-478A-BBA0-4F66EF78B870}.Debug2005|Any CPU.Build.0 = Debug|Any CPU
{90B33C2B-F945-478A-BBA0-4F66EF78B870}.Release|Any CPU.ActiveCfg = Release|Any CPU
{90B33C2B-F945-478A-BBA0-4F66EF78B870}.Release|Any CPU.Build.0 = Release|Any CPU
- {68D6D57F-02CC-419F-8D69-3B479A1BFBED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {68D6D57F-02CC-419F-8D69-3B479A1BFBED}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {68D6D57F-02CC-419F-8D69-3B479A1BFBED}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {68D6D57F-02CC-419F-8D69-3B479A1BFBED}.Release|Any CPU.Build.0 = Release|Any CPU
+ {90B33C2B-F945-478A-BBA0-4F66EF78B870}.Release2005|Any CPU.ActiveCfg = Release|Any CPU
+ {90B33C2B-F945-478A-BBA0-4F66EF78B870}.Release2005|Any CPU.Build.0 = Release|Any CPU
{A6C6E9C2-5A17-4E00-9CE7-550C0359E023}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A6C6E9C2-5A17-4E00-9CE7-550C0359E023}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A6C6E9C2-5A17-4E00-9CE7-550C0359E023}.Debug2005|Any CPU.ActiveCfg = Debug|Any CPU
+ {A6C6E9C2-5A17-4E00-9CE7-550C0359E023}.Debug2005|Any CPU.Build.0 = Debug|Any CPU
{A6C6E9C2-5A17-4E00-9CE7-550C0359E023}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A6C6E9C2-5A17-4E00-9CE7-550C0359E023}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A6C6E9C2-5A17-4E00-9CE7-550C0359E023}.Release2005|Any CPU.ActiveCfg = Release|Any CPU
+ {A6C6E9C2-5A17-4E00-9CE7-550C0359E023}.Release2005|Any CPU.Build.0 = Release|Any CPU
{18586CD8-276B-44E7-B0C1-B8537D8A8090}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{18586CD8-276B-44E7-B0C1-B8537D8A8090}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {18586CD8-276B-44E7-B0C1-B8537D8A8090}.Debug2005|Any CPU.ActiveCfg = Debug|Any CPU
+ {18586CD8-276B-44E7-B0C1-B8537D8A8090}.Debug2005|Any CPU.Build.0 = Debug|Any CPU
{18586CD8-276B-44E7-B0C1-B8537D8A8090}.Release|Any CPU.ActiveCfg = Release|Any CPU
{18586CD8-276B-44E7-B0C1-B8537D8A8090}.Release|Any CPU.Build.0 = Release|Any CPU
+ {18586CD8-276B-44E7-B0C1-B8537D8A8090}.Release2005|Any CPU.ActiveCfg = Release|Any CPU
+ {18586CD8-276B-44E7-B0C1-B8537D8A8090}.Release2005|Any CPU.Build.0 = Release|Any CPU
{068C691A-2CBB-4249-BDF8-313E538977F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{068C691A-2CBB-4249-BDF8-313E538977F1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {068C691A-2CBB-4249-BDF8-313E538977F1}.Debug2005|Any CPU.ActiveCfg = Debug|Any CPU
+ {068C691A-2CBB-4249-BDF8-313E538977F1}.Debug2005|Any CPU.Build.0 = Debug|Any CPU
{068C691A-2CBB-4249-BDF8-313E538977F1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{068C691A-2CBB-4249-BDF8-313E538977F1}.Release|Any CPU.Build.0 = Release|Any CPU
+ {068C691A-2CBB-4249-BDF8-313E538977F1}.Release2005|Any CPU.ActiveCfg = Release|Any CPU
+ {068C691A-2CBB-4249-BDF8-313E538977F1}.Release2005|Any CPU.Build.0 = Release|Any CPU
{5A5A5012-B157-49B1-A35F-67EC9680112A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5A5A5012-B157-49B1-A35F-67EC9680112A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {5A5A5012-B157-49B1-A35F-67EC9680112A}.Debug2005|Any CPU.ActiveCfg = Debug|Any CPU
+ {5A5A5012-B157-49B1-A35F-67EC9680112A}.Debug2005|Any CPU.Build.0 = Debug|Any CPU
{5A5A5012-B157-49B1-A35F-67EC9680112A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5A5A5012-B157-49B1-A35F-67EC9680112A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {5A5A5012-B157-49B1-A35F-67EC9680112A}.Release2005|Any CPU.ActiveCfg = Release|Any CPU
+ {5A5A5012-B157-49B1-A35F-67EC9680112A}.Release2005|Any CPU.Build.0 = Release|Any CPU
{103510D8-6042-4556-98A2-9FD10D215454}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{103510D8-6042-4556-98A2-9FD10D215454}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {103510D8-6042-4556-98A2-9FD10D215454}.Debug2005|Any CPU.ActiveCfg = Debug|Any CPU
+ {103510D8-6042-4556-98A2-9FD10D215454}.Debug2005|Any CPU.Build.0 = Debug|Any CPU
{103510D8-6042-4556-98A2-9FD10D215454}.Release|Any CPU.ActiveCfg = Release|Any CPU
{103510D8-6042-4556-98A2-9FD10D215454}.Release|Any CPU.Build.0 = Release|Any CPU
+ {103510D8-6042-4556-98A2-9FD10D215454}.Release2005|Any CPU.ActiveCfg = Release|Any CPU
+ {103510D8-6042-4556-98A2-9FD10D215454}.Release2005|Any CPU.Build.0 = Release|Any CPU
{488A8890-EEE1-4ACC-9B35-3DDBE8E70D1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{488A8890-EEE1-4ACC-9B35-3DDBE8E70D1D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {488A8890-EEE1-4ACC-9B35-3DDBE8E70D1D}.Debug2005|Any CPU.ActiveCfg = Debug|Any CPU
+ {488A8890-EEE1-4ACC-9B35-3DDBE8E70D1D}.Debug2005|Any CPU.Build.0 = Debug|Any CPU
{488A8890-EEE1-4ACC-9B35-3DDBE8E70D1D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{488A8890-EEE1-4ACC-9B35-3DDBE8E70D1D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {488A8890-EEE1-4ACC-9B35-3DDBE8E70D1D}.Release2005|Any CPU.ActiveCfg = Release|Any CPU
+ {488A8890-EEE1-4ACC-9B35-3DDBE8E70D1D}.Release2005|Any CPU.Build.0 = Release|Any CPU
{0AB0E8BA-8CAE-479E-AC85-8255103A107C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0AB0E8BA-8CAE-479E-AC85-8255103A107C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0AB0E8BA-8CAE-479E-AC85-8255103A107C}.Debug2005|Any CPU.ActiveCfg = Debug|Any CPU
+ {0AB0E8BA-8CAE-479E-AC85-8255103A107C}.Debug2005|Any CPU.Build.0 = Debug|Any CPU
{0AB0E8BA-8CAE-479E-AC85-8255103A107C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0AB0E8BA-8CAE-479E-AC85-8255103A107C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {0AB0E8BA-8CAE-479E-AC85-8255103A107C}.Release2005|Any CPU.ActiveCfg = Release|Any CPU
+ {0AB0E8BA-8CAE-479E-AC85-8255103A107C}.Release2005|Any CPU.Build.0 = Release|Any CPU
{BE1E923F-4F65-4FEB-BE61-EE99F0D363FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BE1E923F-4F65-4FEB-BE61-EE99F0D363FB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BE1E923F-4F65-4FEB-BE61-EE99F0D363FB}.Debug2005|Any CPU.ActiveCfg = Debug|Any CPU
+ {BE1E923F-4F65-4FEB-BE61-EE99F0D363FB}.Debug2005|Any CPU.Build.0 = Debug|Any CPU
{BE1E923F-4F65-4FEB-BE61-EE99F0D363FB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BE1E923F-4F65-4FEB-BE61-EE99F0D363FB}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BE1E923F-4F65-4FEB-BE61-EE99F0D363FB}.Release2005|Any CPU.ActiveCfg = Release|Any CPU
+ {BE1E923F-4F65-4FEB-BE61-EE99F0D363FB}.Release2005|Any CPU.Build.0 = Release|Any CPU
{45123319-D913-4A92-BB67-C2C9E1A22A17}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{45123319-D913-4A92-BB67-C2C9E1A22A17}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {45123319-D913-4A92-BB67-C2C9E1A22A17}.Debug2005|Any CPU.ActiveCfg = Debug|Any CPU
+ {45123319-D913-4A92-BB67-C2C9E1A22A17}.Debug2005|Any CPU.Build.0 = Debug|Any CPU
{45123319-D913-4A92-BB67-C2C9E1A22A17}.Release|Any CPU.ActiveCfg = Release|Any CPU
{45123319-D913-4A92-BB67-C2C9E1A22A17}.Release|Any CPU.Build.0 = Release|Any CPU
+ {45123319-D913-4A92-BB67-C2C9E1A22A17}.Release2005|Any CPU.ActiveCfg = Release|Any CPU
+ {45123319-D913-4A92-BB67-C2C9E1A22A17}.Release2005|Any CPU.Build.0 = Release|Any CPU
{74518A72-5B04-420D-97E1-80F6F75C70F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{74518A72-5B04-420D-97E1-80F6F75C70F5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {74518A72-5B04-420D-97E1-80F6F75C70F5}.Debug2005|Any CPU.ActiveCfg = Debug|Any CPU
+ {74518A72-5B04-420D-97E1-80F6F75C70F5}.Debug2005|Any CPU.Build.0 = Debug|Any CPU
{74518A72-5B04-420D-97E1-80F6F75C70F5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{74518A72-5B04-420D-97E1-80F6F75C70F5}.Release|Any CPU.Build.0 = Release|Any CPU
+ {74518A72-5B04-420D-97E1-80F6F75C70F5}.Release2005|Any CPU.ActiveCfg = Release|Any CPU
+ {74518A72-5B04-420D-97E1-80F6F75C70F5}.Release2005|Any CPU.Build.0 = Release|Any CPU
{EDEB3526-EDE5-4C0A-BAF5-88D54B99F531}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EDEB3526-EDE5-4C0A-BAF5-88D54B99F531}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {EDEB3526-EDE5-4C0A-BAF5-88D54B99F531}.Debug2005|Any CPU.ActiveCfg = Debug|Any CPU
+ {EDEB3526-EDE5-4C0A-BAF5-88D54B99F531}.Debug2005|Any CPU.Build.0 = Debug|Any CPU
{EDEB3526-EDE5-4C0A-BAF5-88D54B99F531}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EDEB3526-EDE5-4C0A-BAF5-88D54B99F531}.Release|Any CPU.Build.0 = Release|Any CPU
+ {EDEB3526-EDE5-4C0A-BAF5-88D54B99F531}.Release2005|Any CPU.ActiveCfg = Release|Any CPU
+ {EDEB3526-EDE5-4C0A-BAF5-88D54B99F531}.Release2005|Any CPU.Build.0 = Release|Any CPU
{8CDAF015-FF14-4960-BC91-6F2618A6FED3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8CDAF015-FF14-4960-BC91-6F2618A6FED3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8CDAF015-FF14-4960-BC91-6F2618A6FED3}.Debug2005|Any CPU.ActiveCfg = Debug|Any CPU
+ {8CDAF015-FF14-4960-BC91-6F2618A6FED3}.Debug2005|Any CPU.Build.0 = Debug|Any CPU
{8CDAF015-FF14-4960-BC91-6F2618A6FED3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8CDAF015-FF14-4960-BC91-6F2618A6FED3}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8CDAF015-FF14-4960-BC91-6F2618A6FED3}.Release2005|Any CPU.ActiveCfg = Release|Any CPU
+ {8CDAF015-FF14-4960-BC91-6F2618A6FED3}.Release2005|Any CPU.Build.0 = Release|Any CPU
{AEFF4DA8-7243-44C2-8223-69035380B042}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AEFF4DA8-7243-44C2-8223-69035380B042}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {AEFF4DA8-7243-44C2-8223-69035380B042}.Debug2005|Any CPU.ActiveCfg = Debug|Any CPU
+ {AEFF4DA8-7243-44C2-8223-69035380B042}.Debug2005|Any CPU.Build.0 = Debug|Any CPU
{AEFF4DA8-7243-44C2-8223-69035380B042}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AEFF4DA8-7243-44C2-8223-69035380B042}.Release|Any CPU.Build.0 = Release|Any CPU
+ {AEFF4DA8-7243-44C2-8223-69035380B042}.Release2005|Any CPU.ActiveCfg = Release|Any CPU
+ {AEFF4DA8-7243-44C2-8223-69035380B042}.Release2005|Any CPU.Build.0 = Release|Any CPU
{1C585C54-6FE4-47F5-9A1F-8437F412DCF5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1C585C54-6FE4-47F5-9A1F-8437F412DCF5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1C585C54-6FE4-47F5-9A1F-8437F412DCF5}.Debug2005|Any CPU.ActiveCfg = Debug|Any CPU
+ {1C585C54-6FE4-47F5-9A1F-8437F412DCF5}.Debug2005|Any CPU.Build.0 = Debug|Any CPU
{1C585C54-6FE4-47F5-9A1F-8437F412DCF5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1C585C54-6FE4-47F5-9A1F-8437F412DCF5}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1C585C54-6FE4-47F5-9A1F-8437F412DCF5}.Release2005|Any CPU.ActiveCfg = Release|Any CPU
+ {1C585C54-6FE4-47F5-9A1F-8437F412DCF5}.Release2005|Any CPU.Build.0 = Release|Any CPU
{557B24C8-98B1-4033-B3E2-F7B1B6C50033}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{557B24C8-98B1-4033-B3E2-F7B1B6C50033}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {557B24C8-98B1-4033-B3E2-F7B1B6C50033}.Debug2005|Any CPU.ActiveCfg = Debug|Any CPU
+ {557B24C8-98B1-4033-B3E2-F7B1B6C50033}.Debug2005|Any CPU.Build.0 = Debug|Any CPU
{557B24C8-98B1-4033-B3E2-F7B1B6C50033}.Release|Any CPU.ActiveCfg = Release|Any CPU
{557B24C8-98B1-4033-B3E2-F7B1B6C50033}.Release|Any CPU.Build.0 = Release|Any CPU
+ {557B24C8-98B1-4033-B3E2-F7B1B6C50033}.Release2005|Any CPU.ActiveCfg = Release|Any CPU
+ {557B24C8-98B1-4033-B3E2-F7B1B6C50033}.Release2005|Any CPU.Build.0 = Release|Any CPU
{81EA6856-1AA7-4278-B0CC-1F851B987DA0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{81EA6856-1AA7-4278-B0CC-1F851B987DA0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {81EA6856-1AA7-4278-B0CC-1F851B987DA0}.Debug2005|Any CPU.ActiveCfg = Debug|Any CPU
+ {81EA6856-1AA7-4278-B0CC-1F851B987DA0}.Debug2005|Any CPU.Build.0 = Debug|Any CPU
{81EA6856-1AA7-4278-B0CC-1F851B987DA0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{81EA6856-1AA7-4278-B0CC-1F851B987DA0}.Release|Any CPU.Build.0 = Release|Any CPU
+ {81EA6856-1AA7-4278-B0CC-1F851B987DA0}.Release2005|Any CPU.ActiveCfg = Release|Any CPU
+ {81EA6856-1AA7-4278-B0CC-1F851B987DA0}.Release2005|Any CPU.Build.0 = Release|Any CPU
{ED0957A8-FB7C-496B-8301-7A15842A3F01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ED0957A8-FB7C-496B-8301-7A15842A3F01}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {ED0957A8-FB7C-496B-8301-7A15842A3F01}.Debug2005|Any CPU.ActiveCfg = Debug|Any CPU
+ {ED0957A8-FB7C-496B-8301-7A15842A3F01}.Debug2005|Any CPU.Build.0 = Debug|Any CPU
{ED0957A8-FB7C-496B-8301-7A15842A3F01}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ED0957A8-FB7C-496B-8301-7A15842A3F01}.Release|Any CPU.Build.0 = Release|Any CPU
+ {ED0957A8-FB7C-496B-8301-7A15842A3F01}.Release2005|Any CPU.ActiveCfg = Release|Any CPU
+ {ED0957A8-FB7C-496B-8301-7A15842A3F01}.Release2005|Any CPU.Build.0 = Release|Any CPU
{93F9B202-EB30-4FF8-B10F-BD45FD3B7E9F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{93F9B202-EB30-4FF8-B10F-BD45FD3B7E9F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {93F9B202-EB30-4FF8-B10F-BD45FD3B7E9F}.Debug2005|Any CPU.ActiveCfg = Debug|Any CPU
+ {93F9B202-EB30-4FF8-B10F-BD45FD3B7E9F}.Debug2005|Any CPU.Build.0 = Debug|Any CPU
{93F9B202-EB30-4FF8-B10F-BD45FD3B7E9F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{93F9B202-EB30-4FF8-B10F-BD45FD3B7E9F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {93F9B202-EB30-4FF8-B10F-BD45FD3B7E9F}.Release2005|Any CPU.ActiveCfg = Release|Any CPU
+ {93F9B202-EB30-4FF8-B10F-BD45FD3B7E9F}.Release2005|Any CPU.Build.0 = Release|Any CPU
{906413B5-1C7D-4072-B5CF-FDCED1F6CA7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{906413B5-1C7D-4072-B5CF-FDCED1F6CA7C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {906413B5-1C7D-4072-B5CF-FDCED1F6CA7C}.Debug2005|Any CPU.ActiveCfg = Debug|Any CPU
+ {906413B5-1C7D-4072-B5CF-FDCED1F6CA7C}.Debug2005|Any CPU.Build.0 = Debug|Any CPU
{906413B5-1C7D-4072-B5CF-FDCED1F6CA7C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{906413B5-1C7D-4072-B5CF-FDCED1F6CA7C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {906413B5-1C7D-4072-B5CF-FDCED1F6CA7C}.Release2005|Any CPU.ActiveCfg = Release|Any CPU
+ {906413B5-1C7D-4072-B5CF-FDCED1F6CA7C}.Release2005|Any CPU.Build.0 = Release|Any CPU
{DDE40B82-A5D9-4BE4-997B-C7EF3FFF5EBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DDE40B82-A5D9-4BE4-997B-C7EF3FFF5EBD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DDE40B82-A5D9-4BE4-997B-C7EF3FFF5EBD}.Debug2005|Any CPU.ActiveCfg = Debug|Any CPU
+ {DDE40B82-A5D9-4BE4-997B-C7EF3FFF5EBD}.Debug2005|Any CPU.Build.0 = Debug|Any CPU
{DDE40B82-A5D9-4BE4-997B-C7EF3FFF5EBD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DDE40B82-A5D9-4BE4-997B-C7EF3FFF5EBD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {DDE40B82-A5D9-4BE4-997B-C7EF3FFF5EBD}.Release2005|Any CPU.ActiveCfg = Release|Any CPU
+ {DDE40B82-A5D9-4BE4-997B-C7EF3FFF5EBD}.Release2005|Any CPU.Build.0 = Release|Any CPU
{A54F735E-454A-4C65-8A61-66330AA64678}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A54F735E-454A-4C65-8A61-66330AA64678}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A54F735E-454A-4C65-8A61-66330AA64678}.Debug2005|Any CPU.ActiveCfg = Debug|Any CPU
+ {A54F735E-454A-4C65-8A61-66330AA64678}.Debug2005|Any CPU.Build.0 = Debug|Any CPU
{A54F735E-454A-4C65-8A61-66330AA64678}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A54F735E-454A-4C65-8A61-66330AA64678}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A54F735E-454A-4C65-8A61-66330AA64678}.Release2005|Any CPU.ActiveCfg = Release|Any CPU
+ {A54F735E-454A-4C65-8A61-66330AA64678}.Release2005|Any CPU.Build.0 = Release|Any CPU
+ {A5EAEF38-D326-40B0-A51F-8A96D0621EEC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A5EAEF38-D326-40B0-A51F-8A96D0621EEC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A5EAEF38-D326-40B0-A51F-8A96D0621EEC}.Debug2005|Any CPU.ActiveCfg = Debug|Any CPU
+ {A5EAEF38-D326-40B0-A51F-8A96D0621EEC}.Debug2005|Any CPU.Build.0 = Debug|Any CPU
+ {A5EAEF38-D326-40B0-A51F-8A96D0621EEC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A5EAEF38-D326-40B0-A51F-8A96D0621EEC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A5EAEF38-D326-40B0-A51F-8A96D0621EEC}.Release2005|Any CPU.ActiveCfg = Release|Any CPU
+ {A5EAEF38-D326-40B0-A51F-8A96D0621EEC}.Release2005|Any CPU.Build.0 = Release|Any CPU
+ {AAB186A4-FA3D-404D-AD78-7EB5BB861655}.Debug|Any CPU.ActiveCfg = Debug2005|Any CPU
+ {AAB186A4-FA3D-404D-AD78-7EB5BB861655}.Debug|Any CPU.Build.0 = Debug2005|Any CPU
+ {AAB186A4-FA3D-404D-AD78-7EB5BB861655}.Debug2005|Any CPU.ActiveCfg = Debug2005|Any CPU
+ {AAB186A4-FA3D-404D-AD78-7EB5BB861655}.Debug2005|Any CPU.Build.0 = Debug2005|Any CPU
+ {AAB186A4-FA3D-404D-AD78-7EB5BB861655}.Release|Any CPU.ActiveCfg = Release2005|Any CPU
+ {AAB186A4-FA3D-404D-AD78-7EB5BB861655}.Release|Any CPU.Build.0 = Release2005|Any CPU
+ {AAB186A4-FA3D-404D-AD78-7EB5BB861655}.Release2005|Any CPU.ActiveCfg = Release2005|Any CPU
+ {AAB186A4-FA3D-404D-AD78-7EB5BB861655}.Release2005|Any CPU.Build.0 = Release2005|Any CPU
+ {5909BFE7-93CF-4E5F-BE22-6293368AF01D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {5909BFE7-93CF-4E5F-BE22-6293368AF01D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {5909BFE7-93CF-4E5F-BE22-6293368AF01D}.Debug2005|Any CPU.ActiveCfg = Debug|Any CPU
+ {5909BFE7-93CF-4E5F-BE22-6293368AF01D}.Debug2005|Any CPU.Build.0 = Debug|Any CPU
+ {5909BFE7-93CF-4E5F-BE22-6293368AF01D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {5909BFE7-93CF-4E5F-BE22-6293368AF01D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {5909BFE7-93CF-4E5F-BE22-6293368AF01D}.Release2005|Any CPU.ActiveCfg = Release|Any CPU
+ {5909BFE7-93CF-4E5F-BE22-6293368AF01D}.Release2005|Any CPU.Build.0 = Release|Any CPU
+ {72F7E307-F0A9-4750-9ED5-5A1F97725A11}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {72F7E307-F0A9-4750-9ED5-5A1F97725A11}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {72F7E307-F0A9-4750-9ED5-5A1F97725A11}.Debug2005|Any CPU.ActiveCfg = Debug|Any CPU
+ {72F7E307-F0A9-4750-9ED5-5A1F97725A11}.Debug2005|Any CPU.Build.0 = Debug|Any CPU
+ {72F7E307-F0A9-4750-9ED5-5A1F97725A11}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {72F7E307-F0A9-4750-9ED5-5A1F97725A11}.Release|Any CPU.Build.0 = Release|Any CPU
+ {72F7E307-F0A9-4750-9ED5-5A1F97725A11}.Release2005|Any CPU.ActiveCfg = Release|Any CPU
+ {72F7E307-F0A9-4750-9ED5-5A1F97725A11}.Release2005|Any CPU.Build.0 = Release|Any CPU
+ {68D6D57F-02CC-419F-8D69-3B479A1BFBED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {68D6D57F-02CC-419F-8D69-3B479A1BFBED}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {68D6D57F-02CC-419F-8D69-3B479A1BFBED}.Debug2005|Any CPU.ActiveCfg = Debug|Any CPU
+ {68D6D57F-02CC-419F-8D69-3B479A1BFBED}.Debug2005|Any CPU.Build.0 = Debug|Any CPU
+ {68D6D57F-02CC-419F-8D69-3B479A1BFBED}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {68D6D57F-02CC-419F-8D69-3B479A1BFBED}.Release|Any CPU.Build.0 = Release|Any CPU
+ {68D6D57F-02CC-419F-8D69-3B479A1BFBED}.Release2005|Any CPU.ActiveCfg = Release|Any CPU
+ {68D6D57F-02CC-419F-8D69-3B479A1BFBED}.Release2005|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-03-04 05:25:05
|
Revision: 160
http://svn.sourceforge.net/nmailserver/?rev=160&view=rev
Author: tmyroadctfig
Date: 2007-03-03 21:25:05 -0800 (Sat, 03 Mar 2007)
Log Message:
-----------
Updated references. Added NHibernate references.
Modified Paths:
--------------
NMail/trunk/References/MySql.Data.dll
NMail/trunk/References/log4net.dll
Added Paths:
-----------
NMail/trunk/References/log4net.license.txt
NMail/trunk/References/log4net.xml
NMail/trunk/References/nhibernate/
NMail/trunk/References/nhibernate/Iesi.Collections.dll
NMail/trunk/References/nhibernate/Iesi.Collections.license.txt
NMail/trunk/References/nhibernate/Iesi.Collections.xml
NMail/trunk/References/nhibernate/NHibernate.dll
NMail/trunk/References/nhibernate/NHibernate.license.txt
NMail/trunk/References/nhibernate/NHibernate.xml
Modified: NMail/trunk/References/MySql.Data.dll
===================================================================
(Binary files differ)
Modified: NMail/trunk/References/log4net.dll
===================================================================
(Binary files differ)
Added: NMail/trunk/References/log4net.license.txt
===================================================================
--- NMail/trunk/References/log4net.license.txt (rev 0)
+++ NMail/trunk/References/log4net.license.txt 2007-03-04 05:25:05 UTC (rev 160)
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
Added: NMail/trunk/References/log4net.xml
===================================================================
--- NMail/trunk/References/log4net.xml (rev 0)
+++ NMail/trunk/References/log4net.xml 2007-03-04 05:25:05 UTC (rev 160)
@@ -0,0 +1,28655 @@
+<?xml version="1.0"?>
+<doc>
+ <assembly>
+ <name>log4net</name>
+ </assembly>
+ <members>
+ <member name="T:log4net.Appender.AdoNetAppender">
+ <summary>
+ Appender that logs to a database.
+ </summary>
+ <remarks>
+ <para>
+ <see cref="T:log4net.Appender.AdoNetAppender"/> appends logging events to a table within a
+ database. The appender can be configured to specify the connection
+ string by setting the <see cref="P:log4net.Appender.AdoNetAppender.ConnectionString"/> property.
+ The connection type (provider) can be specified by setting the <see cref="P:log4net.Appender.AdoNetAppender.ConnectionType"/>
+ property. For more information on database connection strings for
+ your specific database see <a href="http://www.connectionstrings.com/">http://www.connectionstrings.com/</a>.
+ </para>
+ <para>
+ Records are written into the database either using a prepared
+ statement or a stored procedure. The <see cref="P:log4net.Appender.AdoNetAppender.CommandType"/> property
+ is set to <see cref="F:System.Data.CommandType.Text"/> (<c>System.Data.CommandType.Text</c>) to specify a prepared statement
+ or to <see cref="F:System.Data.CommandType.StoredProcedure"/> (<c>System.Data.CommandType.StoredProcedure</c>) to specify a stored
+ procedure.
+ </para>
+ <para>
+ The prepared statement text or the name of the stored procedure
+ must be set in the <see cref="P:log4net.Appender.AdoNetAppender.CommandText"/> property.
+ </para>
+ <para>
+ The prepared statement or stored procedure can take a number
+ of parameters. Parameters are added using the <see cref="M:log4net.Appender.AdoNetAppender.AddParameter(log4net.Appender.AdoNetAppenderParameter)"/>
+ method. This adds a single <see cref="T:log4net.Appender.AdoNetAppenderParameter"/> to the
+ ordered list of parameters. The <see cref="T:log4net.Appender.AdoNetAppenderParameter"/>
+ type may be subclassed if required to provide database specific
+ functionality. The <see cref="T:log4net.Appender.AdoNetAppenderParameter"/> specifies
+ the parameter name, database type, size, and how the value should
+ be generated using a <see cref="T:log4net.Layout.ILayout"/>.
+ </para>
+ </remarks>
+ <example>
+ An example of a SQL Server table that could be logged to:
+ <code lang="SQL">
+ CREATE TABLE [dbo].[Log] (
+ [ID] [int] IDENTITY (1, 1) NOT NULL ,
+ [Date] [datetime] NOT NULL ,
+ [Thread] [varchar] (255) NOT NULL ,
+ [Level] [varchar] (20) NOT NULL ,
+ [Logger] [varchar] (255) NOT NULL ,
+ [Message] [varchar] (4000) NOT NULL
+ ) ON [PRIMARY]
+ </code>
+ </example>
+ <example>
+ An example configuration to log to the above table:
+ <code lang="XML" escaped="true">
+ <appender name="AdoNetAppender_SqlServer" type="log4net.Appender.AdoNetAppender">
+ <connectionType value="System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
+ <connectionString value="data source=SQLSVR;initial catalog=test_log4net;integrated security=false;persist security info=True;User ID=sa;Password=sa"/>
+ <commandText value="INSERT INTO Log ([Date],[Thread],[Level],[Logger],[Message]) VALUES (@log_date, @thread, @log_level, @logger, @message)"/>
+ <parameter>
+ <parameterName value="@log_date"/>
+ <dbType value="DateTime"/>
+ <layout type="log4net.Layout.PatternLayout" value="%date{yyyy'-'MM'-'dd HH':'mm':'ss'.'fff}"/>
+ </parameter>
+ <parameter>
+ <parameterName value="@thread"/>
+ <dbType value="String"/>
+ <size value="255"/>
+ <layout type="log4net.Layout.PatternLayout" value="%thread"/>
+ </parameter>
+ <parameter>
+ <parameterName value="@log_level"/>
+ <dbType value="String"/>
+ <size value="50"/>
+ <layout type="log4net.Layout.PatternLayout" value="%level"/>
+ </parameter>
+ <parameter>
+ <parameterName value="@logger"/>
+ <dbType value="String"/>
+ <size value="255"/>
+ <layout type="log4net.Layout.PatternLayout" value="%logger"/>
+ </parameter>
+ <parameter>
+ <parameterName value="@message"/>
+ <dbType value="String"/>
+ <size value="4000"/>
+ <layout type="log4net.Layout.PatternLayout" value="%message"/>
+ </parameter>
+ </appender>
+ </code>
+ </example>
+ <author>Julian Biddle</author>
+ <author>Nicko Cadell</author>
+ <author>Gert Driesen</author>
+ <author>Lance Nehring</author>
+ </member>
+ <member name="T:log4net.Appender.BufferingAppenderSkeleton">
+ <summary>
+ Abstract base class implementation of <see cref="T:log4net.Appender.IAppender"/> that
+ buffers events in a fixed size buffer.
+ </summary>
+ <remarks>
+ <para>
+ This base class should be used by appenders that need to buffer a
+ number of events before logging them. For example the <see cref="T:log4net.Appender.AdoNetAppender"/>
+ buffers events and then submits the entire contents of the buffer to
+ the underlying database in one go.
+ </para>
+ <para>
+ Subclasses should override the <see cref="M:log4net.Appender.BufferingAppenderSkeleton.SendBuffer(log4net.Core.LoggingEvent[])"/>
+ method to deliver the buffered events.
+ </para>
+ <para>The BufferingAppenderSkeleton maintains a fixed size cyclic
+ buffer of events. The size of the buffer is set using
+ the <see cref="P:log4net.Appender.BufferingAppenderSkeleton.BufferSize"/> property.
+ </para>
+ <para>A <see cref="T:log4net.Core.ITriggeringEventEvaluator"/> is used to inspect
+ each event as it arrives in the appender. If the <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Evaluator"/>
+ triggers, then the current buffer is sent immediately
+ (see <see cref="M:log4net.Appender.BufferingAppenderSkeleton.SendBuffer(log4net.Core.LoggingEvent[])"/>). Otherwise the event
+ is stored in the buffer. For example, an evaluator can be used to
+ deliver the events immediately when an ERROR event arrives.
+ </para>
+ <para>
+ The buffering appender can be configured in a <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Lossy"/> mode.
+ By default the appender is NOT lossy. When the buffer is full all
+ the buffered events are sent with <see cref="M:log4net.Appender.BufferingAppenderSkeleton.SendBuffer(log4net.Core.LoggingEvent[])"/>.
+ If the <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Lossy"/> property is set to <c>true</c> then the
+ buffer will not be sent when it is full, and new events arriving
+ in the appender will overwrite the oldest event in the buffer.
+ In lossy mode the buffer will only be sent when the <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Evaluator"/>
+ triggers. This can be useful behavior when you need to know about
+ ERROR events but not about events with a lower level, configure an
+ evaluator that will trigger when an ERROR event arrives, the whole
+ buffer will be sent which gives a history of events leading up to
+ the ERROR event.
+ </para>
+ </remarks>
+ <author>Nicko Cadell</author>
+ <author>Gert Driesen</author>
+ </member>
+ <member name="T:log4net.Appender.AppenderSkeleton">
+ <summary>
+ Abstract base class implementation of <see cref="T:log4net.Appender.IAppender"/>.
+ </summary>
+ <remarks>
+ <para>
+ This class provides the code for common functionality, such
+ as support for threshold filtering and support for general filters.
+ </para>
+ <para>
+ Appenders can also implement the <see cref="T:log4net.Core.IOptionHandler"/> interface. Therefore
+ they would require that the <see cref="M:log4net.Core.IOptionHandler.ActivateOptions"/> method
+ be called after the appenders properties have been configured.
+ </para>
+ </remarks>
+ <author>Nicko Cadell</author>
+ <author>Gert Driesen</author>
+ </member>
+ <member name="T:log4net.Appender.IAppender">
+ <summary>
+ Implement this interface for your own strategies for printing log statements.
+ </summary>
+ <remarks>
+ <para>
+ Implementors should consider extending the <see cref="T:log4net.Appender.AppenderSkeleton"/>
+ class which provides a default implementation of this interface.
+ </para>
+ <para>
+ Appenders can also implement the <see cref="T:log4net.Core.IOptionHandler"/> interface. Therefore
+ they would require that the <see cref="M:log4net.Core.IOptionHandler.ActivateOptions"/> method
+ be called after the appenders properties have been configured.
+ </para>
+ </remarks>
+ <author>Nicko Cadell</author>
+ <author>Gert Driesen</author>
+ </member>
+ <member name="M:log4net.Appender.IAppender.Close">
+ <summary>
+ Closes the appender and releases resources.
+ </summary>
+ <remarks>
+ <para>
+ Releases any resources allocated within the appender such as file handles,
+ network connections, etc.
+ </para>
+ <para>
+ It is a programming error to append to a closed appender.
+ </para>
+ </remarks>
+ </member>
+ <member name="M:log4net.Appender.IAppender.DoAppend(log4net.Core.LoggingEvent)">
+ <summary>
+ Log the logging event in Appender specific way.
+ </summary>
+ <param name="loggingEvent">The event to log</param>
+ <remarks>
+ <para>
+ This method is called to log a message into this appender.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:log4net.Appender.IAppender.Name">
+ <summary>
+ Gets or sets the name of this appender.
+ </summary>
+ <value>The name of the appender.</value>
+ <remarks>
+ <para>The name uniquely identifies the appender.</para>
+ </remarks>
+ </member>
+ <member name="T:log4net.Appender.IBulkAppender">
+ <summary>
+ Interface for appenders that support bulk logging.
+ </summary>
+ <remarks>
+ <para>
+ This interface extends the <see cref="T:log4net.Appender.IAppender"/> interface to
+ support bulk logging of <see cref="T:log4net.Core.LoggingEvent"/> objects. Appenders
+ should only implement this interface if they can bulk log efficiently.
+ </para>
+ </remarks>
+ <author>Nicko Cadell</author>
+ </member>
+ <member name="M:log4net.Appender.IBulkAppender.DoAppend(log4net.Core.LoggingEvent[])">
+ <summary>
+ Log the array of logging events in Appender specific way.
+ </summary>
+ <param name="loggingEvents">The events to log</param>
+ <remarks>
+ <para>
+ This method is called to log an array of events into this appender.
+ </para>
+ </remarks>
+ </member>
+ <member name="T:log4net.Core.IOptionHandler">
+ <summary>
+ Interface used to delay activate a configured object.
+ </summary>
+ <remarks>
+ <para>
+ This allows an object to defer activation of its options until all
+ options have been set. This is required for components which have
+ related options that remain ambiguous until all are set.
+ </para>
+ <para>
+ If a component implements this interface then the <see cref="M:log4net.Core.IOptionHandler.ActivateOptions"/> method
+ must be called by the container after its all the configured properties have been set
+ and before the component can be used.
+ </para>
+ </remarks>
+ <author>Nicko Cadell</author>
+ </member>
+ <member name="M:log4net.Core.IOptionHandler.ActivateOptions">
+ <summary>
+ Activate the options that were previously set with calls to properties.
+ </summary>
+ <remarks>
+ <para>
+ This allows an object to defer activation of its options until all
+ options have been set. This is required for components which have
+ related options that remain ambiguous until all are set.
+ </para>
+ <para>
+ If a component implements this interface then this method must be called
+ after its properties have been set before the component can be used.
+ </para>
+ </remarks>
+ </member>
+ <member name="F:log4net.Appender.AppenderSkeleton.c_renderBufferSize">
+ <summary>
+ Initial buffer size
+ </summary>
+ </member>
+ <member name="F:log4net.Appender.AppenderSkeleton.c_renderBufferMaxCapacity">
+ <summary>
+ Maximum buffer size before it is recycled
+ </summary>
+ </member>
+ <member name="M:log4net.Appender.AppenderSkeleton.#ctor">
+ <summary>
+ Default constructor
+ </summary>
+ <remarks>
+ <para>Empty default constructor</para>
+ </remarks>
+ </member>
+ <member name="M:log4net.Appender.AppenderSkeleton.Finalize">
+ <summary>
+ Finalizes this appender by calling the implementation's
+ <see cref="M:log4net.Appender.AppenderSkeleton.Close"/> method.
+ </summary>
+ <remarks>
+ <para>
+ If this appender has not been closed then the <c>Finalize</c> method
+ will call <see cref="M:log4net.Appender.AppenderSkeleton.Close"/>.
+ </para>
+ </remarks>
+ </member>
+ <member name="M:log4net.Appender.AppenderSkeleton.ActivateOptions">
+ <summary>
+ Initialize the appender based on the options set
+ </summary>
+ <remarks>
+ <para>
+ This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
+ activation scheme. The <see cref="M:log4net.Appender.AppenderSkeleton.ActivateOptions"/> method must
+ be called on this object after the configuration properties have
+ been set. Until <see cref="M:log4net.Appender.AppenderSkeleton.ActivateOptions"/> is called this
+ object is in an undefined state and must not be used.
+ </para>
+ <para>
+ If any of the configuration properties are modified then
+ <see cref="M:log4net.Appender.AppenderSkeleton.ActivateOptions"/> must be called again.
+ </para>
+ </remarks>
+ </member>
+ <member name="M:log4net.Appender.AppenderSkeleton.Close">
+ <summary>
+ Closes the appender and release resources.
+ </summary>
+ <remarks>
+ <para>
+ Release any resources allocated within the appender such as file handles,
+ network connections, etc.
+ </para>
+ <para>
+ It is a programming error to append to a closed appender.
+ </para>
+ <para>
+ This method cannot be overridden by subclasses. This method
+ delegates the closing of the appender to the <see cref="M:log4net.Appender.AppenderSkeleton.OnClose"/>
+ method which must be overridden in the subclass.
+ </para>
+ </remarks>
+ </member>
+ <member name="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent)">
+ <summary>
+ Performs threshold checks and invokes filters before
+ delegating actual logging to the subclasses specific
+ <see cref="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent)"/> method.
+ </summary>
+ <param name="loggingEvent">The event to log.</param>
+ <remarks>
+ <para>
+ This method cannot be overridden by derived classes. A
+ derived class should override the <see cref="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent)"/> method
+ which is called by this method.
+ </para>
+ <para>
+ The implementation of this method is as follows:
+ </para>
+ <para>
+ <list type="bullet">
+ <item>
+ <description>
+ Checks that the severity of the <paramref name="loggingEvent"/>
+ is greater than or equal to the <see cref="P:log4net.Appender.AppenderSkeleton.Threshold"/> of this
+ appender.</description>
+ </item>
+ <item>
+ <description>
+ Checks that the <see cref="T:log4net.Filter.IFilter"/> chain accepts the
+ <paramref name="loggingEvent"/>.
+ </description>
+ </item>
+ <item>
+ <description>
+ Calls <see cref="M:log4net.Appender.AppenderSkeleton.PreAppendCheck"/> and checks that
+ it returns <c>true</c>.</description>
+ </item>
+ </list>
+ </para>
+ <para>
+ If all of the above steps succeed then the <paramref name="loggingEvent"/>
+ will be passed to the abstract <see cref="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent)"/> method.
+ </para>
+ </remarks>
+ </member>
+ <member name="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent[])">
+ <summary>
+ Performs threshold checks and invokes filters before
+ delegating actual logging to the subclasses specific
+ <see cref="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent[])"/> method.
+ </summary>
+ <param name="loggingEvents">The array of events to log.</param>
+ <remarks>
+ <para>
+ This method cannot be overridden by derived classes. A
+ derived class should override the <see cref="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent[])"/> method
+ which is called by this method.
+ </para>
+ <para>
+ The implementation of this method is as follows:
+ </para>
+ <para>
+ <list type="bullet">
+ <item>
+ <description>
+ Checks that the severity of the <paramref name="loggingEvent"/>
+ is greater than or equal to the <see cref="P:log4net.Appender.AppenderSkeleton.Threshold"/> of this
+ appender.</description>
+ </item>
+ <item>
+ <description>
+ Checks that the <see cref="T:log4net.Filter.IFilter"/> chain accepts the
+ <paramref name="loggingEvent"/>.
+ </description>
+ </item>
+ <item>
+ <description>
+ Calls <see cref="M:log4net.Appender.AppenderSkeleton.PreAppendCheck"/> and checks that
+ it returns <c>true</c>.</description>
+ </item>
+ </list>
+ </para>
+ <para>
+ If all of the above steps succeed then the <paramref name="loggingEvents"/>
+ will be passed to the <see cref="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent[])"/> method.
+ </para>
+ </remarks>
+ </member>
+ <member name="M:log4net.Appender.AppenderSkeleton.FilterEvent(log4net.Core.LoggingEvent)">
+ <summary>
+ Test if the logging event should we output by this appender
+ </summary>
+ <param name="loggingEvent">the event to test</param>
+ <returns><c>true</c> if the event should be output, <c>false</c> if the event should be ignored</returns>
+ <remarks>
+ <para>
+ This method checks the logging event against the threshold level set
+ on this appender and also against the filters specified on this
+ appender.
+ </para>
+ <para>
+ The implementation of this method is as follows:
+ </para>
+ <para>
+ <list type="bullet">
+ <item>
+ <description>
+ Checks that the severity of the <paramref name="loggingEvent"/>
+ is greater than or equal to the <see cref="P:log4net.Appender.AppenderSkeleton.Threshold"/> of this
+ appender.</description>
+ </item>
+ <item>
+ <description>
+ Checks that the <see cref="T:log4net.Filter.IFilter"/> chain accepts the
+ <paramref name="loggingEvent"/>.
+ </description>
+ </item>
+ </list>
+ </para>
+ </remarks>
+ </member>
+ <member name="M:log4net.Appender.AppenderSkeleton.AddFilter(log4net.Filter.IFilter)">
+ <summary>
+ Adds a filter to the end of the filter chain.
+ </summary>
+ <param name="filter">the filter to add to this appender</param>
+ <remarks>
+ <para>
+ The Filters are organized in a linked list.
+ </para>
+ <para>
+ Setting this property causes the new filter to be pushed onto the
+ back of the filter chain.
+ </para>
+ </remarks>
+ </member>
+ <member name="M:log4net.Appender.AppenderSkeleton.ClearFilters">
+ <summary>
+ Clears the filter list for this appender.
+ </summary>
+ <remarks>
+ <para>
+ Clears the filter list for this appender.
+ </para>
+ </remarks>
+ </member>
+ <member name="M:log4net.Appender.AppenderSkeleton.IsAsSevereAsThreshold(log4net.Core.Level)">
+ <summary>
+ Checks if the message level is below this appender's threshold.
+ </summary>
+ <param name="level"><see cref="T:log4net.Core.Level"/> to test against.</param>
+ <remarks>
+ <para>
+ If there is no threshold set, then the return value is always <c>true</c>.
+ </para>
+ </remarks>
+ <returns>
+ <c>true</c> if the <paramref name="level"/> meets the <see cref="P:log4net.Appender.AppenderSkeleton.Threshold"/>
+ requirements of this appender.
+ </returns>
+ </member>
+ <member name="M:log4net.Appender.AppenderSkeleton.OnClose">
+ <summary>
+ Is called when the appender is closed. Derived classes should override
+ this method if resources need to be released.
+ </summary>
+ <remarks>
+ <para>
+ Releases any resources allocated within the appender such as file handles,
+ network connections, etc.
+ </para>
+ <para>
+ It is a programming error to append to a closed appender.
+ </para>
+ </remarks>
+ </member>
+ <member name="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent)">
+ <summary>
+ Subclasses of <see cref="T:log4net.Appender.AppenderSkeleton"/> should implement this method
+ to perform actual logging.
+ </summary>
+ <param name="loggingEvent">The event to append.</param>
+ <remarks>
+ <para>
+ A subclass must implement this method to perform
+ logging of the <paramref name="loggingEvent"/>.
+ </para>
+ <para>This method will be called by <see cref="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent)"/>
+ if all the conditions listed for that method are met.
+ </para>
+ <para>
+ To restrict the logging of events in the appender
+ override the <see cref="M:log4net.Appender.AppenderSkeleton.PreAppendCheck"/> method.
+ </para>
+ </remarks>
+ </member>
+ <member name="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent[])">
+ <summary>
+ Append a bulk array of logging events.
+ </summary>
+ <param name="loggingEvents">the array of logging events</param>
+ <remarks>
+ <para>
+ This base class implementation calls the <see cref="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent)"/>
+ method for each element in the bulk array.
+ </para>
+ <para>
+ A sub class that can better process a bulk array of events should
+ override this method in addition to <see cref="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent)"/>.
+ </para>
+ </remarks>
+ </member>
+ <member name="M:log4net.Appender.AppenderSkeleton.PreAppendCheck">
+ <summary>
+ Called before <see cref="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent)"/> as a precondition.
+ </summary>
+ <remarks>
+ <para>
+ This method is called by <see cref="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent)"/>
+ before the call to the abstract <see cref="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent)"/> method.
+ </para>
+ <para>
+ This method can be overridden in a subclass to extend the checks
+ made before the event is passed to the <see cref="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent)"/> method.
+ </para>
+ <para>
+ A subclass should ensure that they delegate this call to
+ this base class if it is overridden.
+ </para>
+ </remarks>
+ <returns><c>true</c> if the call to <see cref="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent)"/> should proceed.</returns>
+ </member>
+ <member name="M:log4net.Appender.AppenderSkeleton.RenderLoggingEvent(log4net.Core.LoggingEvent)">
+ <summary>
+ Renders the <see cref="T:log4net.Core.LoggingEvent"/> to a string.
+ </summary>
+ <param name="loggingEvent">The event to render.</param>
+ <returns>The event rendered as a string.</returns>
+ <remarks>
+ <para>
+ Helper method to render a <see cref="T:log4net.Core.LoggingEvent"/> to
+ a string. This appender must have a <see cref="P:log4net.Appender.AppenderSkeleton.Layout"/>
+ set to render the <paramref name="loggingEvent"/> to
+ a string.
+ </para>
+ <para>If there is exception data in the logging event and
+ the layout does not process the exception, this method
+ will append the exception text to the rendered string.
+ </para>
+ <para>
+ Where possible use the alternative version of this method
+ <see cref="M:log4net.Appender.AppenderSkeleton.RenderLoggingEvent(System.IO.TextWriter,log4net.Core.LoggingEvent)"/>.
+ That method streams the rendering onto an existing Writer
+ which can give better performance if the caller already has
+ a <see cref="T:System.IO.TextWriter"/> open and ready for writing.
+ </para>
+ </remarks>
+ </member>
+ <member name="M:log4net.Appender.AppenderSkeleton.RenderLoggingEvent(System.IO.TextWriter,log4net.Core.LoggingEvent)">
+ <summary>
+ Renders the <see cref="T:log4net.Core.LoggingEvent"/> to a string.
+ </summary>
+ <param name="loggingEvent">The event to render.</param>
+ <param name="writer">The TextWriter to write the formatted event to</param>
+ <remarks>
+ <para>
+ Helper method to render a <see cref="T:log4net.Core.LoggingEvent"/> to
+ a string. This appender must have a <see cref="P:log4net.Appender.AppenderSkeleton.Layout"/>
+ set to render the <paramref name="loggingEvent"/> to
+ a string.
+ </para>
+ <para>If there is exception data in the logging event and
+ the layout does not process the exception, this method
+ will append the exception text to the rendered string.
+ </para>
+ <para>
+ Use this method in preference to <see cref="M:log4net.Appender.AppenderSkeleton.RenderLoggingEvent(log4net.Core.LoggingEvent)"/>
+ where possible. If, however, the caller needs to render the event
+ to a string then <see cref="M:log4net.Appender.AppenderSkeleton.RenderLoggingEvent(log4net.Core.LoggingEvent)"/> does
+ provide an efficient mechanism for doing so.
+ </para>
+ </remarks>
+ </member>
+ <member name="F:log4net.Appender.AppenderSkeleton.m_layout">
+ <summary>
+ The layout of this appender.
+ </summary>
+ <remarks>
+ See <see cref="P:log4net.Appender.AppenderSkeleton.Layout"/> for more information.
+ </remarks>
+ </member>
+ <member name="F:log4net.Appender.AppenderSkeleton.m_name">
+ <summary>
+ The name of this appender.
+ </summary>
+ <remarks>
+ See <see cref="P:log4net.Appender.AppenderSkeleton.Name"/> for more information.
+ </remarks>
+ </member>
+ <member name="F:log4net.Appender.AppenderSkeleton.m_threshold">
+ <summary>
+ The level threshold of this appender.
+ </summary>
+ <remarks>
+ <para>
+ There is no level threshold filtering by default.
+ </para>
+ <para>
+ See <see cref="P:log4net.Appender.AppenderSkeleton.Threshold"/> for more information.
+ </para>
+ </remarks>
+ </member>
+ <member name="F:log4net.Appender.AppenderSkeleton.m_errorHandler">
+ <summary>
+ It is assumed and enforced that errorHandler is never null.
+ </summary>
+ <remarks>
+ <para>
+ It is assumed and enforced that errorHandler is never null.
+ </para>
+ <para>
+ See <see cref="P:log4net.Appender.AppenderSkeleton.ErrorHandler"/> for more information.
+ </para>
+ </remarks>
+ </member>
+ <member name="F:log4net.Appender.AppenderSkeleton.m_headFilter">
+ <summary>
+ The first filter in the filter chain.
+ </summary>
+ <remarks>
+ <para>
+ Set to <c>null</c> initially.
+ </para>
+ <para>
+ See <see cref="T:log4net.Filter.IFilter"/> for more information.
+ </para>
+ </remarks>
+ </member>
+ <member name="F:log4net.Appender.AppenderSkeleton.m_tailFilter">
+ <summary>
+ The last filter in the filter chain.
+ </summary>
+ <remarks>
+ See <see cref="T:log4net.Filter.IFilter"/> for more information.
+ </remarks>
+ </member>
+ <member name="F:log4net.Appender.AppenderSkeleton.m_closed">
+ <summary>
+ Flag indicating if this appender is closed.
+ </summary>
+ <remarks>
+ See <see cref="M:log4net.Appender.AppenderSkeleton.Close"/> for more information.
+ </remarks>
+ </member>
+ <member name="F:log4net.Appender.AppenderSkeleton.m_recursiveGuard">
+ <summary>
+ The guard prevents an appender from repeatedly calling its own DoAppend method
+ </summary>
+ </member>
+ <member name="F:log4net.Appender.AppenderSkeleton.m_renderWriter">
+ <summary>
+ StringWriter used to render events
+ </summary>
+ </member>
+ <member name="P:log4net.Appender.AppenderSkeleton.Threshold">
+ <summary>
+ Gets or sets the threshold <see cref="T:log4net.Core.Level"/> of this appender.
+ </summary>
+ <value>
+ The threshold <see cref="T:log4net.Core.Level"/> of the appender.
+ </value>
+ <remarks>
+ <para>
+ All log events with lower level than the threshold level are ignored
+ by the appender.
+ </para>
+ <para>
+ In configuration files this option is specified by setting the
+ value of the <see cref="P:log4net.Appender.AppenderSkeleton.Threshold"/> option to a level
+ string, such as "DEBUG", "INFO" and so on.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:log4net.Appender.AppenderSkeleton.ErrorHandler">
+ <summary>
+ Gets or sets the <see cref="T:log4net.Core.IErrorHandler"/> for this appender.
+ </summary>
+ <value>The <see cref="T:log4net.Core.IErrorHandler"/> of the appender</value>
+ <remarks>
+ <para>
+ The <see cref="T:log4net.Appender.AppenderSkeleton"/> provides a default
+ implementation for the <see cref="P:log4net.Appender.AppenderSkeleton.ErrorHandler"/> property.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:log4net.Appender.AppenderSkeleton.FilterHead">
+ <summary>
+ The filter chain.
+ </summary>
+ <value>The head of the filter chain filter chain.</value>
+ <remarks>
+ <para>
+ Returns the head Filter. The Filters are organized in a linked list
+ and so all Filters on this Appender are available through the result.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:log4net.Appender.AppenderSkeleton.Layout">
+ <summary>
+ Gets or sets the <see cref="T:log4net.Layout.ILayout"/> for this appender.
+ </summary>
+ <value>The layout of the appender.</value>
+ <remarks>
+ <para>
+ See <see cref="P:log4net.Appender.AppenderSkeleton.RequiresLayout"/> for more information.
+ </para>
+ </remarks>
+ <seealso cref="P:log4net.Appender.AppenderSkeleton.RequiresLayout"/>
+ </member>
+ <member name="P:log4net.Appender.AppenderSkeleton.Name">
+ <summary>
+ Gets or sets the name of this appender.
+ </summary>
+ <value>The name of the appender.</value>
+ <remarks>
+ <para>
+ The name uniquely identifies the appender.
+ </para>
+ </remarks>
+ </member>
+ <member name="P:log4net.Appender.AppenderSkeleton.RequiresLayout">
+ <summary>
+ Tests if this appender requires a <see cref="P:log4net.Appender.AppenderSkeleton.Layout"/> to be set.
+ </summary>
+ <remarks>
+ <para>
+ In the rather exceptional case, where the appender
+ implementation admits a layout but can also work without it,
+ then the appender should return <c>true</c>.
+ </para>
+ <para>
+ This default implementation always returns <c>true</c>.
+ </para>
+ </remarks>
+ <returns>
+ <c>true</c> if the appender requires a layout object, otherwise <c>false</c>.
+ </returns>
+ </member>
+ <member name="F:log4net.Appender.BufferingAppenderSkeleton.DEFAULT_BUFFER_SIZE">
+ <summary>
+ The default buffer size.
+ </summary>
+ <remarks>
+ The default size of the cyclic buffer used to store events.
+ This is set to 512 by default.
+ </remarks>
+ </member>
+ <member name="M:log4net.Appender.BufferingAppenderSkeleton.#ctor">
+ <summary>
+ Initializes a new instance of the <see cref="T:log4net.Appender.BufferingAppenderSkeleton"/> class.
+ </summary>
+ <remarks>
+ <para>
+ Protected default constructor to allow subclassing.
+ </para>
+ </remarks>
+ </member>
+ <member name="M:log4net.Appender.BufferingAppenderSkeleton.#ctor(System.Boolean)">
+ <summary>
+ Initializes a new instance of the <see cref="T:log4net.Appender.BufferingAppenderSkeleton"/> class.
+ </summary>
+ <param name="eventMustBeFixed">the events passed through this appender must be
+ fixed by the time that they arrive in the derived class' <c>SendBuffer</c> method.</param>
+ <remarks>
+ <para>
+ Protected constructor to allow subclassing.
+ </para>
+ <para>
+ The <paramref name="eventMustBeFixed"/> should be set if the subclass
+ expects the events delivered to be fixed even if the
+ <see cref="P:log4net.Appender.BufferingAppenderSkeleton.BufferSize"/> is set to zero, i.e. when no buffering occurs.
+ </para>
+ </remarks>
+ </member>
+ <member name="M:log4net.Appender.BufferingAppenderSkeleton.Flush">
+ <summary>
+ Flush the currently buffered events
+ </summary>
+ <remarks>
+ <para>
+ Flushes any events that have been buffered.
+ </para>
+ <para>
+ If the appender is buffering in <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Lossy"/> mode then the contents
+ of the buffer will NOT be flushed to the appender.
+ </para>
+ </remarks>
+ </member>
+ <member name="M:log4net.Appender.BufferingAppenderSkeleton.Flush(System.Boolean)">
+ <summary>
+ Flush the currently buffered events
+ </summary>
+ <param name="flushLossyBuffer">set to <c>true</c> to flush the buffer of lossy events</param>
+ <remarks>
+ <para>
+ Flushes events that have been buffered. If <paramref name="flushLossyBuffer"/> is
+ <c>false</c> then events will only be flushed if this buffer is non-lossy mode.
+ </para>
+ <para>
+ If the appender is buffering in <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Lossy"/> mode then the contents
+ of the buffer will only be flushed if <paramref name="flushLossyBuffer"/> is <c>true</c>.
+ In this case the contents of the buffer will be tested against the
+ <see cref="P:log4net.Appender.BufferingAppenderSkeleton.LossyEvaluator"/> and if triggering will be output. All other buffered
+ events will be discarded.
+ </para>
+ <para>
+ If <paramref name="flushLossyBuffer"/> is <c>true</c> then the buffer will always
+ be emptied by calling this method.
+ </para>
+ </remarks>
+ </member>
+ <member name="M:log4net.Appender.BufferingAppenderSkeleton.ActivateOptions">
+ <summary>
+ Initialize the appender based on the options set
+ </summary>
+ <remarks>
+ <para>
+ This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
+ activation scheme. The <see cref="M:log4net.Appender.BufferingAppenderSkeleton.ActivateOptions"/> method must
+ be called on this object after the configuration properties have
+ been set. Until <see cref="M:log4net.Appender.BufferingAppenderSkeleton.ActivateOptions"/> is called this
+ object is in an undefined state and must not be used.
+ </para>
+ <para>
+ If any of the configuration properties are modified then
+ <see cref="M:log4net.Appender.BufferingAppenderSkeleton.ActivateOptions"/> must be called again.
+ </para>
+ </remarks>
+ </member>
+ <member name="M:log4net.Appender.BufferingAppenderSkeleton.OnClose">
+ <summary>
+ Close this appender instance.
+ </summary>
+ <remarks>
+ <para>
+ Close this appender instance. If this appender is marked
+ as not <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Lossy"/> then the remaining events in
+ the buffer must be sent when the appender is closed.
+ </para>
+ </remarks>
+ </member>
+ <member name="M:log4net.Appender.BufferingAppenderSkeleton.Append(log4net.Core.LoggingEvent)">
+ <summary>
+ This method is called by the <see cref="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent)"/> method.
+ </summary>
+ <param name="loggingEvent">the event to log</param>
+ <remarks>
+ <para>
+ Stores the <paramref name="loggingEvent"/> in the cyclic buffer.
+ </para>
+ <para>
+ The buffer will be sent (i.e. passed to the <see cref="M:log4net.Appender.BufferingAppenderSkeleton.SendBuffer(log4net.Core.LoggingEvent[])"/>
+ method) if one of the following conditions is met:
+ </para>
+ <list type="bullet">
+ <item>
+ <description>The cyclic buffer is full and this appender is
+ marked as not lossy (see <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Lossy"/>)</description>
+ </item>
+ <item>
+ <description>An <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Evaluator"/> is set and
+ it is triggered for the <paramref name="loggingEvent"/>
+ specified.</description>
+ </item>
+ </list>
+ <para>
+ Before the event is stored in the buffer it is fixed
+ (see <see cref="M:log4net.Core.LoggingEvent.FixVolatileData(log4net.Core.FixFlags)"/>) to ensure that
+ any data referenced by the event will be valid when the buffer
+ is processed.
+ </para>
+ </remarks>
+ </member>
+ <member name="M:log4net.Appender.BufferingAppenderSkeleton.SendFromBuffer(log4net.Core.LoggingEvent,log4net.Util.CyclicBuffer)">
+ <summary>
+ Sends the contents of the buffer.
+ </summary>
+ <param name="firstLoggingEvent">The first logging event.</param>
+ <param name="buffer">The buffer containing the events that need to be send.</param>
+ <remarks>
+ <para>
+ The subclass must override <see cref="M:log4net.Appender.BufferingAppenderSkeleton.SendBuffer(log4net.Core.LoggingEvent[])"/>.
+ </para>
+ </remarks>
+ </member>
+ <member name="M:log4net.Appender.BufferingAppenderSkeleton.SendBuffer(log4net.Core.LoggingEvent[])">
+ <summary>
+ Sends the events.
+ </summary>
+ <param name="events">The events that need to be send.</param>
+ <remarks>
+ <para>
+ The subclass must override this method to process the buffered events.
+ </para>
+ </remarks>
+ </member>
+ <member name="F:log4net.Appender.BufferingAppenderSkeleton.m_bufferSize">
+ <summary>
+ The size of the cyclic buffer used to hold the logging events.
+ </summary>
+ <remarks>
+ Set to <see cref="F:log4net.Appender.BufferingAppenderSkeleton.DEFAULT_BUFFER_SIZE"/> by default.
+ </remarks>
+ </member>
+ <member name="F:log4net.Appender.BufferingAppenderSkeleton.m_cb">
+ <summary>
+ The cyclic buffer used to store the logging events.
+ </summary>
+ </member>
+ <member name="F:log4net.Appender.BufferingAppenderSkeleton.m_evaluator">
+ <summary>
+ The triggering event evaluator that causes the buffer to be sent immediately.
+ </summary>
+ <remarks>
+ The object that is used to determine if an event causes the entire
+ buffer to be sent immediately. This field can be <c>null</c>, which
+ indicates that event triggering is not to be done. The evaluator
+ can be set using the <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Evaluator"/> property. If this appender
+ has the <see cref="F:log4net.Appender.BufferingAppenderSkeleton.m_lossy"/> (<see cref="P:log4net.Appender.BufferingAppenderSkeleton.Lossy"/> property) set to
+ <c>true</c> then an <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Evaluator"/> must be set.
+ </remarks>
+ </member>
+ <member name="F:log4net.Appender.BufferingAppenderSkeleton.m_lossy">
+ <summary>
+ Indicates if the appender should overwrite events in the cyclic buffer
+ when it becomes ful...
[truncated message content] |
|
From: <tmy...@us...> - 2007-03-04 05:17:46
|
Revision: 159
http://svn.sourceforge.net/nmailserver/?rev=159&view=rev
Author: tmyroadctfig
Date: 2007-03-03 21:17:47 -0800 (Sat, 03 Mar 2007)
Log Message:
-----------
Added NHibernate data projects.
Added Paths:
-----------
NMail/trunk/NMail.LocalStoreData.NHibernate/NHibernateAuthProvider.cs
NMail/trunk/NMail.LocalStoreData.NHibernate/NHibernateLocalStoreData.cs
NMail/trunk/NMail.LocalStoreData.NHibernate/NHibernateUserMap.cs
NMail/trunk/NMail.LocalStoreData.NHibernate/NMail.LocalStoreData.NHibernate.Auth.hbm.xml
NMail/trunk/NMail.LocalStoreData.NHibernate/NMail.LocalStoreData.NHibernate.UserMap.hbm.xml
NMail/trunk/NMail.LocalStoreData.NHibernate/NMail.LocalStoreData.NHibernate.csproj
NMail/trunk/NMail.LocalStoreData.NHibernate/NMail.LocalStoreData.NHibernate.hbm.xml
NMail/trunk/NMail.LocalStoreData.NHibernate/Properties/AssemblyInfo.cs
NMail/trunk/NMail.LocalStoreData.NHibernate/hibernate-configuration.xml
NMail/trunk/NMail.SpoolData.NHibernate/NHibernateSpoolData.cs
NMail/trunk/NMail.SpoolData.NHibernate/NMail.SpoolData.NHibernate.csproj
NMail/trunk/NMail.SpoolData.NHibernate/NMail.SpoolData.NHibernate.hbm.xml
NMail/trunk/NMail.SpoolData.NHibernate/Properties/
NMail/trunk/NMail.SpoolData.NHibernate/Properties/AssemblyInfo.cs
NMail/trunk/NMail.SpoolData.NHibernate/hibernate-configuration.xml
Property Changed:
----------------
NMail/trunk/NMail.LocalStoreData.NHibernate/
NMail/trunk/NMail.SpoolData.NHibernate/
Property changes on: NMail/trunk/NMail.LocalStoreData.NHibernate
___________________________________________________________________
Name: svn:ignore
+ bin
obj
Added: NMail/trunk/NMail.LocalStoreData.NHibernate/NHibernateAuthProvider.cs
===================================================================
--- NMail/trunk/NMail.LocalStoreData.NHibernate/NHibernateAuthProvider.cs (rev 0)
+++ NMail/trunk/NMail.LocalStoreData.NHibernate/NHibernateAuthProvider.cs 2007-03-04 05:17:47 UTC (rev 159)
@@ -0,0 +1,252 @@
+/*
+ * Copyright 2004-2006 Luke Quinane
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Security.Cryptography;
+using System.Text;
+
+using Mono.Security.Protocol.Ntlm;
+using NHibernate;
+
+using NMail.Authentication;
+using NMail.Configuration;
+
+// TODO: account lockout if too many bad attempts
+
+namespace NMail.LocalStoreData.NHibernate {
+ public class NHibernateAuthProvider : MarshalByRefObject, IHashAuthProvider {
+
+ /// <summary>
+ /// A map of username to tokens.
+ /// </summary>
+ Dictionary<string, Dictionary<Guid, BasicAuthToken>> currentTokens = new Dictionary<string, Dictionary<Guid, BasicAuthToken>>();
+
+ private void purgeExpiredTokens() {
+ // TODO: implement!!!
+ }
+
+ private void addToCurrentTokens(BasicAuthToken authToken) {
+ // Ensure the user has a token dictionary
+ if (!this.currentTokens.ContainsKey(authToken.Username)) {
+ this.currentTokens.Add(authToken.Username, new Dictionary<Guid, BasicAuthToken>());
+ }
+
+ this.currentTokens[authToken.Username].Add(authToken.TokenId, authToken);
+
+ purgeExpiredTokens();
+ }
+
+ private IAuthenticationToken createValidatedToken(string username, bool disabled, DateTime passwordExpiry) {
+ // TODO: lockout check
+
+ // Check if the password is correct and the account is not disabled, etc
+ if (!disabled) {
+ DateTime expiry = (DateTime.Now + DefaultTokenExpiry > passwordExpiry)
+ ? DateTime.Now + DefaultTokenExpiry
+ : passwordExpiry;
+
+ BasicAuthToken token = new BasicAuthToken(username, passwordExpiry, expiry);
+ addToCurrentTokens(token);
+ return token;
+ }
+
+ return null;
+ }
+
+ #region IAuthenticationProvider
+
+ public DateTime GetTokenExpiry(IAuthenticationToken user) {
+ //// Only basic tokens are valid
+ //BasicAuthToken authToken = user as BasicAuthToken;
+
+ //if (authToken != null && this.currentTokens.ContainsKey(authToken.Username)) {
+ // Dictionary<Guid, BasicAuthToken> userTokens = this.currentTokens[authToken.Username];
+
+ // if (userTokens.ContainsKey(authToken.TokenId)) {
+ // // Don't trust the passed in expiry - we don't know where it has been!
+ // return userTokens[authToken.TokenId].CredentialsExpiry;
+ // }
+ //}
+
+ throw new NotImplementedException();
+
+ // Invalid token
+ return DateTime.MinValue;
+ }
+
+ public bool TokenExpired(IAuthenticationToken user) {
+
+ throw new NotImplementedException();
+ return (GetTokenExpiry(user) > DateTime.Now);
+ }
+
+ public bool ValidToken(IAuthenticationToken user) {
+
+ throw new NotImplementedException();
+ // This also checks if the token is valid as well as not expired
+ return !TokenExpired(user);
+ }
+
+ public bool IsLockedOut(IAuthenticationToken user) {
+
+ throw new NotImplementedException();
+ // TODO: fix this!
+ return false;
+ }
+
+ public bool IsEnabled(IAuthenticationToken user) {
+ //using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // using (MySqlCommand cmd = cnn.CreateCommand()) {
+ // cmd.CommandText = "SELECT Disabled FROM `User` WHERE Username = ?Username";
+ // cmd.Parameters.Add("?Username", user.Username);
+ // object o = cmd.ExecuteNonQuery();
+
+ // bool disabled = true;
+
+ // if (o is sbyte) {
+ // disabled = ((sbyte) o == 1) ? true : false;
+ // }
+
+ // return (!disabled);
+ // }
+ //}
+
+ throw new NotImplementedException();
+ }
+
+ public bool ChangePassword(IAuthenticationToken user, string newPassword) {
+ //using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // using (MySqlCommand cmd = cnn.CreateCommand()) {
+ // cmd.CommandText = "UPDATE `User` SET Password = ?Password WHERE Username = ?Username";
+ // cmd.Parameters.Add("?Username", user.Username);
+ // cmd.Parameters.Add("?Password", newPassword);
+ // int count = cmd.ExecuteNonQuery();
+
+ // return (count == 1);
+ // }
+ //}
+
+ throw new NotImplementedException();
+ }
+
+ public void ResetLockOut(string username) {
+ throw new NotImplementedException("The method or operation is not implemented.");
+ }
+
+ public void SetEnabled(string username, bool enabled) {
+ //using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // using (MySqlCommand cmd = cnn.CreateCommand()) {
+ // cmd.CommandText = "UPDATE `User` SET Disabled = ?Disabled WHERE Username = ?Username";
+ // cmd.Parameters.Add("?Username", username);
+ // cmd.Parameters.Add("?Disabled", !enabled);
+ // int count = cmd.ExecuteNonQuery();
+ // }
+ //}
+
+ throw new NotImplementedException();
+ }
+
+ public IAuthenticationToken Authenticate(string username, string password) {
+ //// Get the hash stored in the database.
+ //using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // using (MySqlCommand cmd = cnn.CreateCommand()) {
+ // cmd.CommandText = "SELECT Disabled, LockedOutData, PasswordExpiry, Password FROM User WHERE Username = ?Username";
+ // cmd.Parameters.Add("?Username", username);
+ // MySqlDataReader reader = cmd.ExecuteReader();
+
+ // if (reader.Read()) {
+ // string dbHash = reader["Password"] as string;
+ // bool disabled = ((sbyte) reader["Disabled"] == 1) ? true : false;
+ // DateTime passwordExpiry = (DateTime) reader["PasswordExpiry"];
+
+ // return createValidatedToken(username, disabled, passwordExpiry);
+ // }
+ // }
+ //}
+
+ throw new NotImplementedException();
+
+ // Hashes do not match or no such user
+ return null;
+ }
+
+ public IAuthenticationToken CreateAuthToken(string username) {
+ //// Get the hash stored in the database.
+ //using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // using (MySqlCommand cmd = cnn.CreateCommand()) {
+ // cmd.CommandText = "SELECT COUNT(*) FROM User WHERE Username = ?Username";
+ // cmd.Parameters.Add("?Username", username);
+ // long count = (long) cmd.ExecuteScalar();
+
+ // if (count == 1) {
+ // return createValidatedToken(username, false, DateTime.MaxValue);
+ // }
+ // }
+ //}
+
+ throw new NotImplementedException();
+
+ // No such user
+ return null;
+ }
+ #endregion
+
+ #region IHashAuthProvider Members
+
+ public IAuthenticationToken Authenticate(string username, string hash, HashAuthType authType) {
+ //if ((authType & HashAuthType.Ntlm) == HashAuthType.Ntlm) {
+ // // Get the hash stored in the database.
+ // using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // using (MySqlCommand cmd = cnn.CreateCommand()) {
+ // cmd.CommandText = "SELECT Disabled, LockedOutData, PasswordExpiry, Password FROM User WHERE Username = ?Username";
+ // cmd.Parameters.Add("?Username", username);
+ // MySqlDataReader reader = cmd.ExecuteReader();
+
+ // if (reader.Read()) {
+ // string dbPassword = reader["Password"] as string;
+ // bool disabled = ((sbyte) reader["Disabled"] == 1) ? true : false;
+ // DateTime passwordExpiry = (DateTime) reader["PasswordExpiry"];
+
+ // // Generate a NTLM hash
+ // Type3Message type3Msg = new Type3Message();
+ // type3Msg.Password = dbPassword;
+ // string dbHash = Convert.ToBase64String(type3Msg.NT);
+
+ // if (dbHash == hash) {
+ // // Hashes match, return a valid token
+ // return createValidatedToken(username, disabled, passwordExpiry);
+ // }
+ // }
+ // }
+ // }
+ //}
+
+ throw new NotImplementedException();
+
+ return null;
+ }
+
+ public HashAuthType HashAuthType {
+ get { return HashAuthType.Ntlm; }
+ }
+
+ #endregion
+
+ public static readonly TimeSpan DefaultTokenExpiry = TimeSpan.FromMinutes(30);
+ }
+}
Added: NMail/trunk/NMail.LocalStoreData.NHibernate/NHibernateLocalStoreData.cs
===================================================================
--- NMail/trunk/NMail.LocalStoreData.NHibernate/NHibernateLocalStoreData.cs (rev 0)
+++ NMail/trunk/NMail.LocalStoreData.NHibernate/NHibernateLocalStoreData.cs 2007-03-04 05:17:47 UTC (rev 159)
@@ -0,0 +1,1819 @@
+/*
+ * Copyright 2004-2006 Luke Quinane and Daniel Frampton
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Data;
+using System.Security.Cryptography;
+using System.Text;
+
+using NHibernate;
+using NHibernate.Expression;
+
+using NMail.Configuration;
+using NMail.DataTypes;
+using NMail.DataTypes.ACLs;
+using NMail.DataTypes.Calendar;
+using NMail.DataTypes.LocalStore;
+using NMail.Helper;
+
+// TODO: implement quotas
+
+namespace NMail.LocalStoreData.NHibernate {
+ /// <summary>
+ /// A MySql based local store data provider.
+ /// </summary>
+ [Serializable]
+ public class NHibernateLocalStoreData : MarshalByRefObject, ILocalStoreData {
+
+ global::NHibernate.Cfg.Configuration hibernateCfg;
+
+ ISessionFactory hibernateFactory;
+
+ public NHibernateLocalStoreData() {
+ this.hibernateCfg = new global::NHibernate.Cfg.Configuration();
+ this.hibernateCfg.Configure(System.Reflection.Assembly.GetExecutingAssembly(), "NMail.LocalStoreData.MySql.Resources.hibernate-configuration.xml");
+ this.hibernateCfg.AddAssembly("NMail.LocalStoreData.NHibernate");
+
+ this.hibernateFactory = this.hibernateCfg.BuildSessionFactory();
+ }
+
+ #region ILocalStoreData Members
+
+ #region Message Delivery
+
+ // TODO: update quotas?
+ public void DeliverMessage(LocalStoreDelivery message) {
+ DeliverMessage(message.Message, GetStoreFolder(message.TargetFolder));
+
+ foreach (StoreFolder folder in message.AdditionalFolders) {
+ DeliverMessage(message.Message, GetStoreFolder(folder));
+ }
+ }
+
+ public void DeliverMessage(Message message, StoreFolder folder) {
+ //using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // MySqlTransaction transaction = null;
+
+ // try {
+ // transaction = cnn.BeginTransaction();
+
+ // MySqlCommand cmd = cnn.CreateCommand();
+ // cmd.Transaction = transaction;
+ // cmd.Connection = cnn;
+
+ // // Get the next folder message id
+ // cmd.CommandText = "SELECT NextMessageId FROM Folder WHERE FolderId=?FolderId";
+ // cmd.Parameters.Add("?FolderId", folder.FolderId);
+ // int folderMessageId = (int)cmd.ExecuteScalar();
+
+ // // Update the next message id
+ // cmd = cnn.CreateCommand();
+ // cmd.Transaction = transaction;
+ // cmd.Connection = cnn;
+ // cmd.CommandText = "UPDATE Folder SET NextMessageId=?NextMessageId WHERE FolderId=?FolderId";
+ // cmd.Parameters.Add("?FolderId", folder.FolderId);
+ // cmd.Parameters.Add("?NextMessageId", folderMessageId + 1);
+ // int count = cmd.ExecuteNonQuery();
+ // if (count == 1) {
+ // // Insert the message body
+ // cmd = cnn.CreateCommand();
+ // cmd.Transaction = transaction;
+ // cmd.Connection = cnn;
+ // cmd.CommandText = "INSERT INTO Message (FolderId, FolderMessageId, MimeMessage, Headers, Preamble, Postamble, MessageFlags, Size, InternalDate) " +
+ // "VALUES (?FolderId, ?FolderMessageId, ?MimeMessage, ?Headers, ?Preamble, ?Postamble, ?MessageFlags, ?Size, ?InternalDate)";
+ // cmd.Parameters.Add("?FolderId", folder.FolderId);
+ // cmd.Parameters.Add("?FolderMessageId", folderMessageId);
+ // cmd.Parameters.Add("?MimeMessage", message.MultipartBody);
+ // cmd.Parameters.Add("?Headers", message.Headers.Data.Bytes);
+ // cmd.Parameters.Add("?Preamble", (message.Preamble != null) ? message.Preamble.Data.Bytes : null);
+ // cmd.Parameters.Add("?Postamble", (message.Postamble != null) ? message.Postamble.Data.Bytes : null);
+ // cmd.Parameters.Add("?MessageFlags", StoreMessageFlags.Recent);
+ // cmd.Parameters.Add("?Size", message.Size);
+ // cmd.Parameters.Add("?InternalDate", DateTime.Now);
+ // count = cmd.ExecuteNonQuery();
+
+ // if (count == 1) {
+ // // Get the message Id
+ // cmd = cnn.CreateCommand();
+ // cmd.Transaction = transaction;
+ // cmd.Connection = cnn;
+ // cmd.CommandText = "SELECT LAST_INSERT_ID()";
+ // long messageId = (long)cmd.ExecuteScalar(); ;
+
+ // if (message.MultipartBody) {
+ // // Insert each part of the message
+ // for (int i = 0; i < message.MimeParts.Count; i++) {
+ // // Insert the current part
+ // cmd = cnn.CreateCommand();
+ // cmd.Transaction = transaction;
+ // cmd.Connection = cnn;
+ // cmd.CommandText = "INSERT INTO MessageData (MessageId, Part, Data) " +
+ // "VALUES (?MessageId, ?Part, ?Data)";
+ // cmd.Parameters.Add("?MessageId", messageId);
+ // cmd.Parameters.Add("?Part", i + 1); // Count from 1
+ // cmd.Parameters.Add("?Data", message.MimeParts[i].Data.Bytes);
+ // count = cmd.ExecuteNonQuery();
+
+ // if (count != 1) {
+ // // Insert failed, rollback
+ // throw new System.Data.DataException("Error inserting message part.");
+ // }
+ // }
+ // } else {
+ // // Insert the body data
+ // cmd = cnn.CreateCommand();
+ // cmd.Transaction = transaction;
+ // cmd.Connection = cnn;
+
+ // cmd.CommandText = "INSERT INTO MessageData (MessageId, Part, Data) " +
+ // "VALUES (?MessageId, 1, ?Data)";
+ // cmd.Parameters.Add("?MessageId", messageId);
+ // cmd.Parameters.Add("?Data", message.BodyData.Bytes);
+ // count = cmd.ExecuteNonQuery();
+
+ // if (count != 1) {
+ // // Insert failed, rollback
+ // throw new System.Data.DataException("Error inserting message body.");
+ // }
+ // }
+ // } else {
+ // throw new System.Data.DataException("Error inserting message details.");
+ // }
+ // } else {
+ // throw new System.Data.DataException("Error updating next message id.");
+ // }
+
+ // transaction.Commit();
+
+ // } catch (Exception e) {
+ // if (transaction != null) {
+ // transaction.Rollback();
+ // }
+
+ // throw e;
+ // }
+ //}
+ throw new NotImplementedException();
+ }
+ #endregion
+
+ #region Folder Retrieval and Manipulation
+
+ #region GetStoreFolder
+
+ //private StoreFolder getStoreFolder(Folder folder, MySqlConnection cnn, MySqlTransaction transaction) {
+ // using (MySqlCommand cmd = cnn.CreateCommand()) {
+ // cmd.Transaction = transaction;
+ // cmd.CommandType = CommandType.StoredProcedure;
+ // cmd.CommandText = "GetFolderId";
+ // cmd.Parameters.Add("?FolderId", MySqlDbType.Int32);
+ // cmd.Parameters.Add("?Name", folder.FullFolderName);
+ // cmd.Parameters.Add("?NameSpace", folder.NameSpace);
+ // cmd.Parameters["FolderId"].Direction = ParameterDirection.Output;
+
+ // int count = cmd.ExecuteNonQuery();
+
+ // object o = cmd.Parameters["FolderId"].Value;
+ // int? folderId = (o == DBNull.Value) ? null : (int?) o;
+
+ // if (folderId.HasValue) {
+ // return GetStoreFolder(folderId.Value);
+ // } else {
+ // return null;
+ // }
+ // }
+ //}
+
+ public StoreFolder GetStoreFolder(Folder folder) {
+ //using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // return getStoreFolder(folder, cnn, null);
+ //}
+ throw new NotImplementedException();
+ }
+
+ public StoreFolder GetStoreFolder(int folderId) {
+ //using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // using (MySqlCommand cmd = cnn.CreateCommand()) {
+ // cmd.CommandType = CommandType.StoredProcedure;
+ // cmd.CommandText = "GetFolder";
+ // cmd.Parameters.Add("?FolderId", folderId);
+ // cmd.Parameters.Add("?ParentId", MySqlDbType.Int32);
+ // cmd.Parameters.Add("?Name", MySqlDbType.VarChar);
+ // cmd.Parameters.Add("?NameSpace", MySqlDbType.VarChar);
+ // cmd.Parameters.Add("?Children", MySqlDbType.Int32);
+ // cmd.Parameters.Add("?Result", MySqlDbType.Int32);
+ // cmd.Parameters["ParentId"].Direction = ParameterDirection.Output;
+ // cmd.Parameters["Name"].Direction = ParameterDirection.Output;
+ // cmd.Parameters["NameSpace"].Direction = ParameterDirection.Output;
+ // cmd.Parameters["Children"].Direction = ParameterDirection.Output;
+ // cmd.Parameters["Result"].Direction = ParameterDirection.Output;
+
+ // cmd.ExecuteNonQuery();
+
+ // int resultValue = (int) cmd.Parameters["Result"].Value;
+ // LocalStoreFolderResult result = (LocalStoreFolderResult) resultValue;
+
+ // // Check if the lookup succeeded
+ // if (result != LocalStoreFolderResult.OkSuccessful) {
+ // return null;
+ // }
+
+ // // Parse out all the returned values
+ // string name = (string) cmd.Parameters["Name"].Value;
+ // string nameSpace = (string) cmd.Parameters["NameSpace"].Value;
+ // int children = (int) cmd.Parameters["Children"].Value;
+ // int? parentId = (cmd.Parameters["ParentId"].Value == DBNull.Value)
+ // ? null
+ // : (int?) cmd.Parameters["ParentId"].Value;
+
+ // // Return the folder object
+ // return new StoreFolder(nameSpace,
+ // name,
+ // folderId,
+ // parentId,
+ // (children != 0));
+ // }
+ //}
+ throw new NotImplementedException();
+ }
+ #endregion
+
+ #region CreateFolder
+ /// <summary>
+ /// Creates a new folder.
+ /// </summary>
+ /// <remarks>
+ /// It is a requirement of the local store that each new folder get an incremented Id number.
+ /// </remarks>
+ /// <param name="newFolder">The folder to create.</param>
+ /// <returns>The result of the attempt to create the folder.</returns>
+ public LocalStoreFolderResult CreateFolder(int userId, StoreFolder parent, Folder newFolder) {
+ //using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // using (MySqlCommand cmd = cnn.CreateCommand()) {
+ // int? parentFolderId = (parent == null) ? null : (int?) parent.FolderId;
+
+ // cmd.CommandType = CommandType.StoredProcedure;
+ // cmd.CommandText = "CreateFolder";
+ // cmd.Parameters.Add("?ParentId", parentFolderId);
+ // cmd.Parameters.Add("?NamespaceId", 1);
+ // cmd.Parameters.Add("?Name", newFolder.FullFolderName);
+ // cmd.Parameters.Add("?UserId", userId);
+ // cmd.Parameters.Add("?FolderId", MySqlDbType.Int32);
+ // cmd.Parameters.Add("?Result", MySqlDbType.Int32);
+ // cmd.Parameters["FolderId"].Direction = ParameterDirection.Output;
+ // cmd.Parameters["Result"].Direction = ParameterDirection.Output;
+
+ // cmd.ExecuteNonQuery();
+
+ // int result = (int) cmd.Parameters["Result"].Value;
+
+ // return (LocalStoreFolderResult) result;
+ // }
+ //}
+ throw new NotImplementedException();
+ }
+ #endregion
+
+ #region DeleteFolder
+ /// <summary>
+ /// Deletes an existing folder.
+ /// </summary>
+ /// <param name="authToken">The authentication credentials.</param>
+ /// <param name="folderId">The Id of the folder to delete.</param>
+ /// <returns>The result of the delete attempt.</returns>
+ public LocalStoreFolderResult DeleteFolder(int folderId) {
+ //using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // using (MySqlCommand cmd = cnn.CreateCommand()) {
+ // cmd.CommandType = CommandType.StoredProcedure;
+ // cmd.CommandText = "DeleteFolder";
+ // cmd.Parameters.Add("?DeleteFolderId", folderId);
+ // cmd.Parameters.Add("?Result", MySqlDbType.Int32);
+ // cmd.Parameters["Result"].Direction = ParameterDirection.Output;
+
+ // cmd.ExecuteNonQuery();
+
+ // int result = (int) cmd.Parameters["Result"].Value;
+
+ // return (LocalStoreFolderResult) result;
+ // }
+ //}
+ throw new NotImplementedException();
+ }
+ #endregion
+
+ #region RenameFolder
+ public LocalStoreFolderResult RenameFolder(StoreFolder folder, string newFolderName) {
+ ///* Several cases:
+ // * a1.b1 -> a1.b2 => simply rename "a1.b1" to "a1.b2"
+ // * a1.b1 -> a2.b1 => rename "a1" to "a2" and "a1.b1" to "a2.b1"
+ // * a1.b1.c1 -> a1.b2.c1 => rename "a1.b1" to "a1.b2" and "a1.b1.c1" to "a1.b2.c1"
+ // * So simply rename the folder and any children.
+ // *
+ // * Also renaming "a1.b1" to "a2.b2" causes problems so renaming will be limited
+ // * to only allow changing the end folder in the hierarchy. For example:
+ // * a1.b1 -> a1.b2 is ok
+ // * a1 -> a2 is ok
+ // * a1.b1 to a2.b1 is not ok
+ // */
+
+ //// Check only the top level folder is being renamed
+ //char[] delim = { NMailConfiguration.Current.LocalStore.FolderDelimiter };
+ //string[] folderParts = folder.FullFolderName.Split(delim);
+ //string[] newParts = newFolderName.Split(delim);
+
+ //if (folderParts.Length != newParts.Length) {
+ // return LocalStoreFolderResult.NotPermitted;
+ //}
+
+ //for (int i = 0; i < folderParts.Length - 1; i++) {
+ // if (!folderParts[i].ToLower().Equals(newParts[i].ToLower())) {
+ // return LocalStoreFolderResult.NotPermitted;
+ // }
+ //}
+
+ //// Only the last part of the folder name has changed, proceed with the rename
+ //using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // MySqlTransaction transaction = cnn.BeginTransaction();
+
+ // // Check for a folder with the same name
+ // Folder newFolder = new Folder(folder.NameSpace, newFolderName);
+ // if (getStoreFolder(newFolder, cnn, transaction) != null) {
+ // transaction.Commit();
+ // return LocalStoreFolderResult.AlreadyExists;
+ // }
+
+ // throw new NotImplementedException();
+ // // TODO: rename the folder
+ // // TODO: recursively rename all children
+ //}
+ throw new NotImplementedException();
+ }
+ #endregion
+
+ #region GetChildren
+ public StoreFolder[] GetChildren(StoreFolder parent) {
+ //using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // using (MySqlCommand cmd = cnn.CreateCommand()) {
+ // cmd.CommandType = CommandType.StoredProcedure;
+ // cmd.CommandText = "GetFolderChildIds";
+ // cmd.Parameters.Add("?FolderId", parent.FolderId);
+
+ // using (MySqlDataReader reader = cmd.ExecuteReader()) {
+ // List<int> childIds = new List<int>();
+
+ // while (reader.Read()) {
+ // int childFolderId = (int)reader["FolderId"];
+ // childIds.Add(childFolderId);
+ // }
+
+ // reader.Close();
+
+ // List<StoreFolder> children = new List<StoreFolder>();
+
+ // foreach (int childFolderId in childIds) {
+ // StoreFolder folder = GetStoreFolder(childFolderId);
+
+ // if (folder != null) {
+ // children.Add(folder);
+ // }
+ // }
+
+ // return children.ToArray();
+ // }
+ // }
+ //}
+ throw new NotImplementedException();
+ }
+ #endregion
+
+ /// <summary>
+ /// Gets a list of all folders
+ /// </summary>
+ /// <returns>The list of folders.</returns>
+ public StoreFolder[] GetFolders() {
+ //using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // using (MySqlCommand cmd = cnn.CreateCommand()) {
+ // cmd.CommandType = CommandType.StoredProcedure;
+ // cmd.CommandText = "GetFolders";
+
+ // List<StoreFolder> folders = new List<StoreFolder>();
+ // MySqlDataReader reader = cmd.ExecuteReader();
+
+ // while (reader.Read()) {
+ // int folderId = (int) reader["FolderId"];
+ // string nameSpace = (string) reader["NameSpace"];
+ // string name = (string) reader["Name"];
+ // int? parentId = (reader["ParentFolderId"] == DBNull.Value)
+ // ? null
+ // : (int?) reader["ParentFolderId"];
+
+ // // TODO: Get HasChildren from the reader
+ // folders.Add(new StoreFolder(nameSpace, name, folderId, parentId, false));
+ // }
+
+ // return folders.ToArray();
+ // }
+ //}
+ throw new NotImplementedException();
+ }
+ #endregion
+
+ #region Folder Subscription
+
+ #region GetSubscribedFolders
+ public StoreFolder[] GetSubscribedFolders(string userName) {
+ //using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // using (MySqlCommand cmd = cnn.CreateCommand()) {
+ // cmd.CommandText = "SELECT s.FolderId AS FolderId FROM User u, Subscription s WHERE s.UserId = u.UserId AND u.UserName = ?UserName";
+ // cmd.Parameters.Add("?UserName", userName);
+
+ // using (MySqlDataReader reader = cmd.ExecuteReader()) {
+ // List<int> subscribedIds = new List<int>();
+
+ // while (reader.Read()) {
+ // int currentId = (int) reader["FolderId"];
+
+ // subscribedIds.Add(currentId);
+ // }
+ // reader.Close();
+
+ // List<StoreFolder> subscribedFolders = new List<StoreFolder>();
+ // foreach (int currentId in subscribedIds) {
+ // subscribedFolders.Add(GetStoreFolder(currentId));
+ // }
+ // return subscribedFolders.ToArray();
+ // }
+ // }
+ //}
+ throw new NotImplementedException();
+ }
+ #endregion
+
+ #region Subscribe
+ //private bool folderSubscribed(int userId, int folderId) {
+ // using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // using (MySqlCommand cmd = cnn.CreateCommand()) {
+ // cmd.CommandText = "SELECT COUNT(*) FROM Subscription WHERE UserId = ?UserId AND FolderId = ?FolderId";
+ // cmd.Parameters.Add("?UserId", userId);
+ // cmd.Parameters.Add("?FolderId", folderId);
+ // long count = (long) cmd.ExecuteScalar();
+
+ // return (count > 0);
+ // }
+ // }
+ //}
+
+ public void Subscribe(string userName, StoreFolder folder) {
+ //using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // using (MySqlCommand cmd = cnn.CreateCommand()) {
+ // cmd.CommandText = "SELECT UserId FROM User WHERE UserName = ?UserName";
+ // cmd.Parameters.Add("?UserName", userName);
+ // int userId = (int) cmd.ExecuteScalar();
+
+ // if (!folderSubscribed(userId, folder.FolderId)) {
+ // cmd.CommandText = "INSERT INTO Subscription (UserId, FolderId) VALUES(?UserId, ?FolderId)";
+ // cmd.Parameters.Add("?FolderId", folder.FolderId);
+ // cmd.Parameters.Add("?UserId", userId);
+
+ // if (cmd.ExecuteNonQuery() != 1) {
+ // throw new System.Data.DataException("Error updating subscription.");
+ // }
+ // }
+ // }
+ //}
+ throw new NotImplementedException();
+ }
+ #endregion
+
+ #region UnSubscribe
+ public void UnSubscribe(string userName, StoreFolder folder) {
+ //using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // using (MySqlCommand cmd = cnn.CreateCommand()) {
+ // cmd.CommandText = "SELECT UserId FROM User WHERE Username = ?Username";
+ // cmd.Parameters.Add("?Username", userName);
+ // int userId = (int)cmd.ExecuteScalar();
+
+ // cmd.CommandText = "DELETE FROM Subscription WHERE UserId = ?UserId AND FolderId = ?FolderId";
+ // cmd.Parameters.Add("?UserId", userId);
+ // cmd.Parameters.Add("?FolderId", folder.FolderId);
+
+ // if (cmd.ExecuteNonQuery() != 1) {
+ // throw new System.Data.DataException("Error updating subscription.");
+ // }
+ // }
+ //}
+ throw new NotImplementedException();
+ }
+ #endregion
+
+ #endregion
+
+ #region Message Id and Offset
+
+ #region GetNextMessageId
+ public int GetNextMessageId(int messageId, StoreFolder folder) {
+ //using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // using (MySqlCommand cmd = cnn.CreateCommand()) {
+ // cmd.CommandText = "SELECT FolderMessageId FROM Message WHERE FolderId = ?FolderId AND FolderMessageId > ?MessageId ORDER BY FolderMessageId LIMIT 1";
+ // cmd.Parameters.Add("?FolderId", folder.FolderId);
+ // cmd.Parameters.Add("?MessageId", messageId);
+ // object o = cmd.ExecuteScalar();
+
+ // return (o == null) ? 0 : (int)o;
+ // }
+ //}
+ throw new NotImplementedException();
+ }
+
+ public int GetNextMessageId(StoreFolder folder) {
+ //using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // using (MySqlCommand cmd = cnn.CreateCommand()) {
+ // cmd.CommandText = "SELECT NextMessageId FROM Folder WHERE FolderId = ?FolderId";
+ // cmd.Parameters.Add("?FolderId", folder.FolderId);
+ // object o = cmd.ExecuteScalar();
+
+ // return (o == null) ? 0 : (int)o;
+ // }
+ //}
+ throw new NotImplementedException();
+ }
+ #endregion
+
+ #region GetMessageId
+ public int GetMessageId(int messageOffset, StoreFolder folder) {
+ //using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // using (MySqlCommand cmd = cnn.CreateCommand()) {
+ // cmd.CommandText = "SELECT FolderMessageId FROM Message WHERE FolderId = ?FolderId ORDER BY FolderMessageId LIMIT 1 OFFSET ?Offset";
+ // cmd.Parameters.Add("?FolderId", folder.FolderId);
+ // cmd.Parameters.Add("?Offset", messageOffset - 1);
+ // return (int)cmd.ExecuteScalar();
+ // }
+ //}
+ throw new NotImplementedException();
+ }
+ #endregion
+
+ #region GetMessageOffset
+ public int GetMessageOffset(int messageId, StoreFolder folder) {
+ //using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // using (MySqlCommand cmd = cnn.CreateCommand()) {
+ // cmd.CommandText = "SELECT COUNT(*) FROM Message WHERE FolderId = ?FolderId AND FolderMessageId <= ?FolderMessageId";
+ // cmd.Parameters.Add("?FolderId", folder.FolderId);
+ // cmd.Parameters.Add("?FolderMessageId", messageId);
+ // return Convert.ToInt32((long)cmd.ExecuteScalar());
+ // }
+ //}
+ throw new NotImplementedException();
+ }
+ #endregion
+
+ #region GetMessageIds
+ public IList<int> GetMessageIds(int folderId) {
+ //List<int> result = new List<int>();
+
+ //using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // using (MySqlCommand cmd = cnn.CreateCommand()) {
+ // cmd.CommandText = "SELECT FolderMessageId FROM Message WHERE FolderId = ?FolderId";
+ // cmd.Parameters.Add("?FolderId", folderId);
+
+ // MySqlDataReader reader = cmd.ExecuteReader();
+
+ // while (reader.Read()) {
+ // int id = (int) reader["FolderMessageId"];
+ // result.Add(id);
+ // }
+ // }
+ //}
+
+ //return result;
+ throw new NotImplementedException();
+ }
+ #endregion
+ #endregion
+
+ #region Message Flags
+
+ #region GetMessageFlags
+ public StoreMessageFlags GetMessageFlags(int messageId, StoreFolder folder) {
+ //StoreMessageFlags flags = StoreMessageFlags.None;
+
+ //using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // using (MySqlCommand cmd = cnn.CreateCommand()) {
+ // cmd.CommandText = "SELECT MessageFlags FROM Message WHERE FolderId = ?FolderId AND FolderMessageId = ?FolderMessageId";
+ // cmd.Parameters.Add("?FolderId", folder.FolderId);
+ // cmd.Parameters.Add("?FolderMessageId", messageId);
+ // object o = cmd.ExecuteScalar();
+
+ // if (!Convert.IsDBNull(o)) {
+ // flags = (StoreMessageFlags) o;
+ // }
+ // }
+ //}
+
+ //return flags;
+ throw new NotImplementedException();
+ }
+ #endregion
+
+ #region SetMessageFlags
+ public void SetMessageFlags(int messageId, StoreFolder folder, StoreMessageFlags flags) {
+ //using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // using (MySqlCommand cmd = cnn.CreateCommand()) {
+ // cmd.CommandText = "UPDATE Message SET MessageFlags = ?MessageFlags WHERE FolderId = ?FolderId AND FolderMessageId = ?FolderMessageId";
+ // cmd.Parameters.Add("?FolderId", folder.FolderId);
+ // cmd.Parameters.Add("?FolderMessageId", messageId);
+ // cmd.Parameters.Add("?MessageFlags", (int) flags);
+
+ // if (cmd.ExecuteNonQuery() != 1) {
+ // throw new Exception("Error updating message flags.");
+ // }
+ // }
+ //}
+ throw new NotImplementedException();
+ }
+ #endregion
+
+ #endregion
+
+ #region Message Retrieval
+
+ #region GetInternalDate
+ public DateTime GetInternalDate(int messageId, StoreFolder folder) {
+ //using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // using (MySqlCommand cmd = cnn.CreateCommand()) {
+ // cmd.CommandText = "SELECT InternalDate FROM Message WHERE FolderId = ?FolderId AND FolderMessageId = ?FolderMessageId";
+ // cmd.Parameters.Add("?FolderId", folder.FolderId);
+ // cmd.Parameters.Add("?FolderMessageId", messageId);
+ // return (DateTime)cmd.ExecuteScalar();
+ // }
+ //}
+ throw new NotImplementedException();
+ }
+ #endregion
+
+ #region GetMessageSize
+ public int GetMessageSize(int messageId, StoreFolder folder) {
+ //using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // using (MySqlCommand cmd = cnn.CreateCommand()) {
+ // cmd.CommandText = "SELECT Size FROM Message WHERE FolderId = ?FolderId AND FolderMessageId = ?FolderMessageId";
+ // cmd.Parameters.Add("?FolderId", folder.FolderId);
+ // cmd.Parameters.Add("?FolderMessageId", messageId);
+ // return (int)cmd.ExecuteScalar();
+ // }
+ //}
+ throw new NotImplementedException();
+ }
+ #endregion
+
+ #region GetMessageHeaders
+ public MessageHeaders GetMessageHeaders(int messageId, int folderId) {
+ //using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // using (MySqlCommand cmd = cnn.CreateCommand()) {
+ // cmd.CommandText = "SELECT Headers FROM Message WHERE FolderId = ?FolderId AND FolderMessageId = ?FolderMessageId";
+ // cmd.Parameters.Add("?FolderId", folderId);
+ // cmd.Parameters.Add("?FolderMessageId", messageId);
+ // byte[] headerBytes = (byte[]) cmd.ExecuteScalar();
+
+ // if (headerBytes == null) {
+ // return null;
+ // } else {
+ // return new MessageHeaders(new ByteString(headerBytes, Encoding.ASCII));
+ // }
+ // }
+ //}
+ throw new NotImplementedException();
+ }
+ #endregion
+
+ #region GetMessageMimePart
+ public IMessageBodyPart GetMessageMimePart(int messageId, int folderId, int messagePart) {
+ //using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // using (MySqlCommand cmd = cnn.CreateCommand()) {
+ // cmd.CommandText = "SELECT md.Data FROM Message m, MessageData md WHERE m.MessageId = md.MessageId AND m.FolderId = ?FolderId AND m.FolderMessageId = ?FolderMessageId AND md.Part = ?Part";
+ // cmd.Parameters.Add("?FolderId", folderId);
+ // cmd.Parameters.Add("?FolderMessageId", messageId);
+ // cmd.Parameters.Add("?Part", messagePart);
+ // byte[] bodyDataBytes = (byte[]) cmd.ExecuteScalar();
+ // return new SimpleBodyPart(new ByteString(bodyDataBytes, Encoding.ASCII));
+ // }
+ //}
+ throw new NotImplementedException();
+ }
+ #endregion
+
+ #region GetMessage
+ public Message GetMessage(int messageId, int folderId) {
+ //using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // using (MySqlCommand cmd = cnn.CreateCommand()) {
+ // cmd.CommandText = "SELECT MimeMessage FROM Message WHERE FolderId = ?FolderId AND FolderMessageId = ?FolderMessageId";
+ // cmd.Parameters.Add("?FolderId", folderId);
+ // cmd.Parameters.Add("?FolderMessageId", messageId);
+
+ // SByte sb = (SByte) cmd.ExecuteScalar();
+ // bool mimeMessage = (sb == 1) ? true : false;
+ // Message result = null;
+ // MessageHeaders headers = this.GetMessageHeaders(messageId, folderId);
+
+ // if (mimeMessage) {
+ // cmd.CommandText = "SELECT Preamble, Postamble FROM Message WHERE FolderId = ?FolderId AND FolderMessageId = ?FolderMessageId";
+ // cmd.Parameters.Add("?FolderId", folderId);
+ // cmd.Parameters.Add("?FolderMessageId", messageId);
+ // MySqlDataReader reader = cmd.ExecuteReader();
+
+ // if (reader.Read()) {
+ // MessageDataPart preamble = null;
+ // MessageDataPart postamble = null;
+
+ // if (reader["Preamble"] != DBNull.Value) {
+ // preamble = new MessageDataPart(new ByteString((byte[]) reader["Preamble"], Encoding.ASCII)); // TODO: check if encoding is ok?
+ // }
+ // if (reader["Postamble"] != DBNull.Value) {
+ // postamble = new MessageDataPart(new ByteString((byte[]) reader["Postamble"], Encoding.ASCII)); // TODO: check if encoding is ok?
+ // }
+ // reader.Close();
+
+ // cmd.CommandText = "SELECT md.Data FROM Message m, MessageData md WHERE m.MessageId = md.MessageId AND m.FolderId = ?FolderId AND m.FolderMessageId = ?FolderMessageId ORDER BY md.Part";
+ // cmd.Parameters.Add("?FolderId", folderId);
+ // cmd.Parameters.Add("?FolderMessageId", messageId);
+ // reader = cmd.ExecuteReader();
+ // ArrayList mimePartList = new ArrayList();
+
+ // while (reader.Read()) {
+ // IMessageBodyPart currentPart = MessageHelper.ParseMessage(new ByteString((byte[]) reader["Data"], Encoding.ASCII)); // TODO: check if encoding is ok?
+ // mimePartList.Add(currentPart);
+ // }
+
+ // IMessageBodyPart[] mimeParts = (IMessageBodyPart[]) mimePartList.ToArray(typeof(IMessageBodyPart));
+ // result = new Message(new MultipartBodyPart(headers, preamble, mimeParts, postamble));
+ // }
+
+ // } else {
+ // cmd.CommandText = "SELECT md.Data FROM Message m, MessageData md WHERE m.MessageId = md.MessageId AND m.FolderId = ?FolderId AND m.FolderMessageId = ?FolderMessageId AND md.Part = 1";
+ // cmd.Parameters.Add("?FolderId", folderId);
+ // cmd.Parameters.Add("?FolderMessageId", messageId);
+ // byte[] data = (byte[]) cmd.ExecuteScalar();
+
+ // result = new Message(new SimpleBodyPart(headers, new ByteString(data, Encoding.ASCII))); // TODO: check if encoding is ok?
+ // }
+
+ // return result;
+ // }
+ //}
+ throw new NotImplementedException();
+ }
+ #endregion
+
+ #endregion
+
+ #region Message Counts
+
+ #region GetMessageCount
+ public int GetMessageCount(StoreFolder folder) {
+ //using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // using (MySqlCommand cmd = cnn.CreateCommand()) {
+ // cmd.CommandText = "SELECT COUNT(*) as MessageCount FROM Message WHERE FolderId = ?FolderId";
+ // cmd.Parameters.Add("?FolderId", folder.FolderId);
+ // return Convert.ToInt32((Int64)cmd.ExecuteScalar());
+ // }
+ //}
+ throw new NotImplementedException();
+ }
+ #endregion
+
+ #region GetMessageCountWithFlags
+ public int GetMessageCountWithFlags(StoreFolder folder, StoreMessageFlags flags) {
+ //using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // using (MySqlCommand cmd = cnn.CreateCommand()) {
+ // cmd.CommandText = "SELECT COUNT(*) FROM Message WHERE FolderId = ?FolderId AND MessageFlags & ?MessageFlags = ?MessageFlags";
+ // cmd.Parameters.Add("?FolderId", folder.FolderId);
+ // cmd.Parameters.Add("?MessageFlags", flags);
+ // return Convert.ToInt32((long) cmd.ExecuteScalar());
+ // }
+ //}
+ throw new NotImplementedException();
+ }
+ #endregion
+
+ #endregion
+
+ #region PurgeDeletedMessages
+ public int[] PurgeDeletedMessages(StoreFolder folder) {
+ //using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // ArrayList folderMsgIds = new ArrayList();
+ // MySqlTransaction transaction = cnn.BeginTransaction();
+
+ // MySqlCommand cmd = cnn.CreateCommand();
+ // cmd.Transaction = transaction;
+ // cmd.CommandText = "SELECT FolderMessageId FROM Message WHERE FolderId = ?FolderId AND ((MessageFlags & ?DeletedFlag) != 0)";
+ // cmd.Parameters.Add("?FolderId", folder.FolderId);
+ // cmd.Parameters.Add("?DeletedFlag", (int) StoreMessageFlags.Deleted);
+
+ // // Get a list of deleted messages
+ // MySqlDataReader reader = cmd.ExecuteReader();
+ // while (reader.Read()) {
+ // folderMsgIds.Add((int) reader["FolderMessageId"]);
+ // }
+ // reader.Close();
+
+ // int[] result = new int[folderMsgIds.Count];
+ // for (int i = 0; i < folderMsgIds.Count; i++) {
+ // result[i] = GetMessageOffset((int) folderMsgIds[i], folder);
+
+ // cmd = cnn.CreateCommand();
+ // cmd.Transaction = transaction;
+ // cmd.CommandText = "SELECT MessageId FROM Message WHERE FolderId = ?FolderId AND FolderMessageId = ?FolderMessageId";
+ // cmd.Parameters.Add("?FolderId", folder.FolderId);
+ // cmd.Parameters.Add("?FolderMessageId", (int) folderMsgIds[i]);
+ // long messageId = (long) cmd.ExecuteScalar();
+
+ // cmd = cnn.CreateCommand();
+ // cmd.Transaction = transaction;
+ // cmd.CommandText = "DELETE FROM Message WHERE MessageId = ?MessageId";
+ // cmd.Parameters.Add("?FolderId", folder.FolderId);
+ // cmd.Parameters.Add("?MessageId", messageId);
+
+ // if (cmd.ExecuteNonQuery() != 1) {
+ // transaction.Rollback();
+ // throw new Exception("Error deleting message.");
+ // }
+ // }
+
+ // transaction.Commit();
+ // return result;
+ //}
+ throw new NotImplementedException();
+ }
+ #endregion
+
+ #region Load and Save Object
+ /// <summary>
+ /// Gets a serialized object that can be used by either an validation or a delivery action.
+ /// </summary>
+ /// <param name="key">A key to identify which object to get.</param>
+ /// <returns>The object.</returns>
+ public object LoadObject(string key) {
+ //using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // using (MySqlCommand cmd = cnn.CreateCommand()) {
+ // cmd.CommandText = "SELECT Data FROM AuxData WHERE `Key` = ?Key";
+ // cmd.Parameters.Add("?Key", key);
+ // byte[] data = (byte[]) cmd.ExecuteScalar();
+
+ // return SerializationHelper.Deserialize(data);
+ // }
+ //}
+ throw new NotImplementedException();
+ }
+
+ /// <summary>
+ /// Serializes an object that can be used later by either an validation or a delivery action.
+ /// </summary>
+ /// <param name="key">A key to identify the object at load time.</param>
+ public void SaveObject(object o, string key) {
+ //using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // MySqlTransaction trans = cnn.BeginTransaction();
+
+ // MySqlCommand cmd = cnn.CreateCommand();
+ // cmd.CommandText = "DELETE FROM AuxData WHERE `Key` = ?Key";
+ // cmd.Parameters.Add("?Key", key);
+ // cmd.Transaction = trans;
+
+ // cmd.ExecuteNonQuery();
+
+ // cmd = cnn.CreateCommand();
+ // cmd.CommandText = "INSERT INTO AuxData (`Key`, Data) VALUES (?Key, ?Data)";
+ // cmd.Parameters.Add("?Key", key);
+ // cmd.Parameters.Add("?Data", SerializationHelper.Serialize(o));
+ // cmd.Transaction = trans;
+
+ // if (cmd.ExecuteNonQuery() == 1) {
+ // trans.Commit();
+ // } else {
+ // trans.Rollback();
+ // }
+ //}
+ throw new NotImplementedException();
+ }
+ #endregion
+
+ #region User Management
+ #region Get User
+ /// <summary>
+ /// Gets the user for the given username.
+ /// </summary>
+ /// <param name="username">The username to look up.</param>
+ /// <returns>The matching user or null if non is found.</returns>
+ public LocalStoreUser GetUser(string name) {
+ //using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // return getUser(name, cnn, null);
+ //}
+ throw new NotImplementedException();
+ }
+
+ //private LocalStoreUser getUser(string name, MySqlConnection cnn, MySqlTransaction transaction) {
+ // using (MySqlCommand cmd = cnn.CreateCommand()) {
+ // cmd.Transaction = transaction;
+ // cmd.CommandType = CommandType.StoredProcedure;
+ // cmd.CommandText = "GetUserFromName";
+ // cmd.Parameters.Add("?Name", name);
+ // cmd.Parameters.Add("?UserId", MySqlDbType.Int32);
+ // cmd.Parameters.Add("?QuotaHardLimit", MySqlDbType.Int32);
+ // cmd.Parameters.Add("?QuotaWarnLimit", MySqlDbType.Int32);
+ // cmd.Parameters.Add("?UserFolderId", MySqlDbType.Int32);
+ // cmd.Parameters.Add("?Result", MySqlDbType.Int32);
+ // cmd.Parameters["UserId"].Direction = ParameterDirection.Output;
+ // cmd.Parameters["QuotaHardLimit"].Direction = ParameterDirection.Output;
+ // cmd.Parameters["QuotaWarnLimit"].Direction = ParameterDirection.Output;
+ // cmd.Parameters["UserFolderId"].Direction = ParameterDirection.Output;
+ // cmd.Parameters["Result"].Direction = ParameterDirection.Output;
+
+ // cmd.ExecuteNonQuery();
+
+ // int resultValue = (int) cmd.Parameters["Result"].Value;
+ // LocalStoreUserResult result = (LocalStoreUserResult) resultValue;
+
+ // // Check if the lookup succeeded
+ // if (result != LocalStoreUserResult.OkSuccessful) {
+ // return null;
+ // }
+
+ // // Parse out all the returned values
+ // int userId = (int) cmd.Parameters["UserId"].Value;
+ // object quotaHardLimit = cmd.Parameters["QuotaHardLimit"].Value;
+ // object quotaWarnLimit = cmd.Parameters["QuotaWarnLimit"].Value;
+ // int userFolderId = (int) cmd.Parameters["UserFolderId"].Value;
+
+ // int? quotaHardLimitVal = (quotaHardLimit == DBNull.Value) ? null : (int?) quotaHardLimit;
+ // int? quotaWarnLimitVal = (quotaWarnLimit == DBNull.Value) ? null : (int?) quotaWarnLimit;
+
+ // // Return the user object
+ // return new LocalStoreUser(name,
+ // userId,
+ // userFolderId,
+ // quotaWarnLimitVal,
+ // quotaHardLimitVal);
+ // }
+ //}
+
+ /// <summary>
+ /// Gets the user for the given user Id.
+ /// </summary>
+ /// <param name="userId">The Id of the user to look up.</param>
+ /// <returns>The matching user or null if non is found.</returns>
+ public LocalStoreUser GetUser(int userId) {
+ //using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // return getUser(userId, cnn, null);
+ //}
+ throw new NotImplementedException();
+ }
+
+ //public LocalStoreUser getUser(int userId, MySqlConnection cnn, MySqlTransaction transaction) {
+ // using (MySqlCommand cmd = cnn.CreateCommand()) {
+ // cmd.Transaction = transaction;
+ // cmd.CommandType = CommandType.StoredProcedure;
+ // cmd.CommandText = "GetUserFromId";
+ // cmd.Parameters.Add("?UserId", userId);
+ // cmd.Parameters.Add("?Name", MySqlDbType.VarChar);
+ // cmd.Parameters.Add("?QuotaHardLimit", MySqlDbType.Int32);
+ // cmd.Parameters.Add("?QuotaWarnLimit", MySqlDbType.Int32);
+ // cmd.Parameters.Add("?UserFolderId", MySqlDbType.Int32);
+ // cmd.Parameters.Add("?Result", MySqlDbType.Int32);
+ // cmd.Parameters["Name"].Direction = ParameterDirection.Output;
+ // cmd.Parameters["QuotaHardLimit"].Direction = ParameterDirection.Output;
+ // cmd.Parameters["QuotaWarnLimit"].Direction = ParameterDirection.Output;
+ // cmd.Parameters["UserFolderId"].Direction = ParameterDirection.Output;
+ // cmd.Parameters["Result"].Direction = ParameterDirection.Output;
+
+ // cmd.ExecuteNonQuery();
+
+ // int resultValue = (int) cmd.Parameters["Result"].Value;
+ // LocalStoreUserResult result = (LocalStoreUserResult) resultValue;
+
+ // // Check if the lookup succeeded
+ // if (result != LocalStoreUserResult.OkSuccessful) {
+ // return null;
+ // }
+
+ // // Parse out all the returned values
+ // string name = (string) cmd.Parameters["Name"].Value;
+ // object quotaHardLimit = cmd.Parameters["QuotaHardLimit"].Value;
+ // object quotaWarnLimit = cmd.Parameters["QuotaWarnLimit"].Value;
+ // int userFolderId = (int) cmd.Parameters["UserFolderId"].Value;
+
+ // int? quotaHardLimitVal = (quotaHardLimit == DBNull.Value) ? null : (int?) quotaHardLimit;
+ // int? quotaWarnLimitVal = (quotaWarnLimit == DBNull.Value) ? null : (int?) quotaWarnLimit;
+
+ // // Return the user object
+ // return new LocalStoreUser(name,
+ // userId,
+ // userFolderId,
+ // quotaWarnLimitVal,
+ // quotaHardLimitVal);
+ // }
+ //}
+ #endregion
+
+ #region Get Users
+ /// <summary>
+ /// Gets the list of users that currently exist in the local store.
+ /// </summary>
+ /// <returns>The list of users.</returns>
+ public LocalStoreUser[] GetUsers() {
+ //using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // MySqlTransaction transaction = cnn.BeginTransaction();
+
+ // try {
+ // MySqlCommand cmd = cnn.CreateCommand();
+ // cmd.Transaction = transaction;
+
+ // cmd.CommandType = CommandType.StoredProcedure;
+ // cmd.CommandText = "GetUserIds";
+ // MySqlDataReader reader = cmd.ExecuteReader();
+ // List<int> userIds = new List<int>();
+
+ // while (reader.Read()) {
+ // int userId = (int) reader["UserId"];
+ // userIds.Add(userId);
+ // }
+ // reader.Close();
+
+ // List<LocalStoreUser> users = new List<LocalStoreUser>();
+ // foreach (int userId in userIds) {
+ // users.Add(getUser(userId, cnn, transaction));
+ // }
+
+ // transaction.Commit();
+ // return users.ToArray();
+
+ // } catch (Exception ex) {
+ // if (transaction != null) {
+ // transaction.Rollback();
+ // }
+
+ // throw ex;
+ // }
+ //}
+ throw new NotImplementedException();
+ }
+ #endregion
+
+ #region Create User
+ /// <summary>
+ /// Creates a new user in the local store and creates an initial folder.
+ /// </summary>
+ /// <param name="userName">The name of the new user.</param>
+ /// <param name="warnQuota">The warning quota level.</param>
+ /// <param name="hardQuota">The hard quota.</param>
+ /// <returns>The result of the attemp to create a new user.</returns>
+ public LocalStoreUserResult CreateUser(string username, int? warnQuota, int? hardQuota) {
+ //using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // using (MySqlCommand cmd = cnn.CreateCommand()) {
+ // cmd.CommandType = CommandType.StoredProcedure;
+ // cmd.CommandText = "CreateUser";
+ // cmd.Parameters.Add("?Name", username);
+ // cmd.Parameters.Add("?QuotaHardLimit", hardQuota);
+ // cmd.Parameters.Add("?QuotaWarnLimit", warnQuota);
+ // cmd.Parameters.Add("?UserId", MySqlDbType.Int32);
+ // cmd.Parameters.Add("?Result", MySqlDbType.Int32);
+ // cmd.Parameters["UserId"].Direction = ParameterDirection.Output;
+ // cmd.Parameters["Result"].Direction = ParameterDirection.Output;
+
+ // cmd.ExecuteNonQuery();
+
+ // int result = (int) cmd.Parameters["Result"].Value;
+
+ // return (LocalStoreUserResult) result;
+ // }
+ //}
+ throw new NotImplementedException();
+ }
+ #endregion
+
+ #region Delete User
+ /// <summary>
+ /// Removes a user from the local store.
+ /// </summary>
+ /// <param name="userId">The Id of the user to delete.</param>
+ /// <returns>The result of the attempt to delete a user.</returns>
+ public LocalStoreUserResult DeleteUser(int userId) {
+ //using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // using (MySqlCommand cmd = cnn.CreateCommand()) {
+ // cmd.CommandType = CommandType.StoredProcedure;
+ // cmd.CommandText = "DeleteUser";
+ // cmd.Parameters.Add("?DeleteUserId", userId);
+ // cmd.Parameters.Add("?Result", MySqlDbType.Int32);
+ // cmd.Parameters["Result"].Direction = ParameterDirection.Output;
+
+ // cmd.ExecuteNonQuery();
+
+ // int result = (int) cmd.Parameters["Result"].Value;
+
+ // return (LocalStoreUserResult) result;
+ // }
+ //}
+ throw new NotImplementedException();
+ }
+ #endregion
+
+ #region Update User
+ /// <summary>
+ /// Updates the any changes to the user into the local store.
+ /// </summary>
+ /// <param name="user">The user details to update.</param>
+ /// <returns>The result of the attempt to update the user.</returns>
+ public LocalStoreUserResult UpdateUser(LocalStoreUser user) {
+ //using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // using (MySqlCommand cmd = cnn.CreateCommand()) {
+ // cmd.CommandType = CommandType.StoredProcedure;
+ // cmd.CommandText = "UpdateUser";
+ // cmd.Parameters.Add("?UserId", user.UserId);
+ // cmd.Parameters.Add("?Name", user.Username);
+ // cmd.Parameters.Add("?QuotaHardLimit", user.QuotaHardLimit);
+ // cmd.Parameters.Add("?QuotaWarnLimit", user.QuotaWarnLimit);
+ // cmd.Parameters.Add("?Result", MySqlDbType.Int32);
+ // cmd.Parameters["Result"].Direction = ParameterDirection.Output;
+
+ // cmd.ExecuteNonQuery();
+
+ // int result = (int) cmd.Parameters["Result"].Value;
+
+ // return (LocalStoreUserResult) result;
+ // }
+ //}
+ throw new NotImplementedException();
+ }
+ #endregion
+
+ /// <summary>
+ /// Gets a list of folders that belong to the user with the given user Id.
+ /// </summary>
+ /// <param name="userId">The Id of the user to get the folder for.</param>
+ /// <returns>The list of folders or null if the user Id is invalid.</returns>
+ public StoreFolder[] GetUserFolders(int userId) {
+ //using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
+ // using (MySqlCommand cmd = cnn.CreateCommand()) {
+ // cmd.CommandType = CommandType.StoredProcedure;
+ // cmd.CommandText = "GetUserFolders";
+ // cmd.Parameters.Add("?UserId", userId);
+
+ // ...
[truncated message content] |
|
From: <tmy...@us...> - 2007-03-04 05:15:28
|
Revision: 158
http://svn.sourceforge.net/nmailserver/?rev=158&view=rev
Author: tmyroadctfig
Date: 2007-03-03 21:15:27 -0800 (Sat, 03 Mar 2007)
Log Message:
-----------
Added some directories.
Added Paths:
-----------
NMail/trunk/NMail.LocalStoreData.NHibernate/
NMail/trunk/NMail.LocalStoreData.NHibernate/Properties/
NMail/trunk/NMail.SpoolData.NHibernate/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-03-04 04:54:27
|
Revision: 157
http://svn.sourceforge.net/nmailserver/?rev=157&view=rev
Author: tmyroadctfig
Date: 2007-03-03 20:54:28 -0800 (Sat, 03 Mar 2007)
Log Message:
-----------
Added some calendar work. Changed some interfaces to use IList<> instead of List<>. Removed SpoolRecipient and altered SmtpMessage and SmtpMessageRecipient to be more generic.
Modified Paths:
--------------
NMail/trunk/NMail/DataTypes/Calendar/Attendee.cs
NMail/trunk/NMail/DataTypes/Host.cs
NMail/trunk/NMail/DataTypes/LocalStore/ILocalStore.cs
NMail/trunk/NMail/DataTypes/LocalStore/ILocalStoreData.cs
NMail/trunk/NMail/DataTypes/LocalStore/LocalStoreDelivery.cs
NMail/trunk/NMail/DataTypes/SmtpDeliveryResult.cs
NMail/trunk/NMail/DataTypes/SmtpMessage.cs
NMail/trunk/NMail/DataTypes/SmtpMessageRecipient.cs
NMail/trunk/NMail/DataTypes/Spool/ISpoolData.cs
NMail/trunk/NMail/DataTypes/Spool/ISpoolService.cs
NMail/trunk/NMail/DataTypes/Spool/SpoolEnvelope.cs
NMail/trunk/NMail/NMail.csproj
NMail/trunk/NMail.ImapService/Response/SearchResponse.cs
NMail/trunk/NMail.ImapService/State/ExamineState.cs
NMail/trunk/NMail.LocalStore/LocalStore.cs
NMail/trunk/NMail.LocalStoreData.MySql/MySqlLocalStoreData.cs
NMail/trunk/NMail.LocalStoreData.MySql/NMail.LocalStoreData.MySql.csproj
NMail/trunk/NMail.MessageRouter/MessageRouter.cs
NMail/trunk/NMail.Sendmail/Sendmail.cs
NMail/trunk/NMail.SmtpClient/SmtpClient.cs
NMail/trunk/NMail.SmtpService/Command/RecipientCommand.cs
NMail/trunk/NMail.SpoolData.MySql/MySqlSpoolData.cs
NMail/trunk/NMail.SpoolData.MySql/MySqlSpoolData.sql
NMail/trunk/NMail.SpoolData.MySql/NMail.SpoolData.MySql.csproj
NMail/trunk/NMail.SpoolFilter.RegexAddressRewriter/RegexAddressRewriter.cs
NMail/trunk/NMail.SpoolService/SpoolService.cs
Added Paths:
-----------
NMail/trunk/NMail/DataTypes/Calendar/AttendeeRole.cs
NMail/trunk/NMail/DataTypes/Calendar/AttendeeStatus.cs
NMail/trunk/NMail/DataTypes/Calendar/Calendar.cs
NMail/trunk/NMail/DataTypes/LocalStore/LocalStoreCalendarResult.cs
Removed Paths:
-------------
NMail/trunk/NMail/DataTypes/Spool/SpoolRecipient.cs
Modified: NMail/trunk/NMail/DataTypes/Calendar/Attendee.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/Calendar/Attendee.cs 2007-03-04 00:35:07 UTC (rev 156)
+++ NMail/trunk/NMail/DataTypes/Calendar/Attendee.cs 2007-03-04 04:54:28 UTC (rev 157)
@@ -20,6 +20,59 @@
using System.Text;
namespace NMail.DataTypes.Calendar {
+ /// <summary>
+ /// An attendee for a calandar entry.
+ /// </summary>
public class Attendee {
+
+ private EmailAddress address;
+
+ /// <summary>
+ /// The address of the attendee.
+ /// </summary>
+ public EmailAddress Address {
+ get { return address; }
+ set { address = value; }
+ }
+
+ private CalendarEntry calendarEntry;
+
+ /// <summary>
+ /// The calendar entry for the attendee.
+ /// </summary>
+ public CalendarEntry CalendarEntry {
+ get { return calendarEntry; }
+ set { calendarEntry = value; }
+ }
+
+ private AttendeeRole role;
+
+ /// <summary>
+ /// The role of this attendee in the event.
+ /// </summary>
+ public AttendeeRole Role {
+ get { return role; }
+ set { role = value; }
+ }
+
+ private AttendeeStatus status;
+
+ /// <summary>
+ /// The status of this attendee with respect to the event.
+ /// </summary>
+ public AttendeeStatus Status {
+ get { return status; }
+ set { status = value; }
+ }
+
+ private EmailAddress delegatedTo;
+
+ /// <summary>
+ /// The person this attendee has specified as their delegate if any.
+ /// </summary>
+ public EmailAddress DelegatedTo {
+ get { return delegatedTo; }
+ set { delegatedTo = value; }
+ }
}
}
Added: NMail/trunk/NMail/DataTypes/Calendar/AttendeeRole.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/Calendar/AttendeeRole.cs (rev 0)
+++ NMail/trunk/NMail/DataTypes/Calendar/AttendeeRole.cs 2007-03-04 04:54:28 UTC (rev 157)
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace NMail.DataTypes.Calendar {
+ public enum AttendeeRole {
+ Chair,
+
+ RequiredParticipant,
+
+ OptionalParticipant,
+
+ NonParticipant
+ }
+}
Added: NMail/trunk/NMail/DataTypes/Calendar/AttendeeStatus.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/Calendar/AttendeeStatus.cs (rev 0)
+++ NMail/trunk/NMail/DataTypes/Calendar/AttendeeStatus.cs 2007-03-04 04:54:28 UTC (rev 157)
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace NMail.DataTypes.Calendar {
+ public enum AttendeeStatus {
+ Unknown,
+
+ Accepted,
+
+ Declined,
+
+ Tentative,
+
+ Delegated
+ }
+}
Added: NMail/trunk/NMail/DataTypes/Calendar/Calendar.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/Calendar/Calendar.cs (rev 0)
+++ NMail/trunk/NMail/DataTypes/Calendar/Calendar.cs 2007-03-04 04:54:28 UTC (rev 157)
@@ -0,0 +1,61 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace NMail.DataTypes.Calendar {
+ /// <summary>
+ /// Represents a calendar in the system.
+ /// </summary>
+ public class Calendar {
+
+ private string name;
+
+ /// <summary>
+ /// The name of the calendar.
+ /// </summary>
+ public string Name {
+ get { return name; }
+ set { name = value; }
+ }
+
+ private int calendarId;
+
+ /// <summary>
+ /// The Id of this calendar.
+ /// </summary>
+ public int CalendarId {
+ get { return calendarId; }
+ set { calendarId = value; }
+ }
+
+ private int parentFolderId;
+
+ /// <summary>
+ /// The Id of the folder that contains this calendar.
+ /// </summary>
+ public int ParentFolderId {
+ get { return parentFolderId; }
+ set { parentFolderId = value; }
+ }
+
+ private int ownerUserId;
+
+ /// <summary>
+ /// The Id of the user that owns this calendar.
+ /// </summary>
+ public int OwnerUserId {
+ get { return ownerUserId; }
+ set { ownerUserId = value; }
+ }
+
+ private IList<CalendarEntry> entries;
+
+ /// <summary>
+ /// The calendar's entries.
+ /// </summary>
+ public IList<CalendarEntry> Entries {
+ get { return entries; }
+ set { entries = value; }
+ }
+ }
+}
Modified: NMail/trunk/NMail/DataTypes/Host.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/Host.cs 2007-03-04 00:35:07 UTC (rev 156)
+++ NMail/trunk/NMail/DataTypes/Host.cs 2007-03-04 04:54:28 UTC (rev 157)
@@ -251,7 +251,7 @@
/// <returns>The host as a string.</returns>
public override string ToString() {
return this.Name;
- }
+ }
/// <summary>
/// The regex to check if the host string is an IP address
@@ -275,5 +275,21 @@
return base.ConvertFrom(context, culture, value);
}
+
+ public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) {
+ if (destinationType == typeof(string)) {
+ return true;
+ }
+
+ return base.CanConvertTo(context, destinationType);
+ }
+
+ public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType) {
+ if (destinationType == typeof(string)) {
+ return value.ToString();
+ }
+
+ return base.ConvertTo(context, culture, value, destinationType);
+ }
}
}
Modified: NMail/trunk/NMail/DataTypes/LocalStore/ILocalStore.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/LocalStore/ILocalStore.cs 2007-03-04 00:35:07 UTC (rev 156)
+++ NMail/trunk/NMail/DataTypes/LocalStore/ILocalStore.cs 2007-03-04 04:54:28 UTC (rev 157)
@@ -21,6 +21,7 @@
using NMail.Authentication;
using NMail.DataTypes;
using NMail.DataTypes.ACLs;
+using NMail.DataTypes.Calendar;
namespace NMail.DataTypes.LocalStore {
/// <summary>
@@ -216,7 +217,7 @@
/// <param name="authToken">The authentication credentials.</param>
/// <param name="folderId">The Id of the folder the message is in.</param>
/// <returns>The list of messages in the folder.</returns>
- List<int> GetMessageIds(IAuthenticationToken authToken, int folderId);
+ IList<int> GetMessageIds(IAuthenticationToken authToken, int folderId);
#endregion
#region Message Flags
@@ -569,6 +570,14 @@
/// <param name="identifier">The identifier to remove from the ACL.</param>
void RemoveAdministrationAce(IAuthenticationToken authToken, string identifier);
#endregion
+
+ LocalStoreCalendarResult CreateCalandar(IAuthenticationToken authToken, Calendar.Calendar calendar);
+
+ Calendar.Calendar GetCalandar(IAuthenticationToken authToken, string name, int parentFolderId);
+
+ Calendar.Calendar GetCalandar(IAuthenticationToken authToken, int calendarId);
+
+ LocalStoreCalendarResult DeleteCalandar(IAuthenticationToken authToken, int calendarId);
}
/// <summary>
Modified: NMail/trunk/NMail/DataTypes/LocalStore/ILocalStoreData.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/LocalStore/ILocalStoreData.cs 2007-03-04 00:35:07 UTC (rev 156)
+++ NMail/trunk/NMail/DataTypes/LocalStore/ILocalStoreData.cs 2007-03-04 04:54:28 UTC (rev 157)
@@ -21,12 +21,20 @@
using NMail.DataTypes;
using NMail.DataTypes.ACLs;
+using NMail.DataTypes.Calendar;
namespace NMail.DataTypes.LocalStore {
/// <summary>
/// The interface for a local store data provider.
/// </summary>
public interface ILocalStoreData {
+ /// <summary>
+ /// Reinstalls the database schema destroying any current data. Typically DROP
+ /// and CREATE database permissions will be disabled after install time thus
+ /// disabling this command.
+ /// </summary>
+ void ReinstallSchema();
+
#region Message Delivery
/// <summary>
/// Delivers the message into the given folder.
@@ -163,7 +171,7 @@
/// </summary>
/// <param name="folderId">The Id of the folder the message is in.</param>
/// <returns>The list of messages in the folder.</returns>
- List<int> GetMessageIds(int folderId);
+ IList<int> GetMessageIds(int folderId);
#endregion
#region Message Flags
@@ -435,5 +443,24 @@
/// <returns>The system ACL.</returns>
GenericAcl<SystemPrivilege> GetSystemPrivilegeAcl();
#endregion
- }
+
+ #region Calendar Manipulation
+
+ void SaveCalandar(Calendar.Calendar calendar);
+
+ Calendar.Calendar GetCalandar(string name, int parentFolderId);
+
+ Calendar.Calendar GetCalandar(int calendarId);
+
+ void DeleteCalandar(int calendarId);
+ #endregion
+
+ void SaveCalendarEntry(CalendarEntry entry);
+
+ CalendarEntry GetCalendarEntry(int entryId);
+
+ IList<CalendarEntry> GetCalendarEntries(DateTime startTime, DateTime endTime, int calendarId);
+
+ void DeleteCalendarEntry(int entryId);
+ }
}
Added: NMail/trunk/NMail/DataTypes/LocalStore/LocalStoreCalendarResult.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/LocalStore/LocalStoreCalendarResult.cs (rev 0)
+++ NMail/trunk/NMail/DataTypes/LocalStore/LocalStoreCalendarResult.cs 2007-03-04 04:54:28 UTC (rev 157)
@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace NMail.DataTypes.LocalStore {
+ public enum LocalStoreCalendarResult {
+ /// <summary>
+ /// The operation was completed successfully.
+ /// </summary>
+ OkSuccessful = 0,
+
+ /// <summary>
+ /// The create or rename failed because a folder with the same name already existed.
+ /// </summary>
+ AlreadyExists = 1,
+
+ /// <summary>
+ /// The operation failed because the parent folder was not found on the server.
+ /// If the operation is on a subfolder that the user can't see due to permissions
+ /// this will be returned.
+ /// </summary>
+ NonExistent = 2,
+
+ /// <summary>
+ /// The user is not permitted to perform the operation.
+ /// </summary>
+ NotPermitted = 2
+ }
+}
Modified: NMail/trunk/NMail/DataTypes/LocalStore/LocalStoreDelivery.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/LocalStore/LocalStoreDelivery.cs 2007-03-04 00:35:07 UTC (rev 156)
+++ NMail/trunk/NMail/DataTypes/LocalStore/LocalStoreDelivery.cs 2007-03-04 04:54:28 UTC (rev 157)
@@ -29,7 +29,7 @@
public class LocalStoreDelivery {
public LocalStoreDelivery(SmtpMessageRecipient recipient, Folder nominalTargetFolder) {
- this.recipient = recipient;
+ this.recipient = recipient.Address;
this.sender = recipient.Message.Sender;
this.message = recipient.Message.Data;
Modified: NMail/trunk/NMail/DataTypes/SmtpDeliveryResult.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/SmtpDeliveryResult.cs 2007-03-04 00:35:07 UTC (rev 156)
+++ NMail/trunk/NMail/DataTypes/SmtpDeliveryResult.cs 2007-03-04 04:54:28 UTC (rev 157)
@@ -17,6 +17,7 @@
using System;
using System.Collections;
+using System.Collections.Generic;
namespace NMail.DataTypes {
/// <summary>
@@ -41,7 +42,7 @@
/// </summary>
/// <param name="recipients">The recipients to add.</param>
/// <param name="result">The result for the recipients.</param>
- public void AddRecipientResults(SmtpMessageRecipient[] recipients, DeliveryResult result) {
+ public void AddRecipientResults(IList<SmtpMessageRecipient> recipients, DeliveryResult result) {
foreach (SmtpMessageRecipient recipient in recipients) {
AddRecipientResult(new RecipientDeliveryResult(recipient, result));
}
Modified: NMail/trunk/NMail/DataTypes/SmtpMessage.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/SmtpMessage.cs 2007-03-04 00:35:07 UTC (rev 156)
+++ NMail/trunk/NMail/DataTypes/SmtpMessage.cs 2007-03-04 04:54:28 UTC (rev 157)
@@ -16,7 +16,7 @@
*/
using System;
-using System.Collections;
+using System.Collections.Generic;
using System.Net;
namespace NMail.DataTypes {
@@ -30,83 +30,29 @@
/// </remarks>
public class SmtpMessage {
/// <summary>
- /// This message's unique id.
- /// </summary>
- private Guid messageId;
-
- /// <summary>
- /// The data (headers and body content) of the message.
- /// </summary>
- private Message data;
-
- /// <summary>
- /// A list of recipient for this message.
- /// </summary>
- private ArrayList recipients;
-
- /// <summary>
- /// The sender of this message.
- /// </summary>
- private EmailAddress sender;
-
- /// <summary>
- /// Gets or sets the host that the source claimed to be (i.e. the HELO host).
- /// </summary>
- private Host receivedFrom;
-
- /// <summary>
- /// Gets or sets the address from which this message was recieved.
- /// </summary>
- private IPAddress sourceAddress;
-
- /// <summary>
/// Creates a new SMTP message.
/// </summary>
- public SmtpMessage() {
- this.recipients = new ArrayList();
- this.messageId = Guid.NewGuid();
- }
+ public SmtpMessage() { }
/// <summary>
/// Adds the specified recipient to this message.
/// </summary>
/// <param name="recipient">The recipient to add</param>
- public void AddRecipient(SmtpMessageRecipient recipient) {
- this.recipients.Add(recipient);
- }
-
- /// <summary>
- /// Adds the specified recipient to this message.
- /// </summary>
- /// <param name="recipient">The recipient to add</param>
public void AddRecipient(EmailAddress recipient) {
- this.recipients.Add(new SmtpMessageRecipient(this, recipient.ToString()));
+ this.recipients.Add(new SmtpMessageRecipient(this, recipient));
}
- /// <summary>
- /// Removes the specified recipient to this message.
- /// </summary>
- /// <param name="recipient">The recipient to remove</param>
- public void RemoveRecipient(SmtpMessageRecipient recipient) {
- this.recipients.Remove(recipient);
- }
+ private IList<SmtpMessageRecipient> recipients = new List<SmtpMessageRecipient>();
/// <summary>
- /// Create and return an array of all recipients.
+ /// The list of recipients associated with this message.
/// </summary>
- /// <returns>An array of recipients of the message</returns>
- public SmtpMessageRecipient[] GetRecipients() {
- return (SmtpMessageRecipient[])this.recipients.ToArray(typeof(SmtpMessageRecipient));
- }
+ public IList<SmtpMessageRecipient> Recipients {
+ get { return recipients; }
+ set { recipients = value; }
+ }
- /// <summary>
- /// Returns the number of recipients for this message.
- /// </summary>
- public int RecipientCount {
- get {
- return this.recipients.Count;
- }
- }
+ private Guid messageId = Guid.Empty;
/// <summary>
/// This message's unique id.
@@ -120,7 +66,39 @@
}
}
+ private bool inProgress;
+
/// <summary>
+ /// True if the message is in progress.
+ /// </summary>
+ public bool InProgress {
+ get { return inProgress; }
+ set { inProgress = value; }
+ }
+
+ private bool filtered;
+
+ /// <summary>
+ /// True if the message has been filtered.
+ /// </summary>
+ public bool Filtered {
+ get { return filtered; }
+ set { filtered = value; }
+ }
+
+ private Envelope envelope;
+
+ /// <summary>
+ /// The message envelope.
+ /// </summary>
+ public Envelope Envelope {
+ get { return envelope; }
+ set { envelope = value; }
+ }
+
+ private Message data;
+
+ /// <summary>
/// Gets or sets the data (headers and body content) of the message.
/// </summary>
public Message Data {
@@ -129,9 +107,12 @@
}
set {
this.data = value;
+ this.envelope = this.data.GetEnvelope();
}
}
+ private EmailAddress sender;
+
/// <summary>
/// Gets or sets the message's sender.
/// </summary>
@@ -143,6 +124,8 @@
this.sender = value;
}
}
+
+ private Host receivedFrom;
/// <summary>
/// Gets or sets the host that the source claimed to be (i.e. the HELO host).
@@ -155,7 +138,9 @@
this.receivedFrom = value;
}
}
-
+
+ private IPAddress sourceAddress;
+
/// <summary>
/// Gets or sets the address from which this message was recieved.
/// </summary>
Modified: NMail/trunk/NMail/DataTypes/SmtpMessageRecipient.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/SmtpMessageRecipient.cs 2007-03-04 00:35:07 UTC (rev 156)
+++ NMail/trunk/NMail/DataTypes/SmtpMessageRecipient.cs 2007-03-04 04:54:28 UTC (rev 157)
@@ -21,63 +21,55 @@
/// <summary>
/// A recipient of a SMTP message.
/// </summary>
- public class SmtpMessageRecipient : EmailAddress {
+ public class SmtpMessageRecipient {
/// <summary>
- /// the number of delivery attempts for this message recipient combination.
+ /// Creates a new message recipient.
/// </summary>
- private int deliveryAttempts;
+ public SmtpMessageRecipient() { }
/// <summary>
- /// The time of the next scheduled delivery attempt.
- /// </summary>
- private DateTime nextDeliveryAttempt;
-
- /// <summary>
- /// The message associated with this instance.
- /// </summary>
- private SmtpMessage message;
-
- /// <summary>
/// Creates a new email address from the given string. This constructor will
/// work for strings of the form "mailbox@host" or "<mailbox@domain>".
/// </summary>
/// <param name="address">The address to parse.</param>
/// <param name="message">The message associated with this instance.</param>
- public SmtpMessageRecipient(SmtpMessage message, EmailAddress address) : base(address.ToString(), false) {
+ public SmtpMessageRecipient(SmtpMessage message, EmailAddress address) {
this.message = message;
+ this.mailbox = address.Mailbox;
+ this.host = address.Host;
}
+ private Mailbox mailbox;
+
/// <summary>
- /// Creates a new email address from the given string. This constructor will
- /// work for strings of the form "mailbox@host" or "<mailbox@domain>".
+ /// The recipient's mailbox.
/// </summary>
- /// <param name="address">The address to parse.</param>
- /// <param name="message">The message associated with this instance.</param>
- public SmtpMessageRecipient(SmtpMessage message, string address) : base(address, false) {
- this.message = message;
+ public Mailbox Mailbox {
+ get { return mailbox; }
+ set { mailbox = value; }
}
+ private Host host;
+
/// <summary>
- /// Creates a new email address from the given parameters.
+ /// The recipient's host.
/// </summary>
- /// <param name="mailbox">The mailbox or username for the address.</param>
- /// <param name="host">The host for the address.</param>
- /// <param name="message">The message associated with this instance.</param>
- public SmtpMessageRecipient(SmtpMessage message, Mailbox mailbox, Host host) : base(mailbox, host) {
- this.message = message;
+ public Host Host {
+ get { return host; }
+ set { host = value; }
}
/// <summary>
- /// Creates a new email address from the given string. This constructor will
- /// work for strings of the form "mailbox@host" or "<mailbox@domain>".
+ /// The recipient's email address.
/// </summary>
- /// <param name="address">The address to parse.</param>
- /// <param name="allowEmpty">Allow an empty address.</param>
- /// <param name="message">The message associated with this instance.</param>
- public SmtpMessageRecipient(SmtpMessage message, string address, bool allowEmpty) : base(address, allowEmpty) {
- this.message = message;
+ public EmailAddress Address {
+ get {
+ return new EmailAddress(this.mailbox, this.host);
+ }
}
+ private int deliveryAttempts;
+
/// <summary>
/// Gets or sets the number of delivery attempts for this message recipient
/// combination.
@@ -91,6 +83,8 @@
}
}
+ private DateTime nextDeliveryAttempt = DateTime.Now;
+
/// <summary>
/// The time of the next scheduled delivery attempt.
/// </summary>
@@ -102,6 +96,8 @@
this.nextDeliveryAttempt = value;
}
}
+
+ private SmtpMessage message;
/// <summary>
/// The message associated with this instance.
@@ -110,9 +106,36 @@
get {
return this.message;
}
+ set {
+ this.message = value;
+ }
}
+ private long recipientId;
+
/// <summary>
+ /// The Id of this recipient in the spool.
+ /// </summary>
+ public long RecipientId {
+ get {
+ return this.recipientId;
+ }
+ set {
+ this.recipientId = value;
+ }
+ }
+
+ private bool inProgress;
+
+ /// <summary>
+ /// True if a delivery attempt is currently underway.
+ /// </summary>
+ public bool InProgress {
+ get { return inProgress; }
+ set { inProgress = value; }
+ }
+
+ /// <summary>
/// Checks if the given message recipient is equal to this message recipient.
/// </summary>
/// <param name="other">The message recipient to compare.</param>
@@ -149,8 +172,8 @@
}
return (recipientA.message == recipientB.message) &&
- (recipientA.Mailbox == recipientB.Mailbox) &&
- (recipientA.Host == recipientB.Host);
+ (recipientA.mailbox == recipientB.mailbox) &&
+ (recipientA.host == recipientB.host);
}
/// <summary>
Modified: NMail/trunk/NMail/DataTypes/Spool/ISpoolData.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/Spool/ISpoolData.cs 2007-03-04 00:35:07 UTC (rev 156)
+++ NMail/trunk/NMail/DataTypes/Spool/ISpoolData.cs 2007-03-04 04:54:28 UTC (rev 157)
@@ -27,6 +27,13 @@
/// </summary>
public interface ISpoolData {
/// <summary>
+ /// Reinstalls the database schema destroying any current data. Typically DROP
+ /// and CREATE database permissions will be disabled after install time thus
+ /// disabling this command.
+ /// </summary>
+ void ReinstallSchema();
+
+ /// <summary>
/// Initialises the data associated with the spool filter.
/// </summary>
void InitialiseSpoolFilterData();
@@ -92,6 +99,6 @@
/// Gets a list of message envelopes for messages currently in the spool.
/// </summary>
/// <returns>The list of envelopes.</returns>
- List<SpoolEnvelope> GetSpooledEnvelopes();
+ IList<SpoolEnvelope> GetSpooledEnvelopes();
}
}
Modified: NMail/trunk/NMail/DataTypes/Spool/ISpoolService.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/Spool/ISpoolService.cs 2007-03-04 00:35:07 UTC (rev 156)
+++ NMail/trunk/NMail/DataTypes/Spool/ISpoolService.cs 2007-03-04 04:54:28 UTC (rev 157)
@@ -57,6 +57,6 @@
/// Gets a list of message envelopes for messages currently in the spool.
/// </summary>
/// <returns>The list of envelopes.</returns>
- List<SpoolEnvelope> GetSpooledEnvelopes();
+ IList<SpoolEnvelope> GetSpooledEnvelopes();
}
}
Modified: NMail/trunk/NMail/DataTypes/Spool/SpoolEnvelope.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/Spool/SpoolEnvelope.cs 2007-03-04 00:35:07 UTC (rev 156)
+++ NMail/trunk/NMail/DataTypes/Spool/SpoolEnvelope.cs 2007-03-04 04:54:28 UTC (rev 157)
@@ -17,6 +17,7 @@
using System;
using System.Collections.Generic;
+using System.Net;
using System.Text;
using NMail.DataTypes;
@@ -30,11 +31,13 @@
/// <summary>
/// Creates a new spool envelope.
/// </summary>
- /// <param name="messageId">The Id of the message.</param>
- /// <param name="filtered">True if the message has been filtered.</param>
- /// <param name="recipients">The recipients for this message still awaiting delivery.</param>
- public SpoolEnvelope(Envelope envelope, int messageId, bool filtered, SpoolRecipient[] recipients) {
+ public SpoolEnvelope() { }
+ /// <summary>
+ /// Sets the envelope details based on the given envelope.
+ /// </summary>
+ /// <param name="envelope">The envelope to copy.</param>
+ public void SetEnvelopeDetails(Envelope envelope) {
this.Bcc = envelope.Bcc;
this.Cc = envelope.Cc;
this.Date = envelope.Date;
@@ -44,19 +47,15 @@
this.Sender = envelope.Sender;
this.Subject = envelope.Subject;
this.To = envelope.To;
-
- this.messageId = messageId;
- this.filtered = filtered;
- this.recipients = recipients;
}
- private int messageId;
+ private Guid messageId;
/// <summary>
/// The Id of this message in the spool.
/// </summary>
/// <remarks>This is different to the Id stored in the message headers.</remarks>
- public int SpoolMessageId {
+ public Guid SpoolMessageId {
get {
return this.messageId;
}
@@ -79,12 +78,52 @@
}
}
- private SpoolRecipient[] recipients;
+ private bool inProgress;
/// <summary>
+ /// True if the message is in the progress of being delivered or filtered.
+ /// </summary>
+ public bool InProgress {
+ get { return inProgress; }
+ set { inProgress = value; }
+ }
+
+ private IPAddress sourceAddress;
+
+ /// <summary>
+ /// The address that sent this message.
+ /// </summary>
+ public IPAddress SourceAddress {
+ get { return sourceAddress; }
+ set { sourceAddress = value; }
+ }
+
+ private Host reportedHost;
+
+ /// <summary>
+ /// The reported host.
+ /// </summary>
+ public Host ReportedHost {
+ get { return reportedHost; }
+ set { reportedHost = value; }
+ }
+
+ private EmailAddress smtpSender;
+
+ /// <summary>
+ /// The email address given as the sender during SMTP negotiations.
+ /// </summary>
+ public EmailAddress SmtpSender {
+ get { return smtpSender; }
+ set { smtpSender = value; }
+ }
+
+ private IList<SmtpMessageRecipient> recipients;
+
+ /// <summary>
/// The recipients of this message still awaiting delivery.
/// </summary>
- public SpoolRecipient[] Recipients {
+ public IList<SmtpMessageRecipient> Recipients {
get {
return this.recipients;
}
Deleted: NMail/trunk/NMail/DataTypes/Spool/SpoolRecipient.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/Spool/SpoolRecipient.cs 2007-03-04 00:35:07 UTC (rev 156)
+++ NMail/trunk/NMail/DataTypes/Spool/SpoolRecipient.cs 2007-03-04 04:54:28 UTC (rev 157)
@@ -1,98 +0,0 @@
-/*
- * Copyright 2004-2006 Luke Quinane
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace NMail.DataTypes.Spool {
- /// <summary>
- /// Holds the details of a message recipient that is waiting delivery.
- /// </summary>
- [Serializable]
- public class SpoolRecipient {
- /// <summary>
- /// Creates a new spool recipient.
- /// </summary>
- /// <param name="address">The recipient's address.</param>
- /// <param name="recipientId">The Id of the recipient in the spool.</param>
- /// <param name="nextDelivery">The time for the next delivery attempt.</param>
- /// <param name="deliveryAttempts">The number of delivery attempts.</param>
- public SpoolRecipient(EmailAddress address, int recipientId, DateTime nextDelivery, int deliveryAttempts) {
- this.address = address;
- this.recipientId = recipientId;
- this.nextDeliveryAttempt = nextDelivery;
- this.deliveryAttempts = deliveryAttempts;
- }
-
- private int recipientId;
-
- /// <summary>
- /// The Id of this recipient in the spool.
- /// </summary>
- public int RecipientId {
- get {
- return this.recipientId;
- }
- set {
- this.recipientId = value;
- }
- }
-
- private EmailAddress address;
-
- /// <summary>
- /// The recipient's address.
- /// </summary>
- public EmailAddress Address {
- get {
- return this.address;
- }
- set {
- this.address = value;
- }
- }
-
- private DateTime nextDeliveryAttempt;
-
- /// <summary>
- /// The time for the next delivery attempt.
- /// </summary>
- public DateTime NextDeliveryAttempt {
- get {
- return this.nextDeliveryAttempt;
- }
- set {
- this.nextDeliveryAttempt = value;
- }
- }
-
- private int deliveryAttempts;
-
- /// <summary>
- /// The number of delivery attempts for this message.
- /// </summary>
- public int DeliveryAttempts {
- get {
- return this.deliveryAttempts;
- }
- set {
- this.deliveryAttempts = value;
- }
- }
- }
-}
Modified: NMail/trunk/NMail/NMail.csproj
===================================================================
--- NMail/trunk/NMail/NMail.csproj 2007-03-04 00:35:07 UTC (rev 156)
+++ NMail/trunk/NMail/NMail.csproj 2007-03-04 04:54:28 UTC (rev 157)
@@ -132,18 +132,22 @@
<Compile Include="DataTypes\ACLs\UserGroupAdminPrivilege.cs" />
<Compile Include="DataTypes\BodyStructure.cs" />
<Compile Include="DataTypes\Calendar\Attendee.cs" />
+ <Compile Include="DataTypes\Calendar\AttendeeRole.cs" />
+ <Compile Include="DataTypes\Calendar\AttendeeStatus.cs" />
+ <Compile Include="DataTypes\Calendar\Calendar.cs" />
<Compile Include="DataTypes\Calendar\CalendarAlarm.cs" />
<Compile Include="DataTypes\Calendar\CalendarEntry.cs" />
<Compile Include="DataTypes\Calendar\CalendarEntryStatus.cs" />
+ <Compile Include="DataTypes\Calendar\CalendarEvent.cs" />
<Compile Include="DataTypes\Calendar\CountRecurreneRule.cs" />
<Compile Include="DataTypes\Calendar\DateRecurrenceRule.cs" />
- <Compile Include="DataTypes\Calendar\EventEntry.cs" />
<Compile Include="DataTypes\Calendar\JournalEntry.cs" />
<Compile Include="DataTypes\Calendar\RecurrenceFrequency.cs" />
<Compile Include="DataTypes\Calendar\RecurrenceRule.cs" />
<Compile Include="DataTypes\Calendar\ToDoEntry.cs" />
<Compile Include="DataTypes\Classification.cs" />
<Compile Include="DataTypes\LatLong.cs" />
+ <Compile Include="DataTypes\LocalStore\LocalStoreCalendarResult.cs" />
<Compile Include="DataTypes\Service\BaseService.cs" />
<Compile Include="DataTypes\Service\BaseSession.cs" />
<Compile Include="DataTypes\Envelope.cs" />
@@ -240,7 +244,6 @@
<Compile Include="DataTypes\Spool\ISpoolFilterService.cs" />
<Compile Include="DataTypes\Spool\ISpoolService.cs" />
<Compile Include="DataTypes\Spool\SpoolEnvelope.cs" />
- <Compile Include="DataTypes\Spool\SpoolRecipient.cs" />
<Compile Include="DataTypes\WildcardHost.cs" />
<Compile Include="Helper\ByteStringBuilder.cs">
<SubType>Code</SubType>
Modified: NMail/trunk/NMail.ImapService/Response/SearchResponse.cs
===================================================================
--- NMail/trunk/NMail.ImapService/Response/SearchResponse.cs 2007-03-04 00:35:07 UTC (rev 156)
+++ NMail/trunk/NMail.ImapService/Response/SearchResponse.cs 2007-03-04 04:54:28 UTC (rev 157)
@@ -24,13 +24,13 @@
/// The response to a search command.
/// </summary>
public class SearchResponse : AbstractResponse {
- protected List<int> messageIds;
+ protected IList<int> messageIds;
/// <summary>
/// Creates a new search response with the given list of message Ids.
/// </summary>
/// <param name="messageIds">The list of message Ids that match the search criteria.</param>
- public SearchResponse(List<int> messageIds) {
+ public SearchResponse(IList<int> messageIds) {
this.messageIds = messageIds;
}
Modified: NMail/trunk/NMail.ImapService/State/ExamineState.cs
===================================================================
--- NMail/trunk/NMail.ImapService/State/ExamineState.cs 2007-03-04 00:35:07 UTC (rev 156)
+++ NMail/trunk/NMail.ImapService/State/ExamineState.cs 2007-03-04 04:54:28 UTC (rev 157)
@@ -497,7 +497,7 @@
#region Process Search Command
- void matchUidSearch(UidSearchItem searchItem, List<int> messageUids) {
+ void matchUidSearch(UidSearchItem searchItem, IList<int> messageUids) {
List<int> removedIds = new List<int>();
foreach (int messageUid in messageUids) {
@@ -524,7 +524,7 @@
#region Search Command
public override void ProcessCommand(SearchCommand cmd) {
// Get a list of Ids for the folder
- List<int> messageUids = LocalStore.GetMessageIds(Session.AuthenticationToken, Session.SelectedFolder.FolderId);
+ IList<int> messageUids = LocalStore.GetMessageIds(Session.AuthenticationToken, Session.SelectedFolder.FolderId);
// Check if there was any messages in the folder
if (messageUids.Count > 0) {
Modified: NMail/trunk/NMail.LocalStore/LocalStore.cs
===================================================================
--- NMail/trunk/NMail.LocalStore/LocalStore.cs 2007-03-04 00:35:07 UTC (rev 156)
+++ NMail/trunk/NMail.LocalStore/LocalStore.cs 2007-03-04 04:54:28 UTC (rev 157)
@@ -24,6 +24,7 @@
using NMail.Authentication;
using NMail.DataTypes;
using NMail.DataTypes.ACLs;
+using NMail.DataTypes.Calendar;
using NMail.DataTypes.LocalStore;
using NMail.Configuration;
using NMail.LocalStore.DeliveryActions;
@@ -49,10 +50,10 @@
/// <returns>The result of the validation.</returns>
public DeliveryResult ValidateRecipient(SmtpMessageRecipient recipient) {
// Extract out the raw mailbox. E.g. "Joh...@lo..." -> "John.Smith"
- string rawMailbox = recipient.Mailbox.MailboxName;
+ string rawMailbox = recipient.Address.Mailbox.MailboxName;
// Check if this local store will accept devliery for this recipient
- MailDomain mailDomain = ResolveMailDomain(recipient.Host);
+ MailDomain mailDomain = ResolveMailDomain(recipient.Address.Host);
if (mailDomain == null) {
return new DeliveryResult(DeliveryResultType.PermanentError, "Local Store does not accept this address.");
}
@@ -85,7 +86,7 @@
if (result.Type == DeliveryResultType.Success) {
// Pass through each allowed user validator
- IDictionaryEnumerator e = recipient.Mailbox.GetDataPairNames();
+ IDictionaryEnumerator e = recipient.Address.Mailbox.GetDataPairNames();
while (e.MoveNext() && result.Type == DeliveryResultType.Success) {
ILocalStoreRecipientValidator validator = mailDomain.GetRecipientValidator((string) e.Key);
@@ -118,10 +119,10 @@
/// <returns>The result of the delivery attempt.</returns>
public RecipientDeliveryResult DeliverMessage(SmtpMessageRecipient recipient) {
// Extract out the raw mailbox. E.g. "Joh...@lo..." -> "John.Smith"
- string rawMailbox = recipient.Mailbox.MailboxName;
+ string rawMailbox = recipient.Address.Mailbox.MailboxName;
// Check if this local store will accept devliery for this recipient
- MailDomain mailDomain = ResolveMailDomain(recipient.Host);
+ MailDomain mailDomain = ResolveMailDomain(recipient.Address.Host);
if (mailDomain == null) {
return new RecipientDeliveryResult(
recipient,
@@ -165,7 +166,7 @@
if (result.Type == DeliveryResultType.Success) {
// Pass through each allowed user action
- IDictionaryEnumerator e = recipient.Mailbox.GetDataPairNames();
+ IDictionaryEnumerator e = recipient.Address.Mailbox.GetDataPairNames();
while (e.MoveNext() && result.Type == DeliveryResultType.Success) {
ILocalStoreDeliveryAction action = mailDomain.GetDeliveryAction((string) e.Key);
@@ -695,7 +696,7 @@
#region Get Message Ids
- public List<int> GetMessageIds(IAuthenticationToken authToken, int folderId) {
+ public IList<int> GetMessageIds(IAuthenticationToken authToken, int folderId) {
// Ensure the user has rights to get the message Id
if (hasFolderPrivilege(authToken.Username, folderId, StoreFolderPrivilege.Read)) {
@@ -1276,6 +1277,24 @@
throw new NotImplementedException();
}
#endregion
+
+ public LocalStoreCalendarResult CreateCalandar(IAuthenticationToken authToken, Calendar calendar) {
+ LocalStoreData.SaveCalandar(calendar);
+ return LocalStoreCalendarResult.OkSuccessful;
+ }
+
+ public Calendar GetCalandar(IAuthenticationToken authToken, string name, int parentFolderId) {
+ return LocalStoreData.GetCalandar(name, parentFolderId);
+ }
+
+ public Calendar GetCalandar(IAuthenticationToken authToken, int calendarId) {
+ return LocalStoreData.GetCalandar(calendarId);
+ }
+
+ public LocalStoreCalendarResult DeleteCalandar(IAuthenticationToken authToken, int calendarId) {
+ LocalStoreData.DeleteCalandar(calendarId);
+ return LocalStoreCalendarResult.OkSuccessful;
+ }
#endregion
#region Privilege Checks
Modified: NMail/trunk/NMail.LocalStoreData.MySql/MySqlLocalStoreData.cs
===================================================================
--- NMail/trunk/NMail.LocalStoreData.MySql/MySqlLocalStoreData.cs 2007-03-04 00:35:07 UTC (rev 156)
+++ NMail/trunk/NMail.LocalStoreData.MySql/MySqlLocalStoreData.cs 2007-03-04 04:54:28 UTC (rev 157)
@@ -24,9 +24,13 @@
using MySql.Data.MySqlClient;
+using NHibernate;
+using NHibernate.Expression;
+
using NMail.Configuration;
using NMail.DataTypes;
using NMail.DataTypes.ACLs;
+using NMail.DataTypes.Calendar;
using NMail.DataTypes.LocalStore;
using NMail.Helper;
@@ -38,6 +42,19 @@
/// </summary>
[Serializable]
public class MySqlLocalStoreData : MarshalByRefObject, ILocalStoreData {
+
+ NHibernate.Cfg.Configuration hibernateCfg;
+
+ ISessionFactory hibernateFactory;
+
+ public MySqlLocalStoreData() {
+ this.hibernateCfg = new NHibernate.Cfg.Configuration();
+ this.hibernateCfg.Configure(System.Reflection.Assembly.GetExecutingAssembly(), "NMail.LocalStoreData.MySql.Resources.hibernate-configuration.xml");
+ this.hibernateCfg.AddAssembly("NMail.LocalStoreData.MySql");
+
+ this.hibernateFactory = this.hibernateCfg.BuildSessionFactory();
+ }
+
#region ILocalStoreData Members
#region Message Delivery
@@ -554,7 +571,7 @@
#endregion
#region GetMessageIds
- public List<int> GetMessageIds(int folderId) {
+ public IList<int> GetMessageIds(int folderId) {
List<int> result = new List<int>();
using (MySqlConnection cnn = MySqlHelper.GetConnection()) {
@@ -1653,6 +1670,101 @@
}
}
#endregion
+
+ public void SaveCalandar(Calendar calendar) {
+ using (ISession session = this.hibernateFactory.OpenSession()) {
+ using (ITransaction tx = session.BeginTransaction()) {
+ if (calendar.CalendarId == 0) {
+ // Check if any other calendars with the same name exists in this folder
+ ICriteria criteria = session.CreateCriteria(typeof(Calendar));
+ criteria.Add(Expression.Like("Name", calendar.Name));
+ criteria.Add(Expression.Eq("ParentFolderId", calendar.ParentFolderId));
+ IList existing = criteria.List();
+
+ if (existing.Count > 0) {
+ throw new DuplicateNameException("Calendar with the same name already exists in this folder.");
+ }
+
+ session.Save(calendar);
+
+ } else {
+ session.Update(calendar);
+ }
+
+ tx.Commit();
+ session.Close();
+ }
+ }
+ }
+
+ public Calendar GetCalandar(string name, int parentFolderId) {
+ using (ISession session = this.hibernateFactory.OpenSession()) {
+ ICriteria criteria = session.CreateCriteria(typeof(Calendar));
+ criteria.Add(Expression.Like("Name", name));
+ criteria.Add(Expression.Eq("ParentFolderId", parentFolderId));
+ IList matches = criteria.List();
+
+ return (matches.Count == 1) ? (Calendar) matches[0] : null;
+ }
+ }
+
+ public Calendar GetCalandar(int calendarId) {
+ using (ISession session = this.hibernateFactory.OpenSession()) {
+ return (Calendar) session.Load(typeof(Calendar), calendarId);
+ }
+ }
+
+ public void DeleteCalandar(int calendarId) {
+ using (ISession session = this.hibernateFactory.OpenSession()) {
+ session.Delete("from Calendar as cal where cal.CalendarId = ?", calendarId, NHibernateUtil.Int32);
+ }
+ }
+
+ public void SaveCalendarEntry(CalendarEntry entry) {
+ using (ISession session = this.hibernateFactory.OpenSession()) {
+ // Update the entry's change management fields
+ entry.LastModified = DateTime.Now;
+ entry.Sequence++;
+
+ // Save it to the database
+ session.SaveOrUpdate(entry);
+ session.Flush();
+ }
+ }
+
+ public CalendarEntry GetCalendarEntry(int entryId) {
+ using (ISession session = this.hibernateFactory.OpenSession()) {
+ return (CalendarEntry) session.Load(typeof(CalendarEntry), entryId);
+ }
+ }
+
+ public IList<CalendarEntry> GetCalendarEntries(DateTime startTime, DateTime endTime, int calendarId) {
+ using (ISession session = this.hibernateFactory.OpenSession()) {
+ ICriteria criteria = session.CreateCriteria(typeof(CalendarEntry));
+ criteria.Add(Expression.Eq("CalendarId", calendarId));
+ criteria.Add(Expression.Ge("StartTime", startTime));
+ IList matches = criteria.List();
+
+ List<CalendarEntry> result = new List<CalendarEntry>();
+ foreach (CalendarEntry entry in matches) {
+ result.Add(entry);
+ }
+
+ // TODO: catch recurrences, etc
+
+ return result;
+ }
+ }
+
+ public void DeleteCalendarEntry(int entryId) {
+ using (ISession session = this.hibernateFactory.OpenSession()) {
+ session.Delete("from CalendarEntry as calE where calE.EntryId = ?", entryId, NHibernateUtil.Int64);
+ }
+ }
#endregion
+
+ public void ReinstallSchema() {
+ new NHibernate.Tool.hbm2ddl.SchemaExport(this.hibernateCfg).Create(false, true);
+ }
}
}
Modified: NMail/trunk/NMail.LocalStoreData.MySql/NMail.LocalStoreData.MySql.csproj
===================================================================
--- NMail/trunk/NMail.LocalStoreData.MySql/NMail.LocalStoreData.MySql.csproj 2007-03-04 00:35:07 UTC (rev 156)
+++ NMail/trunk/NMail.LocalStoreData.MySql/NMail.LocalStoreData.MySql.csproj 2007-03-04 04:54:28 UTC (rev 157)
@@ -82,6 +82,10 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\References\MySql.Data.dll</HintPath>
</Reference>
+ <Reference Include="NHibernate, Version=1.0.4.0, Culture=neutral, PublicKeyToken=154fdcb44c4484fc">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\References\nhibernate\NHibernate.dll</HintPath>
+ </Reference>
<Reference Include="System">
<Name>System</Name>
</Reference>
@@ -115,10 +119,15 @@
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="NMail.LocalStoreData.Mysql.build" />
+ <EmbeddedResource Include="Resources\hibernate-configuration.xml" />
+ <EmbeddedResource Include="Resources\NMail.LocalStoreData.MySql.hbm.xml" />
</ItemGroup>
<ItemGroup>
<None Include="MySqlLocalStoreData-1-to-2.sql" />
</ItemGroup>
+ <ItemGroup>
+ <Folder Include="Properties\" />
+ </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>
Modified: NMail/trunk/NMail.MessageRouter/MessageRouter.cs
===================================================================
--- NMail/trunk/NMail.MessageRouter/MessageRouter.cs 2007-03-04 00:35:07 UTC (rev 156)
+++ NMail/trunk/NMail.MessageRouter/MessageRouter.cs 2007-03-04 04:54:28 UTC (rev 157)
@@ -56,7 +56,7 @@
NConfig.Current.LocalStore.WithinLocalStore(batch.Destination)) {
// To Local Store
foreach(SmtpMessage message in batch.GetMessages()) {
- foreach(SmtpMessageRecipient recipient in message.GetRecipients()) {
+ foreach(SmtpMessageRecipient recipient in message.Recipients) {
RecipientDeliveryResult result;
try {
result = NConfig.Current.LocalStore.DeliverMessage(recipient);
@@ -113,7 +113,7 @@
/// <param name="message">The message to update.</param>
/// <param name="result">The status of the delivery attempt.</param>
private void CompleteDeliveryAttempt(SmtpMessage message, DeliveryResult result) {
- foreach (SmtpMessageRecipient recipient in message.GetRecipients()) {
+ foreach (SmtpMessageRecipient recipient in message.Recipients) {
CompleteDeliveryAttempt(message, new RecipientDeliveryResult(recipient, result));
}
}
@@ -133,7 +133,7 @@
if (result.Type != DeliveryResultType.Success) {
if (result.Recipient.DeliveryAttempts >= Config.Current.WarningDeliveryAttempts) {
// Send a warning message
- if (!result.Recipient.IsEmpty) {
+ if (!result.Recipient.Address.IsEmpty) {
NConfig.Current.SpoolService.SpoolMessage(CreateWarningMessage(message, result));
}
} else if (result.Recipient.DeliveryAttempts >= Config.Current.MaximumDeliveryAttempts) {
@@ -142,7 +142,7 @@
result.Type = DeliveryResultType.PermanentError;
// Send a bounce message
- if (!result.Recipient.IsEmpty) {
+ if (!result.Recipient.Address.IsEmpty) {
NConfig.Current.SpoolService.SpoolMessage(CreateBounceMessage(message, result));
}
}
@@ -213,7 +213,7 @@
template = template.Replace("{DATE}",
DateTime.Now.ToString("r", DateTimeFormatInfo.InvariantInfo));
- template = template.Replace("{RECIPIENT}", deliveryResult.Recipient.ToString(true));
+ template = template.Replace("{RECIPIENT}", deliveryResult.Recipient.Address.ToString(true));
template = template.Replace("{MESSAGE}", deliveryResult.Message);
@@ -262,12 +262,12 @@
data["SourceIPAddress"] = messageRecipient.Message.SourceAddress;
data["HeloDomain"] = messageRecipient.Message.ReportedHost;
data["SourceDomain"] = NConfig.Current.DnsClient.ResolveHost((IPAddress) data["SourceIPAddress"]);
- if (messageRecipient.Host.IsDomain) {
- data["RecipientDomain"] = messageRecipient.Host.Domain;
+ if (messageRecipient.Address.Host.IsDomain) {
+ data["RecipientDomain"] = messageRecipient.Address.Host.Domain;
}
if (NConfig.Current.LocalStore != null &&
- NConfig.Current.LocalStore.WithinLocalStore(messageRecipient.Host)) {
+ NConfig.Current.LocalStore.WithinLocalStore(messageRecipient.Address.Host)) {
// Does localstore accept recipient?
return NConfig.Current.LocalStore.ValidateRecipient(messageRecipient);
} else {
Modified: NMail/trunk/NMail.Sendmail/Sendmail.cs
===================================================================
--- NMail/trunk/NMail.Sendmail/Sendmail.cs 2007-03-04 00:35:07 UTC (rev 156)
+++ NMail/trunk/NMail.Sendmail/Sendmail.cs 2007-03-04 04:54:28 UTC (rev 157)
@@ -90,7 +90,7 @@
foreach (EmailAddress recipient in options.Recipients) {
smtpMessage.AddRecipient(recipient);
}
- if (smtpMessage.RecipientCount == 0) {
+ if (smtpMessage.Recipients.Count == 0) {
throw new ArgumentException("No recipients supplied.");
}
Modified: NMail/trunk/NMail.SmtpClient/SmtpClient.cs
===================================================================
--- NMail/trunk/NMail.SmtpClient/SmtpClient.cs 2007-03-04 00:35:07 UTC (rev 156)
+++ NMail/trunk/NMail.SmtpClient/SmtpClient.cs 2007-03-04 04:54:28 UTC (rev 157)
@@ -17,6 +17,7 @@
using System;
using System.Collections;
+using System.Collections.Generic;
using System.Collections.Specialized;
using System.Text;
@@ -97,7 +98,7 @@
DeliveryResult result = new DeliveryResult(DeliveryResultType.TemporaryError,
"Timed out sending message data.");
this.currentResult = new SmtpDeliveryResult();
- this.currentResult.AddRecipientResults(message.GetRecipients(), result);
+ this.currentResult.AddRecipientResults(message.Recipients, result);
}
}
@@ -107,7 +108,7 @@
DeliveryResult result = new DeliveryResult(DeliveryResultType.TemporaryError,
"Error sending message.");
this.currentResult = new SmtpDeliveryResult();
- this.currentResult.AddRecipientResults(message.GetRecipients(), result);
+ this.currentResult.AddRecipientResults(message.Recipients, result);
return this.currentResult;
} catch (Exception) {
@@ -230,7 +231,7 @@
DeliveryResult result = new DeliveryResult(DeliveryResultType.PermanentError,
"Remote server only supports 7BIT and message body is 8BITMIME.");
this.currentResult = new SmtpDeliveryResult();
- this.currentResult.AddRecipientResults(this.currentMessage.GetRecipients(), result);
+ this.currentResult.AddRecipientResults(this.currentMessage.Recipients, result);
return false;
}
} else {
@@ -249,7 +250,7 @@
DeliveryResult result = new DeliveryResult(DeliveryResultType.PermanentError,
"Message is larger than server message size limit.");
this.currentResult = new SmtpDeliveryResult();
- this.currentResult.AddRecipientResults(this.currentMessage.GetRecipients(), result);
+ this.currentResult.AddRecipientResults(this.currentMessage.Recipients, result);
return false;
}
@@ -289,12 +290,12 @@
DeliveryResult result = new DeliveryResult(DeliveryResultType.PermanentError,
"Server rejected sender address.");
this.currentResult = new SmtpDeliveryResult();
- this.currentResult.AddRecipientResults(this.currentMessage.GetRecipients(), result);
+ this.currentResult.AddRecipientResults(this.currentMessage.Recipients, result);
return false;
}
- foreach (SmtpMessageRecipient recipient in currentMessage.GetRecipients()) {
- this.connection.RcptTo(recipient);
+ foreach (SmtpMessageRecipient recipient in currentMessage.Recipients) {
+ this.connection.RcptTo(recipient.Address);
this.response = this.connection.GetResponse(this.config.TimeoutRcptTo);
RecipientDeliveryResult recipientResult = new RecipientDeliveryResult(
@@ -320,11 +321,11 @@
// Sender
this.connection.MailFrom(this.currentMessage.Sender, mailFromParameters);
- SmtpMessageRecipient[] recipients = this.currentMessage.GetRecipients();
+ IList<SmtpMessageRecipient> recipients = this.currentMessage.Recipients;
// Recipients
foreach (SmtpMessageRecipient recipient in recipients) {
- this.connection.RcptTo(recipient);
+ this.connection.RcptTo(recipient.Address);
}
// Done TODO: BDAT action
@@ -339,7 +340,7 @@
DeliveryResult result = new DeliveryResult(DeliveryResultType.PermanentError,
"Server rejected sender address.");
this.currentResult = new SmtpDeliveryResult();
- this.currentResult.AddRecipientResults(this.currentMessage.GetRecipients(), result);
+ this.currentResult.AddRecipientResults(this.currentMessage.Recipients, result);
return false;
}
@@ -363,7 +364,7 @@
// not ok to send data: no valid recipients, etc
DeliveryResult result = new DeliveryResult(this.response.Type, this.response.Message);
this.currentResult = new SmtpDeliveryResult();
- this.currentResult.AddRecipientResults(this.currentMessage.GetRecipients(), result);
+ this.currentResult.AddRecipientResults(this.currentMessage.Recipients, result);
return false;
}
Modified: NMail/trunk/NMail.SmtpService/Command/RecipientCommand.cs
===================================================================
--- NMail/trunk/NMail.SmtpService/Command/RecipientCommand.cs 2007-03-04 00:35:07 UTC (rev 156)
+++ NMail/trunk/NMail.SmtpService/Command/RecipientCommand.cs 2007-03-04 04:54:28 UTC (rev 157)
@@ -60,21 +60,21 @@
DeliveryResult result = NMailConfiguration.Current.Router.ValidateRecipient(recipient);
switch (result.Type) {
case DeliveryResultType.PermanentError:
- session.Connection.ErrorBadRecipient(recipient);
+ session.Connection.ErrorBadRecipient(recipient.Address);
session.IncrementBadRecipientCount();
break;
case DeliveryResultType.TemporaryError:
- session.Connection.TemporaryBadRecipient(recipient);
+ session.Connection.TemporaryBadRecipient(recipient.Address);
break;
case DeliveryResultType.Success:
- if (session.Message.RecipientCount <= SmtpServiceConfiguration.Current.RecipientLimit) {
- session.Message.AddRecipient(recipient);
- session.Connection.OkRecipient(recipient);
+ if (session.Message.Recipients.Count <= SmtpServiceConfiguration.Current.RecipientLimit) {
+ session.Message.AddRecipient(recipient.Address);
+ session.Connection.OkRecipient(recipient.Address);
session.CurrentState = new RecipientRecievedState(session);
} else {
- session.Connection.TemporaryBadRecipient(recipient);
+ session.Connection.TemporaryBadRecipient(recipient.Address);
}
break;
}
Modified: NMail/trunk/NMail.SpoolData.MySql/MySqlSpoolData.cs
===================================================================
--- NMail/trunk/NMail.SpoolData.MySql/MySqlSpoolData.cs 2007-03-04 00:35:07 UTC (rev 156)
+++ NMail/trunk/NMail.SpoolData.MySql/MySqlSpoolData.cs 2007-03-04 04:54:28 UTC (rev 157)
@@ -19,7 +19,9 @@
using System.Collections;
using System.Collections.Generic;
using System.Data;
+using System.IO;
using System.Net;
+using System.Reflection;
using log4net;
using MySql.Data.MySqlClient;
@@ -47,10 +49,24 @@
}
#region ISpoolData Members
+
+ public void ReinstallSchema() {
+ Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("NMail.SpoolData.MySql.MySqlSpoolData.sql");
+ TextReader reader = new StreamReader(stream);
+ string schemaSql = reader.ReadToEnd();
+
+ using (MySqlConnection cnn = GetConnection()) {
+ using (MySqlCommand cmd = cnn.CreateCommand()) {
+ cmd.CommandText = schemaSql;
+ cmd.ExecuteNonQuery();
+ }
+ }
+ }
+
#region CompleteDeliveryAttempt
public void CompleteDeliveryAttempt(SmtpMessage message, DeliveryResult result) {
// Update status for each recipient on the message
- foreach (SmtpMessageRecipient recipient in message.GetRecipients()) {
+ foreach (SmtpMessageRecipient recipient in message.Recipients) {
CompleteDeliveryAttempt(recipient, result);
}
}
@@ -64,9 +80,9 @@
// Look up the recipient Id
MySqlCommand cmd = cnn.CreateCommand();
cmd.Transaction = transaction;
- cmd.CommandText = "SELECT MessageRecipientId FROM Message m, MessageRecipient mr WHERE m.MessageGuid = ?MessageGuid AND mr.Recipient = ?Recipient AND mr.MessageId = m.MessageId";
- cmd.Parameters.Add("?MessageGuid", recipient.Message.MessageId.ToByteArray());
- cmd.Parameters.Add("?Recipient", recipient.ToString());
+ cmd.CommandText = "SELECT MessageRecipientId FROM Message m, MessageRecipient mr WHERE m.MessageId = ?MessageId AND mr.Recipient = ?Recipient AND mr.MessageId = m.MessageId";
+ cmd.Parameters.Add("?MessageId", recipient.Message.MessageId.ToByteArray());
+ cmd.Parameters.Add("?Recipient", recipient.Address.ToString());
int messageRecipientId = (int)cmd.ExecuteScalar();
if (result.Type == DeliveryResultType.TemporaryError) {
@@ -140,17 +156,13 @@
// Get the message Id
MySqlTransaction trans = cnn.BeginTransaction();
- cmd.Transaction = trans;
- cmd.CommandText = "SELECT MessageId FROM Message WHERE MessageGuid = ?MessageGuid";
- cmd.Parameters.Add("?MessageGuid", message.MessageId.ToByteArray());
- int messageId = (int)cmd.ExecuteScalar();
if (filtered) {
// Update the message filtered status
cmd = cnn.CreateCommand();
cmd.Transaction = trans;
cmd.CommandText = "UPDATE Message SET Filtered = true, InProgress = false WHERE MessageId = ?MessageId";
- cmd.Parameters.Add("?MessageId", messageId);
+ cmd.Parameters.Add("?MessageId", message.MessageId.ToByteArray());
if (cmd.ExecuteNonQuery() != 1) {
trans.Rollback();
throw new Exception("Error updating filtered status.");
@@ -159,7 +171,7 @@
cmd = cnn.CreateCommand();
cmd.Transaction = trans;
cmd.CommandText = "DELETE FROM MessageRecipient WHERE MessageId = ?MessageId";
- cmd.Parameters.Add("?MessageId", messageId);
+ cmd.Parameters.Add("?MessageId", message.MessageId.ToByteArray());
if (cmd.ExecuteNonQuery() <= 0) {
trans.Rollback();
throw new Exception("Error removing previous recipients.");
@@ -167,13 +179,13 @@
// Insert each recipient of the message
DateTime deliveryTime = DateTime.Now;
- foreach (SmtpMessageRecipient recipient in message.GetRecipients()) {
+ foreach (SmtpMessageRecipient recipient in message.Recipients) {
cmd = cnn.CreateCommand();
cmd.Transaction = trans;
cmd.CommandText = "INSERT INTO MessageRecipient (MessageId, Host, Recipient, NextDeliveryAttempt, DeliveryAttempts, InProgress) VALUES (?MessageId, ?Host, ?Recipient, ?NextDeliveryAttempt, ?DeliveryAttempts - 1, ?InProgress)";
- cmd.Parameters.Add("?MessageId", messageId);
+ cmd.Parameters.Add("?MessageId", message.MessageId.ToByteArray());
cmd.Parameters.Add("?Host", recipient.Host.ToString());
- cmd.Parameters.Add("?Recipient", recipient.ToString());
+ cmd.Parameters.Add("?Recipient", recipient.Address.ToString());
cmd.Parameters.Add("?DeliveryAttempts", 1); // TODO: this is a fix for some NULL bug in the connector, chase it up
cmd.Parameters.Add("?NextDeliveryAttempt", deliveryTime);
cmd.Parameters.Add("?InProgress", false);
@@ -189,14 +201,14 @@
} else {
// Delete the message
cmd.CommandText = "DELETE FROM MessageRecipient WHERE MessageId = ?MessageId";
- cmd.Parameters.Add("?MessageId", messageId);
+ cmd.Parameters.Add("?MessageId", message.MessageId.ToByteArray());
if (cmd.ExecuteNonQuery() <= 0) {
trans.Rollback();
throw new Exception("Error removing recipients.");
}
cmd.CommandText = "DELETE FROM Message WHERE MessageId = ?MessageId";
- cmd.Parameters.Add("?MessageId", messageId);
+ cmd.Parameters.Add("?MessageId", message.MessageId.ToByteArray());
if (cmd.ExecuteNonQuery() != 1) {
trans.Rollback();
throw new Exception("Error removing message.");
@@ -216,30 +228,31 @@
MySqlTransaction transaction = cnn.BeginTransaction();
MySqlCommand cmd = cnn.CreateCommand();
cmd.Transaction = transaction;
- cmd.CommandText = "SELECT MessageId, MessageGuid, Sender, ReportedHost, SourceAddress, MessageData FROM Message WHERE InProgress = false AND Filtered = false ORDER BY MessageId limit 1";
+ cmd.CommandText = "SELECT MessageId, Sender, ReportedHost, SourceAddress, MessageData FROM Message WHERE InProgress = false AND Filtered...
[truncated message content] |
|
From: <tmy...@us...> - 2007-03-04 00:35:10
|
Revision: 156
http://svn.sourceforge.net/nmailserver/?rev=156&view=rev
Author: tmyroadctfig
Date: 2007-03-03 16:35:07 -0800 (Sat, 03 Mar 2007)
Log Message:
-----------
Work on unit tests.
Modified Paths:
--------------
NMail/trunk/NMail.UnitTests/DataTypes/MessageHeaderTests.cs
NMail/trunk/NMail.UnitTests/Helper/MimeHelperTests.cs
NMail/trunk/NMail.UnitTests/Helper/StringTokenizerTests.cs
NMail/trunk/NMail.UnitTests/NMail.UnitTests.csproj
Added Paths:
-----------
NMail/trunk/NMail.UnitTests/DataTypes/DomainTests.cs
NMail/trunk/NMail.UnitTests/DataTypes/EmailAddressTests.cs
NMail/trunk/NMail.UnitTests/DataTypes/HostTests.cs
NMail/trunk/NMail.UnitTests/Resources/
NMail/trunk/NMail.UnitTests/Resources/ResourceHelper.cs
NMail/trunk/NMail.UnitTests/Resources/Test1.eml
NMail/trunk/NMail.UnitTests/SmtpService/
NMail/trunk/NMail.UnitTests/SpoolData/
NMail/trunk/NMail.UnitTests/SpoolData/BaseSpoolDataTest.cs
NMail/trunk/NMail.UnitTests/SpoolData/FilterTest1.cs
NMail/trunk/NMail.UnitTests/SpoolData/FilterTest2.cs
NMail/trunk/NMail.UnitTests/SpoolData/FilterTest3.cs
NMail/trunk/NMail.UnitTests/SpoolData/GetMsgToFilterTest1.cs
NMail/trunk/NMail.UnitTests/SpoolData/InitTest1.cs
NMail/trunk/NMail.UnitTests/SpoolData/NextDeliveryTest1.cs
NMail/trunk/NMail.UnitTests/SpoolData/SpoolMessageTest1.cs
Removed Paths:
-------------
NMail/trunk/NMail.UnitTests/DomainTests.cs
NMail/trunk/NMail.UnitTests/EmailAddressTests.cs
NMail/trunk/NMail.UnitTests/HostTests.cs
Property Changed:
----------------
NMail/trunk/NMail.UnitTests/
Property changes on: NMail/trunk/NMail.UnitTests
___________________________________________________________________
Name: svn:ignore
- bin
obj
+ bin
obj
NMail.UnitTests.csproj.user
Copied: NMail/trunk/NMail.UnitTests/DataTypes/DomainTests.cs (from rev 148, NMail/trunk/NMail.UnitTests/DomainTests.cs)
===================================================================
--- NMail/trunk/NMail.UnitTests/DataTypes/DomainTests.cs (rev 0)
+++ NMail/trunk/NMail.UnitTests/DataTypes/DomainTests.cs 2007-03-04 00:35:07 UTC (rev 156)
@@ -0,0 +1,120 @@
+/*
+ * Copyright 2004-2006 Luke Quinane, Daniel Frampton and Jared Hodges.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System;
+
+using NUnit.Framework;
+
+using NMail.DataTypes;
+
+namespace NMail.UnitTests.DataTypes {
+ /// <summary>
+ /// Unit tests for the Domain class.
+ /// </summary>
+ [TestFixture]
+ public class DomainTests {
+ #region Name Checks
+ /// <summary>
+ /// Checks if a name that is too long is rejected.
+ /// </summary>
+ [Test]
+ [ExpectedException(typeof(FormatException))]
+ public void CheckExcessiveLengthName() {
+ Domain d = new Domain("really.long.name.a123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890");
+ }
+
+ /// <summary>
+ /// Checks if an invalid name is rejected.
+ /// </summary>
+ [Test]
+ [ExpectedException(typeof(FormatException))]
+ public void CheckInvalidName() {
+ Domain d = new Domain("abc@#.dom.tld");
+ }
+
+ /// <summary>
+ /// Checks if a domain that starts with numbers is rejected.
+ /// </summary>
+ [Test]
+ public void CheckNumbersAtStartName() {
+ Domain d = new Domain("123abc.dom.tld");
+ }
+
+ /// <summary>
+ /// Checks if valid domain names are accepted.
+ /// </summary>
+ [Test]
+ public void CheckValidNames() {
+ Domain d1 = new Domain("d");
+ Domain d2 = new Domain("d.d");
+ Domain d3 = new Domain("d1");
+ Domain d4 = new Domain("d.d1");
+ }
+ #endregion
+
+ /// <summary>
+ /// Checks if domain comparison works
+ /// </summary>
+ [Test]
+ public void CheckEquals() {
+ Domain d1 = new Domain("test1.dom.tld");
+ Domain d2 = new Domain("test1.dom.tld");
+ Domain d3 = new Domain("test2.dom.tld");
+
+ Assert.IsTrue(d1.Equals(d2), "d1.Equals(d2)");
+ Assert.IsFalse(d1.Equals(d3), "d1.Equals(d3)");
+ }
+
+ /// <summary>
+ /// Checks if the Domain considers domain names in a case insensitve manner
+ /// </summary>
+ [Test]
+ public void CheckCaseSensitivity() {
+ Domain d1 = new Domain("test1.dom.tld");
+ Domain d2 = new Domain("TEST1.DOM.tld");
+
+ Assert.IsTrue(d1.Equals(d2), "d1.Equals(d2)");
+ Assert.IsTrue(d2.Equals(d1), "d2.Equals(d1)");
+ }
+
+ /// <summary>
+ /// Checks if Domain considers super-domains correctly.
+ /// </summary>
+ [Test]
+ public void CheckSuperDomain() {
+ Domain d1 = new Domain("dom.tld");
+ Domain d2 = new Domain("sub.dom.tld");
+
+ Assert.IsTrue(d1.IsSuperDomain(d2), "d1.IsSuperDomain(d2)");
+ Assert.IsFalse(d2.IsSuperDomain(d1), "d2.IsSuperDomain(d1)");
+ Assert.IsFalse(d1.IsSuperDomain(d1), "d1.IsSuperDomain(d1)");
+ }
+
+ /// <summary>
+ /// Checks if Domain considers sub-domains correctly.
+ /// </summary>
+ [Test]
+ public void CheckSubDomain() {
+ Domain d1 = new Domain("sub.dom.tld");
+ Domain d2 = new Domain("dom.tld");
+
+ Assert.IsTrue(d1.IsSubDomain(d2), "d1.IsSubDomain(d2)");
+ Assert.IsFalse(d2.IsSubDomain(d1), "d2.IsSubDomain(d1)");
+ Assert.IsFalse(d1.IsSubDomain(d1), "d1.IsSubDomain(d1)");
+ }
+ }
+}
Copied: NMail/trunk/NMail.UnitTests/DataTypes/EmailAddressTests.cs (from rev 148, NMail/trunk/NMail.UnitTests/EmailAddressTests.cs)
===================================================================
--- NMail/trunk/NMail.UnitTests/DataTypes/EmailAddressTests.cs (rev 0)
+++ NMail/trunk/NMail.UnitTests/DataTypes/EmailAddressTests.cs 2007-03-04 00:35:07 UTC (rev 156)
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2004-2006 Luke Quinane and Daniel Frampton
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System;
+
+using NUnit.Framework;
+
+using NMail.DataTypes;
+
+namespace NMail.UnitTests.DataTypes {
+ /// <summary>
+ /// Unit tests for the EmailAddress class.
+ /// </summary>
+ [TestFixture]
+ public class EmailAddressTests {
+ /// <summary>
+ /// Checks if valid addresses are accepted.
+ /// </summary>
+ [Test]
+ public void CheckValidAddresses() {
+ EmailAddress e1 = new EmailAddress("m@h");
+ EmailAddress e2 = new EmailAddress("mailbox@host");
+ EmailAddress e3 = new EmailAddress("mailbox@[127.0.0.1]");
+ EmailAddress e4 = new EmailAddress("<mailbox@host>");
+ EmailAddress e5 = new EmailAddress("m.*+-=b^!#$%o&'/?_`{}x|~@host");
+ }
+ }
+}
Copied: NMail/trunk/NMail.UnitTests/DataTypes/HostTests.cs (from rev 148, NMail/trunk/NMail.UnitTests/HostTests.cs)
===================================================================
--- NMail/trunk/NMail.UnitTests/DataTypes/HostTests.cs (rev 0)
+++ NMail/trunk/NMail.UnitTests/DataTypes/HostTests.cs 2007-03-04 00:35:07 UTC (rev 156)
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2004-2006 Luke Quinane and Daniel Frampton
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System;
+using System.Net;
+
+using NUnit.Framework;
+
+using NMail.DataTypes;
+
+namespace NMail.UnitTests.DataTypes {
+ /// <summary>
+ /// Unit tests for the Host class.
+ /// </summary>
+ [TestFixture]
+ public class HostTests {
+ /// <summary>
+ /// Checks that valid hosts are accepted.
+ /// </summary>
+ [Test]
+ public void CheckValidHosts() {
+ Host h1 = new Host("192.168.1.1");
+ Host h2 = new Host("dom.dom.tld");
+ Host h3 = new Host(new Domain("dom.dom"));
+ Host h4 = new Host(IPAddress.Any);
+ }
+
+ /// <summary>
+ /// Checks if broken hosts that we should still accept are accepted.
+ /// </summary>
+ [Test]
+ public void CheckBrokenHostnames() {
+ Host h1 = new Host("192.168.1.1.my-domain");
+ }
+ }
+}
Modified: NMail/trunk/NMail.UnitTests/DataTypes/MessageHeaderTests.cs
===================================================================
--- NMail/trunk/NMail.UnitTests/DataTypes/MessageHeaderTests.cs 2007-02-24 03:55:08 UTC (rev 155)
+++ NMail/trunk/NMail.UnitTests/DataTypes/MessageHeaderTests.cs 2007-03-04 00:35:07 UTC (rev 156)
@@ -6,7 +6,7 @@
using NMail.DataTypes;
-namespace NMail.DataTypes {
+namespace NMail.UnitTests.DataTypes {
/// <summary>
/// Unit tests for the message headers class.
/// </summary>
Deleted: NMail/trunk/NMail.UnitTests/DomainTests.cs
===================================================================
--- NMail/trunk/NMail.UnitTests/DomainTests.cs 2007-02-24 03:55:08 UTC (rev 155)
+++ NMail/trunk/NMail.UnitTests/DomainTests.cs 2007-03-04 00:35:07 UTC (rev 156)
@@ -1,120 +0,0 @@
-/*
- * Copyright 2004-2006 Luke Quinane, Daniel Frampton and Jared Hodges.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-using System;
-
-using NUnit.Framework;
-
-using NMail.DataTypes;
-
-namespace NMail.DataTypes.Tests {
- /// <summary>
- /// Unit tests for the Domain class.
- /// </summary>
- [TestFixture]
- public class DomainTests {
- #region Name Checks
- /// <summary>
- /// Checks if a name that is too long is rejected.
- /// </summary>
- [Test]
- [ExpectedException(typeof(FormatException))]
- public void CheckExcessiveLengthName() {
- Domain d = new Domain("really.long.name.a123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890");
- }
-
- /// <summary>
- /// Checks if an invalid name is rejected.
- /// </summary>
- [Test]
- [ExpectedException(typeof(FormatException))]
- public void CheckInvalidName() {
- Domain d = new Domain("abc@#.dom.tld");
- }
-
- /// <summary>
- /// Checks if a domain that starts with numbers is rejected.
- /// </summary>
- [Test]
- public void CheckNumbersAtStartName() {
- Domain d = new Domain("123abc.dom.tld");
- }
-
- /// <summary>
- /// Checks if valid domain names are accepted.
- /// </summary>
- [Test]
- public void CheckValidNames() {
- Domain d1 = new Domain("d");
- Domain d2 = new Domain("d.d");
- Domain d3 = new Domain("d1");
- Domain d4 = new Domain("d.d1");
- }
- #endregion
-
- /// <summary>
- /// Checks if domain comparison works
- /// </summary>
- [Test]
- public void CheckEquals() {
- Domain d1 = new Domain("test1.dom.tld");
- Domain d2 = new Domain("test1.dom.tld");
- Domain d3 = new Domain("test2.dom.tld");
-
- Assert.IsTrue(d1.Equals(d2), "d1.Equals(d2)");
- Assert.IsFalse(d1.Equals(d3), "d1.Equals(d3)");
- }
-
- /// <summary>
- /// Checks if the Domain considers domain names in a case insensitve manner
- /// </summary>
- [Test]
- public void CheckCaseSensitivity() {
- Domain d1 = new Domain("test1.dom.tld");
- Domain d2 = new Domain("TEST1.DOM.tld");
-
- Assert.IsTrue(d1.Equals(d2), "d1.Equals(d2)");
- Assert.IsTrue(d2.Equals(d1), "d2.Equals(d1)");
- }
-
- /// <summary>
- /// Checks if Domain considers super-domains correctly.
- /// </summary>
- [Test]
- public void CheckSuperDomain() {
- Domain d1 = new Domain("dom.tld");
- Domain d2 = new Domain("sub.dom.tld");
-
- Assert.IsTrue(d1.IsSuperDomain(d2), "d1.IsSuperDomain(d2)");
- Assert.IsFalse(d2.IsSuperDomain(d1), "d2.IsSuperDomain(d1)");
- Assert.IsFalse(d1.IsSuperDomain(d1), "d1.IsSuperDomain(d1)");
- }
-
- /// <summary>
- /// Checks if Domain considers sub-domains correctly.
- /// </summary>
- [Test]
- public void CheckSubDomain() {
- Domain d1 = new Domain("sub.dom.tld");
- Domain d2 = new Domain("dom.tld");
-
- Assert.IsTrue(d1.IsSubDomain(d2), "d1.IsSubDomain(d2)");
- Assert.IsFalse(d2.IsSubDomain(d1), "d2.IsSubDomain(d1)");
- Assert.IsFalse(d1.IsSubDomain(d1), "d1.IsSubDomain(d1)");
- }
- }
-}
Deleted: NMail/trunk/NMail.UnitTests/EmailAddressTests.cs
===================================================================
--- NMail/trunk/NMail.UnitTests/EmailAddressTests.cs 2007-02-24 03:55:08 UTC (rev 155)
+++ NMail/trunk/NMail.UnitTests/EmailAddressTests.cs 2007-03-04 00:35:07 UTC (rev 156)
@@ -1,42 +0,0 @@
-/*
- * Copyright 2004-2006 Luke Quinane and Daniel Frampton
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-using System;
-
-using NUnit.Framework;
-
-using NMail.DataTypes;
-
-namespace NMail.DataTypes.Tests {
- /// <summary>
- /// Unit tests for the EmailAddress class.
- /// </summary>
- [TestFixture]
- public class EmailAddressTests {
- /// <summary>
- /// Checks if valid addresses are accepted.
- /// </summary>
- [Test]
- public void CheckValidAddresses() {
- EmailAddress e1 = new EmailAddress("m@h");
- EmailAddress e2 = new EmailAddress("mailbox@host");
- EmailAddress e3 = new EmailAddress("mailbox@[127.0.0.1]");
- EmailAddress e4 = new EmailAddress("<mailbox@host>");
- EmailAddress e5 = new EmailAddress("m.*+-=b^!#$%o&'/?_`{}x|~@host");
- }
- }
-}
Modified: NMail/trunk/NMail.UnitTests/Helper/MimeHelperTests.cs
===================================================================
--- NMail/trunk/NMail.UnitTests/Helper/MimeHelperTests.cs 2007-02-24 03:55:08 UTC (rev 155)
+++ NMail/trunk/NMail.UnitTests/Helper/MimeHelperTests.cs 2007-03-04 00:35:07 UTC (rev 156)
@@ -24,7 +24,7 @@
using NMail.DataTypes;
using NMail.Helper;
-namespace NMail.Helper {
+namespace NMail.UnitTests.Helper {
/// <summary>
/// Unit tests for the MIME helper.
/// </summary>
Modified: NMail/trunk/NMail.UnitTests/Helper/StringTokenizerTests.cs
===================================================================
--- NMail/trunk/NMail.UnitTests/Helper/StringTokenizerTests.cs 2007-02-24 03:55:08 UTC (rev 155)
+++ NMail/trunk/NMail.UnitTests/Helper/StringTokenizerTests.cs 2007-03-04 00:35:07 UTC (rev 156)
@@ -6,7 +6,7 @@
using NMail.Helper;
-namespace NMail.Helper {
+namespace NMail.UnitTests.Helper {
/// <summary>
/// Unit tests for the string tokenizer.
/// </summary>
Deleted: NMail/trunk/NMail.UnitTests/HostTests.cs
===================================================================
--- NMail/trunk/NMail.UnitTests/HostTests.cs 2007-02-24 03:55:08 UTC (rev 155)
+++ NMail/trunk/NMail.UnitTests/HostTests.cs 2007-03-04 00:35:07 UTC (rev 156)
@@ -1,50 +0,0 @@
-/*
- * Copyright 2004-2006 Luke Quinane and Daniel Frampton
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-using System;
-using System.Net;
-
-using NUnit.Framework;
-
-using NMail.DataTypes;
-
-namespace NMail.DataTypes.Tests {
- /// <summary>
- /// Unit tests for the Host class.
- /// </summary>
- [TestFixture]
- public class HostTests {
- /// <summary>
- /// Checks that valid hosts are accepted.
- /// </summary>
- [Test]
- public void CheckValidHosts() {
- Host h1 = new Host("192.168.1.1");
- Host h2 = new Host("dom.dom.tld");
- Host h3 = new Host(new Domain("dom.dom"));
- Host h4 = new Host(IPAddress.Any);
- }
-
- /// <summary>
- /// Checks if broken hosts that we should still accept are accepted.
- /// </summary>
- [Test]
- public void CheckBrokenHostnames() {
- Host h1 = new Host("192.168.1.1.my-domain");
- }
- }
-}
Modified: NMail/trunk/NMail.UnitTests/NMail.UnitTests.csproj
===================================================================
--- NMail/trunk/NMail.UnitTests/NMail.UnitTests.csproj 2007-02-24 03:55:08 UTC (rev 155)
+++ NMail/trunk/NMail.UnitTests/NMail.UnitTests.csproj 2007-03-04 00:35:07 UTC (rev 156)
@@ -18,6 +18,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
+ <UseVSHostingProcess>true</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -42,16 +43,26 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="DataTypes\DomainTests.cs" />
+ <Compile Include="DataTypes\EmailAddressTests.cs" />
+ <Compile Include="DataTypes\HostTests.cs" />
<Compile Include="DataTypes\MessageHeaderTests.cs" />
<Compile Include="DNSCacheTests.cs" />
- <Compile Include="DomainTests.cs" />
- <Compile Include="EmailAddressTests.cs" />
<Compile Include="Helper\MimeHelperTests.cs" />
<Compile Include="Helper\StringTokenizerTests.cs" />
- <Compile Include="HostTests.cs" />
+ <Compile Include="LocalStoreData\MySql\CalendarTests.cs" />
<Compile Include="LocalStoreData\MySql\MySqlLocalStoreTests.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Resources\ResourceHelper.cs" />
<Compile Include="SmtpServiceTests.cs" />
+ <Compile Include="SpoolData\BaseSpoolDataTest.cs" />
+ <Compile Include="SpoolData\NextDeliveryTest1.cs" />
+ <Compile Include="SpoolData\FilterTest3.cs" />
+ <Compile Include="SpoolData\FilterTest2.cs" />
+ <Compile Include="SpoolData\FilterTest1.cs" />
+ <Compile Include="SpoolData\GetMsgToFilterTest1.cs" />
+ <Compile Include="SpoolData\InitTest1.cs" />
+ <Compile Include="SpoolData\SpoolMessageTest1.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\NDns\NDns.csproj">
@@ -63,6 +74,9 @@
<Name>NMail</Name>
</ProjectReference>
</ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="Resources\Test1.eml" />
+ </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Added: NMail/trunk/NMail.UnitTests/Resources/ResourceHelper.cs
===================================================================
--- NMail/trunk/NMail.UnitTests/Resources/ResourceHelper.cs (rev 0)
+++ NMail/trunk/NMail.UnitTests/Resources/ResourceHelper.cs 2007-03-04 00:35:07 UTC (rev 156)
@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Reflection;
+using System.Text;
+
+using NMail.DataTypes;
+
+namespace NMail.UnitTests.Resources {
+ /// <summary>
+ /// A simple helper for loading test resources.
+ /// </summary>
+ public static class ResourceHelper {
+
+ public static Message GetMessage(string name) {
+ string resourceName = string.Format("NMail.UnitTests.Resources.{0}", name);
+ Stream input = Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName);
+ TextReader reader = new StreamReader(input);
+ string messageData = reader.ReadToEnd();
+
+ return new Message(messageData);
+ }
+ }
+}
Added: NMail/trunk/NMail.UnitTests/Resources/Test1.eml
===================================================================
--- NMail/trunk/NMail.UnitTests/Resources/Test1.eml (rev 0)
+++ NMail/trunk/NMail.UnitTests/Resources/Test1.eml 2007-03-04 00:35:07 UTC (rev 156)
@@ -0,0 +1,36 @@
+From: "Luke" <lu...@do...>
+To: <luke@localhost>
+Subject: Test
+Date: Tue, 6 Feb 2007 18:43:44 +1030
+MIME-Version: 1.0
+Content-Type: multipart/alternative;
+ boundary="----=_NextPart_000_0058_01C74A1E.BA994670"
+X-Priority: 3
+X-MSMail-Priority: Normal
+X-Mailer: Microsoft Outlook Express 6.00.2900.3028
+X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
+
+This is a multi-part message in MIME format.
+
+------=_NextPart_000_0058_01C74A1E.BA994670
+Content-Type: text/plain;
+ charset="iso-8859-1"
+Content-Transfer-Encoding: quoted-printable
+
+testing 1234
+------=_NextPart_000_0058_01C74A1E.BA994670
+Content-Type: text/html;
+ charset="iso-8859-1"
+Content-Transfer-Encoding: quoted-printable
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML><HEAD>
+<META http-equiv=3DContent-Type content=3D"text/html; =
+charset=3Diso-8859-1">
+<META content=3D"MSHTML 6.00.5730.11" name=3DGENERATOR>
+<STYLE></STYLE>
+</HEAD>
+<BODY bgColor=3D#ffffff>
+<DIV><FONT face=3DArial size=3D2>testing 1234</FONT></DIV></BODY></HTML>
+
+------=_NextPart_000_0058_01C74A1E.BA994670--
Added: NMail/trunk/NMail.UnitTests/SpoolData/BaseSpoolDataTest.cs
===================================================================
--- NMail/trunk/NMail.UnitTests/SpoolData/BaseSpoolDataTest.cs (rev 0)
+++ NMail/trunk/NMail.UnitTests/SpoolData/BaseSpoolDataTest.cs 2007-03-04 00:35:07 UTC (rev 156)
@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+using NUnit.Framework;
+
+using NMail.DataTypes.Spool;
+
+namespace NMail.UnitTests.SpoolData {
+ /// <summary>
+ /// A base class for SpoolData tests.
+ /// </summary>
+ public abstract class BaseSpoolDataTest {
+
+ protected ISpoolData spoolData = NMail.Configuration.NMailConfiguration.Current.SpoolData;
+
+ [TestFixtureSetUp]
+ public void Setup() {
+ spoolData.ReinstallSchema();
+ }
+
+ [TestFixtureTearDown]
+ public void TearDown() {
+ spoolData.ReinstallSchema();
+ }
+ }
+}
Added: NMail/trunk/NMail.UnitTests/SpoolData/FilterTest1.cs
===================================================================
--- NMail/trunk/NMail.UnitTests/SpoolData/FilterTest1.cs (rev 0)
+++ NMail/trunk/NMail.UnitTests/SpoolData/FilterTest1.cs 2007-03-04 00:35:07 UTC (rev 156)
@@ -0,0 +1,51 @@
+using System;
+using System.Collections.Generic;
+using System.Net;
+using System.Text;
+
+using NUnit.Framework;
+
+using NMail.DataTypes;
+using NMail.DataTypes.Spool;
+using NMail.UnitTests.Resources;
+
+namespace NMail.UnitTests.SpoolData {
+ /// <summary>
+ /// Tests filtering a message.
+ /// </summary>
+ [TestFixture]
+ public class FilterTest1 : BaseSpoolDataTest {
+ [Test]
+ public void Test1() {
+ SmtpMessage m1 = new SmtpMessage();
+ m1.Data = ResourceHelper.GetMessage("Test1.eml");
+ m1.Recipients.Add(new SmtpMessageRecipient(m1, new EmailAddress("rec...@re...")));
+ m1.Recipients.Add(new SmtpMessageRecipient(m1, new EmailAddress("rec...@re...")));
+ m1.ReportedHost = new Host("localhost");
+ m1.Sender = new EmailAddress("se...@se...");
+ m1.SourceAddress = IPAddress.Loopback;
+
+ this.spoolData.SpoolMessage(m1);
+
+ SmtpMessage m2 = this.spoolData.GetMessageToFilter();
+
+ Assert.AreEqual(true, m2.InProgress, "InProgress == true");
+ Assert.AreEqual(m1.MessageId, m2.MessageId, "Message Ids match");
+ Assert.AreEqual(2, m2.Recipients.Count, "Recipient count correct.");
+
+ this.spoolData.SetFilterStatus(m2, true);
+
+ IList<SpoolEnvelope> spooledEnvelopes = this.spoolData.GetSpooledEnvelopes();
+
+ Assert.AreEqual(1, spooledEnvelopes.Count, "Spool envelope count == 1");
+ Assert.AreEqual(m1.MessageId, spooledEnvelopes[0].SpoolMessageId, "Message Id match");
+ Assert.AreEqual(false, spooledEnvelopes[0].InProgress, "InProgress == false");
+ Assert.AreEqual(true, spooledEnvelopes[0].Filtered, "Filtered == true");
+ Assert.AreEqual(2, spooledEnvelopes[0].Recipients.Count, "Recipient count == 2");
+ Assert.AreEqual(new EmailAddress("rec...@re..."), spooledEnvelopes[0].Recipients[0].Address, "Correct recipient1 address");
+ Assert.AreEqual(new EmailAddress("rec...@re..."), spooledEnvelopes[0].Recipients[1].Address, "Correct recipient2 address");
+ Assert.AreEqual(false, spooledEnvelopes[0].Recipients[0].InProgress, "R1: InProgress == false");
+ Assert.AreEqual(false, spooledEnvelopes[0].Recipients[1].InProgress, "R2: InProgress == false");
+ }
+ }
+}
Added: NMail/trunk/NMail.UnitTests/SpoolData/FilterTest2.cs
===================================================================
--- NMail/trunk/NMail.UnitTests/SpoolData/FilterTest2.cs (rev 0)
+++ NMail/trunk/NMail.UnitTests/SpoolData/FilterTest2.cs 2007-03-04 00:35:07 UTC (rev 156)
@@ -0,0 +1,43 @@
+using System;
+using System.Collections.Generic;
+using System.Net;
+using System.Text;
+
+using NUnit.Framework;
+
+using NMail.DataTypes;
+using NMail.DataTypes.Spool;
+using NMail.UnitTests.Resources;
+
+namespace NMail.UnitTests.SpoolData {
+ /// <summary>
+ /// Tests filtering a message.
+ /// </summary>
+ [TestFixture]
+ public class FilterTest2 : BaseSpoolDataTest {
+ [Test]
+ public void Test1() {
+ SmtpMessage m1 = new SmtpMessage();
+ m1.Data = ResourceHelper.GetMessage("Test1.eml");
+ m1.Recipients.Add(new SmtpMessageRecipient(m1, new EmailAddress("rec...@re...")));
+ m1.Recipients.Add(new SmtpMessageRecipient(m1, new EmailAddress("rec...@re...")));
+ m1.ReportedHost = new Host("localhost");
+ m1.Sender = new EmailAddress("se...@se...");
+ m1.SourceAddress = IPAddress.Loopback;
+
+ this.spoolData.SpoolMessage(m1);
+
+ SmtpMessage m2 = this.spoolData.GetMessageToFilter();
+
+ Assert.AreEqual(true, m2.InProgress, "InProgress == true");
+ Assert.AreEqual(m1.MessageId, m2.MessageId, "Message Ids match");
+ Assert.AreEqual(2, m2.Recipients.Count, "Recipient count correct.");
+
+ this.spoolData.SetFilterStatus(m2, false);
+
+ IList<SpoolEnvelope> spooledEnvelopes = this.spoolData.GetSpooledEnvelopes();
+
+ Assert.AreEqual(0, spooledEnvelopes.Count, "Spool envelope count == 0");
+ }
+ }
+}
Added: NMail/trunk/NMail.UnitTests/SpoolData/FilterTest3.cs
===================================================================
--- NMail/trunk/NMail.UnitTests/SpoolData/FilterTest3.cs (rev 0)
+++ NMail/trunk/NMail.UnitTests/SpoolData/FilterTest3.cs 2007-03-04 00:35:07 UTC (rev 156)
@@ -0,0 +1,50 @@
+using System;
+using System.Collections.Generic;
+using System.Net;
+using System.Text;
+
+using NUnit.Framework;
+
+using NMail.DataTypes;
+using NMail.DataTypes.Spool;
+using NMail.UnitTests.Resources;
+
+namespace NMail.UnitTests.SpoolData {
+ /// <summary>
+ /// Tests filtering a message.
+ /// </summary>
+ [TestFixture]
+ public class FilterTest3 : BaseSpoolDataTest {
+ [Test]
+ public void Test1() {
+ SmtpMessage m1 = new SmtpMessage();
+ m1.Data = ResourceHelper.GetMessage("Test1.eml");
+ m1.Recipients.Add(new SmtpMessageRecipient(m1, new EmailAddress("rec...@re...")));
+ m1.Recipients.Add(new SmtpMessageRecipient(m1, new EmailAddress("rec...@re...")));
+ m1.ReportedHost = new Host("localhost");
+ m1.Sender = new EmailAddress("se...@se...");
+ m1.SourceAddress = IPAddress.Loopback;
+
+ this.spoolData.SpoolMessage(m1);
+
+ SmtpMessage m2 = this.spoolData.GetMessageToFilter();
+
+ Assert.AreEqual(true, m2.InProgress, "InProgress == true");
+ Assert.AreEqual(m1.MessageId, m2.MessageId, "Message Ids match");
+ Assert.AreEqual(2, m2.Recipients.Count, "Recipient count correct.");
+
+ m2.Recipients.RemoveAt(0);
+ this.spoolData.SetFilterStatus(m2, true);
+
+ IList<SpoolEnvelope> spooledEnvelopes = this.spoolData.GetSpooledEnvelopes();
+
+ Assert.AreEqual(1, spooledEnvelopes.Count, "Spool envelope count == 1");
+ Assert.AreEqual(m1.MessageId, spooledEnvelopes[0].SpoolMessageId, "Message Id match");
+ Assert.AreEqual(false, spooledEnvelopes[0].InProgress, "InProgress == false");
+ Assert.AreEqual(true, spooledEnvelopes[0].Filtered, "Filtered == true");
+ Assert.AreEqual(1, spooledEnvelopes[0].Recipients.Count, "Recipient count == 1");
+ Assert.AreEqual(new EmailAddress("rec...@re..."), spooledEnvelopes[0].Recipients[0].Address, "Correct recipient1 address");
+ Assert.AreEqual(false, spooledEnvelopes[0].Recipients[0].InProgress, "R1: InProgress == false");
+ }
+ }
+}
Added: NMail/trunk/NMail.UnitTests/SpoolData/GetMsgToFilterTest1.cs
===================================================================
--- NMail/trunk/NMail.UnitTests/SpoolData/GetMsgToFilterTest1.cs (rev 0)
+++ NMail/trunk/NMail.UnitTests/SpoolData/GetMsgToFilterTest1.cs 2007-03-04 00:35:07 UTC (rev 156)
@@ -0,0 +1,42 @@
+using System;
+using System.Collections.Generic;
+using System.Net;
+using System.Text;
+
+using NUnit.Framework;
+
+using NMail.DataTypes;
+using NMail.DataTypes.Spool;
+using NMail.UnitTests.Resources;
+
+namespace NMail.UnitTests.SpoolData {
+ /// <summary>
+ /// Tests getting a message to filter.
+ /// </summary>
+ [TestFixture]
+ public class GetMsgToFilterTest : BaseSpoolDataTest {
+ [Test]
+ public void Test1() {
+ SmtpMessage m1;
+
+ m1 = this.spoolData.GetMessageToFilter();
+ Assert.IsNull(m1, "No message to filter returns null.");
+
+ SmtpMessage m2 = new SmtpMessage();
+ m2.Data = ResourceHelper.GetMessage("Test1.eml");
+ m2.Recipients.Add(new SmtpMessageRecipient(m2, new EmailAddress("rec...@re...")));
+ m2.ReportedHost = new Host("localhost");
+ m2.Sender = new EmailAddress("se...@se...");
+ m2.SourceAddress = IPAddress.Loopback;
+
+ this.spoolData.SpoolMessage(m2);
+
+ m1 = this.spoolData.GetMessageToFilter();
+
+ Assert.AreEqual(true, m1.InProgress, "InProgress == true");
+ Assert.AreEqual(m2.MessageId, m1.MessageId, "Message Ids match");
+ Assert.AreEqual(1, m1.Recipients.Count, "Recipient count correct.");
+ Assert.AreEqual(false, m1.Recipients[0].InProgress, "R1: InProgress == false.");
+ }
+ }
+}
Added: NMail/trunk/NMail.UnitTests/SpoolData/InitTest1.cs
===================================================================
--- NMail/trunk/NMail.UnitTests/SpoolData/InitTest1.cs (rev 0)
+++ NMail/trunk/NMail.UnitTests/SpoolData/InitTest1.cs 2007-03-04 00:35:07 UTC (rev 156)
@@ -0,0 +1,40 @@
+using System;
+using System.Collections.Generic;
+using System.Net;
+using System.Text;
+
+using NUnit.Framework;
+
+using NMail.DataTypes;
+using NMail.DataTypes.Spool;
+using NMail.UnitTests.Resources;
+
+namespace NMail.UnitTests.SpoolData {
+ /// <summary>
+ /// Tests spool data initialisation.
+ /// </summary>
+ [TestFixture]
+ public class InitTest1 : BaseSpoolDataTest {
+ [Test]
+ public void Test1() {
+ SmtpMessage message = new SmtpMessage();
+ message.Data = ResourceHelper.GetMessage("Test1.eml");
+ message.Recipients.Add(new SmtpMessageRecipient(message, new EmailAddress("rec...@re...")));
+ message.ReportedHost = new Host("localhost");
+ message.Sender = new EmailAddress("se...@se...");
+ message.SourceAddress = IPAddress.Loopback;
+
+ this.spoolData.SpoolMessage(message);
+
+ this.spoolData.InitialiseSpoolFilterData();
+ this.spoolData.InitialiseSpoolServiceData();
+
+ IList<SpoolEnvelope> spooledEnvelopes = this.spoolData.GetSpooledEnvelopes();
+
+ Assert.AreEqual(1, spooledEnvelopes.Count, "Spool envelope count == 1");
+ Assert.AreEqual(1, spooledEnvelopes[0].Recipients.Count, "Recipient count == 1");
+ Assert.AreEqual(false, spooledEnvelopes[0].InProgress, "InProgress == false");
+ Assert.AreEqual(false, spooledEnvelopes[0].Recipients[0].InProgress, "R1: InProgress == false");
+ }
+ }
+}
Added: NMail/trunk/NMail.UnitTests/SpoolData/NextDeliveryTest1.cs
===================================================================
--- NMail/trunk/NMail.UnitTests/SpoolData/NextDeliveryTest1.cs (rev 0)
+++ NMail/trunk/NMail.UnitTests/SpoolData/NextDeliveryTest1.cs 2007-03-04 00:35:07 UTC (rev 156)
@@ -0,0 +1,46 @@
+using System;
+using System.Collections.Generic;
+using System.Net;
+using System.Text;
+
+using NUnit.Framework;
+
+using NMail.DataTypes;
+using NMail.DataTypes.Spool;
+using NMail.UnitTests.Resources;
+
+namespace NMail.UnitTests.SpoolData {
+ /// <summary>
+ /// Tests the next delivery attempt time.
+ /// </summary>
+ [TestFixture]
+ public class NextDeliveryTest1 : BaseSpoolDataTest {
+ [Test]
+ public void Test1() {
+
+ DateTime nextAttempt = this.spoolData.GetNextDeliveryAttempt();
+ Assert.AreEqual(DateTime.MaxValue, nextAttempt, "Next delivery attempt == max when no messages.");
+
+ SmtpMessage m1 = new SmtpMessage();
+ m1.Data = ResourceHelper.GetMessage("Test1.eml");
+ m1.Recipients.Add(new SmtpMessageRecipient(m1, new EmailAddress("rec...@re...")));
+ m1.Recipients.Add(new SmtpMessageRecipient(m1, new EmailAddress("rec...@re...")));
+ m1.ReportedHost = new Host("localhost");
+ m1.Sender = new EmailAddress("se...@se...");
+ m1.SourceAddress = IPAddress.Loopback;
+
+ this.spoolData.SpoolMessage(m1);
+
+ SmtpMessage m2 = this.spoolData.GetMessageToFilter();
+
+ Assert.AreEqual(true, m2.InProgress, "InProgress == true");
+ Assert.AreEqual(m1.MessageId, m2.MessageId, "Message Ids match");
+ Assert.AreEqual(2, m2.Recipients.Count, "Recipient count correct.");
+
+ this.spoolData.SetFilterStatus(m2, true);
+
+ nextAttempt = this.spoolData.GetNextDeliveryAttempt();
+ Assert.IsTrue((nextAttempt < DateTime.Now), "Next delivery attempt < DateTime.Now");
+ }
+ }
+}
Added: NMail/trunk/NMail.UnitTests/SpoolData/SpoolMessageTest1.cs
===================================================================
--- NMail/trunk/NMail.UnitTests/SpoolData/SpoolMessageTest1.cs (rev 0)
+++ NMail/trunk/NMail.UnitTests/SpoolData/SpoolMessageTest1.cs 2007-03-04 00:35:07 UTC (rev 156)
@@ -0,0 +1,46 @@
+using System;
+using System.Collections.Generic;
+using System.Net;
+using System.Text;
+
+using NUnit.Framework;
+
+using NMail.DataTypes;
+using NMail.DataTypes.Spool;
+using NMail.UnitTests.Resources;
+
+namespace NMail.UnitTests.SpoolData {
+ /// <summary>
+ /// Tests spooling a message.
+ /// </summary>
+ [TestFixture]
+ public class SpoolMessageTest1 : BaseSpoolDataTest {
+
+ [Test]
+ public void Test1() {
+ SmtpMessage message = new SmtpMessage();
+ message.Data = ResourceHelper.GetMessage("Test1.eml");
+ message.Recipients.Add(new SmtpMessageRecipient(message, new EmailAddress("rec...@re...")));
+ message.ReportedHost = new Host("localhost");
+ message.Sender = new EmailAddress("se...@se...");
+ message.SourceAddress = IPAddress.Loopback;
+
+ this.spoolData.SpoolMessage(message);
+
+ IList<SpoolEnvelope> spooledEnvelopes = this.spoolData.GetSpooledEnvelopes();
+
+ Assert.AreEqual(1, spooledEnvelopes.Count, "Spool envelope count == 1");
+ Assert.AreEqual(message.Data.GetEnvelope().From, spooledEnvelopes[0].From, "\"From\"'s match");
+ Assert.AreEqual(message.MessageId, spooledEnvelopes[0].SpoolMessageId, "Message Id match");
+ Assert.AreEqual(false, spooledEnvelopes[0].InProgress, "InProgress == false");
+ Assert.AreEqual(false, spooledEnvelopes[0].Filtered, "Filtered == false");
+ Assert.AreEqual(new EmailAddress("se...@se..."), spooledEnvelopes[0].SmtpSender, "Correct sender address");
+ Assert.AreEqual(new Host("localhost"), spooledEnvelopes[0].ReportedHost, "Correct reported host");
+ Assert.AreEqual(IPAddress.Loopback, spooledEnvelopes[0].SourceAddress, "Correct source address");
+ Assert.AreEqual(1, spooledEnvelopes[0].Recipients.Count, "Recipient count == 1");
+ Assert.AreEqual(new EmailAddress("rec...@re..."), spooledEnvelopes[0].Recipients[0].Address, "Correct recipient address");
+ Assert.AreEqual(0, spooledEnvelopes[0].Recipients[0].DeliveryAttempts, "DeliveryAttempts == 0");
+ Assert.AreEqual(false, spooledEnvelopes[0].Recipients[0].InProgress, "R1: InProgress == false");
+ }
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-02-24 03:55:08
|
Revision: 155
http://svn.sourceforge.net/nmailserver/?rev=155&view=rev
Author: tmyroadctfig
Date: 2007-02-23 19:55:08 -0800 (Fri, 23 Feb 2007)
Log Message:
-----------
Changed the way the next delivery attempt is calculated. Scaled back the default number of failed attempts before a warning is sent. Changed the default maximum time messages will stay in the spool. (Fixes bug #1667639)
Modified Paths:
--------------
NMail/trunk/NMail.MessageRouter/Configuration/MessageRouterConfiguration.cs
NMail/trunk/NMail.MessageRouter/MessageRouter.cs
Modified: NMail/trunk/NMail.MessageRouter/Configuration/MessageRouterConfiguration.cs
===================================================================
--- NMail/trunk/NMail.MessageRouter/Configuration/MessageRouterConfiguration.cs 2007-02-18 02:43:40 UTC (rev 154)
+++ NMail/trunk/NMail.MessageRouter/Configuration/MessageRouterConfiguration.cs 2007-02-24 03:55:08 UTC (rev 155)
@@ -74,7 +74,7 @@
/// <summary>
/// The maximum number of delivery attempts before a message is bounced.
/// </summary>
- [ConfigurationProperty("MaxDeliveryAttempts", DefaultValue = 20)]
+ [ConfigurationProperty("MaxDeliveryAttempts", DefaultValue = 15)]
[IntegerValidator(MinValue = 1, MaxValue = Int32.MaxValue)]
public int MaximumDeliveryAttempts {
get {
@@ -88,7 +88,7 @@
/// <summary>
/// The number of delivery attempts before a message warning message is sent.
/// </summary>
- [ConfigurationProperty("WarnDeliveryAttempts", DefaultValue=10)]
+ [ConfigurationProperty("WarnDeliveryAttempts", DefaultValue=5)]
[IntegerValidator(MinValue=1, MaxValue=Int32.MaxValue)]
public int WarningDeliveryAttempts {
get {
Modified: NMail/trunk/NMail.MessageRouter/MessageRouter.cs
===================================================================
--- NMail/trunk/NMail.MessageRouter/MessageRouter.cs 2007-02-18 02:43:40 UTC (rev 154)
+++ NMail/trunk/NMail.MessageRouter/MessageRouter.cs 2007-02-24 03:55:08 UTC (rev 155)
@@ -237,7 +237,8 @@
/// <param name="deliveryAttempts">The number of delivery attempts so far.</param>
/// <returns>The number of hours to wait.</returns>
public double GetDeliveryDelay(int deliveryAttempts) {
- return ((double)(deliveryAttempts * deliveryAttempts)) / 2.0;
+ // Try again quickly (in 15 minutes), then back off per delivery attempt
+ return 0.25 + (deliveryAttempts - 1) * 0.5;
}
/// <summary>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-02-18 02:43:42
|
Revision: 154
http://svn.sourceforge.net/nmailserver/?rev=154&view=rev
Author: tmyroadctfig
Date: 2007-02-17 18:43:40 -0800 (Sat, 17 Feb 2007)
Log Message:
-----------
Tagged version 1.0.1.
Added Paths:
-----------
NMail/tags/v1.0.1/
Copied: NMail/tags/v1.0.1 (from rev 153, NMail/branches/v1.0.x)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-02-18 02:42:34
|
Revision: 153
http://svn.sourceforge.net/nmailserver/?rev=153&view=rev
Author: tmyroadctfig
Date: 2007-02-17 18:42:30 -0800 (Sat, 17 Feb 2007)
Log Message:
-----------
Some build and version changes. Added ChangeLog.txt.
Modified Paths:
--------------
NMail/branches/v1.0.x/Installer/NMail-Installer.wxs
NMail/branches/v1.0.x/Installer/NMail-installer.build
NMail/branches/v1.0.x/NMail.ImapService/State/ExamineState.cs
NMail/branches/v1.0.x/NMail.PostInstall/PostInstallForm.cs
NMail/branches/v1.0.x/NMail.SetupWizard/NMail.SetupWizard.build
Added Paths:
-----------
NMail/branches/v1.0.x/doc/ChangeLog.txt
Removed Paths:
-------------
NMail/branches/v1.0.x/NMail.LocalStore/Configuration/
Modified: NMail/branches/v1.0.x/Installer/NMail-Installer.wxs
===================================================================
--- NMail/branches/v1.0.x/Installer/NMail-Installer.wxs 2007-02-18 01:53:57 UTC (rev 152)
+++ NMail/branches/v1.0.x/Installer/NMail-Installer.wxs 2007-02-18 02:42:30 UTC (rev 153)
@@ -3,13 +3,13 @@
<Product Id="3EEDBE2D-3E7A-44b1-B4AA-1DDD2EB0068E"
UpgradeCode="01CC30D2-B022-4e6c-A63B-7DD7ACCCCCE2"
- Name="NMail Server 1.0"
+ Name="NMail Server 1.0.1"
Language="1033"
- Version="1.0.0.0"
+ Version="1.0.1.0"
Manufacturer="NMailServer.SourceForge.net">
<Package Id="????????-????-????-????-????????????"
- Description="NMail Server 1.0 Installer."
+ Description="NMail Server 1.0.1 Installer."
InstallerVersion="200"
Compressed="yes" />
@@ -44,7 +44,7 @@
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="NMail" Name="NMail">
- <Directory Id="INSTALLDIR" Name="NMail10" LongName="NMail Server 1.0">
+ <Directory Id="INSTALLDIR" Name="NMail101" LongName="NMail Server 1.0.1">
<!--
==
== Core EXEs
@@ -247,7 +247,7 @@
<Component Id="C_NMail.dll" Guid="0A709B39-711B-46a0-911A-05D12E66BBDD">
<File Id="NMail.dll" Name="NMail.dll" LongName="NMail.dll" DiskId="1" Source="obj\NMail.dll" Vital="yes" />
- <Registry Id='R_NMail' Root='HKLM' Key='Software\NMail\NMail Server 1.0' Name='InstallDirectory' Action='write' Type='string' Value='[INSTALLDIR]' />
+ <Registry Id='R_NMail' Root='HKLM' Key='Software\NMail\NMail Server 1.0.1' Name='InstallDirectory' Action='write' Type='string' Value='[INSTALLDIR]' />
<RemoveFile Id='NMail.log' On='uninstall' Name='NMail.log' LongName='NMail.log' />
</Component>
@@ -366,7 +366,7 @@
</Directory>
<Directory Id="ProgramMenuFolder" Name="PMenu" LongName="Programs">
- <Directory Id="ProgramMenuDir" Name="NMail10" LongName="NMail 1.0" />
+ <Directory Id="ProgramMenuDir" Name="NMail101" LongName="NMail 1.0.1" />
</Directory>
<Directory Id="DesktopFolder" Name="Desktop" />
Modified: NMail/branches/v1.0.x/Installer/NMail-installer.build
===================================================================
--- NMail/branches/v1.0.x/Installer/NMail-installer.build 2007-02-18 01:53:57 UTC (rev 152)
+++ NMail/branches/v1.0.x/Installer/NMail-installer.build 2007-02-18 02:42:30 UTC (rev 153)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<project name="nant" default="package">
<!-- default configuration -->
- <property name="project.config" value="Release" />
+ <property name="project.config" value="Debug" />
<property name="current.build.defines" value="" />
<target name="Debug" description="Packages up a 'debug' build into an installer">
Modified: NMail/branches/v1.0.x/NMail.ImapService/State/ExamineState.cs
===================================================================
--- NMail/branches/v1.0.x/NMail.ImapService/State/ExamineState.cs 2007-02-18 01:53:57 UTC (rev 152)
+++ NMail/branches/v1.0.x/NMail.ImapService/State/ExamineState.cs 2007-02-18 02:42:30 UTC (rev 153)
@@ -509,44 +509,6 @@
messageUids.Remove(removedIds[i]);
}
}
-
- #region Search Command
- public override void ProcessCommand(SearchCommand cmd) {
- // Get a list of Ids for the folder
- List<int> messageUids = LocalStore.GetMessageIds(Session.AuthenticationToken, Session.SelectedFolder);
-
- // Check if there was any messages in the folder
- if (messageUids.Count > 0) {
- // Process each list in the search command
- foreach (SearchItem searchItem in cmd.SearchItems) {
- switch (searchItem.SearchType) {
- case SearchItemType.Uid:
- matchUidSearch((UidSearchItem) searchItem, messageUids);
- break;
- }
- }
- }
-
- // Check if any message Ids matched the search criteria
- if (messageUids.Count > 0) {
- if (!cmd.UidCommand) {
- List<int> messageOffsets = new List<int>();
-
- foreach (int messageUid in messageUids) {
- int messageOffset = LocalStore.GetMessageOffset(Session.AuthenticationToken, messageUid, Session.SelectedFolder);
- messageOffsets.Add(messageOffset);
- }
-
- // Replace the list of offset Ids with
- messageUids = messageOffsets;
- }
-
- QueueResponse(new SearchResponse(messageUids));
- }
-
- QueueResponse(new SimpleResponse(cmd.Tag, ResponseType.Ok, "SEARCH completed."));
- }
#endregion
- #endregion
}
}
Modified: NMail/branches/v1.0.x/NMail.PostInstall/PostInstallForm.cs
===================================================================
--- NMail/branches/v1.0.x/NMail.PostInstall/PostInstallForm.cs 2007-02-18 01:53:57 UTC (rev 152)
+++ NMail/branches/v1.0.x/NMail.PostInstall/PostInstallForm.cs 2007-02-18 02:42:30 UTC (rev 153)
@@ -79,7 +79,7 @@
/// <returns>The install location or null if an error occurs.</returns>
public string GetInstallDirectory() {
string installDirectory = null;
- RegistryKey nmailServerKey = Registry.LocalMachine.OpenSubKey(@"Software\NMail\NMail Server 1.0", false);
+ RegistryKey nmailServerKey = Registry.LocalMachine.OpenSubKey(@"Software\NMail\NMail Server 1.0.1", false);
if (nmailServerKey != null) {
installDirectory = nmailServerKey.GetValue("InstallDirectory") as string;
Modified: NMail/branches/v1.0.x/NMail.SetupWizard/NMail.SetupWizard.build
===================================================================
--- NMail/branches/v1.0.x/NMail.SetupWizard/NMail.SetupWizard.build 2007-02-18 01:53:57 UTC (rev 152)
+++ NMail/branches/v1.0.x/NMail.SetupWizard/NMail.SetupWizard.build 2007-02-18 02:42:30 UTC (rev 153)
@@ -45,6 +45,9 @@
<include name="NMail.SpoolData.MySql.dll"/>
<include name="NMail.SpoolFilter.dll"/>
<include name="NMail.SpoolService.dll"/>
+ <include name="NMail.LocalStore.dll"/>
+ <include name="NMail.LocalStoreData.MySql.dll"/>
+ <include name="NMail.ImapService.dll"/>
</fileset>
</copy>
@@ -63,6 +66,9 @@
<include name="NMail.SpoolData.MySql.dll"/>
<include name="NMail.SpoolFilter.dll"/>
<include name="NMail.SpoolService.dll"/>
+ <include name="NMail.LocalStore.dll"/>
+ <include name="NMail.ImapService.dll"/>
+ <include name="NMail.LocalStoreData.MySql.dll"/>
</references>
</csc>
Added: NMail/branches/v1.0.x/doc/ChangeLog.txt
===================================================================
--- NMail/branches/v1.0.x/doc/ChangeLog.txt (rev 0)
+++ NMail/branches/v1.0.x/doc/ChangeLog.txt 2007-02-18 02:42:30 UTC (rev 153)
@@ -0,0 +1,16 @@
+Fed 2007 - Version 1.0.1
+
+ Defects fixed or addressed
+ --------------------------
+
+ Bug #1607846 - Failed delivery not reported correctly. [fixed]
+ Bug #1607841 - Error parsing MIME message with no preamble. [fixed]
+ Bug #1601681 - Internal date reported as "publicdate". [fixed]
+ Bug #1601133 - No message body for non-MIME message. [fixed]
+ Bug #1601117 - No message body. [fixed]
+
+
+ Other features added
+ --------------------------
+
+ None
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-02-18 01:54:10
|
Revision: 152
http://svn.sourceforge.net/nmailserver/?rev=152&view=rev
Author: tmyroadctfig
Date: 2007-02-17 17:53:57 -0800 (Sat, 17 Feb 2007)
Log Message:
-----------
Applied fixes for defects: 1601117, 1601133, 1601681, 1607841 and 1607846.
Modified Paths:
--------------
NMail/branches/v1.0.x/NMail/Helper/MimeHelper.cs
NMail/branches/v1.0.x/NMail/NMail.build
NMail/branches/v1.0.x/NMail.ImapService/Command/FetchCommand.cs
NMail/branches/v1.0.x/NMail.ImapService/Command/ImapMessageList.cs
NMail/branches/v1.0.x/NMail.ImapService/Command/SearchCommand.cs
NMail/branches/v1.0.x/NMail.ImapService/Response/SearchResponse.cs
NMail/branches/v1.0.x/NMail.ImapService/State/ExamineState.cs
NMail/branches/v1.0.x/NMail.ImapService/State/SelectedState.cs
NMail/branches/v1.0.x/NMail.LocalStore/LocalStore.cs
NMail/branches/v1.0.x/NMail.LocalStoreData.MySql/MySqlLocalStoreData.cs
NMail/branches/v1.0.x/NMail.build
Modified: NMail/branches/v1.0.x/NMail/Helper/MimeHelper.cs
===================================================================
--- NMail/branches/v1.0.x/NMail/Helper/MimeHelper.cs 2007-02-18 01:18:59 UTC (rev 151)
+++ NMail/branches/v1.0.x/NMail/Helper/MimeHelper.cs 2007-02-18 01:53:57 UTC (rev 152)
@@ -57,16 +57,17 @@
preamble = new MessageDataPart(data);
break;
- } else {
+ } else if (boundaryOffset > 0) {
// Extract the preamble
preamble = new MessageDataPart(data.SubString(0, boundaryOffset - Message.Terminator.Length));
+ }
- // Find the end of the boundary line and move to the next block
- int terminatorOffset =
- data.IndexOf(Message.Terminator, boundaryOffset + boundary.Length);
- blockStartOffset = terminatorOffset + Message.Terminator.Length;
- inPreamble = false;
- }
+ // Find the end of the boundary line and move to the next block
+ int terminatorOffset =
+ data.IndexOf(Message.Terminator, boundaryOffset + boundary.Length);
+ blockStartOffset = terminatorOffset + Message.Terminator.Length;
+ inPreamble = false;
+
} else {
boundaryOffset = data.IndexOf(boundary, blockStartOffset);
Modified: NMail/branches/v1.0.x/NMail/NMail.build
===================================================================
--- NMail/branches/v1.0.x/NMail/NMail.build 2007-02-18 01:18:59 UTC (rev 151)
+++ NMail/branches/v1.0.x/NMail/NMail.build 2007-02-18 01:53:57 UTC (rev 152)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<project name="nant" default="build">
<!-- default configuration -->
- <property name="project.config" value="Release" />
+ <property name="project.config" value="Debug" />
<property name="current.build.defines" value="" />
<target name="Debug" description="Perform a 'debug' build">
Modified: NMail/branches/v1.0.x/NMail.ImapService/Command/FetchCommand.cs
===================================================================
--- NMail/branches/v1.0.x/NMail.ImapService/Command/FetchCommand.cs 2007-02-18 01:18:59 UTC (rev 151)
+++ NMail/branches/v1.0.x/NMail.ImapService/Command/FetchCommand.cs 2007-02-18 01:53:57 UTC (rev 152)
@@ -294,7 +294,11 @@
} else if (bodyString == "TEXT") {
this.sectionType = FetchBodySectionType.Text;
- } else {
+ } else if (bodyString == string.Empty) {
+ // No sections specified, default to all
+ this.sectionType = FetchBodySectionType.All;
+
+ } else {
this.sectionType = FetchBodySectionType.Section;
}
Modified: NMail/branches/v1.0.x/NMail.ImapService/Command/ImapMessageList.cs
===================================================================
--- NMail/branches/v1.0.x/NMail.ImapService/Command/ImapMessageList.cs 2007-02-18 01:18:59 UTC (rev 151)
+++ NMail/branches/v1.0.x/NMail.ImapService/Command/ImapMessageList.cs 2007-02-18 01:53:57 UTC (rev 152)
@@ -16,39 +16,23 @@
*/
using System;
-using System.Collections;
+using System.Collections.Generic;
namespace NMail.ImapService.Command {
/// <summary>
/// Represents a list of messages to process in an IMAP command.
/// </summary>
- public class ImapMessageList {
+ public class ImapMessageList : List<ImapMessageListItem> {
/// <summary>
- /// Internal storage for the message list.
- /// </summary>
- private ArrayList list;
-
- /// <summary>
/// Creates a new list from the given string.
/// </summary>
/// <param name="messageList">The IMAP message list to parse.</param>
public ImapMessageList(string messageList) {
- this.list = new ArrayList();
-
string[] listParts = messageList.Split(',');
foreach (string part in listParts) {
- this.list.Add(new ImapMessageListItem(part));
+ this.Add(new ImapMessageListItem(part));
}
}
-
- /// <summary>
- /// Returns the list of messages to retieve data for.
- /// </summary>
- public ImapMessageListItem[] ImapMessageListItem {
- get {
- return (ImapMessageListItem[]) this.list.ToArray(typeof(ImapMessageListItem));
- }
- }
}
#region ImapMessageListItemType
@@ -103,6 +87,27 @@
}
}
+ /// <summary>
+ /// Checks if an item number matches this list item.
+ /// </summary>
+ /// <param name="itemNumber">The number to check.</param>
+ /// <returns>True if the number matches.</returns>
+ public bool Matches(int itemNumber) {
+ switch (this.itemType) {
+ case ImapMessageListItemType.Single:
+ return (itemNumber == this.start);
+
+ case ImapMessageListItemType.BoundedRange:
+ return (itemNumber >= this.start && itemNumber <= this.end);
+
+ case ImapMessageListItemType.UnboundedRange:
+ return (itemNumber >= this.start);
+
+ default:
+ throw new ArgumentException("Invalid item list type.");
+ }
+ }
+
private ImapMessageListItemType itemType;
/// <summary>
Modified: NMail/branches/v1.0.x/NMail.ImapService/Command/SearchCommand.cs
===================================================================
--- NMail/branches/v1.0.x/NMail.ImapService/Command/SearchCommand.cs 2007-02-18 01:18:59 UTC (rev 151)
+++ NMail/branches/v1.0.x/NMail.ImapService/Command/SearchCommand.cs 2007-02-18 01:53:57 UTC (rev 152)
@@ -16,21 +16,57 @@
*/
using System;
+using System.Collections.Generic;
-namespace NMail.ImapService.Command
-{
+namespace NMail.ImapService.Command {
/// <summary>
/// Summary description for SearchCommand.
/// </summary>
[CommandToken("SEARCH")]
- public class SearchCommand : AbstractCommand
- {
+ public class SearchCommand : AbstractCommand, IUidCommand {
public override void Create(string tag, string data) {
base.Create(tag, data);
// Parse the arguments
- string[] tokens = GetDataTokens();
+ List<string> tokens = new List<string>(GetDataTokens());
+
+ // Check for charset
+
+ // Parse list of search items
+ while (tokens.Count > 0) {
+ switch (tokens[0].ToUpper()) {
+ case "UID":
+ if (tokens.Count == 1) {
+ throw new ArgumentException("UID search items requires a set of messages.");
+ }
+ this.searchItems.Add(new UidSearchItem(tokens[1]));
+ tokens.RemoveRange(0, 2);
+ break;
+
+ default:
+ throw new ArgumentException("Invalid item in SEARCH list.");
+ }
+ }
}
+
+ List<SearchItem> searchItems = new List<SearchItem>();
+
+ public SearchItem[] SearchItems {
+ get {
+ return this.searchItems.ToArray();
+ }
+ }
+
+ private bool uidCommand;
+
+ public bool UidCommand {
+ get {
+ return this.uidCommand;
+ }
+ set {
+ this.uidCommand = value;
+ }
+ }
}
#region SearchItemType
@@ -117,7 +153,7 @@
/// Messages that don't have the recent flag set.
/// </summary>
Old,
-
+
/// <summary>
/// The message is sent on the given date (ignoring time and timezone).
/// </summary>
@@ -192,7 +228,7 @@
/// Messages without the answered flag.
/// </summary>
Unanswered,
-
+
/// <summary>
/// Messages without the deleted flag.
/// </summary>
@@ -219,4 +255,32 @@
Unseen
}
#endregion
-}
+
+ public class SearchItem {
+
+ protected SearchItemType searchType;
+
+ /// <summary>
+ /// The search type for this item.
+ /// </summary>
+ public SearchItemType SearchType {
+ get { return searchType; }
+ }
+ }
+
+ public class UidSearchItem : SearchItem {
+ public UidSearchItem(string sequenceSet) {
+ this.searchType = SearchItemType.Uid;
+
+ this.messageList = new ImapMessageList(sequenceSet);
+ }
+
+ ImapMessageList messageList;
+
+ public ImapMessageList MessageList {
+ get {
+ return this.messageList;
+ }
+ }
+ }
+}
\ No newline at end of file
Modified: NMail/branches/v1.0.x/NMail.ImapService/Response/SearchResponse.cs
===================================================================
--- NMail/branches/v1.0.x/NMail.ImapService/Response/SearchResponse.cs 2007-02-18 01:18:59 UTC (rev 151)
+++ NMail/branches/v1.0.x/NMail.ImapService/Response/SearchResponse.cs 2007-02-18 01:53:57 UTC (rev 152)
@@ -16,19 +16,33 @@
*/
using System;
+using System.Collections.Generic;
+using System.Text;
-namespace NMail.ImapService.Response
-{
+namespace NMail.ImapService.Response {
/// <summary>
- /// Summary description for SearchResponse.
+ /// The response to a search command.
/// </summary>
- public class SearchResponse
- {
- public SearchResponse()
- {
- //
- // TODO: Add constructor logic here
- //
+ public class SearchResponse : AbstractResponse {
+ protected List<int> messageIds;
+
+ /// <summary>
+ /// Creates a new search response with the given list of message Ids.
+ /// </summary>
+ /// <param name="messageIds">The list of message Ids that match the search criteria.</param>
+ public SearchResponse(List<int> messageIds) {
+ this.messageIds = messageIds;
}
+
+ public override void WriteResponse(ImapServiceConnection cnn) {
+ StringBuilder messageList = new StringBuilder();
+
+ foreach (int messageId in this.messageIds) {
+ messageList.Append(messageId);
+ messageList.Append(" ");
+ }
+
+ cnn.WriteLine("* SEARCH {0}", messageList.ToString());
+ }
}
}
Modified: NMail/branches/v1.0.x/NMail.ImapService/State/ExamineState.cs
===================================================================
--- NMail/branches/v1.0.x/NMail.ImapService/State/ExamineState.cs 2007-02-18 01:18:59 UTC (rev 151)
+++ NMail/branches/v1.0.x/NMail.ImapService/State/ExamineState.cs 2007-02-18 01:53:57 UTC (rev 152)
@@ -16,6 +16,7 @@
*/
using System;
+using System.Collections.Generic;
using System.Text;
using NMail.DataTypes;
@@ -38,8 +39,6 @@
}
}
- // TODO: search command
-
#region Process Noop Command
public override void ProcessCommand(NoopCommand cmd) {
sendSelectResponses(this.selectedFolder);
@@ -71,7 +70,7 @@
if (dstFolder != null) {
// Process each list in the copy command
- foreach (ImapMessageListItem listItem in cmd.MessageList.ImapMessageListItem) {
+ foreach (ImapMessageListItem listItem in cmd.MessageList) {
if (listItem.ItemType == ImapMessageListItemType.Single) {
// Only a single message in this item
processMessageCopy(listItem.Start, cmd.UidCommand, dstFolder);
@@ -231,12 +230,12 @@
}
#endregion
- #region sendpublicDate
- protected virtual void sendpublicDate(FetchResponse response, int messageUid) {
- DateTime? publicDate = LocalStore.GetInternalDate(Session.AuthenticationToken, messageUid, this.selectedFolder);
+ #region sendInternalDate
+ protected virtual void sendInternalDate(FetchResponse response, int messageUid) {
+ DateTime? internalDate = LocalStore.GetInternalDate(Session.AuthenticationToken, messageUid, this.selectedFolder);
- if (publicDate.HasValue) {
- response.AppendResponseItem("publicDATE \"" + publicDate.Value.ToString("r") + "\"");
+ if (internalDate.HasValue) {
+ response.AppendResponseItem("INTERNALDATE \"" + internalDate.Value.ToString("r") + "\"");
}
}
#endregion
@@ -245,7 +244,14 @@
protected virtual void sendBody(FetchResponse response, int messageUid, ref MessageHeaders messageHeaders, FetchBodyItem bodyItem, bool peek) {
string data = "BODY";
- if (bodyItem.SectionType == FetchBodySectionType.HeaderFields) {
+ if (bodyItem.SectionType == FetchBodySectionType.All) {
+ // Get the entire message from the local store
+ Message message = LocalStore.GetMessage(Session.AuthenticationToken, messageUid, this.selectedFolder);
+
+ data += "[] {" + message.Size + "}" + this.Session.Connection.Terminator + message.Data.ToString();
+ response.AppendResponseItem(data);
+
+ } else if (bodyItem.SectionType == FetchBodySectionType.HeaderFields) {
ensureMessageHeaders(messageUid, ref messageHeaders);
sendHeaders(response, bodyItem.HeaderFields, messageHeaders, false);
@@ -348,7 +354,7 @@
switch (dataItem.DataType) {
case FetchDataItemType.All:
sendMessageFlags(response, messageUid);
- sendpublicDate(response, messageUid);
+ sendInternalDate(response, messageUid);
sendMessageSize(response, messageUid);
ensureMessageHeaders(messageUid, ref messageHeaders);
sendEnvelope(response, messageHeaders);
@@ -373,7 +379,7 @@
case FetchDataItemType.Fast:
sendMessageFlags(response, messageUid);
- sendpublicDate(response, messageUid);
+ sendInternalDate(response, messageUid);
sendMessageSize(response, messageUid);
break;
@@ -383,14 +389,14 @@
case FetchDataItemType.Full:
sendMessageFlags(response, messageUid);
- sendpublicDate(response, messageUid);
+ sendInternalDate(response, messageUid);
sendMessageSize(response, messageUid);
ensureMessageHeaders(messageUid, ref messageHeaders);
sendEnvelope(response, messageHeaders);
break;
case FetchDataItemType.InternalDate:
- sendpublicDate(response, messageUid);
+ sendInternalDate(response, messageUid);
break;
case FetchDataItemType.Rfc822:
@@ -423,7 +429,7 @@
#region FetchCommand
public override void ProcessCommand(FetchCommand cmd) {
// Process each list in the fetch command
- foreach (ImapMessageListItem listItem in cmd.MessageList.ImapMessageListItem) {
+ foreach (ImapMessageListItem listItem in cmd.MessageList) {
if (listItem.ItemType == ImapMessageListItemType.Single) {
// Only a single message in this item
processMessageFetch(listItem.Start, cmd.UidCommand, cmd.DataList);
@@ -477,5 +483,70 @@
}
#endregion
#endregion
+
+ #region Process Search Command
+
+ void matchUidSearch(UidSearchItem searchItem, List<int> messageUids) {
+ List<int> removedIds = new List<int>();
+
+ foreach (int messageUid in messageUids) {
+ bool foundMatch = false;
+
+ foreach (ImapMessageListItem item in searchItem.MessageList) {
+ if (item.Matches(messageUid)) {
+ foundMatch = true;
+ break;
+ }
+ }
+
+ if (!foundMatch) {
+ removedIds.Add(messageUid);
+ }
+ }
+
+ // Remove any Ids that don't match
+ for (int i = 0; i < removedIds.Count; i++) {
+ messageUids.Remove(removedIds[i]);
+ }
+ }
+
+ #region Search Command
+ public override void ProcessCommand(SearchCommand cmd) {
+ // Get a list of Ids for the folder
+ List<int> messageUids = LocalStore.GetMessageIds(Session.AuthenticationToken, Session.SelectedFolder);
+
+ // Check if there was any messages in the folder
+ if (messageUids.Count > 0) {
+ // Process each list in the search command
+ foreach (SearchItem searchItem in cmd.SearchItems) {
+ switch (searchItem.SearchType) {
+ case SearchItemType.Uid:
+ matchUidSearch((UidSearchItem) searchItem, messageUids);
+ break;
+ }
+ }
+ }
+
+ // Check if any message Ids matched the search criteria
+ if (messageUids.Count > 0) {
+ if (!cmd.UidCommand) {
+ List<int> messageOffsets = new List<int>();
+
+ foreach (int messageUid in messageUids) {
+ int messageOffset = LocalStore.GetMessageOffset(Session.AuthenticationToken, messageUid, Session.SelectedFolder);
+ messageOffsets.Add(messageOffset);
+ }
+
+ // Replace the list of offset Ids with
+ messageUids = messageOffsets;
+ }
+
+ QueueResponse(new SearchResponse(messageUids));
+ }
+
+ QueueResponse(new SimpleResponse(cmd.Tag, ResponseType.Ok, "SEARCH completed."));
+ }
+ #endregion
+ #endregion
}
}
Modified: NMail/branches/v1.0.x/NMail.ImapService/State/SelectedState.cs
===================================================================
--- NMail/branches/v1.0.x/NMail.ImapService/State/SelectedState.cs 2007-02-18 01:18:59 UTC (rev 151)
+++ NMail/branches/v1.0.x/NMail.ImapService/State/SelectedState.cs 2007-02-18 01:53:57 UTC (rev 152)
@@ -91,7 +91,7 @@
public override void ProcessCommand(StoreCommand cmd) {
// Process each list in the store command
- foreach (ImapMessageListItem listItem in cmd.MessageList.ImapMessageListItem) {
+ foreach (ImapMessageListItem listItem in cmd.MessageList) {
if (listItem.ItemType == ImapMessageListItemType.Single) {
// Only a single message in this item
processMessageStore(listItem.Start, cmd.UidCommand, cmd.Command, cmd.Flags);
Modified: NMail/branches/v1.0.x/NMail.LocalStore/LocalStore.cs
===================================================================
--- NMail/branches/v1.0.x/NMail.LocalStore/LocalStore.cs 2007-02-18 01:18:59 UTC (rev 151)
+++ NMail/branches/v1.0.x/NMail.LocalStore/LocalStore.cs 2007-02-18 01:53:57 UTC (rev 152)
@@ -186,8 +186,8 @@
// Save the message to the store data
LocalStoreData.DeliverMessage(lsd);
} catch (Exception) {
- result.Type = DeliveryResultType.TemporaryError;
- result.Message = "Internal error while delivering message.";
+ deliveryResult.Type = DeliveryResultType.TemporaryError;
+ deliveryResult.Message = "Internal error while delivering message.";
}
}
Modified: NMail/branches/v1.0.x/NMail.LocalStoreData.MySql/MySqlLocalStoreData.cs
===================================================================
--- NMail/branches/v1.0.x/NMail.LocalStoreData.MySql/MySqlLocalStoreData.cs 2007-02-18 01:18:59 UTC (rev 151)
+++ NMail/branches/v1.0.x/NMail.LocalStoreData.MySql/MySqlLocalStoreData.cs 2007-02-18 01:53:57 UTC (rev 152)
@@ -130,10 +130,11 @@
cmd = cnn.CreateCommand();
cmd.Transaction = transaction;
cmd.Connection = cnn;
+
+ // Part 0 is not counted below in GetMessageMimePartCount
cmd.CommandText = "INSERT INTO MessageData (MessageId, Part, Data) " +
- "VALUES (?MessageId, ?Part, ?Data)";
+ "VALUES (?MessageId, 0, ?Data)";
cmd.Parameters.Add("?MessageId", messageId);
- cmd.Parameters.Add("?Part", 0); // Part 0 is not counted below in GetMessageMimePartCount
cmd.Parameters.Add("?Data", message.BodyData.Bytes);
count = cmd.ExecuteNonQuery();
Modified: NMail/branches/v1.0.x/NMail.build
===================================================================
--- NMail/branches/v1.0.x/NMail.build 2007-02-18 01:18:59 UTC (rev 151)
+++ NMail/branches/v1.0.x/NMail.build 2007-02-18 01:53:57 UTC (rev 152)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<project name="nant" default="all">
<!-- default configuration -->
- <property name="project.config" value="Release" />
+ <property name="project.config" value="Debug" />
<property name="current.build.defines" value="" />
<target name="all" decription="Builds all assemblies and the installer." depends="build-Installer" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-02-18 01:18:58
|
Revision: 151
http://svn.sourceforge.net/nmailserver/?rev=151&view=rev
Author: tmyroadctfig
Date: 2007-02-17 17:18:59 -0800 (Sat, 17 Feb 2007)
Log Message:
-----------
Added wiki logo.
Added Paths:
-----------
NMail/trunk/doc/wikilogo.bmp
NMail/trunk/doc/wikilogo.png
Added: NMail/trunk/doc/wikilogo.bmp
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/doc/wikilogo.bmp
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: NMail/trunk/doc/wikilogo.png
===================================================================
(Binary files differ)
Property changes on: NMail/trunk/doc/wikilogo.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-02-18 01:16:33
|
Revision: 150
http://svn.sourceforge.net/nmailserver/?rev=150&view=rev
Author: tmyroadctfig
Date: 2007-02-17 17:16:31 -0800 (Sat, 17 Feb 2007)
Log Message:
-----------
Removed webparts. Further work on attachments.
Modified Paths:
--------------
NMail/trunk/NMail.WebAccess/App_Code/Helper.cs
NMail/trunk/NMail.WebAccess/App_Themes/Default/Default.css
NMail/trunk/NMail.WebAccess/App_Themes/Default/Default.skin
NMail/trunk/NMail.WebAccess/Calendar.aspx
NMail/trunk/NMail.WebAccess/Calendar.aspx.cs
NMail/trunk/NMail.WebAccess/Controls/Mail/Attachment.aspx
NMail/trunk/NMail.WebAccess/Controls/Mail/MailList.ascx
NMail/trunk/NMail.WebAccess/Controls/Mail/MailList.ascx.cs
NMail/trunk/NMail.WebAccess/Controls/Mail/MessageBody.aspx
NMail/trunk/NMail.WebAccess/Controls/Mail/MessageBody.aspx.cs
NMail/trunk/NMail.WebAccess/Controls/Mail/MessageViewer.ascx
NMail/trunk/NMail.WebAccess/Controls/Mail/MessageViewer.ascx.cs
NMail/trunk/NMail.WebAccess/Controls/Mail/SubscribedFolderList.ascx
NMail/trunk/NMail.WebAccess/Controls/Mail/SubscribedFolderList.ascx.cs
NMail/trunk/NMail.WebAccess/Default.aspx.cs
NMail/trunk/NMail.WebAccess/Mail.aspx
NMail/trunk/NMail.WebAccess/Mail.aspx.cs
Added Paths:
-----------
NMail/trunk/NMail.WebAccess/Images/CrystalClear/22x22/mimetypes/
NMail/trunk/NMail.WebAccess/Images/CrystalClear/22x22/mimetypes/message2.png
NMail/trunk/NMail.WebAccess/Images/CrystalClear/32x32/
NMail/trunk/NMail.WebAccess/Images/CrystalClear/32x32/mimetypes/
NMail/trunk/NMail.WebAccess/Images/CrystalClear/32x32/mimetypes/message2.png
Modified: NMail/trunk/NMail.WebAccess/App_Code/Helper.cs
===================================================================
--- NMail/trunk/NMail.WebAccess/App_Code/Helper.cs 2007-02-18 01:08:04 UTC (rev 149)
+++ NMail/trunk/NMail.WebAccess/App_Code/Helper.cs 2007-02-18 01:16:31 UTC (rev 150)
@@ -94,9 +94,14 @@
}
}
- public string GetImageUrlForContentType(MimeContentType contentType, string subType)
+ public static string GetImageUrlForContentType(MimeContentType contentType, string subType)
{
+ string theme = "Default"; // TODO: obtain from current settings.
+ string url = string.Format("{0}/{1}/{2}.png", theme, contentType.ToString().ToLower(), subType);
+
+ // TODO: check if it exists & make non-relative
+ return url;
}
}
}
Modified: NMail/trunk/NMail.WebAccess/App_Themes/Default/Default.css
===================================================================
--- NMail/trunk/NMail.WebAccess/App_Themes/Default/Default.css 2007-02-18 01:08:04 UTC (rev 149)
+++ NMail/trunk/NMail.WebAccess/App_Themes/Default/Default.css 2007-02-18 01:16:31 UTC (rev 150)
@@ -16,6 +16,12 @@
text-decoration: underline;
}
+
+/*
+ *
+ * Login Page Styles
+ *
+ */
.LoginBody
{
font-family: Sans-Serif;
@@ -37,21 +43,53 @@
padding-bottom: 0.5em;
}
-.ViewButton
+/*
+ *
+ * Generic part styles
+ *
+ */
+.PartTitle
{
- background-color: #B8DECF;
- height: 30px;
- vertical-align: text-bottom;
- padding-left: 0.5em;
- padding-right: 0.5em;
- margin: 2px 2px 2px 2px;
+ background-color: #C6EFDF;
+ font-size: large;
+ padding: 5px 10px 5px 10px;
}
+.PartTitleVerb
+{
+ font-size: medium;
+}
+
+.Part
+{
+ background-color: White;
+ padding: 0px 0px 0px 0px;
+}
+
+.Zone
+{
+ margin: 10px 10px 10px 10px;
+ border-right: gainsboro 1px solid;
+ border-top: gainsboro 1px solid;
+ border-left: gainsboro 1px solid;
+ border-bottom: gainsboro 1px solid;
+}
+
+/*
+ *
+ * Subscribed folder list
+ *
+ */
.SubscribedFolderList
{
background-color: White;
}
+.SubscribedFolderListPanel
+{
+ padding: 10px 5px 10px 5px;
+}
+
.SubscribedFolder
{
}
@@ -61,6 +99,11 @@
font-weight: bold;
}
+/*
+ *
+ * Mail list
+ *
+ */
.MailList
{
width: 100%;
@@ -76,32 +119,48 @@
.MailListRow {}
.MailListAlternatingRow {}
-.MailListHeader
+.MailListSelectedItem:hover
{
- background-color: buttonface;
+ background-color: Gray;
}
-.EmptyZone
+.MailListRow:hover
{
- background-image: url('../../Images/Skins/Default/EmptyZone.png');
- background-repeat: no-repeat;
- background-position: center center;
- padding: 0.5em;
+ background-color: Gray;
}
-.WebPartTitle
+.MailListAlternatingRow:hover
{
- background-color: #C6EFDF;
- font-size: large;
+ background-color: Gray;
}
-.WebPartTitleVerb
+.MailListHeader
{
- font-size: medium;
+ background-color: buttonface;
}
-.WebPart
+.MailListPanel
{
- background-color: White;
- padding: 0px 0px 0px 0px;
+ padding: 1px 1px 1px 1px;
+}
+
+/*
+ *
+ * Link button styles
+ *
+ */
+.ViewButton
+{
+ background-color: #B8DECF;
+ height: 30px;
+ vertical-align: text-bottom;
+ padding-left: 0.5em;
+ padding-right: 0.5em;
+ border: solid 1px gainsboro;
+}
+
+.MessageEnvelope
+{
+ border-bottom: solid 1px gray;
+ padding: 5px 5px 5px 5px;
}
\ No newline at end of file
Modified: NMail/trunk/NMail.WebAccess/App_Themes/Default/Default.skin
===================================================================
--- NMail/trunk/NMail.WebAccess/App_Themes/Default/Default.skin 2007-02-18 01:08:04 UTC (rev 149)
+++ NMail/trunk/NMail.WebAccess/App_Themes/Default/Default.skin 2007-02-18 01:16:31 UTC (rev 150)
@@ -16,12 +16,16 @@
--%>
<%@ Register Src="~/Controls/Mail/SubscribedFolderList.ascx" TagName="SubscribedFolderList" TagPrefix="uc2" %>
+<%@ Register Namespace="NMail.WebAccess" TagPrefix="nmwa" %>
-
<asp:Image runat="server" SkinId="LoginBanner" ImageUrl="~/Images/Skins/Default/LoginBanner.jpg" />
<asp:Image runat="server" SkinId="MailButtonImage" ImageUrl="~/Images/Crystal/22x22/actions/mail_generic.png" />
<asp:Image runat="server" SkinId="CalendarButtonImage" ImageUrl="~/Images/CrystalClear/22x22/apps/cal.png" />
<asp:Image runat="server" SkinId="LogoutButtonImage" ImageUrl="~/Images/CrystalClear/22x22/actions/exit.png" />
+<asp:Image runat="server" SkinID="MailListIcon" ImageUrl="~/Images/CrystalClear/22x22/filesystems/folder_grey.png" />
+<asp:Image runat="Server" SkinID="EnvelopeIcon" ImageUrl="~/Images/CrystalClear/22x22/mimetypes/message2.png" />
-<uc2:SubscribedFolderList runat="server" SkinID="FolderList" TitleIconImageUrl="~/Images/CrystalClear/22x22/filesystems/folder_grey.png" FolderImageUrl="~/Images/CrystalClear/16x16/filesystems/folder_grey.png" />
\ No newline at end of file
+<uc2:SubscribedFolderList runat="server" SkinID="FolderList" TitleIconImageUrl="~/Images/CrystalClear/22x22/filesystems/folder_grey.png" FolderImageUrl="~/Images/CrystalClear/16x16/filesystems/folder_grey.png" />
+
+<nmwa:RowClickableGridView runat="server" SkinId="MailList" BorderColor="gainsboro" />
\ No newline at end of file
Modified: NMail/trunk/NMail.WebAccess/Calendar.aspx
===================================================================
--- NMail/trunk/NMail.WebAccess/Calendar.aspx 2007-02-18 01:08:04 UTC (rev 149)
+++ NMail/trunk/NMail.WebAccess/Calendar.aspx 2007-02-18 01:16:31 UTC (rev 150)
@@ -1,49 +1,31 @@
-<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
+<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Calendar.aspx.cs" Inherits="Calendar" %>
<%@ Register Src="Controls/LinkButtonList.ascx" TagName="LinkButtonList" TagPrefix="uc1" %>
+<%@ Register Src="Controls/Calendar/Calendar.ascx" TagName="Calendar" TagPrefix="uc2" %>
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
- <title>Untitled Page</title>
+ <title>NMail WebAccess - Calendar</title>
</head>
<body>
<form id="form1" runat="server">
- <asp:WebPartManager ID="WebPartManager" runat="server" />
<table width="100%" border="0">
<tr>
- <td rowspan="3" valign="top">
- <asp:WebPartZone ID="LeftZone" runat="server">
- <ZoneTemplate>
- <uc1:LinkButtonList ID="ViewList" runat="server" />
- </ZoneTemplate>
- </asp:WebPartZone>
+ <td valign="top" width="20%">
+ <div class="Zone">
+ <uc1:LinkButtonList ID="ViewList" runat="server" />
+ </div>
</td>
- <td valign="top">
- <asp:WebPartZone ID="TopZone" runat="server" LayoutOrientation="Horizontal">
- </asp:WebPartZone>
+ <td valign="top" width="80%">
+ <div class="Zone">
+ <uc2:Calendar ID="Calendar1" runat="server" />
+ </div>
</td>
- <td rowspan="3" valign="top">
- <asp:WebPartZone ID="RightZone" runat="server">
- <ZoneTemplate>
- </ZoneTemplate>
- </asp:WebPartZone>
- </td>
</tr>
- <tr>
- <td valign="top">
- <asp:WebPartZone ID="CenterZone" runat="server" LayoutOrientation="Horizontal">
- </asp:WebPartZone>
- </td>
- </tr>
- <tr>
- <td valign="top">
- <asp:WebPartZone ID="BottomZone" runat="server" LayoutOrientation="Horizontal">
- </asp:WebPartZone>
- </td>
- </tr>
</table>
</form>
</body>
Modified: NMail/trunk/NMail.WebAccess/Calendar.aspx.cs
===================================================================
--- NMail/trunk/NMail.WebAccess/Calendar.aspx.cs 2007-02-18 01:08:04 UTC (rev 149)
+++ NMail/trunk/NMail.WebAccess/Calendar.aspx.cs 2007-02-18 01:16:31 UTC (rev 150)
@@ -2,6 +2,7 @@
using System.Data;
using System.Configuration;
using System.Collections;
+using System.Collections.Generic;
using System.Web;
using System.Web.Security;
using System.Web.UI;
@@ -13,6 +14,23 @@
{
protected void Page_Load(object sender, EventArgs e)
{
+ // Setup the view list
+ List<LinkButtonListItem> viewItems = new List<LinkButtonListItem>();
+ viewItems.Add(new LinkButtonListItem(" Mail", "ViewButton", "MailButtonImage", new EventHandler(ShowMailView_Clicked)));
+ viewItems.Add(new LinkButtonListItem(" Logout", "ViewButton", "LogoutButtonImage", new EventHandler(Logout_Clicked)));
- }
+ this.ViewList.SetListItems(viewItems);
+ }
+
+ protected void ShowMailView_Clicked(object sender, EventArgs ea)
+ {
+ Response.Redirect("Mail.aspx");
+ }
+
+ protected void Logout_Clicked(object sender, EventArgs ea)
+ {
+ Session.Abandon();
+ FormsAuthentication.SignOut();
+ FormsAuthentication.RedirectToLoginPage();
+ }
}
Modified: NMail/trunk/NMail.WebAccess/Controls/Mail/Attachment.aspx
===================================================================
--- NMail/trunk/NMail.WebAccess/Controls/Mail/Attachment.aspx 2007-02-18 01:08:04 UTC (rev 149)
+++ NMail/trunk/NMail.WebAccess/Controls/Mail/Attachment.aspx 2007-02-18 01:16:31 UTC (rev 150)
@@ -16,3 +16,6 @@
--%>
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Attachment.aspx.cs" Inherits="Controls_Mail_Attachment" %>
+<html runat="server">
+ <body></body>
+</html>
\ No newline at end of file
Modified: NMail/trunk/NMail.WebAccess/Controls/Mail/MailList.ascx
===================================================================
--- NMail/trunk/NMail.WebAccess/Controls/Mail/MailList.ascx 2007-02-18 01:08:04 UTC (rev 149)
+++ NMail/trunk/NMail.WebAccess/Controls/Mail/MailList.ascx 2007-02-18 01:16:31 UTC (rev 150)
@@ -19,46 +19,56 @@
<%@ Register Namespace="NMail.WebAccess" TagPrefix="nmwa" %>
-<!-- The mail grid view for the mail list -->
-<nmwa:RowClickableGridView
- SkinID="MailList"
- AutoGenerateColumns="false"
- ID="MailListGridView"
- runat="server"
- HeaderStyle-CssClass="MailListHeader"
- RowStyle-CssClass="MailListRow"
- AlternatingRowStyle-CssClass="MailListAlternatingRow"
- SelectedRowStyle-CssClass="MailListSelectedItem"
- CssClass="MailList"
- Width="100%"
- OnSelectedIndexChanged="MailList_OnSelectedIndexChanged"
- DataKeyNames="Key">
+<div class="SubscribedFolderList">
+ <div class="PartTitle">
+ <!-- The title -->
+ <asp:Image ID="TitleImage" runat="server" SkinID="MailListIcon" />
+ <asp:Label ID="TitleLable" runat="server" Text="Folder" />
+ </div>
- <Columns>
- <asp:TemplateField HeaderText="From">
- <ItemTemplate>
- <%# NMail.WebAccess.HtmlEscaper.EscapeAll(Eval("Value.From")) %>
- </ItemTemplate>
- </asp:TemplateField>
-
- <asp:TemplateField HeaderText="Subject">
- <ItemTemplate>
- <%# NMail.WebAccess.HtmlEscaper.EscapeAll(Eval("Value.Subject")) %>
- </ItemTemplate>
- </asp:TemplateField>
-
- <asp:TemplateField HeaderText="Date">
- <ItemTemplate>
- <%# NMail.WebAccess.Helper.GetDate((string) Eval("Value.Date")) %>
- </ItemTemplate>
- </asp:TemplateField>
- </Columns>
-
- <EmptyDataTemplate>
- This folder does not contain any messages.
- </EmptyDataTemplate>
- <RowStyle CssClass="MailListRow" />
- <SelectedRowStyle CssClass="MailListSelectedItem" />
- <HeaderStyle CssClass="MailListHeader" />
- <AlternatingRowStyle CssClass="MailListAlternatingRow" />
-</nmwa:RowClickableGridView>
+ <asp:Panel ID="MailListPanel" runat="server" ScrollBars="auto" CssClass="MailListPanel">
+ <!-- The mail grid view for the mail list -->
+ <nmwa:RowClickableGridView
+ SkinID="MailList"
+ AutoGenerateColumns="false"
+ ID="MailListGridView"
+ runat="server"
+ HeaderStyle-CssClass="MailListHeader"
+ RowStyle-CssClass="MailListRow"
+ AlternatingRowStyle-CssClass="MailListAlternatingRow"
+ SelectedRowStyle-CssClass="MailListSelectedItem"
+ CssClass="MailList"
+ Width="100%"
+ OnSelectedIndexChanged="MailList_OnSelectedIndexChanged"
+ DataKeyNames="Key">
+
+ <Columns>
+ <asp:TemplateField HeaderText="From">
+ <ItemTemplate>
+ <%# NMail.WebAccess.HtmlEscaper.EscapeAll(Eval("Value.From")) %>
+ </ItemTemplate>
+ </asp:TemplateField>
+
+ <asp:TemplateField HeaderText="Subject">
+ <ItemTemplate>
+ <%# NMail.WebAccess.HtmlEscaper.EscapeAll(Eval("Value.Subject")) %>
+ </ItemTemplate>
+ </asp:TemplateField>
+
+ <asp:TemplateField HeaderText="Date">
+ <ItemTemplate>
+ <%# NMail.WebAccess.Helper.GetDate((string) Eval("Value.Date")) %>
+ </ItemTemplate>
+ </asp:TemplateField>
+ </Columns>
+
+ <EmptyDataTemplate>
+ This folder does not contain any messages.
+ </EmptyDataTemplate>
+ <RowStyle CssClass="MailListRow" />
+ <SelectedRowStyle CssClass="MailListSelectedItem" />
+ <HeaderStyle CssClass="MailListHeader" />
+ <AlternatingRowStyle CssClass="MailListAlternatingRow" />
+ </nmwa:RowClickableGridView>
+ </asp:Panel>
+</div>
\ No newline at end of file
Modified: NMail/trunk/NMail.WebAccess/Controls/Mail/MailList.ascx.cs
===================================================================
--- NMail/trunk/NMail.WebAccess/Controls/Mail/MailList.ascx.cs 2007-02-18 01:08:04 UTC (rev 149)
+++ NMail/trunk/NMail.WebAccess/Controls/Mail/MailList.ascx.cs 2007-02-18 01:16:31 UTC (rev 150)
@@ -25,7 +25,6 @@
using System.Web.UI;
using System.Web.UI.Design;
using System.Web.UI.WebControls;
-using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using NMail.WebAccess;
@@ -35,7 +34,7 @@
/// </summary>
[Designer(typeof(ControlDesigner))]
[Themeable(true)]
-public partial class Controls_Mail_MailList : System.Web.UI.UserControl, IWebPart
+public partial class Controls_Mail_MailList : System.Web.UI.UserControl
{
protected void Page_Init(object sender, EventArgs e)
{
@@ -50,6 +49,8 @@
this.MailListGridView.DataSource = mailListDataSource;
this.MailListGridView.DataBind();
+
+ this.TitleLable.Text = (this.folderName == null) ? "No folder selected" : this.folderName;
}
protected override object SaveControlState()
@@ -123,80 +124,4 @@
this.selectedMessageChanged -= value;
}
}
-
- #region IWebPart Members
-
- private string catalogIconImageUrl;
-
- public string CatalogIconImageUrl
- {
- get
- {
- return this.catalogIconImageUrl;
- }
- set
- {
- this.catalogIconImageUrl = value;
- }
- }
-
- private string description = "Displays the list of messages in a folder.";
-
- public string Description
- {
- get
- {
- return this.description;
- }
- set
- {
- this.description = value;
- }
- }
-
- public string Subtitle
- {
- get { return null; }
- }
-
- public string Title
- {
- get
- {
- return (this.folderName == null) ? "No folder selected" : this.folderName;
- }
- set
- {
- throw new NotSupportedException("Can't set the title manually for the mail list.");
- }
- }
-
- private string titleIconImageUrl;
-
- public string TitleIconImageUrl
- {
- get
- {
- return this.titleIconImageUrl;
- }
- set
- {
- this.titleIconImageUrl = value;
- }
- }
-
- private string titleUrl;
-
- public string TitleUrl
- {
- get
- {
- return this.titleUrl;
- }
- set
- {
- this.titleUrl = value;
- }
- }
- #endregion
}
Modified: NMail/trunk/NMail.WebAccess/Controls/Mail/MessageBody.aspx
===================================================================
--- NMail/trunk/NMail.WebAccess/Controls/Mail/MessageBody.aspx 2007-02-18 01:08:04 UTC (rev 149)
+++ NMail/trunk/NMail.WebAccess/Controls/Mail/MessageBody.aspx 2007-02-18 01:16:31 UTC (rev 150)
@@ -35,11 +35,11 @@
<asp:Repeater ID="AttachmentsRepeater" runat="server">
<ItemTemplate>
<tr><td>
- <asp:LinkButton ID="AttachmentDownloadButton" runat="server">
+ <asp:HyperLink ID="AttachmentDownloadLink" runat="server">
<asp:Image ID="AttachmentImage" runat="server" />
<asp:Label ID="AttachmentNameLbl" runat="server" />
<asp:Label ID="SizeLbl" runat="server" />
- </asp:LinkButton>
+ </asp:HyperLink>
</td></tr>
</ItemTemplate>
</asp:Repeater>
Modified: NMail/trunk/NMail.WebAccess/Controls/Mail/MessageBody.aspx.cs
===================================================================
--- NMail/trunk/NMail.WebAccess/Controls/Mail/MessageBody.aspx.cs 2007-02-18 01:08:04 UTC (rev 149)
+++ NMail/trunk/NMail.WebAccess/Controls/Mail/MessageBody.aspx.cs 2007-02-18 01:16:31 UTC (rev 150)
@@ -189,20 +189,23 @@
void attachmentDataSource_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
{
-
e.InputParameters.Add("bodyStructure", this.bodyStructure);
}
void AttachmentsRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
- LinkButton downloadButton = (LinkButton) e.Item.FindControl("AttachmentDownloadButton");
+ HyperLink downloadLink = (HyperLink)e.Item.FindControl("AttachmentDownloadLink");
Image image = (Image) e.Item.FindControl("AttachmentImage");
Label name = (Label) e.Item.FindControl("AttachmentNameLbl");
Label size = (Label) e.Item.FindControl("SizeLbl");
AttachmentDetails item = (AttachmentDetails)e.Item.DataItem;
- if (downloadButton != null && image != null && name != null && size != null && item != null)
+ if (downloadLink != null && image != null && name != null && size != null && item != null)
{
+ string url = string.Format("~/Controls/Mail/Attachment.aspx?MessageId={0}&FolderId={1}&PartNumber={2}",
+ messageId, folderId, item.PartNumber);
+
+ downloadLink.NavigateUrl = this.ResolveUrl(url);
name.Text = item.Name;
size.Text = string.Format("{0} bytes", item.Size);
}
Modified: NMail/trunk/NMail.WebAccess/Controls/Mail/MessageViewer.ascx
===================================================================
--- NMail/trunk/NMail.WebAccess/Controls/Mail/MessageViewer.ascx 2007-02-18 01:08:04 UTC (rev 149)
+++ NMail/trunk/NMail.WebAccess/Controls/Mail/MessageViewer.ascx 2007-02-18 01:16:31 UTC (rev 150)
@@ -1,30 +1,22 @@
-<%--
- * Copyright 2004-2007 Luke Quinane
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
---%>
-
-<%@ Control Language="C#" AutoEventWireup="true" CodeFile="MessageViewer.ascx.cs" Inherits="Controls_Mail_MessageViewer" %>
-
-<!-- A panel for the message details -->
-<asp:Panel ID="EnvelopePanel" runat="server" Visible="false" Width="100%">
- <span class="MessageEnvelope">
- From: <asp:Literal ID="From" runat="server" /><br />
- To: <asp:Literal ID="To" runat="server" /><br />
- Date: <asp:Literal ID="Date" runat="server" /><br />
- </span>
-</asp:Panel>
-
-<%-- A literal used to insert the iframe containing the message body --%>
-<asp:Literal ID="IFrameLiteral" runat="server" />
\ No newline at end of file
+0\x82, *\x86H\x86\xF7
+\xA0\x82,0\x82+\xFD10 + |
|
From: <tmy...@us...> - 2007-02-18 01:08:09
|
Revision: 149
http://svn.sourceforge.net/nmailserver/?rev=149&view=rev
Author: tmyroadctfig
Date: 2007-02-17 17:08:04 -0800 (Sat, 17 Feb 2007)
Log Message:
-----------
Branched v1.0 for defect fixes.
Added Paths:
-----------
NMail/branches/v1.0.x/
Copied: NMail/branches/v1.0.x (from rev 148, NMail/tags/v1.0)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-02-11 07:57:57
|
Revision: 148
http://svn.sourceforge.net/nmailserver/?rev=148&view=rev
Author: tmyroadctfig
Date: 2007-02-10 23:57:55 -0800 (Sat, 10 Feb 2007)
Log Message:
-----------
Work on installer. Added SharpDevelop project.
Modified Paths:
--------------
NMail/trunk/Installer/NMail-Installer.wxs
Added Paths:
-----------
NMail/trunk/Installer/Installer.sln
NMail/trunk/Installer/Installer.wixproj
Added: NMail/trunk/Installer/Installer.sln
===================================================================
--- NMail/trunk/Installer/Installer.sln (rev 0)
+++ NMail/trunk/Installer/Installer.sln 2007-02-11 07:57:55 UTC (rev 148)
@@ -0,0 +1,18 @@
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+# SharpDevelop 2.1.0.2376
+Project("{CFEE4113-1246-4D54-95CB-156813CB8593}") = "Installer", "Installer.wixproj", "{70F2848E-7265-407C-9B2F-642C8504C5D6}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {70F2848E-7265-407C-9B2F-642C8504C5D6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {70F2848E-7265-407C-9B2F-642C8504C5D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {70F2848E-7265-407C-9B2F-642C8504C5D6}.Release|Any CPU.Build.0 = Release|Any CPU
+ {70F2848E-7265-407C-9B2F-642C8504C5D6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ EndGlobalSection
+EndGlobal
Added: NMail/trunk/Installer/Installer.wixproj
===================================================================
--- NMail/trunk/Installer/Installer.wixproj (rev 0)
+++ NMail/trunk/Installer/Installer.wixproj 2007-02-11 07:57:55 UTC (rev 148)
@@ -0,0 +1,31 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{70F2848E-7265-407C-9B2F-642C8504C5D6}</ProjectGuid>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <OutputType>package</OutputType>
+ <RootNamespace>Installer</RootNamespace>
+ <OutputName>Installer</OutputName>
+ <WixToolPath Condition=" '$(WixToolPath)' == '' ">$(SharpDevelopBinPath)\Tools\Wix</WixToolPath>
+ <ToolPath>$(WixToolPath)</ToolPath>
+ <WixMSBuildExtensionsPath Condition=" '$(WixMSBuildExtensionsPath)' == '' ">$(SharpDevelopBinPath)\Tools\Wix</WixMSBuildExtensionsPath>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
+ <OutputPath>bin\Debug\</OutputPath>
+ <DebugSymbols>True</DebugSymbols>
+ <DebugType>Full</DebugType>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
+ <OutputPath>bin\Release\</OutputPath>
+ <DebugSymbols>False</DebugSymbols>
+ <DebugType>None</DebugType>
+ </PropertyGroup>
+ <Import Project="$(WixMSBuildExtensionsPath)\wix.targets" />
+ <ItemGroup>
+ <Compile Include="NMail-Installer.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <WixLibrary Include="WixLib\sca.wixlib" />
+ <WixLibrary Include="WixLib\wixui_featuretree.wixlib" />
+ </ItemGroup>
+</Project>
\ No newline at end of file
Modified: NMail/trunk/Installer/NMail-Installer.wxs
===================================================================
--- NMail/trunk/Installer/NMail-Installer.wxs 2007-02-10 04:25:50 UTC (rev 147)
+++ NMail/trunk/Installer/NMail-Installer.wxs 2007-02-11 07:57:55 UTC (rev 148)
@@ -1,46 +1,25 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2003/01/wi">
-
- <Product Id="3EEDBE2D-3E7A-44b1-B4AA-1DDD2EB0068E"
- UpgradeCode="01CC30D2-B022-4e6c-A63B-7DD7ACCCCCE2"
- Name="NMail Server 1.0"
- Language="1033"
- Version="1.0.0.0"
- Manufacturer="NMailServer.SourceForge.net">
-
- <Package Id="????????-????-????-????-????????????"
- Description="NMail Server 1.0 Installer."
- InstallerVersion="200"
- Compressed="yes" />
-
+ <Product Id="3EEDBE2D-3E7A-44b1-B4AA-1DDD2EB0068E" UpgradeCode="01CC30D2-B022-4e6c-A63B-7DD7ACCCCCE2" Name="NMail Server 1.0" Language="1033" Version="1.0.0.0" Manufacturer="NMailServer.SourceForge.net">
+ <Package Id="????????-????-????-????-????????????" Description="NMail Server 1.0 Installer." InstallerVersion="200" Compressed="yes" />
<Media Id="1" Cabinet="Product.cab" EmbedCab="yes" />
-
<!-- <Upgrade Id="01CC30D2-B022-4e6c-A63B-7DD7ACCCCCE2">
<UpgradeVersion />
</Upgrade> -->
-
-
<!--
==
== Conditions
==
-->
-
<Condition Message="You need to be an administrator to install this product.">
Privileged
</Condition>
-
- <Condition Message="NMail requires the .NET Framework 2.0 or higher.">
- <![CDATA[MsiNetAssemblySupport >= "2.0.50727"]]>
- </Condition>
-
-
+ <Condition Message="NMail requires the .NET Framework 2.0 or higher."><![CDATA[MsiNetAssemblySupport >= "2.0.50727"]]></Condition>
<!--
==
== Directories and components
==
-->
-
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="NMail" Name="NMail">
@@ -50,43 +29,42 @@
== Core EXEs
==
-->
-
<Component Id="C_NMail.Server.Console.exe" Guid="97635B53-74BC-41ad-89C5-AD9EA31D5424">
<File Id="NMail.Server.Console.exe" Name="NMailCon.exe" LongName="NMail.Server.Console.exe" DiskId="1" Source="obj\NMail.Server.Console.exe" Vital="yes">
- <Shortcut Id="startmenuNMailCon" Directory="ProgramMenuDir" Name="NMailCon" LongName="NMail Server Console 1.0" WorkingDirectory="INSTALLDIR" />
+ <Shortcut Id="startmenuNMailCon" Directory="ProgramMenuDir" Name="NMailCon" LongName="NMail Server Console 1.0" WorkingDirectory="INSTALLDIR" />
<Shortcut Id="desktopNMailCon" Directory="DesktopFolder" Name="NMailCon" LongName="NMail Server Console 1.0" WorkingDirectory="INSTALLDIR" />
</File>
</Component>
-
<!--<Component Id="C_NMail.Administration.Console.exe" Guid="79E07802-0DD8-456c-ACD4-B82E5A351BBA">
<File Id="NMail.Administration.Console.exe" Name="NMailSh.exe" LongName="NMailAdminShell.exe" DiskId="1" Source="obj\NMail.Administration.Console.exe" Vital="yes">
<Shortcut Id="startmenuNMailSh" Directory="ProgramMenuDir" Name="NMailSh" LongName="NMail Admin Console 1.0" WorkingDirectory="INSTALLDIR" />
<Shortcut Id="desktopNMailSh" Directory="DesktopFolder" Name="NMailSh" LongName="NMail Admin Console 1.0" WorkingDirectory="INSTALLDIR" />
</File>
</Component>-->
-
<Component Id="C_NMail.Server.Service.exe" Guid="7845A1AD-FF5E-4da9-A70C-924849ADD460">
<File Id="NMail.Server.Service.exe" Name="NMailSrv.exe" LongName="NMail.Server.Service.exe" DiskId="1" Source="obj\NMail.Server.Service.exe" Vital="yes" />
-
- <ServiceInstall Id="S_NMail.Server.Service.exe" DisplayName="NMail Server" Description="The NMail mail service." Name="NMail.Server.Service.exe"
- ErrorControl="normal" Start="demand" Type="ownProcess" Vital="yes" />
+ <ServiceInstall Id="S_NMail.Server.Service.exe" DisplayName="NMail Server" Description="The NMail mail service." Name="NMail.Server.Service.exe" ErrorControl="normal" Start="demand" Type="ownProcess" Vital="yes" />
<!-- Account="NetworkService" -->
</Component>
-
<Component Id="C_NMail.SetupWizard.exe" Guid="EFAD461E-6D96-4b5b-B56C-77D39DF6B233">
<File Id="NMail.SetupWizard.exe" Name="SetupWiz.exe" LongName="NMail.SetupWizard.exe" DiskId="1" Source="obj\NMail.SetupWizard.exe" Vital="yes">
<Shortcut Id="startmenuNMailSetup" Directory="ProgramMenuDir" Name="SetupWiz" LongName="NMail Setup Wizard" WorkingDirectory="INSTALLDIR" />
- </File>
+ </File>
</Component>
-
-
<!--
==
== Administration Webpage
==
-->
+ <Directory Id="D_NMail.Administration.Web" Name="NMAILA_1.COM" LongName="NMail.Administration.Web">
- <Directory Id="D_NMail.Administration.Web" Name="NMAILA_1.COM" LongName="NMail.Administration.Web">
+ <Component Id="C_WebAdminVirtualDir" Guid="D793585B-2BF2-42c3-8C7C-2185ED579048">
+ <WebSite Id="Ws_WebAdminDefault" Description="Default Web Site" Directory="D_NMail.Administration.Web">
+ <WebAddress Id="WA_NMailWebAdmin" Port="443" />
+ </WebSite>
+ <WebVirtualDir Id="Wvd_NMailWebAdmin" Alias="NMailWebAdmin" Directory="D_NMail.Administration.Web" WebSite="Ws_WebAdminDefault" />
+ </Component>
+
<Component Id="component0" DiskId="1" Guid="1BC3A682-453C-4a9d-8505-C683C88B18EC">
<File Id="file0" Name="CREATE_1.ASP" LongName="CreateFolder.aspx" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\CreateFolder.aspx" />
</Component>
@@ -162,8 +140,8 @@
<File Id="file56" Name="APP_WE_4.DLL" LongName="App_Web_tasklist.ascx.cdcab7d2.dll" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\bin\App_Web_tasklist.ascx.cdcab7d2.dll" />
<File Id="file57" Name="APP_WE_5.DLL" LongName="App_Web_setpasswordpanel.ascx.cdcab7d2.dll" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\bin\App_Web_setpasswordpanel.ascx.cdcab7d2.dll" />
<File Id="file58" Name="APP_WE_6.DLL" LongName="App_Web_spooldetails.aspx.cdcab7d2.dll" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\bin\App_Web_spooldetails.aspx.cdcab7d2.dll" />
- <File Id="file59" Name="NMAILL_1.DLL" LongName="NMail.LocalStoreData.MySql.dll" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\bin\NMail.LocalStoreData.MySql.dll" />
- </Component>
+ <File Id="file59" Name="NMAILL_1.DLL" LongName="NMail.LocalStoreData.MySql.dll" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\bin\NMail.LocalStoreData.MySql.dll" />
+ </Component>
</Directory>
<Directory Id="directory2" Name="Images">
<Component Id="component24" DiskId="1" Guid="4FDC7813-EFB1-4d67-AAE1-059F12D28124">
@@ -208,7 +186,6 @@
</Component>
</Directory>
</Directory>
-
<Directory Id="D_App_Themes" Name="AppTheme" LongName="App_Themes">
<Directory Id="D_Default" Name="Default">
<Component Id="component37" DiskId="1" Guid="FD0DED72-FFA7-4f3d-8640-1592535663B9">
@@ -220,201 +197,237 @@
</Directory>
</Directory>
</Directory>
-
- <!-- <Component Id="C_VirtualWebDir" Guid="45A1A00F-7CAB-462f-A361-18566149FEBF">
- <WebVirtualDir Id="WebVirtualDir" Alias="NMailAdmin" Directory="D_NMail.Administration.Web" WebSite="DefaultWebSite">
- <WebApplication Id="WebApplication" Name="NMailAdmin" />
- </WebVirtualDir>
-
- <WebSite Id="DefaultWebSite" Description="Default Web Site" >
- <WebAddress Id="AllUnassigned" Port="443" Secure="yes"/>
- </WebSite>
- </Component> -->
-
<!--
==
== Core DLLs
==
-->
-
<Component Id="C_MonoPrivileges.dll" Guid="5FD5E923-DE25-41b7-B7A1-3F2CA63C80C0">
<File Id="MonoPrivileges.dll" Name="MonoPriv.dll" LongName="MonoPrivileges.dll" DiskId="1" Source="obj\MonoPrivileges.dll" Vital="yes" />
</Component>
-
<Component Id="C_NDns.dll" Guid="82804E40-282C-447d-8947-C0D4AB4C2C58">
<File Id="NDns.dll" Name="NDns.dll" LongName="NDns.dll" DiskId="1" Source="obj\NDns.dll" Vital="yes" />
</Component>
-
<Component Id="C_NMail.dll" Guid="0A709B39-711B-46a0-911A-05D12E66BBDD">
<File Id="NMail.dll" Name="NMail.dll" LongName="NMail.dll" DiskId="1" Source="obj\NMail.dll" Vital="yes" />
- <Registry Id='R_NMail' Root='HKLM' Key='Software\NMail\NMail Server 1.0' Name='InstallDirectory' Action='write' Type='string' Value='[INSTALLDIR]' />
- <RemoveFile Id='NMail.log' On='uninstall' Name='NMail.log' LongName='NMail.log' />
+ <Registry Id="R_NMail" Root="HKLM" Key="Software\NMail\NMail Server 1.0" Name="InstallDirectory" Action="write" Type="string" Value="[INSTALLDIR]" />
+ <RemoveFile Id="NMail.log" On="uninstall" Name="NMail.log" LongName="NMail.log" />
</Component>
-
<Component Id="C_NMail.DnsClient.dll" Guid="527A7514-6746-4ead-9E0C-60986478FB6A">
<File Id="NMail.DnsClient.dll" Name="NMDnsCli.dll" LongName="NMail.DnsClient.dll" DiskId="1" Source="obj\NMail.DnsClient.dll" Vital="yes" />
</Component>
-
<Component Id="C_NMail.ImapService.dll" Guid="8041F9D6-B993-4253-9C2A-A0AE09E62859">
<File Id="NMail.ImapService.dll" Name="NMImapSv.dll" LongName="NMail.ImapService.dll" DiskId="1" Source="obj\NMail.ImapService.dll" Vital="yes" />
</Component>
-
<Component Id="C_NMail.LocalStore.dll" Guid="CA3463F0-4D5E-4f72-96F9-F62A98A26174">
<File Id="NMail.LocalStore.dll" Name="NMLocStr.dll" LongName="NMail.LocalStore.dll" DiskId="1" Source="obj\NMail.LocalStore.dll" Vital="yes" />
</Component>
-
<Component Id="C_NMail.LocalStoreData.MySql.dll" Guid="D087584C-22EE-4f39-A155-8829CC9A50F2">
<File Id="NMail.LocalStoreData.MySql.dll" Name="NMLSDMyS.dll" LongName="NMail.LocalStoreData.MySql.dll" DiskId="1" Source="obj\NMail.LocalStoreData.MySql.dll" Vital="yes" />
</Component>
-
<Component Id="C_NMail.MessageRouter.dll" Guid="C36EA920-EAE7-45dc-8391-FBCB0D6972A7">
<File Id="NMail.MessageRouter.dll" Name="NMMsgRtr.dll" LongName="NMail.MessageRouter.dll" DiskId="1" Source="obj\NMail.MessageRouter.dll" Vital="yes" />
</Component>
-
<Component Id="C_NMail.Server.dll" Guid="1A4C73A3-D06B-44a2-A9C2-8719408939C5">
<File Id="NMail.Server.dll" Name="NMServer.dll" LongName="NMail.Server.dll" DiskId="1" Source="obj\NMail.Server.dll" Vital="yes" />
</Component>
-
<Component Id="C_NMail.SmtpClient.dll" Guid="3AB55EB5-A2B3-4958-9CD5-0FA8B06057E7">
<File Id="NMail.SmtpClient.dll" Name="NMSmtpCl.dll" LongName="NMail.SmtpClient.dll" DiskId="1" Source="obj\NMail.SmtpClient.dll" Vital="yes" />
</Component>
-
<Component Id="C_NMail.SmtpService.dll" Guid="D029379E-7185-4845-B3BB-F94DCCC716BF">
<File Id="NMail.SmtpService.dll" Name="NMSmtpSv.dll" LongName="NMail.SmtpService.dll" DiskId="1" Source="obj\NMail.SmtpService.dll" Vital="yes" />
</Component>
-
<Component Id="C_NMail.SpoolData.MySql.dll" Guid="D9669410-D5DC-4bd5-A982-143562D2212E">
<File Id="NMail.SpoolData.MySql.dll" Name="NMSDMySq.dll" LongName="NMail.SpoolData.MySql.dll" DiskId="1" Source="obj\NMail.SpoolData.MySql.dll" Vital="yes" />
</Component>
-
<Component Id="C_NMail.SpoolFilter.dll" Guid="7BA0896E-8696-43cc-B7C0-5B4061C07EE6">
<File Id="NMail.SpoolFilter.dll" Name="NMSpFilt.dll" LongName="NMail.SpoolFilter.dll" DiskId="1" Source="obj\NMail.SpoolFilter.dll" Vital="yes" />
</Component>
-
<Component Id="C_NMail.SpoolFilter.RegexAddressRewriter.dll" Guid="65B6E59D-C75D-43d3-BD1C-307F6D1850DC">
<File Id="NMail.SpoolFilter.RegexAddressRewriter.dll" Name="NMSFRAR.dll" LongName="NMail.SpoolFilter.RegexAddressRewriter.dll" DiskId="1" Source="obj\NMail.SpoolFilter.RegexAddressRewriter.dll" Vital="yes" />
</Component>
-
<Component Id="C_NMail.SpoolService.dll" Guid="FE67799F-361B-4b67-9A4B-7F3132D813A4">
<File Id="NMail.SpoolService.dll" Name="NMSplSrv.dll" LongName="NMail.SpoolService.dll" DiskId="1" Source="obj\NMail.SpoolService.dll" Vital="yes" />
</Component>
-
-
<!--
==
== Non-NMail core DLLs
==
-->
-
<Component Id="C_log4net.dll" Guid="4BF36D3D-E8E8-4399-82B5-72C7A8BEA8BB">
<File Id="log4net.dll" Name="log4net.dll" DiskId="1" Source="obj\log4net.dll" Vital="yes" />
</Component>
-
<Component Id="C_Mono.Security.dll" Guid="1C8157ED-655C-472c-8E20-2F20BA4336AB">
<File Id="Mono.Security.dll" Name="MonoSec.dll" LongName="Mono.Security.dll" DiskId="1" Source="obj\Mono.Security.dll" Vital="yes" />
</Component>
-
-
<!--
==
== Other core files
==
-->
-
<Component Id="C_Warning.txt" Guid="15AB16BE-7E35-4fde-9406-F40E6AC1746A">
<File Id="Warning.txt" Name="Warning.txt" LongName="Warning.txt" DiskId="1" Source="obj\Warning.txt" Vital="yes" />
</Component>
-
<Component Id="C_Bounce.txt" Guid="44E462AB-108F-4afa-95C2-F514FB33993A">
<File Id="Bounce.txt" Name="Bounce.txt" LongName="Bounce.txt" DiskId="1" Source="obj\Bounce.txt" Vital="yes" />
</Component>
-
<Component Id="C_NMail.config" Guid="FEB536D0-BB1A-47b9-9C1C-0142A210DD72">
<File Id="NMail.config" Name="NMail.cfg" LongName="NMail.config.Sample" DiskId="1" Source="obj\NMail.config" Vital="yes" />
</Component>
-
<Component Id="C_NMail.pfx" Guid="93D43655-6B2D-4539-850E-9063F20B0E69">
<File Id="NMail.pfx" Name="NMail.pfx" LongName="NMail.pfx" DiskId="1" Source="obj\NMail.pfx" Vital="yes" />
</Component>
-
<Component Id="C_MySqlLocalStore.sql" Guid="5CA6F74D-AC23-45f6-B2B6-93C85E5EC1A7">
<File Id="MySqlLocalStore.sql" Name="MySqlLS.sql" LongName="MySqlLocalStore.sql" DiskId="1" Source="obj\MySqlLocalStore.sql" Vital="yes" />
</Component>
-
<Component Id="C_MySqlSpoolData.sql" Guid="B84D1E6B-D8A5-4ae9-98EB-9C90D6E2A755">
<File Id="MySqlSpoolData.sql" Name="MySqlSD.sql" LongName="MySqlSpoolData.sql" DiskId="1" Source="obj\MySqlSpoolData.sql" Vital="yes" />
</Component>
-
-
<!--
==
== Documentation files
==
-->
<Directory Id="D_Documentation" Name="Doc" LongName="Documentation">
-
<Component Id="C_DevGuide.doc" Guid="B0493012-263F-4d5d-82E6-4BD22E40C2C3">
<File Id="DevGuide.doc" Name="DevGuide.doc" LongName="NMail Developer's Guide.doc" DiskId="1" Source="..\doc\NMail Developer's Guide.doc" Vital="yes">
- <Shortcut Id="startmenuNMailDevG" Directory="ProgramMenuDir" Name="NMailDev" LongName="NMail Developer's Guide" WorkingDirectory="INSTALLDIR" />
+ <Shortcut Id="startmenuNMailDevG" Directory="ProgramMenuDir" Name="NMailDev" LongName="NMail Developer's Guide" WorkingDirectory="INSTALLDIR" />
<Shortcut Id="desktopNMailDevG" Directory="DesktopFolder" Name="NMailDev" LongName="NMail Developer's Guide" WorkingDirectory="INSTALLDIR" />
</File>
</Component>
-
</Directory>
+ <Directory Id="D_NMail.WebAccess" LongName="NMail.WebAccess" Name="NMail.W1">
+ <Component Id="C_NMail.WebAccess" DiskId="1" Guid="811173A5-96EE-4C96-935E-3A7D44E1EB29">
+ <File Id="Calendar.aspx" LongName="Calendar.aspx" Name="CALENDA.ASP" Source="obj\NMail.WebAccess.Compiled\Calendar.aspx" />
+ <File Id="Default.aspx" LongName="Default.aspx" Name="DEFAULT.ASP" Source="obj\NMail.WebAccess.Compiled\Default.aspx" />
+ <File Id="ErrorHandler.aspx" LongName="ErrorHandler.aspx" Name="ERRORHA.ASP" Source="obj\NMail.WebAccess.Compiled\ErrorHandler.aspx" />
+ <File Id="Login.aspx" LongName="Login.aspx" Name="LOGIN.ASP" Source="obj\NMail.WebAccess.Compiled\Login.aspx" />
+ <File Id="Mail.aspx" LongName="Mail.aspx" Name="MAIL.ASP" Source="obj\NMail.WebAccess.Compiled\Mail.aspx" />
+ <File Id="Wa_PrecompiledApp.config" LongName="PrecompiledApp.config" Name="PRECOMP.CON" Source="obj\NMail.WebAccess.Compiled\PrecompiledApp.config" />
+ <File Id="Wa_Web.config" LongName="Web.config" Name="WEB.CON" Source="obj\NMail.WebAccess.Compiled\Web.config" />
+ </Component>
+ <Component Id="C_WebAccessVirtualDir" Guid="5B5A4290-BDC6-4436-8FCC-3E9DB22B3BB1">
+ <WebSite Id="Ws_WebAccessDefault" Description="Default Web Site" Directory="D_NMail.WebAccess">
+ <WebAddress Id="WA_NMailWebAccess" Port="443" />
+ </WebSite>
+ <WebVirtualDir Id="Wvd_NMailWebAccess" Alias="NMailWebAccess" Directory="D_NMail.WebAccess" WebSite="Ws_WebAccessDefault" />
+ </Component>
+ <Directory Id="D_WebAccess_App_Themes" LongName="App_Themes" Name="App_The1">
+ <Directory Id="D_WebAccess_Default" LongName="Default" Name="Default1">
+ <Component Id="C_WebAccess_Default" DiskId="1" Guid="A5639C41-D2E2-49B4-8000-BF088E5B9641">
+ <File Id="Default.css" LongName="Default.css" Name="DEFAULT.CSS" Source="obj\NMail.WebAccess.Compiled\App_Themes\Default\Default.css" />
+ <File Id="Default.skin" LongName="Default.skin" Name="DEFAULT.SKI" Source="obj\NMail.WebAccess.Compiled\App_Themes\Default\Default.skin" />
+ </Component>
+ </Directory>
+ </Directory>
+ <Directory Id="D_WebAccess_bin" LongName="bin" Name="bin1">
+ <Component Id="C_WebAccess_bin" DiskId="1" Guid="35F7E45D-F3CE-4A19-824D-DB6C2BC4F7CC">
+ <File Id="Wa_App_Code.compiled" LongName="App_Code.compiled" Name="APP_COD.COM" Source="obj\NMail.WebAccess.Compiled\bin\App_Code.compiled" />
+ <File Id="Wa_App_Code.dll" LongName="App_Code.dll" Name="APP_COD.DLL" Source="obj\NMail.WebAccess.Compiled\bin\App_Code.dll" />
+ <File Id="Wa_App_global.asax.compiled" LongName="App_global.asax.compiled" Name="APP_GLO.COM" Source="obj\NMail.WebAccess.Compiled\bin\App_global.asax.compiled" />
+ <File Id="Wa_App_global.asax.dll" LongName="App_global.asax.dll" Name="APP_GLO.DLL" Source="obj\NMail.WebAccess.Compiled\bin\App_global.asax.dll" />
+ <File Id="Wa_App_WebReferences.compiled" LongName="App_WebReferences.compiled" Name="APP_WEB.COM" Source="obj\NMail.WebAccess.Compiled\bin\App_WebReferences.compiled" />
+ <File Id="Wa_App_WebReferences.dll" LongName="App_WebReferences.dll" Name="APP_WEB.DLL" Source="obj\NMail.WebAccess.Compiled\bin\App_WebReferences.dll" />
+ <File Id="App_Web_attachment.aspx.efd5552e.dll" LongName="App_Web_attachment.aspx.efd5552e.dll" Name="APP_WEB1.DLL" Source="obj\NMail.WebAccess.Compiled\bin\App_Web_attachment.aspx.efd5552e.dll" />
+ <File Id="App_Web_calendar.ascx.deb5eafa.dll" LongName="App_Web_calendar.ascx.deb5eafa.dll" Name="APP_WEB2.DLL" Source="obj\NMail.WebAccess.Compiled\bin\App_Web_calendar.ascx.deb5eafa.dll" />
+ <File Id="App_Web_calendar.aspx.cdcab7d2.dll" LongName="App_Web_calendar.aspx.cdcab7d2.dll" Name="APP_WEB3.DLL" Source="obj\NMail.WebAccess.Compiled\bin\App_Web_calendar.aspx.cdcab7d2.dll" />
+ <File Id="App_Web_default.aspx.cdcab7d2.dll" LongName="App_Web_default.aspx.cdcab7d2.dll" Name="APP_WEB4.DLL" Source="obj\NMail.WebAccess.Compiled\bin\App_Web_default.aspx.cdcab7d2.dll" />
+ <File Id="App_Web_errorhandler.aspx.cdcab7d2.dll" LongName="App_Web_errorhandler.aspx.cdcab7d2.dll" Name="APP_WEB5.DLL" Source="obj\NMail.WebAccess.Compiled\bin\App_Web_errorhandler.aspx.cdcab7d2.dll" />
+ <File Id="App_Web_linkbuttonlist.ascx.cc671b29.dll" LongName="App_Web_linkbuttonlist.ascx.cc671b29.dll" Name="APP_WEB6.DLL" Source="obj\NMail.WebAccess.Compiled\bin\App_Web_linkbuttonlist.ascx.cc671b29.dll" />
+ <File Id="App_Web_login.aspx.cdcab7d2.dll" LongName="App_Web_login.aspx.cdcab7d2.dll" Name="APP_WEB7.DLL" Source="obj\NMail.WebAccess.Compiled\bin\App_Web_login.aspx.cdcab7d2.dll" />
+ <File Id="App_Web_mail.aspx.cdcab7d2.dll" LongName="App_Web_mail.aspx.cdcab7d2.dll" Name="APP_WEB8.DLL" Source="obj\NMail.WebAccess.Compiled\bin\App_Web_mail.aspx.cdcab7d2.dll" />
+ <File Id="App_Web_maillist.ascx.efd5552e.dll" LongName="App_Web_maillist.ascx.efd5552e.dll" Name="APP_WEB9.DLL" Source="obj\NMail.WebAccess.Compiled\bin\App_Web_maillist.ascx.efd5552e.dll" />
+ <File Id="App_Web_messagebody.aspx.efd5552e.dll" LongName="App_Web_messagebody.aspx.efd5552e.dll" Name="APP_WE10.DLL" Source="obj\NMail.WebAccess.Compiled\bin\App_Web_messagebody.aspx.efd5552e.dll" />
+ <File Id="App_Web_messageviewer.ascx.efd5552e.dll" LongName="App_Web_messageviewer.ascx.efd5552e.dll" Name="APP_WE11.DLL" Source="obj\NMail.WebAccess.Compiled\bin\App_Web_messageviewer.ascx.efd5552e.dll" />
+ <File Id="App_Web_subscribedfolderlist.ascx.efd5552e.dll" LongName="App_Web_subscribedfolderlist.ascx.efd5552e.dll" Name="APP_WE12.DLL" Source="obj\NMail.WebAccess.Compiled\bin\App_Web_subscribedfolderlist.ascx.efd5552e.dll" />
+ <File Id="Wa_log4net.dll" LongName="log4net.dll" Name="LOG4NET.DLL" Source="obj\NMail.WebAccess.Compiled\bin\log4net.dll" />
+ <File Id="MenuPilot.dll" LongName="MenuPilot.dll" Name="MENUPIL.DLL" Source="obj\NMail.WebAccess.Compiled\bin\MenuPilot.dll" />
+ <File Id="Wa_NMail.dll" LongName="NMail.dll" Name="NMAIL.DLL" Source="obj\NMail.WebAccess.Compiled\bin\NMail.dll" />
+ <File Id="Wa_NMail.LocalStore.dll" LongName="NMail.LocalStore.dll" Name="NMAIL.L.DLL" Source="obj\NMail.WebAccess.Compiled\bin\NMail.LocalStore.dll" />
+ </Component>
+ </Directory>
+ <Directory Id="D_WebAccess_Controls" LongName="Controls" Name="Control1">
+ <Component Id="C_WebAccess_Controls" DiskId="1" Guid="392E1076-36CF-4BE8-BB8C-320CE58F64FA">
+ <File Id="LinkButtonList.ascx" LongName="LinkButtonList.ascx" Name="LINKBUT.ASC" Source="obj\NMail.WebAccess.Compiled\Controls\LinkButtonList.ascx" />
+ </Component>
+ <Directory Id="D_WebAccess_Calendar" LongName="Calendar" Name="Calenda1">
+ <Component Id="C_WebAccess_Calendar" DiskId="1" Guid="52BD6F75-4E3A-4B67-832B-383250E5101F">
+ <File Id="Calendar.ascx" LongName="Calendar.ascx" Name="CALENDA.ASC" Source="obj\NMail.WebAccess.Compiled\Controls\Calendar\Calendar.ascx" />
+ </Component>
+ </Directory>
+ <Directory Id="D_WebAccess_Mail" LongName="Mail" Name="Mail1">
+ <Component Id="C_WebAccess_Mail" DiskId="1" Guid="87884506-9C71-4E18-851C-5A631CAC0144">
+ <File Id="Attachment.aspx" LongName="Attachment.aspx" Name="ATTACHM.ASP" Source="obj\NMail.WebAccess.Compiled\Controls\Mail\Attachment.aspx" />
+ <File Id="MailError.aspx" LongName="MailError.aspx" Name="MAILERR.ASP" Source="obj\NMail.WebAccess.Compiled\Controls\Mail\MailError.aspx" />
+ <File Id="MailList.ascx" LongName="MailList.ascx" Name="MAILLIS.ASC" Source="obj\NMail.WebAccess.Compiled\Controls\Mail\MailList.ascx" />
+ <File Id="MessageBody.aspx" LongName="MessageBody.aspx" Name="MESSAGE.ASP" Source="obj\NMail.WebAccess.Compiled\Controls\Mail\MessageBody.aspx" />
+ <File Id="MessageViewer.ascx" LongName="MessageViewer.ascx" Name="MESSAGE.ASC" Source="obj\NMail.WebAccess.Compiled\Controls\Mail\MessageViewer.ascx" />
+ <File Id="SubscribedFolderList.ascx" LongName="SubscribedFolderList.ascx" Name="SUBSCRI.ASC" Source="obj\NMail.WebAccess.Compiled\Controls\Mail\SubscribedFolderList.ascx" />
+ </Component>
+ </Directory>
+ </Directory>
+ </Directory>
+ <Directory Id="D_NMail.RemoteAccessService" LongName="NMail.RemoteAccessService" Name="NMail.R1">
+ <Component Id="C_NMail.RemoteAccessService" DiskId="1" Guid="0F73ACB6-BE68-47B3-9D2F-146663D03C4D">
+ <File Id="PrecompiledApp.config" LongName="PrecompiledApp.config" Name="PRECOMP.CON" Source="obj\NMail.RemoteAccessService.Compiled\PrecompiledApp.config" />
+ <File Id="RemoteAccessService.asmx" LongName="RemoteAccessService.asmx" Name="REMOTEA.ASM" Source="obj\NMail.RemoteAccessService.Compiled\RemoteAccessService.asmx" />
+ <File Id="Web.Config" LongName="Web.Config" Name="WEB.CON" Source="obj\NMail.RemoteAccessService.Compiled\Web.Config" />
+ </Component>
+ <Component Id="C_RemoteAccessVirtualDir" Guid="D28DF432-1F85-4BC5-831C-2A42E6A20AE6">
+ <WebSite Id="Ws_RemoteAccessDefault" Description="Default Web Site" Directory="D_NMail.RemoteAccessService">
+ <WebAddress Id="WA_NMailRemoteAccess" Port="443" />
+ </WebSite>
+ <WebVirtualDir Id="Wvd_NMailRemoteAccess" Alias="NMailRemoteAccess" Directory="D_NMail.RemoteAccessService" WebSite="Ws_RemoteAccessDefault" />
+ </Component>
+ <Directory Id="D_RemoteAccess_bin" LongName="bin" Name="bin1">
+ <Component Id="C_RemoteAccess_bin" DiskId="1" Guid="4D383435-9E64-4F50-8591-0EDE9EF8F558">
+ <File Id="Ra_App_Code.compiled" LongName="App_Code.compiled" Name="APP_COD.COM" Source="obj\NMail.RemoteAccessService.Compiled\bin\App_Code.compiled" />
+ <File Id="Ra_App_Code.dll" LongName="App_Code.dll" Name="APP_COD.DLL" Source="obj\NMail.RemoteAccessService.Compiled\bin\App_Code.dll" />
+ <File Id="Ra_App_global.asax.compiled" LongName="App_global.asax.compiled" Name="APP_GLO.COM" Source="obj\NMail.RemoteAccessService.Compiled\bin\App_global.asax.compiled" />
+ <File Id="Ra_App_global.asax.dll" LongName="App_global.asax.dll" Name="APP_GLO.DLL" Source="obj\NMail.RemoteAccessService.Compiled\bin\App_global.asax.dll" />
+ <File Id="Ra_log4net.dll" LongName="log4net.dll" Name="LOG4NET.DLL" Source="obj\NMail.RemoteAccessService.Compiled\bin\log4net.dll" />
+ <File Id="Ra_NMail.dll" LongName="NMail.dll" Name="NMAIL.DLL" Source="obj\NMail.RemoteAccessService.Compiled\bin\NMail.dll" />
+ <File Id="Ra_NMail.RemoteAccessService.Serializers.dll" LongName="NMail.RemoteAccessService.Serializers.dll" Name="NMAIL.R.DLL" Source="obj\NMail.RemoteAccessService.Compiled\bin\NMail.RemoteAccessService.Serializers.dll" />
+ <File Id="Ra_NMail.Server.dll" LongName="NMail.Server.dll" Name="NMAIL.S.DLL" Source="obj\NMail.RemoteAccessService.Compiled\bin\NMail.Server.dll" />
+ </Component>
+ </Directory>
+ </Directory>
</Directory>
</Directory>
</Directory>
-
<Directory Id="ProgramMenuFolder" Name="PMenu" LongName="Programs">
<Directory Id="ProgramMenuDir" Name="NMail10" LongName="NMail 1.0" />
</Directory>
-
<Directory Id="DesktopFolder" Name="Desktop" />
-
</Directory>
-
-
<!--
==
== Custom actions and related
==
-->
-
<Binary Id="B_NMail.PostInstall.exe" SourceFile="obj\NMail.PostInstall.exe" />
<CustomAction Id="CA_PostInstall" BinaryKey="B_NMail.PostInstall.exe" ExeCommand="" />
<CustomAction Id="CA_FinalUninstall" BinaryKey="B_NMail.PostInstall.exe" ExeCommand="/u" />
-
<InstallExecuteSequence>
<Custom Action="CA_PostInstall" After="InstallFinalize">$C_NMail.dll>2</Custom>
</InstallExecuteSequence>
-
-
<!--
==
== Feature tree
==
-->
-
- <Feature Id="F_Base" Absent="disallow" Title="NMail" Level="1"
- ConfigurableDirectory="INSTALLDIR" Display="expand"
- Description="The components required in a NMail installation.">
-
+ <Feature Id="F_Base" Absent="disallow" Title="NMail" Level="1" ConfigurableDirectory="INSTALLDIR" Display="expand" Description="The components required in a NMail installation.">
<!-- Core DLLs -->
<ComponentRef Id="C_NMail.dll" />
<ComponentRef Id="C_NMail.Server.dll" />
-
<!-- Non-NMail DLLs -->
<ComponentRef Id="C_log4net.dll" />
-
- <Feature Id="F_Server" Display="expand" Title="NMail Server" Level="1"
- Description="The NMail mail server.">
-
+ <Feature Id="F_Server" Display="expand" Title="NMail Server" Level="1" Description="The NMail mail server.">
<!-- NMail Server EXEs -->
<ComponentRef Id="C_NMail.Server.Console.exe" />
<!--<ComponentRef Id="C_NMail.Administration.Console.exe" />-->
<ComponentRef Id="C_NMail.Server.Service.exe" />
<ComponentRef Id="C_NMail.SetupWizard.exe" />
-
<!-- NMail Server DLLs -->
<ComponentRef Id="C_MonoPrivileges.dll" />
<ComponentRef Id="C_NDns.dll" />
@@ -429,10 +442,8 @@
<ComponentRef Id="C_NMail.SpoolFilter.dll" />
<ComponentRef Id="C_NMail.SpoolFilter.RegexAddressRewriter.dll" />
<ComponentRef Id="C_NMail.SpoolService.dll" />
-
<!-- Non-NMail DLLs -->
<ComponentRef Id="C_Mono.Security.dll" />
-
<!-- Other core files -->
<ComponentRef Id="C_Warning.txt" />
<ComponentRef Id="C_Bounce.txt" />
@@ -441,62 +452,75 @@
<ComponentRef Id="C_MySqlLocalStore.sql" />
<ComponentRef Id="C_MySqlSpoolData.sql" />
</Feature>
-
- <Feature Id="F_AdminWebsite" Display="expand" Title="Administration Website" Level="1"
- Description="NMail's ASP.net administration website.">
-
- <!-- <Feature Id="F_SetupIIS" Display="expand" Title="Setup IIS Virtual Directory" Level="1"
- Description="Setups IIS to have a virtual directory for NMail's administration website. Requires IIS.">
- <ComponentRef Id="C_VirtualWebDir"/>
- </Feature> -->
-
+ <Feature Id="F_AdminWebsite" Display="expand" Title="Administration Website" Level="1" Description="NMail's ASP.net administration website.">
+ <Feature Id="F_SetupIIS" Display="expand" Title="Setup IIS WebAdmin Virtual Directory" Level="1"
+ Description="Setups IIS to have a virtual directory for NMail's administration website. Requires IIS.">
+ <ComponentRef Id="C_WebAdminVirtualDir"/>
+ </Feature>
<!-- Admin website files -->
- <ComponentRef Id="component0"/>
- <ComponentRef Id="component1"/>
- <ComponentRef Id="component2"/>
- <ComponentRef Id="component3"/>
- <ComponentRef Id="component4"/>
- <ComponentRef Id="component5"/>
- <ComponentRef Id="component6"/>
- <ComponentRef Id="component7"/>
- <ComponentRef Id="component8"/>
- <ComponentRef Id="component10"/>
- <ComponentRef Id="component11"/>
- <ComponentRef Id="component12"/>
- <ComponentRef Id="component13"/>
- <ComponentRef Id="component14"/>
- <ComponentRef Id="component15"/>
- <ComponentRef Id="component16"/>
- <ComponentRef Id="component24"/>
- <ComponentRef Id="component25"/>
- <ComponentRef Id="component26"/>
- <ComponentRef Id="component27"/>
- <ComponentRef Id="component28"/>
- <ComponentRef Id="component29"/>
- <ComponentRef Id="component30"/>
- <ComponentRef Id="component31"/>
- <ComponentRef Id="component32"/>
- <ComponentRef Id="component33"/>
- <ComponentRef Id="component34"/>
- <ComponentRef Id="component35"/>
- <ComponentRef Id="component36"/>
- <ComponentRef Id="component37"/>
- <ComponentRef Id="component38"/>
- <ComponentRef Id="component39"/>
- <ComponentRef Id="component40"/>
- <ComponentRef Id="component41"/>
+ <ComponentRef Id="component0" />
+ <ComponentRef Id="component1" />
+ <ComponentRef Id="component2" />
+ <ComponentRef Id="component3" />
+ <ComponentRef Id="component4" />
+ <ComponentRef Id="component5" />
+ <ComponentRef Id="component6" />
+ <ComponentRef Id="component7" />
+ <ComponentRef Id="component8" />
+ <ComponentRef Id="component10" />
+ <ComponentRef Id="component11" />
+ <ComponentRef Id="component12" />
+ <ComponentRef Id="component13" />
+ <ComponentRef Id="component14" />
+ <ComponentRef Id="component15" />
+ <ComponentRef Id="component16" />
+ <ComponentRef Id="component24" />
+ <ComponentRef Id="component25" />
+ <ComponentRef Id="component26" />
+ <ComponentRef Id="component27" />
+ <ComponentRef Id="component28" />
+ <ComponentRef Id="component29" />
+ <ComponentRef Id="component30" />
+ <ComponentRef Id="component31" />
+ <ComponentRef Id="component32" />
+ <ComponentRef Id="component33" />
+ <ComponentRef Id="component34" />
+ <ComponentRef Id="component35" />
+ <ComponentRef Id="component36" />
+ <ComponentRef Id="component37" />
+ <ComponentRef Id="component38" />
+ <ComponentRef Id="component39" />
+ <ComponentRef Id="component40" />
+ <ComponentRef Id="component41" />
</Feature>
-
- <Feature Id="F_DeveloperDoc" Display="expand" Title="Developer Documentation" Level="3"
- Description="Documentation for NMail developers.">
-
+ <Feature Id="F_DeveloperDoc" Display="expand" Title="Developer Documentation" Level="3" Description="Documentation for NMail developers.">
<!-- Developer documentation files -->
- <ComponentRef Id="C_DevGuide.doc"/>
+ <ComponentRef Id="C_DevGuide.doc" />
</Feature>
+ <Feature Id="F_RemoteAccess" Display="expand" Title="Remote Access Webservice" Level="1" Description="The remote access webservice allows clients such as the WebAccess website to connect to NMail.">
+ <Feature Id="F_WebAccess" Display="expand" Title="Web Access" Level="1" Description="A rich ASP.net based client for NMail. Provides webmail and access to calendar and other features.">
+ <Feature Id="F_WebAccessVirtualDir" Display="expand" Title="Setup IIS WebAccess Virtual Directory"
+ Description="Setups IIS to have a virtual directory for NMail's WebAccess website. Requires IIS." Level="1">
+ <ComponentRef Id="C_WebAccessVirtualDir" />
+ </Feature>
+ <ComponentRef Id="C_WebAccess_Mail" />
+ <ComponentRef Id="C_WebAccess_Calendar" />
+ <ComponentRef Id="C_WebAccess_Controls" />
+ <ComponentRef Id="C_WebAccess_bin" />
+ <ComponentRef Id="C_WebAccess_Default" />
+ <ComponentRef Id="C_NMail.WebAccess" />
+ </Feature>
+ <ComponentRef Id="C_NMail.RemoteAccessService" />
+ <ComponentRef Id="C_RemoteAccess_bin" />
+
+ <Feature Id="F_RemoteAccessVirtualDir" Display="expand" Title="Setup IIS Remote Access Virtual Directory"
+ Description="Setups IIS to have a virtual directory for NMail's RemoteAccess webservice (required for WebAccess). Requires IIS." Level="1">
+ <ComponentRef Id="C_RemoteAccessVirtualDir" />
+ </Feature>
+ </Feature>
</Feature>
-
<UIRef Id="WixUI" />
-
<Icon Id="MainIcon" SourceFile="NMail.Server.Console.exe" />
+ <UI />
</Product>
-</Wix>
+</Wix>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-02-10 04:25:49
|
Revision: 147
http://svn.sourceforge.net/nmailserver/?rev=147&view=rev
Author: tmyroadctfig
Date: 2007-02-09 20:25:50 -0800 (Fri, 09 Feb 2007)
Log Message:
-----------
Fixed a defect where multi-line headers weren't captured correctly in parsing.
Modified Paths:
--------------
NMail/trunk/NMail/DataTypes/MessageHeaders.cs
Modified: NMail/trunk/NMail/DataTypes/MessageHeaders.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/MessageHeaders.cs 2007-02-10 04:24:29 UTC (rev 146)
+++ NMail/trunk/NMail/DataTypes/MessageHeaders.cs 2007-02-10 04:25:50 UTC (rev 147)
@@ -170,8 +170,7 @@
foreach (string currentLine in lines) {
// Check if the header line starts with whitespace
if (Regex.Match(currentLine, @"^\s+", RegexOptions.Compiled).Success) {
- currentHeader.Replace(Message.Terminator, string.Empty);
- currentHeader += currentLine;
+ currentHeader += Message.Terminator + currentLine;
} else {
if (currentName != string.Empty) {
// Add a header if a previous one has been parsed
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-02-10 04:24:41
|
Revision: 146
http://svn.sourceforge.net/nmailserver/?rev=146&view=rev
Author: tmyroadctfig
Date: 2007-02-09 20:24:29 -0800 (Fri, 09 Feb 2007)
Log Message:
-----------
Fixed a defect that prevented the last token from being added.
Modified Paths:
--------------
NMail/trunk/NMail/Helper/StringTokenizer.cs
Modified: NMail/trunk/NMail/Helper/StringTokenizer.cs
===================================================================
--- NMail/trunk/NMail/Helper/StringTokenizer.cs 2007-02-10 04:17:12 UTC (rev 145)
+++ NMail/trunk/NMail/Helper/StringTokenizer.cs 2007-02-10 04:24:29 UTC (rev 146)
@@ -42,10 +42,8 @@
tokens.Add(input.Substring(index, (newIndex - index)));
index = newIndex + delimiter.Length;
} else {
- if (newIndex != -1) {
- // No more delimiters found, return the end of the string
- tokens.Add(input.Substring(index, (input.Length - index)));
- }
+ // No more delimiters found, return the end of the string
+ tokens.Add(input.Substring(index, (input.Length - index)));
// Stop searching
break;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-02-10 04:17:12
|
Revision: 145
http://svn.sourceforge.net/nmailserver/?rev=145&view=rev
Author: tmyroadctfig
Date: 2007-02-09 20:17:12 -0800 (Fri, 09 Feb 2007)
Log Message:
-----------
Oops, helps if you commit the project file as well ;-)
Modified Paths:
--------------
NMail/trunk/NMail/NMail.csproj
Modified: NMail/trunk/NMail/NMail.csproj
===================================================================
--- NMail/trunk/NMail/NMail.csproj 2007-02-10 04:14:57 UTC (rev 144)
+++ NMail/trunk/NMail/NMail.csproj 2007-02-10 04:17:12 UTC (rev 145)
@@ -131,10 +131,16 @@
<Compile Include="DataTypes\ACLs\StoreFolderPrivilege.cs" />
<Compile Include="DataTypes\ACLs\UserGroupAdminPrivilege.cs" />
<Compile Include="DataTypes\BodyStructure.cs" />
+ <Compile Include="DataTypes\Calendar\Attendee.cs" />
+ <Compile Include="DataTypes\Calendar\CalendarAlarm.cs" />
<Compile Include="DataTypes\Calendar\CalendarEntry.cs" />
<Compile Include="DataTypes\Calendar\CalendarEntryStatus.cs" />
+ <Compile Include="DataTypes\Calendar\CountRecurreneRule.cs" />
+ <Compile Include="DataTypes\Calendar\DateRecurrenceRule.cs" />
<Compile Include="DataTypes\Calendar\EventEntry.cs" />
<Compile Include="DataTypes\Calendar\JournalEntry.cs" />
+ <Compile Include="DataTypes\Calendar\RecurrenceFrequency.cs" />
+ <Compile Include="DataTypes\Calendar\RecurrenceRule.cs" />
<Compile Include="DataTypes\Calendar\ToDoEntry.cs" />
<Compile Include="DataTypes\Classification.cs" />
<Compile Include="DataTypes\LatLong.cs" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-02-10 04:15:06
|
Revision: 144
http://svn.sourceforge.net/nmailserver/?rev=144&view=rev
Author: tmyroadctfig
Date: 2007-02-09 20:14:57 -0800 (Fri, 09 Feb 2007)
Log Message:
-----------
Removed Outlook plugin project.
Modified Paths:
--------------
NMail/trunk/NMail.sln
Removed Paths:
-------------
NMail/trunk/NMail.OutlookPlugin/
Modified: NMail/trunk/NMail.sln
===================================================================
--- NMail/trunk/NMail.sln 2007-02-10 04:08:36 UTC (rev 143)
+++ NMail/trunk/NMail.sln 2007-02-10 04:14:57 UTC (rev 144)
@@ -44,8 +44,6 @@
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NMail.SetupWizard", "NMail.SetupWizard\NMail.SetupWizard.csproj", "{DDE40B82-A5D9-4BE4-997B-C7EF3FFF5EBD}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NMail.OutlookPlugin", "NMail.OutlookPlugin\NMail.OutlookPlugin.csproj", "{9080FAD0-0BD8-4CA2-A645-9F2198C38CFE}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NMail.RemoteAccessService.Serializers", "NMail.RemoteAccessService.Serializers\NMail.RemoteAccessService.Serializers.csproj", "{A54F735E-454A-4C65-8A61-66330AA64678}"
EndProject
Global
@@ -142,10 +140,6 @@
{DDE40B82-A5D9-4BE4-997B-C7EF3FFF5EBD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DDE40B82-A5D9-4BE4-997B-C7EF3FFF5EBD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DDE40B82-A5D9-4BE4-997B-C7EF3FFF5EBD}.Release|Any CPU.Build.0 = Release|Any CPU
- {9080FAD0-0BD8-4CA2-A645-9F2198C38CFE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {9080FAD0-0BD8-4CA2-A645-9F2198C38CFE}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {9080FAD0-0BD8-4CA2-A645-9F2198C38CFE}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {9080FAD0-0BD8-4CA2-A645-9F2198C38CFE}.Release|Any CPU.Build.0 = Release|Any CPU
{A54F735E-454A-4C65-8A61-66330AA64678}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A54F735E-454A-4C65-8A61-66330AA64678}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A54F735E-454A-4C65-8A61-66330AA64678}.Release|Any CPU.ActiveCfg = Release|Any CPU
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-02-10 04:08:35
|
Revision: 143
http://svn.sourceforge.net/nmailserver/?rev=143&view=rev
Author: tmyroadctfig
Date: 2007-02-09 20:08:36 -0800 (Fri, 09 Feb 2007)
Log Message:
-----------
Added some calendar classes.
Modified Paths:
--------------
NMail/trunk/NMail/NMail.csproj
Added Paths:
-----------
NMail/trunk/NMail/DataTypes/Calendar/
NMail/trunk/NMail/DataTypes/Calendar/Attendee.cs
NMail/trunk/NMail/DataTypes/Calendar/CalendarAlarm.cs
NMail/trunk/NMail/DataTypes/Calendar/CalendarEntry.cs
NMail/trunk/NMail/DataTypes/Calendar/CalendarEntryStatus.cs
NMail/trunk/NMail/DataTypes/Calendar/CountRecurreneRule.cs
NMail/trunk/NMail/DataTypes/Calendar/DateRecurrenceRule.cs
NMail/trunk/NMail/DataTypes/Calendar/EventEntry.cs
NMail/trunk/NMail/DataTypes/Calendar/JournalEntry.cs
NMail/trunk/NMail/DataTypes/Calendar/RecurrenceFrequency.cs
NMail/trunk/NMail/DataTypes/Calendar/RecurrenceRule.cs
NMail/trunk/NMail/DataTypes/Calendar/ToDoEntry.cs
NMail/trunk/NMail/DataTypes/Classification.cs
NMail/trunk/NMail/DataTypes/LatLong.cs
NMail/trunk/NMail.WebAccess/Controls/Calendar/
NMail/trunk/NMail.WebAccess/Controls/Calendar/Calendar.ascx
NMail/trunk/NMail.WebAccess/Controls/Calendar/Calendar.ascx.cs
Added: NMail/trunk/NMail/DataTypes/Calendar/Attendee.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/Calendar/Attendee.cs (rev 0)
+++ NMail/trunk/NMail/DataTypes/Calendar/Attendee.cs 2007-02-10 04:08:36 UTC (rev 143)
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2004-2007 Luke Quinane
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace NMail.DataTypes.Calendar {
+ public class Attendee {
+ }
+}
Added: NMail/trunk/NMail/DataTypes/Calendar/CalendarAlarm.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/Calendar/CalendarAlarm.cs (rev 0)
+++ NMail/trunk/NMail/DataTypes/Calendar/CalendarAlarm.cs 2007-02-10 04:08:36 UTC (rev 143)
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2004-2006 Luke Quinane
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace NMail.DataTypes.Calendar {
+ public class CalendarAlarm {
+ // TODO: Description
+ // TODO: Trigger
+ // TODO: DurationAndRepeat?
+ }
+}
Added: NMail/trunk/NMail/DataTypes/Calendar/CalendarEntry.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/Calendar/CalendarEntry.cs (rev 0)
+++ NMail/trunk/NMail/DataTypes/Calendar/CalendarEntry.cs 2007-02-10 04:08:36 UTC (rev 143)
@@ -0,0 +1,181 @@
+/*
+ * Copyright 2004-2006 Luke Quinane
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace NMail.DataTypes.Calendar {
+ public abstract class CalendarEntry {
+
+ #region Descriptive Properties
+
+ private Classification classification;
+
+ /// <summary>
+ /// The access classification. (iCal "CLASS")
+ /// </summary>
+ public Classification Classification {
+ get { return classification; }
+ set { classification = value; }
+ }
+
+ private List<string> categories;
+
+ /// <summary>
+ /// The categories associated with the entry. (iCal "CATEGORIES")
+ /// </summary>
+ public List<string> Categories {
+ get { return categories; }
+ set { categories = value; }
+ }
+
+ private string description;
+
+ /// <summary>
+ /// The description of the entry. (iCal "DESCRIPTION")
+ /// </summary>
+ public string Description {
+ get { return description; }
+ set { description = value; }
+ }
+
+ private CalendarEntryStatus status;
+
+ /// <summary>
+ /// The status of the entry. (iCal "STATUS")
+ /// </summary>
+ public CalendarEntryStatus Status {
+ get { return status; }
+ set { status = value; }
+ }
+
+ private string summary;
+
+ /// <summary>
+ /// The summary of the event. (iCal "SUMMARY")
+ /// </summary>
+ public string Summary {
+ get { return summary; }
+ set { summary = value; }
+ }
+ #endregion
+
+ #region Date/Time Properties
+
+ private DateTime startTime;
+
+ /// <summary>
+ /// The time the event starts. (iCal "DTSTART")
+ /// </summary>
+ public DateTime StartTime {
+ get { return startTime; }
+ set { startTime = value; }
+ }
+ #endregion
+
+ #region Relationship Component Properties
+
+ // TODO: array of attendees
+
+ // TODO: contact list
+
+ private EmailAddress organiser;
+
+ /// <summary>
+ /// The organiser of the event. (iCal "ORGANIZER")
+ /// </summary>
+ public EmailAddress Organiser
+ {
+ get { return organiser;}
+ set { organiser = value;}
+ }
+
+ // TODO: UID
+
+ // TODO: URL?
+
+ #endregion
+
+ #region Recurrence Component Properties
+
+ private RecurrenceRule recurrence;
+
+ /// <summary>
+ /// The rule for how often this event will reoccur. (iCal "RRULE")
+ /// </summary>
+ public RecurrenceRule Recurrence {
+ get { return recurrence; }
+ set { recurrence = value; }
+ }
+
+ // TODO: exdate, exrule
+
+ //TODO: RECURRENCE-ID
+
+ #endregion
+
+ #region Change Management Component Properties
+
+ private DateTime created;
+
+ /// <summary>
+ /// The date/time the entry was created. (iCal "CREATED")
+ /// </summary>
+ public DateTime Created {
+ get { return created; }
+ set { created = value; }
+ }
+
+ private DateTime timeStamp;
+
+ /// <summary>
+ /// The date/time this instance was created. (iCal "DTSTAMP")
+ /// </summary>
+ public DateTime TimeStamp {
+ get { return timeStamp; }
+ set { timeStamp = value; }
+ }
+
+ private DateTime lastModified;
+
+ /// <summary>
+ /// The date/time the event was last modified. (iCal "LAST-MODIFIED")
+ /// </summary>
+ public DateTime LastModified {
+ get { return lastModified; }
+ set { lastModified = value; }
+ }
+
+ private int sequence;
+
+ /// <summary>
+ /// The sequence number associated with this revision of the entry. (iCal "SEQUENCE")
+ /// </summary>
+ public int Sequence {
+ get { return sequence; }
+ set { sequence = value; }
+ }
+ #endregion
+
+ #region Alarm Component Properties
+
+ // TODO: related
+
+ #endregion
+ }
+}
Added: NMail/trunk/NMail/DataTypes/Calendar/CalendarEntryStatus.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/Calendar/CalendarEntryStatus.cs (rev 0)
+++ NMail/trunk/NMail/DataTypes/Calendar/CalendarEntryStatus.cs 2007-02-10 04:08:36 UTC (rev 143)
@@ -0,0 +1,38 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace NMail.DataTypes.Calendar {
+ public class CalendarEntryStatus {
+// status = "STATUS" statparam] ":" statvalue CRLF
+
+// statparam = *(";" xparam)
+
+// statvalue = "TENTATIVE" ;Indicates event is
+// ;tentative.
+// / "CONFIRMED" ;Indicates event is
+// ;definite.
+// / "CANCELLED" ;Indicates event was
+// ;cancelled.
+// ;Status values for a "VEVENT"
+
+
+
+//Dawson & Stenerson Standards Track [Page 88]
+
+//RFC 2445 iCalendar November 1998
+
+
+// statvalue =/ "NEEDS-ACTION" ;Indicates to-do needs action.
+// / "COMPLETED" ;Indicates to-do completed.
+// / "IN-PROCESS" ;Indicates to-do in process of
+// / "CANCELLED" ;Indicates to-do was cancelled.
+// ;Status values for "VTODO".
+
+// statvalue =/ "DRAFT" ;Indicates journal is draft.
+// / "FINAL" ;Indicates journal is final.
+// / "CANCELLED" ;Indicates journal is removed.
+// ;Status values for "VJOURNAL".
+
+ }
+}
Added: NMail/trunk/NMail/DataTypes/Calendar/CountRecurreneRule.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/Calendar/CountRecurreneRule.cs (rev 0)
+++ NMail/trunk/NMail/DataTypes/Calendar/CountRecurreneRule.cs 2007-02-10 04:08:36 UTC (rev 143)
@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace NMail.DataTypes.Calendar {
+ /// <summary>
+ /// A recurrence that only occurs a certain number of times.
+ /// </summary>
+ public class CountRecurreneRule : RecurrenceRule {
+
+ private int count = 1;
+
+ /// <summary>
+ /// The number of time the recurrence will occur before it ends.
+ /// </summary>
+ public int Count {
+ get { return count; }
+ set { count = value; }
+ }
+ }
+}
Added: NMail/trunk/NMail/DataTypes/Calendar/DateRecurrenceRule.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/Calendar/DateRecurrenceRule.cs (rev 0)
+++ NMail/trunk/NMail/DataTypes/Calendar/DateRecurrenceRule.cs 2007-02-10 04:08:36 UTC (rev 143)
@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace NMail.DataTypes.Calendar {
+ /// <summary>
+ /// A recurrence rule that occurs until a specific date.
+ /// </summary>
+ public class DateRecurrenceRule : RecurrenceRule {
+
+ private DateTime endDate;
+
+ /// <summary>
+ /// The date/time the recurrence ends.
+ /// </summary>
+ public DateTime EndDate {
+ get { return endDate; }
+ set { endDate = value; }
+ }
+ }
+}
Added: NMail/trunk/NMail/DataTypes/Calendar/EventEntry.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/Calendar/EventEntry.cs (rev 0)
+++ NMail/trunk/NMail/DataTypes/Calendar/EventEntry.cs 2007-02-10 04:08:36 UTC (rev 143)
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2004-2006 Luke Quinane
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace NMail.DataTypes.Calendar {
+ public class EventEntry : CalendarEntry {
+ // TODO: alarm list
+ // TODO: GeographicPosition
+ // TODO: Location
+ // TODO: Priority
+ // TODO: TimeTransparency
+ // TODO: ResourcesList?
+ // TODO: EventEnding
+ }
+}
Added: NMail/trunk/NMail/DataTypes/Calendar/JournalEntry.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/Calendar/JournalEntry.cs (rev 0)
+++ NMail/trunk/NMail/DataTypes/Calendar/JournalEntry.cs 2007-02-10 04:08:36 UTC (rev 143)
@@ -0,0 +1,10 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace NMail.DataTypes.Calendar {
+ /// <summary>
+ /// A journal entry.
+ /// </summary>
+ public class JournalEntry : CalendarEntry { }
+}
Added: NMail/trunk/NMail/DataTypes/Calendar/RecurrenceFrequency.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/Calendar/RecurrenceFrequency.cs (rev 0)
+++ NMail/trunk/NMail/DataTypes/Calendar/RecurrenceFrequency.cs 2007-02-10 04:08:36 UTC (rev 143)
@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace NMail.DataTypes.Calendar {
+ public enum RecurrenceFrequency {
+ Secondly,
+
+ Minutely,
+
+ Hourly,
+
+ Daily,
+
+ Weekly,
+
+ Monthly,
+
+ Yearly
+ }
+}
Added: NMail/trunk/NMail/DataTypes/Calendar/RecurrenceRule.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/Calendar/RecurrenceRule.cs (rev 0)
+++ NMail/trunk/NMail/DataTypes/Calendar/RecurrenceRule.cs 2007-02-10 04:08:36 UTC (rev 143)
@@ -0,0 +1,33 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace NMail.DataTypes.Calendar {
+ /// <summary>
+ /// A rule for how often an event will reoccur.
+ /// </summary>
+ public abstract class RecurrenceRule {
+
+ private RecurrenceFrequency frequency;
+
+ /// <summary>
+ /// The frequency that the recurrence occurs.
+ /// </summary>
+ public RecurrenceFrequency Frequency {
+ get { return frequency; }
+ set { frequency = value; }
+ }
+
+ private int interval = 1;
+
+ /// <summary>
+ /// The number of freqency intervals that elapse before the recurrence occurs.
+ /// E.g. If interval is 3 and frequency is daily, the recurrence will occur
+ /// every three days.
+ /// </summary>
+ public int Interval {
+ get { return interval; }
+ set { interval = value; }
+ }
+ }
+}
Added: NMail/trunk/NMail/DataTypes/Calendar/ToDoEntry.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/Calendar/ToDoEntry.cs (rev 0)
+++ NMail/trunk/NMail/DataTypes/Calendar/ToDoEntry.cs 2007-02-10 04:08:36 UTC (rev 143)
@@ -0,0 +1,88 @@
+/*
+ * Copyright 2004-2006 Luke Quinane
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace NMail.DataTypes.Calendar {
+ public class ToDoEntry : CalendarEntry {
+
+ private DateTime? completed;
+
+ /// <summary>
+ /// The date/time this item was completed. (iCal "COMPLETED")
+ /// </summary>
+ public DateTime? Completed {
+ get { return completed; }
+ set { completed = value; }
+ }
+
+ private LatLong geographicPosition;
+
+ /// <summary>
+ /// The geographic position for the activity. (iCal "GEO")
+ /// </summary>
+ public LatLong GeographicPosition {
+ get { return geographicPosition; }
+ set { geographicPosition = value; }
+ }
+
+ private string location;
+
+ /// <summary>
+ /// The location the activity is at. (iCal "LOCATION")
+ /// </summary>
+ public string Location {
+ get { return location; }
+ set { location = value; }
+ }
+
+ private int percentComplete;
+
+ /// <summary>
+ /// The percentage this activity is complete. (iCal "PERCENT-COMPLETE")
+ /// </summary>
+ public int PercentComplete {
+ get { return percentComplete; }
+ set { percentComplete = value; }
+ }
+
+ private int priority;
+
+ /// <summary>
+ /// The priority of this activity. (iCal "PRIORITY")
+ /// </summary>
+ public int Priority {
+ get { return priority; }
+ set { priority = value; }
+ }
+
+ private string resources;
+
+ /// <summary>
+ /// The resources required to undertake the activity. (iCal "RESOURCES")
+ /// </summary>
+ public string Resources {
+ get { return resources; }
+ set { resources = value; }
+ }
+
+ // TODO: due or duration
+ // TODO: alarm
+ }
+}
Added: NMail/trunk/NMail/DataTypes/Classification.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/Classification.cs (rev 0)
+++ NMail/trunk/NMail/DataTypes/Classification.cs 2007-02-10 04:08:36 UTC (rev 143)
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2004-2007 Luke Quinane
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace NMail.DataTypes {
+ public enum Classification {
+ Public,
+
+ Private,
+
+ Confidential
+ }
+}
Added: NMail/trunk/NMail/DataTypes/LatLong.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/LatLong.cs (rev 0)
+++ NMail/trunk/NMail/DataTypes/LatLong.cs 2007-02-10 04:08:36 UTC (rev 143)
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2004-2007 Luke Quinane
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace NMail.DataTypes {
+ public struct LatLong {
+
+ public float Lat;
+
+ public float Long;
+ }
+}
Modified: NMail/trunk/NMail/NMail.csproj
===================================================================
--- NMail/trunk/NMail/NMail.csproj 2007-02-10 04:01:09 UTC (rev 142)
+++ NMail/trunk/NMail/NMail.csproj 2007-02-10 04:08:36 UTC (rev 143)
@@ -131,6 +131,13 @@
<Compile Include="DataTypes\ACLs\StoreFolderPrivilege.cs" />
<Compile Include="DataTypes\ACLs\UserGroupAdminPrivilege.cs" />
<Compile Include="DataTypes\BodyStructure.cs" />
+ <Compile Include="DataTypes\Calendar\CalendarEntry.cs" />
+ <Compile Include="DataTypes\Calendar\CalendarEntryStatus.cs" />
+ <Compile Include="DataTypes\Calendar\EventEntry.cs" />
+ <Compile Include="DataTypes\Calendar\JournalEntry.cs" />
+ <Compile Include="DataTypes\Calendar\ToDoEntry.cs" />
+ <Compile Include="DataTypes\Classification.cs" />
+ <Compile Include="DataTypes\LatLong.cs" />
<Compile Include="DataTypes\Service\BaseService.cs" />
<Compile Include="DataTypes\Service\BaseSession.cs" />
<Compile Include="DataTypes\Envelope.cs" />
Added: NMail/trunk/NMail.WebAccess/Controls/Calendar/Calendar.ascx
===================================================================
--- NMail/trunk/NMail.WebAccess/Controls/Calendar/Calendar.ascx (rev 0)
+++ NMail/trunk/NMail.WebAccess/Controls/Calendar/Calendar.ascx 2007-02-10 04:08:36 UTC (rev 143)
@@ -0,0 +1,18 @@
+<%--
+ * Copyright 2004-2007 Luke Quinane
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+--%>
+
+<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Calendar.ascx.cs" Inherits="Controls_Calendar_Calendar" %>
Added: NMail/trunk/NMail.WebAccess/Controls/Calendar/Calendar.ascx.cs
===================================================================
--- NMail/trunk/NMail.WebAccess/Controls/Calendar/Calendar.ascx.cs (rev 0)
+++ NMail/trunk/NMail.WebAccess/Controls/Calendar/Calendar.ascx.cs 2007-02-10 04:08:36 UTC (rev 143)
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2004-2007 Luke Quinane
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System;
+using System.Data;
+using System.Configuration;
+using System.Collections;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Web.UI.HtmlControls;
+
+public partial class Controls_Calendar_Calendar : System.Web.UI.UserControl
+{
+ protected void Page_Load(object sender, EventArgs e)
+ {
+
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-02-10 04:01:09
|
Revision: 142
http://svn.sourceforge.net/nmailserver/?rev=142&view=rev
Author: tmyroadctfig
Date: 2007-02-09 20:01:09 -0800 (Fri, 09 Feb 2007)
Log Message:
-----------
Added some more unit tests.
Modified Paths:
--------------
NMail/trunk/NMail.UnitTests/NMail.UnitTests.csproj
Added Paths:
-----------
NMail/trunk/NMail.UnitTests/DataTypes/
NMail/trunk/NMail.UnitTests/DataTypes/MessageHeaderTests.cs
NMail/trunk/NMail.UnitTests/Helper/StringTokenizerTests.cs
NMail/trunk/NMail.UnitTests/LocalStoreData/
NMail/trunk/NMail.UnitTests/LocalStoreData/MySql/
NMail/trunk/NMail.UnitTests/LocalStoreData/MySql/MySqlLocalStoreTests.cs
Added: NMail/trunk/NMail.UnitTests/DataTypes/MessageHeaderTests.cs
===================================================================
--- NMail/trunk/NMail.UnitTests/DataTypes/MessageHeaderTests.cs (rev 0)
+++ NMail/trunk/NMail.UnitTests/DataTypes/MessageHeaderTests.cs 2007-02-10 04:01:09 UTC (rev 142)
@@ -0,0 +1,47 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+using NUnit.Framework;
+
+using NMail.DataTypes;
+
+namespace NMail.DataTypes {
+ /// <summary>
+ /// Unit tests for the message headers class.
+ /// </summary>
+ [TestFixture]
+ public class MessageHeaderTests {
+
+ #region Basic Parsing
+
+ public const string BasicParsing1 = "Content-Type: image/jpeg;\r\n name=\"image001.jpg\"";
+
+ public const string BasicParsing2 = "From: \"Sample Person\" <sp...@sa...>\r\nTo: \"newuser\"\r\nSubject: Testing 123\r\nDate: Mon, 10 Jan 2020 18:00:00 +1030";
+
+ public const string BasicParsing3 = "Recieved: from niknak3 (3.3.3.3 [3.3.3.3])\r\n by NMail (localhost) with SMTP Tue, 28 Nov 2006 08:21:04 GMT\r\nRecieved: from niknak2 (2.2.2.2 [2.2.2.2])\r\n by NMail (localhost) with SMTP Tue, 27 Nov 2006 08:21:04 GMT\r\nRecieved: from niknak1 (1.1.1.1 [1.1.1.1])\r\n by NMail (localhost) with SMTP Tue, 26 Nov 2006 08:21:04 GMT\r\nMessage-ID: <001a01c7126e$22ecdf40$01d1a8c0@niknak>\r\nFrom: \"Luke\" <luke@localhost>";
+
+ [Test]
+ public void BasicParsing() {
+ MessageHeaders headers;
+
+ headers = new MessageHeaders(new ByteString(BasicParsing1, Encoding.ASCII));
+ Assert.IsNotNull(headers["Content-Type"], "BasicParsing1: not null");
+ Assert.IsTrue(headers.GetHeaders("Content-Type").Length == 1, "BasicParsing1: length == 1");
+ Assert.AreEqual("image/jpeg;\r\n name=\"image001.jpg\"", headers["Content-Type"], "BasicParsing1");
+
+ headers = new MessageHeaders(new ByteString(BasicParsing2, Encoding.ASCII));
+ Assert.IsNotNull(headers["From"], "BasicParsing2: from not null");
+ Assert.IsNotNull(headers["Subject"], "BasicParsing2: subject not null");
+ Assert.IsTrue(headers.GetHeaders("From").Length == 1, "BasicParsing2: from length == 1");
+ Assert.IsTrue(headers.GetHeaders("Subject").Length == 1, "BasicParsing2: subject length == 1");
+ Assert.AreEqual("Testing 123", headers["Subject"], "BasicParsing2: subject");
+
+ headers = new MessageHeaders(new ByteString(BasicParsing3, Encoding.ASCII));
+ Assert.IsNotNull(headers["Recieved"], "BasicParsing3: not null");
+ Assert.IsTrue(headers.GetHeaders("Recieved").Length == 3, "BasicParsing3: length == 3");
+ Assert.AreEqual("from niknak3 (3.3.3.3 [3.3.3.3])\r\n by NMail (localhost) with SMTP Tue, 28 Nov 2006 08:21:04 GMT", headers["Recieved"], "BasicParsing3");
+ }
+ #endregion
+ }
+}
Added: NMail/trunk/NMail.UnitTests/Helper/StringTokenizerTests.cs
===================================================================
--- NMail/trunk/NMail.UnitTests/Helper/StringTokenizerTests.cs (rev 0)
+++ NMail/trunk/NMail.UnitTests/Helper/StringTokenizerTests.cs 2007-02-10 04:01:09 UTC (rev 142)
@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+using NUnit.Framework;
+
+using NMail.Helper;
+
+namespace NMail.Helper {
+ /// <summary>
+ /// Unit tests for the string tokenizer.
+ /// </summary>
+ [TestFixture]
+ public class StringTokenizerTests {
+
+ #region Tokenizing
+
+ public const string Tokenizing1 = "Content-Type: image/jpeg;\r\n name=\"image001.jpg\"";
+
+ [Test]
+ public void BasicParsing() {
+ string[] tokens;
+
+ tokens = StringTokenizer.GetTokens(Tokenizing1, "\r\n");
+ Assert.IsNotNull(tokens, "Tokenizing1: not null");
+ Assert.AreEqual(2, tokens.Length, "Tokenizing1: length == 2");
+ Assert.AreEqual("Content-Type: image/jpeg;", tokens[0], "Tokenizing1: token[0] == image/jpeg");
+ Assert.AreEqual(" name=\"image001.jpg\"", tokens[1], "Tokenizing1: token[1] == name=\"...\"");
+ }
+ #endregion
+ }
+}
Added: NMail/trunk/NMail.UnitTests/LocalStoreData/MySql/MySqlLocalStoreTests.cs
===================================================================
--- NMail/trunk/NMail.UnitTests/LocalStoreData/MySql/MySqlLocalStoreTests.cs (rev 0)
+++ NMail/trunk/NMail.UnitTests/LocalStoreData/MySql/MySqlLocalStoreTests.cs 2007-02-10 04:01:09 UTC (rev 142)
@@ -0,0 +1,86 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+using NUnit.Framework;
+
+using NMail.Authentication;
+using NMail.Configuration;
+using NMail.DataTypes;
+using NMail.DataTypes.LocalStore;
+
+namespace NMail.LocalStoreData.MySql {
+ /// <summary>
+ /// Tests for the MySql localstore.
+ /// </summary>
+ [TestFixture]
+ public class MySqlLocalStoreTests {
+
+ ILocalStoreData localStoreData;
+
+ [TestFixtureSetUp]
+ public void Setup() {
+ localStoreData = NMailConfiguration.Current.LocalStoreData;
+ }
+
+ public const string TestUsername = "testusername";
+
+ public const string TestFolder = "testfolder";
+
+ [Test]
+ public void TestCreateUser() {
+ LocalStoreUserResult result = localStoreData.CreateUser(TestUsername, null, null);
+ Assert.AreEqual(LocalStoreUserResult.OkSuccessful, result, "User created successfully.");
+
+ LocalStoreUser user = localStoreData.GetUser(TestUsername);
+ Assert.IsNotNull(user, "Valid user.");
+ Assert.IsTrue(user.UserId > 0, "Valid user Id");
+ Assert.IsTrue(user.UserFolderId > 0, "Valid user folder Id");
+ }
+
+ [Test]
+ public void CreateFolder() {
+ LocalStoreUser user = localStoreData.GetUser(TestUsername);
+ Assert.IsNotNull(user, "Valid user.");
+
+ // Get the user's initial folder
+ StoreFolder nominal = localStoreData.GetStoreFolder(user.UserFolderId);
+ Assert.IsNotNull(nominal, "Nominal folder not null.");
+
+ // Make a sub-folder under it
+ Folder newFolder = new Folder(nominal, TestFolder);
+ LocalStoreFolderResult result = localStoreData.CreateFolder(user.UserId, nominal, newFolder);
+ Assert.AreEqual(LocalStoreFolderResult.OkSuccessful, result, "Created folder successfully.");
+ }
+
+ [Test]
+ public void TestDeleteUser() {
+ // Make an initial delete attempt (which should fail)
+ int userId = localStoreData.GetUser(TestUsername).UserId;
+ LocalStoreUserResult result = localStoreData.DeleteUser(userId);
+ Assert.AreEqual(LocalStoreUserResult.UserStillHasFolders, result, "User deleted fails with still has folders.");
+
+ // Delete all the user's folders
+ Queue<StoreFolder> folders = new Queue<StoreFolder>(localStoreData.GetUserFolders(userId));
+
+ while (folders.Count > 0) {
+ StoreFolder folder = folders.Dequeue();
+ LocalStoreFolderResult folderResult = localStoreData.DeleteFolder(folder.FolderId);
+
+ if (folderResult == LocalStoreFolderResult.OkSuccessful) {
+ continue;
+
+ } else if (folderResult != LocalStoreFolderResult.HasChildren) {
+ throw new InvalidOperationException(string.Format("Error deleting user's folder. Id: {0}", folder.FolderId));
+
+ } else {
+ folders.Enqueue(folder);
+ }
+ }
+
+ // Attempt to delete the user again
+ result = localStoreData.DeleteUser(userId);
+ Assert.AreEqual(LocalStoreUserResult.OkSuccessful, result, "User deleted successfully.");
+ }
+ }
+}
Modified: NMail/trunk/NMail.UnitTests/NMail.UnitTests.csproj
===================================================================
--- NMail/trunk/NMail.UnitTests/NMail.UnitTests.csproj 2007-02-10 04:00:15 UTC (rev 141)
+++ NMail/trunk/NMail.UnitTests/NMail.UnitTests.csproj 2007-02-10 04:01:09 UTC (rev 142)
@@ -37,15 +37,19 @@
<HintPath>..\References\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System" />
+ <Reference Include="System.configuration" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="DataTypes\MessageHeaderTests.cs" />
<Compile Include="DNSCacheTests.cs" />
<Compile Include="DomainTests.cs" />
<Compile Include="EmailAddressTests.cs" />
<Compile Include="Helper\MimeHelperTests.cs" />
+ <Compile Include="Helper\StringTokenizerTests.cs" />
<Compile Include="HostTests.cs" />
+ <Compile Include="LocalStoreData\MySql\MySqlLocalStoreTests.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SmtpServiceTests.cs" />
</ItemGroup>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-02-10 04:00:17
|
Revision: 141
http://svn.sourceforge.net/nmailserver/?rev=141&view=rev
Author: tmyroadctfig
Date: 2007-02-09 20:00:15 -0800 (Fri, 09 Feb 2007)
Log Message:
-----------
Fixed a defect in the handling of message flags.
Modified Paths:
--------------
NMail/trunk/NMail.LocalStoreData.MySql/MySqlLocalStoreData.cs
Modified: NMail/trunk/NMail.LocalStoreData.MySql/MySqlLocalStoreData.cs
===================================================================
--- NMail/trunk/NMail.LocalStoreData.MySql/MySqlLocalStoreData.cs 2007-02-10 03:58:53 UTC (rev 140)
+++ NMail/trunk/NMail.LocalStoreData.MySql/MySqlLocalStoreData.cs 2007-02-10 04:00:15 UTC (rev 141)
@@ -780,7 +780,7 @@
MySqlCommand cmd = cnn.CreateCommand();
cmd.Transaction = transaction;
- cmd.CommandText = "SELECT FolderMessageId FROM Message WHERE FolderId = ?FolderId AND MessageFlags = ?DeletedFlag";
+ cmd.CommandText = "SELECT FolderMessageId FROM Message WHERE FolderId = ?FolderId AND ((MessageFlags & ?DeletedFlag) != 0)";
cmd.Parameters.Add("?FolderId", folder.FolderId);
cmd.Parameters.Add("?DeletedFlag", (int) StoreMessageFlags.Deleted);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-02-10 03:58:52
|
Revision: 140
http://svn.sourceforge.net/nmailserver/?rev=140&view=rev
Author: tmyroadctfig
Date: 2007-02-09 19:58:53 -0800 (Fri, 09 Feb 2007)
Log Message:
-----------
Added some #ifdefs to exclude things not implemented in Mono 1.2.3.
Modified Paths:
--------------
NMail/trunk/NMail/DataTypes/Service/BaseService.cs
NMail/trunk/NMail.PostInstall/PostInstallForm.cs
Modified: NMail/trunk/NMail/DataTypes/Service/BaseService.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/Service/BaseService.cs 2007-02-10 03:57:41 UTC (rev 139)
+++ NMail/trunk/NMail/DataTypes/Service/BaseService.cs 2007-02-10 03:58:53 UTC (rev 140)
@@ -29,6 +29,8 @@
using NMail.Configuration;
using NMail.Helper;
+// TODO: remove "#if !MONO" when perf counters are implemented in Mono
+
namespace NMail.DataTypes.Service {
/// <summary>
/// Provides a base class for services.
@@ -49,10 +51,12 @@
/// </summary>
private bool shutdown;
+#if !MONO
/// <summary>
/// The performance counter for tracking the number of received connections.
/// </summary>
private PerformanceCounter connectionsReceived;
+#endif
/// <summary>
/// Creates a new instance of the SMTP service.
@@ -62,10 +66,12 @@
this.sessionThreads = new List<Thread>();
this.shutdown = true;
+#if !MONO
this.connectionsReceived = new PerformanceCounter(
PerfCounterCategory,
TotalConnectionsReceived,
false);
+#endif
}
#region IService Members
@@ -208,7 +214,9 @@
while (true) {
Socket client = socket.AcceptSocket();
+#if !MONO
this.connectionsReceived.Increment();
+#endif
lock (this) {
if (this.ConnectionCount < this.MaximumConnections) {
Modified: NMail/trunk/NMail.PostInstall/PostInstallForm.cs
===================================================================
--- NMail/trunk/NMail.PostInstall/PostInstallForm.cs 2007-02-10 03:57:41 UTC (rev 139)
+++ NMail/trunk/NMail.PostInstall/PostInstallForm.cs 2007-02-10 03:58:53 UTC (rev 140)
@@ -30,6 +30,8 @@
using NMail.SmtpService;
+// TODO: remove "#if !MONO" when perf counters are implemented in Mono
+
namespace NMail.PostInstall {
public partial class PostInstallForm : Form {
@@ -45,13 +47,16 @@
}
private void DeleteSmtpServiceCounters() {
+#if !MONO
if (PerformanceCounterCategory.Exists(SmtpService.SmtpService.SmtpPerfCounterCategory)) {
// Remove any old performance counters if they are present
PerformanceCounterCategory.Delete(SmtpService.SmtpService.SmtpPerfCounterCategory);
}
+#endif
}
private void SetupSmtpServiceCounters() {
+#if !MONO
CounterCreationDataCollection ccdc = new CounterCreationDataCollection();
// Number of connections received
@@ -67,6 +72,7 @@
"Performance counters for NMail's SMTP service.",
PerformanceCounterCategoryType.SingleInstance,
ccdc);
+#endif
}
private bool NMailInstalled() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-02-10 03:57:43
|
Revision: 139
http://svn.sourceforge.net/nmailserver/?rev=139&view=rev
Author: tmyroadctfig
Date: 2007-02-09 19:57:41 -0800 (Fri, 09 Feb 2007)
Log Message:
-----------
Added a "None" MIME type for headers that don't include a MIME type.
Modified Paths:
--------------
NMail/trunk/NMail/DataTypes/MimeContentType.cs
NMail/trunk/NMail/Helper/MimeHelper.cs
Modified: NMail/trunk/NMail/DataTypes/MimeContentType.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/MimeContentType.cs 2007-02-10 03:56:19 UTC (rev 138)
+++ NMail/trunk/NMail/DataTypes/MimeContentType.cs 2007-02-10 03:57:41 UTC (rev 139)
@@ -23,6 +23,12 @@
/// </summary>
public enum MimeContentType {
/// <summary>
+ /// No MIME type was specified. A part with this type should be treated
+ /// as "text/plain".
+ /// </summary>
+ None,
+
+ /// <summary>
/// A text block.
/// </summary>
Text,
Modified: NMail/trunk/NMail/Helper/MimeHelper.cs
===================================================================
--- NMail/trunk/NMail/Helper/MimeHelper.cs 2007-02-10 03:56:19 UTC (rev 138)
+++ NMail/trunk/NMail/Helper/MimeHelper.cs 2007-02-10 03:57:41 UTC (rev 139)
@@ -203,8 +203,8 @@
parameters = new Dictionary<string, string>();
if (contentType == null) {
- subType = "plain";
- return MimeContentType.Text;
+ subType = null;
+ return MimeContentType.None;
} else {
string type = null;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tmy...@us...> - 2007-02-10 03:56:20
|
Revision: 138
http://svn.sourceforge.net/nmailserver/?rev=138&view=rev
Author: tmyroadctfig
Date: 2007-02-09 19:56:19 -0800 (Fri, 09 Feb 2007)
Log Message:
-----------
Further work on email rendering and displaying attachments.
Modified Paths:
--------------
NMail/trunk/NMail/DataTypes/BodyStructure.cs
NMail/trunk/NMail.RemoteAccessService.Serializers/DataTypes/BodyStructureSerializer.cs
NMail/trunk/NMail.WebAccess/App_Code/AttachmentDataSource.cs
NMail/trunk/NMail.WebAccess/App_Code/Helper.cs
NMail/trunk/NMail.WebAccess/App_WebReferences/RemoteAccessService/RemoteAccessService.wsdl
NMail/trunk/NMail.WebAccess/Controls/Mail/MessageBody.aspx
NMail/trunk/NMail.WebAccess/Controls/Mail/MessageBody.aspx.cs
Modified: NMail/trunk/NMail/DataTypes/BodyStructure.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/BodyStructure.cs 2007-02-06 11:59:57 UTC (rev 137)
+++ NMail/trunk/NMail/DataTypes/BodyStructure.cs 2007-02-10 03:56:19 UTC (rev 138)
@@ -45,6 +45,7 @@
}
this.bodyCharacterCount = bodyData.Length;
+ this.size = bodyPart.Size;
}
}
@@ -83,8 +84,17 @@
get { return bodyCharacterCount; }
set { bodyCharacterCount = value; }
}
-
+ private int size;
+
+ /// <summary>
+ /// The size of this part in bytes.
+ /// </summary>
+ public int Size {
+ get { return size; }
+ set { size = value; }
+ }
+
public override string ToString() {
if (this.Count > 0) {
StringBuilder data = new StringBuilder();
Modified: NMail/trunk/NMail.RemoteAccessService.Serializers/DataTypes/BodyStructureSerializer.cs
===================================================================
--- NMail/trunk/NMail.RemoteAccessService.Serializers/DataTypes/BodyStructureSerializer.cs 2007-02-06 11:59:57 UTC (rev 137)
+++ NMail/trunk/NMail.RemoteAccessService.Serializers/DataTypes/BodyStructureSerializer.cs 2007-02-10 03:56:19 UTC (rev 138)
@@ -17,6 +17,7 @@
public BodyStructureSerializer(BodyStructure bodyStructure) {
this.headers = new MessageHeadersSerializer(bodyStructure.Headers);
+ this.size = bodyStructure.Size;
foreach (BodyStructure child in bodyStructure) {
this.parts.Add(new BodyStructureSerializer(child));
@@ -30,6 +31,13 @@
set { headers = value; }
}
+ private int size;
+
+ public int Size {
+ get { return size; }
+ set { size = value; }
+ }
+
private List<BodyStructureSerializer> parts = new List<BodyStructureSerializer>();
public List<BodyStructureSerializer> Parts {
Modified: NMail/trunk/NMail.WebAccess/App_Code/AttachmentDataSource.cs
===================================================================
--- NMail/trunk/NMail.WebAccess/App_Code/AttachmentDataSource.cs 2007-02-06 11:59:57 UTC (rev 137)
+++ NMail/trunk/NMail.WebAccess/App_Code/AttachmentDataSource.cs 2007-02-10 03:56:19 UTC (rev 138)
@@ -36,16 +36,13 @@
/// </summary>
public static class AttachmentDataSource
{
- public static List<AttachmentDetails> GetAttachmentDetails(Message message)
+ public static List<AttachmentDetails> GetAttachmentDetails(BodyStructure bodyStructure)
{
List<AttachmentDetails> result = new List<AttachmentDetails>();
- if (message.MultipartBody)
+ for (int i = 1; i < bodyStructure.Count; i++)
{
- for (int i = 0; i < message.MimeParts.Count; i++)
- {
- result.Add(new AttachmentDetails(message.MimeParts[i], i + 1));
- }
+ result.Add(new AttachmentDetails(bodyStructure[i], i + 1));
}
return result;
@@ -57,22 +54,22 @@
/// </summary>
public class AttachmentDetails
{
- public AttachmentDetails(IMessageBodyPart mimePart, int partNumber)
+ public AttachmentDetails(BodyStructure bodyStructure, int partNumber)
{
this.partNumber = partNumber;
// Get the name of the attachment
- this.name = MimeHelper.GetAttachmentName(mimePart.Headers);
+ this.name = MimeHelper.GetAttachmentName(bodyStructure.Headers);
if (name == null)
{
name = string.Format("Untitled: {0}", partNumber);
}
- this.size = mimePart.BodyData.Length;
+ this.size = bodyStructure.Size;
// Get the content type
Dictionary<string, string> parameters;
- this.contentType = MimeHelper.GetContentType(mimePart.Headers, out this.contentSubType, out parameters);
+ this.contentType = MimeHelper.GetContentType(bodyStructure.Headers, out this.contentSubType, out parameters);
}
private int partNumber;
Modified: NMail/trunk/NMail.WebAccess/App_Code/Helper.cs
===================================================================
--- NMail/trunk/NMail.WebAccess/App_Code/Helper.cs 2007-02-06 11:59:57 UTC (rev 137)
+++ NMail/trunk/NMail.WebAccess/App_Code/Helper.cs 2007-02-10 03:56:19 UTC (rev 138)
@@ -93,5 +93,10 @@
return s;
}
}
+
+ public string GetImageUrlForContentType(MimeContentType contentType, string subType)
+ {
+
+ }
}
}
Modified: NMail/trunk/NMail.WebAccess/App_WebReferences/RemoteAccessService/RemoteAccessService.wsdl
===================================================================
--- NMail/trunk/NMail.WebAccess/App_WebReferences/RemoteAccessService/RemoteAccessService.wsdl 2007-02-06 11:59:57 UTC (rev 137)
+++ NMail/trunk/NMail.WebAccess/App_WebReferences/RemoteAccessService/RemoteAccessService.wsdl 2007-02-10 03:56:19 UTC (rev 138)
@@ -190,6 +190,7 @@
<s:complexType name="BodyStructureSerializer">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="Headers" type="tns:MessageHeadersSerializer" />
+ <s:element minOccurs="1" maxOccurs="1" name="Size" type="s:int" />
<s:element minOccurs="0" maxOccurs="1" name="Parts" type="tns:ArrayOfBodyStructureSerializer" />
</s:sequence>
</s:complexType>
Modified: NMail/trunk/NMail.WebAccess/Controls/Mail/MessageBody.aspx
===================================================================
--- NMail/trunk/NMail.WebAccess/Controls/Mail/MessageBody.aspx 2007-02-06 11:59:57 UTC (rev 137)
+++ NMail/trunk/NMail.WebAccess/Controls/Mail/MessageBody.aspx 2007-02-10 03:56:19 UTC (rev 138)
@@ -31,15 +31,19 @@
<br />
<!-- The attachments -->
- <asp:Repeater ID="AttachmentsRepeater" runat="server">
- <ItemTemplate>
- <asp:LinkButton ID="AttachmentDownloadButton" runat="server">
- <asp:Image ID="AttachmentImage" runat="server" />
- <asp:Label ID="AttachmentNameLbl" runat="server" />
- <asp:Label ID="SizeLbl" runat="server" />
- </asp:LinkButton>
- </ItemTemplate>
- </asp:Repeater>
+ <table>
+ <asp:Repeater ID="AttachmentsRepeater" runat="server">
+ <ItemTemplate>
+ <tr><td>
+ <asp:LinkButton ID="AttachmentDownloadButton" runat="server">
+ <asp:Image ID="AttachmentImage" runat="server" />
+ <asp:Label ID="AttachmentNameLbl" runat="server" />
+ <asp:Label ID="SizeLbl" runat="server" />
+ </asp:LinkButton>
+ </td></tr>
+ </ItemTemplate>
+ </asp:Repeater>
+ </table>
</div>
</form>
</body>
Modified: NMail/trunk/NMail.WebAccess/Controls/Mail/MessageBody.aspx.cs
===================================================================
--- NMail/trunk/NMail.WebAccess/Controls/Mail/MessageBody.aspx.cs 2007-02-06 11:59:57 UTC (rev 137)
+++ NMail/trunk/NMail.WebAccess/Controls/Mail/MessageBody.aspx.cs 2007-02-10 03:56:19 UTC (rev 138)
@@ -59,17 +59,9 @@
get { return folderId; }
}
- private Message message;
+ private BodyStructure bodyStructure;
/// <summary>
- /// The message displayed in this form.
- /// </summary>
- public Message Message
- {
- get { return message; }
- }
-
- /// <summary>
/// Extracts the message and folder Ids from the query string.
/// </summary>
protected void ExtractQueryStringParams()
@@ -91,43 +83,47 @@
/// Examines the body structure to determine which MIME part to display as the
/// message body.
/// </summary>
- /// <param name="bodyStructure">The structure of the message.</param>
- /// <param name="partNumber">The part number to display.</param>
/// <param name="html">True if the part is a HTML part.</param>
- protected void FindMimePartToDisplay(BodyStructure bodyStructure, out int partNumber, out bool html)
+ /// <returns>The body part to display.</returns>
+ protected string FindMimePartToDisplay(Message firstMimePart, out bool html)
{
- if (bodyStructure.Count == 0)
+ // Get the content type
+ Dictionary<string, string> parameters;
+ string subType;
+ MimeContentType contentType;
+ contentType = MimeHelper.GetContentType(firstMimePart.Headers, out subType, out parameters);
+
+ if (contentType == MimeContentType.Text)
{
- // Simple message body, only one part to the message
- partNumber = 1;
- html = false;
+ html = (subType == "html");
+ return firstMimePart.BodyData.ToString();
}
- else
+ else if (contentType == MimeContentType.Multipart && subType == "alternative")
{
- partNumber = 1;
html = false;
+ string result = string.Empty;
- // Search for the best part
- for (int i = 0; i < bodyStructure.Count; i++)
+ for (int i = 0; i < firstMimePart.MimeParts.Count; i++)
{
- Dictionary<string, string> parameters;
- string subType;
- MimeContentType contentType = MimeHelper.GetContentType(bodyStructure[i].Headers, out subType, out parameters);
+ IMessageBodyPart part = firstMimePart.MimeParts[i];
+ contentType = MimeHelper.GetContentType(part.Headers, out subType, out parameters);
if (contentType == MimeContentType.Text)
{
- // We'll take the first text part we find unless something better appears
- partNumber = i + 1;
+ result = part.BodyData.ToString();
+ html = (subType == "html");
+ }
- if (subType == "html")
- {
- // We'll display the first HTML part we find
- html = true;
- break;
- }
+ if (html)
+ {
+ break;
}
}
}
+
+ // Nothing we understand...
+ html = false;
+ return string.Empty;
}
protected void Page_Init(object sender, EventArgs e)
@@ -150,32 +146,32 @@
return;
}
+
// Get our session variables
string authToken = (string)Session["AuthToken"];
RemoteAccessService.RemoteAccessService ras = (RemoteAccessService.RemoteAccessService)Session["RAS"];
// Get the body structure
- BodyStructureSerializer bs = ras.GetMessageStructure(authToken, messageId, folderId);
- BodyStructure bodyStructure = Helper.GetBodyStructure(bs);
+ BodyStructureSerializer bs = ras.GetMessageStructure(authToken, this.messageId, this.folderId);
+ this.bodyStructure = Helper.GetBodyStructure(bs);
+ // Get the first MIME part
+ string base64Body = ras.GetMessageMimePart(authToken, 1, messageId, folderId);
+ ByteString bodyData = new ByteString(Convert.FromBase64String(base64Body), Encoding.UTF8);
+ Message firstMimePart = new Message(bodyData);
+
// Find which part to display
- int bodyPartNumber;
bool htmlBody;
- FindMimePartToDisplay(bodyStructure, out bodyPartNumber, out htmlBody);
+ string messageBody = FindMimePartToDisplay(firstMimePart, out htmlBody);
- // Get the part to display
- string base64Body = ras.GetMessageMimePart(authToken, bodyPartNumber, messageId, folderId);
- ByteString bodyData = new ByteString(Convert.FromBase64String(base64Body), Encoding.UTF8);
- this.message = new Message(bodyData);
-
// Ensure all nasty stuff is escaped
if (htmlBody)
{
- this.MessageBody.Text = HtmlEscaper.EscapeScriptsAndImages(this.message.Data.ToString());
+ this.MessageBody.Text = HtmlEscaper.EscapeScriptsAndImages(messageBody);
}
else
{
- this.MessageBody.Text = HtmlEscaper.EscapeAll(this.message.Data.ToString());
+ this.MessageBody.Text = HtmlEscaper.EscapeAll(messageBody);
}
this.AttachmentsRepeater.ItemDataBound += new RepeaterItemEventHandler(AttachmentsRepeater_ItemDataBound);
@@ -193,7 +189,8 @@
void attachmentDataSource_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
{
- e.InputParameters.Add("message", this.message);
+
+ e.InputParameters.Add("bodyStructure", this.bodyStructure);
}
void AttachmentsRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|