Thread: [Nmailserver-commits] SF.net SVN: nmailserver: [43] NMail/trunk
Brought to you by:
dframpton-oss,
tmyroadctfig
From: <tmy...@us...> - 2006-06-06 17:07:02
|
Revision: 43 Author: tmyroadctfig Date: 2006-06-06 05:55:52 -0700 (Tue, 06 Jun 2006) ViewCVS: http://svn.sourceforge.net/nmailserver/?rev=43&view=rev Log Message: ----------- Merged in changes from development branch. Modified Paths: -------------- NMail/trunk/NMail/Authentication/IAuthenticationProvider.cs NMail/trunk/NMail/DataTypes/ACLs/GenericAce.cs NMail/trunk/NMail/DataTypes/ACLs/GenericAcl.cs NMail/trunk/NMail/DataTypes/ACLs/StoreFolderAcl.cs NMail/trunk/NMail/DataTypes/Folder.cs NMail/trunk/NMail/DataTypes/LocalStore/MailDomain.cs NMail/trunk/NMail/DataTypes/LocalStoreGroup.cs NMail/trunk/NMail/DataTypes/StoreFolder.cs NMail/trunk/NMail/ILocalStore.cs NMail/trunk/NMail/ILocalStoreData.cs NMail/trunk/NMail/ILocalStoreDeliveryAction.cs NMail/trunk/NMail/ILocalStoreRecipientValidator.cs NMail/trunk/NMail/IO/TcpChannel.cs NMail/trunk/NMail/IO/TcpClientChannel.cs NMail/trunk/NMail/IO/TcpClientTransportSink.cs NMail/trunk/NMail/IO/TcpClientTransportSinkProvider.cs NMail/trunk/NMail/IO/TcpServerChannel.cs NMail/trunk/NMail/IO/TcpServerTransportSink.cs NMail/trunk/NMail/NMail.csproj NMail/trunk/NMail.Administration.Console/Context/LocalStoreContext.cs NMail/trunk/NMail.Administration.Console/Context/TopLevelContext.cs NMail/trunk/NMail.Administration.Console/NMail.Administration.Console.csproj NMail/trunk/NMail.ImapService/Response/AclResponse.cs NMail/trunk/NMail.ImapService/State/AuthenticatedState.cs NMail/trunk/NMail.LocalStore/DeliveryActions/ClamAvScanner.cs NMail/trunk/NMail.LocalStore/DeliveryActions/Copy.cs NMail/trunk/NMail.LocalStore/DeliveryActions/ManageWhiteList.cs NMail/trunk/NMail.LocalStore/DeliveryActions/Move.cs NMail/trunk/NMail.LocalStore/LocalStore.cs NMail/trunk/NMail.LocalStore/NMail.LocalStore.csproj NMail/trunk/NMail.LocalStore/Validators/AddressDate.cs NMail/trunk/NMail.LocalStore/Validators/AddressKeyword.cs NMail/trunk/NMail.LocalStore/Validators/AddressSender.cs NMail/trunk/NMail.LocalStore/Validators/OnWhiteList.cs NMail/trunk/NMail.LocalStore/Validators/OrdbBlackList.cs NMail/trunk/NMail.LocalStoreData.MySql/MySqlLocalStore.sql NMail/trunk/NMail.LocalStoreData.MySql/MySqlLocalStoreData.cs NMail/trunk/NMail.Server/NMail.Server.csproj NMail/trunk/NMail.Server/NMailServer.cs NMail/trunk/NMail.Server/RemoteAdministration.cs NMail/trunk/NMail.Server.Console/NMail.Server.Console.csproj NMail/trunk/NMail.Server.Console/NMailConsoleServer.cs Added Paths: ----------- NMail/trunk/NDns/NDns.xml NMail/trunk/NMail/DataTypes/ACLs/SystemPrivilege.cs NMail/trunk/NMail/DataTypes/ACLs/UserGroupAdminPrivilege.cs NMail/trunk/NMail.Administration.Console/Command/AddMailDomainCommand.cs NMail/trunk/NMail.Administration.Console/Command/AddUserToMailDomainCommand.cs NMail/trunk/NMail.Administration.Console/Command/RemoveUserFromMailDomainCommand.cs NMail/trunk/NMail.Administration.Web/ NMail/trunk/NMail.Administration.Web/App_Code/ NMail/trunk/NMail.Administration.Web/App_Code/FolderDataSource.cs NMail/trunk/NMail.Administration.Web/App_Code/MailDomainDataSource.cs NMail/trunk/NMail.Administration.Web/App_Code/UserDataSource.cs NMail/trunk/NMail.Administration.Web/App_Data/ NMail/trunk/NMail.Administration.Web/Bin/ NMail/trunk/NMail.Administration.Web/CreateFolder.aspx NMail/trunk/NMail.Administration.Web/CreateFolder.aspx.cs NMail/trunk/NMail.Administration.Web/CreateUser.aspx NMail/trunk/NMail.Administration.Web/CreateUser.aspx.cs NMail/trunk/NMail.Administration.Web/Default.aspx NMail/trunk/NMail.Administration.Web/FolderDetails.aspx NMail/trunk/NMail.Administration.Web/FolderDetails.aspx.cs NMail/trunk/NMail.Administration.Web/Global.asax NMail/trunk/NMail.Administration.Web/Images/ NMail/trunk/NMail.Administration.Web/Images/nmail-logo.png NMail/trunk/NMail.Administration.Web/Login.aspx NMail/trunk/NMail.Administration.Web/Login.aspx.cs NMail/trunk/NMail.Administration.Web/MailDomainDetails.aspx NMail/trunk/NMail.Administration.Web/MailDomainDetails.aspx.cs NMail/trunk/NMail.Administration.Web/MasterPage.master NMail/trunk/NMail.Administration.Web/StyleSheet.css NMail/trunk/NMail.Administration.Web/UserDetails.aspx NMail/trunk/NMail.Administration.Web/UserDetails.aspx.cs NMail/trunk/NMail.Administration.Web/ViewFolders.aspx NMail/trunk/NMail.Administration.Web/ViewFolders.aspx.cs NMail/trunk/NMail.Administration.Web/ViewMailDomains.aspx NMail/trunk/NMail.Administration.Web/ViewMailDomains.aspx.cs NMail/trunk/NMail.Administration.Web/ViewUsers.aspx NMail/trunk/NMail.Administration.Web/Web.sitemap NMail/trunk/NMail.Administration.Web/web.config NMail/trunk/NMail.Administration.Web.sln Removed Paths: ------------- NMail/trunk/NMail/DataTypes/ACLs/StoreFolderAce.cs Added: NMail/trunk/NDns/NDns.xml =================================================================== --- NMail/trunk/NDns/NDns.xml (rev 0) +++ NMail/trunk/NDns/NDns.xml 2006-06-06 12:55:52 UTC (rev 43) @@ -0,0 +1,8 @@ +<?xml version="1.0"?> +<doc> + <assembly> + <name>NDns</name> + </assembly> + <members> + </members> +</doc> Modified: NMail/trunk/NMail/Authentication/IAuthenticationProvider.cs =================================================================== --- NMail/trunk/NMail/Authentication/IAuthenticationProvider.cs 2006-06-06 11:44:08 UTC (rev 42) +++ NMail/trunk/NMail/Authentication/IAuthenticationProvider.cs 2006-06-06 12:55:52 UTC (rev 43) @@ -17,6 +17,8 @@ using System; +using NMail.DataTypes.ACLs; + namespace NMail.Authentication { /// <summary> /// The interface for an authentication provider that operates on username and Modified: NMail/trunk/NMail/DataTypes/ACLs/GenericAce.cs =================================================================== --- NMail/trunk/NMail/DataTypes/ACLs/GenericAce.cs 2006-06-06 11:44:08 UTC (rev 42) +++ NMail/trunk/NMail/DataTypes/ACLs/GenericAce.cs 2006-06-06 12:55:52 UTC (rev 43) @@ -23,14 +23,16 @@ /// <summary> /// A generic access control entry for an ACL. /// </summary> - public class GenericAce { + public class GenericAce<PrivilegeType> { /// <summary> /// Creates a new access control entry. /// </summary> /// <param name="identifier">The identifier to associated the ACE with.</param> + /// <param name="privilege">The privileges.</param> /// <param name="acePrivilegeType">Whether to allow or deny the privileges.</param> - public GenericAce(string identifier, AcePrivilegeType acePrivilegeType) { + public GenericAce(string identifier, PrivilegeType privilege, AcePrivilegeType acePrivilegeType) { this.identifier = identifier; + this.privilege = privilege; this.acePrivilegeType = acePrivilegeType; } @@ -48,6 +50,20 @@ } } + private PrivilegeType privilege; + + /// <summary> + /// The privilege associated with this ACE. + /// </summary> + public PrivilegeType Privilege { + get { + return this.privilege; + } + set { + this.privilege = value; + } + } + private AcePrivilegeType acePrivilegeType; /// <summary> Modified: NMail/trunk/NMail/DataTypes/ACLs/GenericAcl.cs =================================================================== --- NMail/trunk/NMail/DataTypes/ACLs/GenericAcl.cs 2006-06-06 11:44:08 UTC (rev 42) +++ NMail/trunk/NMail/DataTypes/ACLs/GenericAcl.cs 2006-06-06 12:55:52 UTC (rev 43) @@ -23,40 +23,23 @@ /// <summary> /// A list of access control entries. /// </summary> - public class GenericAcl<AceType> where AceType : GenericAce { + public class GenericAcl<PrivilegeType> { /// <summary> /// A map of identifiers to access control entries. /// </summary> - protected Dictionary<string, AceType> entries = new Dictionary<string, AceType>(StringComparer.InvariantCultureIgnoreCase); + protected Dictionary<string, GenericAce<PrivilegeType>> entries = new Dictionary<string, GenericAce<PrivilegeType>>(StringComparer.InvariantCultureIgnoreCase); /// <summary> - /// Creates a new ACL for the given resource name. + /// Creates a new ACL. /// </summary> - /// <param name="resourceName">The name of the resource this ACL is for.</param> - public GenericAcl(string resourceName) { - this.resourceName = resourceName; - } + public GenericAcl() {} - private string resourceName; - /// <summary> - /// The name of the resource this ACL is associated wtih. - /// </summary> - public string ResourceName { - get { - return this.resourceName; - } - set { - this.resourceName = value; - } - } - - /// <summary> /// Replaces the existing ACE for the associated identifier. If no ACE exists /// for the given identifer the new ACE is simply added. /// </summary> /// <param name="ace">The ACE to set.</param> - public void SetAce(AceType ace) { + public void SetAce(GenericAce<PrivilegeType> ace) { lock (this) { if (this.entries.ContainsKey(ace.Identifier)) { this.entries.Remove(ace.Identifier); @@ -90,7 +73,7 @@ /// </summary> /// <param name="identifier">The identifier to look up.</param> /// <returns>The identifier or null if non is found.</returns> - public AceType this[string identifier] { + public GenericAce<PrivilegeType> this[string identifier] { get { lock (this) { if (this.entries.ContainsKey(identifier)) { Deleted: NMail/trunk/NMail/DataTypes/ACLs/StoreFolderAce.cs =================================================================== --- NMail/trunk/NMail/DataTypes/ACLs/StoreFolderAce.cs 2006-06-06 11:44:08 UTC (rev 42) +++ NMail/trunk/NMail/DataTypes/ACLs/StoreFolderAce.cs 2006-06-06 12:55:52 UTC (rev 43) @@ -1,53 +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.Collections.Generic; -using System.Text; - -namespace NMail.DataTypes.ACLs { - /// <summary> - /// An access control entry for a store folder ACL. - /// </summary> - public class StoreFolderAce : GenericAce { - /// <summary> - /// Creates a new access control entry. - /// </summary> - /// <param name="identifier">The identifier to associated the ACE with.</param> - /// <param name="privilege">The privileges.</param> - /// <param name="aceType">Whether to allow or deny the privileges.</param> - public StoreFolderAce(string identifier, StoreFolderPrivilege privilege, AcePrivilegeType aceType) - : base(identifier, aceType) { - - this.privilege = privilege; - } - - private StoreFolderPrivilege privilege; - - /// <summary> - /// The privilege associated with this ACE. - /// </summary> - public StoreFolderPrivilege Privilege { - get { - return this.privilege; - } - set { - this.privilege = value; - } - } - } -} Modified: NMail/trunk/NMail/DataTypes/ACLs/StoreFolderAcl.cs =================================================================== --- NMail/trunk/NMail/DataTypes/ACLs/StoreFolderAcl.cs 2006-06-06 11:44:08 UTC (rev 42) +++ NMail/trunk/NMail/DataTypes/ACLs/StoreFolderAcl.cs 2006-06-06 12:55:52 UTC (rev 43) @@ -21,14 +21,14 @@ namespace NMail.DataTypes.ACLs { /// <summary> - /// A list of access control entries. + /// A list of access control entries for a folder. /// </summary> - public class StoreFolderAcl : GenericAcl<StoreFolderAce> { + public class StoreFolderAcl : GenericAcl<StoreFolderPrivilege> { /// <summary> /// Creates a new ACL for the given folder. /// </summary> /// <param name="folder">The folder associated with the ACL.</param> - public StoreFolderAcl(StoreFolder folder) : base(folder.FolderId.ToString()) { + public StoreFolderAcl(StoreFolder folder) : base() { this.folder = folder; } Copied: NMail/trunk/NMail/DataTypes/ACLs/SystemPrivilege.cs (from rev 42, NMail/branches/luke-dev/NMail/DataTypes/ACLs/SystemPrivilege.cs) =================================================================== --- NMail/trunk/NMail/DataTypes/ACLs/SystemPrivilege.cs (rev 0) +++ NMail/trunk/NMail/DataTypes/ACLs/SystemPrivilege.cs 2006-06-06 12:55:52 UTC (rev 43) @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace NMail.DataTypes.ACLs { + /// <summary> + /// The possible privileges a user or group can have on the NMail system. + /// </summary> + [FlagsAttribute] + public enum SystemPrivilege : uint { + /// <summary> + /// No rights are granted. + /// </summary> + None = 0, + + /// <summary> + /// The right to view the system privilege ACL. + /// </summary> + ViewSystemPrivileges = 1, + + /// <summary> + /// The right to modify the system privilege ACL. + /// </summary> + ModifySystemPrivileges = 2, + + /// <summary> + /// The right to edit any ACLs. + /// </summary> + EditAllAcls = 4, + + /// <summary> + /// The right to create a new mail domain. + /// </summary> + CreateMailDomain = 8 + } +} Copied: NMail/trunk/NMail/DataTypes/ACLs/UserGroupAdminPrivilege.cs (from rev 42, NMail/branches/luke-dev/NMail/DataTypes/ACLs/UserGroupAdminPrivilege.cs) =================================================================== --- NMail/trunk/NMail/DataTypes/ACLs/UserGroupAdminPrivilege.cs (rev 0) +++ NMail/trunk/NMail/DataTypes/ACLs/UserGroupAdminPrivilege.cs 2006-06-06 12:55:52 UTC (rev 43) @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace NMail.DataTypes.ACLs { + /// <summary> + /// The possible privileges a user or group can have for editing other users and + /// groups. + /// </summary> + [FlagsAttribute] + public enum UserGroupAdminPrivilege : uint { + /// <summary> + /// No rights are granted. + /// </summary> + None = 0, + + /// <summary> + /// The right to view all users in the system. + /// </summary> + ViewAllUsers = 1, + + /// <summary> + /// The right to create new users. + /// </summary> + CreateUsers = 2, + + /// <summary> + /// The right to edit existing users. + /// </summary> + EditUsers = 4, + + /// <summary> + /// The right to delete existing users. + /// </summary> + DeleteUsers = 8, + + /// <summary> + /// The right to view all groups in the system. + /// </summary> + ViewAllGroups = 16, + + /// <summary> + /// The right to create new groups. + /// </summary> + CreateGroups = 32, + + /// <summary> + /// The right to edit existing groups. + /// </summary> + EditGroups = 64, + + /// <summary> + /// The right to delete existing groups. + /// </summary> + DeleteGroups = 128 + } +} Modified: NMail/trunk/NMail/DataTypes/Folder.cs =================================================================== --- NMail/trunk/NMail/DataTypes/Folder.cs 2006-06-06 11:44:08 UTC (rev 42) +++ NMail/trunk/NMail/DataTypes/Folder.cs 2006-06-06 12:55:52 UTC (rev 43) @@ -23,6 +23,7 @@ /// <summary> /// Represents a folder in the local store. /// </summary> + [Serializable] public class Folder { #region Constructors /// <summary> Modified: NMail/trunk/NMail/DataTypes/LocalStore/MailDomain.cs =================================================================== --- NMail/trunk/NMail/DataTypes/LocalStore/MailDomain.cs 2006-06-06 11:44:08 UTC (rev 42) +++ NMail/trunk/NMail/DataTypes/LocalStore/MailDomain.cs 2006-06-06 12:55:52 UTC (rev 43) @@ -20,6 +20,7 @@ using System.Text; using NMail; +using NMail.Authentication; using NMail.DataTypes; namespace NMail.DataTypes.LocalStore { @@ -27,6 +28,7 @@ /// A mail domain maps users and administrators to a set of hosts that the store /// accepts mail for. /// </summary> + [Serializable] public class MailDomain { public MailDomain(int mailDomainId, Host primaryHost) { this.mailDomainId = mailDomainId; @@ -61,76 +63,147 @@ } } - WildcardHost[] additionalHosts; + private List<WildcardHost> additionalHosts = new List<WildcardHost>(); /// <summary> /// Other hosts that this domain accepts mail for. /// </summary> public WildcardHost[] AdditionalHosts { get { - return this.additionalHosts; + return this.additionalHosts.ToArray(); } set { - this.additionalHosts = value; + this.additionalHosts.Clear(); + this.additionalHosts.AddRange(value); } } - private ILocalStoreUserMap[] mailboxMappings; + private List<ILocalStoreUserMap> mailboxMappings = new List<ILocalStoreUserMap>(); /// <summary> /// Gets the mailbox mappings for this domain. /// </summary> public ILocalStoreUserMap[] MailboxMappings { get { - return this.mailboxMappings; + return this.mailboxMappings.ToArray(); } set { - this.mailboxMappings = value; + this.mailboxMappings.Clear(); + this.mailboxMappings.AddRange(value); } } - private ILocalStoreDeliveryAction[] allowedActions; + private List<ILocalStoreDeliveryAction> allowedActions = new List<ILocalStoreDeliveryAction>(); /// <summary> /// The actions that user's of this domain are allowed to use. /// </summary> public ILocalStoreDeliveryAction[] AllowedActions { get { - return this.allowedActions; + return this.allowedActions.ToArray(); } - set { - this.allowedActions = value; - } + set { + this.allowedActions.Clear(); + this.allowedActions.AddRange(value); + } } - private ILocalStoreRecipientValidator[] allowedValidators; + private List<ILocalStoreRecipientValidator> allowedValidators = new List<ILocalStoreRecipientValidator>(); /// <summary> /// The validators that user's of this domain are allowed to use. /// </summary> public ILocalStoreRecipientValidator[] AllowedValidators { get { - return this.allowedValidators; + return this.allowedValidators.ToArray(); } set { - this.allowedValidators = value; + this.allowedValidators.Clear(); + this.allowedValidators.AddRange(value); } } - private ILocalStoreDeliveryAction[] defaultActions; + private List<ILocalStoreDeliveryAction> defaultActions = new List<ILocalStoreDeliveryAction>(); /// <summary> /// The default set of actions to apply to incoming messages. /// </summary> public ILocalStoreDeliveryAction[] DefaultActions { get { - return this.defaultActions; + return this.defaultActions.ToArray(); } set { - this.defaultActions = value; + this.defaultActions.Clear(); + this.defaultActions.AddRange(value); } } // TODO: add in a recipient validator tree here + + + /// <summary> + /// Maps a given mailbox to a user. + /// </summary> + /// <param name="mailbox">The mailbox to lookup.</param> + /// <returns>The username or null.</returns> + public string MapMailboxToUser(string mailbox) { + string result = null; + + // Search for a valid mapping for the mailbox + for (int i = 0; result == null && i < this.mailboxMappings.Count; i++) { + result = this.mailboxMappings[i].MapMailboxToUser(mailbox); + } + + return result; + } + + public ILocalStoreRecipientValidator GetRecipientValidator(string name) { + name = name.Trim().ToLower(); + + foreach (ILocalStoreRecipientValidator validator in this.allowedValidators) { + if (validator.Name.Trim().ToLower() == name) { + return validator; + } + } + + return null; + } + + + public ILocalStoreDeliveryAction GetDeliveryAction(string name) { + name = name.Trim().ToLower(); + + foreach (ILocalStoreDeliveryAction action in this.allowedActions) { + if (action.Name.Trim().ToLower() == name) { + return action; + } + } + + return null; + } + + /// <summary> + /// Processes the incomming message against the list of delivery actions. + /// </summary> + /// <param name="delivery">The delivery in progress.</param> + /// <param name="username">The associated username.</param> + /// <returns>The result of the delivery attempt.</returns> + public DeliveryResult ProcessDelivery(LocalStoreDelivery delivery, IAuthenticationToken username) { + for (int i = 0; i < this.defaultActions.Count; i++) { + string name = this.defaultActions[i].Name; + string data = null; + if (delivery.Recipient != null) { + data = delivery.Recipient.Mailbox.GetDataPairValue(name); + } + + DeliveryResult result = this.defaultActions[i].ProcessDelivery(delivery, username, data); + + if (result.Type != DeliveryResultType.Success) { + return result; + } + } + + return new DeliveryResult(DeliveryResultType.Success, null); + } } } Modified: NMail/trunk/NMail/DataTypes/LocalStoreGroup.cs =================================================================== --- NMail/trunk/NMail/DataTypes/LocalStoreGroup.cs 2006-06-06 11:44:08 UTC (rev 42) +++ NMail/trunk/NMail/DataTypes/LocalStoreGroup.cs 2006-06-06 12:55:52 UTC (rev 43) @@ -35,6 +35,8 @@ public LocalStoreGroup(string name, int groupId, int[] userIds, int[] groupIds) { this.name = name; this.groupId = groupId; + this.userIds = userIds; + this.groupIds = groupIds; } private string name; Modified: NMail/trunk/NMail/DataTypes/StoreFolder.cs =================================================================== --- NMail/trunk/NMail/DataTypes/StoreFolder.cs 2006-06-06 11:44:08 UTC (rev 42) +++ NMail/trunk/NMail/DataTypes/StoreFolder.cs 2006-06-06 12:55:52 UTC (rev 43) @@ -23,6 +23,7 @@ /// <summary> /// A folder that has been obtained from the local store. /// </summary> + [Serializable] public class StoreFolder : Folder { /// <summary> /// Creates a new store folder. Modified: NMail/trunk/NMail/ILocalStore.cs =================================================================== --- NMail/trunk/NMail/ILocalStore.cs 2006-06-06 11:44:08 UTC (rev 42) +++ NMail/trunk/NMail/ILocalStore.cs 2006-06-06 12:55:52 UTC (rev 43) @@ -83,6 +83,14 @@ StoreFolder GetStoreFolder(IAuthenticationToken authToken, string folder); /// <summary> + /// Gets the store folder from the given folder Id. + /// </summary> + /// <param name="authToken">The authentication credentials.</param> + /// <param name="folderId">The Id of the folder to lookup.</param> + /// <returns>The store folder or null if the folder Id is invalid.</returns> + StoreFolder GetStoreFolder(IAuthenticationToken authToken, int folderId); + + /// <summary> /// Creates a new folder. /// </summary> /// <remarks> @@ -97,9 +105,9 @@ /// Deletes an existing folder. /// </summary> /// <param name="authToken">The authentication credentials.</param> - /// <param name="folder">The folder to delete.</param> + /// <param name="folderId">The Id of the folder to delete.</param> /// <returns>The result of the delete attempt.</returns> - LocalStoreFolderResult DeleteFolder(IAuthenticationToken authToken, StoreFolder folder); + LocalStoreFolderResult DeleteFolder(IAuthenticationToken authToken, int folderId); /// <summary> /// Renames an existing folder in the local store. @@ -132,6 +140,13 @@ /// <param name="parent">The parent to get the children from.</param> /// <returns>The list of folders.</returns> StoreFolder[] GetChildren(IAuthenticationToken authToken, StoreFolder parent); + + /// <summary> + /// Gets a list of all folders + /// </summary> + /// <param name="authToken">The authentication credentials.</param> + /// <returns>The list of folders.</returns> + StoreFolder[] GetFolders(IAuthenticationToken authToken); #endregion #region Folder Subscription @@ -302,7 +317,7 @@ /// <param name="authToken">The authentication credentials.</param> /// <param name="folder">The folder to set the ACE on.</param> /// <param name="ace">The privileges and the identifier to put.</param> - void SetStoreFolderAce(IAuthenticationToken authToken, StoreFolder folder, StoreFolderAce ace); + void SetStoreFolderAce(IAuthenticationToken authToken, StoreFolder folder, GenericAce<StoreFolderPrivilege> ace); /// <summary> /// Removes any ACE associated with the given user. @@ -420,7 +435,8 @@ /// <param name="authToken">The authentication credentials.</param> /// <param name="userId">The Id of the user to add.</param> /// <param name="mailDomainId">The Id of the mail domain to add the user to.</param> - void AddUserToMailDomain(IAuthenticationToken authToken, int userId, int mailDomainId); + /// <returns>The result of the attempt to add the user to the mail domain.</returns> + LocalStoreUserResult AddUserToMailDomain(IAuthenticationToken authToken, int userId, int mailDomainId); /// <summary> /// Removes user from the given mail domain. @@ -428,7 +444,16 @@ /// <param name="authToken">The authentication credentials.</param> /// <param name="userId">The Id of the user to remove.</param> /// <param name="mailDomainId">The Id of the mail domain to revome the user from.</param> - void RemoveUserFromMailDomain(IAuthenticationToken authToken, int userId, int mailDomainId); + /// <returns>The result of the attempt to remove the user from the mail domain.</returns> + LocalStoreUserResult RemoveUserFromMailDomain(IAuthenticationToken authToken, int userId, int mailDomainId); + + /// <summary> + /// Gets a list of folder that belong to the user with the given user Id. + /// </summary> + /// <param name="authToken">The authentication credentials.</param> + /// <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 or unauthorized.</returns> + StoreFolder[] GetUserFolders(IAuthenticationToken authToken, int userId); #endregion #region Group Management @@ -471,21 +496,40 @@ /// <returns>The result of the attempt to delete a group.</returns> LocalStoreGroupResult DeleteGroup(IAuthenticationToken authToken, int groupId); - /// <summary> - /// Updates the any changes to the group into the local store. - /// </summary> - /// <param name="authToken">The authentication credentials.</param> - /// <param name="group">The group details to update.</param> - /// <returns>The result of the attempt to update the group.</returns> - LocalStoreGroupResult UpdateGroup(IAuthenticationToken authToken, LocalStoreGroup group); + /// <summary> + /// Renames the group. + /// </summary> + /// <param name="authToken">The authentication credentials.</param> + /// <param name="groupId">The Id of the group to delete.</param> + /// <param name="newName">The new name for the group.</param> + /// <returns>The result of the attempt to rename the group.</returns> + LocalStoreGroupResult RenameGroup(IAuthenticationToken authToken, LocalStoreGroup group); + /// <summary> + /// Adds a child group to the given group. + /// </summary> + /// <param name="authToken">The authentication credentials.</param> + /// <param name="groupId">The child group to add.</param> + /// <param name="parentId">The group to add the child to.</param> + /// <returns>The result of the attempt to add.</returns> + LocalStoreGroupResult AddGroupToGroup(IAuthenticationToken authToken, int parentId, int groupId); + + /// <summary> + /// Removes a child group from the given group. + /// </summary> + /// <param name="authToken">The authentication credentials.</param> + /// <param name="groupId">The child group to remove.</param> + /// <param name="parentId">The group to remove the child from.</param> + /// <returns>The result of the attempt to remove.</returns> + LocalStoreGroupResult RemoveGroupFromGroup(IAuthenticationToken authToken, int parentId, int groupId); + /// <summary> /// Adds a group to the given mail domain. /// </summary> /// <param name="authToken">The authentication credentials.</param> /// <param name="groupId">The Id of the group to add.</param> /// <param name="mailDomainId">The Id of the mail domain to add the group to.</param> - void AddGroupToMailDomain(IAuthenticationToken authToken, int groupId, int mailDomainId); + LocalStoreGroupResult AddGroupToMailDomain(IAuthenticationToken authToken, int groupId, int mailDomainId); /// <summary> /// Removes group from the given mail domain. @@ -493,7 +537,7 @@ /// <param name="authToken">The authentication credentials.</param> /// <param name="groupId">The Id of the group to remove.</param> /// <param name="mailDomainId">The Id of the mail domain to revome the group from.</param> - void RemoveGroupFromMailDomain(IAuthenticationToken authToken, int groupId, int mailDomainId); + LocalStoreGroupResult RemoveGroupFromMailDomain(IAuthenticationToken authToken, int groupId, int mailDomainId); #endregion #region Mail Domain Management @@ -504,13 +548,13 @@ /// <returns>The mail domains.</returns> MailDomain[] GetMailDomains(IAuthenticationToken authToken); - /// <summary> - /// Creates a new mail domain. - /// </summary> - /// <param name="authToken">The authentication credentials.</param> - /// <param name="primaryHost">The primary host for the mail domain.</param> - /// <returns>The result of the attempt to create the mail domain.</returns> - LocalStoreMailDomainResult CreateMailDomain(IAuthenticationToken authToken, Host primaryHost); + /// <summary> + /// Adds a new mail domain. + /// </summary> + /// <param name="authToken">The authentication credentials.</param> + /// <param name="mailDomain">The mail domain to add.</param> + /// <returns>The result of the attempt to add the mail domain.</returns> + LocalStoreMailDomainResult AddMailDomain(IAuthenticationToken authToken, MailDomain mailDomain); /// <summary> /// Deletes a mail domain from the local store. @@ -546,6 +590,54 @@ /// <returns>The list of user Ids.</returns> int[] GetMailDomainUsers(IAuthenticationToken authToken, int mailDomainId); #endregion + + #region System ACL + /// <summary> + /// Sets the system privileges for the associated identifier. If no ACE exists for + /// the associated identifier one is added. + /// </summary> + /// <param name="authToken">The authentication credentials.</param> + /// <param name="ace">The privileges and the identifier to put.</param> + void SetSystemPrivilegeAce(IAuthenticationToken authToken, GenericAce<SystemPrivilege> ace); + + /// <summary> + /// Removes any ACE associated with the given identifier. + /// </summary> + /// <param name="authToken">The authentication credentials.</param> + /// <param name="identifier">The identifier to remove from the ACL.</param> + void RemoveSystemPrivilegeAce(IAuthenticationToken authToken, string identifier); + + /// <summary> + /// Gets the system ACL. + /// </summary> + /// <param name="authToken">The authentication credentials.</param> + /// <returns>The system ACL or null if insufficient privileges.</returns> + GenericAcl<SystemPrivilege> GetSystemPrivilegeAcl(IAuthenticationToken authToken); + #endregion + + #region User and Group Administration + /// <summary> + /// Get the ACL that lists user's privileges for user and group administration. + /// </summary> + /// <param name="user">The user trying to get the admin ACL.</param> + /// <returns>The ACL or null if insufficient privileges.</returns> + GenericAcl<UserGroupAdminPrivilege> GetAdministrationAcl(IAuthenticationToken user); + + /// <summary> + /// Sets the administration privileges for the associated identifier. + /// If no ACE exists for the associated identifier one is added. + /// </summary> + /// <param name="authToken">The authentication credentials.</param> + /// <param name="ace">The privileges and the identifier to put.</param> + void SetAdministrationAce(IAuthenticationToken authToken, GenericAce<SystemPrivilege> ace); + + /// <summary> + /// Removes any ACE associated with the given identifier. + /// </summary> + /// <param name="authToken">The authentication credentials.</param> + /// <param name="identifier">The identifier to remove from the ACL.</param> + void RemoveAdministrationAce(IAuthenticationToken authToken, string identifier); + #endregion } /// <summary> @@ -555,29 +647,29 @@ /// <summary> /// The operation was completed successfully. /// </summary> - OkSuccessful, + OkSuccessful = 0, /// <summary> /// The create or rename failed because a folder with the same name already existed. /// </summary> - AlreadyExists, + AlreadyExists = 1, /// <summary> /// The folder was not deleted because it contained child folders. /// </summary> - HasChildren, + HasChildren = 2, /// <summary> /// The operation failed because the source 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, + NonExistent = 3, /// <summary> /// The user is not permitted to perform the operation. /// </summary> - NotPermitted + NotPermitted = 4 } /// <summary> @@ -587,27 +679,42 @@ /// <summary> /// The operation completed successfully. /// </summary> - OkSuccessful, + OkSuccessful = 0, /// <summary> /// A user with the same name already exists. /// </summary> - AlreadyExists, + AlreadyExists = 1, /// <summary> /// No matching user exists in the local store. /// </summary> - NoSuchUser, + NoSuchUser = 2, /// <summary> + /// Cannot add or remove the user from the mail domain because it doens't exist. + /// </summary> + NoSuchMailDomain = 3, + + /// <summary> /// The user cannot be deleted because they still own folders. /// </summary> - UserStillHasFolders, + UserStillHasFolders = 4, /// <summary> /// The user is not permitted to perform the operation. /// </summary> - NotPermitted + NotPermitted = 5, + + /// <summary> + /// The user cannot be created because there is existing folders with the same details. + /// </summary> + FoldersAlreadyExist = 6, + + /// <summary> + /// An unknown error occurred trying to perform the operation. + /// </summary> + UnkownError = 7 } /// <summary> @@ -617,22 +724,27 @@ /// <summary> /// The operation completed successfully. /// </summary> - OkSuccessful, + OkSuccessful = 0, /// <summary> /// A group with the same name already exists. /// </summary> - AlreadyExists, + AlreadyExists = 1, /// <summary> /// No matching group exists in the local store. /// </summary> - NoSuchUser, + NoSuchGroup = 2, /// <summary> + /// Cannot add or remove the group from the mail domain because it doens't exist. + /// </summary> + NoSuchMailDomain = 3, + + /// <summary> /// The user is not permitted to perform the operation. /// </summary> - NotPermitted + NotPermitted = 4 } /// <summary> @@ -642,21 +754,21 @@ /// <summary> /// The operation completed successfully. /// </summary> - OkSuccessful, + OkSuccessful = 0, /// <summary> /// A mail domain with the same primary host already exists. /// </summary> - AlreadyExists, + AlreadyExists = 1, /// <summary> /// No matching mail domain exists in the local store. /// </summary> - NoSuchMailDomain, + NoSuchMailDomain = 2, /// <summary> /// The user is not permitted to perform the operation. /// </summary> - NotPermitted + NotPermitted = 3 } } Modified: NMail/trunk/NMail/ILocalStoreData.cs =================================================================== --- NMail/trunk/NMail/ILocalStoreData.cs 2006-06-06 11:44:08 UTC (rev 42) +++ NMail/trunk/NMail/ILocalStoreData.cs 2006-06-06 12:55:52 UTC (rev 43) @@ -58,6 +58,13 @@ StoreFolder GetStoreFolder(Folder folder); /// <summary> + /// Gets the store folder from the given folder Id. + /// </summary> + /// <param name="folderId">The Id of the folder to lookup.</param> + /// <returns>The store folder or null if the folder Id is invalid.</returns> + StoreFolder GetStoreFolder(int folderId); + + /// <summary> /// Gets the parent folder for the given folder. /// </summary> /// <param name="folder">The folder to lookup the parent of.</param> @@ -71,15 +78,15 @@ /// 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 newly created folder details.</returns> - StoreFolder CreateFolder(string userName, StoreFolder parent, Folder newFolder); + /// <returns>The result of the attempt to create the folder.</returns> + LocalStoreFolderResult CreateFolder(int userId, StoreFolder parent, Folder newFolder); /// <summary> /// Deletes an existing folder. /// </summary> - /// <param name="folder">The folder to delete.</param> + /// <param name="folderId">The Id of the folder to delete.</param> /// <returns>The result of the delete attempt.</returns> - LocalStoreFolderResult DeleteFolder(StoreFolder folder); + LocalStoreFolderResult DeleteFolder(int folderId); /// <summary> /// Renames an existing folder in the local store. @@ -102,6 +109,12 @@ /// <param name="parent">The parent to get the children from.</param> /// <returns>The list of folders.</returns> StoreFolder[] GetChildren(StoreFolder parent); + + /// <summary> + /// Gets a list of all folders + /// </summary> + /// <returns>The list of folders.</returns> + StoreFolder[] GetFolders(); #endregion #region Folder Subscription @@ -267,7 +280,7 @@ /// </summary> /// <param name="folder">The folder to set the ACE on.</param> /// <param name="ace">The privileges and the identifier to put.</param> - void SetStoreFolderAce(StoreFolder folder, StoreFolderAce ace); + void SetStoreFolderAce(StoreFolder folder, GenericAce<StoreFolderPrivilege> ace); /// <summary> /// Removes any ACE associated with the given user. @@ -317,7 +330,7 @@ /// </summary> /// <param name="username">The username to lookup.</param> /// <returns>The user Id or null if non is found.</returns> - int GetUserId(string username); + int? GetUserId(string username); /// <summary> /// Creates a new user in the local store and creates an initial folder. @@ -347,14 +360,21 @@ /// </summary> /// <param name="userId">The Id of the user to add.</param> /// <param name="mailDomainId">The Id of the mail domain to add the user to.</param> - void AddUserToMailDomain(int userId, int mailDomainId); + LocalStoreUserResult AddUserToMailDomain(int userId, int mailDomainId); /// <summary> /// Removes user from the given mail domain. /// </summary> /// <param name="userId">The Id of the user to remove.</param> /// <param name="mailDomainId">The Id of the mail domain to revome the user from.</param> - void RemoveUserFromMailDomain(int userId, int mailDomainId); + LocalStoreUserResult RemoveUserFromMailDomain(int userId, int mailDomainId); + + /// <summary> + /// Gets a list of folder 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> + StoreFolder[] GetUserFolders(int userId); #endregion #region Group Management @@ -393,25 +413,44 @@ LocalStoreGroupResult DeleteGroup(int groupId); /// <summary> - /// Updates the any changes to the group into the local store. - /// </summary> - /// <param name="group">The group details to update.</param> - /// <returns>The result of the attempt to update the group.</returns> - LocalStoreGroupResult UpdateGroup(LocalStoreGroup group); + /// Renames the group. + /// </summary> + /// <param name="groupId">The Id of the group to delete.</param> + /// <param name="newName">The new name for the group.</param> + /// <returns>The result of the attempt to rename the group.</returns> + LocalStoreGroupResult RenameGroup(int groupId, string newName); + + /// <summary> + /// Adds a child group to the given group. + /// </summary> + /// <param name="groupId">The child group to add.</param> + /// <param name="parentId">The group to add the child to.</param> + /// <returns>The result of the attempt to add.</returns> + LocalStoreGroupResult AddGroupToGroup(int parentId, int groupId); + + /// <summary> + /// Removes a child group from the given group. + /// </summary> + /// <param name="groupId">The child group to remove.</param> + /// <param name="parentId">The group to remove the child from.</param> + /// <returns>The result of the attempt to remove.</returns> + LocalStoreGroupResult RemoveGroupFromGroup(int parentId, int groupId); /// <summary> /// Adds a group to the given mail domain. /// </summary> /// <param name="groupId">The Id of the group to add.</param> /// <param name="mailDomainId">The Id of the mail domain to add the group to.</param> - void AddGroupToMailDomain(int groupId, int mailDomainId); + /// <returns>The result of the attempt to add.</returns> + LocalStoreGroupResult AddGroupToMailDomain(int groupId, int mailDomainId); /// <summary> /// Removes group from the given mail domain. /// </summary> /// <param name="groupId">The Id of the group to remove.</param> - /// <param name="mailDomainId">The Id of the mail domain to revome the group from.</param> - void RemoveGroupFromMailDomain(int groupId, int mailDomainId); + /// <param name="mailDomainId">The Id of the mail domain to revome the group from.</param> + /// <returns>The result of the attempt to remove.</returns> + LocalStoreGroupResult RemoveGroupFromMailDomain(int groupId, int mailDomainId); #endregion #region Mail Domain Management @@ -422,11 +461,11 @@ MailDomain[] GetMailDomains(); /// <summary> - /// Creates a new mail domain. + /// Adds a new mail domain. /// </summary> - /// <param name="primaryHost">The primary host for the mail domain.</param> - /// <returns>The result of the attempt to create the mail domain.</returns> - LocalStoreMailDomainResult CreateMailDomain(Host primaryHost); + /// <param name="mailDomain">The mail domain to add.</param> + /// <returns>The result of the attempt to add the mail domain.</returns> + LocalStoreMailDomainResult AddMailDomain(MailDomain mailDomain); /// <summary> /// Deletes a mail domain from the local store. @@ -458,5 +497,26 @@ /// <returns>The list of user Ids.</returns> int[] GetMailDomainUsers(int mailDomainId); #endregion + + #region System ACL + /// <summary> + /// Sets the system privileges for the associated identifier. If no ACE exists for + /// the associated identifier one is added. + /// </summary> + /// <param name="ace">The privileges and the identifier to put.</param> + void SetSystemPrivilegeAce(GenericAce<SystemPrivilege> ace); + + /// <summary> + /// Removes any ACE associated with the given identifier. + /// </summary> + /// <param name="identifier">The identifier to remove from the ACL.</param> + void RemoveSystemPrivilegeAce(string identifier); + + /// <summary> + /// Gets the system ACL. + /// </summary> + /// <returns>The system ACL.</returns> + GenericAcl<SystemPrivilege> GetSystemPrivilegeAcl(); + #endregion } } Modified: NMail/trunk/NMail/ILocalStoreDeliveryAction.cs =================================================================== --- NMail/trunk/NMail/ILocalStoreDeliveryAction.cs 2006-06-06 11:44:08 UTC (rev 42) +++ NMail/trunk/NMail/ILocalStoreDeliveryAction.cs 2006-06-06 12:55:52 UTC (rev 43) @@ -26,12 +26,11 @@ /// An action that can occur during delivery into the local store. /// </summary> public interface ILocalStoreDeliveryAction { - /// <summary> - /// Sets up the instance of the action using the configuration in the XML node. - /// </summary> - /// <remarks>This will only be called if the validator is part of the default validator.</remarks> - /// <param name="node">The configuration node.</param> - void Create(XmlNode node); + /// <summary> + /// The name of the delivery action. E.g. "move" or "copy". + /// </summary> + /// <remarks>This is the key used to lookup data in the mailbox part of an address.</remarks> + string Name { get; } /// <summary> /// Passes the local store delivery data through this action. Modified: NMail/trunk/NMail/ILocalStoreRecipientValidator.cs =================================================================== --- NMail/trunk/NMail/ILocalStoreRecipientValidator.cs 2006-06-06 11:44:08 UTC (rev 42) +++ NMail/trunk/NMail/ILocalStoreRecipientValidator.cs 2006-06-06 12:55:52 UTC (rev 43) @@ -26,12 +26,11 @@ /// A validation that can be performed on a recipient before accepting delivery. /// </summary> public interface ILocalStoreRecipientValidator { - /// <summary> - /// Sets up the instance of the validator using the configuration in the XML node. - /// </summary> - /// <remarks>This will only be called if the validator is part of the default validator.</remarks> - /// <param name="node">The configuration node.</param> - void Create(XmlNode node); + /// <summary> + /// The name of the validator. E.g. "date" or "sender". + /// </summary> + /// <remarks>This is the key used to lookup data in the mailbox part of an address.</remarks> + string Name { get; } /// <summary> /// Checks if the given recipient will be accepted for delivery. Modified: NMail/trunk/NMail/IO/TcpChannel.cs =================================================================== --- NMail/trunk/NMail/IO/TcpChannel.cs 2006-06-06 11:44:08 UTC (rev 42) +++ NMail/trunk/NMail/IO/TcpChannel.cs 2006-06-06 12:55:52 UTC (rev 43) @@ -39,6 +39,12 @@ private TcpServerChannel serverChannel; public TcpChannel(IDictionary properties, IClientChannelSinkProvider clientSinkProvider, IServerChannelSinkProvider serverSinkProvider) { + // Parse common properties + bool useTls = true; + if (properties.Contains("useTls")) { + useTls = (bool) properties["useTls"]; + } + // Create the client sink provider if needed if (clientSinkProvider == null) { clientSinkProvider = new BinaryClientFormatterSinkProvider(); @@ -52,7 +58,8 @@ this.clientChannel = new TcpClientChannel(clientSinkProvider, getAuthDetailsCallback, certValidationCallback, - authCompleteCallback); + authCompleteCallback, + useTls); if (properties["isServer"] != null && ((string) properties["isServer"]) == "yes") { // Create the server sink provider if needed @@ -68,7 +75,8 @@ this.serverChannel = new TcpServerChannel(port, certificate, authProvider, - serverSinkProvider); + serverSinkProvider, + useTls); } } Modified: NMail/trunk/NMail/IO/TcpClientChannel.cs =================================================================== --- NMail/trunk/NMail/IO/TcpClientChannel.cs 2006-06-06 11:44:08 UTC (rev 42) +++ NMail/trunk/NMail/IO/TcpClientChannel.cs 2006-06-06 12:55:52 UTC (rev 43) @@ -48,21 +48,11 @@ /// Creates a new client channel with the given provider. /// </summary> /// <param name="clientSinkProvider">The provider to use.</param> - public TcpClientChannel(IClientChannelSinkProvider clientSinkProvider, GetAuthDetailsDelegate getAuthDetailsCallback, ChannelAuthComplete authCompleteCallback) { - this.clientSinkProvider = clientSinkProvider; - - this.transportSinkProvider = new TcpClientTransportSinkProvider(getAuthDetailsCallback, null, authCompleteCallback); - } - - /// <summary> - /// Creates a new client channel with the given provider. - /// </summary> - /// <param name="clientSinkProvider">The provider to use.</param> /// <param name="certValidationCallback">The certificate to use to validate the remote server's certificate.</param> - public TcpClientChannel(IClientChannelSinkProvider clientSinkProvider, GetAuthDetailsDelegate getAuthDetailsCallback, RemoteCertificateValidationCallback certValidationCallback, ChannelAuthComplete authCompleteCallback) { + public TcpClientChannel(IClientChannelSinkProvider clientSinkProvider, GetAuthDetailsDelegate getAuthDetailsCallback, RemoteCertificateValidationCallback certValidationCallback, ChannelAuthComplete authCompleteCallback, bool useTls) { this.clientSinkProvider = clientSinkProvider; - this.transportSinkProvider = new TcpClientTransportSinkProvider(getAuthDetailsCallback, certValidationCallback, authCompleteCallback); + this.transportSinkProvider = new TcpClientTransportSinkProvider(getAuthDetailsCallback, certValidationCallback, authCompleteCallback, useTls); if (this.clientSinkProvider == null) { this.clientSinkProvider = new BinaryClientFormatterSinkProvider(); Modified: NMail/trunk/NMail/IO/TcpClientTransportSink.cs =================================================================== --- NMail/trunk/NMail/IO/TcpClientTransportSink.cs 2006-06-06 11:44:08 UTC (rev 42) +++ NMail/trunk/NMail/IO/TcpClientTransportSink.cs 2006-06-06 12:55:52 UTC (rev 43) @@ -62,16 +62,19 @@ ChannelAuthComplete authCompleteCallback; + private bool useTls; + /// <summary> /// Creates a new sink with the given url. /// </summary> /// <param name="url">The URL to connect to.</param> /// <param name="remoteChannelData">Channel data optionally containing the URL.</param> /// <param name="certValidationCallback">The callback to use to validate the remote certificate.</param> - public TcpClientTransportSink(string url, object remoteChannelData, GetAuthDetailsDelegate getAuthDetailsCallback, RemoteCertificateValidationCallback certValidationCallback, ChannelAuthComplete authCompleteCallback) { + public TcpClientTransportSink(string url, object remoteChannelData, GetAuthDetailsDelegate getAuthDetailsCallback, RemoteCertificateValidationCallback certValidationCallback, ChannelAuthComplete authCompleteCallback, bool useTls) { this.getAuthDetailsCallback = getAuthDetailsCallback; this.certValidationCallback = certValidationCallback; this.authCompleteCallback = authCompleteCallback; + this.useTls = useTls; if (TcpChannel.ValidUrl(url)) { string objectURI; @@ -225,33 +228,39 @@ if (response.Trim().ToLower() == "nmail remoting channel") { this.connection.WriteLine("OK"); - // Go encrypted... - if (this.certValidationCallback == null) { - this.connection.StartTlsAsClient(this.host.ToString()); - } else { - this.connection.StartTlsAsClient(this.host.ToString(), this.certValidationCallback); - } + if (this.useTls) + { + // Go encrypted... + if (this.certValidationCallback == null) + { + this.connection.StartTlsAsClient(this.host.ToString()); + } + else + { + this.connection.StartTlsAsClient(this.host.ToString(), this.certValidationCallback); + } - if (this.connection.Encrypted) { - while (this.connection.Connected && this.authToken == null) { - // Get the auth details - TcpUserPasswordPair authDetails = this.getAuthDetailsCallback(this); - - // Send them to the server - this.connection.Write(authDetails); - this.authToken = (IAuthenticationToken) this.connection.Read(); - } + if (!this.connection.Encrypted) + { + throw new InvalidOperationException("Failed to establish a secure connection to the server."); + } + } - if (this.authToken == null) { - throw new InvalidOperationException("Failed to authenticated to the server."); - } + while (this.connection.Connected && this.authToken == null) { + // Get the auth details + TcpUserPasswordPair authDetails = this.getAuthDetailsCallback(this); + + // Send them to the server + this.connection.Write(authDetails); + this.authToken = (IAuthenticationToken) this.connection.Read(); + } - // Notify the caller that the auth token has arrived - this.authCompleteCallback(authToken); + if (this.authToken == null) { + throw new InvalidOperationException("Failed to authenticated to the server."); + } - } else { - throw new InvalidOperationException("Failed to establish a secure connection to the server."); - } + // Notify the caller that the auth token has arrived + this.authCompleteCallback(authToken); } } } Modified: NMail/trunk/NMail/IO/TcpClientTransportSinkProvider.cs =================================================================== --- NMail/trunk/NMail/IO/TcpClientTransportSinkProvider.cs 2006-06-06 11:44:08 UTC (rev 42) +++ NMail/trunk/NMail/IO/TcpClientTransportSinkProvider.cs 2006-06-06 12:55:52 UTC (rev 43) @@ -44,14 +44,17 @@ private ChannelAuthComplete authCompleteCallback; + private bool useTls; + /// <summary> /// Creates a new provider with the given certificate validation callback. /// </summary> /// <param name="certValidationCallback">The callback to use to validation teh remote server's certificate null for the default.</param> - public TcpClientTransportSinkProvider(GetAuthDetailsDelegate getAuthDetailsCallback, RemoteCertificateValidationCallback certValidationCallback, ChannelAuthComplete authCompleteCallback) { + public TcpClientTransportSinkProvider(GetAuthDetailsDelegate getAuthDetailsCallback, RemoteCertificateValidationCallback certValidationCallback, ChannelAuthComplete authCompleteCallback, bool useTls) { this.getAuthDetailsCallback = getAuthDetailsCallback; this.certValidationCallback = certValidationCallback; this.authCompleteCallback = authCompleteCallback; + this.useTls = useTls; } #region IClientChannelSinkProvider Members @@ -91,7 +94,7 @@ // Create a transport if needed if (!sinkMap.ContainsKey(key)) { - this.sinkMap.Add(key, new TcpClientTransportSink(url, remoteChannelData, this.getAuthDetailsCallback, this.certValidationCallback, this.authCompleteCallback)); + this.sinkMap.Add(key, new TcpClientTransportSink(url, remoteChannelData, this.getAuthDetailsCallback, this.certValidationCallback, this.authCompleteCallback, this.useTls)); } return this.sinkMap[key]; Modified: NMail/trunk/NMail/IO/TcpServerChannel.cs =================================================================== --- NMail/trunk/NMail/IO/TcpServerChannel.cs 2006-06-06 11:44:08 UTC (rev 42) +++ NMail/trunk/NMail/IO/TcpServerChannel.cs 2006-06-06 12:55:52 UTC (rev 43) @@ -68,16 +68,19 @@ /// </summary> private IServerChannelSink nextSink; + private bool useTls; + /// <summary> /// Creates a new server channel with the given details. /// </summary> /// <param name="port">The port to listen on.</param> /// <param name="certificate">The certificate to use for SSL.</param> /// <param name="serverSinkProvider">The provider.</param> - public TcpServerChannel(int port, X509Certificate2 certificate, IAuthenticationProvider authProvider, IServerChannelSinkProvider serverSinkProvider) { + public TcpServerChannel(int port, X509Certificate2 certificate, IAuthenticationProvider authProvider, IServerChannelSinkProvider serverSinkProvider, bool useTls) { this.port = port; this.certificate = certificate; this.authProvider = authProvider; + this.useTls = useTls; // This is needed to report a valid IP to clients asking for channel data IPHostEntry hostEntry = Dns.GetHostEntry(Dns.GetHostName()); @@ -238,7 +241,7 @@ while (true) { Socket client = socket.AcceptSocket(); - new TcpServerTransportSink(this.nextSink, this.certificate, this.authProvider, client); + new TcpServerTransportSink(this.nextSink, this.certificate, this.authProvider, client, this.useTls); } } catch (SocketException e) { // Ignore interrupted exception during shutdown Modified: NMail/trunk/NMail/IO/TcpServerTransportSink.cs =================================================================== --- NMail/trunk/NMail/IO/TcpServerTransportSink.cs 2006-06-06 11:44:08 UTC (rev 42) +++ NMail/trunk/NMail/IO/TcpServerTransportSink.cs 2006-06-06 12:55:52 UTC (rev 43) @@ -54,17 +54,20 @@ protected IAuthenticationProvider authProvider; + private bool useTls; + /// <summary> /// Creates a new transport sink with the given details. /// </summary> /// <param name="nextSink">The next sink in the chain.</param> /// <param name="certificate">The certificate to use in SSL.</param> /// <param name="client">The socket to the remote client.</param> - public TcpServerTransportSink(IServerChannelSink nextSink, X509Certificate2 certificate, IAuthenticationProvider authProvider, Socket client) { + public TcpServerTransportSink(IServerChannelSink nextSink, X509Certificate2 certificate, IAuthenticationProvider authProvider, Socket client, bool useTls) { this.nextSink = nextSink; this.connection.Create(client); this.connection.Certificate = certificate; this.authProvider = authProvider; + this.useTls = useTls; // Create a new thread to read requests with ThreadHelper th = new ThreadHelper(new WaitCallback(processConnection), null); @@ -90,8 +93,11 @@ this.connection.Close(); } - // Go encrypted... - this.connection.StartTlsAsServer(); + if (this.useTls) + { + // Go encrypted... + this.connection.StartTlsAsServer(); + } int authAttempts = 0; bool authenticated = false; Modified: NMail/trunk/NMail/NMail.csproj =================================================================== --- NMail/trunk/NMail/NMail.csproj 2006-06-06 11:44:08 UTC (rev 42) +++ NMail/trunk/NMail/NMail.csproj 2006-06-06 12:55:52 UTC (rev 43) @@ -122,12 +122,13 @@ <Compile Include="Configuration\ObjectConfigurationElement.cs" /> <Compile Include="Configuration\ObjectConfigurationElementCollection.cs" /> <Compile Include="Configuration\WildcardHostElementCollection.cs" /> + <Compile Include="DataTypes\ACLs\SystemPrivilege.cs" /> <Compile Include="DataTypes\ACLs\GenericAce.cs" /> <Compile Include="DataTypes\ACLs\GenericAcl.cs" /> <Compile Include="DataTypes\ACLs\MailDomainPrivilege.cs" /> - <Compile Include="DataTypes\ACLs\StoreFolderAce.cs" /> <Compile Include="DataTypes\ACLs\StoreFolderAcl.cs" /> <Compile Include="DataTypes\ACLs\StoreFolderPrivilege.cs" /> + <Compile Include="DataTypes\ACLs\UserGroupAdminPrivilege.cs" /> <Compile Include="DataTypes\LocalStoreGro... [truncated message content] |
From: <tmy...@us...> - 2006-07-01 09:42:41
|
Revision: 54 Author: tmyroadctfig Date: 2006-07-01 02:39:32 -0700 (Sat, 01 Jul 2006) ViewCVS: http://svn.sourceforge.net/nmailserver/?rev=54&view=rev Log Message: ----------- Merged in changes from development branch. Modified Paths: -------------- NMail/trunk/Installer/NMail-Installer.wxs NMail/trunk/Installer/NMail-installer.build NMail/trunk/NDns/NDns.xml NMail/trunk/NMail/Authentication/IAuthenticationProvider.cs NMail/trunk/NMail/Authentication/NullAuthentication.cs NMail/trunk/NMail/DataTypes/ACLs/GenericAce.cs NMail/trunk/NMail/DataTypes/ACLs/GenericAcl.cs NMail/trunk/NMail/DataTypes/ACLs/StoreFolderAcl.cs NMail/trunk/NMail/DataTypes/ACLs/StoreFolderPrivilege.cs NMail/trunk/NMail/DataTypes/LocalStore/MailDomain.cs NMail/trunk/NMail/DataTypes/Message.cs NMail/trunk/NMail/DataTypes/StoreFolder.cs NMail/trunk/NMail/ILocalStore.cs NMail/trunk/NMail/ILocalStoreData.cs NMail/trunk/NMail/ISpoolData.cs NMail/trunk/NMail/NMail.csproj NMail/trunk/NMail.Administration.Console/Command/AddMailDomainCommand.cs NMail/trunk/NMail.Administration.Web/App_Code/FolderDataSource.cs NMail/trunk/NMail.Administration.Web/App_Code/MailDomainDataSource.cs NMail/trunk/NMail.Administration.Web/App_Code/UserDataSource.cs NMail/trunk/NMail.Administration.Web/CreateFolder.aspx NMail/trunk/NMail.Administration.Web/CreateFolder.aspx.cs NMail/trunk/NMail.Administration.Web/CreateUser.aspx NMail/trunk/NMail.Administration.Web/CreateUser.aspx.cs NMail/trunk/NMail.Administration.Web/FolderDetails.aspx NMail/trunk/NMail.Administration.Web/FolderDetails.aspx.cs NMail/trunk/NMail.Administration.Web/Login.aspx NMail/trunk/NMail.Administration.Web/Login.aspx.cs NMail/trunk/NMail.Administration.Web/MailDomainDetails.aspx NMail/trunk/NMail.Administration.Web/MailDomainDetails.aspx.cs NMail/trunk/NMail.Administration.Web/MasterPage.master NMail/trunk/NMail.Administration.Web/StyleSheet.css NMail/trunk/NMail.Administration.Web/UserDetails.aspx NMail/trunk/NMail.Administration.Web/UserDetails.aspx.cs NMail/trunk/NMail.Administration.Web/ViewFolders.aspx NMail/trunk/NMail.Administration.Web/ViewFolders.aspx.cs NMail/trunk/NMail.Administration.Web/ViewMailDomains.aspx NMail/trunk/NMail.Administration.Web/ViewMailDomains.aspx.cs NMail/trunk/NMail.Administration.Web/ViewUsers.aspx NMail/trunk/NMail.Administration.Web/Web.sitemap NMail/trunk/NMail.ImapService/State/AuthenticatedState.cs NMail/trunk/NMail.ImapService/State/ExamineState.cs NMail/trunk/NMail.LocalStore/LocalStore.cs NMail/trunk/NMail.LocalStoreData.MySql/MySqlLocalStore.sql NMail/trunk/NMail.LocalStoreData.MySql/MySqlLocalStoreData.cs NMail/trunk/NMail.Server/NMail.Server.csproj NMail/trunk/NMail.Server/RemoteAdministration.cs NMail/trunk/NMail.SmtpService/SmtpService.cs NMail/trunk/NMail.build NMail/trunk/NMail.sln NMail/trunk/doc/NMail User's Guide.doc Added Paths: ----------- NMail/trunk/Installer/WixLib/sca.wixlib NMail/trunk/Installer/WixLib/scaexec.dll NMail/trunk/Installer/WixLib/scasched.dll NMail/trunk/Installer/WixLib/wixui_featuretree.wixlib NMail/trunk/NMail/DataTypes/Envelope.cs NMail/trunk/NMail.Administration.Web/Bin/NMail.Server.dll.refresh NMail/trunk/NMail.Administration.Web/Bin/NMail.dll.refresh NMail/trunk/NMail.Administration.Web/Bin/log4net.dll.refresh NMail/trunk/NMail.Administration.Web/CreateMailDomain.aspx NMail/trunk/NMail.Administration.Web/CreateMailDomain.aspx.cs NMail/trunk/NMail.Administration.Web/Images/GreenLight.png NMail/trunk/NMail.Administration.Web/Images/Tango/ NMail/trunk/NMail.Administration.Web/Images/Tango/Delete.png NMail/trunk/NMail.Administration.Web/Images/Tango/Error.png NMail/trunk/NMail.Administration.Web/Images/Tango/Group.png NMail/trunk/NMail.Administration.Web/Images/Tango/License.txt NMail/trunk/NMail.Administration.Web/Images/Tango/MailDomain.png NMail/trunk/NMail.Administration.Web/Images/Tango/NewFolder.png NMail/trunk/NMail.Administration.Web/Images/Tango/OpenFolder.png NMail/trunk/NMail.Administration.Web/Images/Tango/Question.png NMail/trunk/NMail.Administration.Web/Images/Tango/Thumbs.db NMail/trunk/NMail.Administration.Web/Images/Tango/User.png NMail/trunk/NMail.Administration.Web/Images/Tango/Warning.png NMail/trunk/NMail.Administration.Web/Images/nmail-logo-white.png NMail/trunk/NMail.Administration.Web/SetPasswordPanel.ascx NMail/trunk/NMail.Administration.Web/SetPasswordPanel.ascx.cs NMail/trunk/NMail.Administration.Web/SpoolDetails.aspx NMail/trunk/NMail.Administration.Web/SpoolDetails.aspx.cs NMail/trunk/NMail.Administration.Web/TaskList.ascx NMail/trunk/NMail.Administration.Web/TaskList.ascx.cs NMail/trunk/NMail.PostInstall/ NMail/trunk/NMail.PostInstall/NMail.PostInstall.csproj NMail/trunk/NMail.PostInstall/PostInstallForm.Designer.cs NMail/trunk/NMail.PostInstall/PostInstallForm.cs NMail/trunk/NMail.PostInstall/PostInstallForm.resx NMail/trunk/NMail.PostInstall/Program.cs NMail/trunk/NMail.PostInstall/Properties/ NMail/trunk/NMail.PostInstall/Properties/AssemblyInfo.cs NMail/trunk/NMail.PostInstall/Properties/Resources.Designer.cs NMail/trunk/NMail.PostInstall/Properties/Resources.resx NMail/trunk/NMail.PostInstall/Properties/Settings.Designer.cs NMail/trunk/NMail.PostInstall/Properties/Settings.settings Removed Paths: ------------- NMail/trunk/Installer/WixLib/wixui_minimal.wixlib NMail/trunk/NMail.Administration.Web/Images/Tango/Delete.png NMail/trunk/NMail.Administration.Web/Images/Tango/Error.png NMail/trunk/NMail.Administration.Web/Images/Tango/Group.png NMail/trunk/NMail.Administration.Web/Images/Tango/License.txt NMail/trunk/NMail.Administration.Web/Images/Tango/MailDomain.png NMail/trunk/NMail.Administration.Web/Images/Tango/NewFolder.png NMail/trunk/NMail.Administration.Web/Images/Tango/OpenFolder.png NMail/trunk/NMail.Administration.Web/Images/Tango/Question.png NMail/trunk/NMail.Administration.Web/Images/Tango/Thumbs.db NMail/trunk/NMail.Administration.Web/Images/Tango/User.png NMail/trunk/NMail.Administration.Web/Images/Tango/Warning.png NMail/trunk/NMail.PostInstall/NMail.PostInstall.csproj NMail/trunk/NMail.PostInstall/PostInstallForm.Designer.cs NMail/trunk/NMail.PostInstall/PostInstallForm.cs NMail/trunk/NMail.PostInstall/PostInstallForm.resx NMail/trunk/NMail.PostInstall/Program.cs NMail/trunk/NMail.PostInstall/Properties/ NMail/trunk/NMail.PostInstall/Properties/AssemblyInfo.cs NMail/trunk/NMail.PostInstall/Properties/Resources.Designer.cs NMail/trunk/NMail.PostInstall/Properties/Resources.resx NMail/trunk/NMail.PostInstall/Properties/Settings.Designer.cs NMail/trunk/NMail.PostInstall/Properties/Settings.settings Property Changed: ---------------- NMail/trunk/ NMail/trunk/NMail.Administration.Web/Bin/ NMail/trunk/NMail.Administration.Web/Images/ Property changes on: NMail/trunk ___________________________________________________________________ Name: svn:ignore - NMail.suo NMail.Administration.Web.suo + NMail.suo NMail.Administration.Web.suo NMail.Administration.Web.Compiled Modified: NMail/trunk/Installer/NMail-Installer.wxs =================================================================== --- NMail/trunk/Installer/NMail-Installer.wxs 2006-07-01 08:36:49 UTC (rev 53) +++ NMail/trunk/Installer/NMail-Installer.wxs 2006-07-01 09:39:32 UTC (rev 54) @@ -3,7 +3,7 @@ <Product Id="3EEDBE2D-3E7A-44b1-B4AA-1DDD2EB0068E" UpgradeCode="01CC30D2-B022-4e6c-A63B-7DD7ACCCCCE2" - Name="NMail Server" + Name="NMail Server 1.0" Language="1033" Version="1.0.0.0" Manufacturer="NMailServer.SourceForge.net"> @@ -72,7 +72,133 @@ <!-- Account="NetworkService" --> </Component> + + <!-- + == + == Webpage + == + --> + + <Directory Id="D_NMail.Administration.Web" Name="NMAILA_1.COM" LongName="NMail.Administration.Web"> + <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> + <Component Id="component1" DiskId="1" Guid="58B1F639-1053-425a-9C3E-8C474766C8AA"> + <File Id="file1" Name="CREATE_2.ASP" LongName="CreateMailDomain.aspx" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\CreateMailDomain.aspx" /> + </Component> + <Component Id="component2" DiskId="1" Guid="62FF02F4-8B59-42d0-88A0-A1B6D9D3CB7B"> + <File Id="file2" Name="CREATE_3.ASP" LongName="CreateUser.aspx" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\CreateUser.aspx" /> + </Component> + <Component Id="component3" DiskId="1" Guid="3D8F8DB0-EEF4-4a18-8C5E-877C81FA2DC9"> + <File Id="file3" Name="DEFAUL_1.ASP" LongName="Default.aspx" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\Default.aspx" /> + </Component> + <Component Id="component4" DiskId="1" Guid="F373F057-4FD0-42a1-965B-D128A78D2417"> + <File Id="file4" Name="FOLDER_1.ASP" LongName="FolderDetails.aspx" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\FolderDetails.aspx" /> + </Component> + <Component Id="component5" DiskId="1" Guid="E09BDDD2-672E-4c51-8113-EF0204DAF0CC"> + <File Id="file5" Name="LOGIN_1.ASP" LongName="Login.aspx" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\Login.aspx" /> + </Component> + <Component Id="component6" DiskId="1" Guid="DB8F981C-974F-4e6b-A783-7D69B22AD4ED"> + <File Id="file6" Name="MAILDO_1.ASP" LongName="MailDomainDetails.aspx" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\MailDomainDetails.aspx" /> + </Component> + <Component Id="component7" DiskId="1" Guid="F1329BF3-66A9-45cb-B278-D0DD59A1E0E2"> + <File Id="file7" Name="MASTER_1.MAS" LongName="MasterPage.master" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\MasterPage.master" /> + </Component> + <Component Id="component8" DiskId="1" Guid="A57703A5-14A6-4a50-8677-793088C9D110"> + <File Id="file8" Name="PRECOM_1.CON" LongName="PrecompiledApp.config" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\PrecompiledApp.config" /> + </Component> + <Component Id="component9" DiskId="1" Guid="0A419E0E-4A82-4d97-AB36-AFBB1829F9EC"> + <File Id="file9" Name="STYLES_1.CSS" LongName="StyleSheet.css" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\StyleSheet.css" /> + </Component> + <Component Id="component10" DiskId="1" Guid="901C7F89-7965-4f37-A42A-47F9EB1607FB"> + <File Id="file10" Name="USERDE_1.ASP" LongName="UserDetails.aspx" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\UserDetails.aspx" /> + </Component> + <Component Id="component11" DiskId="1" Guid="0FBFBD37-7C67-42b5-BDD3-129960FB366B"> + <File Id="file11" Name="VIEWFO_1.ASP" LongName="ViewFolders.aspx" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\ViewFolders.aspx" /> + </Component> + <Component Id="component12" DiskId="1" Guid="C54A6CB9-71E1-45e8-8E1A-B88CA863EF4B"> + <File Id="file12" Name="VIEWMA_1.ASP" LongName="ViewMailDomains.aspx" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\ViewMailDomains.aspx" /> + </Component> + <Component Id="component13" DiskId="1" Guid="C936C25B-CCCB-436d-87CE-A1D54E10707E"> + <File Id="file13" Name="VIEWUS_1.ASP" LongName="ViewUsers.aspx" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\ViewUsers.aspx" /> + </Component> + <Component Id="component14" DiskId="1" Guid="837D56B3-D38C-4331-A681-27E8E11AA9F4"> + <File Id="file14" Name="WEB_1.CON" LongName="web.config" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\web.config" /> + </Component> + <Component Id="component15" DiskId="1" Guid="3E8F5756-8B2B-44dc-BCAB-CDBA16EF695E"> + <File Id="file15" Name="WEB_1.SIT" LongName="Web.sitemap" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\Web.sitemap" /> + </Component> + <Directory Id="directory1" Name="bin"> + <Component Id="component16" DiskId="1" Guid="F1DDFAF8-BB62-45d2-BEAA-CCF24A85B6AE"> + <File Id="file40" Name="APP_CO_1.COM" LongName="App_Code.compiled" Checksum="yes" Compressed="yes" Vital="yes" src="C:\Documents and Settings\Luke\Desktop\NMail-trunk\branches\luke-dev\Installer\obj\NMail.Administration.Web.Compiled\bin\App_Code.compiled" /> + <File Id="file41" Name="App_Code.dll" Checksum="yes" Compressed="yes" Vital="yes" src="C:\Documents and Settings\Luke\Desktop\NMail-trunk\branches\luke-dev\Installer\obj\NMail.Administration.Web.Compiled\bin\App_Code.dll" /> + <File Id="file42" Name="APP_GL_1.COM" LongName="App_global.asax.compiled" Checksum="yes" Compressed="yes" Vital="yes" src="C:\Documents and Settings\Luke\Desktop\NMail-trunk\branches\luke-dev\Installer\obj\NMail.Administration.Web.Compiled\bin\App_global.asax.compiled" /> + <File Id="file43" Name="APP_GL_1.DLL" LongName="App_global.asax.dll" Checksum="yes" Compressed="yes" Vital="yes" src="C:\Documents and Settings\Luke\Desktop\NMail-trunk\branches\luke-dev\Installer\obj\NMail.Administration.Web.Compiled\bin\App_global.asax.dll" /> + <File Id="file44" Name="APAF9A_1.DLL" LongName="App_Web_createfolder.aspx.cdcab7d2.dll" Checksum="yes" Compressed="yes" Vital="yes" src="C:\Documents and Settings\Luke\Desktop\NMail-trunk\branches\luke-dev\Installer\obj\NMail.Administration.Web.Compiled\bin\App_Web_createfolder.aspx.cdcab7d2.dll" /> + <File Id="file45" Name="APP_WE_4.DLL" LongName="App_Web_createmaildomain.aspx.cdcab7d2.dll" Checksum="yes" Compressed="yes" Vital="yes" src="C:\Documents and Settings\Luke\Desktop\NMail-trunk\branches\luke-dev\Installer\obj\NMail.Administration.Web.Compiled\bin\App_Web_createmaildomain.aspx.cdcab7d2.dll" /> + <File Id="file46" Name="AP65FC_1.DLL" LongName="App_Web_createuser.aspx.cdcab7d2.dll" Checksum="yes" Compressed="yes" Vital="yes" src="C:\Documents and Settings\Luke\Desktop\NMail-trunk\branches\luke-dev\Installer\obj\NMail.Administration.Web.Compiled\bin\App_Web_createuser.aspx.cdcab7d2.dll" /> + <File Id="file47" Name="APD8FB_1.DLL" LongName="App_Web_folderdetails.aspx.cdcab7d2.dll" Checksum="yes" Compressed="yes" Vital="yes" src="C:\Documents and Settings\Luke\Desktop\NMail-trunk\branches\luke-dev\Installer\obj\NMail.Administration.Web.Compiled\bin\App_Web_folderdetails.aspx.cdcab7d2.dll" /> + <File Id="file48" Name="APP_WE_3.DLL" LongName="App_Web_login.aspx.cdcab7d2.dll" Checksum="yes" Compressed="yes" Vital="yes" src="C:\Documents and Settings\Luke\Desktop\NMail-trunk\branches\luke-dev\Installer\obj\NMail.Administration.Web.Compiled\bin\App_Web_login.aspx.cdcab7d2.dll" /> + <File Id="file49" Name="APEDBC_1.DLL" LongName="App_Web_maildomaindetails.aspx.cdcab7d2.dll" Checksum="yes" Compressed="yes" Vital="yes" src="C:\Documents and Settings\Luke\Desktop\NMail-trunk\branches\luke-dev\Installer\obj\NMail.Administration.Web.Compiled\bin\App_Web_maildomaindetails.aspx.cdcab7d2.dll" /> + <File Id="file50" Name="AP71CE_1.DLL" LongName="App_Web_userdetails.aspx.cdcab7d2.dll" Checksum="yes" Compressed="yes" Vital="yes" src="C:\Documents and Settings\Luke\Desktop\NMail-trunk\branches\luke-dev\Installer\obj\NMail.Administration.Web.Compiled\bin\App_Web_userdetails.aspx.cdcab7d2.dll" /> + <File Id="file51" Name="APP_WE_2.DLL" LongName="App_Web_viewfolders.aspx.cdcab7d2.dll" Checksum="yes" Compressed="yes" Vital="yes" src="C:\Documents and Settings\Luke\Desktop\NMail-trunk\branches\luke-dev\Installer\obj\NMail.Administration.Web.Compiled\bin\App_Web_viewfolders.aspx.cdcab7d2.dll" /> + <File Id="file52" Name="APP_WE_1.DLL" LongName="App_Web_viewmaildomains.aspx.cdcab7d2.dll" Checksum="yes" Compressed="yes" Vital="yes" src="C:\Documents and Settings\Luke\Desktop\NMail-trunk\branches\luke-dev\Installer\obj\NMail.Administration.Web.Compiled\bin\App_Web_viewmaildomains.aspx.cdcab7d2.dll" /> + <File Id="file53" Name="log4net.dll" Checksum="yes" Compressed="yes" Vital="yes" src="C:\Documents and Settings\Luke\Desktop\NMail-trunk\branches\luke-dev\Installer\obj\NMail.Administration.Web.Compiled\bin\log4net.dll" /> + <File Id="file54" Name="NMail.dll" Checksum="yes" Compressed="yes" Vital="yes" src="C:\Documents and Settings\Luke\Desktop\NMail-trunk\branches\luke-dev\Installer\obj\NMail.Administration.Web.Compiled\bin\NMail.dll" /> + <File Id="file55" Name="NMAILS_1.DLL" LongName="NMail.Server.dll" Checksum="yes" Compressed="yes" Vital="yes" src="C:\Documents and Settings\Luke\Desktop\NMail-trunk\branches\luke-dev\Installer\obj\NMail.Administration.Web.Compiled\bin\NMail.Server.dll" /> + </Component> + </Directory> + <Directory Id="directory2" Name="Images"> + <Component Id="component24" DiskId="1" Guid="4FDC7813-EFB1-4d67-AAE1-059F12D28124"> + <File Id="file24" Name="GREENL_1.PNG" LongName="GreenLight.png" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\Images\GreenLight.png" /> + </Component> + <Component Id="component25" DiskId="1" Guid="36A40106-5C2D-4a8e-860C-810B80017A14"> + <File Id="file25" Name="NMAIL-_2.PNG" LongName="nmail-logo-white.png" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\Images\nmail-logo-white.png" /> + </Component> + <Component Id="component26" DiskId="1" Guid="630CCA29-88EF-4822-A66B-4DD007B303FE"> + <File Id="file26" Name="NMAIL-_1.PNG" LongName="nmail-logo.png" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\Images\nmail-logo.png" /> + </Component> + <Directory Id="directory3" Name="Tango"> + <Component Id="component27" DiskId="1" Guid="429427BF-BDD7-4580-9A4B-9F81A86C50CF"> + <File Id="file27" Name="Delete.png" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\Images\Tango\Delete.png" /> + </Component> + <Component Id="component28" DiskId="1" Guid="DD3F20E9-0F8F-4886-A12A-B87CDF0825ED"> + <File Id="file28" Name="Error.png" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\Images\Tango\Error.png" /> + </Component> + <Component Id="component29" DiskId="1" Guid="B80FA867-3CAB-4738-92BB-940A03DF037F"> + <File Id="file29" Name="Group.png" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\Images\Tango\Group.png" /> + </Component> + <Component Id="component30" DiskId="1" Guid="DFBFF8C5-B46F-429f-BDAB-23E8C52A70B6"> + <File Id="file30" Name="License.txt" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\Images\Tango\License.txt" /> + </Component> + <Component Id="component31" DiskId="1" Guid="685A6306-9351-4b13-9CCC-6A003EF84066"> + <File Id="file31" Name="MAILDO_1.PNG" LongName="MailDomain.png" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\Images\Tango\MailDomain.png" /> + </Component> + <Component Id="component32" DiskId="1" Guid="E4843991-0C95-4a91-94C8-42B012558CFF"> + <File Id="file32" Name="NEWFOL_1.PNG" LongName="NewFolder.png" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\Images\Tango\NewFolder.png" /> + </Component> + <Component Id="component33" DiskId="1" Guid="11E1F4EC-00EE-4f75-9870-2125D5721A18"> + <File Id="file33" Name="OPENFO_1.PNG" LongName="OpenFolder.png" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\Images\Tango\OpenFolder.png" /> + </Component> + <Component Id="component34" DiskId="1" Guid="EFFE59E3-03A6-4b0c-B95A-C2AF83DBFCC8"> + <File Id="file34" Name="Question.png" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\Images\Tango\Question.png" /> + </Component> + <Component Id="component35" DiskId="1" Guid="EFFA585C-6A2A-43cb-B14B-2BE9D6110C18"> + <File Id="file35" Name="User.png" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\Images\Tango\User.png" /> + </Component> + <Component Id="component36" DiskId="1" Guid="E7A5CA36-4DAB-40c6-A7D0-B24249DCFFCC"> + <File Id="file36" Name="Warning.png" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\Images\Tango\Warning.png" /> + </Component> + </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> + </Component> + <!-- == == Core DLLs @@ -170,7 +296,7 @@ </Component> <Component Id="C_NMail.config" Guid="FEB536D0-BB1A-47b9-9C1C-0142A210DD72"> - <File Id="NMail.config" Name="NMail.cfg" LongName="NMail.config" DiskId="1" Source="obj\NMail.config" Vital="yes" /> + <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"> @@ -210,45 +336,102 @@ </Directory> <Directory Id="DesktopFolder" Name="Desktop" /> - </Directory> - - <Feature Id="MainFeature" Title="Complete" Level="1"> - <!-- Core EXEs --> - <ComponentRef Id="C_NMail.Server.Console.exe" /> - <ComponentRef Id="C_NMail.Administration.Console.exe" /> - <ComponentRef Id="C_NMail.Server.Service.exe" /> + </Directory> + <WebSite Id="DefaultWebSite" Description="Default Web Site"> + <WebAddress Id="AllUnassigned" Port="443" Secure="yes"/> + </WebSite> + + <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_MonoPrivileges.dll" /> - <ComponentRef Id="C_NDns.dll" /> <ComponentRef Id="C_NMail.dll" /> - <ComponentRef Id="C_NMail.DnsClient.dll" /> - <ComponentRef Id="C_NMail.ImapService.dll" /> - <ComponentRef Id="C_NMail.LocalStore.dll" /> - <ComponentRef Id="C_NMail.LocalStoreData.MySql.dll" /> - <ComponentRef Id="C_NMail.MessageRouter.dll" /> <ComponentRef Id="C_NMail.Server.dll" /> - <ComponentRef Id="C_NMail.SmtpClient.dll" /> - <ComponentRef Id="C_NMail.SmtpService.dll" /> - <ComponentRef Id="C_NMail.SpoolData.MySql.dll" /> - <ComponentRef Id="C_NMail.SpoolFilter.dll" /> - <ComponentRef Id="C_NMail.SpoolFilter.RegexAddressRewriter.dll" /> - <ComponentRef Id="C_NMail.SpoolService.dll" /> - <!-- Non-NMail core DLLs --> + <!-- Non-NMail DLLs --> <ComponentRef Id="C_log4net.dll" /> - <ComponentRef Id="C_Mono.Security.dll" /> + + <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" /> + + <!-- NMail Server DLLs --> + <ComponentRef Id="C_MonoPrivileges.dll" /> + <ComponentRef Id="C_NDns.dll" /> + <ComponentRef Id="C_NMail.DnsClient.dll" /> + <ComponentRef Id="C_NMail.ImapService.dll" /> + <ComponentRef Id="C_NMail.LocalStore.dll" /> + <ComponentRef Id="C_NMail.LocalStoreData.MySql.dll" /> + <ComponentRef Id="C_NMail.MessageRouter.dll" /> + <ComponentRef Id="C_NMail.SmtpClient.dll" /> + <ComponentRef Id="C_NMail.SmtpService.dll" /> + <ComponentRef Id="C_NMail.SpoolData.MySql.dll" /> + <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" /> + <ComponentRef Id="C_NMail.config" /> + <ComponentRef Id="C_NMail.pfx" /> + <ComponentRef Id="C_MySqlLocalStore.sql" /> + <ComponentRef Id="C_MySqlSpoolData.sql" /> + </Feature> - <!-- Other core files --> - <ComponentRef Id="C_Warning.txt" /> - <ComponentRef Id="C_Bounce.txt" /> - <ComponentRef Id="C_NMail.config" /> - <ComponentRef Id="C_NMail.pfx" /> - <ComponentRef Id="C_MySqlLocalStore.sql" /> - <ComponentRef Id="C_MySqlSpoolData.sql" /> + <Feature Id="F_AdminWebsite" Display="expand" Title="Administration Website" Level="1" + Description="NMail's ASP.net administration website."> - <!-- Documentation files --> - <ComponentRef Id="C_DevGuide.doc"/> + <ComponentRef Id="C_VirtualWebDir"/> + + <!-- 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="component9"/> + <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"/> + </Feature> + + <Feature Id="F_DeveloperDoc" Display="expand" Title="Developer Documentation" Level="3" + Description="Documentation for NMail developers."> + + <!-- Developer documentation files --> + <ComponentRef Id="C_DevGuide.doc"/> + </Feature> </Feature> <UIRef Id="WixUI" /> Modified: NMail/trunk/Installer/NMail-installer.build =================================================================== --- NMail/trunk/Installer/NMail-installer.build 2006-07-01 08:36:49 UTC (rev 53) +++ NMail/trunk/Installer/NMail-installer.build 2006-07-01 09:39:32 UTC (rev 54) @@ -35,11 +35,13 @@ <include name="MySql.Data.dll" /> </fileset> </copy> + <!-- Copy NMail assemblies --> <copy todir="${build.dir}"> <fileset basedir="../References/NMail/${project.config}"> <include name="*" /> </fileset> </copy> + <!-- Copy other required files --> <copy todir="${build.dir}"> <fileset basedir="../NMail.Server.Console/"> <include name="Warning.txt" /> @@ -58,6 +60,12 @@ <include name="MySqlSpoolData.sql" /> </fileset> </copy> + <!-- Copy NMail administration website --> + <copy todir="${build.dir}"> + <fileset basedir="../"> + <include name="NMail.Administration.Web.Compiled/**" /> + </fileset> + </copy> <!-- Make a date stamp to include in the filename --> <tstamp property="build.date" pattern="yyyy-MM-dd" verbose="true" /> @@ -82,7 +90,9 @@ <arg value="-loc"/> <arg><path><pathelement file="WixLib/WixUI_en-us.wxl" /></path></arg> - <arg><path><pathelement file="WixLib/wixui_minimal.wixlib" /></path></arg> + <arg><path><pathelement file="WixLib/wixui_featuretree.wixlib" /></path></arg> + + <arg><path><pathelement file="WixLib/sca.wixlib" /></path></arg> <arg><path><pathelement file="${build.dir}/NMail-Installer.wixobj" /></path></arg> </exec> Copied: NMail/trunk/Installer/WixLib/sca.wixlib (from rev 53, NMail/branches/luke-dev/Installer/WixLib/sca.wixlib) =================================================================== --- NMail/trunk/Installer/WixLib/sca.wixlib (rev 0) +++ NMail/trunk/Installer/WixLib/sca.wixlib 2006-07-01 09:39:32 UTC (rev 54) @@ -0,0 +1 @@ +<?xml version="1.0" encoding="utf-8"?><wixLibrary xmlns="http://schemas.microsoft.com/wix/2003/11/libraries" version="2.0.2207.0"><wixObject xmlns="http://schemas.microsoft.com/wix/2003/04/objects" src="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs" version="2.0.2207.0"><section type="fragment"><reference table="Actions" symbol="InstallExecuteSequence/InstallFiles" /><reference table="Binary" symbol="ScaExecute" /><reference table="Binary" symbol="ScaSchedule" /><reference table="CustomAction" symbol="ConfigureIIs" /><ignoreModularization name="RollbackMetabaseTransaction" type="Action" /><ignoreModularization name="CommitMetabaseTransaction" type="Action" /><ignoreModularization name="StartMetabaseTransaction" type="Action" /><ignoreModularization name="DeleteCertificate" type="Action" /><ignoreModularization name="AddCertificate" type="Action" /><ignoreModularization name="ConfigureIIs" type="Action" /><ignoreModularization name="WriteMetabaseChanges" type="Action" /><table name="ActionText"><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*51"><field>ConfigureIIs</field><field>Configuring IIS</field><field /></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*52"><field>StartMetabaseTransaction</field><field>Starting IIS Metabase Transaction</field><field /></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*53"><field>RollbackMetabaseTransaction</field><field>Rolling back IIS Metabase Transaction</field><field /></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*54"><field>CommitMetabaseTransaction</field><field>Committing IIS Metabase Transaction</field><field /></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*55"><field>WriteMetabaseChanges</field><field>Installing Metabase Keys and Values</field><field /></tuple></table><table name="CustomAction"><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*58"><field>ConfigureIIs</field><field>1</field><field>ScaSchedule</field><field>ConfigureIIs</field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*59"><field>StartMetabaseTransaction</field><field>3073</field><field>ScaExecute</field><field>StartMetabaseTransaction</field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*60"><field>RollbackMetabaseTransaction</field><field>3329</field><field>ScaExecute</field><field>RollbackMetabaseTransaction</field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*61"><field>CommitMetabaseTransaction</field><field>3585</field><field>ScaExecute</field><field>CommitMetabaseTransaction</field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*62"><field>WriteMetabaseChanges</field><field>3073</field><field>ScaExecute</field><field>WriteMetabaseChanges</field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*63"><field>AddCertificate</field><field>3073</field><field>ScaExecute</field><field>AddCertificate</field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*64"><field>DeleteCertificate</field><field>3073</field><field>ScaExecute</field><field>DeleteCertificate</field></tuple></table><table name="Error"><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*17"><field>26001</field><field><![CDATA[Cannot connect to Internet Information Server. ([2] [3] [4] [5])]]></field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*18"><field>26002</field><field><![CDATA[Failed to read IIsWebs table. ([2] [3] [4] [5])]]></field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*19"><field>26003</field><field><![CDATA[Failed to read IIsWebDirs table. ([2] [3] [4] [5])]]></field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*20"><field>26004</field><field><![CDATA[Failed to read IIsVirtualDirs table. ([2] [3] [4] [5])]]></field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*21"><field>26005</field><field><![CDATA[Failed to read IIsFilters table. ([2] [3] [4] [5])]]></field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*22"><field>26007</field><field><![CDATA[Failed to read IIsMimeMap table. ([2] [3] [4] [5])]]></field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*23"><field>26006</field><field><![CDATA[Failed to read IIsAppPool table. ([2] [3] [4] [5])]]></field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*24"><field>26008</field><field><![CDATA[Failed to read the IIsProperty table. ([2] [3] [4] [5])]]></field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*25"><field>26009</field><field><![CDATA[Failed to read the IIsWebServiceExtension table. ([2] [3] [4] [5])]]></field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*27"><field>26031</field><field><![CDATA[Failed to schedule transaction for changes to IIS. ([2] [3] [4] [5])]]></field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*28"><field>26032</field><field><![CDATA[Failed to schedule install of IIS Web Sites. ([2] [3] [4] [5])]]></field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*29"><field>26033</field><field><![CDATA[Failed to schedule install of IIS Web Directories. ([2] [3] [4] [5])]]></field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*30"><field>26034</field><field><![CDATA[Failed to schedule install of IIS Virtual Directories. ([2] [3] [4] [5])]]></field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*31"><field>26035</field><field><![CDATA[Failed to schedule install of IIS Filters. ([2] [3] [4] [5])]]></field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*32"><field>26036</field><field><![CDATA[Failed to schedule install of IIS AppPools. ([2] [3] [4] [5])]]></field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*33"><field>26037</field><field><![CDATA[Failed to schedule install of IIS Properties. ([2] [3] [4] [5])]]></field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*34"><field>26038</field><field><![CDATA[Failed to schedule install of IIS Web Service Extensions. ([2] [3] [4] [5])]]></field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*36"><field>26051</field><field><![CDATA[Failed to schedule uninstall of IIS Web Sites. ([2] [3] [4] [5])]]></field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*37"><field>26052</field><field><![CDATA[Failed to schedule uninstall of IIS Web Directories. ([2] [3] [4] [5])]]></field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*38"><field>26053</field><field><![CDATA[Failed to schedule uninstall of IIS Virtual Directories. ([2] [3] [4] [5])]]></field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*39"><field>26054</field><field><![CDATA[Failed to schedule uninstall of IIS Filters. ([2] [3] [4] [5])]]></field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*40"><field>26055</field><field><![CDATA[Failed to schedule uninstall of IIS AppPools. ([2] [3] [4] [5])]]></field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*41"><field>26056</field><field><![CDATA[Failed to schedule uninstall of IIS Properties. ([2] [3] [4] [5])]]></field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*42"><field>26057</field><field><![CDATA[Failed to schedule uninstall of IIS Web Service Extensions. ([2] [3] [4] [5])]]></field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*44"><field>26101</field><field><![CDATA[Failed to start IIS transaction. ([2] [3] [4] [5])]]></field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*45"><field>26102</field><field><![CDATA[Failed to open metabase key. ([2] [3] [4] [5])]]></field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*46"><field>26103</field><field><![CDATA[Failed to create metabase key. ([2] [3] [4] [5])]]></field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*47"><field>26104</field><field><![CDATA[Failed to write data to metabase key. ([2] [3] [4] [5])]]></field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*48"><field>26105</field><field><![CDATA[Failed to create web application. ([2] [3] [4] [5])]]></field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*49"><field>26106</field><field><![CDATA[Failed to delete metabase key. ([2] [3] [4] [5])]]></field></tuple></table><table name="Actions"><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*67"><field>InstallExecuteSequence</field><field>ConfigureIIs</field><field /><field /><field /><field>InstallFiles</field><field>0</field></tuple></table></section><section type="fragment"><reference table="Actions" symbol="InstallExecuteSequence/InstallFiles" /><reference table="Binary" symbol="ScaExecute" /><reference table="Binary" symbol="ScaSchedule" /><reference table="CustomAction" symbol="ConfigureSql" /><ignoreModularization name="RollbackExecuteSqlStrings" type="Action" /><ignoreModularization name="ConfigureSql" type="Action" /><ignoreModularization name="CreateDatabase" type="Action" /><ignoreModularization name="ExecuteSqlStrings" type="Action" /><ignoreModularization name="DropDatabase" type="Action" /><ignoreModularization name="RollbackCreateDatabase" type="Action" /><table name="ActionText"><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*86"><field>ConfigureSql</field><field>Configuring SQL Server</field><field /></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*87"><field>CreateDatabase</field><field>Creating Databases</field><field /></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*88"><field>DropDatabase</field><field>Dropping Databases</field><field /></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*89"><field>ExecuteSqlStrings</field><field>Executing SQL Strings</field><field /></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*90"><field>RollbackExecuteSqlStrings</field><field>Rolling back SQL Strings</field><field /></tuple></table><table name="CustomAction"><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*94"><field>ConfigureSql</field><field>1</field><field>ScaSchedule</field><field>ConfigureSql</field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*95"><field>CreateDatabase</field><field>1025</field><field>ScaExecute</field><field>CreateDatabase</field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*96"><field>RollbackCreateDatabase</field><field>1281</field><field>ScaExecute</field><field>DropDatabase</field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*97"><field>DropDatabase</field><field>1025</field><field>ScaExecute</field><field>DropDatabase</field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*98"><field>ExecuteSqlStrings</field><field>1025</field><field>ScaExecute</field><field>ExecuteSqlStrings</field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*99"><field>RollbackExecuteSqlStrings</field><field>1281</field><field>ScaExecute</field><field>ExecuteSqlStrings</field></tuple></table><table name="Error"><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*80"><field>26201</field><field><![CDATA[Error [2]: failed to create SQL database: [3], error detail: [4].]]></field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*81"><field>26202</field><field><![CDATA[Error [2]: failed to drop SQL database: [3], error detail: [4].]]></field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*82"><field>26203</field><field><![CDATA[Failed to connect to SQL database. ([2] [3] [4] [5])]]></field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*83"><field>26204</field><field><![CDATA[Error [2]: failed to execute SQL string, error detail: [3], SQL key: [4] SQL string: [5]]]></field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*84"><field>26205</field><field><![CDATA[The database [3] already exists do you wish to continue?]]></field></tuple></table><table name="Actions"><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*102"><field>InstallExecuteSequence</field><field>ConfigureSql</field><field /><field /><field /><field>InstallFiles</field><field>0</field></tuple></table></section><section type="fragment"><reference table="Actions" symbol="InstallExecuteSequence/InstallFiles" /><reference table="Binary" symbol="ScaExecute" /><reference table="Binary" symbol="ScaSchedule" /><reference table="CustomAction" symbol="ConfigureUsers" /><ignoreModularization name="ConfigureUsers" type="Action" /><ignoreModularization name="CreateUser" type="Action" /><ignoreModularization name="RemoveUser" type="Action" /><ignoreModularization name="CreateUserRollback" type="Action" /><table name="Property"><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*120"><field>CreateUser</field><field>nothing</field><field>0</field><field>0</field><field>1</field></tuple></table><table name="CustomAction"><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*122"><field>ConfigureUsers</field><field>1</field><field>ScaSchedule</field><field>ConfigureUsers</field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*123"><field>CreateUser</field><field>11265</field><field>ScaExecute</field><field>CreateUser</field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*124"><field>CreateUserRollback</field><field>3329</field><field>ScaExecute</field><field>RemoveUser</field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*126"><field>RemoveUser</field><field>3585</field><field>ScaExecute</field><field>RemoveUser</field></tuple></table><table name="Error"><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*113"><field>26401</field><field><![CDATA[Failed to create user. ([2] [3] [4] [5])]]></field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*114"><field>26402</field><field><![CDATA[Failed to create user due to invalid password. ([2] [3] [4] [5])]]></field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*115"><field>26403</field><field><![CDATA[Failed to add user to group. ([2] [3] [4] [5])]]></field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*116"><field>26404</field><field><![CDATA[Failed to create user because it already exists. ([2] [3] [4] [5])]]></field></tuple></table><table name="Actions"><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*129"><field>InstallExecuteSequence</field><field>ConfigureUsers</field><field /><field /><field>InstallFiles</field><field /><field>0</field></tuple></table></section><section type="fragment"><reference table="Actions" symbol="InstallExecuteSequence/InstallFiles" /><reference table="Binary" symbol="ScaExecute" /><reference table="Binary" symbol="ScaSchedule" /><reference table="CustomAction" symbol="ConfigureSmb" /><ignoreModularization name="CreateSmbRollback" type="Action" /><ignoreModularization name="ConfigureSmb" type="Action" /><ignoreModularization name="DropSmb" type="Action" /><ignoreModularization name="CreateSmb" type="Action" /><table name="CustomAction"><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*144"><field>ConfigureSmb</field><field>1</field><field>ScaSchedule</field><field>ConfigureSmb</field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*145"><field>CreateSmb</field><field>3073</field><field>ScaExecute</field><field>CreateSmb</field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*146"><field>CreateSmbRollback</field><field>3393</field><field>ScaExecute</field><field>DropSmb</field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*148"><field>DropSmb</field><field>3585</field><field>ScaExecute</field><field>DropSmb</field></tuple></table><table name="Error"><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*140"><field>26301</field><field><![CDATA[Failed to create network share. ([2] [3] [4] [5])]]></field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*141"><field>26302</field><field><![CDATA[Failed to drop network share. ([2] [3] [4] [5])]]></field></tuple></table><table name="Actions"><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*151"><field>InstallExecuteSequence</field><field>ConfigureSmb</field><field /><field /><field /><field>InstallFiles</field><field>0</field></tuple></table></section><section type="fragment"><reference table="Actions" symbol="InstallExecuteSequence/RemoveRegistryValues" /><reference table="Actions" symbol="InstallExecuteSequence/WriteRegistryValues" /><reference table="Binary" symbol="ScaExecute" /><reference table="Binary" symbol="ScaSchedule" /><reference table="CustomAction" symbol="ConfigurePerfmonInstall" /><reference table="CustomAction" symbol="ConfigurePerfmonUninstall" /><ignoreModularization name="UnregisterPerfmon" type="Action" /><ignoreModularization name="RegisterPerfmon" type="Action" /><ignoreModularization name="RollbackRegisterPerfmon" type="Action" /><ignoreModularization name="ConfigurePerfmonUninstall" type="Action" /><ignoreModularization name="RollbackUnregisterPerfmon" type="Action" /><ignoreModularization name="ConfigurePerfmonInstall" type="Action" /><table name="CustomAction"><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*168"><field>ConfigurePerfmonInstall</field><field>1</field><field>ScaSchedule</field><field>ConfigurePerfmonInstall</field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*169"><field>ConfigurePerfmonUninstall</field><field>1</field><field>ScaSchedule</field><field>ConfigurePerfmonUninstall</field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*170"><field>RegisterPerfmon</field><field>3073</field><field>ScaExecute</field><field>RegisterPerfmon</field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*171"><field>UnregisterPerfmon</field><field>3073</field><field>ScaExecute</field><field>UnregisterPerfmon</field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*172"><field>RollbackRegisterPerfmon</field><field>3329</field><field>ScaExecute</field><field>UnregisterPerfmon</field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*173"><field>RollbackUnregisterPerfmon</field><field>3329</field><field>ScaExecute</field><field>RegisterPerfmon</field></tuple></table><table name="Error"><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*164"><field>26251</field><field><![CDATA[Failed to register DLL with PerfMon. ([2] [3] [4] [5])]]></field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*165"><field>26252</field><field><![CDATA[Failed to unregister DLL with PerfMon. ([2] [3] [4] [5])]]></field></tuple></table><table name="Actions"><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*176"><field>InstallExecuteSequence</field><field>ConfigurePerfmonInstall</field><field /><field /><field /><field>WriteRegistryValues</field><field>0</field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*177"><field>InstallExecuteSequence</field><field>ConfigurePerfmonUninstall</field><field /><field /><field /><field>RemoveRegistryValues</field><field>0</field></tuple></table></section><section type="fragment"><table name="Binary"><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*184"><field>ScaSchedule</field><field>scasched.dll</field></tuple><tuple sourceLineNumber="e:\delivery\Dev\wix2.0_public\src\ca\serverca\scawixlib\sca.wxs*185"><field>ScaExecute</field><field>scaexec.dll</field></tuple></table></section></wixObject></wixLibrary> \ No newline at end of file Copied: NMail/trunk/Installer/WixLib/scaexec.dll (from rev 53, NMail/branches/luke-dev/Installer/WixLib/scaexec.dll) =================================================================== (Binary files differ) Copied: NMail/trunk/Installer/WixLib/scasched.dll (from rev 53, NMail/branches/luke-dev/Installer/WixLib/scasched.dll) =================================================================== (Binary files differ) Copied: NMail/trunk/Installer/WixLib/wixui_featuretree.wixlib (from rev 53, NMail/branches/luke-dev/Installer/WixLib/wixui_featuretree.wixlib) =================================================================== --- NMail/trunk/Installer/WixLib/wixui_featuretree.wixlib (rev 0) +++ NMail/trunk/Installer/WixLib/wixui_featuretree.wixlib 2006-07-01 09:39:32 UTC (rev 54) @@ -0,0 +1 @@ @@ Diff output truncated at 100000 characters. @@ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tmy...@us...> - 2006-11-11 10:55:49
|
Revision: 83 http://svn.sourceforge.net/nmailserver/?rev=83&view=rev Author: tmyroadctfig Date: 2006-11-11 02:49:28 -0800 (Sat, 11 Nov 2006) Log Message: ----------- Merged in changes from development branch. Modified Paths: -------------- NMail/trunk/Installer/NMail-Installer.wxs NMail/trunk/Installer/NMail-installer.build NMail/trunk/MonoPrivileges/MonoPrivileges.csproj NMail/trunk/NDns/NDns.csproj NMail/trunk/NMail/Authentication/BasicAuthToken.cs NMail/trunk/NMail/Authentication/IAuthenticationProvider.cs NMail/trunk/NMail/Authentication/IAuthenticationToken.cs NMail/trunk/NMail/Authentication/NullAuthentication.cs NMail/trunk/NMail/Configuration/IPEndPointsCollection.cs NMail/trunk/NMail/Configuration/NMailConfiguration.cs NMail/trunk/NMail/Configuration/ObjectConfigurationElement.cs NMail/trunk/NMail/DataTypes/ACLs/StoreFolderAcl.cs NMail/trunk/NMail/DataTypes/Domain.cs NMail/trunk/NMail/DataTypes/Envelope.cs NMail/trunk/NMail/DataTypes/LocalStore/MailDomain.cs NMail/trunk/NMail/IO/TcpTextConnection.cs NMail/trunk/NMail/NMail.build NMail/trunk/NMail/NMail.csproj NMail/trunk/NMail.Administration.Console/Command/AddUserCommand.cs NMail/trunk/NMail.Administration.Console/Command/AddUserToMailDomainCommand.cs NMail/trunk/NMail.Administration.Console/Command/DeleteUserCommand.cs NMail/trunk/NMail.Administration.Console/Command/ListFoldersCommand.cs NMail/trunk/NMail.Administration.Console/Command/ListUserAddressesCommand.cs NMail/trunk/NMail.Administration.Console/Command/ListUsersCommand.cs NMail/trunk/NMail.Administration.Console/Command/RemoveUserFromMailDomainCommand.cs NMail/trunk/NMail.Administration.Console/Context/LocalStoreContext.cs NMail/trunk/NMail.Administration.Console/Context/TopLevelContext.cs NMail/trunk/NMail.Administration.Console/NMail.Administration.Console.csproj NMail/trunk/NMail.Administration.Web/App_Code/FolderDataSource.cs NMail/trunk/NMail.Administration.Web/App_Code/MailDomainDataSource.cs NMail/trunk/NMail.Administration.Web/App_Code/UserDataSource.cs NMail/trunk/NMail.Administration.Web/CreateFolder.aspx NMail/trunk/NMail.Administration.Web/CreateFolder.aspx.cs NMail/trunk/NMail.Administration.Web/CreateMailDomain.aspx NMail/trunk/NMail.Administration.Web/CreateMailDomain.aspx.cs NMail/trunk/NMail.Administration.Web/CreateUser.aspx NMail/trunk/NMail.Administration.Web/CreateUser.aspx.cs NMail/trunk/NMail.Administration.Web/FolderDetails.aspx NMail/trunk/NMail.Administration.Web/FolderDetails.aspx.cs NMail/trunk/NMail.Administration.Web/Global.asax NMail/trunk/NMail.Administration.Web/Login.aspx NMail/trunk/NMail.Administration.Web/Login.aspx.cs NMail/trunk/NMail.Administration.Web/MailDomainDetails.aspx NMail/trunk/NMail.Administration.Web/MailDomainDetails.aspx.cs NMail/trunk/NMail.Administration.Web/MasterPage.master NMail/trunk/NMail.Administration.Web/SetPasswordPanel.ascx NMail/trunk/NMail.Administration.Web/SpoolDetails.aspx NMail/trunk/NMail.Administration.Web/SpoolDetails.aspx.cs NMail/trunk/NMail.Administration.Web/TaskList.ascx NMail/trunk/NMail.Administration.Web/TaskList.ascx.cs NMail/trunk/NMail.Administration.Web/UserDetails.aspx NMail/trunk/NMail.Administration.Web/UserDetails.aspx.cs NMail/trunk/NMail.Administration.Web/ViewFolders.aspx NMail/trunk/NMail.Administration.Web/ViewMailDomains.aspx NMail/trunk/NMail.Administration.Web/ViewUsers.aspx NMail/trunk/NMail.Administration.Web/Web.sitemap NMail/trunk/NMail.Administration.Web/web.config NMail/trunk/NMail.DnsClient/Configuration/DnsClientConfiguration.cs NMail/trunk/NMail.DnsClient/NMail.DnsClient.csproj NMail/trunk/NMail.ImapService/Command/AppendCommand.cs NMail/trunk/NMail.ImapService/Command/AuthenticateCommand.cs NMail/trunk/NMail.ImapService/Command/StoreCommand.cs NMail/trunk/NMail.ImapService/Configuration/ImapServiceConfiguration.cs NMail/trunk/NMail.ImapService/ImapSession.cs NMail/trunk/NMail.ImapService/NMail.ImapService.csproj NMail/trunk/NMail.ImapService/Response/LSubResponse.cs NMail/trunk/NMail.ImapService/Response/ListResponse.cs NMail/trunk/NMail.ImapService/State/AbstractState.cs NMail/trunk/NMail.ImapService/State/AuthenticatedState.cs NMail/trunk/NMail.ImapService/State/ConnectedState.cs NMail/trunk/NMail.ImapService/State/ExamineState.cs NMail/trunk/NMail.ImapService/State/SelectedState.cs NMail/trunk/NMail.LocalStore/DeliveryActions/ClamAvScanner.cs NMail/trunk/NMail.LocalStore/DeliveryActions/Copy.cs NMail/trunk/NMail.LocalStore/DeliveryActions/ManageWhiteList.cs NMail/trunk/NMail.LocalStore/DeliveryActions/Move.cs NMail/trunk/NMail.LocalStore/LocalStore.cs NMail/trunk/NMail.LocalStore/NMail.LocalStore.csproj NMail/trunk/NMail.LocalStore/Validators/AddressDate.cs NMail/trunk/NMail.LocalStore/Validators/AddressKeyword.cs NMail/trunk/NMail.LocalStore/Validators/AddressSender.cs NMail/trunk/NMail.LocalStore/Validators/OnWhiteList.cs NMail/trunk/NMail.LocalStore/Validators/OrdbBlackList.cs NMail/trunk/NMail.LocalStoreData.MySql/Configuration/MySqlLocalStoreDataConfiguration.cs NMail/trunk/NMail.LocalStoreData.MySql/MySqlLocalStore.sql NMail/trunk/NMail.LocalStoreData.MySql/MySqlLocalStoreData.cs NMail/trunk/NMail.LocalStoreData.MySql/NMail.LocalStoreData.MySql.csproj NMail/trunk/NMail.MessageRouter/Configuration/MessageRouterConfiguration.cs NMail/trunk/NMail.MessageRouter/NMail.MessageRouter.csproj NMail/trunk/NMail.PostInstall/NMail.PostInstall.csproj NMail/trunk/NMail.PostInstall/PostInstallForm.Designer.cs NMail/trunk/NMail.PostInstall/PostInstallForm.cs NMail/trunk/NMail.PostInstall/Program.cs NMail/trunk/NMail.Sendmail/NMail.Sendmail.csproj NMail/trunk/NMail.Server/NMail.Server.csproj NMail/trunk/NMail.Server/NMailServer.cs NMail/trunk/NMail.Server/RemoteAdministration.cs NMail/trunk/NMail.Server.Console/NMail.Server.Console.csproj NMail/trunk/NMail.Server.Console/NMail.config NMail/trunk/NMail.Server.Service/NMail.Server.Service.csproj NMail/trunk/NMail.Server.Service/NMailService.cs NMail/trunk/NMail.SmtpClient/Configuration/SmtpClientConfiguration.cs NMail/trunk/NMail.SmtpClient/NMail.SmtpClient.csproj NMail/trunk/NMail.SmtpService/Command/DataCommand.cs NMail/trunk/NMail.SmtpService/Command/ResetCommand.cs NMail/trunk/NMail.SmtpService/Configuration/SmtpServiceConfiguration.cs NMail/trunk/NMail.SmtpService/NMail.SmtpService.csproj NMail/trunk/NMail.SmtpService/SmtpService.cs NMail/trunk/NMail.SmtpService/SmtpServiceConnection.cs NMail/trunk/NMail.SpoolData.MySql/Configuration/MySqlSpoolDataConfiguration.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/Configuration/SpoolFilterConfiguration.cs NMail/trunk/NMail.SpoolFilter/NMail.SpoolFilter.csproj NMail/trunk/NMail.SpoolFilter/NoActionFilter.cs NMail/trunk/NMail.SpoolFilter/SpoolFilter.cs NMail/trunk/NMail.SpoolFilter.RegexAddressRewriter/NMail.SpoolFilter.RegexAddressRewriter.csproj NMail/trunk/NMail.SpoolFilter.RegexAddressRewriter/RegexAddressRewriter.cs NMail/trunk/NMail.SpoolService/Configuration/SpoolServiceConfiguration.cs NMail/trunk/NMail.SpoolService/NMail.SpoolService.csproj NMail/trunk/NMail.SpoolService/SpoolService.cs NMail/trunk/NMail.UnitTests/NMail.UnitTests.csproj NMail/trunk/NMail.build NMail/trunk/NMail.sln Added Paths: ----------- NMail/trunk/NMail/Authentication/ILockOutPolicy.cs NMail/trunk/NMail/Authentication/SaslPlainAuthMsg.cs NMail/trunk/NMail/Configuration/NMailConfigFile.cs NMail/trunk/NMail/DataTypes/AbstractMessageRouter.cs NMail/trunk/NMail/DataTypes/IDnsClient.cs NMail/trunk/NMail/DataTypes/IService.cs NMail/trunk/NMail/DataTypes/ISmtpClient.cs NMail/trunk/NMail/DataTypes/LocalStore/ILocalStore.cs NMail/trunk/NMail/DataTypes/LocalStore/ILocalStoreData.cs NMail/trunk/NMail/DataTypes/LocalStore/ILocalStoreDeliveryAction.cs NMail/trunk/NMail/DataTypes/LocalStore/ILocalStoreRecipientValidator.cs NMail/trunk/NMail/DataTypes/LocalStore/ILocalStoreUserMap.cs NMail/trunk/NMail/DataTypes/LocalStore/LocalStoreDelivery.cs NMail/trunk/NMail/DataTypes/LocalStore/LocalStoreGroup.cs NMail/trunk/NMail/DataTypes/LocalStore/LocalStoreUser.cs NMail/trunk/NMail/DataTypes/LocalStore/StoreFolder.cs NMail/trunk/NMail/DataTypes/LocalStore/StoreMessageFlags.cs NMail/trunk/NMail/DataTypes/Spool/ NMail/trunk/NMail/DataTypes/Spool/ISpoolData.cs NMail/trunk/NMail/DataTypes/Spool/ISpoolFilter.cs NMail/trunk/NMail/DataTypes/Spool/ISpoolFilterService.cs NMail/trunk/NMail/DataTypes/Spool/ISpoolService.cs NMail/trunk/NMail/DataTypes/Spool/SpoolEnvelope.cs NMail/trunk/NMail/DataTypes/Spool/SpoolRecipient.cs NMail/trunk/NMail/Helper/IPEndpointHelper.cs NMail/trunk/NMail/IO/TcpUserPasswordPair.cs NMail/trunk/NMail.Administration.Web/App_Code/SpooledMessageDataSource.cs NMail/trunk/NMail.Administration.Web/App_Code/Task.cs NMail/trunk/NMail.Administration.Web/App_Themes/ NMail/trunk/NMail.Administration.Web/App_Themes/Default/ NMail/trunk/NMail.Administration.Web/App_Themes/Default/Default.skin NMail/trunk/NMail.Administration.Web/App_Themes/Default/StyleSheet.css NMail/trunk/NMail.Administration.Web/Bin/NMail.LocalStoreData.MySql.dll.refresh NMail/trunk/NMail.LocalStoreData.MySql/MySqlAuthProvider.cs NMail/trunk/NMail.LocalStoreData.MySql/MySqlHelper.cs NMail/trunk/NMail.LocalStoreData.MySql/MySqlUserMap.cs NMail/trunk/NMail.OutlookPlugin/ NMail/trunk/NMail.OutlookPlugin/NMail.OutlookPlugin.csproj NMail/trunk/NMail.OutlookPlugin/Properties/ NMail/trunk/NMail.OutlookPlugin/Properties/AssemblyInfo.cs NMail/trunk/NMail.PostInstall/NMail.PostInstall.build NMail/trunk/NMail.Server/RemoteAdminAuthorisation.cs NMail/trunk/NMail.SetupWizard/ NMail/trunk/NMail.SetupWizard/BaseForm.Designer.cs NMail/trunk/NMail.SetupWizard/BaseForm.cs NMail/trunk/NMail.SetupWizard/BaseForm.resx NMail/trunk/NMail.SetupWizard/BasePanel.Designer.cs NMail/trunk/NMail.SetupWizard/BasePanel.cs NMail/trunk/NMail.SetupWizard/BasePanel.resx NMail/trunk/NMail.SetupWizard/DatabaseConfigPanel.Designer.cs NMail/trunk/NMail.SetupWizard/DatabaseConfigPanel.cs NMail/trunk/NMail.SetupWizard/DatabaseConfigPanel.resx NMail/trunk/NMail.SetupWizard/DnsConfigPanel.Designer.cs NMail/trunk/NMail.SetupWizard/DnsConfigPanel.cs NMail/trunk/NMail.SetupWizard/DnsConfigPanel.resx NMail/trunk/NMail.SetupWizard/FinalConfigPanel.Designer.cs NMail/trunk/NMail.SetupWizard/FinalConfigPanel.cs NMail/trunk/NMail.SetupWizard/FinalConfigPanel.resx NMail/trunk/NMail.SetupWizard/LocalStoreConfigPanel.Designer.cs NMail/trunk/NMail.SetupWizard/LocalStoreConfigPanel.cs NMail/trunk/NMail.SetupWizard/LocalStoreConfigPanel.resx NMail/trunk/NMail.SetupWizard/MySqlHelper.cs NMail/trunk/NMail.SetupWizard/NMail.SetupWizard.build NMail/trunk/NMail.SetupWizard/NMail.SetupWizard.csproj NMail/trunk/NMail.SetupWizard/PasswordDialog.Designer.cs NMail/trunk/NMail.SetupWizard/PasswordDialog.cs NMail/trunk/NMail.SetupWizard/PasswordDialog.resx NMail/trunk/NMail.SetupWizard/Program.cs NMail/trunk/NMail.SetupWizard/Properties/ NMail/trunk/NMail.SetupWizard/Properties/AssemblyInfo.cs NMail/trunk/NMail.SetupWizard/Properties/Resources.Designer.cs NMail/trunk/NMail.SetupWizard/Properties/Resources.resx NMail/trunk/NMail.SetupWizard/Properties/Settings.Designer.cs NMail/trunk/NMail.SetupWizard/Properties/Settings.settings NMail/trunk/NMail.SetupWizard/Resources/ NMail/trunk/NMail.SetupWizard/Resources/error.png NMail/trunk/NMail.SetupWizard/Resources/ok.png NMail/trunk/NMail.SetupWizard/Resources/pending.png NMail/trunk/NMail.SetupWizard/Resources/warning.png NMail/trunk/NMail.SetupWizard/ServiceConfigPanel.Designer.cs NMail/trunk/NMail.SetupWizard/ServiceConfigPanel.cs NMail/trunk/NMail.SetupWizard/ServiceConfigPanel.resx NMail/trunk/NMail.SetupWizard/SmtpSubSysConfigPanel.Designer.cs NMail/trunk/NMail.SetupWizard/SmtpSubSysConfigPanel.cs NMail/trunk/NMail.SetupWizard/SmtpSubSysConfigPanel.resx NMail/trunk/NMail.SetupWizard/Task.cs NMail/trunk/NMail.SetupWizard/WelcomePanel.Designer.cs NMail/trunk/NMail.SetupWizard/WelcomePanel.cs NMail/trunk/NMail.SetupWizard/WelcomePanel.resx Removed Paths: ------------- NMail/trunk/NDns/NDns.xml NMail/trunk/NMail/AbstractMessageRouter.cs NMail/trunk/NMail/DataTypes/LocalStoreDelivery.cs NMail/trunk/NMail/DataTypes/LocalStoreGroup.cs NMail/trunk/NMail/DataTypes/LocalStoreUser.cs NMail/trunk/NMail/DataTypes/Spool/ISpoolData.cs NMail/trunk/NMail/DataTypes/Spool/ISpoolFilter.cs NMail/trunk/NMail/DataTypes/Spool/ISpoolFilterService.cs NMail/trunk/NMail/DataTypes/Spool/ISpoolService.cs NMail/trunk/NMail/DataTypes/Spool/SpoolEnvelope.cs NMail/trunk/NMail/DataTypes/Spool/SpoolRecipient.cs NMail/trunk/NMail/DataTypes/StoreFolder.cs NMail/trunk/NMail/DataTypes/StoreMessageFlags.cs NMail/trunk/NMail/IDnsClient.cs NMail/trunk/NMail/ILocalStore.cs NMail/trunk/NMail/ILocalStoreData.cs NMail/trunk/NMail/ILocalStoreDeliveryAction.cs NMail/trunk/NMail/ILocalStoreRecipientValidator.cs NMail/trunk/NMail/ILocalStoreUserMap.cs NMail/trunk/NMail/IO/TcpChannel.cs NMail/trunk/NMail/IO/TcpClientChannel.cs NMail/trunk/NMail/IO/TcpClientTransportSink.cs NMail/trunk/NMail/IO/TcpClientTransportSinkProvider.cs NMail/trunk/NMail/IO/TcpServerChannel.cs NMail/trunk/NMail/IO/TcpServerTransportSink.cs NMail/trunk/NMail/IService.cs NMail/trunk/NMail/ISmtpClient.cs NMail/trunk/NMail/ISpoolData.cs NMail/trunk/NMail/ISpoolFilter.cs NMail/trunk/NMail/ISpoolFilterService.cs NMail/trunk/NMail/ISpoolService.cs NMail/trunk/NMail/Interfaces/ NMail/trunk/NMail.Administration.Web/App_Themes/Default/ NMail/trunk/NMail.Administration.Web/App_Themes/Default/Default.skin NMail/trunk/NMail.Administration.Web/App_Themes/Default/StyleSheet.css NMail/trunk/NMail.Administration.Web/Images/Tango/Thumbs.db NMail/trunk/NMail.Administration.Web/StyleSheet.css NMail/trunk/NMail.OutlookPlugin/NMail.OutlookPlugin.csproj NMail/trunk/NMail.OutlookPlugin/Properties/ NMail/trunk/NMail.OutlookPlugin/Properties/AssemblyInfo.cs NMail/trunk/NMail.SetupWizard/BaseForm.Designer.cs NMail/trunk/NMail.SetupWizard/BaseForm.cs NMail/trunk/NMail.SetupWizard/BaseForm.resx NMail/trunk/NMail.SetupWizard/BasePanel.Designer.cs NMail/trunk/NMail.SetupWizard/BasePanel.cs NMail/trunk/NMail.SetupWizard/BasePanel.resx NMail/trunk/NMail.SetupWizard/DatabaseConfigPanel.Designer.cs NMail/trunk/NMail.SetupWizard/DatabaseConfigPanel.cs NMail/trunk/NMail.SetupWizard/DatabaseConfigPanel.resx NMail/trunk/NMail.SetupWizard/DnsConfigPanel.Designer.cs NMail/trunk/NMail.SetupWizard/DnsConfigPanel.cs NMail/trunk/NMail.SetupWizard/DnsConfigPanel.resx NMail/trunk/NMail.SetupWizard/FinalConfigPanel.Designer.cs NMail/trunk/NMail.SetupWizard/FinalConfigPanel.cs NMail/trunk/NMail.SetupWizard/FinalConfigPanel.resx NMail/trunk/NMail.SetupWizard/LocalStoreConfigPanel.Designer.cs NMail/trunk/NMail.SetupWizard/LocalStoreConfigPanel.cs NMail/trunk/NMail.SetupWizard/LocalStoreConfigPanel.resx NMail/trunk/NMail.SetupWizard/MySqlHelper.cs NMail/trunk/NMail.SetupWizard/NMail.SetupWizard.build NMail/trunk/NMail.SetupWizard/NMail.SetupWizard.csproj NMail/trunk/NMail.SetupWizard/PasswordDialog.Designer.cs NMail/trunk/NMail.SetupWizard/PasswordDialog.cs NMail/trunk/NMail.SetupWizard/PasswordDialog.resx NMail/trunk/NMail.SetupWizard/Program.cs NMail/trunk/NMail.SetupWizard/Properties/ NMail/trunk/NMail.SetupWizard/Properties/AssemblyInfo.cs NMail/trunk/NMail.SetupWizard/Properties/Resources.Designer.cs NMail/trunk/NMail.SetupWizard/Properties/Resources.resx NMail/trunk/NMail.SetupWizard/Properties/Settings.Designer.cs NMail/trunk/NMail.SetupWizard/Properties/Settings.settings NMail/trunk/NMail.SetupWizard/Resources/ NMail/trunk/NMail.SetupWizard/Resources/error.png NMail/trunk/NMail.SetupWizard/Resources/ok.png NMail/trunk/NMail.SetupWizard/Resources/pending.png NMail/trunk/NMail.SetupWizard/Resources/warning.png NMail/trunk/NMail.SetupWizard/ServiceConfigPanel.Designer.cs NMail/trunk/NMail.SetupWizard/ServiceConfigPanel.cs NMail/trunk/NMail.SetupWizard/ServiceConfigPanel.resx NMail/trunk/NMail.SetupWizard/SmtpSubSysConfigPanel.Designer.cs NMail/trunk/NMail.SetupWizard/SmtpSubSysConfigPanel.cs NMail/trunk/NMail.SetupWizard/SmtpSubSysConfigPanel.resx NMail/trunk/NMail.SetupWizard/Task.cs NMail/trunk/NMail.SetupWizard/WelcomePanel.Designer.cs NMail/trunk/NMail.SetupWizard/WelcomePanel.cs NMail/trunk/NMail.SetupWizard/WelcomePanel.resx Modified: NMail/trunk/Installer/NMail-Installer.wxs =================================================================== --- NMail/trunk/Installer/NMail-Installer.wxs 2006-11-11 09:38:54 UTC (rev 82) +++ NMail/trunk/Installer/NMail-Installer.wxs 2006-11-11 10:49:28 UTC (rev 83) @@ -19,6 +19,7 @@ <UpgradeVersion /> </Upgrade> --> + <!-- == == Conditions @@ -57,12 +58,12 @@ </File> </Component> - <Component Id="C_NMail.Administration.Console.exe" Guid="79E07802-0DD8-456c-ACD4-B82E5A351BBA"> + <!--<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>--> <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" /> @@ -72,7 +73,13 @@ <!-- 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> + </Component> + <!-- == == Webpage @@ -128,24 +135,37 @@ <Component Id="component15" DiskId="1" Guid="3E8F5756-8B2B-44dc-BCAB-CDBA16EF695E"> <File Id="file15" Name="WEB_1.SIT" LongName="Web.sitemap" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\Web.sitemap" /> </Component> + <Component Id="component39" DiskId="1" Guid="567BD98A-B437-4d06-A236-4710D647D0BE"> + <File Id="file39" Name="tasklist.asc" LongName="TaskList.ascx" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\TaskList.ascx" /> + </Component> + <Component Id="component40" DiskId="1" Guid="157B362A-5104-42b1-B073-2A9259933AE8"> + <File Id="file90" Name="setpass.asc" LongName="SetPasswordPanel.ascx" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\SetPasswordPanel.ascx" /> + </Component> + <Component Id="component41" DiskId="1" Guid="7943BF3C-869B-4465-A517-F6CFDB63545F"> + <File Id="file91" Name="spool.asp" LongName="SpoolDetails.aspx" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\SpoolDetails.aspx" /> + </Component> <Directory Id="directory1" Name="bin"> <Component Id="component16" DiskId="1" Guid="F1DDFAF8-BB62-45d2-BEAA-CCF24A85B6AE"> - <File Id="file40" Name="APP_CO_1.COM" LongName="App_Code.compiled" Checksum="yes" Compressed="yes" Vital="yes" src="C:\Documents and Settings\Luke\Desktop\NMail-trunk\branches\luke-dev\Installer\obj\NMail.Administration.Web.Compiled\bin\App_Code.compiled" /> - <File Id="file41" Name="App_Code.dll" Checksum="yes" Compressed="yes" Vital="yes" src="C:\Documents and Settings\Luke\Desktop\NMail-trunk\branches\luke-dev\Installer\obj\NMail.Administration.Web.Compiled\bin\App_Code.dll" /> - <File Id="file42" Name="APP_GL_1.COM" LongName="App_global.asax.compiled" Checksum="yes" Compressed="yes" Vital="yes" src="C:\Documents and Settings\Luke\Desktop\NMail-trunk\branches\luke-dev\Installer\obj\NMail.Administration.Web.Compiled\bin\App_global.asax.compiled" /> - <File Id="file43" Name="APP_GL_1.DLL" LongName="App_global.asax.dll" Checksum="yes" Compressed="yes" Vital="yes" src="C:\Documents and Settings\Luke\Desktop\NMail-trunk\branches\luke-dev\Installer\obj\NMail.Administration.Web.Compiled\bin\App_global.asax.dll" /> - <File Id="file44" Name="APAF9A_1.DLL" LongName="App_Web_createfolder.aspx.cdcab7d2.dll" Checksum="yes" Compressed="yes" Vital="yes" src="C:\Documents and Settings\Luke\Desktop\NMail-trunk\branches\luke-dev\Installer\obj\NMail.Administration.Web.Compiled\bin\App_Web_createfolder.aspx.cdcab7d2.dll" /> - <File Id="file45" Name="APP_WE_4.DLL" LongName="App_Web_createmaildomain.aspx.cdcab7d2.dll" Checksum="yes" Compressed="yes" Vital="yes" src="C:\Documents and Settings\Luke\Desktop\NMail-trunk\branches\luke-dev\Installer\obj\NMail.Administration.Web.Compiled\bin\App_Web_createmaildomain.aspx.cdcab7d2.dll" /> - <File Id="file46" Name="AP65FC_1.DLL" LongName="App_Web_createuser.aspx.cdcab7d2.dll" Checksum="yes" Compressed="yes" Vital="yes" src="C:\Documents and Settings\Luke\Desktop\NMail-trunk\branches\luke-dev\Installer\obj\NMail.Administration.Web.Compiled\bin\App_Web_createuser.aspx.cdcab7d2.dll" /> - <File Id="file47" Name="APD8FB_1.DLL" LongName="App_Web_folderdetails.aspx.cdcab7d2.dll" Checksum="yes" Compressed="yes" Vital="yes" src="C:\Documents and Settings\Luke\Desktop\NMail-trunk\branches\luke-dev\Installer\obj\NMail.Administration.Web.Compiled\bin\App_Web_folderdetails.aspx.cdcab7d2.dll" /> - <File Id="file48" Name="APP_WE_3.DLL" LongName="App_Web_login.aspx.cdcab7d2.dll" Checksum="yes" Compressed="yes" Vital="yes" src="C:\Documents and Settings\Luke\Desktop\NMail-trunk\branches\luke-dev\Installer\obj\NMail.Administration.Web.Compiled\bin\App_Web_login.aspx.cdcab7d2.dll" /> - <File Id="file49" Name="APEDBC_1.DLL" LongName="App_Web_maildomaindetails.aspx.cdcab7d2.dll" Checksum="yes" Compressed="yes" Vital="yes" src="C:\Documents and Settings\Luke\Desktop\NMail-trunk\branches\luke-dev\Installer\obj\NMail.Administration.Web.Compiled\bin\App_Web_maildomaindetails.aspx.cdcab7d2.dll" /> - <File Id="file50" Name="AP71CE_1.DLL" LongName="App_Web_userdetails.aspx.cdcab7d2.dll" Checksum="yes" Compressed="yes" Vital="yes" src="C:\Documents and Settings\Luke\Desktop\NMail-trunk\branches\luke-dev\Installer\obj\NMail.Administration.Web.Compiled\bin\App_Web_userdetails.aspx.cdcab7d2.dll" /> - <File Id="file51" Name="APP_WE_2.DLL" LongName="App_Web_viewfolders.aspx.cdcab7d2.dll" Checksum="yes" Compressed="yes" Vital="yes" src="C:\Documents and Settings\Luke\Desktop\NMail-trunk\branches\luke-dev\Installer\obj\NMail.Administration.Web.Compiled\bin\App_Web_viewfolders.aspx.cdcab7d2.dll" /> - <File Id="file52" Name="APP_WE_1.DLL" LongName="App_Web_viewmaildomains.aspx.cdcab7d2.dll" Checksum="yes" Compressed="yes" Vital="yes" src="C:\Documents and Settings\Luke\Desktop\NMail-trunk\branches\luke-dev\Installer\obj\NMail.Administration.Web.Compiled\bin\App_Web_viewmaildomains.aspx.cdcab7d2.dll" /> - <File Id="file53" Name="log4net.dll" Checksum="yes" Compressed="yes" Vital="yes" src="C:\Documents and Settings\Luke\Desktop\NMail-trunk\branches\luke-dev\Installer\obj\NMail.Administration.Web.Compiled\bin\log4net.dll" /> - <File Id="file54" Name="NMail.dll" Checksum="yes" Compressed="yes" Vital="yes" src="C:\Documents and Settings\Luke\Desktop\NMail-trunk\branches\luke-dev\Installer\obj\NMail.Administration.Web.Compiled\bin\NMail.dll" /> - <File Id="file55" Name="NMAILS_1.DLL" LongName="NMail.Server.dll" Checksum="yes" Compressed="yes" Vital="yes" src="C:\Documents and Settings\Luke\Desktop\NMail-trunk\branches\luke-dev\Installer\obj\NMail.Administration.Web.Compiled\bin\NMail.Server.dll" /> + <File Id="file40" Name="APP_CO_1.COM" LongName="App_Code.compiled" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\bin\App_Code.compiled" /> + <File Id="file41" Name="App_Code.dll" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\bin\App_Code.dll" /> + <File Id="file42" Name="APP_GL_1.COM" LongName="App_global.asax.compiled" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\bin\App_global.asax.compiled" /> + <File Id="file43" Name="APP_GL_1.DLL" LongName="App_global.asax.dll" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\bin\App_global.asax.dll" /> + <File Id="file44" Name="APAF9A_1.DLL" LongName="App_Web_createfolder.aspx.cdcab7d2.dll" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\bin\App_Web_createfolder.aspx.cdcab7d2.dll" /> + <File Id="file45" Name="APP_WE_4.DLL" LongName="App_Web_createmaildomain.aspx.cdcab7d2.dll" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\bin\App_Web_createmaildomain.aspx.cdcab7d2.dll" /> + <File Id="file46" Name="AP65FC_1.DLL" LongName="App_Web_createuser.aspx.cdcab7d2.dll" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\bin\App_Web_createuser.aspx.cdcab7d2.dll" /> + <File Id="file47" Name="APD8FB_1.DLL" LongName="App_Web_folderdetails.aspx.cdcab7d2.dll" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\bin\App_Web_folderdetails.aspx.cdcab7d2.dll" /> + <File Id="file48" Name="APP_WE_3.DLL" LongName="App_Web_login.aspx.cdcab7d2.dll" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\bin\App_Web_login.aspx.cdcab7d2.dll" /> + <File Id="file49" Name="APEDBC_1.DLL" LongName="App_Web_maildomaindetails.aspx.cdcab7d2.dll" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\bin\App_Web_maildomaindetails.aspx.cdcab7d2.dll" /> + <File Id="file50" Name="AP71CE_1.DLL" LongName="App_Web_userdetails.aspx.cdcab7d2.dll" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\bin\App_Web_userdetails.aspx.cdcab7d2.dll" /> + <File Id="file51" Name="APP_WE_2.DLL" LongName="App_Web_viewfolders.aspx.cdcab7d2.dll" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\bin\App_Web_viewfolders.aspx.cdcab7d2.dll" /> + <File Id="file52" Name="APP_WE_1.DLL" LongName="App_Web_viewmaildomains.aspx.cdcab7d2.dll" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\bin\App_Web_viewmaildomains.aspx.cdcab7d2.dll" /> + <File Id="file53" Name="log4net.dll" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\bin\log4net.dll" /> + <File Id="file54" Name="NMail.dll" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\bin\NMail.dll" /> + <File Id="file55" Name="NMAILS_1.DLL" LongName="NMail.Server.dll" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\bin\NMail.Server.dll" /> + <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> </Directory> <Directory Id="directory2" Name="Images"> @@ -191,13 +211,28 @@ </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"> + <File Id="file37" Name="def.skn" LongName="Default.skin" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\App_Themes\Default\Default.skin" /> + </Component> + <Component Id="component38" DiskId="1" Guid="153879DA-AAF8-4a49-8DDD-4D3EFAC7C71C"> + <File Id="file38" Name="s.css" LongName="StyleSheet.css" Checksum="yes" Compressed="yes" Vital="yes" src="obj\NMail.Administration.Web.Compiled\App_Themes\Default\StyleSheet.css" /> + </Component> + </Directory> + </Directory> </Directory> - - <Component Id="C_VirtualWebDir" Guid="45A1A00F-7CAB-462f-A361-18566149FEBF"> + + <!-- <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> - </Component> + + <WebSite Id="DefaultWebSite" Description="Default Web Site" > + <WebAddress Id="AllUnassigned" Port="443" Secure="yes"/> + </WebSite> + </Component> --> <!-- == @@ -215,6 +250,8 @@ <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' /> </Component> <Component Id="C_NMail.DnsClient.dll" Guid="527A7514-6746-4ead-9E0C-60986478FB6A"> @@ -336,12 +373,31 @@ </Directory> <Directory Id="DesktopFolder" Name="Desktop" /> + </Directory> - <WebSite Id="DefaultWebSite" Description="Default Web Site"> - <WebAddress Id="AllUnassigned" Port="443" Secure="yes"/> - </WebSite> + + <!-- + == + == 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."> @@ -358,8 +414,9 @@ <!-- NMail Server EXEs --> <ComponentRef Id="C_NMail.Server.Console.exe" /> - <ComponentRef Id="C_NMail.Administration.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" /> @@ -391,7 +448,10 @@ <Feature Id="F_AdminWebsite" Display="expand" Title="Administration Website" Level="1" Description="NMail's ASP.net administration website."> - <ComponentRef Id="C_VirtualWebDir"/> + <!-- <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> --> <!-- Admin website files --> <ComponentRef Id="component0"/> @@ -424,6 +484,11 @@ <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" Modified: NMail/trunk/Installer/NMail-installer.build =================================================================== --- NMail/trunk/Installer/NMail-installer.build 2006-11-11 09:38:54 UTC (rev 82) +++ NMail/trunk/Installer/NMail-installer.build 2006-11-11 10:49:28 UTC (rev 83) @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" ?> <project name="nant" default="package"> <!-- default configuration --> - <property name="project.config" value="Debug" /> + <property name="project.config" value="Release" /> <property name="current.build.defines" value="" /> <target name="Debug" description="Packages up a 'debug' build into an installer"> @@ -72,6 +72,7 @@ <!-- Compile the installer package --> <exec program="candle" verbose="true"> + <arg value="-nologo" /> <arg value="-out" /> <arg> <path> @@ -84,6 +85,7 @@ <!-- Link the installer package --> <exec program="light"> <!-- TODO: add a date and revision number into the installer name --> + <arg value="-nologo" /> <arg value="-out" /> <arg><path><pathelement file="${output.dir}/NMail-${project.config}-${build.date}.msi" /></path></arg> Modified: NMail/trunk/MonoPrivileges/MonoPrivileges.csproj =================================================================== --- NMail/trunk/MonoPrivileges/MonoPrivileges.csproj 2006-11-11 09:38:54 UTC (rev 82) +++ NMail/trunk/MonoPrivileges/MonoPrivileges.csproj 2006-11-11 10:49:28 UTC (rev 83) @@ -28,7 +28,7 @@ </UpgradeBackupLocation> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <OutputPath>bin\Debug\</OutputPath> + <OutputPath>..\References\NMail\Debug\</OutputPath> <AllowUnsafeBlocks>false</AllowUnsafeBlocks> <BaseAddress>285212672</BaseAddress> <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> @@ -51,7 +51,7 @@ <ErrorReport>prompt</ErrorReport> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <OutputPath>bin\Release\</OutputPath> + <OutputPath>..\References\NMail\Release\</OutputPath> <AllowUnsafeBlocks>false</AllowUnsafeBlocks> <BaseAddress>285212672</BaseAddress> <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> Modified: NMail/trunk/NDns/NDns.csproj =================================================================== --- NMail/trunk/NDns/NDns.csproj 2006-11-11 09:38:54 UTC (rev 82) +++ NMail/trunk/NDns/NDns.csproj 2006-11-11 10:49:28 UTC (rev 83) @@ -28,7 +28,7 @@ </UpgradeBackupLocation> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <OutputPath>bin\Debug\</OutputPath> + <OutputPath>..\References\NMail\Debug\</OutputPath> <AllowUnsafeBlocks>false</AllowUnsafeBlocks> <BaseAddress>285212672</BaseAddress> <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> @@ -50,7 +50,7 @@ <ErrorReport>prompt</ErrorReport> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <OutputPath>bin\Release\</OutputPath> + <OutputPath>..\References\NMail\Release\</OutputPath> <AllowUnsafeBlocks>false</AllowUnsafeBlocks> <BaseAddress>285212672</BaseAddress> <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> Deleted: NMail/trunk/NDns/NDns.xml =================================================================== --- NMail/trunk/NDns/NDns.xml 2006-11-11 09:38:54 UTC (rev 82) +++ NMail/trunk/NDns/NDns.xml 2006-11-11 10:49:28 UTC (rev 83) @@ -1,921 +0,0 @@ -<?xml version="1.0"?> -<doc> - <assembly> - <name>NDns</name> - </assembly> - <members> - <member name="T:NDns.Message.Header"> - <summary> - Represents the header component of a DNS message. - </summary> - </member> - <member name="F:NDns.Message.Header.id"> - <summary> - A 16 bit Id number to identify this message. - </summary> - </member> - <member name="F:NDns.Message.Header.response"> - <summary> - Was this message a query or a response? - </summary> - </member> - <member name="F:NDns.Message.Header.opcode"> - <summary> - A four bit field that specifies query type in the message. - </summary> - </member> - <member name="F:NDns.Message.Header.authoritative"> - <summary> - Is the answer authoritative? - </summary> - </member> - <member name="F:NDns.Message.Header.truncated"> - <summary> - Was the message truncated due to size constraints? - </summary> - </member> - <member name="F:NDns.Message.Header.recursionDesired"> - <summary> - Is recursion desired? - </summary> - </member> - <member name="F:NDns.Message.Header.recursionAvailable"> - <summary> - Is recursion available? - </summary> - </member> - <member name="F:NDns.Message.Header.rcode"> - <summary> - The response code for this message. - </summary> - </member> - <member name="F:NDns.Message.Header.questionEntries"> - <summary> - An unsigned 16 bit integer specifying the number of entries in the - question section. - </summary> - </member> - <member name="F:NDns.Message.Header.answerEntries"> - <summary> - An unsigned 16 bit integer specifying the number of resource - records in the answer section. - </summary> - </member> - <member name="F:NDns.Message.Header.nameServerEntries"> - <summary> - An unsigned 16 bit integer specifying the number of name server - resource records in the authority records section. - </summary> - </member> - <member name="F:NDns.Message.Header.additionalEntries"> - <summary> - An unsigned 16 bit integer specifying the number of resource records in - the additional records section. - </summary> - </member> - <member name="F:NDns.Message.Header.lastId"> - <summary> - The last Id number assigned to a DNS message. - </summary> - </member> - <member name="M:NDns.Message.Header.#ctor"> - <summary> - Creates a new DNS message header with a unique Id number. - </summary> - </member> - <member name="M:NDns.Message.Header.#ctor(System.Byte[],System.UInt16,System.UInt16@)"> - <summary> - Creates a new DNS message header using the given data. This data is - typically the response from a DNS server. - </summary> - <param name="data">The data to create the message header from.</param> - <param name="start">The position to start reading the byte array from.</param> - <param name="length">The number of bytes read from the byte array.</param> - </member> - <member name="M:NDns.Message.Header.GetId"> - <summary> - Gets the next available Id number. - </summary> - <returns>The Id number.</returns> - </member> - <member name="M:NDns.Message.Header.ToByteArray"> - <summary> - Converts the header to a byte array ready to send in a DNS message. - </summary> - <returns>The header as a byte array.</returns> - </member> - <member name="M:NDns.Message.Header.CreateOpCode(System.Byte)"> - <summary> - Creates the opcode that corresponds to the given byte. - </summary> - <param name="opcode">The data to create the opcode from.</param> - <returns>The opcode.</returns> - </member> - <member name="M:NDns.Message.Header.CreateResponseCode(System.Byte)"> - <summary> - Creates the response code that corresponds to the given byte. - </summary> - <param name="rcode">The data to create the response code from.</param> - <returns>The response code.</returns> - </member> - <member name="P:NDns.Message.Header.Id"> - <summary> - Gets the Id number for this header (and thus message). - </summary> - </member> - <member name="T:NDns.Message.AnswerSection"> - <summary> - A answer section entry in a DNS message. - </summary> - </member> - <member name="F:NDns.Message.AnswerSection.answerName"> - <summary> - The string name in this answer. - </summary> - </member> - <member name="F:NDns.Message.AnswerSection.answerType"> - <summary> - The type of record. - </summary> - </member> - <member name="F:NDns.Message.AnswerSection.answerClass"> - <summary> - The query class. - </summary> - </member> - <member name="F:NDns.Message.AnswerSection.answerTTL"> - <summary> - The time to live for the answer. - </summary> - </member> - <member name="F:NDns.Message.AnswerSection.answerRecord"> - <summary> - The record data associated with this record. - </summary> - </member> - <member name="M:NDns.Message.AnswerSection.#ctor(System.Byte[],System.UInt16,System.UInt16@,NDns.Message.DomainCoder)"> - <summary> - Creates a answer section from the given byte data. - </summary> - <param name="data">The data to create the answer section from.</param> - <param name="start">The position to start reading the byte array from.</param> - <param name="length">The number of bytes read from the byte array.</param> - <param name="coder">The coder to use when parsing the data.</param> - </member> - <member name="P:NDns.Message.AnswerSection.Record"> - <summary> - The answer record associated with this answer entry. - </summary> - </member> - <member name="T:NDns.Message.Records.CNameRecord"> - <summary> - A DNS Canonical NAME record. - </summary> - </member> - <member name="T:NDns.Message.Records.Record"> - <summary> - A DNS record. - </summary> - </member> - <member name="F:NDns.Message.Records.Record.type"> - <summary> - The type of this record. - </summary> - </member> - <member name="F:NDns.Message.Records.Record.recordTTL"> - <summary> - The time to live for this record (in seconds). - </summary> - </member> - <member name="F:NDns.Message.Records.Record.creationTime"> - <summary> - The time this record was created. - </summary> - </member> - <member name="M:NDns.Message.Records.Record.#ctor"> - <summary> - Creates a new DNS record. - </summary> - </member> - <member name="P:NDns.Message.Records.Record.Type"> - <summary> - Returns the type for this record. - </summary> - </member> - <member name="P:NDns.Message.Records.Record.Data"> - <summary> - The data associated with this record as a user readable string. - </summary> - </member> - <member name="P:NDns.Message.Records.Record.TTL"> - <summary> - Gets and sets the time to live for this record (in seconds). - </summary> - </member> - <member name="F:NDns.Message.Records.CNameRecord.cName"> - <summary> - The canonical name for this record. - </summary> - </member> - <member name="M:NDns.Message.Records.CNameRecord.#ctor(System.String)"> - <summary> - Creates a CName record from the given domain. - </summary> - <param name="cName">The string of the canonical name.</param> - </member> - <member name="M:NDns.Message.Records.CNameRecord.#ctor(System.Byte[],System.UInt16,System.UInt16@,NDns.Message.DomainCoder)"> - <summary> - Creates a CName record from the given byte data. - </summary> - <param name="data">The data to create the CName record from.</param> - <param name="start">The position to start reading the byte array from.</param> - <param name="length">The number of bytes read from the byte array.</param> - <param name="coder">The coder to use when parsing the data.</param> - </member> - <member name="P:NDns.Message.Records.CNameRecord.CName"> - <summary> - Returns the canonical name for this record. - </summary> - </member> - <member name="P:NDns.Message.Records.CNameRecord.Data"> - <summary> - The data associated with this record as a user readable string. - </summary> - </member> - <member name="T:NDns.QueryFactory"> - <summary> - A factory class for creating DNS query and response messages. - </summary> - </member> - <member name="M:NDns.QueryFactory.CreateQuery(System.String,NDns.Message.QType)"> - <summary> - Creates a new DNS query to look up the record for the query string and type. - </summary> - <param name="queryString">The query string to pack.</param> - <param name="queryType">The type of the query.</param> - <returns>The DNS message.</returns> - </member> - <member name="T:NDns.Message.Records.PTRRecord"> - <summary> - A DNS PTR record. - </summary> - </member> - <member name="F:NDns.Message.Records.PTRRecord.name"> - <summary> - The name for this record. - </summary> - </member> - <member name="M:NDns.Message.Records.PTRRecord.#ctor(System.String)"> - <summary> - Creates a PTR record from the given domain. - </summary> - <param name="name">The string of the name.</param> - </member> - <member name="M:NDns.Message.Records.PTRRecord.#ctor(System.Byte[],System.UInt16,System.UInt16@,NDns.Message.DomainCoder)"> - <summary> - Creates a PTR record from the given byte data. - </summary> - <param name="data">The data to create the CName record from.</param> - <param name="start">The position to start reading the byte array from.</param> - <param name="length">The number of bytes read from the byte array.</param> - <param name="coder">The coder to use when parsing the data.</param> - </member> - <member name="P:NDns.Message.Records.PTRRecord.Name"> - <summary> - Returns the name for this record. - </summary> - </member> - <member name="P:NDns.Message.Records.PTRRecord.Data"> - <summary> - The data associated with this record as a user readable string. - </summary> - </member> - <member name="T:NDns.DnsCache"> - <summary> - Provides a cache for DNS information. - </summary> - </member> - <member name="F:NDns.DnsCache.DnsPort"> - <summary> - The port to query remote dns servers on. - </summary> - </member> - <member name="F:NDns.DnsCache.log"> - <summary> - Logging support for this class. - </summary> - </member> - <member name="F:NDns.DnsCache.mxServers"> - <summary> - A hash table of arrays of MX records indexed by string name - (e.g. an array of MX records for "anu.edu.au"). - </summary> - </member> - <member name="F:NDns.DnsCache.mxQueue"> - <summary> - A list of MX records ordered according to last use. - </summary> - </member> - <member name="F:NDns.DnsCache.domains"> - <summary> - A hash table of string records indexed by IP address - </summary> - </member> - <member name="F:NDns.DnsCache.domainQueue"> - <summary> - A list of string records ordered according to last use. - </summary> - </member> - <member name="F:NDns.DnsCache.addresses"> - <summary> - A hash table of ip address record arrays indexed by string name - (e.g. an array of A records for "www.anu.edu.au"). - </summary> - </member> - <member name="F:NDns.DnsCache.addressQueue"> - <summary> - A list of address records ordered according to last use. - </summary> - </member> - <member name="F:NDns.DnsCache.MXCacheSize"> - <summary> - The maximum number of MX record arrays to store. - </summary> - </member> - <member name="F:NDns.DnsCache.DomainCacheSize"> - <summary> - The maximum number of string names to store. - </summary> - </member> - <member name="F:NDns.DnsCache.AddressCacheSize"> - <summary> - The maximum number of A record arrays to store. - </summary> - </member> - <member name="F:NDns.DnsCache.config"> - <summary> - The configuration for this DNS cache. - </summary> - </member> - <member name="M:NDns.DnsCache.#ctor(NDns.Configuration.NDnsConfiguration)"> - <summary> - Creates a new instance of the DNS this. - </summary> - </member> - <member name="M:NDns.DnsCache.DomainMatchesAddress(System.Net.IPAddress,System.String)"> - <summary> - Checks if the given string and address match. - </summary> - <param name="address">The address to check.</param> - <param name="domain">The string to check.</param> - <returns>True if the string corresponds to the address.</returns> - </member> - <member name="M:NDns.DnsCache.GetHostName(System.Net.EndPoint)"> - <summary> - Gets a hostname for the specified end point. - </summary> - <param name="endPoint">The end point to lookup</param> - <returns>The hostname.</returns> - </member> - <member name="M:NDns.DnsCache.GetHostName(System.Net.IPAddress)"> - <summary> - Gets a hostname for the specified address. - </summary> - <param name="address">The address to lookup</param> - <returns>The hostname.</returns> - </member> - <member name="M:NDns.DnsCache.GetHostNames(System.Net.IPAddress)"> - <summary> - Gets a hostnames for the specified address. - </summary> - <param name="address">The address to lookup</param> - <returns>The address.</returns> - </member> - <member name="M:NDns.DnsCache.GetIPAddress(System.String)"> - <summary> - Gets the first IP address associated with the given domain name. - </summary> - <param name="domainName">The domain name to resolve.</param> - <returns>The IP address.</returns> - </member> - <member name="M:NDns.DnsCache.GetIPAddresses(System.String)"> - <summary> - Looks up IP addresses for the given string name. - </summary> - <param name="domainName">The string name to lookup the addresses for.</param> - <returns>The IP addresses for the string name.</returns> - </member> - <member name="M:NDns.DnsCache.LookupRecords(System.String,NDns.Message.QType)"> - <summary> - Looks up DNS records using the specified query string and query type. - </summary> - <param name="queryString">The query to send.</param> - <param name="queryType">The query type.</param> - <returns>The array of records from the DNS server.</returns> - </member> - <member name="M:NDns.DnsCache.GetPTRRecords(System.Net.IPAddress)"> - <summary> - Gets the PTR records for the specified IP address caching the results. - This method also respects TTL for the records. - </summary> - <param name="address">The address to lookup</param> - <returns>The PTR records.</returns> - </member> - <member name="M:NDns.DnsCache.GetARecords(System.String)"> - <summary> - Gets address records for the specified hostname caching the results. - This method also respects TTL for the records. - </summary> - <param name="domainName">The hostname to lookup</param> - <returns>The address records.</returns> - </member> - <member name="M:NDns.DnsCache.GetMXRecords(System.String)"> - <summary> - Looks up MX records for the given string name caching the results. - This method also respects TTL for the records. - </summary> - <param name="domainName">The string to get the MX records for.</param> - <returns>The MX records</returns> - </member> - <member name="M:NDns.DnsCache.LookupMXRecords(System.String)"> - <summary> - Looks up MX records from the DNS server handling empty answer - sections but not caching records. - </summary> - <param name="domainName">The string to look up the MX records for.</param> - <returns>The MX records for the given domain.</returns> - </member> - <member name="M:NDns.DnsCache.LookupPTRRecords(System.Net.IPAddress)"> - <summary> - Looks up PTR records from the DNS server but does not cache records. - </summary> - <param name="address">The string to look up the PTR records for.</param> - <returns>The PTR records for the given domain.</returns> - </member> - <member name="M:NDns.DnsCache.LookupARecords(System.String)"> - <summary> - Looks up address records from the DNS server but does not cache records. - </summary> - <param name="domainName">The string name to lookup the addresses for.</param> - <returns>The addresses records for the given domain.</returns> - </member> - <member name="M:NDns.DnsCache.ConvertToIPAddresses(NDns.Message.Records.ARecord[])"> - <summary> - Converts an array of address records into an array of IP addresses. - </summary> - <param name="records">The records to convert.</param> - <returns>The IP addresses.</returns> - </member> - <member name="M:NDns.DnsCache.ConvertToHostnames(NDns.Message.Records.PTRRecord[])"> - <summary> - Converts an array of PTR records into an array of hostnames. - </summary> - <param name="records">The records to convert.</param> - <returns>The hostnames.</returns> - </member> - <member name="M:NDns.DnsCache.PerformQuery(NDns.Message.DNSMessage)"> - <summary> - Queries a DNS server using the given DNS query. - </summary> - <param name="queryMessage">The query to send to the server.</param> - <returns>The response from the server.</returns> - </member> - <member name="T:NDns.Message.ResponseCode"> - <summary> - The response code is a 4 bit field is set as part of responses. - </summary> - </member> - <member name="F:NDns.Message.ResponseCode.NoError"> - <summary> - No error condition. - </summary> - </member> - <member name="F:NDns.Message.ResponseCode.FormatError"> - <summary> - The name server was unable to interpret the query. - </summary> - </member> - <member name="F:NDns.Message.ResponseCode.ServerFailure"> - <summary> - The name server was unable to process this query due to a problem - with the name server. - </summary> - </member> - <member name="F:NDns.Message.ResponseCode.NameError"> - <summary> - Meaningful only for responses from an authoritative name server, - this code signifies that the string name referenced in the query - does not exist. - </summary> - </member> - <member name="F:NDns.Message.ResponseCode.NotImplemented"> - <summary> - The name server does not support the requested kind of query. - </summary> - </member> - <member name="F:NDns.Message.ResponseCode.Refused"> - <summary> - The name server refuses to perform the specified operation for - policy reasons. - </summary> - </member> - <member name="T:NDns.Message.Records.MXRecord"> - <summary> - A DNS Mail eXchanger record. - </summary> - </member> - <member name="F:NDns.Message.Records.MXRecord.preference"> - <summary> - The preference associated with this MX record. - </summary> - </member> - <member name="F:NDns.Message.Records.MXRecord.mxName"> - <summary> - The name of the MX server. - </summary> - </member> - <member name="M... [truncated message content] |
From: <tmy...@us...> - 2006-11-11 12:48:16
|
Revision: 86 http://svn.sourceforge.net/nmailserver/?rev=86&view=rev Author: tmyroadctfig Date: 2006-11-11 04:47:50 -0800 (Sat, 11 Nov 2006) Log Message: ----------- Updated version of Mono.Security.dll and fixed defect with NTLM authentication. Modified Paths: -------------- NMail/trunk/NMail.ImapService/State/ConnectedState.cs NMail/trunk/References/Mono.Security.dll Modified: NMail/trunk/NMail.ImapService/State/ConnectedState.cs =================================================================== --- NMail/trunk/NMail.ImapService/State/ConnectedState.cs 2006-11-11 11:25:29 UTC (rev 85) +++ NMail/trunk/NMail.ImapService/State/ConnectedState.cs 2006-11-11 12:47:50 UTC (rev 86) @@ -133,10 +133,8 @@ string type1MsgStr = Session.Connection.ReadLine(); Type1Message type1Msg = new Type1Message(Convert.FromBase64String(type1MsgStr)); - // TODO: check this step. Check flags are sensible. // Send challenge Type2Message type2Msg = new Type2Message(); - type2Msg.Flags = type1Msg.Flags; QueueResponse(new ContinuationResponse(Convert.ToBase64String(type2Msg.GetBytes()))); // Get the client's response Modified: NMail/trunk/References/Mono.Security.dll =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tmy...@us...> - 2006-11-26 06:28:10
|
Revision: 94 http://svn.sourceforge.net/nmailserver/?rev=94&view=rev Author: tmyroadctfig Date: 2006-11-25 22:28:09 -0800 (Sat, 25 Nov 2006) Log Message: ----------- Added partial support for BODYSTRUCTURE fetch item. Factored out some IMAP data types. Added RFC 2046. Modified Paths: -------------- NMail/trunk/NMail/DataTypes/IMessageBodyPart.cs NMail/trunk/NMail/DataTypes/Message.cs NMail/trunk/NMail/DataTypes/MultipartBodyPart.cs NMail/trunk/NMail/DataTypes/SimpleBodyPart.cs NMail/trunk/NMail/Helper/MimeHelper.cs NMail/trunk/NMail/NMail.csproj NMail/trunk/NMail.ImapService/Command/FetchCommand.cs NMail/trunk/NMail.ImapService/State/ExamineState.cs NMail/trunk/NMail.ImapService/State/SelectedState.cs NMail/trunk/NMail.LocalStoreData.MySql/MySqlLocalStoreData.cs Added Paths: ----------- NMail/trunk/NMail/DataTypes/Imap/ NMail/trunk/NMail/DataTypes/Imap/BodyStructure.cs NMail/trunk/NMail/DataTypes/Imap/FetchBodyItem.cs NMail/trunk/NMail/DataTypes/Imap/FetchBodySectionType.cs NMail/trunk/NMail/DataTypes/Imap/FetchDataItem.cs NMail/trunk/NMail/DataTypes/Imap/FetchDataItemType.cs NMail/trunk/NMail/DataTypes/Imap/FetchDataList.cs NMail/trunk/doc/RFC/MIME/rfc2046_mime_part2.txt Modified: NMail/trunk/NMail/DataTypes/IMessageBodyPart.cs =================================================================== --- NMail/trunk/NMail/DataTypes/IMessageBodyPart.cs 2006-11-23 11:38:36 UTC (rev 93) +++ NMail/trunk/NMail/DataTypes/IMessageBodyPart.cs 2006-11-26 06:28:09 UTC (rev 94) @@ -16,6 +16,7 @@ */ using System; +using System.Collections.Generic; namespace NMail.DataTypes { /// <summary> @@ -40,7 +41,7 @@ /// <summary> /// Gets the mime parts of this message part, if any. /// </summary> - IMessagePart[] MimeParts { get; } + List<IMessageBodyPart> MimeParts { get; } /// <summary> /// Gets the preamble for the message body, if any. Added: NMail/trunk/NMail/DataTypes/Imap/BodyStructure.cs =================================================================== --- NMail/trunk/NMail/DataTypes/Imap/BodyStructure.cs (rev 0) +++ NMail/trunk/NMail/DataTypes/Imap/BodyStructure.cs 2006-11-26 06:28:09 UTC (rev 94) @@ -0,0 +1,79 @@ +/* + * 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; + +using NMail.Helper; + +namespace NMail.DataTypes.Imap { + public class BodyStructure { + + protected IMessageBodyPart bodyPart; + + public BodyStructure(IMessageBodyPart bodyPart) { + this.bodyPart = bodyPart; + } + + public override string ToString() { + if (this.bodyPart.MultipartBody) { + StringBuilder data = new StringBuilder(); + data.Append("("); + + foreach (IMessageBodyPart part in this.bodyPart.MimeParts) { + BodyStructure partStructure = new BodyStructure(part); + data.Append(partStructure.ToString()); + } + + data.Append("\"MIXED\")"); + return data.ToString(); + + } else { + MimeContentTransferEncoding encoding = MimeHelper.GetTransferEncoding(this.bodyPart.Headers); + MimeContentType contentType = MimeHelper.GetContentType(this.bodyPart.Headers); + string charset = MimeHelper.GetCharacterSet(this.bodyPart.Headers); + + // Count the number of lines in the message body + string bodyData = this.bodyPart.BodyData.ToString(); + int lines = 0; + int index = bodyData.IndexOf(Message.Terminator); + while (index != -1) { + lines++; + index = bodyData.IndexOf(Message.Terminator, index + 1); + } + + string encodingStr = encoding.ToString().ToUpper(); + if (encoding == MimeContentTransferEncoding.EightBit) { + encodingStr = "8bit"; + } else if (encoding == MimeContentTransferEncoding.SevenBit) { + encodingStr = "7bit"; + } + + return string.Format("(\"{0}\" \"{1}\" (\"charset\" \"{2}\") {3} {4} \"{5}\" {6} {7} NIL NIL NIL)", + contentType.ToString().ToLower(), + "plain", + charset, + "NIL", // body-fld-id + "NIL", // body-fld-desc + encodingStr, + this.bodyPart.BodyData.Length, + lines); + } + } + } +} Added: NMail/trunk/NMail/DataTypes/Imap/FetchBodyItem.cs =================================================================== --- NMail/trunk/NMail/DataTypes/Imap/FetchBodyItem.cs (rev 0) +++ NMail/trunk/NMail/DataTypes/Imap/FetchBodyItem.cs 2006-11-26 06:28:09 UTC (rev 94) @@ -0,0 +1,166 @@ +/* + * 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.Generic; +using System.Text; + +namespace NMail.DataTypes.Imap { + /// <summary> + /// A class to hold the details of a FETCH on a BODY item. + /// </summary> + public class FetchBodyItem : FetchDataItem { + /// <summary> + /// Creates a new fetch body item from the given string. + /// </summary> + /// <param name="bodyString">The string to parse.</param> + /// <param name="peek">True if the SEEN flag should not be set for this access.</param> + public FetchBodyItem(string bodyString, bool peek) + : base(peek ? FetchDataItemType.BodyPeek : FetchDataItemType.Body) { + + // Check if the fetch is partial + if (bodyString.IndexOf('<') != -1) { + parsePartial(bodyString); + } + + if (bodyString.IndexOf('[') != -1) { + // Extract the data out of "BODY[ ... ]" + bodyString = bodyString.Substring(bodyString.IndexOf('[') + 1, bodyString.Length - bodyString.IndexOf('[') - 1); + bodyString = bodyString.Substring(0, bodyString.IndexOf(']')).Trim(); + this.sectionName = bodyString; + + if (bodyString.StartsWith("HEADER")) { + if (bodyString.StartsWith("HEADER.FIELDS")) { + string headerArgs = bodyString.Substring(bodyString.IndexOf('(') + 1, bodyString.Length - bodyString.IndexOf('(') - 1); + headerArgs = headerArgs.Substring(0, headerArgs.IndexOf(')')).Trim(); + this.headerFields = headerArgs.Split(' '); + + if (bodyString.StartsWith("HEADER.FIELDS.NOT")) { + this.sectionType = FetchBodySectionType.HeaderFieldsNot; + this.sectionName = "HEADER.FIELDS.NOT"; + + } else { + this.sectionType = FetchBodySectionType.HeaderFields; + this.sectionName = "HEADER.FIELDS"; + } + + } else { + this.sectionType = FetchBodySectionType.Header; + } + + } else if (bodyString == "MIME") { + this.sectionType = FetchBodySectionType.Mime; + + } else if (bodyString == "TEXT") { + this.sectionType = FetchBodySectionType.Text; + + } else if (bodyString == string.Empty) { + // No sections specified, default to all + this.sectionType = FetchBodySectionType.All; + + } else { + this.sectionType = FetchBodySectionType.Section; + } + + } else { + // No sections specified, default to all + this.sectionType = FetchBodySectionType.All; + this.sectionName = string.Empty; + } + } + + private void parsePartial(string data) { + // Parse out the start and end. In the form: <start.end> + string start = data.Substring(data.IndexOf('<') + 1, data.IndexOf('.') - 1); + string length = data.Substring(data.IndexOf('.') + 1, data.IndexOf('>') - 1); + + this.partial = true; + this.startOctet = Int32.Parse(start); + this.length = Int32.Parse(length); + } + + private bool partial; + + /// <summary> + /// Indicates if this is a partial fetch + /// </summary> + public bool Partial { + get { + return this.partial; + } + } + + private int startOctet; + + /// <summary> + /// The start of the partial fetch. + /// </summary> + public int StartOctet { + get { + if (!this.partial) + throw new ArgumentException("Not a partial fetch."); + return this.startOctet; + } + } + + private int length; + + /// <summary> + /// The length of the partial fetch. + /// </summary> + public int Length { + get { + if (!this.partial) + throw new ArgumentException("Not a partial fetch."); + return this.length; + } + } + + private FetchBodySectionType sectionType; + + /// <summary> + /// The type of body section fetch. + /// </summary> + public FetchBodySectionType SectionType { + get { + return this.sectionType; + } + } + + string sectionName; + + /// <summary> + /// The section name for this body section fetch. + /// </summary> + public string SectionName { + get { + return this.sectionName; + } + } + + private string[] headerFields; + + /// <summary> + /// The header fields associated with this section fetch. + /// </summary> + public string[] HeaderFields { + get { + return this.headerFields; + } + } + } +} Added: NMail/trunk/NMail/DataTypes/Imap/FetchBodySectionType.cs =================================================================== --- NMail/trunk/NMail/DataTypes/Imap/FetchBodySectionType.cs (rev 0) +++ NMail/trunk/NMail/DataTypes/Imap/FetchBodySectionType.cs 2006-11-26 06:28:09 UTC (rev 94) @@ -0,0 +1,62 @@ +/* + * 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.Generic; +using System.Text; + +namespace NMail.DataTypes.Imap { + /// <summary> + /// The type of the body section to fetch. + /// </summary> + public enum FetchBodySectionType { + /// <summary> + /// Fetches the entire message including the header. + /// </summary> + All, + + /// <summary> + /// Fetches the entire header. + /// </summary> + Header, + + /// <summary> + /// Fetches only specified header fields. + /// </summary> + HeaderFields, + + /// <summary> + /// Fetches all but the specified header fields. + /// </summary> + HeaderFieldsNot, + + /// <summary> + /// Fetches MIME header for the given part. + /// </summary> + Mime, + + /// <summary> + /// Fetches the body of the given part. + /// </summary> + Text, + + /// <summary> + /// Fetches the section of the given part. + /// </summary> + Section + } +} Added: NMail/trunk/NMail/DataTypes/Imap/FetchDataItem.cs =================================================================== --- NMail/trunk/NMail/DataTypes/Imap/FetchDataItem.cs (rev 0) +++ NMail/trunk/NMail/DataTypes/Imap/FetchDataItem.cs 2006-11-26 06:28:09 UTC (rev 94) @@ -0,0 +1,46 @@ +/* + * 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.Generic; +using System.Text; + +namespace NMail.DataTypes.Imap { + /// <summary> + /// Represents a single item in the fetch list. + /// </summary> + public class FetchDataItem { + /// <summary> + /// Creates a new item with the given type. + /// </summary> + /// <param name="dataType">The data type.</param> + public FetchDataItem(FetchDataItemType dataType) { + this.dataType = dataType; + } + + private FetchDataItemType dataType; + + /// <summary> + /// The type of item to fetch. + /// </summary> + public FetchDataItemType DataType { + get { + return this.dataType; + } + } + } +} Added: NMail/trunk/NMail/DataTypes/Imap/FetchDataItemType.cs =================================================================== --- NMail/trunk/NMail/DataTypes/Imap/FetchDataItemType.cs (rev 0) +++ NMail/trunk/NMail/DataTypes/Imap/FetchDataItemType.cs 2006-11-26 06:28:09 UTC (rev 94) @@ -0,0 +1,97 @@ +/* + * 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.Generic; +using System.Text; + +namespace NMail.DataTypes.Imap { + /// <summary> + /// The type of the data item to fetch. + /// </summary> + public enum FetchDataItemType { + /// <summary> + /// Macro equivalent to: (FLAGS INTERNALDATE RFC822.SIZE ENVELOPE) + /// </summary> + All, + + /// <summary> + /// Macro equivalent to: (FLAGS INTERNALDATE RFC822.SIZE) + /// </summary> + Fast, + + /// <summary> + /// Macro equivalent to: (FLAGS INTERNALDATE RFC822.SIZE ENVELOPE BODY) + /// </summary> + Full, + + /// <summary> + /// The text of a particular body section. + /// </summary> + Body, + + /// <summary> + /// An alternate form of BODY[<section>] that does not implicitly set the \Seen flag. + /// </summary> + BodyPeek, + + /// <summary> + /// The [MIME-IMB] body structure of the message. + /// </summary> + BodyStructure, + + /// <summary> + /// The envelope structure of the message. + /// </summary> + Envelope, + + /// <summary> + /// The flags that are set for this message. + /// </summary> + Flags, + + /// <summary> + /// The internal date of the message. + /// </summary> + InternalDate, + + /// <summary> + /// Functionally equivalent to BODY[] ... (RFC822 is returned). + /// </summary> + Rfc822, + + /// <summary> + /// Functionally equivalent to BODY.PEEK[HEADER] ... (RFC822.HEADER is returned). + /// </summary> + Rfc822Header, + + /// <summary> + /// The [RFC-2822] size of the message. + /// </summary> + Rfc822Size, + + /// <summary> + /// Functionally equivalent to BODY[TEXT] ... (RFC822.TEXT is returned). + /// </summary> + Rfc822Text, + + /// <summary> + /// The unique identifier for the message. + /// </summary> + Uid + } +} Added: NMail/trunk/NMail/DataTypes/Imap/FetchDataList.cs =================================================================== --- NMail/trunk/NMail/DataTypes/Imap/FetchDataList.cs (rev 0) +++ NMail/trunk/NMail/DataTypes/Imap/FetchDataList.cs 2006-11-26 06:28:09 UTC (rev 94) @@ -0,0 +1,100 @@ +/* + * 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.Generic; +using System.Text; + +using NMail.Helper; + +namespace NMail.DataTypes.Imap { + /// <summary> + /// Represents a list of data items to fetch in a FETCH command. + /// </summary> + public class FetchDataList { + /// <summary> + /// Internal storage for the data list. + /// </summary> + private List<FetchDataItem> fetchDataList = new List<FetchDataItem>(); + + /// <summary> + /// Creates a new list from the given string. + /// </summary> + /// <param name="fetchList">The IMAP data list to parse.</param> + public FetchDataList(string dataList) { + // Clean up the list + dataList = dataList.Trim(); + if (dataList.StartsWith("(") && dataList.EndsWith(")")) { + dataList = dataList.Substring(1, dataList.Length - 2).Trim(); + } + + string[] tokens = StringTokenizer.GetQuotedBracketTokens(dataList, " ".ToCharArray(), MaximumTokens); + + foreach (string token in tokens) { + FetchDataItem currentItem = null; + + if (token.StartsWith("BODY.PEEK")) { + // Handle the BODY.PEEK token + currentItem = new FetchBodyItem(token, true); + + } else if (token.StartsWith("BODYSTRUCTURE")) { + // Handle the BODYSTRUCTURE token + currentItem = new FetchDataItem(FetchDataItemType.BodyStructure); + + } else if (token.StartsWith("BODY")) { + // Handle the BODY token - note this needs to appear after BODY.PEEK and BODYSTRUCTURE + currentItem = new FetchBodyItem(token, false); + + } else if (token.StartsWith("RFC822")) { + // Handle RFC822 tokens that might have a "." in them + if (token == "RFC822") { + currentItem = new FetchDataItem(FetchDataItemType.Rfc822); + + } else if (token == "RFC822.HEADER") { + currentItem = new FetchDataItem(FetchDataItemType.Rfc822Header); + + } else if (token == "RFC822.SIZE") { + currentItem = new FetchDataItem(FetchDataItemType.Rfc822Size); + + } else if (token == "RFC822.TEXT") { + currentItem = new FetchDataItem(FetchDataItemType.Rfc822Text); + + } else { + throw new ArgumentException("Invalid item in FETCH list."); + } + } else { + // Handle all other valid tokens + FetchDataItemType dataType = (FetchDataItemType) Enum.Parse(typeof(FetchDataItemType), token, true); + currentItem = new FetchDataItem(dataType); + } + + this.fetchDataList.Add(currentItem); + } + } + + /// <summary> + /// Returns the list of data items to retieve. + /// </summary> + public List<FetchDataItem> DataListItems { + get { + return this.fetchDataList; + } + } + + private const int MaximumTokens = 100; + } +} Modified: NMail/trunk/NMail/DataTypes/Message.cs =================================================================== --- NMail/trunk/NMail/DataTypes/Message.cs 2006-11-23 11:38:36 UTC (rev 93) +++ NMail/trunk/NMail/DataTypes/Message.cs 2006-11-26 06:28:09 UTC (rev 94) @@ -16,7 +16,7 @@ */ using System; -using System.Collections; +using System.Collections.Generic; using System.Collections.Specialized; using System.Text; using System.Text.RegularExpressions; @@ -85,7 +85,7 @@ private void parseMime() { if (this.parsed) return; // No need for parsing - string mimeBoundary = MimeHelper.GetBoundary(this.data.Headers["Content-type"]); + string mimeBoundary = MimeHelper.GetBoundary(this.data.Headers); MessageDataPart preamble; IMessageBodyPart[] parsedParts; MessageDataPart postamble; @@ -106,14 +106,14 @@ /// </summary> public bool MultipartBody { get { - return (MimeHelper.GetContentType(this.data.Headers["Content-Type"]) == MimeContentType.Multipart); + return (MimeHelper.GetContentType(this.data.Headers) == MimeContentType.Multipart); } } /// <summary> /// Gets the mime parts of this message part, if any. /// </summary> - public IMessagePart[] MimeParts { + public List<IMessageBodyPart> MimeParts { get { if (!this.parsed) parseMime(); return this.data.MimeParts; Modified: NMail/trunk/NMail/DataTypes/MultipartBodyPart.cs =================================================================== --- NMail/trunk/NMail/DataTypes/MultipartBodyPart.cs 2006-11-23 11:38:36 UTC (rev 93) +++ NMail/trunk/NMail/DataTypes/MultipartBodyPart.cs 2006-11-26 06:28:09 UTC (rev 94) @@ -16,7 +16,7 @@ */ using System; -using System.Collections; +using System.Collections.Generic; using System.Text; using NMail.Helper; @@ -45,7 +45,7 @@ /// <summary> /// The list of MIME parts for this message body. /// </summary> - private ArrayList mimeParts; + private List<IMessageBodyPart> mimeParts; /// <summary> /// A string containing the mime boundary. @@ -63,14 +63,14 @@ IMessageBodyPart[] mimeParts, MessageDataPart postamble) { this.headers = headers; this.preamble = preamble; - this.mimeParts = new ArrayList(mimeParts); + this.mimeParts = new List<IMessageBodyPart>(mimeParts); this.postamble = postamble; if (this.headers == null) { this.headers = new MessageHeaders(); } - this.mimeBoundary = MimeHelper.GetBoundary(this.headers["Content-type"]); + this.mimeBoundary = MimeHelper.GetBoundary(this.headers); } /// <summary> @@ -97,9 +97,9 @@ /// <summary> /// Gets the mime parts for this body. /// </summary> - public IMessagePart[] MimeParts { + public List<IMessageBodyPart> MimeParts { get { - return (IMessagePart[]) this.mimeParts.ToArray(typeof(IMessagePart)); + return this.mimeParts; } } Modified: NMail/trunk/NMail/DataTypes/SimpleBodyPart.cs =================================================================== --- NMail/trunk/NMail/DataTypes/SimpleBodyPart.cs 2006-11-23 11:38:36 UTC (rev 93) +++ NMail/trunk/NMail/DataTypes/SimpleBodyPart.cs 2006-11-26 06:28:09 UTC (rev 94) @@ -16,7 +16,7 @@ */ using System; -using System.Collections; +using System.Collections.Generic; using System.Text; using NMail.Helper; @@ -111,7 +111,7 @@ /// <summary> /// Gets the mime parts of this message part. Always returns null. /// </summary> - public IMessagePart[] MimeParts { + public List<IMessageBodyPart> MimeParts { get { return null; } Modified: NMail/trunk/NMail/Helper/MimeHelper.cs =================================================================== --- NMail/trunk/NMail/Helper/MimeHelper.cs 2006-11-23 11:38:36 UTC (rev 93) +++ NMail/trunk/NMail/Helper/MimeHelper.cs 2006-11-26 06:28:09 UTC (rev 94) @@ -26,7 +26,7 @@ /// <summary> /// Provides methods for paring various mime parameters. /// </summary> - public class MimeHelper { + public static class MimeHelper { #region ParseMime /// <summary> /// Parses the preamble, postamble and MIME parts from MIME data. @@ -116,6 +116,16 @@ /// Gets the MIME content transfer encoding from the given MIME header line. /// The default encoding type if seven bit ASCII. /// </summary> + /// <param name="headers">The headers to get the transfer encoding from.</param> + /// <returns>The parsed encoding type.</returns> + public static MimeContentTransferEncoding GetTransferEncoding(MessageHeaders headers) { + return GetTransferEncoding(headers[ContentTransferEncodingHeader]); + } + + /// <summary> + /// Gets the MIME content transfer encoding from the given MIME header line. + /// The default encoding type if seven bit ASCII. + /// </summary> /// <remarks> /// The MIME header line for this value is named "Content-Transfer-Encoding". /// </remarks> @@ -156,6 +166,16 @@ /// Gets the MIME content type from the given MIME header line. The default /// content type is text. /// </summary> + /// <param name="headers">The headers to get the content type from.</param> + /// <returns>The parsed content type.</returns> + public static MimeContentType GetContentType(MessageHeaders headers) { + return GetContentType(headers[ContentTypeHeader]); + } + + /// <summary> + /// Gets the MIME content type from the given MIME header line. The default + /// content type is text. + /// </summary> /// <remarks> /// The MIME header line for this value is named "Content-Type". /// </remarks> @@ -206,6 +226,15 @@ /// <summary> /// Extracts the MIME boundary string from the given header. /// </summary> + /// <param name="headers">The headers to get the boundary from.</param> + /// <returns>The boundary or an empty string.</returns> + public static string GetBoundary(MessageHeaders headers) { + return GetBoundary(headers[ContentTypeHeader]); + } + + /// <summary> + /// Extracts the MIME boundary string from the given header. + /// </summary> /// <remarks> /// The message header line for this value is named "Content-Type". /// </remarks> @@ -225,6 +254,15 @@ /// <summary> /// Extracts the MIME character set string from the given header. /// </summary> + /// <param name="headers">The headers to extract the character set from.</param> + /// <returns>The character set or an empty string.</returns> + public static string GetCharacterSet(MessageHeaders headers) { + return GetCharacterSet(headers[ContentTypeHeader]); + } + + /// <summary> + /// Extracts the MIME character set string from the given header. + /// </summary> /// <remarks> /// The message header line for this value is named "Content-Type". /// </remarks> @@ -233,11 +271,15 @@ public static string GetCharacterSet(string contentType) { Match m = Regex.Match(contentType, "charset=\"?(.+)\"?\\s*", RegexOptions.Compiled); if (m.Success) { - return m.Captures[0].Value.Replace("\"", string.Empty); + return m.Groups[1].Value.Replace("\"", string.Empty); } else { return string.Empty; } } #endregion + + public const string ContentTypeHeader = "Content-type"; + + public const string ContentTransferEncodingHeader = "Content-Transfer-Encoding"; } } Modified: NMail/trunk/NMail/NMail.csproj =================================================================== --- NMail/trunk/NMail/NMail.csproj 2006-11-23 11:38:36 UTC (rev 93) +++ NMail/trunk/NMail/NMail.csproj 2006-11-26 06:28:09 UTC (rev 94) @@ -132,6 +132,12 @@ <Compile Include="DataTypes\ACLs\UserGroupAdminPrivilege.cs" /> <Compile Include="DataTypes\Envelope.cs" /> <Compile Include="DataTypes\IDnsClient.cs" /> + <Compile Include="DataTypes\Imap\BodyStructure.cs" /> + <Compile Include="DataTypes\Imap\FetchBodyItem.cs" /> + <Compile Include="DataTypes\Imap\FetchBodySectionType.cs" /> + <Compile Include="DataTypes\Imap\FetchDataItem.cs" /> + <Compile Include="DataTypes\Imap\FetchDataItemType.cs" /> + <Compile Include="DataTypes\Imap\FetchDataList.cs" /> <Compile Include="DataTypes\IService.cs" /> <Compile Include="DataTypes\ISmtpClient.cs" /> <Compile Include="DataTypes\ByteString.cs"> Modified: NMail/trunk/NMail.ImapService/Command/FetchCommand.cs =================================================================== --- NMail/trunk/NMail.ImapService/Command/FetchCommand.cs 2006-11-23 11:38:36 UTC (rev 93) +++ NMail/trunk/NMail.ImapService/Command/FetchCommand.cs 2006-11-26 06:28:09 UTC (rev 94) @@ -18,7 +18,7 @@ using System; using System.Collections; -using NMail.Helper; +using NMail.DataTypes.Imap; namespace NMail.ImapService.Command { /// <summary> @@ -63,373 +63,4 @@ } } } - - #region Fetch Data - #region FetchDataList - /// <summary> - /// Represents a list of data items to fetch in a FETCH command. - /// </summary> - public class FetchDataList { - /// <summary> - /// Internal storage for the data list. - /// </summary> - private ArrayList fetchDataList; - - /// <summary> - /// Creates a new list from the given string. - /// </summary> - /// <param name="fetchList">The IMAP data list to parse.</param> - public FetchDataList(string dataList) { - this.fetchDataList = new ArrayList(); - - // Clean up the list - dataList = dataList.Trim(); - if (dataList.StartsWith("(") && dataList.EndsWith(")")) { - dataList = dataList.Substring(1, dataList.Length - 2).Trim(); - } - - string[] tokens = StringTokenizer.GetQuotedBracketTokens(dataList, " ".ToCharArray(), MaximumTokens); - - foreach (string token in tokens) { - FetchDataItem currentItem = null; - - if (token.StartsWith("BODY.PEEK")) { - // Handle the BODY.PEEK token - currentItem = new FetchBodyItem(token, true); - - } else if (token.StartsWith("BODY.PEEK")) { - // Handle the BODY token - currentItem = new FetchBodyItem(token, false); - - } else if (token.StartsWith("RFC822")) { - // Handle RFC822 tokens that might have a "." in them - if (token == "RFC822") { - currentItem = new FetchDataItem(FetchDataItemType.Rfc822); - - } else if (token == "RFC822.HEADER") { - currentItem = new FetchDataItem(FetchDataItemType.Rfc822Header); - - } else if (token == "RFC822.SIZE") { - currentItem = new FetchDataItem(FetchDataItemType.Rfc822Size); - - } else if (token == "RFC822.TEXT") { - currentItem = new FetchDataItem(FetchDataItemType.Rfc822Text); - - } else { - throw new ArgumentException("Invalid item in FETCH list."); - } - } else { - // Handle all other valid tokens - FetchDataItemType dataType = (FetchDataItemType) Enum.Parse(typeof(FetchDataItemType), token, true); - currentItem = new FetchDataItem(dataType); - } - - this.fetchDataList.Add(currentItem); - } - } - - /// <summary> - /// Returns the list of data items to retieve. - /// </summary> - public FetchDataItem[] DataListItems { - get { - return (FetchDataItem[]) this.fetchDataList.ToArray(typeof(FetchDataItem)); - } - } - - private const int MaximumTokens = 100; - } - #endregion - - #region FetchDataItemType - /// <summary> - /// The type of the data item to fetch. - /// </summary> - public enum FetchDataItemType { - /// <summary> - /// Macro equivalent to: (FLAGS INTERNALDATE RFC822.SIZE ENVELOPE) - /// </summary> - All, - - /// <summary> - /// Macro equivalent to: (FLAGS INTERNALDATE RFC822.SIZE) - /// </summary> - Fast, - - /// <summary> - /// Macro equivalent to: (FLAGS INTERNALDATE RFC822.SIZE ENVELOPE BODY) - /// </summary> - Full, - - /// <summary> - /// The text of a particular body section. - /// </summary> - Body, - - /// <summary> - /// An alternate form of BODY[<section>] that does not implicitly set the \Seen flag. - /// </summary> - BodyPeek, - - /// <summary> - /// The [MIME-IMB] body structure of the message. - /// </summary> - BodyStructure, - - /// <summary> - /// The envelope structure of the message. - /// </summary> - Envelope, - - /// <summary> - /// The flags that are set for this message. - /// </summary> - Flags, - - /// <summary> - /// The internal date of the message. - /// </summary> - InternalDate, - - /// <summary> - /// Functionally equivalent to BODY[] ... (RFC822 is returned). - /// </summary> - Rfc822, - - /// <summary> - /// Functionally equivalent to BODY.PEEK[HEADER] ... (RFC822.HEADER is returned). - /// </summary> - Rfc822Header, - - /// <summary> - /// The [RFC-2822] size of the message. - /// </summary> - Rfc822Size, - - /// <summary> - /// Functionally equivalent to BODY[TEXT] ... (RFC822.TEXT is returned). - /// </summary> - Rfc822Text, - - /// <summary> - /// The unique identifier for the message. - /// </summary> - Uid - } - #endregion - - #region FetchDataItem - /// <summary> - /// Represents a single item in the fetch list. - /// </summary> - public class FetchDataItem { - /// <summary> - /// Creates a new item with the given type. - /// </summary> - /// <param name="dataType">The data type.</param> - public FetchDataItem(FetchDataItemType dataType) { - this.dataType = dataType; - } - - private FetchDataItemType dataType; - - /// <summary> - /// The type of item to fetch. - /// </summary> - public FetchDataItemType DataType { - get { - return this.dataType; - } - } - } - #endregion - - #region Fetch Body - #region FetchBodyItem - /// <summary> - /// A class to hold the details of a FETCH on a BODY item. - /// </summary> - public class FetchBodyItem : FetchDataItem { - /// <summary> - /// Creates a new fetch body item from the given string. - /// </summary> - /// <param name="bodyString">The string to parse.</param> - /// <param name="peek">True if the SEEN flag should not be set for this access.</param> - public FetchBodyItem(string bodyString, bool peek) - : base(peek ? FetchDataItemType.BodyPeek : FetchDataItemType.Body) { - - // Check if the fetch is partial - if (bodyString.IndexOf('<') != -1) { - parsePartial(bodyString); - } - - if (bodyString.IndexOf('[') != -1) { - // Extract the data out of "BODY[ ... ]" - bodyString = bodyString.Substring(bodyString.IndexOf('[') + 1, bodyString.Length - bodyString.IndexOf('[') - 1); - bodyString = bodyString.Substring(0, bodyString.IndexOf(']')).Trim(); - this.sectionName = bodyString; - - if (bodyString.StartsWith("HEADER")) { - if (bodyString.StartsWith("HEADER.FIELDS")) { - string headerArgs = bodyString.Substring(bodyString.IndexOf('(') + 1, bodyString.Length - bodyString.IndexOf('(') - 1); - headerArgs = headerArgs.Substring(0, headerArgs.IndexOf(')')).Trim(); - this.headerFields = headerArgs.Split(' '); - - if (bodyString.StartsWith("HEADER.FIELDS.NOT")) { - this.sectionType = FetchBodySectionType.HeaderFieldsNot; - this.sectionName = "HEADER.FIELDS.NOT"; - - } else { - this.sectionType = FetchBodySectionType.HeaderFields; - this.sectionName = "HEADER.FIELDS"; - } - - } else { - this.sectionType = FetchBodySectionType.Header; - } - - } else if (bodyString == "MIME") { - this.sectionType = FetchBodySectionType.Mime; - - } else if (bodyString == "TEXT") { - this.sectionType = FetchBodySectionType.Text; - - } else if (bodyString == string.Empty) { - // No sections specified, default to all - this.sectionType = FetchBodySectionType.All; - - } else { - this.sectionType = FetchBodySectionType.Section; - } - - } else { - // No sections specified, default to all - this.sectionType = FetchBodySectionType.All; - this.sectionName = string.Empty; - } - } - - private void parsePartial(string data) { - // Parse out the start and end. In the form: <start.end> - string start = data.Substring(data.IndexOf('<') + 1, data.IndexOf('.') - 1); - string length = data.Substring(data.IndexOf('.') + 1, data.IndexOf('>') - 1); - - this.partial = true; - this.startOctet = Int32.Parse(start); - this.length = Int32.Parse(length); - } - - private bool partial; - - /// <summary> - /// Indicates if this is a partial fetch - /// </summary> - public bool Partial { - get { - return this.partial; - } - } - - private int startOctet; - - /// <summary> - /// The start of the partial fetch. - /// </summary> - public int StartOctet { - get { - if (!this.partial) throw new ArgumentException("Not a partial fetch."); - return this.startOctet; - } - } - - private int length; - - /// <summary> - /// The length of the partial fetch. - /// </summary> - public int Length { - get { - if (!this.partial) throw new ArgumentException("Not a partial fetch."); - return this.length; - } - } - - private FetchBodySectionType sectionType; - - /// <summary> - /// The type of body section fetch. - /// </summary> - public FetchBodySectionType SectionType { - get { - return this.sectionType; - } - } - - string sectionName; - - /// <summary> - /// The section name for this body section fetch. - /// </summary> - public string SectionName { - get { - return this.sectionName; - } - } - - private string[] headerFields; - - /// <summary> - /// The header fields associated with this section fetch. - /// </summary> - public string[] HeaderFields { - get { - return this.headerFields; - } - } - } - #endregion - - #region FetchBodySectionType - /// <summary> - /// The type of the body section to fetch. - /// </summary> - public enum FetchBodySectionType { - /// <summary> - /// Fetches the entire message including the header. - /// </summary> - All, - - /// <summary> - /// Fetches the entire header. - /// </summary> - Header, - - /// <summary> - /// Fetches only specified header fields. - /// </summary> - HeaderFields, - - /// <summary> - /// Fetches all but the specified header fields. - /// </summary> - HeaderFieldsNot, - - /// <summary> - /// Fetches MIME header for the given part. - /// </summary> - Mime, - - /// <summary> - /// Fetches the body of the given part. - /// </summary> - Text, - - /// <summary> - /// Fetches the section of the given part. - /// </summary> - Section - } - #endregion - #endregion - #endregion } Modified: NMail/trunk/NMail.ImapService/State/ExamineState.cs =================================================================== --- NMail/trunk/NMail.ImapService/State/ExamineState.cs 2006-11-23 11:38:36 UTC (rev 93) +++ NMail/trunk/NMail.ImapService/State/ExamineState.cs 2006-11-26 06:28:09 UTC (rev 94) @@ -20,6 +20,7 @@ using System.Text; using NMail.DataTypes; +using NMail.DataTypes.Imap; using NMail.DataTypes.LocalStore; using NMail.Helper; using NMail.ImapService.Command; @@ -331,6 +332,17 @@ } #endregion + protected virtual void sendBodyStructure(FetchResponse response, int messageUid) { + StringBuilder data = new StringBuilder(); + data.Append("BODYSTRUCTURE "); + + Message message = LocalStore.GetMessage(Session.AuthenticationToken, messageUid, Session.SelectedFolder); + BodyStructure bodyStructure = new BodyStructure(message); + data.Append(bodyStructure.ToString()); + + response.AppendResponseItem(data.ToString()); + } + #region processMessageFetch protected virtual void processMessageFetch(int messageId, bool usingUid, FetchDataList dataList) { MessageHeaders messageHeaders = null; @@ -369,8 +381,8 @@ break; case FetchDataItemType.BodyStructure: - // TODO BodyStructure - throw new NotImplementedException("BODYSTRUCTURE not implemented."); + sendBodyStructure(response, messageUid); + break; case FetchDataItemType.Envelope: ensureMessageHeaders(messageUid, ref messageHeaders); Modified: NMail/trunk/NMail.ImapService/State/SelectedState.cs =================================================================== --- NMail/trunk/NMail.ImapService/State/SelectedState.cs 2006-11-23 11:38:36 UTC (rev 93) +++ NMail/trunk/NMail.ImapService/State/SelectedState.cs 2006-11-26 06:28:09 UTC (rev 94) @@ -19,6 +19,7 @@ using System.Text; using NMail.DataTypes; +using NMail.DataTypes.Imap; using NMail.DataTypes.LocalStore; using NMail.Helper; using NMail.ImapService.Command; Modified: NMail/trunk/NMail.LocalStoreData.MySql/MySqlLocalStoreData.cs =================================================================== --- NMail/trunk/NMail.LocalStoreData.MySql/MySqlLocalStoreData.cs 2006-11-23 11:38:36 UTC (rev 93) +++ NMail/trunk/NMail.LocalStoreData.MySql/MySqlLocalStoreData.cs 2006-11-26 06:28:09 UTC (rev 94) @@ -108,7 +108,7 @@ if (message.MultipartBody) { // Insert each part of the message - for (int i = 0; i < message.MimeParts.Length; i++) { + for (int i = 0; i < message.MimeParts.Count; i++) { // Insert the current part cmd = cnn.CreateCommand(); cmd.Transaction = transaction; @@ -131,9 +131,8 @@ cmd.Transaction = transaction; cmd.Connection = cnn; - // Part 0 is not counted below in GetMessageMimePartCount cmd.CommandText = "INSERT INTO MessageData (MessageId, Part, Data) " + - "VALUES (?MessageId, 0, ?Data)"; + "VALUES (?MessageId, 1, ?Data)"; cmd.Parameters.Add("?MessageId", messageId); cmd.Parameters.Add("?Data", message.BodyData.Bytes); count = cmd.ExecuteNonQuery(); @@ -756,7 +755,7 @@ } } 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 = 0"; + 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", folder.FolderId); cmd.Parameters.Add("?FolderMessageId", messageId); byte[] data = (byte[]) cmd.ExecuteScalar(); Added: NMail/trunk/doc/RFC/MIME/rfc2046_mime_part2.txt =================================================================== --- NMail/trunk/doc/RFC/MIME/rfc2046_mime_part2.txt (rev 0) +++ NMail/trunk/doc/RFC/MIME/rfc2046_mime_part2.txt 2006-11-26 06:28:09 UTC (rev 94) @@ -0,0 +1,2467 @@ + + + + + + +Network Working Group N. Freed +Request for Comments: 2046 Innosoft +Obsoletes: 1521, 1522, 1590 N. Borenstein +Category: Standards Track First Virtual + November 1996 + + + Multipurpose Internet Mail Extensions + (MIME) Part Two: + Media Types + +Status of this Memo + + This document specifies an Internet standards track protocol for the + Internet community, and requests discussion and suggestions for + improvements. Please refer to the current edition of the "Internet + Official Protocol Standards" (STD 1) for the standardization state + and status of this protocol. Distribution of this memo is unlimited. + +Abstract + + STD 11, RFC 822 defines a message representation protocol specifying + considerable detail about US-ASCII message headers, but which leaves + the message content, or message body, as flat US-ASCII text. This + set of documents, collectively called the Multipurpose Internet Mail + Extensions, or MIME, redefines the format of messages to allow for + + (1) textual message bodies in character sets other than + US-ASCII, + + (2) an extensible set of different formats for non-textual + message bodies, + + (3) multi-part message bodies, and + + (4) textual header information in character sets other than + US-ASCII. + + These documents are based on earlier work documented in RFC 934, STD + 11, and RFC 1049, but extends and revises them. Because RFC 822 said + so little about message bodies, these documents are largely + orthogonal to (rather than a revision of) RFC 822. + + The initial document in this set, RFC 2045, specifies the various + headers used to describe the structure of MIME messages. This second + document defines the general structure of the MIME media typing + system and defines an initial set of media types. The third document, + RFC 2047, describes extensions to RFC 822 to allow non-US-ASCII text + + + +Freed & Borenstein Standards Track [Page 1] + +RFC 2046 Media Types November 1996 + + + data in Internet mail header fields. The fourth document, RFC 2048, + specifies various IANA registration procedures for MIME-related + facilities. The fifth and final document, RFC 2049, describes MIME + conformance criteria as well as providing some illustrative examples + of MIME message formats, acknowledgements, and the bibliography. + + These documents are revisions of RFCs 1521 and 1522, which themselves + were revisions of RFCs 1341 and 1342. An appendix in RFC 2049 + describes differences and changes from previous versions. + +Table of Contents + + 1. Introduction ......................................... 3 + 2. Definition of a Top-Level Media Type ................. 4 + 3. Overview Of The Initial Top-Level Media Types ........ 4 + 4. Discrete Media Type Values ........................... 6 + 4.1 Text Media Type ..................................... 6 + 4.1.1 Representation of Line Breaks ..................... 7 + 4.1.2 Charset Parameter ................................. 7 + 4.1.3 Plain Subtype ..................................... 11 + 4.1.4 Unrecognized Subtypes ............................. 11 + 4.2 Image Media Type .................................... 11 + 4.3 Audio Media Type .................................... 11 + 4.4 Video Media Type .................................... 12 + 4.5 Application Media Type .............................. 12 + 4.5.1 Octet-Stream Subtype .............................. 13 + 4.5.2 PostScript Subtype ................................ 14 + 4.5.3 Other Application Subtypes ........................ 17 + 5. Composite Media Type Values .......................... 17 + 5.1 Multipart Media Type ................................ 17 + 5.1.1 Common Syntax ..................................... 19 + 5.1.2 Handling Nested Messages and Multiparts ........... 24 + 5.1.3 Mixed Subtype ..................................... 24 + 5.1.4 Alternative Subtype ............................... 24 + 5.1.5 Digest Subtype .................................... 26 + 5.1.6 Parallel Subtype .................................. 27 + 5.1.7 Other Multipart Subtypes .......................... 28 + 5.2 Message Media Type .................................. 28 + 5.2.1 RFC822 Subtype .................................... 28 + 5.2.2 Partial Subtype ................................... 29 + 5.2.2.1 Message Fragmentation and Reassembly ............ 30 + 5.2.2.2 Fragmentation and Reassembly Example ............ 31 + 5.2.3 External-Body Subtype ............................. 33 + 5.2.4 Other Message Subtypes ............................ 40 + 6. Experimental Media Type Values ....................... 40 + 7. Summary .............................................. 41 + 8. Security Considerations .............................. 41 + 9. Authors' Addresses ................................... 42 + + + +Freed & Borenstein Standards Track [Page 2] + +RFC 2046 Media Types November 1996 + + + A. Collected Grammar .................................... 43 + +1. Introduction + + The first document in this set, RFC 2045, defines a number of header + fields, including Content-Type. The Content-Type field is used to + specify the nature of the data in the body of a MIME entity, by + giving media type and subtype identifiers, and by providing auxiliary + information that may be required for certain media types. After the + type and subtype names, the remainder of the header field is simply a + set of parameters, specified in an attribute/value notation. The + ordering of parameters is not significant. + + In general, the top-level media type is used to declare the general + type of data, while the subtype specifies a specific format for that + type of data. Thus, a media type of "image/xyz" is enough to tell a + user agent that the data is an image, even if the user agent has no + knowledge of the specific image format "xyz". Such information can + be used, for example, to decide whether or not to show a user the raw + data from an unrecognized subtype -- such an action might be + reasonable for unrecognized subtypes of "text", but not for + unrecognized subtypes of "image" or "audio". For this reason, + registered subtypes of "text", "image", "audio", and "video" should + not contain embedded information that is really of a different type. + Such compound formats should be represented using the "multipart" or + "application" types. + + Parameters are modifiers of the media subtype, and as such do not + fundamentally affect the nature of the content. The set of + meaningful parameters depends on the media type and subtype. Most + parameters are associated with a single specific subtype. However, a + given top-level media type may define parameters which are applicable + to any subtype of that type. Parameters may be required by their + defining media type or subtype or they may be optional. MIME + implementations must also ignore any parameters whose names they do + not recognize. + + MIME's Content-Type header field and media type mechanism has been + carefully designed to be extensible, and it is expected that the set + of media type/subtype pairs and their associated parameters will grow + significantly over time. Several other MIME facilities, such as + transfer encodings and "message/external-body" access types, are + likely to have new values defined over time. In order to ensure that + the set of such values is developed in an orderly, well-specified, + and public manner, MIME sets up a registration process which uses the + Internet Assigned Numbers Authority (IANA) as a central registry for + MIME's various areas of extensibility. The registration process for + these areas is described in a companion document, RFC 2048. + + + +Freed & Borenstein Standards Track [Page 3] + +RFC 2046 Media Types November 1996 + + + The initial seven standard top-level media type are defined and + described in the remainder of this document. + +2. Definition of a Top-Level Media Type + + The definition of a top-level media type consists of: + + (1) a name and a description of the type, including + criteria for whether a particular type would qualify + under that type, + + (2) the names and definitions of parameters, if any, which + are defined for all subtypes of that type (including + whether such parameters are required or optional), + + (3) how a user agent and/or gateway should handle unknown + subtypes of this type, + + (4) general considerations on gatewaying entities of this + top-level type, if any, and + + (5) any restrictions on content-transfer-encodings for + entities of this top-level type. + +3. Overview Of The Initial Top-Level Media Types + + The five discrete top-level media types are: + + (1) text -- textual information. The subtype "plain" in + particular indicates plain text containing no + formatting commands or directives of any sort. Plain + text is intended to be displayed "as-is". No special + software is required to get the full meaning of the + text, aside from support for the indicated character + set. Other subtypes are to be used for enriched text in + forms where application software may enhance the + appearance of the text, but such software must not be + required in order to get the general idea of the + content. Possible subtypes of "text" thus include any + word processor format that can be read without + resorting to software that understands the format. In + particular, formats that employ embeddded binary + formatting information are not considered directly + readable. A very simple and portable subtype, + "richtext", was defined in RFC 1341, with a further + revision in RFC 1896 under the name "enriched". + + + + + +Freed & Borenstein Standards Track [Page 4] + +RFC 2046 Media Types November 1996 + + + (2) image -- image data. "Image" requires a display device + (such as a graphical display, a graphics printer, or a + FAX machine) to view the information. An initial + subtype is defined for the widely-used image format + JPEG. . subtypes are defined for two widely-used image + formats, jpeg and gif. + + (3) audio -- audio data. "Audio" requires an audio output + device (such as a speaker or a telephone) to "display" + the contents. An initial subtype "basic" is defined in + this document. + + (4) video -- video data. "Video" requires the capability + to display moving images, typically including + specialized hardware and software. An initial subtype + "mpeg" is defined in this document. + + (5) application -- some other kind of data, typically + either uninterpreted binary data or information to be + processed by an application. The subtype "octet- + stream" is to be used in the case of uninterpreted + binary data, in which case the simplest recommended + action is to offer to write the information into a file + for the user. The "PostScript" subtype is also defined + for the transport of PostScript material. Other + expected uses for "application" include spreadsheets, + data for mail-based scheduling systems, and languages + for "active" (computational) messaging, and word + processing formats that are not directly readable. + Note that security considerations may exist for some + types of application data, most notably + "application/PostScript" and any form of active + messaging. These issues are discussed later in this + document. + + The two composite top-level media types are: + + (1) multipart -- data consisting of multiple entities of + independent data types. Four subtypes are initially + defined, including the basic "mixed" subtype specifying + a generic mixed set of parts, "alternative" for + representing the same data in multiple formats, + "parallel" for parts intended to be viewed + simultaneously, and "digest" for multipart entities in + which each part has a default type of "message/rfc822". + + + + + + +Freed & Borenstein Standards Track [Page 5] + +RFC 2046 Media Types November 1996 + + + (2) message -- an encapsulated message. A body of media + type "message" is itself all or a portion of some kind + of message object. Such objects may or may not in turn + contain other entities. The "rfc822" subtype is used + when the encapsulated content is itself an RFC 822 + message. The "partial" subtype is defined for partial + RFC 822 messages, to permit the fragmented transmission + of bodies that are thought to be too large to be passed + through transport facilities in one piece. Another + subtype, "external-body", is defined for specifying + large bodies by reference to an external data source. + + It should be noted that the list of media type values given here may + be augmented in time, via the mechanisms described above, and that + the set of subtypes is expected to grow substantially. + +4. Discrete Media Type Values + + Five of the seven initial media type values refer to discrete bodies. + The content of these types must be handled by non-MIME mechanisms; + they are opaque to MIME processors. + +4.1. Text Media Type + + The "text" media type is intended for sending material which is + principally textual in form. A "charset" parameter may be used to + indicate the character set of the body text for "text" subtypes, + notably including the subtype "text/plain", which is a generic + subtype for plain text. Plain text does not provide for or allow + formatting commands, font attribute specifications, processing + instructions, interpretation directives, or content markup. Plain + text is seen simply as a linear sequence of characters, possibly + interrupted by line breaks or page breaks. Plain text may allow the + stacking of several characters in the same position in the text. + Plain text in scripts like Arabic and Hebrew may also include + facilitites that allow the arbitrary mixing of text segments with + opposite writing directions. + + Beyond plain text, there are many formats for representing what might + be known as "rich text". An interesting characteristic of many such + representations is that they are to some extent readable even without + the software that interprets them. It is useful, then, to + distinguish them, at the highest level, from such unreadable data as + images, audio, or text represented in an unreadable form. In the + absence of appropriate interpretation software, it is reasonable to + show subtypes of "text" to the user, while it is not reasonable to do + so with most nontextual data. Such formatted textual data should be + represented using subtypes of "text". + + + +Freed & Borenstein Standards Track [Page 6] + +RFC 2046 Media Types November 1996 + + +4.1.1. Representation of Line Breaks + + The canonical form of any MIME "text" subtype MUST always represent a + line break as a CRLF sequence. Similarly, any occurrence of CRLF in + MIME "text" MUST represent a line break. Use of CR and LF outside of + line break sequences is also forbidden. + + This rule applies regardless of format or character set or sets + involved. + + NOTE: The proper interpretation of line breaks when a body is + displayed depends on the media type. In particular, while it is + appropriate to treat a line break as a transition to a new line when + displaying a "text/plain" body, this treatment is actually incorrect + for other subtypes of "text" like "text/enriched" [RFC-1896]. + Similarly, whether or not line breaks should be added during display + operations is also a function of the media type. It should not be + necessary to add any line breaks to display "text/plain" correctly, + whereas proper display of "text/enriched" requires the appropriate + addition of line breaks. + + NOTE: Some protocols defines a maximum line length. E.g. SMTP [RFC- + 821] allows a maximum of 998 octets before the next CRLF sequence. + To be transported by such protocols, data which includes too long + segments without CRLF sequences must be encoded with a suitable + content-transfer-encoding. + +4.1.2. Charset Parameter + + A critical parameter that may be specified in the Content-Type field + for "text/plain" data is the character set. This is specified with a + "charset" parameter, as in: + + Content-type: text/plain; charset=iso-8859-1 + + Unlike some other parameter values, the values of the charset + parameter are NOT case sensitive. The default character set, which + must be assumed in the absence of a charset parameter, is US-ASCII. + + The specification for any future subtypes of "text" must specify + whether or not they will also utilize a "charset" parameter, and may + possibly restrict its values as well. For other subtypes of "text" + than "text/plain", the semantics of the "charset" parameter should be + defined to be identical to those specified here for "text/plain", + i.e., the body consists entirely of characters in the given charset. + In particular, definers of future "text" subtypes should pay close + attention to the implications of multioctet character sets for th... [truncated message content] |
From: <tmy...@us...> - 2006-12-12 12:07:01
|
Revision: 97 http://svn.sourceforge.net/nmailserver/?rev=97&view=rev Author: tmyroadctfig Date: 2006-12-12 04:06:59 -0800 (Tue, 12 Dec 2006) Log Message: ----------- Added some directories. Added Paths: ----------- NMail/trunk/NMail/DataTypes/Authentication/ NMail/trunk/NMail.RemoteAccessService/ NMail/trunk/NMail.RemoteAccessServiceSerializers/ NMail/trunk/NMail.WebAccess/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tmy...@us...> - 2007-02-01 10:33:04
|
Revision: 125 http://svn.sourceforge.net/nmailserver/?rev=125&view=rev Author: tmyroadctfig Date: 2007-02-01 02:33:00 -0800 (Thu, 01 Feb 2007) Log Message: ----------- Further work on WebAccess. Modified Paths: -------------- NMail/trunk/NMail.LocalStoreData.MySql/MySqlLocalStoreData.cs NMail/trunk/NMail.RemoteAccessService/App_Code/RemoteAccessService.cs NMail/trunk/NMail.RemoteAccessService/App_Code/ServiceState.cs NMail/trunk/NMail.WebAccess/App_Code/Helper.cs NMail/trunk/NMail.WebAccess/App_Code/MailListDataSource.cs NMail/trunk/NMail.WebAccess/App_Code/SubscribedFolderDataSource.cs NMail/trunk/NMail.WebAccess/App_Themes/Default/Default.css 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.cs NMail/trunk/NMail.WebAccess/Login.aspx NMail/trunk/NMail.WebAccess/Mail.aspx NMail/trunk/NMail.WebAccess/Mail.aspx.cs NMail/trunk/NMail.WebAccess/Web.config Modified: NMail/trunk/NMail.LocalStoreData.MySql/MySqlLocalStoreData.cs =================================================================== --- NMail/trunk/NMail.LocalStoreData.MySql/MySqlLocalStoreData.cs 2007-01-26 12:46:37 UTC (rev 124) +++ NMail/trunk/NMail.LocalStoreData.MySql/MySqlLocalStoreData.cs 2007-02-01 10:33:00 UTC (rev 125) @@ -780,8 +780,9 @@ MySqlCommand cmd = cnn.CreateCommand(); cmd.Transaction = transaction; - cmd.CommandText = "SELECT FolderMessageId FROM Message WHERE FolderId = ?FolderId AND DeletedFlag = true"; + cmd.CommandText = "SELECT FolderMessageId FROM Message WHERE FolderId = ?FolderId AND MessageFlags = ?DeletedFlag"; cmd.Parameters.Add("?FolderId", folder.FolderId); + cmd.Parameters.Add("?DeletedFlag", (int) StoreMessageFlags.Deleted); // Get a list of deleted messages MySqlDataReader reader = cmd.ExecuteReader(); Modified: NMail/trunk/NMail.RemoteAccessService/App_Code/RemoteAccessService.cs =================================================================== --- NMail/trunk/NMail.RemoteAccessService/App_Code/RemoteAccessService.cs 2007-01-26 12:46:37 UTC (rev 124) +++ NMail/trunk/NMail.RemoteAccessService/App_Code/RemoteAccessService.cs 2007-02-01 10:33:00 UTC (rev 125) @@ -34,7 +34,7 @@ { // TODO: ensure connection is secure - IAuthenticationToken token = ServiceState.remoteAdmin.NMailServer.AuthenticationProvider.Authenticate(user, password); + IAuthenticationToken token = ServiceState.RemoteAdmin.NMailServer.AuthenticationProvider.Authenticate(user, password); if (token != null) { @@ -65,7 +65,7 @@ IAuthenticationToken token = ValidateAuthenticationToken(authToken); if (token != null) { - StoreFolder storeFolder = ServiceState.remoteAdmin.NMailServer.LocalStore.GetNominalStoreFolder(token); + StoreFolder storeFolder = ServiceState.RemoteAdmin.NMailServer.LocalStore.GetNominalStoreFolder(token); return new StoreFolderSerializer(storeFolder); } @@ -86,7 +86,7 @@ IAuthenticationToken token = ValidateAuthenticationToken(authToken); if (token != null) { - StoreFolder storeFolder = ServiceState.remoteAdmin.NMailServer.LocalStore.GetStoreFolder(token, folderId); + StoreFolder storeFolder = ServiceState.RemoteAdmin.NMailServer.LocalStore.GetStoreFolder(token, folderId); return new StoreFolderSerializer(storeFolder); } @@ -105,7 +105,7 @@ IAuthenticationToken token = ValidateAuthenticationToken(authToken); if (token != null) { - StoreFolder storeFolder = ServiceState.remoteAdmin.NMailServer.LocalStore.GetStoreFolder(token, folderName); + StoreFolder storeFolder = ServiceState.RemoteAdmin.NMailServer.LocalStore.GetStoreFolder(token, folderName); return new StoreFolderSerializer(storeFolder); } @@ -125,7 +125,7 @@ IAuthenticationToken token = ValidateAuthenticationToken(authToken); if (token != null) { - List<StoreFolder> subscribed = new List<StoreFolder>(ServiceState.remoteAdmin.NMailServer.LocalStore.GetSubscribed(token, "*")); + List<StoreFolder> subscribed = new List<StoreFolder>(ServiceState.RemoteAdmin.NMailServer.LocalStore.GetSubscribed(token, "*")); List<StoreFolderSerializer> result = new List<StoreFolderSerializer>(); foreach (StoreFolder folder in subscribed) @@ -164,40 +164,40 @@ List<int> currentList = new List<int>(); result.Add(currentList); - StoreFolder storeFolder = ServiceState.remoteAdmin.NMailServer.LocalStore.GetStoreFolder(token, folderId); + StoreFolder storeFolder = ServiceState.RemoteAdmin.NMailServer.LocalStore.GetStoreFolder(token, folderId); if (storeFolder != null) { - addMessageCount(currentList, ServiceState.remoteAdmin.NMailServer.LocalStore.GetMessageCount(token, storeFolder)); + addMessageCount(currentList, ServiceState.RemoteAdmin.NMailServer.LocalStore.GetMessageCount(token, storeFolder)); if ((messageFlags & StoreMessageFlags.Answered) != 0) { - addMessageCount(currentList, ServiceState.remoteAdmin.NMailServer.LocalStore.GetMessageCountWithFlags(token, storeFolder, StoreMessageFlags.Answered)); + addMessageCount(currentList, ServiceState.RemoteAdmin.NMailServer.LocalStore.GetMessageCountWithFlags(token, storeFolder, StoreMessageFlags.Answered)); } if ((messageFlags & StoreMessageFlags.Deleted) != 0) { - addMessageCount(currentList, ServiceState.remoteAdmin.NMailServer.LocalStore.GetMessageCountWithFlags(token, storeFolder, StoreMessageFlags.Deleted)); + addMessageCount(currentList, ServiceState.RemoteAdmin.NMailServer.LocalStore.GetMessageCountWithFlags(token, storeFolder, StoreMessageFlags.Deleted)); } if ((messageFlags & StoreMessageFlags.Draft) != 0) { - addMessageCount(currentList, ServiceState.remoteAdmin.NMailServer.LocalStore.GetMessageCountWithFlags(token, storeFolder, StoreMessageFlags.Draft)); + addMessageCount(currentList, ServiceState.RemoteAdmin.NMailServer.LocalStore.GetMessageCountWithFlags(token, storeFolder, StoreMessageFlags.Draft)); } if ((messageFlags & StoreMessageFlags.Flagged) != 0) { - addMessageCount(currentList, ServiceState.remoteAdmin.NMailServer.LocalStore.GetMessageCountWithFlags(token, storeFolder, StoreMessageFlags.Flagged)); + addMessageCount(currentList, ServiceState.RemoteAdmin.NMailServer.LocalStore.GetMessageCountWithFlags(token, storeFolder, StoreMessageFlags.Flagged)); } if ((messageFlags & StoreMessageFlags.Recent) != 0) { - addMessageCount(currentList, ServiceState.remoteAdmin.NMailServer.LocalStore.GetMessageCountWithFlags(token, storeFolder, StoreMessageFlags.Recent)); + addMessageCount(currentList, ServiceState.RemoteAdmin.NMailServer.LocalStore.GetMessageCountWithFlags(token, storeFolder, StoreMessageFlags.Recent)); } if ((messageFlags & StoreMessageFlags.Seen) != 0) { - addMessageCount(currentList, ServiceState.remoteAdmin.NMailServer.LocalStore.GetMessageCountWithFlags(token, storeFolder, StoreMessageFlags.Seen)); + addMessageCount(currentList, ServiceState.RemoteAdmin.NMailServer.LocalStore.GetMessageCountWithFlags(token, storeFolder, StoreMessageFlags.Seen)); } } else @@ -232,11 +232,11 @@ if (token != null) { List<KeyValuePair<int, EnvelopeSerializer>> result = new List<KeyValuePair<int, EnvelopeSerializer>>(); - List<int> messageIds = ServiceState.remoteAdmin.NMailServer.LocalStore.GetMessageIds(token, folderId); + List<int> messageIds = ServiceState.RemoteAdmin.NMailServer.LocalStore.GetMessageIds(token, folderId); foreach (int messageId in messageIds) { - MessageHeaders headers = ServiceState.remoteAdmin.NMailServer.LocalStore.GetMessageHeaders(token, messageId, folderId); + MessageHeaders headers = ServiceState.RemoteAdmin.NMailServer.LocalStore.GetMessageHeaders(token, messageId, folderId); Envelope e = new Envelope(headers); result.Add(new KeyValuePair<int, EnvelopeSerializer>(messageId, new EnvelopeSerializer(e))); @@ -263,7 +263,7 @@ IAuthenticationToken token = ValidateAuthenticationToken(authToken); if (token != null) { - MessageHeaders headers = ServiceState.remoteAdmin.NMailServer.LocalStore.GetMessageHeaders(token, messageId, folderId); + MessageHeaders headers = ServiceState.RemoteAdmin.NMailServer.LocalStore.GetMessageHeaders(token, messageId, folderId); Envelope e = new Envelope(headers); return new EnvelopeSerializer(e); } @@ -286,7 +286,7 @@ IAuthenticationToken token = ValidateAuthenticationToken(authToken); if (token != null) { - BodyStructure bodyStructure = ServiceState.remoteAdmin.NMailServer.LocalStore.GetBodyStructure(token, messageId, folderId); + BodyStructure bodyStructure = ServiceState.RemoteAdmin.NMailServer.LocalStore.GetBodyStructure(token, messageId, folderId); return new BodyStructureSerializer(bodyStructure); } @@ -309,7 +309,7 @@ IAuthenticationToken token = ValidateAuthenticationToken(authToken); if (token != null) { - IMessageBodyPart part = ServiceState.remoteAdmin.NMailServer.LocalStore.GetMessageMimePart(token, messageId, folderId, mimePart); + IMessageBodyPart part = ServiceState.RemoteAdmin.NMailServer.LocalStore.GetMessageMimePart(token, messageId, folderId, mimePart); return Convert.ToBase64String(part.BodyData.Bytes); } Modified: NMail/trunk/NMail.RemoteAccessService/App_Code/ServiceState.cs =================================================================== --- NMail/trunk/NMail.RemoteAccessService/App_Code/ServiceState.cs 2007-01-26 12:46:37 UTC (rev 124) +++ NMail/trunk/NMail.RemoteAccessService/App_Code/ServiceState.cs 2007-02-01 10:33:00 UTC (rev 125) @@ -20,12 +20,20 @@ { public static Dictionary<Guid, IAuthenticationToken> authTokens = new Dictionary<Guid, IAuthenticationToken>(); - public static RemoteAdministration remoteAdmin; + private static RemoteAdministration remoteAdmin; - static ServiceState() + public static RemoteAdministration RemoteAdmin { - remoteAdmin = (RemoteAdministration)Activator.GetObject(typeof(RemoteAdministration), "tcp://localhost:7877/RemoteAdministration.rem"); - SetupSponsorship(remoteAdmin, TimeSpan.MaxValue); + get + { + if (remoteAdmin == null) + { + remoteAdmin = (RemoteAdministration)Activator.GetObject(typeof(RemoteAdministration), "tcp://localhost:7877/RemoteAdministration.rem"); + SetupSponsorship(remoteAdmin, TimeSpan.MaxValue); + } + + return remoteAdmin; + } } static void SetupSponsorship(MarshalByRefObject o, TimeSpan timout) Modified: NMail/trunk/NMail.WebAccess/App_Code/Helper.cs =================================================================== --- NMail/trunk/NMail.WebAccess/App_Code/Helper.cs 2007-01-26 12:46:37 UTC (rev 124) +++ NMail/trunk/NMail.WebAccess/App_Code/Helper.cs 2007-02-01 10:33:00 UTC (rev 125) @@ -44,5 +44,18 @@ return result; } + + public static string GetDate(string s) { + DateTime dateTime; + + if (DateTime.TryParse(s, out dateTime)) + { + return dateTime.ToString("g"); + } + else + { + return s; + } + } } } Modified: NMail/trunk/NMail.WebAccess/App_Code/MailListDataSource.cs =================================================================== --- NMail/trunk/NMail.WebAccess/App_Code/MailListDataSource.cs 2007-01-26 12:46:37 UTC (rev 124) +++ NMail/trunk/NMail.WebAccess/App_Code/MailListDataSource.cs 2007-02-01 10:33:00 UTC (rev 125) @@ -11,7 +11,7 @@ using RemoteAccessService; -namespace NMail.WebAcess +namespace NMail.WebAccess { public static class MailListDataSource { Modified: NMail/trunk/NMail.WebAccess/App_Code/SubscribedFolderDataSource.cs =================================================================== --- NMail/trunk/NMail.WebAccess/App_Code/SubscribedFolderDataSource.cs 2007-01-26 12:46:37 UTC (rev 124) +++ NMail/trunk/NMail.WebAccess/App_Code/SubscribedFolderDataSource.cs 2007-02-01 10:33:00 UTC (rev 125) @@ -59,6 +59,14 @@ string authToken = (string)session["AuthToken"]; RemoteAccessService.RemoteAccessService ras = (RemoteAccessService.RemoteAccessService)session["RAS"]; + if (ras == null || authToken == null) + { + session.Abandon(); + FormsAuthentication.SignOut(); + FormsAuthentication.RedirectToLoginPage(); + return null; + } + return GetStoreFolder(ras.GetStoreFolderByFolderId(authToken, folderId)); } Modified: NMail/trunk/NMail.WebAccess/App_Themes/Default/Default.css =================================================================== --- NMail/trunk/NMail.WebAccess/App_Themes/Default/Default.css 2007-01-26 12:46:37 UTC (rev 124) +++ NMail/trunk/NMail.WebAccess/App_Themes/Default/Default.css 2007-02-01 10:33:00 UTC (rev 125) @@ -1,9 +1,21 @@ -body +body { font-family: Sans-Serif; - + background-color: White; + color: #1e2e21; } +a +{ + color: #1e2e21; +} + +.LoginBody +{ + font-family: Sans-Serif; + background-color: White; +} + .LoginBox { margin-top: 5em; @@ -22,11 +34,12 @@ .ViewButton { text-align: center; - background-color: lightblue; + background-color: #B8DECF; height: 30px; vertical-align: middle; padding-left: 0.5em; padding-right: 0.5em; + margin: 2px 2px 2px 2px; } .SubscribedFolderList @@ -51,7 +64,7 @@ .MailListSelectedItem { - background-color: lightblue; + background-color: #B8DECF; } .MailListRow {} @@ -61,3 +74,23 @@ { background-color: buttonface; } + +.EmptyZone +{ + background-image: url('../../Images/Skins/Default/EmptyZone.png'); + background-repeat: no-repeat; + background-position: center center; + padding: 0.5em; +} + +.WebPartTitle +{ + background-color: #C6EFDF; + font-size: large; +} + +.WebPart +{ + background-color: White; + padding: 0px 0px 0px 0px; +} \ No newline at end of file Modified: NMail/trunk/NMail.WebAccess/Controls/Mail/MailList.ascx =================================================================== --- NMail/trunk/NMail.WebAccess/Controls/Mail/MailList.ascx 2007-01-26 12:46:37 UTC (rev 124) +++ NMail/trunk/NMail.WebAccess/Controls/Mail/MailList.ascx 2007-02-01 10:33:00 UTC (rev 125) @@ -13,7 +13,7 @@ CssClass="MailList" Width="100%" OnSelectedIndexChanged="MailList_OnSelectedIndexChanged" - DataSourceID="MailListDataSource" DataKeyNames="Key"> + DataKeyNames="Key"> <Columns> <asp:TemplateField HeaderText="From"> @@ -28,7 +28,7 @@ </asp:TemplateField> <asp:TemplateField HeaderText="Date"> <ItemTemplate> -<%# NMail.WebAccess.HtmlEscaper.EscapeAll(Eval("Value.Date")) %> +<%# NMail.WebAccess.Helper.GetDate((string) Eval("Value.Date")) %> </ItemTemplate> </asp:TemplateField> </Columns> @@ -41,10 +41,3 @@ <HeaderStyle CssClass="MailListHeader" /> <AlternatingRowStyle CssClass="MailListAlternatingRow" /> </nmwa:RowClickableGridView> - -<asp:ObjectDataSource ID="MailListDataSource" runat="server" SelectMethod="GetMessageEnvelopes" TypeName="NMail.WebAcess.MailListDataSource" > - <SelectParameters> - <asp:SessionParameter DefaultValue="0" Name="folderId" SessionField="SelectedFolderId" - Type="Int32" /> - </SelectParameters> -</asp:ObjectDataSource> Modified: NMail/trunk/NMail.WebAccess/Controls/Mail/MailList.ascx.cs =================================================================== --- NMail/trunk/NMail.WebAccess/Controls/Mail/MailList.ascx.cs 2007-01-26 12:46:37 UTC (rev 124) +++ NMail/trunk/NMail.WebAccess/Controls/Mail/MailList.ascx.cs 2007-02-01 10:33:00 UTC (rev 125) @@ -9,20 +9,81 @@ using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; +using NMail.WebAccess; + public partial class Controls_Mail_MailList : System.Web.UI.UserControl, IWebPart { - protected void Page_Load(object sender, EventArgs e) {} + protected void Page_Init(object sender, EventArgs e) + { + Page.RegisterRequiresControlState(this); + } + protected void Page_PreRender(object sender, EventArgs e) + { + ObjectDataSource mailListDataSource = new ObjectDataSource("NMail.WebAccess.MailListDataSource", "GetMessageEnvelopes"); + mailListDataSource.SelectParameters.Add("FolderId", TypeCode.Int32, this.selectedFolderId.ToString()); + + this.MailListGridView.DataSource = mailListDataSource; + this.MailListGridView.DataBind(); + } + + protected override object SaveControlState() + { + Hashtable result = new Hashtable(); + result.Add("SelectedFolderId", this.selectedFolderId); + return result; + } + + protected override void LoadControlState(object savedState) + { + this.selectedFolderId = (int)((Hashtable)savedState)["SelectedFolderId"]; + } + + private int selectedFolderId; + + /// <summary> + /// The Id of the currently selected folder. + /// </summary> + public int SelectedFolderId + { + get { return selectedFolderId; } + set { selectedFolderId = value; } + } + + /// <summary> + /// The Id of the currently selected message. + /// </summary> + public int SelectedMessageId + { + get + { + return (int) this.MailListGridView.SelectedValue; + } + } + protected void MailList_OnSelectedIndexChanged(object sender, EventArgs args) { - if (this.MailListGridView.SelectedIndex == -1) + if (this.selectedMessageChanged != null) { - Session.Remove("SelectedMessageId"); + this.selectedMessageChanged(this, new EventArgs()); } - else + } + + private event EventHandler selectedMessageChanged; + + /// <summary> + /// The event triggered when the selected message Id changes. + /// </summary> + public event EventHandler SelectedMessageChanged + { + add { - Session["SelectedMessageId"] = this.MailListGridView.SelectedValue; + this.selectedMessageChanged += value; } + remove + { + this.selectedMessageChanged -= value; + } } #region IWebPart Members @@ -64,7 +125,8 @@ { get { - return Session["SelectedFolderName"] as string; + string folderName = Session["SelectedFolderName"] as string; + return (folderName == null) ? " " : folderName; } set { Modified: NMail/trunk/NMail.WebAccess/Controls/Mail/MessageBody.aspx =================================================================== --- NMail/trunk/NMail.WebAccess/Controls/Mail/MessageBody.aspx 2007-01-26 12:46:37 UTC (rev 124) +++ NMail/trunk/NMail.WebAccess/Controls/Mail/MessageBody.aspx 2007-02-01 10:33:00 UTC (rev 125) @@ -10,6 +10,14 @@ <form id="form1" runat="server"> <div class="MessageBody"> <asp:Literal ID="MessageBody" runat="server" /> + <br /> + <asp:Repeater ID="AttachmentsRepeater" runat="server"> + <ItemTemplate> + <!-- Name --> + <!-- Size --> + <!-- Type --> + </ItemTemplate> + </asp:Repeater> </div> </form> </body> Modified: NMail/trunk/NMail.WebAccess/Controls/Mail/MessageBody.aspx.cs =================================================================== --- NMail/trunk/NMail.WebAccess/Controls/Mail/MessageBody.aspx.cs 2007-01-26 12:46:37 UTC (rev 124) +++ NMail/trunk/NMail.WebAccess/Controls/Mail/MessageBody.aspx.cs 2007-02-01 10:33:00 UTC (rev 125) @@ -2,6 +2,7 @@ using System.Data; using System.Configuration; using System.Collections; +using System.Collections.Specialized; using System.Text; using System.Web; using System.Web.Security; @@ -17,29 +18,58 @@ public partial class Controls_Mail_MessageBody : System.Web.UI.Page { + private int messageId; + + public int MessageId + { + get { return messageId; } + } + + private int folderId; + + public int FolderId + { + get { return folderId; } + } + + protected void ExtractQueryStringParams() + { + foreach (string key in Request.QueryString.AllKeys) + { + if (key.Trim().ToLower() == "messageid") + { + this.messageId = Int32.Parse(Request.QueryString[key]); + } + else if (key.Trim().ToLower() == "folderid") + { + this.folderId = Int32.Parse(Request.QueryString[key]); + } + } + } + protected void Page_Load(object sender, EventArgs e) { + ExtractQueryStringParams(); + // Ensure there is a valid folder Id - if (Session["SelectedFolderId"] == null) + if (this.folderId == -1) { this.MessageBody.Text = "No folder selected."; return; } // Ensure there is a valid message Id - if (Session["SelectedMessageId"] == null) + if (this.messageId == -1) { this.MessageBody.Text = "No message selected."; return; } // Get our session variables - int selectedFolderId = (int) Session["SelectedFolderId"]; - int messageId = (int) Session["SelectedMessageId"]; string authToken = (string) Session["AuthToken"]; RemoteAccessService.RemoteAccessService ras = (RemoteAccessService.RemoteAccessService) Session["RAS"]; - BodyStructureSerializer bs = ras.GetMessageStructure(authToken, messageId, selectedFolderId); + BodyStructureSerializer bs = ras.GetMessageStructure(authToken, messageId, folderId); BodyStructure bodyStructure = Helper.GetBodyStructure(bs); int bodyPartNumber = 1; @@ -73,7 +103,7 @@ } } - string base64Body = ras.GetMessageMimePart(authToken, bodyPartNumber, messageId, selectedFolderId); + string base64Body = ras.GetMessageMimePart(authToken, bodyPartNumber, messageId, folderId); ByteString bodyData = new ByteString(Convert.FromBase64String(base64Body), Encoding.UTF8); SimpleBodyPart body = MessageHelper.ParseMessage(bodyData); Modified: NMail/trunk/NMail.WebAccess/Controls/Mail/MessageViewer.ascx =================================================================== --- NMail/trunk/NMail.WebAccess/Controls/Mail/MessageViewer.ascx 2007-01-26 12:46:37 UTC (rev 124) +++ NMail/trunk/NMail.WebAccess/Controls/Mail/MessageViewer.ascx 2007-02-01 10:33:00 UTC (rev 125) @@ -1,9 +1,12 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeFile="MessageViewer.ascx.cs" Inherits="Controls_Mail_MessageViewer" %> <asp:Panel ID="EnvelopePanel" runat="server" Visible="false" Width="100%"> - <span class="MessageSubject"> - <asp:Literal ID="MessageSubject" runat="server" /> + <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> -<iframe src="Controls/Mail/MessageBody.aspx" Width="100%" /> \ No newline at end of file +<%-- A literal used to insert the iframe containing the message body --%> +<asp:Literal ID="IFrameLiteral" runat="server" /> \ No newline at end of file Modified: NMail/trunk/NMail.WebAccess/Controls/Mail/MessageViewer.ascx.cs =================================================================== --- NMail/trunk/NMail.WebAccess/Controls/Mail/MessageViewer.ascx.cs 2007-01-26 12:46:37 UTC (rev 124) +++ NMail/trunk/NMail.WebAccess/Controls/Mail/MessageViewer.ascx.cs 2007-02-01 10:33:00 UTC (rev 125) @@ -13,25 +13,155 @@ using NMail.WebAccess; using RemoteAccessService; -public partial class Controls_Mail_MessageViewer : System.Web.UI.UserControl +public partial class Controls_Mail_MessageViewer : System.Web.UI.UserControl, IWebPart { - protected void Page_Load(object sender, EventArgs e) - { - // Ensure there is a valid folder and message Ids - if (Session["SelectedFolderId"] != null && Session["SelectedMessageId"] != null) + protected void Page_Init(object sender, EventArgs e) + { + Page.RegisterRequiresControlState(this); + } + + protected override object SaveControlState() + { + Hashtable state = new Hashtable(); + state["FolderId"] = this.folderId; + state["MessageId"] = this.messageId; + return state; + } + + protected override void LoadControlState(object savedState) + { + Hashtable state = (Hashtable) savedState; + this.folderId = (int) state["FolderId"]; + this.messageId = (int) state["MessageId"]; + } + + private int messageId = -1; + + /// <summary> + /// The message Id for the message displayed in the viewer. + /// </summary> + public int MessageId + { + get { return messageId; } + set { messageId = value; } + } + + private int folderId = -1; + + /// <summary> + /// The folder Id for the folder the message is in. + /// </summary> + public int FolderId + { + get { return folderId; } + set { folderId = value; } + } + + protected void Page_PreRender(object sender, EventArgs e) + { + if (this.folderId != -1 && this.messageId != -1) { - // Get our session variables - int selectedFolderId = (int)Session["SelectedFolderId"]; - int messageId = (int)Session["SelectedMessageId"]; string authToken = (string)Session["AuthToken"]; RemoteAccessService.RemoteAccessService ras = (RemoteAccessService.RemoteAccessService)Session["RAS"]; - EnvelopeSerializer es = ras.GetMessageEnvelope(authToken, messageId, selectedFolderId); + // Populate the message envelope panel + EnvelopeSerializer es = ras.GetMessageEnvelope(authToken, this.messageId, this.folderId); Envelope envelope = Helper.GetEnvelope(es); - this.MessageSubject.Text = envelope.Subject; + this.title = envelope.Subject; + this.From.Text = envelope.From; + this.To.Text = envelope.To; + this.Date.Text = Helper.GetDate(envelope.Date); this.EnvelopePanel.Visible = true; + + // Insert the iframe + string url = "Controls/Mail/MessageBody.aspx?messageId={0}&folderId={1}"; + url = string.Format(url, this.messageId, this.folderId); + string iframe = string.Format("<iframe src='{0}' Width='100%' frameborder='no'/>", url); + this.IFrameLiteral.Text = iframe; } - } + else + { + this.EnvelopePanel.Visible = false; + } + } + + #region IWebPart Members + + private string catalogIconImageUrl; + + public string CatalogIconImageUrl + { + get + { + return this.catalogIconImageUrl; + } + set + { + this.catalogIconImageUrl = value; + } + } + + private string description = "Displays a message."; + + public string Description + { + get + { + return this.description; + } + set + { + this.description = value; + } + } + + public string Subtitle + { + get { return null; } + } + + private string title = " "; + + public string Title + { + get + { + return this.title; + } + set + { + this.title = value; + } + } + + 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/SubscribedFolderList.ascx.cs =================================================================== --- NMail/trunk/NMail.WebAccess/Controls/Mail/SubscribedFolderList.ascx.cs 2007-01-26 12:46:37 UTC (rev 124) +++ NMail/trunk/NMail.WebAccess/Controls/Mail/SubscribedFolderList.ascx.cs 2007-02-01 10:33:00 UTC (rev 125) @@ -14,11 +14,37 @@ public partial class Controls_Mail_SubscribedFolderList : System.Web.UI.UserControl { - protected void Page_Load(object sender, EventArgs e) - { + protected void Page_Init(object sender, EventArgs e) + { + Page.RegisterRequiresControlState(this); + } - } + private int selectedFolderId = -1; + /// <summary> + /// The Id of the selected folder or -1 if non is selected. + /// </summary> + public int SelectedFolderId + { + get { return this.selectedFolderId; } + set { this.selectedFolderId = value; } + } + + protected override object SaveControlState() + { + return this.selectedFolderId; + } + + protected override void LoadControlState(object savedState) + { + this.selectedFolderId = (int)savedState; + } + + /// <summary> + /// Gets the selected folder as a string to display in the folder list. + /// </summary> + /// <param name="o">The folder object.</param> + /// <returns>The string.</returns> protected string GetFolderString(object o) { StoreFolder f = (StoreFolder) o; StringBuilder result = new StringBuilder(); @@ -47,21 +73,30 @@ protected void FolderRepeater_OnItemCommand(object sender, CommandEventArgs args) { - int folderId = int.Parse(args.CommandArgument as string); - NMail.DataTypes.LocalStore.StoreFolder folder = NMail.WebAccess.SubscribedFolderDataSource.GetStoreFolder(folderId); + int folderId = -1; + int.TryParse(args.CommandArgument as string, out folderId); - if (Session["SelectedFolderId"] != null) + if (folderId != this.selectedFolderId && this.selectedFolderIdChanged != null) { - int currentFolderId = (int)Session["SelectedFolderId"]; - - // If the folder has changed remove the selected message Id - if (folderId != currentFolderId) - { - Session.Remove("SelectedMessageId"); - } + this.selectedFolderId = folderId; + this.selectedFolderIdChanged(this, new EventArgs()); } + } - Session["SelectedFolderId"] = folderId; - Session["SelectedFolderName"] = folder.FullFolderName; - } + private event EventHandler selectedFolderIdChanged; + + /// <summary> + /// The event triggered when the selected folder Id changes. + /// </summary> + public event EventHandler SelectedFolderIdChanged + { + add + { + this.selectedFolderIdChanged += value; + } + remove + { + this.selectedFolderIdChanged -= value; + } + } } \ No newline at end of file Modified: NMail/trunk/NMail.WebAccess/Login.aspx =================================================================== --- NMail/trunk/NMail.WebAccess/Login.aspx 2007-01-26 12:46:37 UTC (rev 124) +++ NMail/trunk/NMail.WebAccess/Login.aspx 2007-02-01 10:33:00 UTC (rev 125) @@ -6,7 +6,7 @@ <head runat="server"> <title>NMail Login</title> </head> -<body> +<body class="LoginBody"> <form id="form1" runat="server"> <div align="center" class="LoginBox"> Modified: NMail/trunk/NMail.WebAccess/Mail.aspx =================================================================== --- NMail/trunk/NMail.WebAccess/Mail.aspx 2007-01-26 12:46:37 UTC (rev 124) +++ NMail/trunk/NMail.WebAccess/Mail.aspx 2007-02-01 10:33:00 UTC (rev 125) @@ -1,4 +1,4 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Mail.aspx.cs" Inherits="Mail" %> +<%@ Page Language="C#" Trace="true" TraceMode="SortByTime" AutoEventWireup="true" CodeFile="Mail.aspx.cs" Inherits="Mail" %> <%@ Register Src="Controls/Mail/MessageViewer.ascx" TagName="MessageViewer" TagPrefix="uc4" %> @@ -20,45 +20,32 @@ <table width="100%" border="0"> <tr> - <td rowspan="3" valign="top"> - <asp:WebPartZone ID="LeftZone" runat="server" HeaderText=" " BorderColor="Transparent" BorderStyle="None"> + <td valign="top"> + <asp:WebPartZone ID="LeftZone" runat="server" HeaderText=" " LayoutOrientation="Vertical" BorderStyle="None" EmptyZoneText=" " PartStyle-CssClass="WebPart" PartTitleStyle-CssClass="WebPartTitle"> <CloseVerb Enabled="false" Visible="false" /> <ZoneTemplate> <uc2:SubscribedFolderList ID="SubscribedFolderList" runat="server" /> <uc1:LinkButtonList ID="ViewList" runat="server" /> </ZoneTemplate> + <EmptyZoneTextStyle CssClass="EmptyZone" /> </asp:WebPartZone> </td> <td valign="top"> - <asp:WebPartZone Width="100%" ID="TopZone" runat="server" LayoutOrientation="Vertical" HeaderText=" " BorderStyle="None"> - <CloseVerb Enabled="False" Visible="False" /> - </asp:WebPartZone> - </td> - <td rowspan="3" valign="top"> - <asp:WebPartZone ID="RightZone" runat="server" HeaderText=" " BorderColor="Transparent" BorderStyle="None"> - <CloseVerb Enabled="False" Visible="False" /> - <ZoneTemplate> - </ZoneTemplate> - </asp:WebPartZone> - </td> - </tr> - <tr> - <td valign="top"> - <asp:WebPartZone Width="100%" ID="CenterZone" runat="server" LayoutOrientation="Vertical" HeaderText=" " BorderColor="Transparent" BorderStyle="None"> + <asp:WebPartZone Width="100%" ID="CenterZone" runat="server" LayoutOrientation="Vertical" HeaderText=" " BorderStyle="None" EmptyZoneText=" " PartStyle-CssClass="WebPart" PartTitleStyle-CssClass="WebPartTitle"> <CloseVerb Enabled="false" Visible="false" /> <ZoneTemplate> - <uc3:MailList ID="MailList1" runat="server" /> + <uc3:MailList ID="MailList" runat="server" /> + <uc4:MessageViewer ID="MessageViewer" runat="server" /> </ZoneTemplate> + <EmptyZoneTextStyle CssClass="EmptyZone" /> </asp:WebPartZone> </td> - </tr> - <tr> - <td valign="top"> - <asp:WebPartZone ID="BottomZone" runat="server" LayoutOrientation="Vertical" HeaderText=" " BorderColor="Transparent" BorderStyle="None" Width="100%"> - <CloseVerb Enabled="false" Visible="false" /> + <td valign="top"> + <asp:WebPartZone ID="RightZone" runat="server" HeaderText=" " BorderColor="Transparent" BorderStyle="None" EmptyZoneText=" " PartStyle-CssClass="WebPart" PartTitleStyle-CssClass="WebPartTitle"> + <CloseVerb Enabled="False" Visible="False" /> <ZoneTemplate> - <uc4:MessageViewer ID="MessageViewer1" runat="server" /> </ZoneTemplate> + <EmptyZoneTextStyle CssClass="EmptyZone" /> </asp:WebPartZone> </td> </tr> Modified: NMail/trunk/NMail.WebAccess/Mail.aspx.cs =================================================================== --- NMail/trunk/NMail.WebAccess/Mail.aspx.cs 2007-01-26 12:46:37 UTC (rev 124) +++ NMail/trunk/NMail.WebAccess/Mail.aspx.cs 2007-02-01 10:33:00 UTC (rev 125) @@ -21,11 +21,46 @@ // Setup the view list List<LinkButtonListItem> viewItems = new List<LinkButtonListItem>(); viewItems.Add(new LinkButtonListItem("Calendar", "ViewButton", new EventHandler(ShowCalendarView_Clicked))); + viewItems.Add(new LinkButtonListItem("Logout", "ViewButton", new EventHandler(Logout_Clicked))); + this.ViewList.SetListItems(viewItems); - this.ViewList.SetListItems(viewItems); + this.SubscribedFolderList.SelectedFolderIdChanged += new EventHandler(SubscribedFolderList_SelectedFolderIdChanged); + this.MailList.SelectedMessageChanged += new EventHandler(MailList_SelectedMessageChanged); } + void SubscribedFolderList_SelectedFolderIdChanged(object sender, EventArgs args) + { + OnSelectedFolderIdChanged(this.SubscribedFolderList.SelectedFolderId); + } + + void MailList_SelectedMessageChanged(object sender, EventArgs e) + { + this.MessageViewer.MessageId = this.MailList.SelectedMessageId; + } + + protected void OnSelectedFolderIdChanged(int folderId) + { + string folderName = null; + + if (folderId != -1) + { + NMail.DataTypes.LocalStore.StoreFolder folder = NMail.WebAccess.SubscribedFolderDataSource.GetStoreFolder(folderId); + folderName = folder.FullFolderName; + } + + this.SubscribedFolderList.SelectedFolderId = folderId; + this.MailList.SelectedFolderId = folderId; + this.MessageViewer.FolderId = folderId; + } + protected void ShowCalendarView_Clicked(object sender, EventArgs ea) { - } + } + + protected void Logout_Clicked(object sender, EventArgs ea) + { + Session.Abandon(); + FormsAuthentication.SignOut(); + FormsAuthentication.RedirectToLoginPage(); + } } Modified: NMail/trunk/NMail.WebAccess/Web.config =================================================================== --- NMail/trunk/NMail.WebAccess/Web.config 2007-01-26 12:46:37 UTC (rev 124) +++ NMail/trunk/NMail.WebAccess/Web.config 2007-02-01 10:33:00 UTC (rev 125) @@ -24,7 +24,7 @@ <connectionStrings/> <system.web> - <pages theme="Default" enableEventValidation="false" viewStateEncryptionMode="Never"/> + <pages theme="Default" viewStateEncryptionMode="Never" enableEventValidation="false"/> <!-- Set compilation debug="true" to insert debugging This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tmy...@us...> - 2007-02-05 11:25:56
|
Revision: 134 http://svn.sourceforge.net/nmailserver/?rev=134&view=rev Author: tmyroadctfig Date: 2007-02-05 03:24:38 -0800 (Mon, 05 Feb 2007) Log Message: ----------- Added WebAccess and RemoteAccessService to the NAnt build. Modified Paths: -------------- NMail/trunk/Installer/NMail-Installer.wxs NMail/trunk/Installer/NMail-installer.build NMail/trunk/NMail/NMail.build NMail/trunk/NMail.SetupWizard/NMail.SetupWizard.build NMail/trunk/NMail.build Modified: NMail/trunk/Installer/NMail-Installer.wxs =================================================================== --- NMail/trunk/Installer/NMail-Installer.wxs 2007-02-05 11:21:48 UTC (rev 133) +++ NMail/trunk/Installer/NMail-Installer.wxs 2007-02-05 11:24:38 UTC (rev 134) @@ -82,7 +82,7 @@ <!-- == - == Webpage + == Administration Webpage == --> Modified: NMail/trunk/Installer/NMail-installer.build =================================================================== --- NMail/trunk/Installer/NMail-installer.build 2007-02-05 11:21:48 UTC (rev 133) +++ NMail/trunk/Installer/NMail-installer.build 2007-02-05 11:24:38 UTC (rev 134) @@ -66,6 +66,18 @@ <include name="NMail.Administration.Web.Compiled/**" /> </fileset> </copy> + <!-- Copy NMail remote access service website --> + <copy todir="${build.dir}"> + <fileset basedir="../"> + <include name="NMail.RemoteAccessService.Compiled/**" /> + </fileset> + </copy> + <!-- Copy NMail WebAccess website --> + <copy todir="${build.dir}"> + <fileset basedir="../"> + <include name="NMail.WebAccess.Compiled/**" /> + </fileset> + </copy> <!-- Make a date stamp to include in the filename --> <tstamp property="build.date" pattern="yyyy-MM-dd" verbose="true" /> Modified: NMail/trunk/NMail/NMail.build =================================================================== --- NMail/trunk/NMail/NMail.build 2007-02-05 11:21:48 UTC (rev 133) +++ NMail/trunk/NMail/NMail.build 2007-02-05 11:24:38 UTC (rev 134) @@ -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/trunk/NMail.SetupWizard/NMail.SetupWizard.build =================================================================== --- NMail/trunk/NMail.SetupWizard/NMail.SetupWizard.build 2007-02-05 11:21:48 UTC (rev 133) +++ NMail/trunk/NMail.SetupWizard/NMail.SetupWizard.build 2007-02-05 11:24:38 UTC (rev 134) @@ -43,7 +43,10 @@ <include name="NMail.SmtpClient.dll"/> <include name="NMail.SmtpService.dll"/> <include name="NMail.SpoolData.MySql.dll"/> + <include name="NMail.LocalStoreData.MySql.dll"/> + <include name="NMail.LocalStore.dll"/> <include name="NMail.SpoolFilter.dll"/> + <include name="NMail.ImapService.dll" /> <include name="NMail.SpoolService.dll"/> </fileset> </copy> @@ -61,6 +64,9 @@ <include name="NMail.SmtpClient.dll"/> <include name="NMail.SmtpService.dll"/> <include name="NMail.SpoolData.MySql.dll"/> + <include name="NMail.LocalStoreData.MySql.dll"/> + <include name="NMail.LocalStore.dll"/> + <include name="NMail.ImapService.dll" /> <include name="NMail.SpoolFilter.dll"/> <include name="NMail.SpoolService.dll"/> </references> Modified: NMail/trunk/NMail.build =================================================================== --- NMail/trunk/NMail.build 2007-02-05 11:21:48 UTC (rev 133) +++ NMail/trunk/NMail.build 2007-02-05 11:24:38 UTC (rev 134) @@ -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" /> @@ -259,7 +259,63 @@ </exec> </target> - <target name="build-Installer" depends="assemblies, build-NMail.Administration.Web" description="Builds the NMail Server installer."> + <target name="build-NMail.RemoteAccessService" depends="init-build,build-NMail,build-NMail.Server" description="Builds the NMail remote access web site."> + <mkdir dir="NMail.RemoteAccessService.Compiled" /> + + <!-- build NMail.RemoteAccess web site--> + <exec program="aspnet_compiler" verbose="true"> + <arg value="-v" /> + <arg value="/NMailRemoteAccessService" /> + <arg value="-p" /> + <arg> + <path> + <pathelement file="NMail.RemoteAccessService" /> + </path> + </arg> + <arg value="-u" /> + <arg value="-f" /> + <arg> + <path> + <pathelement file="NMail.RemoteAccessService.Compiled" /> + </path> + </arg> + <arg value="-errorstack" /> + <arg value="-fixednames" /> + </exec> + </target> + + <target name="build-NMail.WebAccess" depends="init-build,build-NMail,build-NMail.Server" description="Builds the NMail WebAccess web site."> + <mkdir dir="NMail.WebAccess.Compiled" /> + + <!-- build NMail.RemoteAccess web site--> + <exec program="aspnet_compiler" verbose="true"> + <arg value="-v" /> + <arg value="/NMailWebAccess" /> + <arg value="-p" /> + <arg> + <path> + <pathelement file="NMail.WebAccess" /> + </path> + </arg> + <arg value="-u" /> + <arg value="-f" /> + <arg> + <path> + <pathelement file="NMail.WebAccess.Compiled" /> + </path> + </arg> + <arg value="-errorstack" /> + <arg value="-fixednames" /> + </exec> + </target> + + <target name="build-Installer" + depends="assemblies, + build-NMail.Administration.Web, + build-NMail.RemoteAccessService, + build-NMail.WebAccess" + description="Builds the NMail Server installer."> + <!-- build NMail.installer --> <nant buildfile="Installer/NMail-installer.build" target="package" /> </target> @@ -283,6 +339,8 @@ <nant buildfile="NMail.SetupWizard/NMail.SetupWizard.build" target="clean" /> <nant buildfile="NMail.Administration.Console/NMail.Administration.Console.build" target="clean" /> <delete dir="NMail.Administration.Web.Compiled" /> + <delete dir="NMail.RemoteAccessService.Compiled" /> + <delete dir="NMail.WebAccess.Compiled" /> </target> <target name="cleanall" depends="" description="Cleans the projects"> @@ -304,6 +362,8 @@ <nant buildfile="NMail.Server.Service/NMail.Server.Service.build" target="cleanall" /> <nant buildfile="NMail.Administration.Console/NMail.Administration.Console.build" target="cleanall" /> <delete dir="NMail.Administration.Web.Compiled" /> + <delete dir="NMail.RemoteAccessService.Compiled" /> + <delete dir="NMail.WebAccess.Compiled" /> </target> <target name="codestats" description="Generates code stats for NMail."> @@ -314,6 +374,13 @@ <include name="**\*.cs" /> </fileset> </count> + <count label="ASP.net"> + <fileset> + <include name="**\*.aspx" /> + <include name="**\*.ascx" /> + <include name="**\*.asmx" /> + </fileset> + </count> </counts> </codestats> </target> 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 10:03:28
|
Revision: 167 http://svn.sourceforge.net/nmailserver/?rev=167&view=rev Author: tmyroadctfig Date: 2007-03-04 02:03:29 -0800 (Sun, 04 Mar 2007) Log Message: ----------- Updated assembly information. Modified Paths: -------------- NMail/trunk/NDns/AssemblyInfo.cs NMail/trunk/NMail/AssemblyInfo.cs NMail/trunk/NMail.Administration.Console/Properties/AssemblyInfo.cs NMail/trunk/NMail.DnsClient/AssemblyInfo.cs NMail/trunk/NMail.ImapService/AssemblyInfo.cs NMail/trunk/NMail.LocalStore/AssemblyInfo.cs NMail/trunk/NMail.LocalStoreData.MySql/AssemblyInfo.cs NMail/trunk/NMail.LocalStoreData.NHibernate/Properties/AssemblyInfo.cs NMail/trunk/NMail.MessageRouter/AssemblyInfo.cs NMail/trunk/NMail.RemoteAccessService.Serializers/Properties/AssemblyInfo.cs NMail/trunk/NMail.Sendmail/AssemblyInfo.cs NMail/trunk/NMail.Server.Console/AssemblyInfo.cs NMail/trunk/NMail.Server.Service/AssemblyInfo.cs NMail/trunk/NMail.SetupWizard/Properties/AssemblyInfo.cs NMail/trunk/NMail.SmtpClient/AssemblyInfo.cs NMail/trunk/NMail.SmtpService/AssemblyInfo.cs NMail/trunk/NMail.SpoolData.MySql/AssemblyInfo.cs NMail/trunk/NMail.SpoolData.NHibernate/Properties/AssemblyInfo.cs NMail/trunk/NMail.SpoolFilter/AssemblyInfo.cs NMail/trunk/NMail.SpoolService/AssemblyInfo.cs NMail/trunk/NMail.UnitTests/Properties/AssemblyInfo.cs Modified: NMail/trunk/NDns/AssemblyInfo.cs =================================================================== --- NMail/trunk/NDns/AssemblyInfo.cs 2007-03-04 08:42:03 UTC (rev 166) +++ NMail/trunk/NDns/AssemblyInfo.cs 2007-03-04 10:03:29 UTC (rev 167) @@ -18,58 +18,17 @@ using System.Reflection; using System.Runtime.CompilerServices; -// -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -// +// General details [assembly: AssemblyTitle("NDns")] -[assembly: AssemblyDescription("A Dns library for NMail.")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("Luke Quinane 2004")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: - [assembly: AssemblyVersion("1.0.*")] -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory which is -// %Project Directory%\obj\<configuration>. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile("")] -[assembly: AssemblyKeyName("")] +[assembly: AssemblyDescription("A Dns library for NMail.")] +[assembly: AssemblyCompany("http://NMailServer.SourceForge.net")] +[assembly: AssemblyProduct("NMail")] +[assembly: AssemblyCopyright("Copyright \xA9 2004 Luke Quinane")] + +#if DEBUG +[assembly: AssemblyConfiguration("Debug")] +#else +[assembly: AssemblyConfiguration("Release")] +#endif Modified: NMail/trunk/NMail/AssemblyInfo.cs =================================================================== --- NMail/trunk/NMail/AssemblyInfo.cs 2007-03-04 08:42:03 UTC (rev 166) +++ NMail/trunk/NMail/AssemblyInfo.cs 2007-03-04 10:03:29 UTC (rev 167) @@ -18,58 +18,17 @@ using System.Reflection; using System.Runtime.CompilerServices; -// -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -// +// General details [assembly: AssemblyTitle("NMail core library.")] +[assembly: AssemblyVersion("1.1.*")] + [assembly: AssemblyDescription("Provides a core library for NMail.")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("Luke Quinane and Daniel Frampton")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] +[assembly: AssemblyCompany("http://NMailServer.SourceForge.net")] +[assembly: AssemblyProduct("NMail")] +[assembly: AssemblyCopyright("Copyright \xA9 2004-2007 Luke Quinane and Daniel Frampton")] -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: - -[assembly: AssemblyVersion("1.0.*")] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory which is -// %Project Directory%\obj\<configuration>. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile("")] -[assembly: AssemblyKeyName("")] +#if DEBUG +[assembly: AssemblyConfiguration("Debug")] +#else +[assembly: AssemblyConfiguration("Release")] +#endif Modified: NMail/trunk/NMail.Administration.Console/Properties/AssemblyInfo.cs =================================================================== --- NMail/trunk/NMail.Administration.Console/Properties/AssemblyInfo.cs 2007-03-04 08:42:03 UTC (rev 166) +++ NMail/trunk/NMail.Administration.Console/Properties/AssemblyInfo.cs 2007-03-04 10:03:29 UTC (rev 167) @@ -17,34 +17,18 @@ using System.Reflection; using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. +// General details [assembly: AssemblyTitle("NMail.Administration.Console")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("NMail.Administration.Console")] -[assembly: AssemblyCopyright("Copyright © 2006")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] +[assembly: AssemblyVersion("1.1.*")] -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] +[assembly: AssemblyDescription("A console based administration utility for NMail.")] +[assembly: AssemblyCompany("http://NMailServer.SourceForge.net")] +[assembly: AssemblyProduct("NMail Administration Console")] +[assembly: AssemblyCopyright("Copyright © 2004-2006 Luke Quinane and Daniel Frampton")] -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("edfbf1ab-7454-465e-beae-7fbc4275e83a")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +#if DEBUG +[assembly: AssemblyConfiguration("Debug")] +#else +[assembly: AssemblyConfiguration("Release")] +#endif Modified: NMail/trunk/NMail.DnsClient/AssemblyInfo.cs =================================================================== --- NMail/trunk/NMail.DnsClient/AssemblyInfo.cs 2007-03-04 08:42:03 UTC (rev 166) +++ NMail/trunk/NMail.DnsClient/AssemblyInfo.cs 2007-03-04 10:03:29 UTC (rev 167) @@ -18,58 +18,17 @@ using System.Reflection; using System.Runtime.CompilerServices; -// -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -// -[assembly: AssemblyTitle("")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] +// General details +[assembly: AssemblyTitle("NMail DNS client provider.")] +[assembly: AssemblyVersion("1.1.*")] -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: +[assembly: AssemblyDescription("Provides a DNS client implementation for NMail.")] +[assembly: AssemblyCompany("http://NMailServer.SourceForge.net")] +[assembly: AssemblyProduct("NMail")] +[assembly: AssemblyCopyright("Copyright \xA9 2004-2006 Luke Quinane and Daniel Frampton")] -[assembly: AssemblyVersion("1.0.*")] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory which is -// %Project Directory%\obj\<configuration>. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile("")] -[assembly: AssemblyKeyName("")] +#if DEBUG +[assembly: AssemblyConfiguration("Debug")] +#else +[assembly: AssemblyConfiguration("Release")] +#endif Modified: NMail/trunk/NMail.ImapService/AssemblyInfo.cs =================================================================== --- NMail/trunk/NMail.ImapService/AssemblyInfo.cs 2007-03-04 08:42:03 UTC (rev 166) +++ NMail/trunk/NMail.ImapService/AssemblyInfo.cs 2007-03-04 10:03:29 UTC (rev 167) @@ -18,58 +18,17 @@ using System.Reflection; using System.Runtime.CompilerServices; -// -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -// -[assembly: AssemblyTitle("NMail IMAP Service.")] +// General details +[assembly: AssemblyTitle("NMail IMAP service.")] +[assembly: AssemblyVersion("1.1.*")] + [assembly: AssemblyDescription("Provides an IMAP server implementation for NMail.")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("Luke Quinane and Daniel Frampton")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] +[assembly: AssemblyCompany("http://NMailServer.SourceForge.net")] +[assembly: AssemblyProduct("NMail")] +[assembly: AssemblyCopyright("Copyright \xA9 2004-2007 Luke Quinane and Daniel Frampton")] -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: - -[assembly: AssemblyVersion("1.0.*")] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory which is -// %Project Directory%\obj\<configuration>. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile("")] -[assembly: AssemblyKeyName("")] +#if DEBUG +[assembly: AssemblyConfiguration("Debug")] +#else +[assembly: AssemblyConfiguration("Release")] +#endif Modified: NMail/trunk/NMail.LocalStore/AssemblyInfo.cs =================================================================== --- NMail/trunk/NMail.LocalStore/AssemblyInfo.cs 2007-03-04 08:42:03 UTC (rev 166) +++ NMail/trunk/NMail.LocalStore/AssemblyInfo.cs 2007-03-04 10:03:29 UTC (rev 167) @@ -18,58 +18,17 @@ using System.Reflection; using System.Runtime.CompilerServices; -// -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -// -[assembly: AssemblyTitle("")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] +// General details +[assembly: AssemblyTitle("NMail Local Store library.")] +[assembly: AssemblyVersion("1.1.*")] -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: +[assembly: AssemblyDescription("Provides a local store implmentation for NMail.")] +[assembly: AssemblyCompany("http://NMailServer.SourceForge.net")] +[assembly: AssemblyProduct("NMail")] +[assembly: AssemblyCopyright("Copyright \xA9 2004-2007 Luke Quinane and Daniel Frampton")] -[assembly: AssemblyVersion("1.0.*")] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory which is -// %Project Directory%\obj\<configuration>. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile("")] -[assembly: AssemblyKeyName("")] +#if DEBUG +[assembly: AssemblyConfiguration("Debug")] +#else +[assembly: AssemblyConfiguration("Release")] +#endif Modified: NMail/trunk/NMail.LocalStoreData.MySql/AssemblyInfo.cs =================================================================== --- NMail/trunk/NMail.LocalStoreData.MySql/AssemblyInfo.cs 2007-03-04 08:42:03 UTC (rev 166) +++ NMail/trunk/NMail.LocalStoreData.MySql/AssemblyInfo.cs 2007-03-04 10:03:29 UTC (rev 167) @@ -18,58 +18,17 @@ using System.Reflection; using System.Runtime.CompilerServices; -// -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -// -[assembly: AssemblyTitle("")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] +// General details +[assembly: AssemblyTitle("NMail MySql Local Store Data.")] +[assembly: AssemblyVersion("1.1.*")] -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: +[assembly: AssemblyDescription("Provides an MySql based local store data implementation for NMail.")] +[assembly: AssemblyCompany("http://NMailServer.SourceForge.net")] +[assembly: AssemblyProduct("NMail")] +[assembly: AssemblyCopyright("Copyright \xA9 2004-2007 Luke Quinane and Daniel Frampton")] -[assembly: AssemblyVersion("1.0.*")] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory which is -// %Project Directory%\obj\<configuration>. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile("")] -[assembly: AssemblyKeyName("")] +#if DEBUG +[assembly: AssemblyConfiguration("Debug")] +#else +[assembly: AssemblyConfiguration("Release")] +#endif \ No newline at end of file Modified: NMail/trunk/NMail.LocalStoreData.NHibernate/Properties/AssemblyInfo.cs =================================================================== --- NMail/trunk/NMail.LocalStoreData.NHibernate/Properties/AssemblyInfo.cs 2007-03-04 08:42:03 UTC (rev 166) +++ NMail/trunk/NMail.LocalStoreData.NHibernate/Properties/AssemblyInfo.cs 2007-03-04 10:03:29 UTC (rev 167) @@ -1,35 +1,34 @@ -using System.Reflection; +/* + * 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.Reflection; using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("NMail.LocalStoreData.NHibernate")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("NMail.LocalStoreData.NHibernate")] -[assembly: AssemblyCopyright("Copyright © 2007")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] +// General details +[assembly: AssemblyTitle("NMail NHibernate Local Store Data.")] +[assembly: AssemblyVersion("1.1.*")] -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] +[assembly: AssemblyDescription("Provides an NHibernate based local store data implementation for NMail.")] +[assembly: AssemblyCompany("http://NMailServer.SourceForge.net")] +[assembly: AssemblyProduct("NMail")] +[assembly: AssemblyCopyright("Copyright © 2007 Luke Quinane")] -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("4f310b23-2c73-4abe-8f6e-eb092078282c")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +#if DEBUG +[assembly: AssemblyConfiguration("Debug")] +#else +[assembly: AssemblyConfiguration("Release")] +#endif \ No newline at end of file Modified: NMail/trunk/NMail.MessageRouter/AssemblyInfo.cs =================================================================== --- NMail/trunk/NMail.MessageRouter/AssemblyInfo.cs 2007-03-04 08:42:03 UTC (rev 166) +++ NMail/trunk/NMail.MessageRouter/AssemblyInfo.cs 2007-03-04 10:03:29 UTC (rev 167) @@ -18,58 +18,18 @@ using System.Reflection; using System.Runtime.CompilerServices; -// -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -// -[assembly: AssemblyTitle("NMail message router.")] -[assembly: AssemblyDescription("Provides a message router implementation for NMail.")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("Luke Quinane and Daniel Frampton")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: +// General details +[assembly: AssemblyTitle("NMail Message Router.")] +[assembly: AssemblyVersion("1.1.*")] -[assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyDescription("Provides a message router implementation for NMail.")] +[assembly: AssemblyCompany("http://NMailServer.SourceForge.net")] +[assembly: AssemblyProduct("NMail")] +[assembly: AssemblyCopyright("Copyright \xA9 2004-2007 Luke Quinane and Daniel Frampton")] -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory which is -// %Project Directory%\obj\<configuration>. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile("")] -[assembly: AssemblyKeyName("")] +#if DEBUG +[assembly: AssemblyConfiguration("Debug")] +#else +[assembly: AssemblyConfiguration("Release")] +#endif Modified: NMail/trunk/NMail.RemoteAccessService.Serializers/Properties/AssemblyInfo.cs =================================================================== --- NMail/trunk/NMail.RemoteAccessService.Serializers/Properties/AssemblyInfo.cs 2007-03-04 08:42:03 UTC (rev 166) +++ NMail/trunk/NMail.RemoteAccessService.Serializers/Properties/AssemblyInfo.cs 2007-03-04 10:03:29 UTC (rev 167) @@ -1,35 +1,35 @@ -using System.Reflection; +/* + * Copyright 2004-2007 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.Reflection; using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("NMail.RemoteAccessServiceSerializers")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("NMail.RemoteAccessServiceSerializers")] -[assembly: AssemblyCopyright("Copyright © 2006")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] +// General details +[assembly: AssemblyTitle("NMail Remote Access Serializers.")] +[assembly: AssemblyVersion("1.1.*")] -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("993fe48c-1f11-4884-b320-fdb2e300c663")] +[assembly: AssemblyDescription("Provides a XML serializers for NMail's remote access interface.")] +[assembly: AssemblyCompany("http://NMailServer.SourceForge.net")] +[assembly: AssemblyProduct("NMail")] +[assembly: AssemblyCopyright("Copyright © 2006-2007 Luke Quinane")] -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +#if DEBUG +[assembly: AssemblyConfiguration("Debug")] +#else +[assembly: AssemblyConfiguration("Release")] +#endif Modified: NMail/trunk/NMail.Sendmail/AssemblyInfo.cs =================================================================== --- NMail/trunk/NMail.Sendmail/AssemblyInfo.cs 2007-03-04 08:42:03 UTC (rev 166) +++ NMail/trunk/NMail.Sendmail/AssemblyInfo.cs 2007-03-04 10:03:29 UTC (rev 167) @@ -18,58 +18,17 @@ using System.Reflection; using System.Runtime.CompilerServices; -// -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -// +// General details [assembly: AssemblyTitle("NMail sendmail style interface.")] +[assembly: AssemblyVersion("1.1.*")] + [assembly: AssemblyDescription("Provides a 'sendmail' style command line interface.")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("Luke Quinane and Daniel Frampton")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] +[assembly: AssemblyCompany("http://NMailServer.SourceForge.net")] +[assembly: AssemblyProduct("NMail")] +[assembly: AssemblyCopyright("Copyright \xA9 2004-2007 Luke Quinane and Daniel Frampton")] -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: - -[assembly: AssemblyVersion("1.0.*")] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory which is -// %Project Directory%\obj\<configuration>. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile("")] -[assembly: AssemblyKeyName("")] +#if DEBUG +[assembly: AssemblyConfiguration("Debug")] +#else +[assembly: AssemblyConfiguration("Release")] +#endif Modified: NMail/trunk/NMail.Server.Console/AssemblyInfo.cs =================================================================== --- NMail/trunk/NMail.Server.Console/AssemblyInfo.cs 2007-03-04 08:42:03 UTC (rev 166) +++ NMail/trunk/NMail.Server.Console/AssemblyInfo.cs 2007-03-04 10:03:29 UTC (rev 167) @@ -18,58 +18,17 @@ using System.Reflection; using System.Runtime.CompilerServices; -// -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -// -[assembly: AssemblyTitle("")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] +// General details +[assembly: AssemblyTitle("NMail Console Server.")] +[assembly: AssemblyVersion("1.1.*")] -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: +[assembly: AssemblyDescription("Provides a console based server for NMail.")] +[assembly: AssemblyCompany("http://NMailServer.SourceForge.net")] +[assembly: AssemblyProduct("NMail")] +[assembly: AssemblyCopyright("Copyright \xA9 2004-2007 Luke Quinane and Daniel Frampton")] -[assembly: AssemblyVersion("1.0.*")] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory which is -// %Project Directory%\obj\<configuration>. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile("")] -[assembly: AssemblyKeyName("")] +#if DEBUG +[assembly: AssemblyConfiguration("Debug")] +#else +[assembly: AssemblyConfiguration("Release")] +#endif Modified: NMail/trunk/NMail.Server.Service/AssemblyInfo.cs =================================================================== --- NMail/trunk/NMail.Server.Service/AssemblyInfo.cs 2007-03-04 08:42:03 UTC (rev 166) +++ NMail/trunk/NMail.Server.Service/AssemblyInfo.cs 2007-03-04 10:03:29 UTC (rev 167) @@ -18,58 +18,17 @@ using System.Reflection; using System.Runtime.CompilerServices; -// -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -// -[assembly: AssemblyTitle("")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] +// General details +[assembly: AssemblyTitle("NMail Server Service.")] +[assembly: AssemblyVersion("1.1.*")] -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: +[assembly: AssemblyDescription("Provides a Windows based service to host the NMail server.")] +[assembly: AssemblyCompany("http://NMailServer.SourceForge.net")] +[assembly: AssemblyProduct("NMail")] +[assembly: AssemblyCopyright("Copyright \xA9 2004-2007 Luke Quinane and Daniel Frampton")] -[assembly: AssemblyVersion("1.0.*")] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory which is -// %Project Directory%\obj\<configuration>. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile("")] -[assembly: AssemblyKeyName("")] +#if DEBUG +[assembly: AssemblyConfiguration("Debug")] +#else +[assembly: AssemblyConfiguration("Release")] +#endif Modified: NMail/trunk/NMail.SetupWizard/Properties/AssemblyInfo.cs =================================================================== --- NMail/trunk/NMail.SetupWizard/Properties/AssemblyInfo.cs 2007-03-04 08:42:03 UTC (rev 166) +++ NMail/trunk/NMail.SetupWizard/Properties/AssemblyInfo.cs 2007-03-04 10:03:29 UTC (rev 167) @@ -19,32 +19,17 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("NMail.SetupWizard")] +// General details +[assembly: AssemblyTitle("NMail Setup Wizard.")] +[assembly: AssemblyVersion("1.1.*")] + [assembly: AssemblyDescription("A wizard for setting up NMail installations.")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("NMail.SetupWizard")] -[assembly: AssemblyCopyright("Copyright © 2006")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] +[assembly: AssemblyCompany("http://NMailServer.SourceForge.net")] +[assembly: AssemblyProduct("NMail")] +[assembly: AssemblyCopyright("Copyright © 2004-2007 Luke Quinane and Daniel Frampton")] -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("a8ab4221-e627-4364-a6e3-f53a368c2b4d")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +#if DEBUG +[assembly: AssemblyConfiguration("Debug")] +#else +[assembly: AssemblyConfiguration("Release")] +#endif Modified: NMail/trunk/NMail.SmtpClient/AssemblyInfo.cs =================================================================== --- NMail/trunk/NMail.SmtpClient/AssemblyInfo.cs 2007-03-04 08:42:03 UTC (rev 166) +++ NMail/trunk/NMail.SmtpClient/AssemblyInfo.cs 2007-03-04 10:03:29 UTC (rev 167) @@ -18,58 +18,18 @@ using System.Reflection; using System.Runtime.CompilerServices; -// -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -// + +// General details [assembly: AssemblyTitle("NMail SMTP client.")] +[assembly: AssemblyVersion("1.1.*")] + [assembly: AssemblyDescription("Provides a SMTP client implementation for NMail.")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("Luke Quinane and Daniel Frampton")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] +[assembly: AssemblyCompany("http://NMailServer.SourceForge.net")] +[assembly: AssemblyProduct("NMail")] +[assembly: AssemblyCopyright("Copyright \xA9 2004-2007 Luke Quinane and Daniel Frampton")] -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: - -[assembly: AssemblyVersion("1.0.*")] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory which is -// %Project Directory%\obj\<configuration>. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile("")] -[assembly: AssemblyKeyName("")] +#if DEBUG +[assembly: AssemblyConfiguration("Debug")] +#else +[assembly: AssemblyConfiguration("Release")] +#endif Modified: NMail/trunk/NMail.SmtpService/AssemblyInfo.cs =================================================================== --- NMail/trunk/NMail.SmtpService/AssemblyInfo.cs 2007-03-04 08:42:03 UTC (rev 166) +++ NMail/trunk/NMail.SmtpService/AssemblyInfo.cs 2007-03-04 10:03:29 UTC (rev 167) @@ -18,58 +18,17 @@ using System.Reflection; using System.Runtime.CompilerServices; -// -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -// +// General details [assembly: AssemblyTitle("NMail SMTP service.")] +[assembly: AssemblyVersion("1.1.*")] + [assembly: AssemblyDescription("Provides a SMTP server implementation for NMail.")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("Luke Quinane and Daniel Frampton")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] +[assembly: AssemblyCompany("http://NMailServer.SourceForge.net")] +[assembly: AssemblyProduct("NMail")] +[assembly: AssemblyCopyright("Copyright \xA9 2004-2007 Luke Quinane and Daniel Frampton")] -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: - -[assembly: AssemblyVersion("1.0.*")] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory which is -// %Project Directory%\obj\<configuration>. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile("")] -[assembly: AssemblyKeyName("")] +#if DEBUG +[assembly: AssemblyConfiguration("Debug")] +#else +[assembly: AssemblyConfiguration("Release")] +#endif Modified: NMail/trunk/NMail.SpoolData.MySql/AssemblyInfo.cs =================================================================== --- NMail/trunk/NMail.SpoolData.MySql/AssemblyInfo.cs 2007-03-04 08:42:03 UTC (rev 166) +++ NMail/trunk/NMail.SpoolData.MySql/AssemblyInfo.cs 2007-03-04 10:03:29 UTC (rev 167) @@ -18,58 +18,17 @@ using System.Reflection; using System.Runtime.CompilerServices; -// -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -// -[assembly: AssemblyTitle("")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] +// General details +[assembly: AssemblyTitle("NMail MySql Spool Data.")] +[assembly: AssemblyVersion("1.1.*")] -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: +[assembly: AssemblyDescription("Provides a MySql based spool data implementation for NMail.")] +[assembly: AssemblyCompany("http://NMailServer.SourceForge.net")] +[assembly: AssemblyProduct("NMail")] +[assembly: AssemblyCopyright("Copyright \xA9 2004-2007 Luke Quinane and Daniel Frampton")] -[assembly: AssemblyVersion("1.0.*")] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory which is -// %Project Directory%\obj\<configuration>. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile("")] -[assembly: AssemblyKeyName("")] +#if DEBUG +[assembly: AssemblyConfiguration("Debug")] +#else +[assembly: AssemblyConfiguration("Release")] +#endif Modified: NMail/trunk/NMail.SpoolData.NHibernate/Properties/AssemblyInfo.cs =================================================================== --- NMail/trunk/NMail.SpoolData.NHibernate/Properties/AssemblyInfo.cs 2007-03-04 08:42:03 UTC (rev 166) +++ NMail/trunk/NMail.SpoolData.NHibernate/Properties/AssemblyInfo.cs 2007-03-04 10:03:29 UTC (rev 167) @@ -1,35 +1,34 @@ -using System.Reflection; +/* + * 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.Reflection; using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("NMail.SpoolData.NHibernate")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("NMail.SpoolData.NHibernate")] -[assembly: AssemblyCopyright("Copyright © 2007")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] +// General details +[assembly: AssemblyTitle("NMail NHibernate Spool Data.")] +[assembly: AssemblyVersion("1.1.*")] -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] +[assembly: AssemblyDescription("Provides a NHibernate based spool data implementation for NMail.")] +[assembly: AssemblyCompany("http://NMailServer.SourceForge.net")] +[assembly: AssemblyProduct("NMail")] +[assembly: AssemblyCopyright("Copyright © 2007 Luke Quinane")] -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("5bd9b2cc-5edd-4939-8e20-3a93b57209d0")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +#if DEBUG +[assembly: AssemblyConfiguration("Debug")] +#else +[assembly: AssemblyConfiguration("Release")] +#endif Modified: NMail/trunk/NMail.SpoolFilter/AssemblyInfo.cs =================================================================== --- NMail/trunk/NMail.SpoolFilter/AssemblyInfo.cs 2007-03-04 08:42:03 UTC (rev 166) +++ NMail/trunk/NMail.SpoolFilter/AssemblyInfo.cs 2007-03-04 10:03:29 UTC (rev 167) @@ -18,58 +18,17 @@ using System.Reflection; using System.Runtime.CompilerServices; -// -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -// -[assembly: AssemblyTitle("")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] +// General details +[assembly: AssemblyTitle("NMail Spool Filter Service.")] +[assembly: AssemblyVersion("1.1.*")] -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: +[assembly: AssemblyDescription("Provides a spool filter service implementation for NMail.")] +[assembly: AssemblyCompany("http://NMailServer.SourceForge.net")] +[assembly: AssemblyProduct("NMail")] +[assembly: AssemblyCopyright("Copyright \xA9 2004-2007 Luke Quinane and Daniel Frampton")] -[assembly: AssemblyVersion("1.0.*")] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory which is -// %Project Directory%\obj\<configuration>. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile("")] -[assembly: AssemblyKeyName("")] +#if DEBUG +[assembly: AssemblyConfiguration("Debug")] +#else +[assembly: AssemblyConfiguration("Release")] +#endif Modified: NMail/trunk/NMail.SpoolService/AssemblyInfo.cs =================================================================== --- NMail/trunk/NMail.SpoolService/AssemblyInfo.cs 2007-03-04 08:42:03 UTC (rev 166) +++ NMail/trunk/NMail.SpoolService/AssemblyInfo.cs 2007-03-04 10:03:29 UTC (rev 167) @@ -18,58 +18,18 @@ using System.Reflection; using System.Runtime.CompilerServices; -// -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -// -[assembly: AssemblyTitle("NMail SMTP spool service.")] -[assembly: AssemblyDescription("Provides an implem... [truncated message content] |
From: <tmy...@us...> - 2007-04-11 02:49:29
|
Revision: 180 http://svn.sourceforge.net/nmailserver/?rev=180&view=rev Author: tmyroadctfig Date: 2007-04-10 19:49:28 -0700 (Tue, 10 Apr 2007) Log Message: ----------- More work on NHibernate localstore data. Modified Paths: -------------- NMail/trunk/NMail.LocalStoreData.NHibernate/NHibernateLocalStoreData.cs NMail/trunk/NMail.UnitTests/LocalStoreData/DeleteUserTest1.cs Modified: NMail/trunk/NMail.LocalStoreData.NHibernate/NHibernateLocalStoreData.cs =================================================================== --- NMail/trunk/NMail.LocalStoreData.NHibernate/NHibernateLocalStoreData.cs 2007-03-24 10:01:32 UTC (rev 179) +++ NMail/trunk/NMail.LocalStoreData.NHibernate/NHibernateLocalStoreData.cs 2007-04-11 02:49:28 UTC (rev 180) @@ -225,7 +225,10 @@ } protected void CreateFolder(StoreFolder newFolder, ISession session) { - // TODO: ensure session has started a transaction... + // Ensure session has started a transaction + if (!session.Transaction.IsActive) { + throw new InvalidOperationException("A transaction is required for this operation."); + } // Validate owner user Id LocalStoreUser user = session.Get<LocalStoreUser>(newFolder.OwnerUserId); @@ -309,6 +312,8 @@ throw new InvalidOperationException("Folder still has children."); } + DeleteChildrenWithoutUpdate(folder, session); + session.Delete(folder); // Remove the folder from the parent's list of children if present @@ -323,6 +328,30 @@ } } } + + /// <summary> + /// Recursively delete's child folders without updating the parent folders + /// child Id list. + /// </summary> + /// <param name="folder">The folder to delete the children from.</param> + /// <param name="session">The session to use.</param> + protected void DeleteChildrenWithoutUpdate(StoreFolder folder, ISession session) { + // Ensure session has started a transaction + if (!session.Transaction.IsActive) { + throw new InvalidOperationException("A transaction is required for this operation."); + } + + // Delete each child and sub-children + foreach (int childId in folder.ChildIds) { + StoreFolder child = session.Load<StoreFolder>(childId); + + // Recurse down + DeleteChildrenWithoutUpdate(child, session); + + // Delete the child at the current leve + session.Delete(child); + } + } #endregion #region RenameFolder @@ -930,7 +959,7 @@ userFolder.NameSpace = DefaultNameSpace; userFolder.FullFolderName = user.Username; userFolder.OwnerUserId = user.UserId; - CreateFolder(userFolder); + CreateFolder(userFolder, session); // Create the user's folder StoreFolder inboxFolder = new StoreFolder(); @@ -938,7 +967,7 @@ inboxFolder.FullFolderName = string.Format("{0}{1}{2}", user.Username, userFolder.Delimiter, Folder.Inbox); inboxFolder.ParentId = userFolder.FolderId; inboxFolder.OwnerUserId = user.UserId; - CreateFolder(inboxFolder); + CreateFolder(inboxFolder, session); // TODO: ACLs Modified: NMail/trunk/NMail.UnitTests/LocalStoreData/DeleteUserTest1.cs =================================================================== --- NMail/trunk/NMail.UnitTests/LocalStoreData/DeleteUserTest1.cs 2007-03-24 10:01:32 UTC (rev 179) +++ NMail/trunk/NMail.UnitTests/LocalStoreData/DeleteUserTest1.cs 2007-04-11 02:49:28 UTC (rev 180) @@ -32,7 +32,7 @@ foreach (StoreFolder folder in userFolders) { try { this.localStoreData.DeleteFolder(folder.FolderId, true); - } catch (Exception ex) { + } catch (Exception) { // Ignore, may be trying to delete a deleted sub-folder } } @@ -41,7 +41,7 @@ IList<LocalStoreUser> users = this.localStoreData.GetUsers(); - Assert.AreEqual(0, users.Count, "Users.count == 0"); + Assert.AreEqual(1, users.Count, "Users.count == 1"); } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tmy...@us...> - 2007-05-01 13:46:57
|
Revision: 188 http://svn.sourceforge.net/nmailserver/?rev=188&view=rev Author: tmyroadctfig Date: 2007-05-01 06:46:57 -0700 (Tue, 01 May 2007) Log Message: ----------- Changed the way NHibernate is configured. Added a unit test. Modified Paths: -------------- NMail/trunk/NMail.LocalStoreData.NHibernate/Mappings/NMail.LocalStoreData.NHibernate.InternalSystemAce.hbm.xml NMail/trunk/NMail.LocalStoreData.NHibernate/NHibernateAuthProvider.cs NMail/trunk/NMail.LocalStoreData.NHibernate/NHibernateLocalStoreData.cs NMail/trunk/NMail.LocalStoreData.NHibernate/NMail.LocalStoreData.NHibernate.csproj NMail/trunk/NMail.Server.Console/NMail.Server.Console.csproj NMail/trunk/NMail.Server.Console/NMail.config NMail/trunk/NMail.SpoolData.NHibernate/NHibernateSpoolData.cs NMail/trunk/NMail.SpoolData.NHibernate/NMail.SpoolData.NHibernate.csproj Added Paths: ----------- NMail/trunk/NMail.LocalStoreData.NHibernate/Configuration.cs NMail/trunk/NMail.LocalStoreData.NHibernate/NHibernateHelper.cs NMail/trunk/NMail.LocalStoreData.NHibernate/hibernate-localstore-configuration.xml NMail/trunk/NMail.SpoolData.NHibernate/Configuration.cs NMail/trunk/NMail.SpoolData.NHibernate/hibernate-spool-configuration.xml NMail/trunk/NMail.UnitTests/LocalStoreData/GetSetRemoveSystemAceTest1.cs Removed Paths: ------------- NMail/trunk/NMail.LocalStoreData.NHibernate/hibernate-configuration.xml NMail/trunk/NMail.Server.Console/oldconfig.xml NMail/trunk/NMail.SpoolData.NHibernate/hibernate-configuration.xml Added: NMail/trunk/NMail.LocalStoreData.NHibernate/Configuration.cs =================================================================== --- NMail/trunk/NMail.LocalStoreData.NHibernate/Configuration.cs (rev 0) +++ NMail/trunk/NMail.LocalStoreData.NHibernate/Configuration.cs 2007-05-01 13:46:57 UTC (rev 188) @@ -0,0 +1,69 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Text; + +using NMail.Configuration; + +namespace NMail.LocalStoreData.NHibernate { + /// <summary> + /// Provides configuration settings for the NHibernate local store data implementation. + /// </summary> + public class Configuration : ConfigurationSection { + /// <summary> + /// Adds a NHibernate local store data configuration section to the current config file. + /// </summary> + public static void AddToConfigFile() { + if (NMailConfigFile.Current.Sections["NMail.LocalStoreData.NHibernate"] == null) { + NMailConfigFile.Current.Sections.Add("NMail.LocalStoreData.NHibernate", new Configuration()); + } + } + + /// <summary> + /// Remove the config section from the config file. + /// </summary> + public static void RemoveFromConfigFile() { + if (NMailConfigFile.Current.Sections["NMail.LocalStoreData.NHibernate"] != null) { + NMailConfigFile.Current.Sections.Remove("NMail.LocalStoreData.NHibernate"); + } + } + + /// <summary> + /// Returns true if a NHibernate local store data configuration section exists in the current + /// configuration. + /// </summary> + public static bool ConfigurationPresent { + get { + return (NMailConfigFile.Current.Sections["NMail.LocalStoreData.NHibernate"] != null); + } + } + + /// <summary> + /// The current configuration in use. + /// </summary> + public static Configuration Current { + get { + Configuration current; + current = (Configuration) NMailConfigFile.Current.GetSection("NMail.LocalStoreData.NHibernate"); + + if (current == null) { + throw new ConfigurationErrorsException("NMail NHibernate local store data configuration is missing"); + } + return current; + } + } + + /// <summary> + /// The file containing the actual NHibernate configuration. + /// </summary> + [ConfigurationProperty("NHibernateCfgFile", IsRequired = true)] + public string ConfigurationFile { + get { + return (string) this["NHibernateCfgFile"]; + } + set { + this["NHibernateCfgFile"] = value; + } + } + } +} Modified: NMail/trunk/NMail.LocalStoreData.NHibernate/Mappings/NMail.LocalStoreData.NHibernate.InternalSystemAce.hbm.xml =================================================================== --- NMail/trunk/NMail.LocalStoreData.NHibernate/Mappings/NMail.LocalStoreData.NHibernate.InternalSystemAce.hbm.xml 2007-04-30 08:59:18 UTC (rev 187) +++ NMail/trunk/NMail.LocalStoreData.NHibernate/Mappings/NMail.LocalStoreData.NHibernate.InternalSystemAce.hbm.xml 2007-05-01 13:46:57 UTC (rev 188) @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="NMail.LocalStoreData.NHibernate" assembly="NMail.LocalStoreData.NHibernate" default-lazy="false"> - <class name="NMail.LocalStoreData.NHibernate.InternalSystemAce" table="UserObject"> + <class name="NMail.LocalStoreData.NHibernate.InternalSystemAce" table="SystemAce"> <id name="AceId" type="Int32" unsaved-value="0"> <column name="AceId" not-null="true"/> <generator class="native" /> Modified: NMail/trunk/NMail.LocalStoreData.NHibernate/NHibernateAuthProvider.cs =================================================================== --- NMail/trunk/NMail.LocalStoreData.NHibernate/NHibernateAuthProvider.cs 2007-04-30 08:59:18 UTC (rev 187) +++ NMail/trunk/NMail.LocalStoreData.NHibernate/NHibernateAuthProvider.cs 2007-05-01 13:46:57 UTC (rev 188) @@ -32,18 +32,6 @@ namespace NMail.LocalStoreData.NHibernate { public class NHibernateAuthProvider : MarshalByRefObject, IHashAuthProvider { - global::NHibernate.Cfg.Configuration hibernateCfg; - - ISessionFactory hibernateFactory; - - public NHibernateAuthProvider() { - this.hibernateCfg = new global::NHibernate.Cfg.Configuration(); - this.hibernateCfg.Configure(System.Reflection.Assembly.GetExecutingAssembly(), "NMail.LocalStoreData.NHibernate.hibernate-configuration.xml"); - this.hibernateCfg.AddAssembly("NMail.LocalStoreData.NHibernate"); - - this.hibernateFactory = this.hibernateCfg.BuildSessionFactory(); - } - internal BasicAuthToken createValidatedToken(AuthenticationUser user, ISession session) { // Ensure session has started a transaction if (!session.Transaction.IsActive) { @@ -82,7 +70,7 @@ /// <param name="user">The token to check.</param> /// <returns>True if the token is valid.</returns> public bool ValidToken(IAuthenticationToken user) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { using (ITransaction tx = session.BeginTransaction()) { BasicAuthToken authToken = user as BasicAuthToken; @@ -135,7 +123,7 @@ /// <param name="user">The user to check.</param> /// <returns>True if their account is locked out.</returns> public bool IsLockedOut(IAuthenticationToken user) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { using (ITransaction tx = session.BeginTransaction()) { AuthenticationUser authUser = session.CreateCriteria(typeof(AuthenticationUser)) .CreateCriteria("User") @@ -162,7 +150,7 @@ /// <param name="user">The user to check.</param> /// <returns>True if their account is enabled.</returns> public bool IsEnabled(IAuthenticationToken user) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { using (ITransaction tx = session.BeginTransaction()) { AuthenticationUser authUser = session.CreateCriteria(typeof(AuthenticationUser)) .CreateCriteria("User") @@ -190,7 +178,7 @@ /// <param name="newPassword">The new password.</param> /// <returns>True on success, false otherwise.</returns> public bool ChangePassword(IAuthenticationToken user, string newPassword) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { using (ITransaction tx = session.BeginTransaction()) { AuthenticationUser authUser = session.CreateCriteria(typeof(AuthenticationUser)) .CreateCriteria("User") @@ -218,7 +206,7 @@ /// </summary> /// <param name="username">The username for the account to reset.</param> public void ResetLockOut(string username) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { using (ITransaction tx = session.BeginTransaction()) { AuthenticationUser user = session.CreateCriteria(typeof(AuthenticationUser)) .CreateCriteria("User") @@ -244,7 +232,7 @@ /// <param name="username">The username to alter.</param> /// <param name="enabled">True if the account is enabled, false for disabled.</param> public void SetEnabled(string username, bool enabled) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { using (ITransaction tx = session.BeginTransaction()) { AuthenticationUser user = session.CreateCriteria(typeof(AuthenticationUser)) .CreateCriteria("User") @@ -271,7 +259,7 @@ /// <param name="password">The given password to attempt authentication with.</param> /// <returns>The authentication token or null if authentication fails.</returns> public IAuthenticationToken Authenticate(string username, string password) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { using (ITransaction tx = session.BeginTransaction()) { AuthenticationUser user = session.CreateCriteria(typeof(AuthenticationUser)) .CreateCriteria("User") @@ -299,7 +287,7 @@ /// <param name="username">The username to create the token for.</param> /// <returns>The token or null if the user is invalid</returns> public IAuthenticationToken CreateAuthToken(string username) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { using (ITransaction tx = session.BeginTransaction()) { AuthenticationUser user = session.CreateCriteria(typeof(AuthenticationUser)) .CreateCriteria("User") @@ -320,7 +308,7 @@ #region IHashAuthProvider Members public IAuthenticationToken Authenticate(string username, string hash, HashAuthType authType) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { using (ITransaction tx = session.BeginTransaction()) { AuthenticationUser user = session.CreateCriteria(typeof(AuthenticationUser)) .CreateCriteria("User") Added: NMail/trunk/NMail.LocalStoreData.NHibernate/NHibernateHelper.cs =================================================================== --- NMail/trunk/NMail.LocalStoreData.NHibernate/NHibernateHelper.cs (rev 0) +++ NMail/trunk/NMail.LocalStoreData.NHibernate/NHibernateHelper.cs 2007-05-01 13:46:57 UTC (rev 188) @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Text; + +using NHibernate; + +namespace NMail.LocalStoreData.NHibernate { + /// <summary> + /// An internal helper class that configures the NHibernate factory. + /// </summary> + internal class NHibernateHelper { + + static global::NHibernate.Cfg.Configuration hibernateCfg; + + /// <summary> + /// The current hibernate configuration. + /// </summary> + internal static global::NHibernate.Cfg.Configuration Configuration { + get { + return hibernateCfg; + } + } + + static ISessionFactory hibernateFactory; + + /// <summary> + /// The configured factory. + /// </summary> + internal static ISessionFactory Factory { + get { + return hibernateFactory; + } + } + + static NHibernateHelper() { + hibernateCfg = new global::NHibernate.Cfg.Configuration(); + hibernateCfg.Configure(NMail.LocalStoreData.NHibernate.Configuration.Current.ConfigurationFile); + hibernateCfg.AddAssembly("NMail.LocalStoreData.NHibernate"); + + hibernateFactory = hibernateCfg.BuildSessionFactory(); + } + } +} Modified: NMail/trunk/NMail.LocalStoreData.NHibernate/NHibernateLocalStoreData.cs =================================================================== --- NMail/trunk/NMail.LocalStoreData.NHibernate/NHibernateLocalStoreData.cs 2007-04-30 08:59:18 UTC (rev 187) +++ NMail/trunk/NMail.LocalStoreData.NHibernate/NHibernateLocalStoreData.cs 2007-05-01 13:46:57 UTC (rev 188) @@ -41,18 +41,6 @@ [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.NHibernate.hibernate-configuration.xml"); - this.hibernateCfg.AddAssembly("NMail.LocalStoreData.NHibernate"); - - this.hibernateFactory = this.hibernateCfg.BuildSessionFactory(); - } - #region ILocalStoreData Members #region Message Delivery @@ -85,7 +73,7 @@ /// <param name="folder">The Id of the folder to deliver into.</param> /// <exception cref="ArgumentException">The folder Id was invalid.</exception> public void DeliverMessage(Message message, int folderId) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { using (ITransaction tx = session.BeginTransaction()) { // Get the next folder message id InternalStoreFolder folder = session.Get<InternalStoreFolder>(folderId); @@ -123,7 +111,7 @@ /// <param name="folder">The folder to lookup.</param> /// <returns>The store folder or null if the folder name is invalid.</returns> public StoreFolder GetStoreFolder(Folder folder) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { return session.CreateCriteria(typeof(InternalStoreFolder)) .Add(Expression.Like("NameSpace", folder.NameSpace)) .Add(Expression.Like("FullFolderName", folder.FullFolderName)) @@ -137,7 +125,7 @@ /// <param name="folderId">The Id of the folder to lookup.</param> /// <returns>The store folder or null if the folder Id is invalid.</returns> public StoreFolder GetStoreFolder(int folderId) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { return session.Load<InternalStoreFolder>(folderId); } } @@ -155,7 +143,7 @@ /// <exception cref="System.InvalidOperationException">Changes to the folder are not permitted.</exception> /// <exception cref="System.ArgumentException">The folder is invalid.</exception> public void CreateFolder(StoreFolder newFolder) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { using (ITransaction tx = session.BeginTransaction()) { CreateFolder(newFolder, session); @@ -251,7 +239,7 @@ /// </exception> /// <exception cref="System.ArgumentException">The folder is invalid.</exception> public void DeleteFolder(int folderId, bool deleteChildren) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { using (ITransaction tx = session.BeginTransaction()) { InternalStoreFolder folder = session.Get<InternalStoreFolder>(folderId); @@ -330,7 +318,7 @@ /// <exception cref="System.InvalidOperationException">Changes to the folder are not permitted.</exception> /// <exception cref="System.ArgumentException">The folder Id or parent Id or folder name is invalid.</exception> public void MoveFolder(int folderId, int? parentId, string newFolderName) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { using (ITransaction tx = session.BeginTransaction()) { InternalStoreFolder currentFolder = session.Load<InternalStoreFolder>(folderId); InternalStoreFolder newFolder; @@ -422,7 +410,7 @@ /// <param name="parentId">The Id of the parent to get the children from.</param> /// <returns>The list of folders.</returns> public IList<StoreFolder> GetChildren(int parentId) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { using (ITransaction tx = session.BeginTransaction()) { InternalStoreFolder folder = session.Load<InternalStoreFolder>(parentId); @@ -444,7 +432,7 @@ /// </summary> /// <returns>The list of folders.</returns> public IList<StoreFolder> GetFolders() { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { return session.CreateCriteria(typeof(InternalStoreFolder)).List<StoreFolder>(); } } @@ -504,7 +492,7 @@ /// <param name="userId">The Id of the user to get the list of subscribed folders for.</param> /// <returns>The list of folders.</returns> public IList<StoreFolder> GetSubscribedFolders(int userId) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { using (ITransaction tx = session.BeginTransaction()) { IList<FolderSubscription> subscriptionList = session.CreateCriteria(typeof(FolderSubscription)) .Add(Expression.Eq("UserId", userId)) @@ -535,7 +523,7 @@ /// <param name="userId">The Id of the user to subscribe for.</param> /// <param name="folder">The Id of the folder to subscribe to.</param> public void Subscribe(int userId, int folderId) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { using (ITransaction tx = session.BeginTransaction()) { IList<FolderSubscription> current = session.CreateCriteria(typeof(FolderSubscription)) .Add(Expression.Eq("UserId", userId)) @@ -564,7 +552,7 @@ /// <param name="userId">The Id of the user to unsubscribe for.</param> /// <param name="folder">The Id of the folder to unsubscribe from.</param> public void UnSubscribe(int userId, int folderId) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { using (ITransaction tx = session.BeginTransaction()) { IList<FolderSubscription> current = session.CreateCriteria(typeof(FolderSubscription)) .Add(Expression.Eq("UserId", userId)) @@ -594,7 +582,7 @@ /// <param name="folderId">The Id of the folder to get the next Id in.</param> /// <returns>The Id of the next existing message or 0 if there is none.</returns> public int GetNextMessageId(int messageId, int folderId) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { InternalMessage message = session.CreateCriteria(typeof(InternalMessage)) .Add(Expression.Eq("FolderId", folderId)) .Add(Expression.Gt("FolderMessageId", messageId)) @@ -612,7 +600,7 @@ /// <param name="folderId">The Id of the folder the message is in.</param> /// <returns>The next message Id.</returns> public int GetNextMessageId(int folderId) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { InternalStoreFolder folder = session.Get<InternalStoreFolder>(folderId); return (folder == null) ? 0 : folder.NextMessageId; } @@ -627,7 +615,7 @@ /// <param name="folderId">The Id of the folder the message is in.</param> /// <returns>The message Id or 0 if there is no such message.</returns> public int GetMessageId(int messageOffset, int folderId) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { InternalMessage message = session.CreateCriteria(typeof(InternalMessage)) .Add(Expression.Eq("FolderId", folderId)) .AddOrder(Order.Asc("FolderMessageId")) @@ -648,7 +636,7 @@ /// <param name="folderId">The Id of the folder the message is in.</param> /// <returns>The message offset or 0 if there is no such message.</returns> public int GetMessageOffset(int messageId, int folderId) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { return GetMessageOffset(messageId, folderId, session); } } @@ -670,7 +658,7 @@ public IList<int> GetMessageIds(int folderId) { List<int> result = new List<int>(); - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { IList<InternalMessage> messages = session.CreateCriteria(typeof(InternalMessage)) .Add(Expression.Eq("FolderId", folderId)) .List<InternalMessage>(); @@ -695,7 +683,7 @@ /// <param name="folderId">The Id of the folder the message is in.</param> /// <returns>The message flags.</returns> public StoreMessageFlags? GetMessageFlags(int messageId, int folderId) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { InternalMessage message = session.CreateCriteria(typeof(InternalMessage)) .Add(Expression.Eq("FolderId", folderId)) .Add(Expression.Eq("FolderMessageId", messageId)) @@ -715,7 +703,7 @@ /// <param name="folderId">The Id of the folder the message is in.</param> /// <param name="flags">The flags to set.</param> public void SetMessageFlags(int messageId, int folderId, StoreMessageFlags flags) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { using (ITransaction tx = session.BeginTransaction()) { InternalMessage message = session.CreateCriteria(typeof(InternalMessage)) @@ -750,7 +738,7 @@ /// <param name="folderId">The Id of the folder the message is in.</param> /// <returns>The message date or null if non is found.</returns> public DateTime? GetInternalDate(int messageId, int folderId) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { InternalMessage message = session.CreateCriteria(typeof(InternalMessage)) .Add(Expression.Eq("FolderId", folderId)) .Add(Expression.Eq("FolderMessageId", messageId)) @@ -769,7 +757,7 @@ /// <param name="folderId">The Id of the folder the message is in.</param> /// <returns>The message size in bytes or null if non is found.</returns> public int? GetMessageSize(int messageId, int folderId) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { InternalMessage message = session.CreateCriteria(typeof(InternalMessage)) .Add(Expression.Eq("FolderId", folderId)) .Add(Expression.Eq("FolderMessageId", messageId)) @@ -788,7 +776,7 @@ /// <param name="folderId">The Id of the folder the message is in.</param> /// <returns>The message headers or null if none exists.</returns> public MessageHeaders GetMessageHeaders(int messageId, int folderId) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { InternalMessage message = session.CreateCriteria(typeof(InternalMessage)) .Add(Expression.Eq("FolderId", folderId)) .Add(Expression.Eq("FolderMessageId", messageId)) @@ -808,7 +796,7 @@ /// <param name="messagePart">The number of the part to get.</param> /// <returns>The MIME part or null if the part is invalid.</returns> public IMessageBodyPart GetMessageMimePart(int messageId, int folderId, int messagePart) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { InternalMessage message = session.CreateCriteria(typeof(InternalMessage)) .Add(Expression.Eq("FolderId", folderId)) .Add(Expression.Eq("FolderMessageId", messageId)) @@ -839,7 +827,7 @@ /// <param name="folderId">The Id of the folder the message is in.</param> /// <returns>The message or null if the message Id is invalid.</returns> public Message GetMessage(int messageId, int folderId) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { InternalMessage message = session.CreateCriteria(typeof(InternalMessage)) .Add(Expression.Eq("FolderId", folderId)) .Add(Expression.Eq("FolderMessageId", messageId)) @@ -861,7 +849,7 @@ /// <param name="folderId">The Id of the folder to count the messages in.</param> /// <returns>The message count.</returns> public int GetMessageCount(int folderId) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { return session.CreateCriteria(typeof(InternalMessage)) .Add(Expression.Eq("FolderId", folderId)) .List<InternalMessage>().Count; @@ -877,7 +865,7 @@ /// <param name="flags">The flags to check for when counting.</param> /// <returns>The number of messages.</returns> public int GetMessageCountWithFlags(int folderId, StoreMessageFlags flags) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { return session.CreateCriteria(typeof(InternalMessage)) .Add(Expression.Eq("FolderId", folderId)) .Add(Expression.Eq("MessageFlags", flags)) @@ -895,7 +883,7 @@ /// <param name="folderId">The Id of the folder to delete messages in.</param> /// <returns>The list of message offsets for the deleted messages.</returns> public IList<int> PurgeDeletedMessages(int folderId) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { using (ITransaction tx = session.BeginTransaction()) { IList<int> folderMsgIds = new List<int>(); @@ -939,7 +927,7 @@ /// <param name="key">A key to identify which object to get.</param> /// <returns>The object.</returns> public object LoadObject(string key) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { return session.CreateCriteria(typeof(InternalUserObject)) .Add(Expression.Eq("Key", key)) .UniqueResult<InternalUserObject>().Data; @@ -951,7 +939,7 @@ /// </summary> /// <param name="key">A key to identify the object at load time.</param> public void SaveObject(object o, string key) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { using (ITransaction tx = session.BeginTransaction()) { InternalUserObject current = session.CreateCriteria(typeof(InternalUserObject)) .Add(Expression.Eq("Key", key)) @@ -981,7 +969,7 @@ /// <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 (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { return session.CreateCriteria(typeof(LocalStoreUser)) .Add(Expression.Like("Username", name)) .UniqueResult<LocalStoreUser>(); @@ -994,7 +982,7 @@ /// <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 (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { return session.Load<LocalStoreUser>(userId); } } @@ -1006,7 +994,7 @@ /// </summary> /// <returns>The list of users.</returns> public IList<LocalStoreUser> GetUsers() { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { return session.CreateCriteria(typeof(LocalStoreUser)).List<LocalStoreUser>(); } } @@ -1021,7 +1009,7 @@ /// <exception cref="System.InvalidOperationException">Changes to the user are not permitted.</exception> /// <exception cref="System.ArgumentException">The user is invalid.</exception> public void CreateUser(LocalStoreUser user) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { using (ITransaction tx = session.BeginTransaction()) { if (user.UserId != 0) { throw new InvalidOperationException("Can't save an existing user with this method."); @@ -1070,7 +1058,7 @@ /// </summary> /// <param name="userId">The Id of the user to delete.</param> public void DeleteUser(int userId) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { using (ITransaction tx = session.BeginTransaction()) { if (GetUserFolders(userId, session).Count > 0) { throw new ConstraintException("Can't delete a user that still owns folders."); @@ -1093,7 +1081,7 @@ /// <param name="user">The user details to update.</param> /// <returns>The result of the attempt to update the user.</returns> public void UpdateUser(LocalStoreUser user) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { using (ITransaction tx = session.BeginTransaction()) { // Check if any other user with the same name exists in the system IList<LocalStoreUser> existing = session.CreateCriteria(typeof(LocalStoreUser)) @@ -1120,7 +1108,7 @@ /// <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 IList<StoreFolder> GetUserFolders(int userId) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { return GetUserFolders(userId, session); } } @@ -1147,7 +1135,7 @@ /// <param name="name">The name to look up.</param> /// <returns>The matching group or null if non is found.</returns> public LocalStoreGroup GetGroup(string name) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { return session.CreateCriteria(typeof(LocalStoreGroup)) .Add(Expression.Like("Name", name)) .UniqueResult<LocalStoreGroup>(); @@ -1160,7 +1148,7 @@ /// <param name="groupId">The Id of the group to look up.</param> /// <returns>The matching group or null if non is found.</returns> public LocalStoreGroup GetGroup(int groupId) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { return session.CreateCriteria(typeof(LocalStoreGroup)) .Add(Expression.Like("GroupId", groupId)) .UniqueResult<LocalStoreGroup>(); @@ -1174,7 +1162,7 @@ /// </summary> /// <returns>The list of groups.</returns> public IList<LocalStoreGroup> GetGroups() { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { return session.CreateCriteria(typeof(LocalStoreGroup)).List<LocalStoreGroup>(); } } @@ -1189,7 +1177,7 @@ /// <exception cref="System.InvalidOperationException">Changes to the group are not permitted.</exception> /// <exception cref="System.ArgumentException">The group is invalid.</exception> public void CreateGroup(LocalStoreGroup group) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { using (ITransaction tx = session.BeginTransaction()) { if (group.GroupId != 0) { throw new InvalidOperationException("Can't save an existing group with this method."); @@ -1221,7 +1209,7 @@ /// <exception cref="System.InvalidOperationException">Changes to the group are not permitted.</exception> /// <exception cref="System.ArgumentException">The user is invalid.</exception> public void DeleteGroup(int groupId) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { using (ITransaction tx = session.BeginTransaction()) { LocalStoreGroup group = session.Load<LocalStoreGroup>(groupId); session.Delete(group); @@ -1240,7 +1228,7 @@ /// <param name="group">The updated group.</param> /// <returns>The result of the attempt to update the group.</returns> public void UpdateGroup(LocalStoreGroup group) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { using (ITransaction tx = session.BeginTransaction()) { // Check if any other group with the same name exists in the system IList<LocalStoreUser> existing = session.CreateCriteria(typeof(LocalStoreGroup)) @@ -1330,7 +1318,7 @@ /// <param name="folder">The Id of the folder to set the ACE on.</param> /// <param name="ace">The privileges and the identifier to put.</param> public void SetStoreFolderAce(int folderId, GenericAce<StoreFolderPrivilege> ace) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { using (ITransaction tx = session.BeginTransaction()) { SetStoreFolderAce(folderId, ace, session); @@ -1376,7 +1364,7 @@ /// <param name="folderId">The Id of the folder to remove the ACE from.</param> /// <param name="identifier">The identifier to remove from the ACL.</param> public void RemoveStoreFolderAce(int folderId, string identifier) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { using (ITransaction tx = session.BeginTransaction()) { IList<InternalStoreFolderAcl> current = session.CreateCriteria(typeof(InternalStoreFolderAcl)) .CreateCriteria("Folder") @@ -1409,7 +1397,7 @@ /// <param name="folderId">The Id of the folder to get the ACL for.</param> /// <returns>The folder ACL.</returns> public StoreFolderAcl GetStoreFolderAcl(int folderId) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { IList<InternalStoreFolderAcl> current = session.CreateCriteria(typeof(InternalStoreFolderAcl)) .CreateCriteria("Folder") .Add(Expression.Eq("FolderId", folderId)) @@ -1434,7 +1422,7 @@ /// </summary> /// <returns>The mail domains.</returns> public IList<MailDomain> GetMailDomains() { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { return session.CreateCriteria(typeof(MailDomain)).List<MailDomain>(); } } @@ -1446,7 +1434,7 @@ /// </summary> /// <param name="mailDomain">The mail domain to create.</param> public void CreateMailDomain(MailDomain mailDomain) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { using (ITransaction tx = session.BeginTransaction()) { if (mailDomain.MailDomainId != 0) { throw new InvalidOperationException("Can't save an existing mail domain with this method."); @@ -1477,7 +1465,7 @@ /// <param name="mailDomainId">The Id of the mail domain to delete.</param> /// <returns>The result of the attempt to delete the domain.</returns> public void DeleteMailDomain(int mailDomainId) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { using (ITransaction tx = session.BeginTransaction()) { MailDomain mailDomain = session.Load<MailDomain>(mailDomainId); session.Delete(mailDomain); @@ -1496,7 +1484,7 @@ /// <param name="updatedMailDomain">The updated mail domain.</param> /// <returns>The result of the attempt to update the mail domain.</returns> public void UpdateMailDomain(MailDomain updatedMailDomain) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { using (ITransaction tx = session.BeginTransaction()) { // Check if any other group with the same name exists in the system IList<MailDomain> existing = session.CreateCriteria(typeof(MailDomain)) @@ -1524,7 +1512,7 @@ /// </summary> /// <param name="ace">The privileges and the identifier to put.</param> public void SetSystemPrivilegeAce(GenericAce<SystemPrivilege> ace) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { using (ITransaction tx = session.BeginTransaction()) { InternalSystemAce systemAce = session.CreateCriteria(typeof(InternalSystemAce)) .Add(Expression.Eq("Identifier", ace.Identifier)) @@ -1551,7 +1539,7 @@ /// </summary> /// <param name="identifier">The identifier to remove from the ACL.</param> public void RemoveSystemPrivilegeAce(string identifier) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { using (ITransaction tx = session.BeginTransaction()) { IList<InternalSystemAce> systemAcl = session.CreateCriteria(typeof(InternalSystemAce)) .Add(Expression.Eq("Identifier", identifier)) @@ -1572,7 +1560,7 @@ /// </summary> /// <returns>The system ACL.</returns> public GenericAcl<SystemPrivilege> GetSystemPrivilegeAcl() { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { IList<InternalSystemAce> systemAcl = session.CreateCriteria(typeof(InternalSystemAce)) .List<InternalSystemAce>(); @@ -1588,7 +1576,7 @@ #endregion public void SaveCalandar(Calendar calendar) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { using (ITransaction tx = session.BeginTransaction()) { if (calendar.CalendarId == 0) { // Check if any other calendars with the same name exists in this folder @@ -1614,7 +1602,7 @@ } public Calendar GetCalandar(string name, int parentFolderId) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { ICriteria criteria = session.CreateCriteria(typeof(Calendar)); criteria.Add(Expression.Like("Name", name)); criteria.Add(Expression.Eq("ParentFolderId", parentFolderId)); @@ -1625,19 +1613,19 @@ } public Calendar GetCalandar(int calendarId) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { return (Calendar) session.Load(typeof(Calendar), calendarId); } } public void DeleteCalandar(int calendarId) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { session.Delete("from Calendar as cal where cal.CalendarId = ?", calendarId, NHibernateUtil.Int32); } } public void SaveCalendarEntry(CalendarEntry entry) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { // Update the entry's change management fields entry.LastModified = DateTime.Now; entry.Sequence++; @@ -1649,13 +1637,13 @@ } public CalendarEntry GetCalendarEntry(int entryId) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { return (CalendarEntry) session.Load(typeof(CalendarEntry), entryId); } } public IList<CalendarEntry> GetCalendarEntries(DateTime startTime, DateTime endTime, int calendarId) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { ICriteria criteria = session.CreateCriteria(typeof(CalendarEntry)); criteria.Add(Expression.Eq("CalendarId", calendarId)); criteria.Add(Expression.Ge("StartTime", startTime)); @@ -1673,7 +1661,7 @@ } public void DeleteCalendarEntry(int entryId) { - using (ISession session = this.hibernateFactory.OpenSession()) { + using (ISession session = NHibernateHelper.Factory.OpenSession()) { session.Delete("from CalendarEntry as calE where calE.EntryId = ?", entryId, NHibernateUtil.Int64); } } @@ -1685,7 +1673,7 @@ /// disabling this command. /// </summary> public void ReinstallSchema() { - new global::NHibernate.Tool.hbm2ddl.SchemaExport(this.hibernateCfg).Create(false, true); + new global::NHibernate.Tool.hbm2ddl.SchemaExport(NHibernateHelper.Configuration).Create(false, true); LocalStoreUser administrator = new LocalStoreUser(); administrator.Username = "Administrator"; // TODO: get from a global admin name or something Modified: NMail/trunk/NMail.LocalStoreData.NHibernate/NMail.LocalStoreData.NHibernate.csproj =================================================================== --- NMail/trunk/NMail.LocalStoreData.NHibernate/NMail.LocalStoreData.NHibernate.csproj 2007-04-30 08:59:18 UTC (rev 187) +++ NMail/trunk/NMail.LocalStoreData.NHibernate/NMail.LocalStoreData.NHibernate.csproj 2007-05-01 13:46:57 UTC (rev 188) @@ -47,6 +47,7 @@ </ItemGroup> <ItemGroup> <Compile Include="AuthenticationUser.cs" /> + <Compile Include="Configuration.cs" /> <Compile Include="InternalSystemAce.cs" /> <Compile Include="InternalUserObject.cs" /> <Compile Include="FolderSubscription.cs" /> @@ -54,12 +55,15 @@ <Compile Include="InternalStoreFolder.cs" /> <Compile Include="InternalStoreFolderAcl.cs" /> <Compile Include="NHibernateAuthProvider.cs" /> + <Compile Include="NHibernateHelper.cs" /> <Compile Include="NHibernateLocalStoreData.cs" /> <Compile Include="NHibernateUserMap.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> <ItemGroup> - <EmbeddedResource Include="hibernate-configuration.xml" /> + <Content Include="hibernate-localstore-configuration.xml"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </Content> </ItemGroup> <ItemGroup> <ProjectReference Include="..\NMail\NMail.csproj"> Deleted: NMail/trunk/NMail.LocalStoreData.NHibernate/hibernate-configuration.xml =================================================================== --- NMail/trunk/NMail.LocalStoreData.NHibernate/hibernate-configuration.xml 2007-04-30 08:59:18 UTC (rev 187) +++ NMail/trunk/NMail.LocalStoreData.NHibernate/hibernate-configuration.xml 2007-05-01 13:46:57 UTC (rev 188) @@ -1,10 +0,0 @@ -\xEF\xBB\xBF<?xml version="1.0" encoding="utf-8" ?> -<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"> - <session-factory> - <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property> - <property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property> - <property name="connection.connection_string">Data Source=127.0.0.1;Initial Catalog=NMailLocalStore;Integrated Security=True</property> - <property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property> - <property name="hibernate.query.substitutions">true 1, false 0</property> - </session-factory> -</hibernate-configuration> Added: NMail/trunk/NMail.LocalStoreData.NHibernate/hibernate-localstore-configuration.xml =================================================================== --- NMail/trunk/NMail.LocalStoreData.NHibernate/hibernate-localstore-configuration.xml (rev 0) +++ NMail/trunk/NMail.LocalStoreData.NHibernate/hibernate-localstore-configuration.xml 2007-05-01 13:46:57 UTC (rev 188) @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8" ?> +<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"> + <session-factory> + <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property> + <property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property> + <property name="connection.connection_string">Data Source=127.0.0.1;Initial Catalog=NMailLocalStore;Integrated Security=True</property> + <property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property> + <property name="hibernate.query.substitutions">true 1, false 0</property> + </session-factory> +</hibernate-configuration> Modified: NMail/trunk/NMail.Server.Console/NMail.Server.Console.csproj =================================================================== --- NMail/trunk/NMail.Server.Console/NMail.Server.Console.csproj 2007-04-30 08:59:18 UTC (rev 187) +++ NMail/trunk/NMail.Server.Console/NMail.Server.Console.csproj 2007-05-01 13:46:57 UTC (rev 188) @@ -172,7 +172,6 @@ </ProjectReference> </ItemGroup> <ItemGroup> - <Content Include="oldconfig.xml" /> <None Include="NMail.config"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> Modified: NMail/trunk/NMail.Server.Console/NMail.config =================================================================== --- NMail/trunk/NMail.Server.Console/NMail.config 2007-04-30 08:59:18 UTC (rev 187) +++ NMail/trunk/NMail.Server.Console/NMail.config 2007-05-01 13:46:57 UTC (rev 188) @@ -12,6 +12,8 @@ <section name="NMail.SpoolData.MySql" type="NMail.SpoolData.MySql.Configuration.MySqlSpoolDataConfiguration, NMail.SpoolData.MySql" /> <section name="NMail.MessageRouter" type="NMail.MessageRouter.Configuration.MessageRouterConfiguration, NMail.MessageRouter" /> <section name="NMail.LocalStoreData.MySql" type="NMail.LocalStoreData.MySql.Configuration.MySqlLocalStoreDataConfiguration, NMail.LocalStoreData.MySql" /> + <section name="NMail.LocalStoreData.NHibernate" type="NMail.LocalStoreData.NHibernate.Configuration, NMail.LocalStoreData.NHibernate" /> + <section name="NMail.SpoolData.NHibernate" type="NMail.SpoolData.NHibernate.Configuration, NMail.SpoolData.NHibernate" /> </configSections> <NMail> @@ -95,4 +97,8 @@ <NMail.SpoolData.MySql ConnectionString="Database=NMailSpool;Uid=NMail;Password=moo" /> <NMail.LocalStoreData.MySql ConnectionString="Database=NMailLocalStore;Uid=NMail;Password=moo"/> + + <NMail.LocalStoreData.NHibernate NHibernateCfgFile="hibernate-localstore-configuration.xml"/> + + <NMail.SpoolData.NHibernate NHibernateCfgFile="hibernate-spool-configuration.xml"/> </configuration> Deleted: NMail/trunk/NMail.Server.Console/oldconfig.xml =================================================================== --- NMail/trunk/NMail.Server.Console/oldconfig.xml 2007-04-30 08:59:18 UTC (rev 187) +++ NMail/trunk/NMail.Server.Console/oldconfig.xml 2007-05-01 13:46:57 UTC (rev 188) @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<configuration> - <nmail.messagerouter> - <settings visibleHost="localhost.local"/> - <settings warnTemplateFile="warning.txt"/> - <settings bounceTemplateFile="bounce.txt"/> - </nmail.messagerouter> - - <nmail.localstore> - <defaultValidator name="onWhiteList" type="NMail.LocalStore.Validators.OnWhiteList, NMail.LocalStore"> - - <failValidator name="sender" type="NMail.LocalStore.Validators.AddressSender, NMail.LocalStore"> - - <failValidator name="date" type="NMail.LocalStore.Validators.AddressDate, NMail.LocalStore"> - - <failValidator name="keyword" type="NMail.LocalStore.Validators.AddressKeyword, NMail.LocalStore"> - - <failValidator name="blackList" type="NMail.LocalStore.Validators.OrdbBlackList, NMail.LocalStore"> - <settings server="relays.ordb.org"/> - </failValidator> - </failValidator> - </failValidator> - </failValidator> - </defaultValidator> - </nmail.localstore> -</configuration> Added: NMail/trunk/NMail.SpoolData.NHibernate/Configuration.cs =================================================================== --- NMail/trunk/NMail.SpoolData.NHibernate/Configuration.cs (rev 0) +++ NMail/trunk/NMail.SpoolData.NHibernate/Configuration.cs 2007-05-01 13:46:57 UTC (rev 188) @@ -0,0 +1,69 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Text; + +using NMail.Configuration; + +namespace NMail.SpoolData.NHibernate { + /// <summary> + /// Provides configuration settings for the NHibernate spool data implementation. + /// </summary> + public class Configuration : ConfigurationSection { + /// <summary> + /// Adds a NHibernate spool data configuration section to the current config file. + /// </summary> + public static void AddToConfigFile() { + if (NMailConfigFile.Current.Sections["NMail.SpoolData.NHibernate"] == null) { + NMailConfigFile.Current.Sections.Add("NMail.SpoolData.NHibernate", new Configuration()); + } + } + + /// <summary> + /// Remove the config section from the config file. + /// </summary> + public static void RemoveFromConfigFile() { + if (NMailConfigFile.Current.Sections["NMail.SpoolData.NHibernate"] != null) { + NMailConfigFile.Current.Sections.Remove("NMail.SpoolData.NHibernate"); + } + } + + /// <summary> + /// Returns true if a NHibernate spool data configuration section exists in the current + /// configuration. + /// </summary> + public static bool ConfigurationPresent { + get { + return (NMailConfigFile.Current.Sections["NMail.SpoolData.NHibernate"] != null); + } + } + + /// <summary> + /// The current configuration in use. + /// </summary> + public static Configuration Current { + get { + Configuration current; + current = (Configuration) NMailConfigFile.Current.GetSection("NMail.SpoolData.NHibernate"); + + if (current == null) { + throw new ConfigurationErrorsException("NMail NHibernate spool data configuration is missing"); + } + return current; + } + } + + /// <summary> + /// The file containing the actual NHibernate configuration. + /// </summary> + [ConfigurationProperty("NHibernateCfgFile", IsRequired = true)] + public string ConfigurationFile { + get { + return (string) this["NHibernateCfgFile"]; + } + set { + this["NHibernateCfgFile"] = value; + } + } + } +} Modified: NMail/trunk/NMail.SpoolData.NHibernate/NHibernateSpoolData.cs =================================================================== --- NMail/trunk/NMail.SpoolData.NHibernate/NHibernateSpoolData.cs 2007-04-30 08:59:18 UTC (rev 187) +++ NMail/trunk/NMail.SpoolData.NHibernate/NHibernateSpoolData.cs 2007-05-01 13:46:57 UTC (rev 188) @@ -43,7 +43,7 @@ public NHibernateSpoolData() { this.hibernateCfg = new global::NHibernate.Cfg.Configuration(); - this.hibernateCfg.Configure(System.Reflection.Assembly.GetExecutingAssembly(), "NMail.SpoolData.NHibernate.hibernate-configuration.xml"); + this.hibernateCfg.Configure(NMail.SpoolData.NHibernate.Configuration.Current.ConfigurationFile); this.hibernateCfg.AddAssembly("NMail.SpoolData.NHibernate"); this.hibernateFactory = this.hibernateCfg.BuildSessionFactory(); Modified: NMail/trunk/NMail.SpoolData.NHibernate/NMail.SpoolData.NHibernate.csproj =================================================================== --- NMail/trunk/NMail.SpoolData.NHibernate/NMail.SpoolData.NHibernate.csproj 2007-04-30 08:59:18 UTC (rev 187) +++ NMail/trunk/NMail.SpoolData.NHibernate/NMail.SpoolData.NHibernate.csproj 2007-05-01 13:46:57 UTC (rev 188) @@ -41,10 +41,12 @@ <HintPath>..\References\nhibernate\NHibernate.dll</HintPath> </Reference> <Reference Include="System" /> + <Reference Include="System.configuration" /> <Reference Include="System.Data" /> <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> + <Compile Include="Configuration.cs" /> <Compile Include="NHibernateSpoolData.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> @@ -55,7 +57,9 @@ </ProjectReference> </ItemGroup> <ItemGroup> - <EmbeddedResource Include="hibernate-configuration.xml" /> + <Content Include="hibernate-spool-configuration.xml"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </Content> </ItemGroup> <ItemGroup> <EmbeddedResource Include="NMail.SpoolData.NHibernate.hbm.xml" /> Deleted: NMail/trunk/NMail.SpoolData.NHibernate/hibernate-configuration.xml =================================================================== --- NMail/trunk/NMail.SpoolData.NHibernate/hibernate-configuration.xml 2007-04-30 08:59:18 UTC (rev 187) +++ NMail/trunk/NMail.SpoolData.NHibernate/hibernate-configuration.xml 2007-05-01 13:46:57 UTC (rev 188) @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"> - <session-factory> - <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property> - <property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property> - <property name="connection.connection_string">Data Source=127.0.0.1;Initial Catalog=NMailSpool;Integrated Security=True</property> - <property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property> - <property name="hibernate.query.substitutions">true 1, false 0</property> - </session-factory> -</hibernate-configuration> Added: NMail/trunk/NMail.SpoolData.NHibernate/hibernate-spool-configuration.xml =================================================================== --- NMail/trunk/NMail.SpoolData.NHibernate/hibernate-spool-configuration.xml (rev 0) +++ NMail/trunk/NMail.SpoolData.NHibernate/hibernate-spool-configuration.xml 2007-05-01 13:46:57 UTC (rev 188) @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8" ?> +<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"> + <session-factory> + <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property> + <property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property> + <property name="connection.connection_string">Data Source=127.0.0.1;Initial Catalog=NMailSpool;Integrated Security=True</property> + <property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property> + <property name="hibernate.query.substitutions">true 1, false 0</property> + </session-factory> +</hibernate-configuration> Added: NMail/trunk/NMail.UnitTests/LocalStoreData/GetSetRemoveSystemAceTest1.cs =================================================================== --- NMail/trunk/NMail.UnitTests/LocalStoreData/GetSetRemoveSystemAceTest1.cs (rev 0) +++ NMail/trunk/NMail.UnitTests/LocalStoreData/GetSetRemoveSystemAceTest1.cs 2007-05-01 13:46:57 UTC (rev 188) @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Text; + +using NUnit.Framework; + +using NMail.Configuration; +using NMail.DataTypes.ACLs; +using NMail.DataTypes.LocalStore; + +namespace NMail.UnitTests.LocalStoreData { + /// <summary> + /// Tests getting/settting/removing system ACEs. + /// </summary> + [TestFixture] + public class GetSetRemoveSystemAceTest1 : BaseLocalStoreDataTest { + + [Test] + public void TestSystemAce() { + GenericAce<SystemPrivilege> ace1 = new GenericAce<SystemPrivilege>(); + ace1.Identifier = "Test"; + ace1.AceType = AcePrivilegeType.Allow; + ace1.Privilege = SystemPrivilege.CreateMailDomain; + this.localStoreData.SetSystemPrivilegeAce(ace1); + + GenericAcl<SystemPrivilege> acl1 = this.localStoreData.GetSystemPrivilegeAcl(); + Assert.IsTrue(acl1.Count > 0, "Valid ACL entry count 1."); + Assert.AreEqual(SystemPrivilege.CreateMailDomain, acl1["Test"].Privilege, "acl[\"Test\"].Priv == CreateMailDomain."); + Assert.AreEqual(AcePrivilegeType.Allow, acl1["Test"].AceType, "acl[\"Test\"].PrivType == Allow."); + + this.localStoreData.RemoveSystemPrivilegeAce("Test"); + + GenericAcl<SystemPrivilege> acl2 = this.localStoreData.GetSystemPrivilegeAcl(); + Assert.IsNull(acl2["Test"], "acl[\"Test\"] is null"); + } + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tmy...@us...> - 2007-05-27 13:42:04
|
Revision: 206 http://svn.sourceforge.net/nmailserver/?rev=206&view=rev Author: tmyroadctfig Date: 2007-05-27 06:42:04 -0700 (Sun, 27 May 2007) Log Message: ----------- Work on the mail domain manager. Also added auth prompt. Modified Paths: -------------- NMail/trunk/NMail.Administration.WinForms/MainForm.cs NMail/trunk/NMail.Administration.WinForms/NMail.Administration.WinForms.csproj NMail/trunk/NMail.Administration.WinForms/Program.cs NMail/trunk/NMail.Icons/NMail.Icons.csproj Added Paths: ----------- NMail/trunk/NMail.Administration.WinForms/AuthenticationPrompt.Designer.cs NMail/trunk/NMail.Administration.WinForms/AuthenticationPrompt.cs NMail/trunk/NMail.Administration.WinForms/AuthenticationPrompt.resx NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainManager.Designer.cs NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainManager.cs NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainManager.resx NMail/trunk/NMail.Icons/Resources/32x32/apps/password.png Added: NMail/trunk/NMail.Administration.WinForms/AuthenticationPrompt.Designer.cs =================================================================== --- NMail/trunk/NMail.Administration.WinForms/AuthenticationPrompt.Designer.cs (rev 0) +++ NMail/trunk/NMail.Administration.WinForms/AuthenticationPrompt.Designer.cs 2007-05-27 13:42:04 UTC (rev 206) @@ -0,0 +1,136 @@ +namespace NMail.Administration.WinForms { + partial class AuthenticationPrompt { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) { + if (disposing && (components != null)) { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() { + this.cancelButton = new System.Windows.Forms.Button(); + this.okButton = new System.Windows.Forms.Button(); + this.passwordTextBox = new System.Windows.Forms.TextBox(); + this.userNameTextBox = new System.Windows.Forms.TextBox(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.usernameLabel = new System.Windows.Forms.Label(); + this.passwordLabel = new System.Windows.Forms.Label(); + ((System.ComponentModel.ISupportInitialize) (this.pictureBox1)).BeginInit(); + this.SuspendLayout(); + // + // cancelButton + // + this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.cancelButton.Location = new System.Drawing.Point(172, 79); + this.cancelButton.Name = "cancelButton"; + this.cancelButton.Size = new System.Drawing.Size(75, 23); + this.cancelButton.TabIndex = 9; + this.cancelButton.Text = "Cancel"; + this.cancelButton.UseVisualStyleBackColor = true; + this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click); + // + // okButton + // + this.okButton.Location = new System.Drawing.Point(91, 79); + this.okButton.Name = "okButton"; + this.okButton.Size = new System.Drawing.Size(75, 23); + this.okButton.TabIndex = 8; + this.okButton.Text = "Ok"; + this.okButton.UseVisualStyleBackColor = true; + this.okButton.Click += new System.EventHandler(this.okButton_Click); + // + // passwordTextBox + // + this.passwordTextBox.Location = new System.Drawing.Point(115, 53); + this.passwordTextBox.Name = "passwordTextBox"; + this.passwordTextBox.PasswordChar = '*'; + this.passwordTextBox.Size = new System.Drawing.Size(132, 20); + this.passwordTextBox.TabIndex = 7; + this.passwordTextBox.UseSystemPasswordChar = true; + // + // userNameTextBox + // + this.userNameTextBox.Location = new System.Drawing.Point(115, 27); + this.userNameTextBox.Name = "userNameTextBox"; + this.userNameTextBox.Size = new System.Drawing.Size(132, 20); + this.userNameTextBox.TabIndex = 6; + // + // pictureBox1 + // + this.pictureBox1.Location = new System.Drawing.Point(12, 12); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(32, 32); + this.pictureBox1.TabIndex = 5; + this.pictureBox1.TabStop = false; + // + // usernameLabel + // + this.usernameLabel.AutoSize = true; + this.usernameLabel.Location = new System.Drawing.Point(51, 30); + this.usernameLabel.Name = "usernameLabel"; + this.usernameLabel.Size = new System.Drawing.Size(58, 13); + this.usernameLabel.TabIndex = 10; + this.usernameLabel.Text = "Username:"; + // + // passwordLabel + // + this.passwordLabel.AutoSize = true; + this.passwordLabel.Location = new System.Drawing.Point(53, 56); + this.passwordLabel.Name = "passwordLabel"; + this.passwordLabel.Size = new System.Drawing.Size(56, 13); + this.passwordLabel.TabIndex = 11; + this.passwordLabel.Text = "Password:"; + // + // AuthenticationPrompt + // + this.AcceptButton = this.okButton; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.cancelButton; + this.ClientSize = new System.Drawing.Size(259, 112); + this.Controls.Add(this.passwordLabel); + this.Controls.Add(this.usernameLabel); + this.Controls.Add(this.cancelButton); + this.Controls.Add(this.okButton); + this.Controls.Add(this.passwordTextBox); + this.Controls.Add(this.userNameTextBox); + this.Controls.Add(this.pictureBox1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "AuthenticationPrompt"; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Enter your details"; + ((System.ComponentModel.ISupportInitialize) (this.pictureBox1)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button cancelButton; + private System.Windows.Forms.Button okButton; + private System.Windows.Forms.TextBox passwordTextBox; + private System.Windows.Forms.TextBox userNameTextBox; + private System.Windows.Forms.PictureBox pictureBox1; + private System.Windows.Forms.Label usernameLabel; + private System.Windows.Forms.Label passwordLabel; + } +} \ No newline at end of file Added: NMail/trunk/NMail.Administration.WinForms/AuthenticationPrompt.cs =================================================================== --- NMail/trunk/NMail.Administration.WinForms/AuthenticationPrompt.cs (rev 0) +++ NMail/trunk/NMail.Administration.WinForms/AuthenticationPrompt.cs 2007-05-27 13:42:04 UTC (rev 206) @@ -0,0 +1,58 @@ +/* + * 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.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +using NMail.Icons; + +namespace NMail.Administration.WinForms { + public partial class AuthenticationPrompt : Form { + public AuthenticationPrompt() { + InitializeComponent(); + + this.pictureBox1.Image = IconHelper.GetImage("password", "apps", IconSize.s32x32); + } + + private void cancelButton_Click(object sender, EventArgs e) { + this.DialogResult = DialogResult.Cancel; + this.Close(); + } + + private void okButton_Click(object sender, EventArgs e) { + this.DialogResult = DialogResult.OK; + this.Close(); + } + + public string Username { + get { + return this.userNameTextBox.Text; + } + } + + public string Password { + get { + return this.passwordTextBox.Text; + } + } + } +} \ No newline at end of file Added: NMail/trunk/NMail.Administration.WinForms/AuthenticationPrompt.resx =================================================================== --- NMail/trunk/NMail.Administration.WinForms/AuthenticationPrompt.resx (rev 0) +++ NMail/trunk/NMail.Administration.WinForms/AuthenticationPrompt.resx 2007-05-27 13:42:04 UTC (rev 206) @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file Added: NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainManager.Designer.cs =================================================================== --- NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainManager.Designer.cs (rev 0) +++ NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainManager.Designer.cs 2007-05-27 13:42:04 UTC (rev 206) @@ -0,0 +1,116 @@ +namespace NMail.Administration.WinForms.MailDomain { + partial class MailDomainManager { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) { + if (disposing && (components != null)) { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() { + this.mainDomainsListView = new System.Windows.Forms.ListView(); + this.idColumnHeader = new System.Windows.Forms.ColumnHeader(); + this.primaryHostColumnHeader = new System.Windows.Forms.ColumnHeader(); + this.secondaryColumnHeader = new System.Windows.Forms.ColumnHeader(); + this.editColumnHeader = new System.Windows.Forms.ColumnHeader(); + this.bottomPanel = new System.Windows.Forms.Panel(); + this.refreshButton = new System.Windows.Forms.Button(); + this.bottomPanel.SuspendLayout(); + this.SuspendLayout(); + // + // mainDomainsListView + // + this.mainDomainsListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.idColumnHeader, + this.primaryHostColumnHeader, + this.secondaryColumnHeader, + this.editColumnHeader}); + this.mainDomainsListView.Dock = System.Windows.Forms.DockStyle.Fill; + this.mainDomainsListView.FullRowSelect = true; + this.mainDomainsListView.GridLines = true; + this.mainDomainsListView.HideSelection = false; + this.mainDomainsListView.Location = new System.Drawing.Point(0, 0); + this.mainDomainsListView.Name = "mainDomainsListView"; + this.mainDomainsListView.Size = new System.Drawing.Size(620, 369); + this.mainDomainsListView.TabIndex = 1; + this.mainDomainsListView.UseCompatibleStateImageBehavior = false; + this.mainDomainsListView.View = System.Windows.Forms.View.Details; + // + // idColumnHeader + // + this.idColumnHeader.Text = "ID"; + this.idColumnHeader.Width = 45; + // + // primaryHostColumnHeader + // + this.primaryHostColumnHeader.Text = "Primary Host"; + this.primaryHostColumnHeader.Width = 81; + // + // secondaryColumnHeader + // + this.secondaryColumnHeader.Text = "Additional Hosts"; + this.secondaryColumnHeader.Width = 188; + // + // editColumnHeader + // + this.editColumnHeader.Text = "Edit"; + // + // bottomPanel + // + this.bottomPanel.Controls.Add(this.refreshButton); + this.bottomPanel.Dock = System.Windows.Forms.DockStyle.Bottom; + this.bottomPanel.Location = new System.Drawing.Point(0, 369); + this.bottomPanel.Name = "bottomPanel"; + this.bottomPanel.Size = new System.Drawing.Size(620, 39); + this.bottomPanel.TabIndex = 2; + // + // refreshButton + // + this.refreshButton.Location = new System.Drawing.Point(4, 7); + this.refreshButton.Name = "refreshButton"; + this.refreshButton.Size = new System.Drawing.Size(75, 23); + this.refreshButton.TabIndex = 0; + this.refreshButton.Text = "Refresh"; + this.refreshButton.UseVisualStyleBackColor = true; + this.refreshButton.Click += new System.EventHandler(this.refreshButton_Click); + // + // MailDomainManager + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.mainDomainsListView); + this.Controls.Add(this.bottomPanel); + this.Name = "MailDomainManager"; + this.Size = new System.Drawing.Size(620, 408); + this.bottomPanel.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.ListView mainDomainsListView; + private System.Windows.Forms.ColumnHeader idColumnHeader; + private System.Windows.Forms.ColumnHeader primaryHostColumnHeader; + private System.Windows.Forms.ColumnHeader secondaryColumnHeader; + private System.Windows.Forms.ColumnHeader editColumnHeader; + private System.Windows.Forms.Panel bottomPanel; + private System.Windows.Forms.Button refreshButton; + + } +} Added: NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainManager.cs =================================================================== --- NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainManager.cs (rev 0) +++ NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainManager.cs 2007-05-27 13:42:04 UTC (rev 206) @@ -0,0 +1,57 @@ +/* + * 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.ComponentModel; +using System.Drawing; +using System.Data; +using System.Text; +using System.Windows.Forms; + +using NMail.DataTypes.LocalStore; + +namespace NMail.Administration.WinForms.MailDomain { + public partial class MailDomainManager : UserControl { + public MailDomainManager(MainForm mainForm) { + InitializeComponent(); + + this.mainForm = mainForm; + } + + MainForm mainForm; + + private void refreshButton_Click(object sender, EventArgs e) { + try { + // Get a list of mail domains + ILocalStore localStore = this.mainForm.RemoteAdministration.NMailServer.LocalStore; + IList<NMail.DataTypes.LocalStore.MailDomain> mailDomains = localStore.GetMailDomains(this.mainForm.AuthenticationToken); + + this.mainDomainsListView.Items.Clear(); + + // Add them to the list view + foreach (NMail.DataTypes.LocalStore.MailDomain mailDomain in mailDomains) { + + } + + } catch (Exception ex) { + // Something bad :( + Program.ShowExceptionDialog(ex); + } + } + } +} Added: NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainManager.resx =================================================================== --- NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainManager.resx (rev 0) +++ NMail/trunk/NMail.Administration.WinForms/MailDomain/MailDomainManager.resx 2007-05-27 13:42:04 UTC (rev 206) @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file Modified: NMail/trunk/NMail.Administration.WinForms/MainForm.cs =================================================================== --- NMail/trunk/NMail.Administration.WinForms/MainForm.cs 2007-05-27 13:41:01 UTC (rev 205) +++ NMail/trunk/NMail.Administration.WinForms/MainForm.cs 2007-05-27 13:42:04 UTC (rev 206) @@ -34,6 +34,7 @@ using log4net; using WeifenLuo.WinFormsUI.Docking; +using NMail.Authentication; using NMail.Icons; using NMail.Server; @@ -52,6 +53,7 @@ InitialiseStatusBrowser(); InitialiseManagementTree(); InitialiseServicesViewer(); + InitialiseMailDomainManager(); this.connectionStatusLbl.Image = IconHelper.GetImage("connect_no", "actions", IconSize.s16x16); this.connectMenuItem.Image = IconHelper.GetImage("connect_no", "actions", IconSize.s16x16); @@ -78,8 +80,53 @@ /// </summary> public RemoteAdministration RemoteAdministration { get { return remoteAdministration; } - } + } + IAuthenticationToken authToken; + + /// <summary> + /// The current authentication token. + /// </summary> + public IAuthenticationToken AuthenticationToken { + get { + if (this.remoteAdministration == null) { + // No point continuing if we're not connected... + return null; + } + + AuthenticationPrompt authPrompt = new AuthenticationPrompt(); + + while (this.authToken == null) { + // Show the auth prompt + if (authPrompt.ShowDialog() != DialogResult.OK) { + break; + } + + // Attempt to authenticate + try { + IAuthenticationProvider authProvider = remoteAdministration.NMailServer.AuthenticationProvider; + this.authToken = authProvider.Authenticate(authPrompt.Username, authPrompt.Password); + + if (authToken == null) { + // Auth failed + MessageBox.Show( + this, + "Invalid username or password.", + "Authentication Failed", + MessageBoxButtons.OK, + MessageBoxIcon.Exclamation); + } + + } catch (Exception ex) { + // Something went wrong... :( + Program.ShowExceptionDialog(ex); + } + } + + return this.authToken; + } + } + #region Connect /// <summary> /// Returns true if remote server is connected. @@ -181,6 +228,7 @@ } else { this.remoteAdministration = null; + this.authToken = null; UpdateConnectionStatus(); ShowStatusBrowser(); } @@ -198,6 +246,7 @@ } else { this.remoteAdministration = null; + this.authToken = null; UpdateConnectionStatus(); // Update status browser @@ -337,8 +386,45 @@ public void ShowSpoolControl() { } + #region Mail Domain Manager + /// <summary> + /// The mail domain manager. + /// </summary> + MailDomain.MailDomainManager mailDomainManager; + + DockContent mailDomainManagerDock; + + protected void InitialiseMailDomainManager() { + this.mailDomainManager = new MailDomain.MailDomainManager(this); + this.mailDomainManager.Dock = DockStyle.Fill; + + mailDomainManagerDock = new DockContent(); + mailDomainManagerDock.Controls.Add(this.mailDomainManager); + mailDomainManagerDock.Text = "Mail Domains"; + mailDomainManagerDock.DockPanel = this.dockPanel; + mailDomainManagerDock.DockState = DockState.Hidden; + mailDomainManagerDock.Icon = IconHelper.GetIcon("server", "actions", IconSize.s16x16); + mailDomainManagerDock.FormClosing += new FormClosingEventHandler(mailDomainManagerDock_FormClosing); + } + + void mailDomainManagerDock_FormClosing(object sender, FormClosingEventArgs e) { + if (e.CloseReason == CloseReason.UserClosing) { + e.Cancel = true; + + this.mailDomainManagerDock.DockState = DockState.Hidden; + } + } + public void ShowMailDomainControl() { + if (!Connected) { + ShowStatusBrowser(); + + } else { + this.mailDomainManagerDock.DockState = DockState.Document; + this.mailDomainManagerDock.DockHandler.DockTo(this.dockPanel.DockWindows[DockState.Document].NestedPanes[0], DockStyle.Fill, 0); + } } + #endregion public void ShowUsersControl() { } Modified: NMail/trunk/NMail.Administration.WinForms/NMail.Administration.WinForms.csproj =================================================================== --- NMail/trunk/NMail.Administration.WinForms/NMail.Administration.WinForms.csproj 2007-05-27 13:41:01 UTC (rev 205) +++ NMail/trunk/NMail.Administration.WinForms/NMail.Administration.WinForms.csproj 2007-05-27 13:42:04 UTC (rev 206) @@ -49,6 +49,12 @@ </Reference> </ItemGroup> <ItemGroup> + <Compile Include="AuthenticationPrompt.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="AuthenticationPrompt.Designer.cs"> + <DependentUpon>AuthenticationPrompt.cs</DependentUpon> + </Compile> <Compile Include="ConnectForm.cs"> <SubType>Form</SubType> </Compile> @@ -61,6 +67,12 @@ <Compile Include="ExceptionDialog.Designer.cs"> <DependentUpon>ExceptionDialog.cs</DependentUpon> </Compile> + <Compile Include="MailDomain\MailDomainManager.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Include="MailDomain\MailDomainManager.Designer.cs"> + <DependentUpon>MailDomainManager.cs</DependentUpon> + </Compile> <Compile Include="MainForm.cs"> <SubType>Form</SubType> </Compile> @@ -75,6 +87,10 @@ </Compile> <Compile Include="Program.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> + <EmbeddedResource Include="AuthenticationPrompt.resx"> + <SubType>Designer</SubType> + <DependentUpon>AuthenticationPrompt.cs</DependentUpon> + </EmbeddedResource> <EmbeddedResource Include="ConnectForm.resx"> <DependentUpon>ConnectForm.cs</DependentUpon> <SubType>Designer</SubType> @@ -83,6 +99,10 @@ <SubType>Designer</SubType> <DependentUpon>ExceptionDialog.cs</DependentUpon> </EmbeddedResource> + <EmbeddedResource Include="MailDomain\MailDomainManager.resx"> + <SubType>Designer</SubType> + <DependentUpon>MailDomainManager.cs</DependentUpon> + </EmbeddedResource> <EmbeddedResource Include="MainForm.resx"> <SubType>Designer</SubType> <DependentUpon>MainForm.cs</DependentUpon> @@ -171,10 +191,11 @@ <Project>{45123319-D913-4A92-BB67-C2C9E1A22A17}</Project> <Name>NMail.Server</Name> </ProjectReference> + <ProjectReference Include="..\NMail\NMail.csproj"> + <Project>{5A5A5012-B157-49B1-A35F-67EC9680112A}</Project> + <Name>NMail</Name> + </ProjectReference> </ItemGroup> - <ItemGroup> - <Folder Include="MailDomain\" /> - </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. Modified: NMail/trunk/NMail.Administration.WinForms/Program.cs =================================================================== --- NMail/trunk/NMail.Administration.WinForms/Program.cs 2007-05-27 13:41:01 UTC (rev 205) +++ NMail/trunk/NMail.Administration.WinForms/Program.cs 2007-05-27 13:42:04 UTC (rev 206) @@ -22,7 +22,7 @@ using System.Windows.Forms; namespace NMail.Administration.WinForms { - static class Program { + static internal class Program { /// <summary> /// The main entry point for the application. /// </summary> @@ -48,10 +48,14 @@ } else { // Unhandled exception, show the user - ExceptionDialog ed = new ExceptionDialog(); - ed.SetException(e.Exception); - ed.ShowDialog(); + ShowExceptionDialog(e.Exception); } } + + internal static void ShowExceptionDialog(Exception ex) { + ExceptionDialog ed = new ExceptionDialog(); + ed.SetException(ex); + ed.ShowDialog(); + } } } \ No newline at end of file Modified: NMail/trunk/NMail.Icons/NMail.Icons.csproj =================================================================== --- NMail/trunk/NMail.Icons/NMail.Icons.csproj 2007-05-27 13:41:01 UTC (rev 205) +++ NMail/trunk/NMail.Icons/NMail.Icons.csproj 2007-05-27 13:42:04 UTC (rev 206) @@ -56,6 +56,7 @@ <EmbeddedResource Include="Resources\22x22\actions\edit_group.png" /> <EmbeddedResource Include="Resources\22x22\actions\folder.png" /> <EmbeddedResource Include="Resources\22x22\actions\queue.png" /> + <EmbeddedResource Include="Resources\32x32\apps\password.png" /> <Content Include="Resources\LGPL.txt" /> </ItemGroup> <ItemGroup> Added: NMail/trunk/NMail.Icons/Resources/32x32/apps/password.png =================================================================== (Binary files differ) Property changes on: NMail/trunk/NMail.Icons/Resources/32x32/apps/password.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-06-16 15:02:33
|
Revision: 227 http://svn.sourceforge.net/nmailserver/?rev=227&view=rev Author: tmyroadctfig Date: 2007-06-16 08:02:35 -0700 (Sat, 16 Jun 2007) Log Message: ----------- Work on the survey service. Modified Paths: -------------- NMail/trunk/NMail.Server/NMailServer.cs NMail/trunk/NMail.Server.Console/NMail.Server.Console.csproj NMail/trunk/NMail.SurveyService/NMail.SurveyService.csproj NMail/trunk/NMail.SurveyService/SurveyEnvironment.cs NMail/trunk/NMail.SurveyService/SurveyInformation.cs NMail/trunk/NMail.SurveyService/SurveyService.cs Added Paths: ----------- NMail/trunk/NMail.SurveyService/SurveyNMail.cs Modified: NMail/trunk/NMail.Server/NMailServer.cs =================================================================== --- NMail/trunk/NMail.Server/NMailServer.cs 2007-06-16 15:01:45 UTC (rev 226) +++ NMail/trunk/NMail.Server/NMailServer.cs 2007-06-16 15:02:35 UTC (rev 227) @@ -325,7 +325,7 @@ /// <returns>The install location or null if an error occurs.</returns> public static string GetInstallDirectory() { string installDirectory = null; - RegistryKey nmailServerKey = Registry.LocalMachine.OpenSubKey(@"Software\NMail\NMail Server 1.0", false); + RegistryKey nmailServerKey = Registry.LocalMachine.OpenSubKey(NMailRegistryKey, false); if (nmailServerKey != null) { installDirectory = nmailServerKey.GetValue("InstallDirectory") as string; @@ -342,5 +342,10 @@ log.Debug("Installation directory: " + installDirectory); return installDirectory; } + + /// <summary> + /// The base registry key for the NMail server. + /// </summary> + public const string NMailRegistryKey = @"Software\NMail\NMail Server 1.0"; } } Modified: NMail/trunk/NMail.Server.Console/NMail.Server.Console.csproj =================================================================== --- NMail/trunk/NMail.Server.Console/NMail.Server.Console.csproj 2007-06-16 15:01:45 UTC (rev 226) +++ NMail/trunk/NMail.Server.Console/NMail.Server.Console.csproj 2007-06-16 15:02:35 UTC (rev 227) @@ -160,6 +160,10 @@ <Project>{81EA6856-1AA7-4278-B0CC-1F851B987DA0}</Project> <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> </ProjectReference> + <ProjectReference Include="..\NMail.SurveyService\NMail.SurveyService.csproj"> + <Project>{11BFAF65-FA51-4245-8747-F4BA39D10FA3}</Project> + <Name>NMail.SurveyService</Name> + </ProjectReference> <ProjectReference Include="..\NMail\NMail.csproj"> <Name>NMail</Name> <Project>{5A5A5012-B157-49B1-A35F-67EC9680112A}</Project> Modified: NMail/trunk/NMail.SurveyService/NMail.SurveyService.csproj =================================================================== --- NMail/trunk/NMail.SurveyService/NMail.SurveyService.csproj 2007-06-16 15:01:45 UTC (rev 226) +++ NMail/trunk/NMail.SurveyService/NMail.SurveyService.csproj 2007-06-16 15:02:35 UTC (rev 227) @@ -29,16 +29,22 @@ </PropertyGroup> <ItemGroup> <Reference Include="System" /> + <Reference Include="System.configuration" /> <Reference Include="System.Data" /> <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> <Compile Include="SurveyEnvironment.cs" /> <Compile Include="SurveyInformation.cs" /> + <Compile Include="SurveyNMail.cs" /> <Compile Include="SurveyService.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> <ItemGroup> + <ProjectReference Include="..\NMail.Server\NMail.Server.csproj"> + <Project>{45123319-D913-4A92-BB67-C2C9E1A22A17}</Project> + <Name>NMail.Server</Name> + </ProjectReference> <ProjectReference Include="..\NMail\NMail.csproj"> <Project>{5A5A5012-B157-49B1-A35F-67EC9680112A}</Project> <Name>NMail</Name> Modified: NMail/trunk/NMail.SurveyService/SurveyEnvironment.cs =================================================================== --- NMail/trunk/NMail.SurveyService/SurveyEnvironment.cs 2007-06-16 15:01:45 UTC (rev 226) +++ NMail/trunk/NMail.SurveyService/SurveyEnvironment.cs 2007-06-16 15:02:35 UTC (rev 227) @@ -1,3 +1,20 @@ +/* + * 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; Modified: NMail/trunk/NMail.SurveyService/SurveyInformation.cs =================================================================== --- NMail/trunk/NMail.SurveyService/SurveyInformation.cs 2007-06-16 15:01:45 UTC (rev 226) +++ NMail/trunk/NMail.SurveyService/SurveyInformation.cs 2007-06-16 15:02:35 UTC (rev 227) @@ -1,3 +1,20 @@ +/* + * 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; @@ -17,5 +34,15 @@ get { return environment; } set { environment = value; } } + + private SurveyNMail nmail; + + /// <summary> + /// The NMail details. + /// </summary> + public SurveyNMail NMail { + get { return nmail; } + set { nmail = value; } + } } } Added: NMail/trunk/NMail.SurveyService/SurveyNMail.cs =================================================================== --- NMail/trunk/NMail.SurveyService/SurveyNMail.cs (rev 0) +++ NMail/trunk/NMail.SurveyService/SurveyNMail.cs 2007-06-16 15:02:35 UTC (rev 227) @@ -0,0 +1,51 @@ +/* + * 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.Reflection; +using System.Text; + +using NMail.Configuration; + +namespace NMail.SurveyService { + /// <summary> + /// The NMail survey details. + /// </summary> + public class SurveyNMail { + + private Version nmailVersion = Assembly.GetAssembly(typeof(NMailConfiguration)).GetName().Version; + + /// <summary> + /// The version of the NMail library. + /// </summary> + public Version NMailVersion { + get { return nmailVersion; } + set { nmailVersion = value; } + } + + private Version executingAssemblyVersion = Assembly.GetExecutingAssembly().GetName().Version; + + /// <summary> + /// The version of the executing assembly. + /// </summary> + public Version ExecutingAssemblyVersion { + get { return executingAssemblyVersion; } + set { executingAssemblyVersion = value; } + } + } +} Modified: NMail/trunk/NMail.SurveyService/SurveyService.cs =================================================================== --- NMail/trunk/NMail.SurveyService/SurveyService.cs 2007-06-16 15:01:45 UTC (rev 226) +++ NMail/trunk/NMail.SurveyService/SurveyService.cs 2007-06-16 15:02:35 UTC (rev 227) @@ -1,92 +1,314 @@ +/* + * 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.IO; +using System.Net; using System.Text; +using System.Threading; using System.Xml; using System.Xml.Serialization; using Microsoft.Win32; +using NMail.Configuration; +using NMail.DataTypes; using NMail.DataTypes.Service; +using NMail.DataTypes.Message; +using NMail.Server; namespace NMail.SurveyService { /// <summary> /// A service for periodically surveying the server details and reporting back usage stats. /// </summary> public class SurveyService : IService { - /// <summary> /// Creates a new instance of the service. /// </summary> - public SurveyService() { - } + public SurveyService() { } - protected XmlDocument GatherData() { - //log.Debug("NMail Console Server version: [" + Assembly.GetExecutingAssembly().GetName().Version + "]"); - // log.Debug("NMail Library version: [" + Assembly.GetAssembly(typeof(NMailConfiguration)).GetName().Version + "]"); - + /// <summary> + /// Gets the current survey information. + /// </summary> + /// <returns>An XML documeent containing the suvery details.</returns> + protected string GatherData() { MemoryStream ms = new MemoryStream(); XmlSerializer serializer = new XmlSerializer(typeof(SurveyInformation)); serializer.Serialize(ms, new SurveyInformation()); - XmlDocument result = new XmlDocument(); - result.LoadXml(Encoding.Unicode.GetString(ms.ToArray())); - return result; + return Encoding.Unicode.GetString(ms.ToArray()); } + /// <summary> + /// Gets the last date/time the survey information was sent. + /// </summary> + /// <returns>The datetime or null.</returns> + protected DateTime? GetLastSurveyTimestamp() { + RegistryKey nmailServerKey = Registry.LocalMachine.OpenSubKey(NMailServer.NMailRegistryKey, false); + + if (nmailServerKey != null) { + string sentString = nmailServerKey.GetValue("LastSuveryTimestamp") as string; + + DateTime sentTimestamp; + if (DateTime.TryParse(sentString, out sentTimestamp)) { + return sentTimestamp; + } + } + + // Never sent details + return null; + } + + /// <summary> + /// Sets the last date/time the survey information was sent. + /// </summary> + protected void SetLastSurveyTimestamp() { + RegistryKey nmailServerKey = Registry.LocalMachine.OpenSubKey(NMailServer.NMailRegistryKey, false); + + if (nmailServerKey == null) { + nmailServerKey = Registry.LocalMachine.CreateSubKey(NMailServer.NMailRegistryKey); + } + + nmailServerKey.SetValue("LastSuveryTimestamp", DateTime.Now.ToString()); + } + + protected TimeSpan GetWaitPeriod() { + DateTime? lastSent = GetLastSurveyTimestamp(); + + if (lastSent.HasValue) { + // TODO: obtain period from config file + return DateTime.Now - (lastSent.Value + TimeSpan.FromDays(30)); + } + + return TimeSpan.Zero; + } + + protected void SendSurveyInformation() { + Message message = new Message(); + message.Subject = "[NMail Survey Information]"; + message.From = "NMail survey service"; + message.SetSimpleBody(GatherData()); + + SmtpMessage smtpMessage = new SmtpMessage(); + smtpMessage.Message = message; + smtpMessage.SourceAddress = IPAddress.Loopback; + smtpMessage.ReportedHost = IPAddress.Loopback; + smtpMessage.Sender = new EmailAddress(null, null); + smtpMessage.AddRecipient(new EmailAddress("tmy...@us...")); + + NMailConfiguration.Current.Router.SpoolMessage(smtpMessage); + } + + /// <summary> + /// An event to signal a quit. + /// </summary> + ManualResetEvent quitEvent = new ManualResetEvent(true); + + /// <summary> + /// A flag indicating if the service is running. + /// </summary> + bool running = false; + + protected void WaitForSurvey(object unused) { + // Flag that we're running + lock (this) { + running = true; + } + + while (this.running) { + // Get the period to wait + TimeSpan waitPeriod = GetWaitPeriod(); + + bool quitSignalled = this.quitEvent.WaitOne((int) waitPeriod.TotalMilliseconds, true); + + if (!quitSignalled) { + try { + // Send the survey information + SendSurveyInformation(); + + } catch (Exception ex) { + // Ignore + } + + // Update the last sent time + SetLastSurveyTimestamp(); + + } else { + // Flag that we've quit + lock (this) { + running = false; + } + } + } + } + #region IService Members + /// <summary> + /// Initialise the service. All services are <b>Init</b>ialised before any services are <b>Start</b>ed. + /// </summary> + public void Init() { } - public void Init() {} - + /// <summary> + /// Start the service. + /// </summary> + /// <exception cref="System.InvalidOperationException"> + /// If Start() is called before Init(). + /// </exception> public void Start() { - XmlDocument doc = GatherData(); + lock (this) { + if (!this.Running) { + this.quitEvent.Reset(); + ThreadPool.QueueUserWorkItem(new WaitCallback(WaitForSurvey)); + if (this.started != null) { + this.started(this, new EventArgs()); + } + } + } } + /// <summary> + /// Stop the service. It should be possible to resume the service with a subsequent call to Init and Start. + /// If you take too long (arbitrary) to Stop gracefully, then you may get an additional call to Stop + /// immediately on another thread, you must be able to handle this. + /// </summary> public void Stop(bool runCurrentToCompletion) { - throw new Exception("The method or operation is not implemented."); + lock (this) { + if (this.Running) { + this.quitEvent.Set(); + + if (this.stopped != null) { + this.stopped(this, new EventArgs()); + } + } + } } + /// <summary> + /// Returns true if this service supports pausing processing without performing a complete shutdown. + /// </summary> public bool SupportsPause { get { return false; } } + /// <summary> + /// Pauses the service from processing but doesn't require a complete shutdown. E.g. a service may stop + /// accepting new connections or stop processing its work queue. + /// </summary> + /// <exception cref="System.InvalidOperationException"> + /// If this service doesn't support pausing. + /// </exception> public void Pause() { - throw new InvalidOperationException("The method or operation is not implemented."); + throw new InvalidOperationException("Can't pause this service."); } + /// <summary> + /// Continues processing following a pause command. + /// </summary> + /// <exception cref="System.InvalidOperationException"> + /// If this service doesn't support pausing. + /// </exception> public void Continue() { - throw new InvalidOperationException("The method or operation is not implemented."); + throw new InvalidOperationException("Can't resume this service."); } + /// <summary> + /// Reload the service configuration. This may recycle the service instance by stopping and discarding + /// the current IService and returning a new one. + /// </summary> + /// <remarks> + /// The service is <b>running</b> when this is called. + /// </remarks> + /// <exception cref="System.InvalidOperationException"> + /// If this service is not running when this is called. + /// </exception> public IService ReloadConfiguration() { - throw new InvalidOperationException("The method or operation is not implemented."); + throw new InvalidOperationException("Can't reload configuration for this service."); } + /// <summary> + /// Does this service support reloading configuration parameters on the fly? + /// </summary> public bool AllowsReloadConfiguration { get { return false; } } + /// <summary> + /// Is the service currently running? + /// </summary> public bool Running { - get { throw new Exception("The method or operation is not implemented."); } + get { return this.running; } } + /// <summary> + /// The name of this service. + /// </summary> public string Name { get { return "Survey Service"; } } + /// <summary> + /// The description of this service. + /// </summary> public string Description { get { return "Periodically reports survey and usage information."; } } + /// <summary> + /// A URL for details on this service. + /// </summary> public Uri SupportUrl { get { return new Uri("http://nmailserver.sf.net/support/services/survey"); } } - public event EventHandler Started; + private event EventHandler started; - public event EventHandler Stopped; + /// <summary> + /// The event triggered when the service has been started. + /// </summary> + /// <remarks> + /// Running should return true when this event is received. + /// </remarks> + public event EventHandler Started { + add { + this.started += value; + } + remove { + this.started -= value; + } + } + private event EventHandler stopped; + + /// <summary> + /// The event triggered when the sevice has been stopped. + /// </summary> + /// <remarks> + /// Running should return false when this event is received. + /// </remarks> + public event EventHandler Stopped { + add { + this.stopped += value; + } + remove { + this.stopped -= value; + } + } #endregion } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tmy...@us...> - 2007-07-30 14:07:38
|
Revision: 254 http://nmailserver.svn.sourceforge.net/nmailserver/?rev=254&view=rev Author: tmyroadctfig Date: 2007-07-30 07:07:38 -0700 (Mon, 30 Jul 2007) Log Message: ----------- Some changes for MySQL. Modified Paths: -------------- NMail/trunk/NMail.LocalStoreData.NHibernate/Mappings/NMail.DataTypes.LocalStore.MailDomain.hbm.xml NMail/trunk/NMail.LocalStoreData.NHibernate/Mappings/NMail.LocalStoreData.NHibernate.InternalStoreFolder.hbm.xml NMail/trunk/NMail.LocalStoreData.NHibernate/hibernate-localstore-configuration.xml NMail/trunk/NMail.SpoolData.NHibernate/hibernate-spool-configuration.xml Modified: NMail/trunk/NMail.LocalStoreData.NHibernate/Mappings/NMail.DataTypes.LocalStore.MailDomain.hbm.xml =================================================================== --- NMail/trunk/NMail.LocalStoreData.NHibernate/Mappings/NMail.DataTypes.LocalStore.MailDomain.hbm.xml 2007-07-30 14:06:58 UTC (rev 253) +++ NMail/trunk/NMail.LocalStoreData.NHibernate/Mappings/NMail.DataTypes.LocalStore.MailDomain.hbm.xml 2007-07-30 14:07:38 UTC (rev 254) @@ -24,7 +24,7 @@ <list name="AdditionalHosts" table="MailDomainHosts"> <key column="MailDomainId" /> <index column="ChildIndex" type="Int32" /> - <element column="Host" unique="true" type="Serializable" /> + <element column="Host" type="Serializable" /> <!-- MySQL dialect can't hack this: unique="true" --> </list> <list name="MailboxMappings" table="MailDomainMailboxMappings"> Modified: NMail/trunk/NMail.LocalStoreData.NHibernate/Mappings/NMail.LocalStoreData.NHibernate.InternalStoreFolder.hbm.xml =================================================================== --- NMail/trunk/NMail.LocalStoreData.NHibernate/Mappings/NMail.LocalStoreData.NHibernate.InternalStoreFolder.hbm.xml 2007-07-30 14:06:58 UTC (rev 253) +++ NMail/trunk/NMail.LocalStoreData.NHibernate/Mappings/NMail.LocalStoreData.NHibernate.InternalStoreFolder.hbm.xml 2007-07-30 14:07:38 UTC (rev 254) @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="NMail.LocalStoreData.NHibernate" assembly="NMail.LocalStoreData.NHibernate" default-lazy="false"> - <class name="NMail.LocalStoreData.NHibernate.InternalStoreFolder" table="Folder"> + <class name="NMail.LocalStoreData.NHibernate.InternalStoreFolder" table="t_Folder"> <id name="FolderId" type="Int32" unsaved-value="0"> <column name="FolderId" not-null="true"/> <generator class="native" /> Modified: NMail/trunk/NMail.LocalStoreData.NHibernate/hibernate-localstore-configuration.xml =================================================================== --- NMail/trunk/NMail.LocalStoreData.NHibernate/hibernate-localstore-configuration.xml 2007-07-30 14:06:58 UTC (rev 253) +++ NMail/trunk/NMail.LocalStoreData.NHibernate/hibernate-localstore-configuration.xml 2007-07-30 14:07:38 UTC (rev 254) @@ -2,9 +2,9 @@ <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"> <session-factory> <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property> - <property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property> - <property name="connection.connection_string">Data Source=127.0.0.1;Initial Catalog=NMailLocalStore;Integrated Security=True</property> - <property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property> + <property name="connection.driver_class">NHibernate.Driver.MySqlDataDriver</property> + <property name="connection.connection_string">Host=127.0.0.1;Database=NMailLocalStore;Uid=root;Password=bis6ocha</property> + <property name="dialect">NHibernate.Dialect.MySQL5Dialect</property> <property name="hibernate.query.substitutions">true 1, false 0</property> </session-factory> </hibernate-configuration> Modified: NMail/trunk/NMail.SpoolData.NHibernate/hibernate-spool-configuration.xml =================================================================== --- NMail/trunk/NMail.SpoolData.NHibernate/hibernate-spool-configuration.xml 2007-07-30 14:06:58 UTC (rev 253) +++ NMail/trunk/NMail.SpoolData.NHibernate/hibernate-spool-configuration.xml 2007-07-30 14:07:38 UTC (rev 254) @@ -2,9 +2,9 @@ <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"> <session-factory> <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property> - <property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property> - <property name="connection.connection_string">Data Source=127.0.0.1;Initial Catalog=NMailSpool;Integrated Security=True</property> - <property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property> + <property name="connection.driver_class">NHibernate.Driver.MySqlDataDriver</property> + <property name="connection.connection_string">Host=127.0.0.1;Database=NMailSpool;Uid=NMail;Password=moo</property> + <property name="dialect">NHibernate.Dialect.MySQL5Dialect</property> <property name="hibernate.query.substitutions">true 1, false 0</property> </session-factory> </hibernate-configuration> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tmy...@us...> - 2007-07-30 14:14:09
|
Revision: 259 http://nmailserver.svn.sourceforge.net/nmailserver/?rev=259&view=rev Author: tmyroadctfig Date: 2007-07-30 07:14:09 -0700 (Mon, 30 Jul 2007) Log Message: ----------- Added global exception handlers. Modified Paths: -------------- NMail/trunk/NMail.Server.Console/NMailConsoleServer.cs NMail/trunk/NMail.Server.Service/NMailService.cs Modified: NMail/trunk/NMail.Server.Console/NMailConsoleServer.cs =================================================================== --- NMail/trunk/NMail.Server.Console/NMailConsoleServer.cs 2007-07-30 14:13:37 UTC (rev 258) +++ NMail/trunk/NMail.Server.Console/NMailConsoleServer.cs 2007-07-30 14:14:09 UTC (rev 259) @@ -42,48 +42,50 @@ // configure logging log4net.Config.XmlConfigurator.ConfigureAndWatch(new System.IO.FileInfo("logging.xml")); - - try { - // output our platform details - log.Debug("NMail Console Server version: [" + Assembly.GetExecutingAssembly().GetName().Version + "]"); - log.Debug("NMail Library version: [" + Assembly.GetAssembly(typeof(NMailConfiguration)).GetName().Version + "]"); - log.Debug("Platform: [" + Environment.OSVersion.Platform + "]"); - log.Debug("Version: [" + Environment.OSVersion.Version + "]"); - log.Debug("OS: [" + Environment.OSVersion.ToString() + "]"); - log.Debug("Environment: [" + Environment.Version.ToString() + "]"); - log.Debug("Current Dir: [" + Environment.CurrentDirectory + "]"); - NMailServer server = new NMailServer(); - RemoteAdministration ra = RemoteAdministration.GetInstance(server); + // Setup exception handler + AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); - // initialise the server - server.Init(); + // output our platform details + log.Debug("NMail Console Server version: [" + Assembly.GetExecutingAssembly().GetName().Version + "]"); + log.Debug("NMail Library version: [" + Assembly.GetAssembly(typeof(NMailConfiguration)).GetName().Version + "]"); + log.Debug("Platform: [" + Environment.OSVersion.Platform + "]"); + log.Debug("Version: [" + Environment.OSVersion.Version + "]"); + log.Debug("OS: [" + Environment.OSVersion.ToString() + "]"); + log.Debug("Environment: [" + Environment.Version.ToString() + "]"); + log.Debug("Current Dir: [" + Environment.CurrentDirectory + "]"); - // start the server - server.Start(); + NMailServer server = new NMailServer(); + RemoteAdministration ra = RemoteAdministration.GetInstance(server); - switch (Environment.OSVersion.Platform) { - case PlatformID.Unix: - // drop our root privileges - MonoPrivileges.MonoPrivileges.SetUser(8); - MonoPrivileges.MonoPrivileges.SetGroup(12); - log.Debug("Current user id:" + MonoPrivileges.MonoPrivileges.GetUser()); - log.Debug("Current group id:" + MonoPrivileges.MonoPrivileges.GetGroup()); - break; - } + // initialise the server + server.Init(); - // wait for line to be read (signalling a close) - System.Console.ReadLine(); + // start the server + server.Start(); - // stop services, waiting at most 20 seconds. - server.Stop(true, TimeSpan.FromSeconds(20)); + switch (Environment.OSVersion.Platform) { + case PlatformID.Unix: + // drop our root privileges + MonoPrivileges.MonoPrivileges.SetUser(8); + MonoPrivileges.MonoPrivileges.SetGroup(12); + log.Debug("Current user id:" + MonoPrivileges.MonoPrivileges.GetUser()); + log.Debug("Current group id:" + MonoPrivileges.MonoPrivileges.GetGroup()); + break; + } - // Shutdown the remoting channel - RemoteAdministration.ShutdownChannel(); + // wait for line to be read (signalling a close) + System.Console.ReadLine(); - } catch (Exception e) { - log.Fatal("Unhandled exception in NMail.", e); - } + // stop services, waiting at most 20 seconds. + server.Stop(true, TimeSpan.FromSeconds(20)); + + // Shutdown the remoting channel + RemoteAdministration.ShutdownChannel(); } + + static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) { + log.Fatal("Unhandled exception in NMail.", e.ExceptionObject as Exception); + } } } Modified: NMail/trunk/NMail.Server.Service/NMailService.cs =================================================================== --- NMail/trunk/NMail.Server.Service/NMailService.cs 2007-07-30 14:13:37 UTC (rev 258) +++ NMail/trunk/NMail.Server.Service/NMailService.cs 2007-07-30 14:14:09 UTC (rev 259) @@ -34,33 +34,31 @@ private static ILog log = LogManager.GetLogger(typeof(NMailService)); private NMailServer server; - + public NMailService() { - try { - // Change the working directory from System32 to our install directory - Environment.CurrentDirectory = NMailServer.GetInstallDirectory(); + // Change the working directory from System32 to our install directory + Environment.CurrentDirectory = NMailServer.GetInstallDirectory(); - // output our platform details - log.Debug("NMail Console Server version: [" + Assembly.GetExecutingAssembly().GetName().Version + "]"); - log.Debug("NMail Library version: [" + Assembly.GetAssembly(typeof(NMailConfiguration)).GetName().Version + "]"); - log.Debug("Platform: [" + Environment.OSVersion.Platform + "]"); - log.Debug("Version: [" + Environment.OSVersion.Version + "]"); - log.Debug("OS: [" + Environment.OSVersion.ToString() + "]"); - log.Debug("Environment: [" + Environment.Version.ToString() + "]"); - log.Debug("Current Dir: [" + Environment.CurrentDirectory + "]"); + // output our platform details + log.Debug("NMail Console Server version: [" + Assembly.GetExecutingAssembly().GetName().Version + "]"); + log.Debug("NMail Library version: [" + Assembly.GetAssembly(typeof(NMailConfiguration)).GetName().Version + "]"); + log.Debug("Platform: [" + Environment.OSVersion.Platform + "]"); + log.Debug("Version: [" + Environment.OSVersion.Version + "]"); + log.Debug("OS: [" + Environment.OSVersion.ToString() + "]"); + log.Debug("Environment: [" + Environment.Version.ToString() + "]"); + log.Debug("Current Dir: [" + Environment.CurrentDirectory + "]"); - this.server = new NMailServer(); - RemoteAdministration ra = RemoteAdministration.GetInstance(this.server); + this.server = new NMailServer(); + RemoteAdministration ra = RemoteAdministration.GetInstance(this.server); - // initialise the server - this.server.Init(); - - } catch (Exception e) { - log.Fatal("Unhandled exception in NMail.", e); - throw e; - } + // initialise the server + this.server.Init(); } + static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) { + log.Fatal("Unhandled exception in NMail.", e.ExceptionObject as Exception); + } + protected override void OnStart(string[] args) { this.server.Start(); } @@ -75,6 +73,9 @@ // configure logging log4net.Config.XmlConfigurator.ConfigureAndWatch(new System.IO.FileInfo("logging.xml")); + + // Setup exception handler + AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); ServiceBase.Run(new NMailService()); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tmy...@us...> - 2007-07-30 14:27:22
|
Revision: 262 http://nmailserver.svn.sourceforge.net/nmailserver/?rev=262&view=rev Author: tmyroadctfig Date: 2007-07-30 07:27:23 -0700 (Mon, 30 Jul 2007) Log Message: ----------- Added a metrics service. Modified Paths: -------------- NMail/trunk/NMail.sln Added Paths: ----------- NMail/trunk/NMail/DataTypes/Metrics/ NMail/trunk/NMail/DataTypes/Metrics/MetricAttribute.cs NMail/trunk/NMail/DataTypes/Metrics/MetricType.cs NMail/trunk/NMail.MetricsService/ NMail/trunk/NMail.MetricsService/Configuration/ NMail/trunk/NMail.MetricsService/Configuration/MetricsServiceConfiguration.cs NMail/trunk/NMail.MetricsService/MetricDetails.cs NMail/trunk/NMail.MetricsService/MetricsService.cs NMail/trunk/NMail.MetricsService/NMail.MetricsService.csproj NMail/trunk/NMail.MetricsService/Properties/ NMail/trunk/NMail.MetricsService/Properties/AssemblyInfo.cs NMail/trunk/References/IKVM.AWT.WinForms.dll NMail/trunk/References/IKVM.GNU.Classpath.dll NMail/trunk/References/IKVM.Runtime.dll NMail/trunk/References/ZedGraph.dll NMail/trunk/References/rrd4j-2.0.5.dll Added: NMail/trunk/NMail/DataTypes/Metrics/MetricAttribute.cs =================================================================== --- NMail/trunk/NMail/DataTypes/Metrics/MetricAttribute.cs (rev 0) +++ NMail/trunk/NMail/DataTypes/Metrics/MetricAttribute.cs 2007-07-30 14:27:23 UTC (rev 262) @@ -0,0 +1,52 @@ +/* + * 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.Metrics { + /// <summary> + /// An attribute that marks properties as a metric that is monitored. + /// </summary> + [AttributeUsage(AttributeTargets.Property, AllowMultiple=false)] + public class MetricAttribute : Attribute { + + public MetricAttribute(string name, MetricType metricType) { + this.name = name; + this.metricType = metricType; + } + + private string name; + + /// <summary> + /// The name of the metric as displayed to the administrator. + /// </summary> + public string Name { + get { return name; } + } + + private MetricType metricType; + + /// <summary> + /// The type of this metric. + /// </summary> + public MetricType MetricType { + get { return metricType; } + } + } +} Added: NMail/trunk/NMail/DataTypes/Metrics/MetricType.cs =================================================================== --- NMail/trunk/NMail/DataTypes/Metrics/MetricType.cs (rev 0) +++ NMail/trunk/NMail/DataTypes/Metrics/MetricType.cs 2007-07-30 14:27:23 UTC (rev 262) @@ -0,0 +1,28 @@ +/* + * 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.Metrics { + public enum MetricType { + Counter, + + Gauge + } +} Added: NMail/trunk/NMail.MetricsService/Configuration/MetricsServiceConfiguration.cs =================================================================== --- NMail/trunk/NMail.MetricsService/Configuration/MetricsServiceConfiguration.cs (rev 0) +++ NMail/trunk/NMail.MetricsService/Configuration/MetricsServiceConfiguration.cs 2007-07-30 14:27:23 UTC (rev 262) @@ -0,0 +1,86 @@ +/* + * 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.Xml; +using System.Configuration; + +using NMail.Configuration; +using NMail.DataTypes; + +namespace NMail.MetricsService.Configuration { + /// <summary> + /// Provides configuration for the metrics service. + /// </summary> + public class MetricsServiceConfiguration : ConfigurationSection { + /// <summary> + /// Adds a metrics service configuration section to the current config file. + /// </summary> + public static void AddToConfigFile() { + if (NMailConfigFile.Current.Sections["NMail.MetricsService"] == null) { + NMailConfigFile.Current.Sections.Add("NMail.MetricsService", new MetricsServiceConfiguration()); + } + } + + /// <summary> + /// Remove the config section from the config file. + /// </summary> + public static void RemoveFromConfigFile() { + if (NMailConfigFile.Current.Sections["NMail.MetricsService"] != null) { + NMailConfigFile.Current.Sections.Remove("NMail.MetricsService"); + } + } + + /// <summary> + /// Returns true if a metrics service configuration section exists in the current + /// configuration. + /// </summary> + public static bool ConfigurationPresent { + get { + return (NMailConfigFile.Current.Sections["NMail.MetricsService"] != null); + } + } + + /// <summary> + /// The current configuration in use. + /// </summary> + public static MetricsServiceConfiguration Current { + get { + MetricsServiceConfiguration current; + current = (MetricsServiceConfiguration) NMailConfigFile.Current.GetSection("NMail.MetricsService"); + + if (current == null) { + throw new ConfigurationErrorsException("NMail Metrics Service configuration is missing"); + } + return current; + } + } + + /// <summary> + /// The period to wait between gathering metrics. + /// </summary> + [ConfigurationProperty("GatherWaitPeriod", DefaultValue = "0:05:0")] + public TimeSpan GatherWaitPeriod { + get { + return (TimeSpan) this["GatherWaitPeriod"]; + } + set { + this["GatherWaitPeriod"] = value; + } + } + } +} Added: NMail/trunk/NMail.MetricsService/MetricDetails.cs =================================================================== --- NMail/trunk/NMail.MetricsService/MetricDetails.cs (rev 0) +++ NMail/trunk/NMail.MetricsService/MetricDetails.cs 2007-07-30 14:27:23 UTC (rev 262) @@ -0,0 +1,61 @@ +/* + * 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.Reflection; +using System.Text; + +using NMail.DataTypes.Metrics; + +namespace NMail.MetricsService { + /// <summary> + /// A class for holding metric details. + /// </summary> + public class MetricDetails { + + private object objectInstance; + + /// <summary> + /// The object to query the metrics from. + /// </summary> + public object ObjectInstance { + get { return objectInstance; } + set { objectInstance = value; } + } + + private PropertyInfo propertyInfo; + + /// <summary> + /// The property to query to get the metric. + /// </summary> + public PropertyInfo PropertyInfo { + get { return propertyInfo; } + set { propertyInfo = value; } + } + + private MetricAttribute metric; + + /// <summary> + /// The metric information. + /// </summary> + public MetricAttribute Metric { + get { return metric; } + set { metric = value; } + } + } +} Added: NMail/trunk/NMail.MetricsService/MetricsService.cs =================================================================== --- NMail/trunk/NMail.MetricsService/MetricsService.cs (rev 0) +++ NMail/trunk/NMail.MetricsService/MetricsService.cs 2007-07-30 14:27:23 UTC (rev 262) @@ -0,0 +1,307 @@ +/* + * 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.IO; +using System.Reflection; +using System.Text; +using System.Threading; + +using org.rrd4j; +using org.rrd4j.core; + +using NMail.Configuration; +using NMail.DataTypes.Metrics; +using NMail.DataTypes.Service; +using NMail.MetricsService.Configuration; +using NMail.Server; + +namespace NMail.MetricsService { + /// <summary> + /// A service for periodically gathering and recording metrics from the running server. + /// </summary> + public class MetricsService : MarshalByRefObject, IService { + + protected RrdDb rrdDb; + + protected void SetupRrdDb() { + RrdDb.setDefaultFactory("FILE"); + + string rrdFilename = NMailServer.GetInstallDirectory() + Path.DirectorySeparatorChar + "NMail.rrd"; + RrdDef rrdDef = new RrdDef(rrdFilename); + + foreach (MetricDetails metricDetails in this.metrics) { + rrdDef.addDatasource(metricDetails.Metric.Name, DsType.COUNTER, 600, 0, Double.NaN); + } + + rrdDef.addArchive(ConsolFun.AVERAGE, 0.5, 1, 600); + rrdDef.addArchive(ConsolFun.AVERAGE, 0.5, 6, 700); + rrdDef.addArchive(ConsolFun.AVERAGE, 0.5, 24, 775); + rrdDef.addArchive(ConsolFun.AVERAGE, 0.5, 288, 797); + rrdDef.addArchive(ConsolFun.MAX, 0.5, 1, 600); + rrdDef.addArchive(ConsolFun.MAX, 0.5, 6, 700); + rrdDef.addArchive(ConsolFun.MAX, 0.5, 24, 775); + rrdDef.addArchive(ConsolFun.MAX, 0.5, 288, 797); + + this.rrdDb = new RrdDb(rrdDef); + } + + protected void AddSample(string metricName, double value) { + Sample sample = this.rrdDb.createSample(); + sample.setTime(Util.getTime()); + sample.setValue(metricName, value); + sample.update(); + } + + protected List<MetricDetails> metrics = new List<MetricDetails>(); + + protected void PopulateMetricsForType(Type t, object instance) { + if (instance == null) { + // Can't get metrics off something that isn't there! + return; + } + + // Check each property in the type + foreach (PropertyInfo propInfo in t.GetProperties()) { + // Look for metric attributes + MetricAttribute[] metricAttributes = (MetricAttribute[]) propInfo.GetCustomAttributes(typeof(MetricAttribute), true); + + if (metricAttributes.Length > 0) { + // Save the metric into the list + MetricDetails metricDetails = new MetricDetails(); + metricDetails.Metric = metricAttributes[0]; + metricDetails.ObjectInstance = instance; + metricDetails.PropertyInfo = propInfo; + this.metrics.Add(metricDetails); + } + } + } + + public IList<KeyValuePair<DateTime, double>> GetMetricValues(string metricName) { + FetchRequest request = this.rrdDb.createFetchRequest(ConsolFun.AVERAGE, Util.getTime() - 86400, Util.getTime()); + FetchData fetchData = request.fetchData(); + + double[] values = fetchData.getValues(metricName); + long[] timestamps = fetchData.getTimestamps(); + List<KeyValuePair<DateTime, double>> result = new List<KeyValuePair<DateTime, double>>(); + + for (int i = 0; i < timestamps.Length; i++) { + DateTime time = new DateTime(timestamps[i] * (long) Math.Pow(10, 7)); + result.Add(new KeyValuePair<DateTime, double>(time, values[i])); + } + + return result; + } + + /// <summary> + /// An event to signal a quit. + /// </summary> + ManualResetEvent quitEvent = new ManualResetEvent(true); + + /// <summary> + /// A flag indicating if the service is running. + /// </summary> + bool running = false; + + protected void GatherMetricsThread(object unused) { + // Flag that we're running + lock (this) { + running = true; + } + + PopulateMetricsForType(typeof(NMail.DataTypes.Spool.ISpoolService), NMailConfiguration.Current.SpoolService); + + SetupRrdDb(); + + while (this.running) { + + // Wait until the next gathering period or quit + TimeSpan waitPeriod = MetricsServiceConfiguration.Current.GatherWaitPeriod; + bool quitSignalled = this.quitEvent.WaitOne(waitPeriod, true); + + if (!quitSignalled) { + + foreach (MetricDetails metricDetails in this.metrics) { + object val = metricDetails.PropertyInfo.GetGetMethod().Invoke(metricDetails.ObjectInstance, null); + AddSample(metricDetails.Metric.Name, Convert.ToDouble(val)); + } + + } else { + // Flag that we've quit + lock (this) { + running = false; + } + } + } + } + + #region IService Members + /// <summary> + /// Initialise the service. All services are <b>Init</b>ialised before any services are <b>Start</b>ed. + /// </summary> + public void Init() { } + + /// <summary> + /// Start the service. + /// </summary> + /// <exception cref="System.InvalidOperationException"> + /// If Start() is called before Init(). + /// </exception> + public void Start() { + lock (this) { + if (!this.Running) { + this.quitEvent.Reset(); + ThreadPool.QueueUserWorkItem(new WaitCallback(GatherMetricsThread)); + + if (this.started != null) { + this.started(this, new EventArgs()); + } + } + } + } + + /// <summary> + /// Stop the service. It should be possible to resume the service with a subsequent call to Init and Start. + /// If you take too long (arbitrary) to Stop gracefully, then you may get an additional call to Stop + /// immediately on another thread, you must be able to handle this. + /// </summary> + public void Stop(bool runCurrentToCompletion) { + lock (this) { + if (this.Running) { + this.quitEvent.Set(); + + if (this.stopped != null) { + this.stopped(this, new EventArgs()); + } + } + } + } + + /// <summary> + /// Returns true if this service supports pausing processing without performing a complete shutdown. + /// </summary> + public bool SupportsPause { + get { return false; } + } + + /// <summary> + /// Pauses the service from processing but doesn't require a complete shutdown. E.g. a service may stop + /// accepting new connections or stop processing its work queue. + /// </summary> + /// <exception cref="System.InvalidOperationException"> + /// If this service doesn't support pausing. + /// </exception> + public void Pause() { + throw new InvalidOperationException("Can't pause this service."); + } + + /// <summary> + /// Continues processing following a pause command. + /// </summary> + /// <exception cref="System.InvalidOperationException"> + /// If this service doesn't support pausing. + /// </exception> + public void Continue() { + throw new InvalidOperationException("Can't resume this service."); + } + + /// <summary> + /// Reload the service configuration. This may recycle the service instance by stopping and discarding + /// the current IService and returning a new one. + /// </summary> + /// <remarks> + /// The service is <b>running</b> when this is called. + /// </remarks> + /// <exception cref="System.InvalidOperationException"> + /// If this service is not running when this is called. + /// </exception> + public IService ReloadConfiguration() { + throw new InvalidOperationException("Can't reload configuration for this service."); + } + + /// <summary> + /// Does this service support reloading configuration parameters on the fly? + /// </summary> + public bool AllowsReloadConfiguration { + get { return false; } + } + + /// <summary> + /// Is the service currently running? + /// </summary> + public bool Running { + get { return this.running; } + } + + /// <summary> + /// The name of this service. + /// </summary> + public string Name { + get { return "Metrics Service"; } + } + + /// <summary> + /// The description of this service. + /// </summary> + public string Description { + get { return "Periodically gathers and records metrics from the running server."; } + } + + /// <summary> + /// A URL for details on this service. + /// </summary> + public Uri SupportUrl { + get { return new Uri("http://nmailserver.sf.net/support/services/metrics"); } + } + + private event EventHandler started; + + /// <summary> + /// The event triggered when the service has been started. + /// </summary> + /// <remarks> + /// Running should return true when this event is received. + /// </remarks> + public event EventHandler Started { + add { + this.started += value; + } + remove { + this.started -= value; + } + } + + private event EventHandler stopped; + + /// <summary> + /// The event triggered when the sevice has been stopped. + /// </summary> + /// <remarks> + /// Running should return false when this event is received. + /// </remarks> + public event EventHandler Stopped { + add { + this.stopped += value; + } + remove { + this.stopped -= value; + } + } + #endregion + } +} Added: NMail/trunk/NMail.MetricsService/NMail.MetricsService.csproj =================================================================== --- NMail/trunk/NMail.MetricsService/NMail.MetricsService.csproj (rev 0) +++ NMail/trunk/NMail.MetricsService/NMail.MetricsService.csproj 2007-07-30 14:27:23 UTC (rev 262) @@ -0,0 +1,74 @@ +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>8.0.50727</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{FD6E75CA-4BBC-41C6-A979-8816B74CD79E}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>NMail.MetricsService</RootNamespace> + <AssemblyName>NMail.MetricsService</AssemblyName> + <StartupObject> + </StartupObject> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>..\References\NMail\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>..\References\NMail\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="IKVM.GNU.Classpath, Version=0.34.0.2, Culture=neutral, PublicKeyToken=13235d27fcbfff58"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\References\IKVM.GNU.Classpath.dll</HintPath> + </Reference> + <Reference Include="IKVM.Runtime, Version=0.34.0.2, Culture=neutral, PublicKeyToken=13235d27fcbfff58"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\References\IKVM.Runtime.dll</HintPath> + </Reference> + <Reference Include="rrd4j-2.0.5, Version=0.0.0.0, Culture=neutral"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\References\rrd4j-2.0.5.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.configuration" /> + <Reference Include="System.Data" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Configuration\MetricsServiceConfiguration.cs" /> + <Compile Include="MetricDetails.cs" /> + <Compile Include="MetricsService.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\NMail.Server\NMail.Server.csproj"> + <Project>{45123319-D913-4A92-BB67-C2C9E1A22A17}</Project> + <Name>NMail.Server</Name> + </ProjectReference> + <ProjectReference Include="..\NMail\NMail.csproj"> + <Project>{5A5A5012-B157-49B1-A35F-67EC9680112A}</Project> + <Name>NMail</Name> + </ProjectReference> + </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. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file Added: NMail/trunk/NMail.MetricsService/Properties/AssemblyInfo.cs =================================================================== --- NMail/trunk/NMail.MetricsService/Properties/AssemblyInfo.cs (rev 0) +++ NMail/trunk/NMail.MetricsService/Properties/AssemblyInfo.cs 2007-07-30 14:27:23 UTC (rev 262) @@ -0,0 +1,34 @@ +/* + * 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.Reflection; +using System.Runtime.CompilerServices; + +// General details +[assembly: AssemblyTitle("NMail Metrics Service.")] +[assembly: AssemblyVersion("1.1.*")] + +[assembly: AssemblyDescription("Provides a metrics gathering service implementation for NMail.")] +[assembly: AssemblyCompany("http://NMailServer.SourceForge.net")] +[assembly: AssemblyProduct("NMail")] +[assembly: AssemblyCopyright("Copyright © 2004-2007 Luke Quinane")] + +#if DEBUG +[assembly: AssemblyConfiguration("Debug")] +#else +[assembly: AssemblyConfiguration("Release")] +#endif Modified: NMail/trunk/NMail.sln =================================================================== --- NMail/trunk/NMail.sln 2007-07-30 14:15:59 UTC (rev 261) +++ NMail/trunk/NMail.sln 2007-07-30 14:27:23 UTC (rev 262) @@ -52,6 +52,8 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NMail.SurveyService", "NMail.SurveyService\NMail.SurveyService.csproj", "{11BFAF65-FA51-4245-8747-F4BA39D10FA3}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NMail.MetricsService", "NMail.MetricsService\NMail.MetricsService.csproj", "{FD6E75CA-4BBC-41C6-A979-8816B74CD79E}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -268,6 +270,14 @@ {11BFAF65-FA51-4245-8747-F4BA39D10FA3}.Release|Any CPU.Build.0 = Release|Any CPU {11BFAF65-FA51-4245-8747-F4BA39D10FA3}.Release2005|Any CPU.ActiveCfg = Release|Any CPU {11BFAF65-FA51-4245-8747-F4BA39D10FA3}.Release2005|Any CPU.Build.0 = Release|Any CPU + {FD6E75CA-4BBC-41C6-A979-8816B74CD79E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FD6E75CA-4BBC-41C6-A979-8816B74CD79E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FD6E75CA-4BBC-41C6-A979-8816B74CD79E}.Debug2005|Any CPU.ActiveCfg = Debug|Any CPU + {FD6E75CA-4BBC-41C6-A979-8816B74CD79E}.Debug2005|Any CPU.Build.0 = Debug|Any CPU + {FD6E75CA-4BBC-41C6-A979-8816B74CD79E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FD6E75CA-4BBC-41C6-A979-8816B74CD79E}.Release|Any CPU.Build.0 = Release|Any CPU + {FD6E75CA-4BBC-41C6-A979-8816B74CD79E}.Release2005|Any CPU.ActiveCfg = Release|Any CPU + {FD6E75CA-4BBC-41C6-A979-8816B74CD79E}.Release2005|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE Added: NMail/trunk/References/IKVM.AWT.WinForms.dll =================================================================== (Binary files differ) Property changes on: NMail/trunk/References/IKVM.AWT.WinForms.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: NMail/trunk/References/IKVM.GNU.Classpath.dll =================================================================== (Binary files differ) Property changes on: NMail/trunk/References/IKVM.GNU.Classpath.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: NMail/trunk/References/IKVM.Runtime.dll =================================================================== (Binary files differ) Property changes on: NMail/trunk/References/IKVM.Runtime.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: NMail/trunk/References/ZedGraph.dll =================================================================== (Binary files differ) Property changes on: NMail/trunk/References/ZedGraph.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: NMail/trunk/References/rrd4j-2.0.5.dll =================================================================== (Binary files differ) Property changes on: NMail/trunk/References/rrd4j-2.0.5.dll ___________________________________________________________________ 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-08-31 15:41:54
|
Revision: 269 http://nmailserver.svn.sourceforge.net/nmailserver/?rev=269&view=rev Author: tmyroadctfig Date: 2007-08-31 08:37:30 -0700 (Fri, 31 Aug 2007) Log Message: ----------- Work towards a more automated setup process. Modified Paths: -------------- NMail/trunk/NMail/NMail.csproj NMail/trunk/NMail.LocalStoreData.NHibernate/hibernate-localstore-configuration.xml NMail/trunk/NMail.PostInstall/PostInstallForm.cs NMail/trunk/NMail.Server/NMail.Server.csproj NMail/trunk/NMail.Server.Console/NMail.Server.Console.csproj NMail/trunk/NMail.Server.Console/NMail.config NMail/trunk/NMail.SetupWizard/DatabaseConfigPanel.Designer.cs NMail/trunk/NMail.SetupWizard/DatabaseConfigPanel.cs NMail/trunk/NMail.SetupWizard/LocalStoreConfigPanel.cs NMail/trunk/NMail.SetupWizard/ServiceConfigPanel.cs NMail/trunk/NMail.SetupWizard/SmtpSubSysConfigPanel.cs NMail/trunk/NMail.SpoolData.NHibernate/NHibernateSpoolData.cs NMail/trunk/NMail.SpoolData.NHibernate/hibernate-spool-configuration.xml NMail/trunk/References/MySql.Data.dll NMail/trunk/References/nhibernate/Iesi.Collections.dll NMail/trunk/References/nhibernate/Iesi.Collections.xml NMail/trunk/References/nhibernate/NHibernate.dll NMail/trunk/References/nhibernate/NHibernate.xml Modified: NMail/trunk/NMail/NMail.csproj =================================================================== --- NMail/trunk/NMail/NMail.csproj 2007-08-31 15:34:08 UTC (rev 268) +++ NMail/trunk/NMail/NMail.csproj 2007-08-31 15:37:30 UTC (rev 269) @@ -282,7 +282,6 @@ <Compile Include="Threading\NMailThreadStart.cs"> <SubType>Code</SubType> </Compile> - <Content Include="NMail.build" /> </ItemGroup> <ItemGroup> <Folder Include="DataTypes\Authentication\" /> Modified: NMail/trunk/NMail.LocalStoreData.NHibernate/hibernate-localstore-configuration.xml =================================================================== --- NMail/trunk/NMail.LocalStoreData.NHibernate/hibernate-localstore-configuration.xml 2007-08-31 15:34:08 UTC (rev 268) +++ NMail/trunk/NMail.LocalStoreData.NHibernate/hibernate-localstore-configuration.xml 2007-08-31 15:37:30 UTC (rev 269) @@ -3,7 +3,7 @@ <session-factory> <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property> <property name="connection.driver_class">NHibernate.Driver.MySqlDataDriver</property> - <property name="connection.connection_string">Host=127.0.0.1;Database=NMailLocalStore;Uid=root;Password=bis6ocha</property> + <property name="connection.connection_string">Host=127.0.0.1;Port=13306;Database=NMailLocalStore;Uid=NMail;Password=</property> <property name="dialect">NHibernate.Dialect.MySQL5Dialect</property> <property name="hibernate.query.substitutions">true 1, false 0</property> </session-factory> Modified: NMail/trunk/NMail.PostInstall/PostInstallForm.cs =================================================================== --- NMail/trunk/NMail.PostInstall/PostInstallForm.cs 2007-08-31 15:34:08 UTC (rev 268) +++ NMail/trunk/NMail.PostInstall/PostInstallForm.cs 2007-08-31 15:37:30 UTC (rev 269) @@ -67,6 +67,7 @@ public void Install(object unused) { try { + // Start the setup wizard ProcessStartInfo psi = new ProcessStartInfo(); psi.WorkingDirectory = GetInstallDirectory(); psi.FileName = psi.WorkingDirectory + Path.DirectorySeparatorChar + "NMail.SetupWizard.exe"; @@ -105,4 +106,4 @@ e.Cancel = true; } } -} \ No newline at end of file +} Modified: NMail/trunk/NMail.Server/NMail.Server.csproj =================================================================== --- NMail/trunk/NMail.Server/NMail.Server.csproj 2007-08-31 15:34:08 UTC (rev 268) +++ NMail/trunk/NMail.Server/NMail.Server.csproj 2007-08-31 15:37:30 UTC (rev 269) @@ -113,7 +113,6 @@ <Compile Include="RemoteAdministration.cs"> <SubType>Code</SubType> </Compile> - <Content Include="NMail.Server.build" /> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <PropertyGroup> Modified: NMail/trunk/NMail.Server.Console/NMail.Server.Console.csproj =================================================================== --- NMail/trunk/NMail.Server.Console/NMail.Server.Console.csproj 2007-08-31 15:34:08 UTC (rev 268) +++ NMail/trunk/NMail.Server.Console/NMail.Server.Console.csproj 2007-08-31 15:37:30 UTC (rev 269) @@ -183,7 +183,6 @@ <Content Include="logging.xml"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> - <Content Include="NMail.Server.Console.build" /> <Content Include="Warning.txt"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </Content> Modified: NMail/trunk/NMail.Server.Console/NMail.config =================================================================== --- NMail/trunk/NMail.Server.Console/NMail.config 2007-08-31 15:34:08 UTC (rev 268) +++ NMail/trunk/NMail.Server.Console/NMail.config 2007-08-31 15:37:30 UTC (rev 269) @@ -9,9 +9,7 @@ <section name="NMail.SmtpClient" type="NMail.SmtpClient.Configuration.SmtpClientConfiguration, NMail.SmtpClient" /> <section name="NMail.SpoolService" type="NMail.SpoolService.Configuration.SpoolServiceConfiguration, NMail.SpoolService" /> <section name="NMail.SpoolFilterService" type="NMail.SpoolFilter.Configuration.SpoolFilterServiceConfiguration, NMail.SpoolFilter" /> - <section name="NMail.SpoolData.MySql" type="NMail.SpoolData.MySql.Configuration.MySqlSpoolDataConfiguration, NMail.SpoolData.MySql" /> <section name="NMail.MessageRouter" type="NMail.MessageRouter.Configuration.MessageRouterConfiguration, NMail.MessageRouter" /> - <section name="NMail.LocalStoreData.MySql" type="NMail.LocalStoreData.MySql.Configuration.MySqlLocalStoreDataConfiguration, NMail.LocalStoreData.MySql" /> <section name="NMail.LocalStoreData.NHibernate" type="NMail.LocalStoreData.NHibernate.Configuration, NMail.LocalStoreData.NHibernate" /> <section name="NMail.SpoolData.NHibernate" type="NMail.SpoolData.NHibernate.Configuration, NMail.SpoolData.NHibernate" /> <section name="NMail.MetricsService" type="NMail.MetricsService.Configuration.MetricsServiceConfiguration, NMail.MetricsService" /> @@ -96,10 +94,6 @@ <Filter Type="NMail.SpoolFilter.NoActionFilter, NMail.SpoolFilter" /> </NMail.SpoolFilterService> - <NMail.SpoolData.MySql ConnectionString="Database=NMailSpool;Uid=NMail;Password=moo" /> - - <NMail.LocalStoreData.MySql ConnectionString="Database=NMailLocalStore;Uid=NMail;Password=moo"/> - <NMail.LocalStoreData.NHibernate NHibernateCfgFile="hibernate-localstore-configuration.xml"/> <NMail.SpoolData.NHibernate NHibernateCfgFile="hibernate-spool-configuration.xml"/> Modified: NMail/trunk/NMail.SetupWizard/DatabaseConfigPanel.Designer.cs =================================================================== --- NMail/trunk/NMail.SetupWizard/DatabaseConfigPanel.Designer.cs 2007-08-31 15:34:08 UTC (rev 268) +++ NMail/trunk/NMail.SetupWizard/DatabaseConfigPanel.Designer.cs 2007-08-31 15:37:30 UTC (rev 269) @@ -28,7 +28,10 @@ this.localStoreHibernateTextBox = new System.Windows.Forms.TextBox(); this.spoolLabel = new System.Windows.Forms.Label(); this.localStoreLabel = new System.Windows.Forms.Label(); + this.advanceConfigBox = new System.Windows.Forms.GroupBox(); + this.enabledAdvanceConfig = new System.Windows.Forms.CheckBox(); this.mainPanel.SuspendLayout(); + this.advanceConfigBox.SuspendLayout(); this.SuspendLayout(); // // titleLabel @@ -38,10 +41,8 @@ // // mainPanel // - this.mainPanel.Controls.Add(this.localStoreLabel); - this.mainPanel.Controls.Add(this.spoolLabel); - this.mainPanel.Controls.Add(this.localStoreHibernateTextBox); - this.mainPanel.Controls.Add(this.spoolHibernateTextBox); + this.mainPanel.Controls.Add(this.enabledAdvanceConfig); + this.mainPanel.Controls.Add(this.advanceConfigBox); this.mainPanel.Controls.Add(this.descriptionTextBox); this.mainPanel.Size = new System.Drawing.Size(357, 273); // @@ -49,7 +50,8 @@ // this.descriptionTextBox.BackColor = System.Drawing.Color.White; this.descriptionTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.descriptionTextBox.Location = new System.Drawing.Point(8, 8); + this.descriptionTextBox.Enabled = false; + this.descriptionTextBox.Location = new System.Drawing.Point(11, 33); this.descriptionTextBox.Name = "descriptionTextBox"; this.descriptionTextBox.ReadOnly = true; this.descriptionTextBox.Size = new System.Drawing.Size(343, 40); @@ -64,26 +66,26 @@ // this.spoolHibernateTextBox.AcceptsReturn = true; this.spoolHibernateTextBox.AcceptsTab = true; - this.spoolHibernateTextBox.Location = new System.Drawing.Point(8, 77); + this.spoolHibernateTextBox.Location = new System.Drawing.Point(6, 35); this.spoolHibernateTextBox.Multiline = true; this.spoolHibernateTextBox.Name = "spoolHibernateTextBox"; - this.spoolHibernateTextBox.Size = new System.Drawing.Size(338, 77); + this.spoolHibernateTextBox.Size = new System.Drawing.Size(331, 62); this.spoolHibernateTextBox.TabIndex = 3; // // localStoreHibernateTextBox // this.localStoreHibernateTextBox.AcceptsReturn = true; this.localStoreHibernateTextBox.AcceptsTab = true; - this.localStoreHibernateTextBox.Location = new System.Drawing.Point(6, 188); + this.localStoreHibernateTextBox.Location = new System.Drawing.Point(6, 116); this.localStoreHibernateTextBox.Multiline = true; this.localStoreHibernateTextBox.Name = "localStoreHibernateTextBox"; - this.localStoreHibernateTextBox.Size = new System.Drawing.Size(338, 77); + this.localStoreHibernateTextBox.Size = new System.Drawing.Size(331, 62); this.localStoreHibernateTextBox.TabIndex = 4; // // spoolLabel // this.spoolLabel.AutoSize = true; - this.spoolLabel.Location = new System.Drawing.Point(6, 61); + this.spoolLabel.Location = new System.Drawing.Point(6, 19); this.spoolLabel.Name = "spoolLabel"; this.spoolLabel.Size = new System.Drawing.Size(37, 13); this.spoolLabel.TabIndex = 5; @@ -92,12 +94,37 @@ // localStoreLabel // this.localStoreLabel.AutoSize = true; - this.localStoreLabel.Location = new System.Drawing.Point(5, 172); + this.localStoreLabel.Location = new System.Drawing.Point(6, 100); this.localStoreLabel.Name = "localStoreLabel"; this.localStoreLabel.Size = new System.Drawing.Size(64, 13); this.localStoreLabel.TabIndex = 6; this.localStoreLabel.Text = "Local Store:"; // + // advanceConfigBox + // + this.advanceConfigBox.Controls.Add(this.spoolHibernateTextBox); + this.advanceConfigBox.Controls.Add(this.localStoreLabel); + this.advanceConfigBox.Controls.Add(this.localStoreHibernateTextBox); + this.advanceConfigBox.Controls.Add(this.spoolLabel); + this.advanceConfigBox.Enabled = false; + this.advanceConfigBox.Location = new System.Drawing.Point(11, 79); + this.advanceConfigBox.Name = "advanceConfigBox"; + this.advanceConfigBox.Size = new System.Drawing.Size(343, 186); + this.advanceConfigBox.TabIndex = 7; + this.advanceConfigBox.TabStop = false; + this.advanceConfigBox.Text = "Advanced Database Configuration"; + // + // enabledAdvanceConfig + // + this.enabledAdvanceConfig.AutoSize = true; + this.enabledAdvanceConfig.Location = new System.Drawing.Point(11, 10); + this.enabledAdvanceConfig.Name = "enabledAdvanceConfig"; + this.enabledAdvanceConfig.Size = new System.Drawing.Size(315, 17); + this.enabledAdvanceConfig.TabIndex = 8; + this.enabledAdvanceConfig.Text = "Enabled advance database configuration (not recommended)"; + this.enabledAdvanceConfig.UseVisualStyleBackColor = true; + this.enabledAdvanceConfig.CheckedChanged += new System.EventHandler(this.enabledAdvanceConfig_CheckedChanged); + // // DatabaseConfigPanel // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -106,6 +133,8 @@ this.Size = new System.Drawing.Size(457, 355); this.mainPanel.ResumeLayout(false); this.mainPanel.PerformLayout(); + this.advanceConfigBox.ResumeLayout(false); + this.advanceConfigBox.PerformLayout(); this.ResumeLayout(false); } @@ -117,5 +146,7 @@ private System.Windows.Forms.TextBox localStoreHibernateTextBox; private System.Windows.Forms.Label localStoreLabel; private System.Windows.Forms.Label spoolLabel; + private System.Windows.Forms.GroupBox advanceConfigBox; + private System.Windows.Forms.CheckBox enabledAdvanceConfig; } } Modified: NMail/trunk/NMail.SetupWizard/DatabaseConfigPanel.cs =================================================================== --- NMail/trunk/NMail.SetupWizard/DatabaseConfigPanel.cs 2007-08-31 15:34:08 UTC (rev 268) +++ NMail/trunk/NMail.SetupWizard/DatabaseConfigPanel.cs 2007-08-31 15:37:30 UTC (rev 269) @@ -18,10 +18,15 @@ using System; using System.Collections.Generic; using System.ComponentModel; +using System.Data; +using System.Diagnostics; using System.Drawing; -using System.Data; using System.IO; +using System.Net; +using System.Net.Sockets; +using System.ServiceProcess; using System.Text; +using System.Threading; using System.Windows.Forms; namespace NMail.SetupWizard { @@ -34,6 +39,18 @@ this.PreviousPanel = previous; this.NextPanel = new RemoteAdminConfigPanel(this.BaseForm, this); + this.startNMailMySqlTask = new Task("Ensure NMail DB is running.", new TaskDelegate(startNMailMySqlDBNow)); + + // Find the NMail MySQL service controller + ServiceController[] services = ServiceController.GetServices(); + + foreach (ServiceController service in services) { + if (service.DisplayName == "NMail MySQL Database") { + this.nmailMySqlServiceController = service; + break; + } + } + loadConfiguration(); } @@ -41,7 +58,60 @@ private SmtpSubSysConfigPanel smtpConfigPanel; + #region MySQL Service + + private ServiceController nmailMySqlServiceController; + + private Task startNMailMySqlTask; + /// <summary> + /// The task delegate used to start the NMail MySQL DB service. + /// </summary> + /// <param name="message">An error message if any problems occur.</param> + /// <returns>The result of the start attempt.</returns> + private TaskResult startNMailMySqlDBNow(out string message) { + try { + if (this.nmailMySqlServiceController.Status == ServiceControllerStatus.Stopped) { + this.nmailMySqlServiceController.Start(); + } + + if (!enabledAdvanceConfig.Checked) { + bool connectedSuccessfully = false; + + // Poll the MySQL server until it starts up properly + for (int i = 0; i < 120; i++) { + try { + using (TcpClient client = new TcpClient()) { + client.Connect(new IPEndPoint(IPAddress.Loopback, 13306)); + + if (client.Connected) { + connectedSuccessfully = true; + break; + } + } + + } catch (Exception) { } + + Thread.Sleep(TimeSpan.FromSeconds(1)); + } + + if (!connectedSuccessfully) { + message = "Error connecting to the MySQL database."; + return TaskResult.Error; + } + } + + message = null; + return TaskResult.Ok; + + } catch (Exception e) { + message = "Error starting NMail MySQL database service: " + e.Message; + return TaskResult.Error; + } + } + #endregion + + /// <summary> /// Stores the settings into the configuration objects. /// </summary> private void storeConfiguration() { @@ -106,6 +176,11 @@ } } + private void enabledAdvanceConfig_CheckedChanged(object sender, EventArgs e) { + this.advanceConfigBox.Enabled = this.enabledAdvanceConfig.Checked; + this.descriptionTextBox.Enabled = this.enabledAdvanceConfig.Checked; + } + protected override void OnNextButtonClick() { try { storeConfiguration(); @@ -114,10 +189,24 @@ MessageBox.Show(this, e.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } + + // Add the start MySQL service task if required + if ((this.smtpConfigPanel.RegenerateDatabase || this.localStoreConfigPanel.RegenerateDatabase) + && !this.enabledAdvanceConfig.Checked + && !this.BaseForm.Tasks.Contains(this.startNMailMySqlTask)) { + + this.BaseForm.Tasks.Insert(BaseForm.Tasks.Count - 2, this.startNMailMySqlTask); + } base.OnNextButtonClick(); } + protected override void OnBackButtonClick() { + this.BaseForm.Tasks.Remove(this.startNMailMySqlTask); + + base.OnBackButtonClick(); + } + private void descriptionTextBox_LinkClicked(object sender, LinkClickedEventArgs e) { try { System.Diagnostics.Process.Start(e.LinkText); Modified: NMail/trunk/NMail.SetupWizard/LocalStoreConfigPanel.cs =================================================================== --- NMail/trunk/NMail.SetupWizard/LocalStoreConfigPanel.cs 2007-08-31 15:34:08 UTC (rev 268) +++ NMail/trunk/NMail.SetupWizard/LocalStoreConfigPanel.cs 2007-08-31 15:37:30 UTC (rev 269) @@ -24,11 +24,14 @@ using System.Text; using System.Windows.Forms; +using Microsoft.Win32; + using NMail.Configuration; using NMail.DataTypes; using NMail.Helper; using NMail.ImapService.Configuration; using NMail.LocalStoreData.NHibernate; +using NMail.Server; namespace NMail.SetupWizard { public partial class LocalStoreConfigPanel : BasePanel { @@ -44,8 +47,8 @@ this.enableLocalStoreSubSysBox.Checked = true; - // Disable the regenerate DB check box since there is an existing config - this.regenDbCheckBox.Checked = false; + // Only regenerate the DB tables if not previously done + this.regenDbCheckBox.Checked = performInitialDBInstall(); // Ensure the rest are there ImapServiceConfiguration.AddToConfigFile(); @@ -80,8 +83,19 @@ /// <returns>The result of the attempt to create the tables.</returns> private TaskResult makeStoreTables(out string message) { try { + // Reinstall the local store schema NMailConfiguration.Current.LocalStoreData.ReinstallSchema(); + // Set a registry key showing that the database has had it's initial install + RegistryKey nmailServerKey = Registry.LocalMachine.OpenSubKey(NMailServer.NMailRegistryKey, true); + if (nmailServerKey == null) { + throw new InvalidOperationException("Can't find the NMail registry keys, check your installation."); + } + List<string> valueNames = new List<string>(nmailServerKey.GetValueNames()); + if (!valueNames.Contains(InitialLocalStoreDBInstallValueName)) { + nmailServerKey.SetValue(InitialLocalStoreDBInstallValueName, "done"); + } + message = null; return TaskResult.Ok; @@ -92,6 +106,22 @@ } /// <summary> + /// Checks if an initial DB install of tables, etc should be performed by this wizard. + /// </summary> + /// <returns>True if the install is required.</returns> + private bool performInitialDBInstall() { + RegistryKey nmailServerKey = Registry.LocalMachine.OpenSubKey(NMailServer.NMailRegistryKey, false); + if (nmailServerKey != null) { + List<string> valueNames = new List<string>(nmailServerKey.GetValueNames()); + if (!valueNames.Contains(InitialLocalStoreDBInstallValueName)) { + return true; + } + } + + return false; + } + + /// <summary> /// A flag to indicate if the local store database should be regenerated. /// </summary> public bool RegenerateDatabase { @@ -282,5 +312,7 @@ base.OnBackButtonClick(); } + + public const string InitialLocalStoreDBInstallValueName = "InitialLocalStoreDBInstall"; } } Modified: NMail/trunk/NMail.SetupWizard/ServiceConfigPanel.cs =================================================================== --- NMail/trunk/NMail.SetupWizard/ServiceConfigPanel.cs 2007-08-31 15:34:08 UTC (rev 268) +++ NMail/trunk/NMail.SetupWizard/ServiceConfigPanel.cs 2007-08-31 15:37:30 UTC (rev 269) @@ -113,6 +113,7 @@ private TaskResult configureServiceStartup(out string message) { try { + // Configure the NMail service RegistryKey serviceKey = Registry.LocalMachine.OpenSubKey(@"System\CurrentControlSet\Services\NMail.Server.Service.exe", true); if (serviceKey == null) { @@ -129,6 +130,23 @@ serviceKey.SetValue("Start", 3); } + // Configure the NMail MySQL service + serviceKey = Registry.LocalMachine.OpenSubKey(@"System\CurrentControlSet\Services\NMail MySQL Database", true); + + if (serviceKey == null) { + message = "Can't find NMail MySQL service configured on this system."; + return TaskResult.Error; + } + + if (this.systemStartCheckBox.Checked) { + // Start at startup + serviceKey.SetValue("Start", 2); + + } else { + // Don't start at startup + serviceKey.SetValue("Start", 3); + } + message = null; return TaskResult.Ok; Modified: NMail/trunk/NMail.SetupWizard/SmtpSubSysConfigPanel.cs =================================================================== --- NMail/trunk/NMail.SetupWizard/SmtpSubSysConfigPanel.cs 2007-08-31 15:34:08 UTC (rev 268) +++ NMail/trunk/NMail.SetupWizard/SmtpSubSysConfigPanel.cs 2007-08-31 15:37:30 UTC (rev 269) @@ -23,9 +23,12 @@ using System.Text; using System.Windows.Forms; +using Microsoft.Win32; + using NMail.Configuration; using NMail.DataTypes; using NMail.MessageRouter.Configuration; +using NMail.Server; using NMail.SmtpClient.Configuration; using NMail.SmtpService.Configuration; using NMail.SpoolFilter.Configuration; @@ -47,8 +50,8 @@ this.enableSmtpSubSysBox.Checked = true; - // Disable the regenerate DB check box since there is an existing config - this.regenDbCheckBox.Checked = false; + // Only regenerate the DB tables if not previously done + this.regenDbCheckBox.Checked = performInitialDBInstall(); // Ensure the rest are there SmtpClientConfiguration.AddToConfigFile(); @@ -85,8 +88,19 @@ /// <returns>The result of the attempt to create the tables.</returns> private TaskResult makeSpoolTables(out string message) { try { + // Reinstall the spool schema NMailConfiguration.Current.SpoolData.ReinstallSchema(); + // Set a registry key showing that the database has had it's initial install + RegistryKey nmailServerKey = Registry.LocalMachine.OpenSubKey(NMailServer.NMailRegistryKey, true); + if (nmailServerKey == null) { + throw new InvalidOperationException("Can't find the NMail registry keys, check your installation."); + } + List<string> valueNames = new List<string>(nmailServerKey.GetValueNames()); + if (!valueNames.Contains(InitialSpoolDBInstallValueName)) { + nmailServerKey.SetValue(InitialSpoolDBInstallValueName, "done"); + } + message = null; return TaskResult.Ok; @@ -97,6 +111,22 @@ } /// <summary> + /// Checks if an initial DB install of tables, etc should be performed by this wizard. + /// </summary> + /// <returns>True if the install is required.</returns> + private bool performInitialDBInstall() { + RegistryKey nmailServerKey = Registry.LocalMachine.OpenSubKey(NMailServer.NMailRegistryKey, false); + if (nmailServerKey != null) { + List<string> valueNames = new List<string>(nmailServerKey.GetValueNames()); + if (!valueNames.Contains(InitialSpoolDBInstallValueName)) { + return true; + } + } + + return false; + } + + /// <summary> /// A flag to indicate if the SMTP spool database should be regenerated. /// </summary> public bool RegenerateDatabase { @@ -338,5 +368,7 @@ base.OnBackButtonClick(); } + + public const string InitialSpoolDBInstallValueName = "InitialSpoolDBInstall"; } } \ No newline at end of file Modified: NMail/trunk/NMail.SpoolData.NHibernate/NHibernateSpoolData.cs =================================================================== --- NMail/trunk/NMail.SpoolData.NHibernate/NHibernateSpoolData.cs 2007-08-31 15:34:08 UTC (rev 268) +++ NMail/trunk/NMail.SpoolData.NHibernate/NHibernateSpoolData.cs 2007-08-31 15:37:30 UTC (rev 269) @@ -56,7 +56,7 @@ /// disabling this command. /// </summary> public void ReinstallSchema() { - new global::NHibernate.Tool.hbm2ddl.SchemaExport(this.hibernateCfg).Create(true, true); + new global::NHibernate.Tool.hbm2ddl.SchemaExport(this.hibernateCfg).Create(false, true); } #region Initialise Spool Filter Data Modified: NMail/trunk/NMail.SpoolData.NHibernate/hibernate-spool-configuration.xml =================================================================== --- NMail/trunk/NMail.SpoolData.NHibernate/hibernate-spool-configuration.xml 2007-08-31 15:34:08 UTC (rev 268) +++ NMail/trunk/NMail.SpoolData.NHibernate/hibernate-spool-configuration.xml 2007-08-31 15:37:30 UTC (rev 269) @@ -3,7 +3,7 @@ <session-factory> <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property> <property name="connection.driver_class">NHibernate.Driver.MySqlDataDriver</property> - <property name="connection.connection_string">Host=127.0.0.1;Database=NMailSpool;Uid=NMail;Password=moo</property> + <property name="connection.connection_string">Host=127.0.0.1;Port=13306;Database=NMailSpool;Uid=NMail;Password=</property> <property name="dialect">NHibernate.Dialect.MySQL5Dialect</property> <property name="hibernate.query.substitutions">true 1, false 0</property> </session-factory> Modified: NMail/trunk/References/MySql.Data.dll =================================================================== (Binary files differ) Modified: NMail/trunk/References/nhibernate/Iesi.Collections.dll =================================================================== (Binary files differ) Modified: NMail/trunk/References/nhibernate/Iesi.Collections.xml =================================================================== --- NMail/trunk/References/nhibernate/Iesi.Collections.xml 2007-08-31 15:34:08 UTC (rev 268) +++ NMail/trunk/References/nhibernate/Iesi.Collections.xml 2007-08-31 15:37:30 UTC (rev 269) @@ -152,42 +152,42 @@ </member> <member name="M:Iesi.Collections.Generic.ISet`1.ContainsAll(System.Collections.Generic.ICollection{`0})"> <summary> - Returns <c>true</c> if the set contains all the elements in the specified collection. + Returns <see langword="true" /> if the set contains all the elements in the specified collection. </summary> <param name="c">A collection of objects.</param> - <returns><c>true</c> if the set contains all the elements in the specified collection, <c>false</c> otherwise.</returns> + <returns><see langword="true" /> if the set contains all the elements in the specified collection, <see langword="false" /> otherwise.</returns> </member> <member name="M:Iesi.Collections.Generic.ISet`1.Add(`0)"> <summary> Adds the specified element to this set if it is not already present. </summary> <param name="o">The object to add to the set.</param> - <returns><c>true</c> is the object was added, <c>false</c> if it was already present.</returns> + <returns><see langword="true" /> is the object was added, <see langword="false" /> if it was already present.</returns> </member> <member name="M:Iesi.Collections.Generic.ISet`1.AddAll(System.Collections.Generic.ICollection{`0})"> <summary> Adds all the elements in the specified collection to the set if they are not already present. </summary> <param name="c">A collection of objects to add to the set.</param> - <returns><c>true</c> is the set changed as a result of this operation, <c>false</c> if not.</returns> + <returns><see langword="true" /> is the set changed as a result of this operation, <see langword="false" /> if not.</returns> </member> <member name="M:Iesi.Collections.Generic.ISet`1.RemoveAll(System.Collections.Generic.ICollection{`0})"> <summary> Remove all the specified elements from this set, if they exist in this set. </summary> <param name="c">A collection of elements to remove.</param> - <returns><c>true</c> if the set was modified as a result of this operation.</returns> + <returns><see langword="true" /> if the set was modified as a result of this operation.</returns> </member> <member name="M:Iesi.Collections.Generic.ISet`1.RetainAll(System.Collections.Generic.ICollection{`0})"> <summary> Retains only the elements in this set that are contained in the specified collection. </summary> <param name="c">Collection that defines the set of elements to be retained.</param> - <returns><c>true</c> if this set changed as a result of this operation.</returns> + <returns><see langword="true" /> if this set changed as a result of this operation.</returns> </member> <member name="P:Iesi.Collections.Generic.ISet`1.IsEmpty"> <summary> - Returns <c>true</c> if this set contains no elements. + Returns <see langword="true" /> if this set contains no elements. </summary> </member> <member name="T:Iesi.Collections.ISet"> @@ -274,52 +274,52 @@ </member> <member name="M:Iesi.Collections.ISet.Contains(System.Object)"> <summary> - Returns <c>true</c> if this set contains the specified element. + Returns <see langword="true" /> if this set contains the specified element. </summary> <param name="o">The element to look for.</param> - <returns><c>true</c> if this set contains the specified element, <c>false</c> otherwise.</returns> + <returns><see langword="true" /> if this set contains the specified element, <see langword="false" /> otherwise.</returns> </member> <member name="M:Iesi.Collections.ISet.ContainsAll(System.Collections.ICollection)"> <summary> - Returns <c>true</c> if the set contains all the elements in the specified collection. + Returns <see langword="true" /> if the set contains all the elements in the specified collection. </summary> <param name="c">A collection of objects.</param> - <returns><c>true</c> if the set contains all the elements in the specified collection, <c>false</c> otherwise.</returns> + <returns><see langword="true" /> if the set contains all the elements in the specified collection, <see langword="false" /> otherwise.</returns> </member> <member name="M:Iesi.Collections.ISet.Add(System.Object)"> <summary> Adds the specified element to this set if it is not already present. </summary> <param name="o">The object to add to the set.</param> - <returns><c>true</c> is the object was added, <c>false</c> if it was already present.</returns> + <returns><see langword="true" /> is the object was added, <see langword="false" /> if it was already present.</returns> </member> <member name="M:Iesi.Collections.ISet.AddAll(System.Collections.ICollection)"> <summary> Adds all the elements in the specified collection to the set if they are not already present. </summary> <param name="c">A collection of objects to add to the set.</param> - <returns><c>true</c> is the set changed as a result of this operation, <c>false</c> if not.</returns> + <returns><see langword="true" /> is the set changed as a result of this operation, <see langword="false" /> if not.</returns> </member> <member name="M:Iesi.Collections.ISet.Remove(System.Object)"> <summary> Removes the specified element from the set. </summary> <param name="o">The element to be removed.</param> - <returns><c>true</c> if the set contained the specified element, <c>false</c> otherwise.</returns> + <returns><see langword="true" /> if the set contained the specified element, <see langword="false" /> otherwise.</returns> </member> <member name="M:Iesi.Collections.ISet.RemoveAll(System.Collections.ICollection)"> <summary> Remove all the specified elements from this set, if they exist in this set. </summary> <param name="c">A collection of elements to remove.</param> - <returns><c>true</c> if the set was modified as a result of this operation.</returns> + <returns><see langword="true" /> if the set was modified as a result of this operation.</returns> </member> <member name="M:Iesi.Collections.ISet.RetainAll(System.Collections.ICollection)"> <summary> Retains only the elements in this set that are contained in the specified collection. </summary> <param name="c">Collection that defines the set of elements to be retained.</param> - <returns><c>true</c> if this set changed as a result of this operation.</returns> + <returns><see langword="true" /> if this set changed as a result of this operation.</returns> </member> <member name="M:Iesi.Collections.ISet.Clear"> <summary> @@ -328,7 +328,7 @@ </member> <member name="P:Iesi.Collections.ISet.IsEmpty"> <summary> - Returns <c>true</c> if this set contains no elements. + Returns <see langword="true" /> if this set contains no elements. </summary> </member> <member name="M:Iesi.Collections.Generic.Set`1.Union(Iesi.Collections.Generic.ISet{`0})"> @@ -346,23 +346,23 @@ <summary> Performs a "union" of two sets, where all the elements in both are present. That is, the element is included if it is in either <c>a</c> or <c>b</c>. - The return value is a <c>Clone()</c> of one of the sets (<c>a</c> if it is not <c>null</c>) with elements of the other set + The return value is a <c>Clone()</c> of one of the sets (<c>a</c> if it is not <see langword="null" />) with elements of the other set added in. Neither of the input sets is modified by the operation. </summary> <param name="a">A set of elements.</param> <param name="b">A set of elements.</param> - <returns>A set containing the union of the input sets. <c>null</c> if both sets are <c>null</c>.</returns> + <returns>A set containing the union of the input sets. <see langword="null" /> if both sets are <see langword="null" />.</returns> </member> <member name="M:Iesi.Collections.Generic.Set`1.op_BitwiseOr(Iesi.Collections.Generic.Set{`0},Iesi.Collections.Generic.Set{`0})"> <summary> Performs a "union" of two sets, where all the elements in both are present. That is, the element is included if it is in either <c>a</c> or <c>b</c>. - The return value is a <c>Clone()</c> of one of the sets (<c>a</c> if it is not <c>null</c>) with elements of the other set + The return value is a <c>Clone()</c> of one of the sets (<c>a</c> if it is not <see langword="null" />) with elements of the other set added in. Neither of the input sets is modified by the operation. </summary> <param name="a">A set of elements.</param> <param name="b">A set of elements.</param> - <returns>A set containing the union of the input sets. <c>null</c> if both sets are <c>null</c>.</returns> + <returns>A set containing the union of the input sets. <see langword="null" /> if both sets are <see langword="null" />.</returns> </member> <member name="M:Iesi.Collections.Generic.Set`1.Intersect(Iesi.Collections.Generic.ISet{`0})"> <summary> @@ -379,24 +379,24 @@ Performs an "intersection" of the two sets, where only the elements that are present in both sets remain. That is, the element is included only if it exists in both <c>a</c> and <c>b</c>. Neither input object is modified by the operation. - The result object is a <c>Clone()</c> of one of the input objects (<c>a</c> if it is not <c>null</c>) containing the + The result object is a <c>Clone()</c> of one of the input objects (<c>a</c> if it is not <see langword="null" />) containing the elements from the intersect operation. </summary> <param name="a">A set of elements.</param> <param name="b">A set of elements.</param> - <returns>The intersection of the two input sets. <c>null</c> if both sets are <c>null</c>.</returns> + <returns>The intersection of the two input sets. <see langword="null" /> if both sets are <see langword="null" />.</returns> </member> <member name="M:Iesi.Collections.Generic.Set`1.op_BitwiseAnd(Iesi.Collections.Generic.Set{`0},Iesi.Collections.Generic.Set{`0})"> <summary> Performs an "intersection" of the two sets, where only the elements that are present in both sets remain. That is, the element is included only if it exists in both <c>a</c> and <c>b</c>. Neither input object is modified by the operation. - The result object is a <c>Clone()</c> of one of the input objects (<c>a</c> if it is not <c>null</c>) containing the + The result object is a <c>Clone()</c> of one of the input objects (<c>a</c> if it is not <see langword="null" />) containing the elements from the intersect operation. </summary> <param name="a">A set of elements.</param> <param name="b">A set of elements.</param> - <returns>The intersection of the two input sets. <c>null</c> if both sets are <c>null</c>.</returns> + <returns>The intersection of the two input sets. <see langword="null" /> if both sets are <see langword="null" />.</returns> </member> <member name="M:Iesi.Collections.Generic.Set`1.Minus(Iesi.Collections.Generic.ISet{`0})"> <summary> @@ -417,7 +417,7 @@ </summary> <param name="a">A set of elements.</param> <param name="b">A set of elements.</param> - <returns>A set containing <c>A - B</c> elements. <c>null</c> if <c>a</c> is <c>null</c>.</returns> + <returns>A set containing <c>A - B</c> elements. <see langword="null" /> if <c>a</c> is <see langword="null" />.</returns> </member> <member name="M:Iesi.Collections.Generic.Set`1.op_Subtraction(Iesi.Collections.Generic.Set{`0},Iesi.Collections.Generic.Set{`0})"> <summary> @@ -428,7 +428,7 @@ </summary> <param name="a">A set of elements.</param> <param name="b">A set of elements.</param> - <returns>A set containing <c>A - B</c> elements. <c>null</c> if <c>a</c> is <c>null</c>.</returns> + <returns>A set containing <c>A - B</c> elements. <see langword="null" /> if <c>a</c> is <see langword="null" />.</returns> </member> <member name="M:Iesi.Collections.Generic.Set`1.ExclusiveOr(Iesi.Collections.Generic.ISet{`0})"> <summary> @@ -445,38 +445,38 @@ Performs an "exclusive-or" of the two sets, keeping only the elements that are in one of the sets, but not in both. The original sets are not modified during this operation. The result set is a <c>Clone()</c> of one of the sets - (<c>a</c> if it is not <c>null</c>) containing + (<c>a</c> if it is not <see langword="null" />) containing the elements from the exclusive-or operation. </summary> <param name="a">A set of elements.</param> <param name="b">A set of elements.</param> - <returns>A set containing the result of <c>a ^ b</c>. <c>null</c> if both sets are <c>null</c>.</returns> + <returns>A set containing the result of <c>a ^ b</c>. <see langword="null" /> if both sets are <see langword="null" />.</returns> </member> <member name="M:Iesi.Collections.Generic.Set`1.op_ExclusiveOr(Iesi.Collections.Generic.Set{`0},Iesi.Collections.Generic.Set{`0})"> <summary> Performs an "exclusive-or" of the two sets, keeping only the elements that are in one of the sets, but not in both. The original sets are not modified during this operation. The result set is a <c>Clone()</c> of one of the sets - (<c>a</c> if it is not <c>null</c>) containing + (<c>a</c> if it is not <see langword="null" />) containing the elements from the exclusive-or operation. </summary> <param name="a">A set of elements.</param> <param name="b">A set of elements.</param> - <returns>A set containing the result of <c>a ^ b</c>. <c>null</c> if both sets are <c>null</c>.</returns> + <returns>A set containing the result of <c>a ^ b</c>. <see langword="null" /> if both sets are <see langword="null" />.</returns> </member> <member name="M:Iesi.Collections.Generic.Set`1.Add(`0)"> <summary> Adds the specified element to this set if it is not already present. </summary> <param name="o">The object to add to the set.</param> - <returns><c>true</c> is the object was added, <c>false</c> if it was already present.</returns> + <returns><see langword="true" /> is the object was added, <see langword="false" /> if it was already present.</returns> </member> <member name="M:Iesi.Collections.Generic.Set`1.AddAll(System.Collections.Generic.ICollection{`0})"> <summary> Adds all the elements in the specified collection to the set if they are not already present. </summary> <param name="c">A collection of objects to add to the set.</param> - <returns><c>true</c> is the set changed as a result of this operation, <c>false</c> if not.</returns> + <returns><see langword="true" /> is the set changed as a result of this operation, <see langword="false" /> if not.</returns> </member> <member name="M:Iesi.Collections.Generic.Set`1.Clear"> <summary> @@ -485,38 +485,38 @@ </member> <member name="M:Iesi.Collections.Generic.Set`1.Contains(`0)"> <summary> - Returns <c>true</c> if this set contains the specified element. + Returns <see langword="true" /> if this set contains the specified element. </summary> <param name="o">The element to look for.</param> - <returns><c>true</c> if this set contains the specified element, <c>false</c> otherwise.</returns> + <returns><see langword="true" /> if this set contains the specified element, <see langword="false" /> otherwise.</returns> </member> <member name="M:Iesi.Collections.Generic.Set`1.ContainsAll(System.Collections.Generic.ICollection{`0})"> <summary> - Returns <c>true</c> if the set contains all the elements in the specified collection. + Returns <see langword="true" /> if the set contains all the elements in the specified collection. </summary> <param name="c">A collection of objects.</param> - <returns><c>true</c> if the set contains all the elements in the specified collection, <c>false</c> otherwise.</returns> + <returns><see langword="true" /> if the set contains all the elements in the specified collection, <see langword="false" /> otherwise.</returns> </member> <member name="M:Iesi.Collections.Generic.Set`1.Remove(`0)"> <summary> Removes the specified element from the set. </summary> <param name="o">The element to be removed.</param> - <returns><c>true</c> if the set contained the specified element, <c>false</c> otherwise.</returns> + <returns><see langword="true" /> if the set contained the specified element, <see langword="false" /> otherwise.</returns> </member> <member name="M:Iesi.Collections.Generic.Set`1.RemoveAll(System.Collections.Generic.ICollection{`0})"> <summary> Remove all the specified elements from this set, if they exist in this set. </summary> <param name="c">A collection of elements to remove.</param> - <returns><c>true</c> if the set was modified as a result of this operation.</returns> + <returns><see langword="true" /> if the set was modified as a result of this operation.</returns> </member> <member name="M:Iesi.Collections.Generic.Set`1.RetainAll(System.Collections.Generic.ICollection{`0})"> <summary> Retains only the elements in this set that are contained in the specified collection. </summary> <param name="c">Collection that defines the set of elements to be retained.</param> - <returns><c>true</c> if this set changed as a result of this operation.</returns> + <returns><see langword="true" /> if this set changed as a result of this operation.</returns> </member> <member name="M:Iesi.Collections.Generic.Set`1.Clone"> <summary> @@ -576,7 +576,7 @@ </member> <member name="P:Iesi.Collections.Generic.Set`1.IsEmpty"> <summary> - Returns <c>true</c> if this set contains no elements. + Returns <see langword="true" /> if this set contains no elements. </summary> </member> <member name="P:Iesi.Collections.Generic.Set`1.Count"> @@ -586,7 +586,7 @@ </member> <member name="P:Iesi.Collections.Generic.Set`1.IsSynchronized"> <summary> - Returns <c>true</c> if the <c>Set</c> is synchronized across threads. Note that + Returns <see langword="true" /> if the <c>Set</c> is synchronized across threads. Note that enumeration is inherently not thread-safe. Use the <c>SyncRoot</c> to lock the object during enumeration. </summary> @@ -603,7 +603,7 @@ Indicates whether the given instance is read-only or not </summary> <value> - <c>true</c> if the ISet is read-only; otherwise, <c>false</c>. + <see langword="true" /> if the ISet is read-only; otherwise, <see langword="false" />. In the default implementation of Set, this property always returns false. </value> </member> @@ -619,14 +619,14 @@ Adds the specified element to this set if it is not already present. </summary> <param name="o">The <typeparamref name="T"/> to add to the set.</param> - <returns><c>true</c> is the object was added, <c>false</c> if it was already present.</returns> + <returns><see langword="true" /> is the object was added, <see langword="false" /> if it was already present.</returns> </member> <member name="M:Iesi.Collections.Generic.DictionarySet`1.AddAll(System.Collections.Generic.ICollection{`0})"> <summary> Adds all the elements in the specified collection to the set if they are not already present. </summary> <param name="c">A collection of objects to add to the set.</param> - <returns><c>true</c> is the set changed as a result of this operation, <c>false</c> if not.</returns> + <returns><see langword="true" /> is the set changed as a result of this operation, <see langword="false" /> if not.</returns> </member> <member name="M:Iesi.Collections.Generic.DictionarySet`1.Clear"> <summary> @@ -635,38 +635,38 @@ </member> <member name="M:Iesi.Collections.Generic.DictionarySet`1.Contains(`0)"> <summary> - Returns <c>true</c> if this set contains the specified element. + Returns <see langword="true" /> if this set contains the specified element. </summary> <param name="o">The element to look for.</param> - <returns><c>true</c> if this set contains the specified element, <c>false</c> otherwise.</returns> + <returns><see langword="true" /> if this set contains the specified element, <see langword="false" /> otherwise.</returns> </member> <member name="M:Iesi.Collections.Generic.DictionarySet`1.ContainsAll(System.Collections.Generic.ICollection{`0})"> <summary> - Returns <c>true</c> if the set contains all the elements in the specified collection. + Returns <see langword="true" /> if the set contains all the elements in the specified collection. </summary> <param name="c">A collection of objects.</param> - <returns><c>true</c> if the set contains all the elements in the specified collection, <c>false</c> otherwise.</returns> + <returns><see langword="true" /> if the set contains all the elements in the specified collection, <see langword="false" /> otherwise.</returns> </member> <member name="M:Iesi.Collections.Generic.DictionarySet`1.Remove(`0)"> <summary> Removes the specified element from the set. </summary> <param name="o">The element to be removed.</param> - <returns><c>true</c> if the set contained the specified element, <c>false</c> otherwise.</returns> + <returns><see langword="true" /> if the set contained the specified element, <see langword="false" /> otherwise.</returns> </member> <member name="M:Iesi.Collections.Generic.DictionarySet`1.RemoveAll(System.Collections.Generic.ICollection{`0})"> <summary> Remove all the specified elements from this set, if they exist in this set. </summary> <param name="c">A collection of elements to remove.</param> - <returns><c>true</c> if the set was modified as a result of this operation.</returns> + <returns><see langword="true" /> if the set was modified as a result of this operation.</returns> </member> <member name="M:Iesi.Collections.Generic.DictionarySet`1.RetainAll(System.Collections.Generic.ICollection{`0})"> <summary> Retains only the elements in this set that are contained in the specified collection. </summary> <param name="c">Collection that defines the set of elements to be retained.</param> - <returns><c>true</c> if this set changed as a result of this operation.</returns> + <returns><see langword="true" /> if this set changed as a result of this operation.</returns> </member> <member name="M:Iesi.Collections.Generic.DictionarySet`1.CopyTo(`0[],System.Int32)"> <summary> @@ -701,7 +701,7 @@ </member> <member name="P:Iesi.Collections.Generic.DictionarySet`1.IsEmpty"> <summary> - Returns <c>true</c> if this set contains no elements. + Returns <see langword="true" /> if this set contains no elements. </summary> </member> <member name="P:Iesi.Collections.Generic.DictionarySet`1.Count"> @@ -784,17 +784,17 @@ </member> <member name="M:Iesi.Collections.Generic.ImmutableSet`1.Contains(`0)"> <summary> - Returns <c>true</c> if this set contains the specified element. + Returns <see langword="true" /> if this set contains the specified element. </summary> <param name="o">The element to look for.</param> - <returns><c>true</c> if this set contains the specified element, <c>false</c> otherwise.</returns> + <returns><see langword="true" /> if this set contains the specified element, <see langword="false" /> otherwise.</returns> </member> <member name="M:Iesi.Collections.Generic.ImmutableSet`1.ContainsAll(System.Collections.Generic.ICollection{`0})"> <summary> - Returns <c>true</c> if the set contains all the elements in the specified collection. + Returns <see langword="true" /> if the set contains all the elements in the specified collection. </summary> <param name="c">A collection of objects.</param> - <returns><c>true</c> if the set contains all the elements in the specified collection, <c>false</c> otherwise.</returns> + <returns><see langword="true" /> if the set contains all the elements in the specified collection, <see langword="false" /> otherwise.</returns> </member> <member name="M:Iesi.Collections.Generic.ImmutableSet`1.Remove(`0)"> <summary> @@ -918,7 +918,7 @@ </member> <member name="P:Iesi.Collections.Generic.ImmutableSet`1.IsEmpty"> <summary> - Returns <c>true</c> if this set contains no elements. + Returns <see langword="true" /> if this set contains no elements. </summary> </member> <member name="P:Iesi.Collections.Generic.ImmutableSet`1.Count"> @@ -1001,14 +1001,14 @@ Adds the specified element to this set if it is not already present. </summary> <param name="o">The object to add to the set.</param> - <returns><c>true</c> is the object was added, <c>false</c> if it was already present.</returns> + <returns><see langword="true" /> is the object was added, <see langword="false" /> if it was already present.</returns> </member> <member name="M:Iesi.Collections.Generic.SynchronizedSet`1.AddAll(System.Collections.Generic.ICollection{`0})"> <summary> Adds all the elements in the specified collection to the set if they are not already present. </summary> <param name="c">A collection of objects to add to the set.</param> - <returns><c>true</c> is the set changed as a result of this operation, <c>false</c> if not.</returns> + <returns><see langword="true" /> is the set changed as a result of this operation, <see langword="false" /> if not.</returns> </member> <member name="M:Iesi.Collections.Generic.SynchronizedSet`1.Clear"> <summary> @@ -1017,38 +1017,38 @@ </member> <member name="M:Iesi.Collections.Generic.SynchronizedSet`1.Contains(`0)"> <summary> - Returns <c>true</c> if this set contains the specified element. + Returns <see langword="true" /> if this set contains the specified element. </summary> <param name="o">The element to look for.</param> - <returns><c>true</c> if this set contains the specified element, <c>false</c> otherwise.</returns> + <returns><see langword="true" /> if this set contains the specified element, <see langword="false" /> otherwise.</returns> </member> <member name="M:Iesi.Collections.Generic.SynchronizedSet`1.ContainsAll(System.Collections.Generic.ICollection{`0})"> <summary> - Returns <c>true</c> if the set contains all the elements in the specified collection. + Returns <see langword="true" /> if the set contains all the elements in the specified collection. </summary> <param name="c">A collection of objects.</param> - <returns><c>true</c> if the set contains all the elements in the specified collection, <c>false</c> otherwise.</returns> + <returns><see langword="true" /> if the set contains all the elements in the specified collection, <see langword="false" /> otherwise.</returns> </member> <member name="M:Iesi.Collections.Generic.SynchronizedSet`1.Remove(`0)"> <summary> Removes the specified element from the set. </summary> <param name="o">The element to be removed.</param> - <returns><c>true</c> if the set contained the specified element, <c>false</c> otherwise.</returns> + <returns><see langword="true" /> if the set contained the specified element, <see langword="false" /> otherwise.</returns> </member> <member name="M:Iesi.Collections.Generic.SynchronizedSet`1.RemoveAll(System.Collections.Generic.ICollection{`0})"> <summary> Remove all the specified elements from this set, if they exist in this set. </summary> <param name="c">A collection of elements to remove.</param> - <returns><c>true</c> if the set was modified as a result of this operation.</returns> + <returns><see langword="true" /> if the set was modified as a result of this operation.</returns> </member> <member name="M:Iesi.Collections.Generic.SynchronizedSet`1.RetainAll(System.Collections.Generic.ICollection{`0})"> <summary> Retains only the elements in this set that are contained in the specified collection. </summary> <param name="c">Collection that defines the set of elements to be retained.</param> - <returns><c>true</c> if this set changed as a result of this operation.</returns> + <returns><see langword="true" /> if this set changed as a result of this operation.</returns> </member> <member name="M:Iesi.Collections.Generic.SynchronizedSet`1.CopyTo(`0[],System.Int32)"> <summary> @@ -1080,7 +1080,7 @@ </member> <member name="P:Iesi.Collections.Generic.SynchronizedSet`1.IsEmpty"> <summary> - Returns <c>true</c> if this set contains no elements. + Returns <see langword="true" /> if this set contains no elements. </summary> </member> <member name="P:Iesi.Collections.Generic.SynchronizedSet`1.Count"> @@ -1090,7 +1090,7 @@ </member> <member name="P:Iesi.Collections.Generic.SynchronizedSet`1.IsSynchronized"> <summary> - Returns <c>true</c>, indicating that this object is thread-safe. The exception to this + Returns <see langword="true" />, indicating that this object is thread-safe. The exception to this is enumeration, which is inherently not thread-safe. Use the <c>SyncRoot</c> object to lock this object for the entire duration of the enumeration. </summary> @@ -1125,15 +1125,22 @@ </summary> </member> <member name="T:Iesi.Collections.Set"> - <summary><p>A collection that contains no duplicate elements. This class models the mathematical - <c>Set</c> abstraction, and is the base class for all other <c>Set</c> implementations. - The order of elements in a set is dependant on (a)the data-structure implementation, and - (b)the implementation of the various <c>Set</c> methods, and thus is not guaranteed.</p> - - <p>None of the <c>Set</c> implementations in this library are guranteed to be thread-safe - in any way unless wrapped in a <c>SynchronizedSet</c>.</p> - - <p>The following table summarizes the binary operators that are supported by the <c>Set</c> class.</p> + <summary>A collection that contains no duplicate elements.</summary> + <remarks> + <para> + This class models the mathematical set abstraction, and is the base class for all + other set implementations. The order of elements in a set is dependant on + (a) the data-structure implementation, and (b) the implementation of the various + ... [truncated message content] |
From: <tmy...@us...> - 2007-09-23 09:44:25
|
Revision: 275 http://nmailserver.svn.sourceforge.net/nmailserver/?rev=275&view=rev Author: tmyroadctfig Date: 2007-09-23 02:44:26 -0700 (Sun, 23 Sep 2007) Log Message: ----------- Moved database tests out of unit test assembly. Modified Paths: -------------- NMail/trunk/NMail.UnitTests/NMail.UnitTests.csproj NMail/trunk/NMail.sln Added Paths: ----------- NMail/trunk/NMail.DatabaseTests/ NMail/trunk/NMail.DatabaseTests/AuthProvider/ NMail/trunk/NMail.DatabaseTests/AuthProvider/BaseAuthTest.cs NMail/trunk/NMail.DatabaseTests/AuthProvider/PasswordAutenticationTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/ NMail/trunk/NMail.DatabaseTests/LocalStoreData/AddUserToGroupTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/AddUserToMailDomainTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/BaseLocalStoreDataTest.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateCalendarTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateCalendarTest2.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateEventEntryTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateGroupTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateGroupTest2.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateMailDomainTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateMailDomainTest2.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateStoreFolderTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateStoreFolderTest2.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateUserTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateUserTest2.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/DeleteGroupTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/DeleteMailDomainTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/DeleteUserTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/DeleteUserTest2.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/DeliverMessageTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/DeliverMessageTest2.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/GetMessageCountTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/GetMessageCountWithFlagsTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/GetMessageDateTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/GetMessageHeadersTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/GetMessageIdTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/GetMessageIdsTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/GetMessageMimePartTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/GetMessageMimePartTest2.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/GetMessageOffsetTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/GetMessageSizeTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/GetMessageTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/GetNextMessageIdTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/GetSetMessageFlagsTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/GetSetRemoveSystemAceTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/GetSetRemoveUserGroupAdminAceTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/GetStoreFolderChildrenTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/GetStoreFolderTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/GetStoreFolderTest2.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/LoadSaveObjectTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/MoveStoreFolderTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/MoveStoreFolderTest2.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/MySqlLocalStoreTests.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/PurgeDeletedMessagesTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/RemoveStoreFolderAceTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/SetStoreFolderAceTest1.cs NMail/trunk/NMail.DatabaseTests/NMail.DatabaseTests.csproj NMail/trunk/NMail.DatabaseTests/Properties/ NMail/trunk/NMail.DatabaseTests/Properties/AssemblyInfo.cs NMail/trunk/NMail.DatabaseTests/SpoolData/ NMail/trunk/NMail.DatabaseTests/SpoolData/BaseSpoolDataTest.cs NMail/trunk/NMail.DatabaseTests/SpoolData/BeginDeliveryTest1.cs NMail/trunk/NMail.DatabaseTests/SpoolData/BeginDeliveryTest2.cs NMail/trunk/NMail.DatabaseTests/SpoolData/BeginDeliveryTest3.cs NMail/trunk/NMail.DatabaseTests/SpoolData/CompleteDeliveryTest1.cs NMail/trunk/NMail.DatabaseTests/SpoolData/FilterTest1.cs NMail/trunk/NMail.DatabaseTests/SpoolData/FilterTest2.cs NMail/trunk/NMail.DatabaseTests/SpoolData/FilterTest3.cs NMail/trunk/NMail.DatabaseTests/SpoolData/GetMsgToFilterTest1.cs NMail/trunk/NMail.DatabaseTests/SpoolData/InitTest1.cs NMail/trunk/NMail.DatabaseTests/SpoolData/NextDeliveryTest1.cs NMail/trunk/NMail.DatabaseTests/SpoolData/SpoolMessageTest1.cs Removed Paths: ------------- NMail/trunk/NMail.DatabaseTests/AuthProvider/BaseAuthTest.cs NMail/trunk/NMail.DatabaseTests/AuthProvider/PasswordAutenticationTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/AddUserToGroupTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/AddUserToMailDomainTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/BaseLocalStoreDataTest.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateCalendarTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateCalendarTest2.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateEventEntryTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateGroupTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateGroupTest2.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateMailDomainTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateMailDomainTest2.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateStoreFolderTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateStoreFolderTest2.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateUserTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateUserTest2.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/DeleteGroupTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/DeleteMailDomainTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/DeleteUserTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/DeleteUserTest2.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/DeliverMessageTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/DeliverMessageTest2.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/GetMessageCountTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/GetMessageCountWithFlagsTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/GetMessageDateTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/GetMessageHeadersTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/GetMessageIdTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/GetMessageIdsTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/GetMessageMimePartTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/GetMessageMimePartTest2.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/GetMessageOffsetTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/GetMessageSizeTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/GetMessageTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/GetNextMessageIdTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/GetSetMessageFlagsTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/GetSetRemoveSystemAceTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/GetSetRemoveUserGroupAdminAceTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/GetStoreFolderChildrenTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/GetStoreFolderTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/GetStoreFolderTest2.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/LoadSaveObjectTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/MoveStoreFolderTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/MoveStoreFolderTest2.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/MySqlLocalStoreTests.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/PurgeDeletedMessagesTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/RemoveStoreFolderAceTest1.cs NMail/trunk/NMail.DatabaseTests/LocalStoreData/SetStoreFolderAceTest1.cs NMail/trunk/NMail.DatabaseTests/SpoolData/BaseSpoolDataTest.cs NMail/trunk/NMail.DatabaseTests/SpoolData/BeginDeliveryTest1.cs NMail/trunk/NMail.DatabaseTests/SpoolData/BeginDeliveryTest2.cs NMail/trunk/NMail.DatabaseTests/SpoolData/BeginDeliveryTest3.cs NMail/trunk/NMail.DatabaseTests/SpoolData/CompleteDeliveryTest1.cs NMail/trunk/NMail.DatabaseTests/SpoolData/FilterTest1.cs NMail/trunk/NMail.DatabaseTests/SpoolData/FilterTest2.cs NMail/trunk/NMail.DatabaseTests/SpoolData/FilterTest3.cs NMail/trunk/NMail.DatabaseTests/SpoolData/GetMsgToFilterTest1.cs NMail/trunk/NMail.DatabaseTests/SpoolData/InitTest1.cs NMail/trunk/NMail.DatabaseTests/SpoolData/NextDeliveryTest1.cs NMail/trunk/NMail.DatabaseTests/SpoolData/SpoolMessageTest1.cs NMail/trunk/NMail.UnitTests/AuthProvider/ NMail/trunk/NMail.UnitTests/LocalStoreData/ NMail/trunk/NMail.UnitTests/SpoolData/ Property changes on: NMail/trunk/NMail.DatabaseTests ___________________________________________________________________ Name: svn:ignore + bin obj NMail.DatabaseTests.csproj.user Copied: NMail/trunk/NMail.DatabaseTests/AuthProvider (from rev 271, NMail/trunk/NMail.UnitTests/AuthProvider) Deleted: NMail/trunk/NMail.DatabaseTests/AuthProvider/BaseAuthTest.cs =================================================================== --- NMail/trunk/NMail.UnitTests/AuthProvider/BaseAuthTest.cs 2007-09-01 05:58:16 UTC (rev 271) +++ NMail/trunk/NMail.DatabaseTests/AuthProvider/BaseAuthTest.cs 2007-09-23 09:44:26 UTC (rev 275) @@ -1,38 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using NUnit.Framework; - -using NMail.Authentication; -using NMail.Configuration; -using NMail.DataTypes.LocalStore; - -namespace NMail.UnitTests.AuthProvider { - /// <summary> - /// A base class for authentication tests. - /// </summary> - public abstract class BaseAuthTest { - /// <summary> - /// The authentication provider. - /// </summary> - protected IAuthenticationProvider authProvider = NMailConfiguration.Current.AuthenticationProvider; - - /// <summary> - /// The local store data. - /// </summary> - protected ILocalStoreData localStoreData = NMailConfiguration.Current.LocalStoreData; - - [TestFixtureSetUp] - public void Setup() { - authProvider.Reinstall(); - localStoreData.ReinstallSchema(); - } - - [TestFixtureTearDown] - public void TearDown() { - authProvider.Reinstall(); - localStoreData.ReinstallSchema(); - } - } -} Copied: NMail/trunk/NMail.DatabaseTests/AuthProvider/BaseAuthTest.cs (from rev 274, NMail/trunk/NMail.UnitTests/AuthProvider/BaseAuthTest.cs) =================================================================== --- NMail/trunk/NMail.DatabaseTests/AuthProvider/BaseAuthTest.cs (rev 0) +++ NMail/trunk/NMail.DatabaseTests/AuthProvider/BaseAuthTest.cs 2007-09-23 09:44:26 UTC (rev 275) @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.Text; + +using NUnit.Framework; + +using NMail.Authentication; +using NMail.Configuration; +using NMail.DataTypes.LocalStore; + +namespace NMail.DatabaseTests.AuthProvider { + /// <summary> + /// A base class for authentication tests. + /// </summary> + public abstract class BaseAuthTest { + /// <summary> + /// The authentication provider. + /// </summary> + protected IAuthenticationProvider authProvider = NMailConfiguration.Current.AuthenticationProvider; + + /// <summary> + /// The local store data. + /// </summary> + protected ILocalStoreData localStoreData = NMailConfiguration.Current.LocalStoreData; + + [TestFixtureSetUp] + public void Setup() { + authProvider.Reinstall(); + localStoreData.ReinstallSchema(); + } + + [TestFixtureTearDown] + public void TearDown() { + authProvider.Reinstall(); + localStoreData.ReinstallSchema(); + } + } +} Deleted: NMail/trunk/NMail.DatabaseTests/AuthProvider/PasswordAutenticationTest1.cs =================================================================== --- NMail/trunk/NMail.UnitTests/AuthProvider/PasswordAutenticationTest1.cs 2007-09-01 05:58:16 UTC (rev 271) +++ NMail/trunk/NMail.DatabaseTests/AuthProvider/PasswordAutenticationTest1.cs 2007-09-23 09:44:26 UTC (rev 275) @@ -1,40 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using NUnit.Framework; - -using NMail.Authentication; -using NMail.Configuration; -using NMail.DataTypes.LocalStore; - -namespace NMail.UnitTests.AuthProvider { - /// <summary> - /// Tests authentication by password. - /// </summary> - [TestFixture] - public class PasswordAutenticationTest1 : BaseAuthTest { - - [Test] - public void TestPasswordAuth() { - LocalStoreUser user = new LocalStoreUser(); - user.Username = "Test"; - this.localStoreData.CreateUser(user); - - Assert.IsTrue(user.UserId > 0, "Valid user Id."); - Assert.IsTrue(user.UserFolderId > 0, "Valid user folder Id."); - - IAuthenticationToken authToken1 = this.authProvider.CreateAuthToken(user.Username); - Assert.IsNotNull(authToken1, "Valid auth token 1."); - - this.authProvider.SetEnabled(user.Username, true); - this.authProvider.ResetLockOut(user.Username); - - bool changed = this.authProvider.ChangePassword(authToken1, "TestPassword"); - Assert.AreEqual(true, changed, "Password changed."); - - IAuthenticationToken authToken2 = this.authProvider.Authenticate(user.Username, "TestPassword"); - Assert.IsNotNull(authToken2, "Valid auth token 2."); - } - } -} Copied: NMail/trunk/NMail.DatabaseTests/AuthProvider/PasswordAutenticationTest1.cs (from rev 274, NMail/trunk/NMail.UnitTests/AuthProvider/PasswordAutenticationTest1.cs) =================================================================== --- NMail/trunk/NMail.DatabaseTests/AuthProvider/PasswordAutenticationTest1.cs (rev 0) +++ NMail/trunk/NMail.DatabaseTests/AuthProvider/PasswordAutenticationTest1.cs 2007-09-23 09:44:26 UTC (rev 275) @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Text; + +using NUnit.Framework; + +using NMail.Authentication; +using NMail.Configuration; +using NMail.DataTypes.LocalStore; + +namespace NMail.DatabaseTests.AuthProvider { + /// <summary> + /// Tests authentication by password. + /// </summary> + [TestFixture] + [Category("Database Test")] + public class PasswordAutenticationTest1 : BaseAuthTest { + + [Test] + public void TestPasswordAuth() { + LocalStoreUser user = new LocalStoreUser(); + user.Username = "Test"; + this.localStoreData.CreateUser(user); + + Assert.IsTrue(user.UserId > 0, "Valid user Id."); + Assert.IsTrue(user.UserFolderId > 0, "Valid user folder Id."); + + IAuthenticationToken authToken1 = this.authProvider.CreateAuthToken(user.Username); + Assert.IsNotNull(authToken1, "Valid auth token 1."); + + this.authProvider.SetEnabled(user.Username, true); + this.authProvider.ResetLockOut(user.Username); + + bool changed = this.authProvider.ChangePassword(authToken1, "TestPassword"); + Assert.AreEqual(true, changed, "Password changed."); + + IAuthenticationToken authToken2 = this.authProvider.Authenticate(user.Username, "TestPassword"); + Assert.IsNotNull(authToken2, "Valid auth token 2."); + } + } +} Copied: NMail/trunk/NMail.DatabaseTests/LocalStoreData (from rev 271, NMail/trunk/NMail.UnitTests/LocalStoreData) Deleted: NMail/trunk/NMail.DatabaseTests/LocalStoreData/AddUserToGroupTest1.cs =================================================================== --- NMail/trunk/NMail.UnitTests/LocalStoreData/AddUserToGroupTest1.cs 2007-09-01 05:58:16 UTC (rev 271) +++ NMail/trunk/NMail.DatabaseTests/LocalStoreData/AddUserToGroupTest1.cs 2007-09-23 09:44:26 UTC (rev 275) @@ -1,41 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Data; -using System.Text; - -using NUnit.Framework; - -using NMail.Configuration; -using NMail.DataTypes.Calendar; -using NMail.DataTypes.LocalStore; - -namespace NMail.UnitTests.LocalStoreData { - /// <summary> - /// Tests adding a user to a group. - /// </summary> - [TestFixture] - public class AddUserToGroupTest1 : BaseLocalStoreDataTest { - - [ExpectedException(typeof(ArgumentException))] - [Test] - public void TestUpdateGroup() { - LocalStoreGroup group1 = new LocalStoreGroup(); - group1.Name = "Test"; - this.localStoreData.CreateGroup(group1); - - Assert.IsTrue(group1.GroupId > 0, "Valid group Id."); - - LocalStoreUser user1 = new LocalStoreUser(); - user1.Username = "Test"; - this.localStoreData.CreateUser(user1); - - Assert.IsTrue(user1.UserId > 0, "Valid user Id."); - - group1.UserIds.Add(user1.UserId); - this.localStoreData.UpdateGroup(group1); - - group1.UserIds.Add(-1); - this.localStoreData.UpdateGroup(group1); - } - } -} Copied: NMail/trunk/NMail.DatabaseTests/LocalStoreData/AddUserToGroupTest1.cs (from rev 274, NMail/trunk/NMail.UnitTests/LocalStoreData/AddUserToGroupTest1.cs) =================================================================== --- NMail/trunk/NMail.DatabaseTests/LocalStoreData/AddUserToGroupTest1.cs (rev 0) +++ NMail/trunk/NMail.DatabaseTests/LocalStoreData/AddUserToGroupTest1.cs 2007-09-23 09:44:26 UTC (rev 275) @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Text; + +using NUnit.Framework; + +using NMail.Configuration; +using NMail.DataTypes.Calendar; +using NMail.DataTypes.LocalStore; + +namespace NMail.DatabaseTests.LocalStoreData { + /// <summary> + /// Tests adding a user to a group. + /// </summary> + [TestFixture] + [Category("Database Test")] + public class AddUserToGroupTest1 : BaseLocalStoreDataTest { + + [ExpectedException(typeof(ArgumentException))] + [Test] + public void TestUpdateGroup() { + LocalStoreGroup group1 = new LocalStoreGroup(); + group1.Name = "Test"; + this.localStoreData.CreateGroup(group1); + + Assert.IsTrue(group1.GroupId > 0, "Valid group Id."); + + LocalStoreUser user1 = new LocalStoreUser(); + user1.Username = "Test"; + this.localStoreData.CreateUser(user1); + + Assert.IsTrue(user1.UserId > 0, "Valid user Id."); + + group1.UserIds.Add(user1.UserId); + this.localStoreData.UpdateGroup(group1); + + group1.UserIds.Add(-1); + this.localStoreData.UpdateGroup(group1); + } + } +} Deleted: NMail/trunk/NMail.DatabaseTests/LocalStoreData/AddUserToMailDomainTest1.cs =================================================================== --- NMail/trunk/NMail.UnitTests/LocalStoreData/AddUserToMailDomainTest1.cs 2007-09-01 05:58:16 UTC (rev 271) +++ NMail/trunk/NMail.DatabaseTests/LocalStoreData/AddUserToMailDomainTest1.cs 2007-09-23 09:44:26 UTC (rev 275) @@ -1,41 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Data; -using System.Text; - -using NUnit.Framework; - -using NMail.Configuration; -using NMail.DataTypes.Calendar; -using NMail.DataTypes.LocalStore; - -namespace NMail.UnitTests.LocalStoreData { - /// <summary> - /// Tests adding a user to a mail domain. - /// </summary> - [TestFixture] - public class AddUserToMailDomainTest1 : BaseLocalStoreDataTest { - - [ExpectedException(typeof(ArgumentException))] - [Test] - public void TestUpdateMailDomain() { - MailDomain md1 = new MailDomain(); - md1.PrimaryHost = new NMail.DataTypes.Host("test.tld"); - this.localStoreData.CreateMailDomain(md1); - - Assert.IsTrue(md1.MailDomainId > 0, "Valid mail domain Id."); - - LocalStoreUser user1 = new LocalStoreUser(); - user1.Username = "Test"; - this.localStoreData.CreateUser(user1); - - Assert.IsTrue(user1.UserId > 0, "Valid user Id."); - - md1.UserIds.Add(user1.UserId); - this.localStoreData.UpdateMailDomain(md1); - - md1.UserIds.Add(-1); - this.localStoreData.UpdateMailDomain(md1); - } - } -} Copied: NMail/trunk/NMail.DatabaseTests/LocalStoreData/AddUserToMailDomainTest1.cs (from rev 274, NMail/trunk/NMail.UnitTests/LocalStoreData/AddUserToMailDomainTest1.cs) =================================================================== --- NMail/trunk/NMail.DatabaseTests/LocalStoreData/AddUserToMailDomainTest1.cs (rev 0) +++ NMail/trunk/NMail.DatabaseTests/LocalStoreData/AddUserToMailDomainTest1.cs 2007-09-23 09:44:26 UTC (rev 275) @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Text; + +using NUnit.Framework; + +using NMail.Configuration; +using NMail.DataTypes.Calendar; +using NMail.DataTypes.LocalStore; + +namespace NMail.DatabaseTests.LocalStoreData { + /// <summary> + /// Tests adding a user to a mail domain. + /// </summary> + [TestFixture] + [Category("Database Test")] + public class AddUserToMailDomainTest1 : BaseLocalStoreDataTest { + + [ExpectedException(typeof(ArgumentException))] + [Test] + public void TestUpdateMailDomain() { + MailDomain md1 = new MailDomain(); + md1.PrimaryHost = new NMail.DataTypes.Host("test.tld"); + this.localStoreData.CreateMailDomain(md1); + + Assert.IsTrue(md1.MailDomainId > 0, "Valid mail domain Id."); + + LocalStoreUser user1 = new LocalStoreUser(); + user1.Username = "Test"; + this.localStoreData.CreateUser(user1); + + Assert.IsTrue(user1.UserId > 0, "Valid user Id."); + + md1.UserIds.Add(user1.UserId); + this.localStoreData.UpdateMailDomain(md1); + + md1.UserIds.Add(-1); + this.localStoreData.UpdateMailDomain(md1); + } + } +} Deleted: NMail/trunk/NMail.DatabaseTests/LocalStoreData/BaseLocalStoreDataTest.cs =================================================================== --- NMail/trunk/NMail.UnitTests/LocalStoreData/BaseLocalStoreDataTest.cs 2007-09-01 05:58:16 UTC (rev 271) +++ NMail/trunk/NMail.DatabaseTests/LocalStoreData/BaseLocalStoreDataTest.cs 2007-09-23 09:44:26 UTC (rev 275) @@ -1,27 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using NUnit.Framework; - -using NMail.DataTypes.LocalStore; - -namespace NMail.UnitTests.LocalStoreData { - /// <summary> - /// A base class for local store data tests. - /// </summary> - public abstract class BaseLocalStoreDataTest { - - protected ILocalStoreData localStoreData = NMail.Configuration.NMailConfiguration.Current.LocalStoreData; - - [TestFixtureSetUp] - public void Setup() { - localStoreData.ReinstallSchema(); - } - - [TestFixtureTearDown] - public void TearDown() { - localStoreData.ReinstallSchema(); - } - } -} Copied: NMail/trunk/NMail.DatabaseTests/LocalStoreData/BaseLocalStoreDataTest.cs (from rev 274, NMail/trunk/NMail.UnitTests/LocalStoreData/BaseLocalStoreDataTest.cs) =================================================================== --- NMail/trunk/NMail.DatabaseTests/LocalStoreData/BaseLocalStoreDataTest.cs (rev 0) +++ NMail/trunk/NMail.DatabaseTests/LocalStoreData/BaseLocalStoreDataTest.cs 2007-09-23 09:44:26 UTC (rev 275) @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Text; + +using NUnit.Framework; + +using NMail.DataTypes.LocalStore; + +namespace NMail.DatabaseTests.LocalStoreData { + /// <summary> + /// A base class for local store data tests. + /// </summary> + public abstract class BaseLocalStoreDataTest { + + protected ILocalStoreData localStoreData = NMail.Configuration.NMailConfiguration.Current.LocalStoreData; + + [TestFixtureSetUp] + public void Setup() { + localStoreData.ReinstallSchema(); + } + + [TestFixtureTearDown] + public void TearDown() { + localStoreData.ReinstallSchema(); + } + } +} Deleted: NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateCalendarTest1.cs =================================================================== --- NMail/trunk/NMail.UnitTests/LocalStoreData/CreateCalendarTest1.cs 2007-09-01 05:58:16 UTC (rev 271) +++ NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateCalendarTest1.cs 2007-09-23 09:44:26 UTC (rev 275) @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using NUnit.Framework; - -using NMail.Configuration; -using NMail.DataTypes.Calendar; -using NMail.DataTypes.LocalStore; - -namespace NMail.UnitTests.LocalStoreData { - /// <summary> - /// Calendar tests for the local store data. - /// </summary> - [TestFixture] - public class CreateCalendarTest1 : BaseLocalStoreDataTest { - - [Test] - public void TestCreateCalendar() { - Calendar c1 = new Calendar(); - c1.Name = "Test"; - c1.OwnerUserId = 1; - c1.ParentFolderId = 1; - - localStoreData.CreateCalandar(c1); - - Assert.IsTrue(c1.CalendarId > 0, "Valid calendar Id."); - } - } -} Copied: NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateCalendarTest1.cs (from rev 274, NMail/trunk/NMail.UnitTests/LocalStoreData/CreateCalendarTest1.cs) =================================================================== --- NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateCalendarTest1.cs (rev 0) +++ NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateCalendarTest1.cs 2007-09-23 09:44:26 UTC (rev 275) @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Text; + +using NUnit.Framework; + +using NMail.Configuration; +using NMail.DataTypes.Calendar; +using NMail.DataTypes.LocalStore; + +namespace NMail.DatabaseTests.LocalStoreData { + /// <summary> + /// Calendar tests for the local store data. + /// </summary> + [TestFixture] + [Category("Database Test")] + public class CreateCalendarTest1 : BaseLocalStoreDataTest { + + [Test] + public void TestCreateCalendar() { + Calendar c1 = new Calendar(); + c1.Name = "Test"; + c1.OwnerUserId = 1; + c1.ParentFolderId = 1; + + localStoreData.CreateCalandar(c1); + + Assert.IsTrue(c1.CalendarId > 0, "Valid calendar Id."); + } + } +} Deleted: NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateCalendarTest2.cs =================================================================== --- NMail/trunk/NMail.UnitTests/LocalStoreData/CreateCalendarTest2.cs 2007-09-01 05:58:16 UTC (rev 271) +++ NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateCalendarTest2.cs 2007-09-23 09:44:26 UTC (rev 275) @@ -1,40 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using NUnit.Framework; - -using NMail.Configuration; -using NMail.DataTypes.Calendar; -using NMail.DataTypes.LocalStore; - -namespace NMail.UnitTests.LocalStoreData { - /// <summary> - /// Calendar tests for the local store data. - /// </summary> - [TestFixture] - public class CreateCalendarTest2 : BaseLocalStoreDataTest { - - [Test] - [ExpectedException(typeof(System.Data.DuplicateNameException))] - public void TestCreateCalendarDuplicate() { - Calendar c1 = new Calendar(); - c1.Name = "Test"; - c1.OwnerUserId = 1; - c1.ParentFolderId = 1; - - localStoreData.CreateCalandar(c1); - - Assert.IsTrue(c1.CalendarId > 0, "Valid calendar Id."); - - Calendar c2 = new Calendar(); - c2.Name = "Test"; - c2.OwnerUserId = 1; - c2.ParentFolderId = 1; - - localStoreData.CreateCalandar(c2); - - Assert.Fail("Allowed duplicate calendar names."); - } - } -} Copied: NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateCalendarTest2.cs (from rev 274, NMail/trunk/NMail.UnitTests/LocalStoreData/CreateCalendarTest2.cs) =================================================================== --- NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateCalendarTest2.cs (rev 0) +++ NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateCalendarTest2.cs 2007-09-23 09:44:26 UTC (rev 275) @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Text; + +using NUnit.Framework; + +using NMail.Configuration; +using NMail.DataTypes.Calendar; +using NMail.DataTypes.LocalStore; + +namespace NMail.DatabaseTests.LocalStoreData { + /// <summary> + /// Calendar tests for the local store data. + /// </summary> + [TestFixture] + [Category("Database Test")] + public class CreateCalendarTest2 : BaseLocalStoreDataTest { + + [Test] + [ExpectedException(typeof(System.Data.DuplicateNameException))] + public void TestCreateCalendarDuplicate() { + Calendar c1 = new Calendar(); + c1.Name = "Test"; + c1.OwnerUserId = 1; + c1.ParentFolderId = 1; + + localStoreData.CreateCalandar(c1); + + Assert.IsTrue(c1.CalendarId > 0, "Valid calendar Id."); + + Calendar c2 = new Calendar(); + c2.Name = "Test"; + c2.OwnerUserId = 1; + c2.ParentFolderId = 1; + + localStoreData.CreateCalandar(c2); + + Assert.Fail("Allowed duplicate calendar names."); + } + } +} Deleted: NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateEventEntryTest1.cs =================================================================== --- NMail/trunk/NMail.UnitTests/LocalStoreData/CreateEventEntryTest1.cs 2007-09-01 05:58:16 UTC (rev 271) +++ NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateEventEntryTest1.cs 2007-09-23 09:44:26 UTC (rev 275) @@ -1,45 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using NUnit.Framework; - -using NMail.Configuration; -using NMail.DataTypes.Calendar; -using NMail.DataTypes.LocalStore; - -namespace NMail.UnitTests.LocalStoreData { - /// <summary> - /// Calendar tests for the local store data. - /// </summary> - [TestFixture] - public class CreateEventEntryTest1 : BaseLocalStoreDataTest { - - [Test] - public void TestCreateEventEntry() { - Calendar c1 = new Calendar(); - c1.Name = "Test"; - c1.OwnerUserId = 1; - c1.ParentFolderId = 1; - - localStoreData.CreateCalandar(c1); - - Assert.IsTrue(c1.CalendarId > 0, "Valid calendar Id."); - - DateTime startTime = DateTime.Now; - EventEntry e1 = new EventEntry(); - e1.Calendar = c1; - e1.OwnerUserId = c1.OwnerUserId; - e1.Categories.Add("Sample category."); - e1.Classification = NMail.DataTypes.Classification.Private; - e1.StartTime = startTime; - - localStoreData.CreateCalendarEntry(e1); - - IList<CalendarEntry> entries = localStoreData.GetCalendarEntries(startTime, DateTime.Now, c1.CalendarId); - - Assert.AreEqual(1, entries.Count, "Entries.count == 1"); - Assert.AreEqual(e1.EntryId, entries[0].EntryId, "e1.EntryId == entries[0].EntryId"); - } - } -} Copied: NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateEventEntryTest1.cs (from rev 274, NMail/trunk/NMail.UnitTests/LocalStoreData/CreateEventEntryTest1.cs) =================================================================== --- NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateEventEntryTest1.cs (rev 0) +++ NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateEventEntryTest1.cs 2007-09-23 09:44:26 UTC (rev 275) @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.Text; + +using NUnit.Framework; + +using NMail.Configuration; +using NMail.DataTypes.Calendar; +using NMail.DataTypes.LocalStore; + +namespace NMail.DatabaseTests.LocalStoreData { + /// <summary> + /// Calendar tests for the local store data. + /// </summary> + [TestFixture] + [Category("Database Test")] + public class CreateEventEntryTest1 : BaseLocalStoreDataTest { + + [Test] + public void TestCreateEventEntry() { + Calendar c1 = new Calendar(); + c1.Name = "Test"; + c1.OwnerUserId = 1; + c1.ParentFolderId = 1; + + localStoreData.CreateCalandar(c1); + + Assert.IsTrue(c1.CalendarId > 0, "Valid calendar Id."); + + DateTime startTime = DateTime.Now; + EventEntry e1 = new EventEntry(); + e1.Calendar = c1; + e1.OwnerUserId = c1.OwnerUserId; + e1.Categories.Add("Sample category."); + e1.Classification = NMail.DataTypes.Classification.Private; + e1.StartTime = startTime; + + localStoreData.CreateCalendarEntry(e1); + + IList<CalendarEntry> entries = localStoreData.GetCalendarEntries(startTime, DateTime.Now, c1.CalendarId); + + Assert.AreEqual(1, entries.Count, "Entries.count == 1"); + Assert.AreEqual(e1.EntryId, entries[0].EntryId, "e1.EntryId == entries[0].EntryId"); + } + } +} Deleted: NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateGroupTest1.cs =================================================================== --- NMail/trunk/NMail.UnitTests/LocalStoreData/CreateGroupTest1.cs 2007-09-01 05:58:16 UTC (rev 271) +++ NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateGroupTest1.cs 2007-09-23 09:44:26 UTC (rev 275) @@ -1,27 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using NUnit.Framework; - -using NMail.Configuration; -using NMail.DataTypes.Calendar; -using NMail.DataTypes.LocalStore; - -namespace NMail.UnitTests.LocalStoreData { - /// <summary> - /// Tests creating a group. - /// </summary> - [TestFixture] - public class CreateGroupTest1 : BaseLocalStoreDataTest { - - [Test] - public void TestCreateGroup() { - LocalStoreGroup group = new LocalStoreGroup(); - group.Name = "Test"; - this.localStoreData.CreateGroup(group); - - Assert.IsTrue(group.GroupId > 0, "Valid group Id."); - } - } -} Copied: NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateGroupTest1.cs (from rev 274, NMail/trunk/NMail.UnitTests/LocalStoreData/CreateGroupTest1.cs) =================================================================== --- NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateGroupTest1.cs (rev 0) +++ NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateGroupTest1.cs 2007-09-23 09:44:26 UTC (rev 275) @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Text; + +using NUnit.Framework; + +using NMail.Configuration; +using NMail.DataTypes.Calendar; +using NMail.DataTypes.LocalStore; + +namespace NMail.DatabaseTests.LocalStoreData { + /// <summary> + /// Tests creating a group. + /// </summary> + [TestFixture] + [Category("Database Test")] + public class CreateGroupTest1 : BaseLocalStoreDataTest { + + [Test] + public void TestCreateGroup() { + LocalStoreGroup group = new LocalStoreGroup(); + group.Name = "Test"; + this.localStoreData.CreateGroup(group); + + Assert.IsTrue(group.GroupId > 0, "Valid group Id."); + } + } +} Deleted: NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateGroupTest2.cs =================================================================== --- NMail/trunk/NMail.UnitTests/LocalStoreData/CreateGroupTest2.cs 2007-09-01 05:58:16 UTC (rev 271) +++ NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateGroupTest2.cs 2007-09-23 09:44:26 UTC (rev 275) @@ -1,35 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Data; -using System.Text; - -using NUnit.Framework; - -using NMail.Configuration; -using NMail.DataTypes.Calendar; -using NMail.DataTypes.LocalStore; - -namespace NMail.UnitTests.LocalStoreData { - /// <summary> - /// Tests creating a group. - /// </summary> - [TestFixture] - public class CreateGroupTest2 : BaseLocalStoreDataTest { - - [ExpectedException(typeof(DuplicateNameException))] - [Test] - public void TestCreateGroup() { - LocalStoreGroup group1 = new LocalStoreGroup(); - group1.Name = "Test"; - this.localStoreData.CreateGroup(group1); - - Assert.IsTrue(group1.GroupId > 0, "Valid group Id."); - - LocalStoreGroup group2 = new LocalStoreGroup(); - group2.Name = "Test"; - this.localStoreData.CreateGroup(group2); - - Assert.Fail("Allowed duplicate user names."); - } - } -} Copied: NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateGroupTest2.cs (from rev 274, NMail/trunk/NMail.UnitTests/LocalStoreData/CreateGroupTest2.cs) =================================================================== --- NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateGroupTest2.cs (rev 0) +++ NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateGroupTest2.cs 2007-09-23 09:44:26 UTC (rev 275) @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Text; + +using NUnit.Framework; + +using NMail.Configuration; +using NMail.DataTypes.Calendar; +using NMail.DataTypes.LocalStore; + +namespace NMail.DatabaseTests.LocalStoreData { + /// <summary> + /// Tests creating a group. + /// </summary> + [TestFixture] + [Category("Database Test")] + public class CreateGroupTest2 : BaseLocalStoreDataTest { + + [ExpectedException(typeof(DuplicateNameException))] + [Test] + public void TestCreateGroup() { + LocalStoreGroup group1 = new LocalStoreGroup(); + group1.Name = "Test"; + this.localStoreData.CreateGroup(group1); + + Assert.IsTrue(group1.GroupId > 0, "Valid group Id."); + + LocalStoreGroup group2 = new LocalStoreGroup(); + group2.Name = "Test"; + this.localStoreData.CreateGroup(group2); + + Assert.Fail("Allowed duplicate user names."); + } + } +} Deleted: NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateMailDomainTest1.cs =================================================================== --- NMail/trunk/NMail.UnitTests/LocalStoreData/CreateMailDomainTest1.cs 2007-09-01 05:58:16 UTC (rev 271) +++ NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateMailDomainTest1.cs 2007-09-23 09:44:26 UTC (rev 275) @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Data; -using System.Text; - -using NUnit.Framework; - -using NMail.Configuration; -using NMail.DataTypes; -using NMail.DataTypes.Calendar; -using NMail.DataTypes.LocalStore; - -namespace NMail.UnitTests.LocalStoreData { - /// <summary> - /// Tests creating a mail domain. - /// </summary> - [TestFixture] - public class CreateMailDomainTest1 : BaseLocalStoreDataTest { - - [Test] - public void CreateMailDomain() { - MailDomain m1 = new MailDomain(); - m1.PrimaryHost = new Host("test.tld"); - - localStoreData.CreateMailDomain(m1); - - Assert.IsTrue(m1.MailDomainId > 0, "Valid mail domain Id."); - } - } -} Copied: NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateMailDomainTest1.cs (from rev 274, NMail/trunk/NMail.UnitTests/LocalStoreData/CreateMailDomainTest1.cs) =================================================================== --- NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateMailDomainTest1.cs (rev 0) +++ NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateMailDomainTest1.cs 2007-09-23 09:44:26 UTC (rev 275) @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Text; + +using NUnit.Framework; + +using NMail.Configuration; +using NMail.DataTypes; +using NMail.DataTypes.Calendar; +using NMail.DataTypes.LocalStore; + +namespace NMail.DatabaseTests.LocalStoreData { + /// <summary> + /// Tests creating a mail domain. + /// </summary> + [TestFixture] + [Category("Database Test")] + public class CreateMailDomainTest1 : BaseLocalStoreDataTest { + + [Test] + public void CreateMailDomain() { + MailDomain m1 = new MailDomain(); + m1.PrimaryHost = new Host("test.tld"); + + localStoreData.CreateMailDomain(m1); + + Assert.IsTrue(m1.MailDomainId > 0, "Valid mail domain Id."); + } + } +} Deleted: NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateMailDomainTest2.cs =================================================================== --- NMail/trunk/NMail.UnitTests/LocalStoreData/CreateMailDomainTest2.cs 2007-09-01 05:58:16 UTC (rev 271) +++ NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateMailDomainTest2.cs 2007-09-23 09:44:26 UTC (rev 275) @@ -1,36 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Data; -using System.Text; - -using NUnit.Framework; - -using NMail.Configuration; -using NMail.DataTypes; -using NMail.DataTypes.Calendar; -using NMail.DataTypes.LocalStore; - -namespace NMail.UnitTests.LocalStoreData { - /// <summary> - /// Tests creating a mail domain. - /// </summary> - [TestFixture] - public class CreateMailDomainTest2 : BaseLocalStoreDataTest { - - [ExpectedException(typeof(DuplicateNameException))] - [Test] - public void CreateMailDomain() { - MailDomain m1 = new MailDomain(); - m1.PrimaryHost = new Host("test.tld"); - - localStoreData.CreateMailDomain(m1); - - Assert.IsTrue(m1.MailDomainId > 0, "Valid mail domain Id."); - - MailDomain m2 = new MailDomain(); - m2.PrimaryHost = new Host("test.tld"); - - localStoreData.CreateMailDomain(m2); - } - } -} Copied: NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateMailDomainTest2.cs (from rev 274, NMail/trunk/NMail.UnitTests/LocalStoreData/CreateMailDomainTest2.cs) =================================================================== --- NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateMailDomainTest2.cs (rev 0) +++ NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateMailDomainTest2.cs 2007-09-23 09:44:26 UTC (rev 275) @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Text; + +using NUnit.Framework; + +using NMail.Configuration; +using NMail.DataTypes; +using NMail.DataTypes.Calendar; +using NMail.DataTypes.LocalStore; + +namespace NMail.DatabaseTests.LocalStoreData { + /// <summary> + /// Tests creating a mail domain. + /// </summary> + [TestFixture] + [Category("Database Test")] + public class CreateMailDomainTest2 : BaseLocalStoreDataTest { + + [ExpectedException(typeof(DuplicateNameException))] + [Test] + public void CreateMailDomain() { + MailDomain m1 = new MailDomain(); + m1.PrimaryHost = new Host("test.tld"); + + localStoreData.CreateMailDomain(m1); + + Assert.IsTrue(m1.MailDomainId > 0, "Valid mail domain Id."); + + MailDomain m2 = new MailDomain(); + m2.PrimaryHost = new Host("test.tld"); + + localStoreData.CreateMailDomain(m2); + } + } +} Deleted: NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateStoreFolderTest1.cs =================================================================== --- NMail/trunk/NMail.UnitTests/LocalStoreData/CreateStoreFolderTest1.cs 2007-09-01 05:58:16 UTC (rev 271) +++ NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateStoreFolderTest1.cs 2007-09-23 09:44:26 UTC (rev 275) @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using NUnit.Framework; - -using NMail.Configuration; -using NMail.DataTypes.Calendar; -using NMail.DataTypes.LocalStore; - -namespace NMail.UnitTests.LocalStoreData { - /// <summary> - /// Tests creating a folder. - /// </summary> - [TestFixture] - public class CreateStoreFolderTest1 : BaseLocalStoreDataTest { - - [Test] - public void TestCreateFolder() { - StoreFolder s1 = new StoreFolder(); - s1.NameSpace = "Local"; - s1.FullFolderName = "TestFolder"; - s1.OwnerUserId = 1; - - localStoreData.CreateFolder(s1); - - Assert.IsTrue(s1.FolderId > 0, "Valid folder Id."); - } - } -} Copied: NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateStoreFolderTest1.cs (from rev 274, NMail/trunk/NMail.UnitTests/LocalStoreData/CreateStoreFolderTest1.cs) =================================================================== --- NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateStoreFolderTest1.cs (rev 0) +++ NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateStoreFolderTest1.cs 2007-09-23 09:44:26 UTC (rev 275) @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Text; + +using NUnit.Framework; + +using NMail.Configuration; +using NMail.DataTypes.Calendar; +using NMail.DataTypes.LocalStore; + +namespace NMail.DatabaseTests.LocalStoreData { + /// <summary> + /// Tests creating a folder. + /// </summary> + [TestFixture] + [Category("Database Test")] + public class CreateStoreFolderTest1 : BaseLocalStoreDataTest { + + [Test] + public void TestCreateFolder() { + StoreFolder s1 = new StoreFolder(); + s1.NameSpace = "Local"; + s1.FullFolderName = "TestFolder"; + s1.OwnerUserId = 1; + + localStoreData.CreateFolder(s1); + + Assert.IsTrue(s1.FolderId > 0, "Valid folder Id."); + } + } +} Deleted: NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateStoreFolderTest2.cs =================================================================== --- NMail/trunk/NMail.UnitTests/LocalStoreData/CreateStoreFolderTest2.cs 2007-09-01 05:58:16 UTC (rev 271) +++ NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateStoreFolderTest2.cs 2007-09-23 09:44:26 UTC (rev 275) @@ -1,38 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using NUnit.Framework; - -using NMail.Configuration; -using NMail.DataTypes.Calendar; -using NMail.DataTypes.LocalStore; - -namespace NMail.UnitTests.LocalStoreData { - /// <summary> - /// Tests creating a folder. - /// </summary> - [TestFixture] - public class CreateStoreFolderTest2 : BaseLocalStoreDataTest { - - [Test] - [ExpectedException(typeof(System.Data.DuplicateNameException))] - public void TestCreateFolder() { - StoreFolder s1 = new StoreFolder(); - s1.NameSpace = "Local"; - s1.FullFolderName = "TestFolder"; - s1.OwnerUserId = 1; - - localStoreData.CreateFolder(s1); - - Assert.IsTrue(s1.FolderId > 0, "Valid folder Id."); - - StoreFolder s2 = new StoreFolder(); - s2.NameSpace = "Local"; - s2.FullFolderName = "TestFolder"; - s2.OwnerUserId = 1; - - localStoreData.CreateFolder(s2); - } - } -} Copied: NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateStoreFolderTest2.cs (from rev 274, NMail/trunk/NMail.UnitTests/LocalStoreData/CreateStoreFolderTest2.cs) =================================================================== --- NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateStoreFolderTest2.cs (rev 0) +++ NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateStoreFolderTest2.cs 2007-09-23 09:44:26 UTC (rev 275) @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.Text; + +using NUnit.Framework; + +using NMail.Configuration; +using NMail.DataTypes.Calendar; +using NMail.DataTypes.LocalStore; + +namespace NMail.DatabaseTests.LocalStoreData { + /// <summary> + /// Tests creating a folder. + /// </summary> + [TestFixture] + [Category("Database Test")] + public class CreateStoreFolderTest2 : BaseLocalStoreDataTest { + + [Test] + [ExpectedException(typeof(System.Data.DuplicateNameException))] + public void TestCreateFolder() { + StoreFolder s1 = new StoreFolder(); + s1.NameSpace = "Local"; + s1.FullFolderName = "TestFolder"; + s1.OwnerUserId = 1; + + localStoreData.CreateFolder(s1); + + Assert.IsTrue(s1.FolderId > 0, "Valid folder Id."); + + StoreFolder s2 = new StoreFolder(); + s2.NameSpace = "Local"; + s2.FullFolderName = "TestFolder"; + s2.OwnerUserId = 1; + + localStoreData.CreateFolder(s2); + } + } +} Deleted: NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateUserTest1.cs =================================================================== --- NMail/trunk/NMail.UnitTests/LocalStoreData/CreateUserTest1.cs 2007-09-01 05:58:16 UTC (rev 271) +++ NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateUserTest1.cs 2007-09-23 09:44:26 UTC (rev 275) @@ -1,28 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using NUnit.Framework; - -using NMail.Configuration; -using NMail.DataTypes.Calendar; -using NMail.DataTypes.LocalStore; - -namespace NMail.UnitTests.LocalStoreData { - /// <summary> - /// Tests creating a user. - /// </summary> - [TestFixture] - public class CreateUserTest1 : BaseLocalStoreDataTest { - - [Test] - public void TestCreateUser() { - LocalStoreUser user = new LocalStoreUser(); - user.Username = "Test"; - this.localStoreData.CreateUser(user); - - Assert.IsTrue(user.UserId > 0, "Valid user Id."); - Assert.IsTrue(user.UserFolderId > 0, "Valid user folder Id."); - } - } -} Copied: NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateUserTest1.cs (from rev 274, NMail/trunk/NMail.UnitTests/LocalStoreData/CreateUserTest1.cs) =================================================================== --- NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateUserTest1.cs (rev 0) +++ NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateUserTest1.cs 2007-09-23 09:44:26 UTC (rev 275) @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Text; + +using NUnit.Framework; + +using NMail.Configuration; +using NMail.DataTypes.Calendar; +using NMail.DataTypes.LocalStore; + +namespace NMail.DatabaseTests.LocalStoreData { + /// <summary> + /// Tests creating a user. + /// </summary> + [TestFixture] + [Category("Database Test")] + public class CreateUserTest1 : BaseLocalStoreDataTest { + + [Test] + public void TestCreateUser() { + LocalStoreUser user = new LocalStoreUser(); + user.Username = "Test"; + this.localStoreData.CreateUser(user); + + Assert.IsTrue(user.UserId > 0, "Valid user Id."); + Assert.IsTrue(user.UserFolderId > 0, "Valid user folder Id."); + } + } +} Deleted: NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateUserTest2.cs =================================================================== --- NMail/trunk/NMail.UnitTests/LocalStoreData/CreateUserTest2.cs 2007-09-01 05:58:16 UTC (rev 271) +++ NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateUserTest2.cs 2007-09-23 09:44:26 UTC (rev 275) @@ -1,35 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using NUnit.Framework; - -using NMail.Configuration; -using NMail.DataTypes.Calendar; -using NMail.DataTypes.LocalStore; - -namespace NMail.UnitTests.LocalStoreData { - /// <summary> - /// Tests creating a duplicate user. - /// </summary> - [TestFixture] - public class CreateUserTest2 : BaseLocalStoreDataTest { - - [Test] - [ExpectedException(typeof(System.Data.DuplicateNameException))] - public void TestCreateDuplicateUser() { - LocalStoreUser user1 = new LocalStoreUser(); - user1.Username = "Test"; - this.localStoreData.CreateUser(user1); - - Assert.IsTrue(user1.UserId > 0, "Valid user Id."); - Assert.IsTrue(user1.UserFolderId > 0, "Valid user folder Id."); - - LocalStoreUser user2 = new LocalStoreUser(); - user2.Username = "Test"; - this.localStoreData.CreateUser(user2); - - Assert.Fail("Allowed duplicate user names."); - } - } -} Copied: NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateUserTest2.cs (from rev 274, NMail/trunk/NMail.UnitTests/LocalStoreData/CreateUserTest2.cs) =================================================================== --- NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateUserTest2.cs (rev 0) +++ NMail/trunk/NMail.DatabaseTests/LocalStoreData/CreateUserTest2.cs 2007-09-23 09:44:26 UTC (rev 275) @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Text; + +using NUnit.Framework; + +using NMail.Configuration; +using NMail.DataTypes.Calendar; +using NMail.DataTypes.LocalStore; + +namespace NMail.DatabaseTests.LocalStoreData { + /// <summary> + /// Tests creating a duplicate user. + /// </summary> + [TestFixture] + [Category("Database Test")] + public class CreateUserTest2 : BaseLocalStoreDataTest { + + [Test] + [ExpectedException(typeof(System.Data.DuplicateNameException))] + public void TestCreateDuplicateUser() { + LocalStoreUser user1 = new LocalStoreUser(); + user1.Username = "Test"; + this.localStoreData.CreateUser(user1); + + Assert.IsTrue(user1.UserId > 0, "Valid user Id."); + Assert.IsTrue(user1.UserFolderId > 0, "Valid user folder Id."); + + LocalStoreUser user2 = new LocalStoreUser(); + user2.Username = "Test"; + this.localStoreData.CreateUser(user2); + + Assert.Fail("Allowed duplicate user names."); + } + } +} Deleted: NMail/trunk/NMail.DatabaseTests/LocalStoreData/DeleteGroupTest1.cs =================================================================== --- NMail/trunk/NMail.UnitTests/LocalStoreData/DeleteGroupTest1.cs 2007-09-01 05:58:16 UTC (rev 271) +++ NMail/trunk/NMail.DatabaseTests/LocalStoreData/DeleteGroupTest1.cs 2007-09-23 09:44:26 UTC (rev 275) @@ -1,31 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using NUnit.Framework; - -using NMail.Configuration; -using NMail.DataTypes.Calendar; -using NMail.DataTypes.LocalStore; - -namespace NMail.UnitTests.LocalStoreData { - /// <summary> - /// Tests deleting a group. - /// </summary> - [TestFixture] - public class DeleteGroupTest1 : BaseLocalStoreDataTest { - - [Test] - public void TestDeleteGroup() { - LocalStoreGroup group = new LocalStoreGroup(); - group.Name = "Test"; - this.localStoreData.CreateGroup(group); - - Assert.IsTrue(group.GroupId > 0, "Valid group Id."); - - this.localStoreData.DeleteGroup(group.GroupId); - - Assert.IsNull(this.localStoreData.GetGroup("Test"), "No group."); - } - } -} Copied: NMail/trunk/NMail.DatabaseTests/LocalStoreData/DeleteGroupTest1.cs (from rev 274, NMail/trunk/NMail.UnitTests/LocalStoreData/DeleteGroupTest1.cs) =================================================================== --- NMail/trunk/NMail.DatabaseTests/LocalStoreData/DeleteGroupTest1.cs (rev 0) +++ NMail/trunk/NMail.DatabaseTests/LocalStoreData/DeleteGroupTest1.cs 2007-09-23 09:44:26 UTC (rev 275) @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Text; + +using NUnit.Framework; + +using NMail.Configuration; +using NMail.DataTypes.Calendar; +using NMail.DataTypes.LocalStore; + +namespace NMail.DatabaseTests.LocalStoreData { + /// <summary> + /// Tests deleting a group. + /// </summary> + [TestFixture] + [Category("Database Test")] + public class DeleteGroupTest1 : BaseLocalStoreDataTest { + + [Test] + public void TestDeleteGroup() { + LocalStoreGroup group = new LocalStoreGroup(); + group.Name = "Test"; + this.localStoreData.CreateGroup(group); + + Assert.IsTrue(group.GroupId > 0, "Valid group Id."); + + this.localStoreData.DeleteGroup(group.GroupId); + + Assert.IsNull(this.localStoreData.GetGroup("Test"), "No group."); + } + } +} Deleted: NMail/trunk/NMail.DatabaseTests/LocalStoreData/DeleteMailDomainTest1.cs =================================================================== --- NMail/trunk/NMail.UnitTests/LocalStoreData/DeleteMailDomainTest1.cs 2007-09-01 05:58:16 UTC (rev 271) +++ NMail/trunk/NMail.DatabaseTests/LocalStoreData/DeleteMailDomainTest1.cs 2007-09-23 09:44:26 UTC (rev 275) @@ -1,36 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Data; -using System.Text; - -using NUnit.Framework; - -using NMail.Configuration; -using NMail.DataTypes; -using NMail.DataTypes.Calendar; -using NMail.DataTypes.LocalStore; - -namespace NMail.UnitTests.LocalStoreData { - /// <summary> - /// Tests deleting a mail domain. - /// </summary> - [TestFixture] - public class DeleteMailDomainTest1 : BaseLocalStoreDataTest { - - [Test] - public void DeleteMailDomain() { - MailDomain m1 = new MailDomain(); - m1.PrimaryHost = new Host("test.tld"); - - localStoreData.CreateMailDomain(m1); - - Assert.IsTrue(m1.MailDomainId > 0, "Valid mail domain Id."); - - Assert.IsTrue(localStoreData.GetMailDomains().Count > 1, "Mail domains exist."); - - localStoreData.DeleteMailDomain(m1.MailDomainId); - - Assert.IsTrue(localStoreData.GetMailDomains().Count == 1, "One mail domain exists."); - } - } -} Copied: NMail/trunk/NMail.DatabaseTests/LocalStoreData/DeleteMailDomainTest1.cs (from rev 274, NMail/trunk/NMail.UnitTests/LocalStoreData/DeleteMailDomainTest1.cs) =================================================================== --- NMail/trunk/NMail.DatabaseTests/LocalStoreData/DeleteMailDomainTest1.cs (rev 0) +++ NMail/trunk/NMail.DatabaseTests/LocalStoreData/DeleteMailDomainTest1.cs 2007-09-23 09:44:26 UTC (rev 275) @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Text; + +using NUnit.Framework; + +using NMail.Configuration; +using NMail.DataTypes; +using NMail.DataTypes.Calendar; +using NMail.DataTypes.LocalStore; + +namespace NMail.DatabaseTests.LocalStoreData { + /// <summary> + /// Tests deleting a mail domain. + /// </summary> + [TestFixture] + [Category("Database Test")] + public class DeleteMailDomainTest1 : BaseLocalStoreDataTest { + + [Test] + public void DeleteMailDomain() { + MailDomain m1 = new MailDomain(); + m1.PrimaryHost = new Host("test.tld"); + + localStoreData.CreateMailDomain(m1); + + Assert.IsTrue(m1.MailDomainId > 0, "Valid mail domain Id."); + + Assert.IsTrue(localStoreData.GetMailDomains().Count > 1, "Mail domains exist."); + + localStoreData.DeleteMailDomain(m1.MailDomainId); + + Assert.IsTrue(localStoreData.GetMailDomains().Count == 1, "One mail domain exists."); + } + } +} Deleted: NMail/trunk/NMail.DatabaseTests/LocalStoreData/DeleteUserTest1.cs =================================================================== --- NMail/trunk/NMail.UnitTests/LocalStoreData/DeleteUserTest1.cs 2007-09-01 05:58:16 UTC (rev 271) +++ NMail/trunk/NMail.DatabaseTests/LocalStoreData/DeleteUserTest1.cs 2007-09-23 09:44:26 UTC (rev 275) @@ -1,47 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using NUnit.Framework; - -using NMail.Configuration; -using NMail.DataTypes.Calendar; -using NMail.DataTypes.LocalStore; - -namespace NMail.UnitTests.LocalStoreData { - /// <summary> - /// Tests deleting a user. - /// </summary> - [TestFixture] - public class DeleteUserTest1 : BaseLocalStoreDataTest { - - [Test] - public void TestDeleteUser() { - LocalStoreUser user1 = new LocalStoreUser(); - user1.Username = "Test"; - this.localStoreData.CreateUser(user1); - - Assert.IsTrue(user1.UserId > 0, "Valid user Id."); - Assert.IsTrue(user1.UserFolderId > 0, "Valid user folder Id."); - - IList<StoreFolder> userFolders = this.localStoreData.GetUserFolders(user1.UserId); - - Assert.IsNotNull(userFolders, "User folders list not null."); - Assert.IsTrue(userFolders.Count > 0, "User has folders."); - - foreach (StoreFolder folder in userFolders) { - try { - this.localStoreData.DeleteFolder(folder.FolderId, true); - } catch (Exception) { - // Ignore, may be trying to delete a deleted sub-folder - } - } - - this.localStoreData.DeleteUser(user1.UserId); - - IList<LocalStoreUser> users = this.localStoreData.GetUsers(); - - Assert.AreEqual(1, users.Count, "Users.count == 1"); - } - } -} Copied: NMail/trunk/NMail.DatabaseTests/LocalStoreData/DeleteUserTest1.cs (from rev 274, NMail/trunk/NMail.UnitTests/LocalStoreData/DeleteUserTest1.cs) =================================================================== --- NMail/trunk/NMail.DatabaseTests/LocalStoreData/DeleteUserTest1.cs (rev 0) +++ NMail/trunk/NMail.DatabaseTests/LocalStoreData/DeleteUserTest1.cs 2007-09-23 09:44:26 UTC (rev 275) @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.Text; + +using NUnit.Framework; + +using NMail.Configuration; +using NMail.DataTypes.Calendar; +using NMail.DataTypes.LocalStore; + +namespace NMail.DatabaseTests.LocalStoreData { + /// <summary> + /// Tests deleting a user. + /// </summary> + [TestFixture] + [Category("Database Test")] + public class DeleteUserTest1 : BaseLocalStoreDataTest { + + [Test] + public void TestDeleteUser() { + LocalStoreUser user1 = new LocalStoreUser(); + user1.Username = "Test"; + this.localStoreData.CreateUser(user1); + + Assert.IsTrue(user1.UserId > 0, "Valid user Id."); + Assert.IsTrue(user1.UserFolderId > 0, "Valid user folder Id."); + + IList<StoreFolder> userFolders = this.localStoreData.GetUserFolders(user1.UserId); + + Assert.IsNotNull(userFolders, "User folders list not null."); + Assert.IsTrue(userFolders.Count > 0, "User has folders."); + + foreach (StoreFolder folder in userFolders) { + try { + this.localStoreData.DeleteFolder(folder.FolderId, true); + } catch (Exception) { + // Ignore, may be trying to delete a deleted sub-folder + } + } + + this.localStoreData.DeleteUser(user1.UserId); + + IList<LocalStoreUser> users = this.localStoreData.GetUsers(); + + Assert.AreEqual(1, users.Count, "Users.count == 1"); + } + } +} Deleted: NMail/trunk/NMail.DatabaseTests/LocalStoreData/DeleteUserTest2.cs ===========================================================... [truncated message content] |
From: <tmy...@us...> - 2006-12-12 12:11:03
|
Revision: 98 http://svn.sourceforge.net/nmailserver/?rev=98&view=rev Author: tmyroadctfig Date: 2006-12-12 04:10:58 -0800 (Tue, 12 Dec 2006) Log Message: ----------- Added some initial remote access file. Modified Paths: -------------- NMail/trunk/NMail/NMail.csproj NMail/trunk/NMail.LocalStore/LocalStore.cs NMail/trunk/NMail.sln Added Paths: ----------- NMail/trunk/NMail.RemoteAccessService/Global.asax NMail/trunk/NMail.RemoteAccessService/RemoteAccessService.asmx NMail/trunk/NMail.RemoteAccessService/Web.Config NMail/trunk/NMail.RemoteAccessServiceSerializers/Properties/ NMail/trunk/NMail.RemoteAccessServiceSerializers/Properties/AssemblyInfo.cs NMail/trunk/NMail.WebAccess/App_Code/ NMail/trunk/NMail.WebAccess/App_Code/LinkButtonListItem.cs NMail/trunk/NMail.WebAccess/App_Data/ NMail/trunk/NMail.WebAccess/App_Themes/ NMail/trunk/NMail.WebAccess/App_Themes/Default/ NMail/trunk/NMail.WebAccess/App_Themes/Default/Default.css NMail/trunk/NMail.WebAccess/App_Themes/Default/Default.skin NMail/trunk/NMail.WebAccess/App_WebReferences/ NMail/trunk/NMail.WebAccess/App_WebReferences/RemoteAccessService/ NMail/trunk/NMail.WebAccess/App_WebReferences/RemoteAccessService/RemoteAccessService.disco NMail/trunk/NMail.WebAccess/App_WebReferences/RemoteAccessService/RemoteAccessService.discomap NMail/trunk/NMail.WebAccess/App_WebReferences/RemoteAccessService/RemoteAccessService.wsdl NMail/trunk/NMail.WebAccess/Calendar.aspx NMail/trunk/NMail.WebAccess/Calendar.aspx.cs NMail/trunk/NMail.WebAccess/Controls/ NMail/trunk/NMail.WebAccess/Controls/Contacts/ NMail/trunk/NMail.WebAccess/Controls/LinkButtonList.ascx NMail/trunk/NMail.WebAccess/Controls/LinkButtonList.ascx.cs NMail/trunk/NMail.WebAccess/Controls/Mail/ NMail/trunk/NMail.WebAccess/Controls/Mail/FolderTree.ascx NMail/trunk/NMail.WebAccess/Controls/Mail/FolderTree.ascx.cs NMail/trunk/NMail.WebAccess/Default.aspx NMail/trunk/NMail.WebAccess/Default.aspx.cs NMail/trunk/NMail.WebAccess/Images/ NMail/trunk/NMail.WebAccess/Images/Skins/ NMail/trunk/NMail.WebAccess/Images/Skins/Default/ NMail/trunk/NMail.WebAccess/Images/Skins/Default/LoginBanner.jpg NMail/trunk/NMail.WebAccess/Images/Skins/Default/ViewBackground.png NMail/trunk/NMail.WebAccess/Login.aspx NMail/trunk/NMail.WebAccess/Login.aspx.cs NMail/trunk/NMail.WebAccess/Mail.aspx NMail/trunk/NMail.WebAccess/Mail.aspx.cs NMail/trunk/NMail.WebAccess/Web.config Property Changed: ---------------- NMail/trunk/NMail.Administration.Web/Images/Tango/ NMail/trunk/NMail.RemoteAccessServiceSerializers/ Modified: NMail/trunk/NMail/NMail.csproj =================================================================== --- NMail/trunk/NMail/NMail.csproj 2006-12-12 12:06:59 UTC (rev 97) +++ NMail/trunk/NMail/NMail.csproj 2006-12-12 12:10:58 UTC (rev 98) @@ -264,6 +264,9 @@ </Compile> <Content Include="NMail.build" /> </ItemGroup> + <ItemGroup> + <Folder Include="DataTypes\Authentication\" /> + </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <PropertyGroup> <PreBuildEvent> Property changes on: NMail/trunk/NMail.Administration.Web/Images/Tango ___________________________________________________________________ Name: svn:ignore + Thumbs.db Modified: NMail/trunk/NMail.LocalStore/LocalStore.cs =================================================================== --- NMail/trunk/NMail.LocalStore/LocalStore.cs 2006-12-12 12:06:59 UTC (rev 97) +++ NMail/trunk/NMail.LocalStore/LocalStore.cs 2006-12-12 12:10:58 UTC (rev 98) @@ -413,6 +413,7 @@ return LocalStoreFolderResult.NotPermitted; } } + #endregion /// <summary> /// Gets a list of all folders @@ -424,7 +425,6 @@ return LocalStoreData.GetFolders(); } - #endregion #region Rename Folder /// <summary> Added: NMail/trunk/NMail.RemoteAccessService/Global.asax =================================================================== --- NMail/trunk/NMail.RemoteAccessService/Global.asax (rev 0) +++ NMail/trunk/NMail.RemoteAccessService/Global.asax 2006-12-12 12:10:58 UTC (rev 98) @@ -0,0 +1,39 @@ +<%@ Application Language="C#" %> + +<script runat="server"> + + void Application_Start(object sender, EventArgs e) + { + Hashtable properties = new Hashtable(); + properties.Add("secure", true); + System.Runtime.Remoting.Channels.ChannelServices.RegisterChannel(new System.Runtime.Remoting.Channels.Tcp.TcpClientChannel(properties, null), false); + } + + void Application_End(object sender, EventArgs e) + { + // Code that runs on application shutdown + + } + + void Application_Error(object sender, EventArgs e) + { + // Code that runs when an unhandled error occurs + + } + + void Session_Start(object sender, EventArgs e) + { + // Code that runs when a new session is started + + } + + void Session_End(object sender, EventArgs e) + { + // Code that runs when a session ends. + // Note: The Session_End event is raised only when the sessionstate mode + // is set to InProc in the Web.config file. If session mode is set to StateServer + // or SQLServer, the event is not raised. + + } + +</script> Added: NMail/trunk/NMail.RemoteAccessService/RemoteAccessService.asmx =================================================================== --- NMail/trunk/NMail.RemoteAccessService/RemoteAccessService.asmx (rev 0) +++ NMail/trunk/NMail.RemoteAccessService/RemoteAccessService.asmx 2006-12-12 12:10:58 UTC (rev 98) @@ -0,0 +1 @@ +<%@ WebService Language="C#" CodeBehind="~/App_Code/RemoteAccessService.cs" Class="RemoteAccessService" %> Added: NMail/trunk/NMail.RemoteAccessService/Web.Config =================================================================== --- NMail/trunk/NMail.RemoteAccessService/Web.Config (rev 0) +++ NMail/trunk/NMail.RemoteAccessService/Web.Config 2006-12-12 12:10:58 UTC (rev 98) @@ -0,0 +1,42 @@ +<?xml version="1.0"?> +<!-- + Note: As an alternative to hand editing this file you can use the + web admin tool to configure settings for your application. Use + the Website->Asp.Net Configuration option in Visual Studio. + A full list of settings and comments can be found in + machine.config.comments usually located in + \Windows\Microsoft.Net\Framework\v2.x\Config +--> +<configuration> + <appSettings/> + <connectionStrings/> + <system.web> + <!-- + Set compilation debug="true" to insert debugging + symbols into the compiled page. Because this + affects performance, set this value to true only + during development. + --> + <compilation debug="true"> + <assemblies> + <add assembly="System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies></compilation> + <!-- + The <authentication> section enables configuration + of the security authentication mode used by + ASP.NET to identify an incoming user. + --> + <authentication mode="Windows"/> + <!-- + The <customErrors> section enables configuration + of what to do if/when an unhandled error occurs + during the execution of a request. Specifically, + it enables developers to configure html error pages + to be displayed in place of a error stack trace. + + <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm"> + <error statusCode="403" redirect="NoAccess.htm" /> + <error statusCode="404" redirect="FileNotFound.htm" /> + </customErrors> + --> + </system.web> +</configuration> Property changes on: NMail/trunk/NMail.RemoteAccessServiceSerializers ___________________________________________________________________ Name: svn:ignore + bin obj Added: NMail/trunk/NMail.RemoteAccessServiceSerializers/Properties/AssemblyInfo.cs =================================================================== --- NMail/trunk/NMail.RemoteAccessServiceSerializers/Properties/AssemblyInfo.cs (rev 0) +++ NMail/trunk/NMail.RemoteAccessServiceSerializers/Properties/AssemblyInfo.cs 2006-12-12 12:10:58 UTC (rev 98) @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("NMail.RemoteAccessServiceSerializers")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("NMail.RemoteAccessServiceSerializers")] +[assembly: AssemblyCopyright("Copyright © 2006")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("993fe48c-1f11-4884-b320-fdb2e300c663")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] Added: NMail/trunk/NMail.WebAccess/App_Code/LinkButtonListItem.cs =================================================================== --- NMail/trunk/NMail.WebAccess/App_Code/LinkButtonListItem.cs (rev 0) +++ NMail/trunk/NMail.WebAccess/App_Code/LinkButtonListItem.cs 2006-12-12 12:10:58 UTC (rev 98) @@ -0,0 +1,48 @@ +using System; +using System.Data; +using System.Configuration; +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 class LinkButtonListItem +{ + public LinkButtonListItem(string text, string itemStyleClass, EventHandler clickHandler) + { + this.text = text; + this.itemStyleClass = itemStyleClass; + this.clickHandler = clickHandler; + } + + private string text; + + public string Text + { + get + { + return this.text; + } + } + + private string itemStyleClass; + + public string ItemStyleClass + { + get { return itemStyleClass; } + set { itemStyleClass = value; } + } + + + private EventHandler clickHandler; + + public EventHandler ClickHandler + { + get + { + return this.clickHandler; + } + } +} Added: NMail/trunk/NMail.WebAccess/App_Themes/Default/Default.css =================================================================== --- NMail/trunk/NMail.WebAccess/App_Themes/Default/Default.css (rev 0) +++ NMail/trunk/NMail.WebAccess/App_Themes/Default/Default.css 2006-12-12 12:10:58 UTC (rev 98) @@ -0,0 +1,31 @@ +body +{ + font-family: Sans-Serif; +} + +.LoginBox +{ + margin-top: 5em; + margin-left: auto; + margin-right: auto; + width: 600px; + border: solid 1px black; +} + +.LoginTitle +{ + font-size: larger; + padding-bottom: 0.5em; +} + +.ViewButton +{ + text-align: center; + background-image: url('../../Images/Skins/Default/ViewBackground.png'); + background-repeat: repeat-x; + background-position: left top; + height: 30px; + vertical-align: middle; + padding-left: 0.5em; + padding-right: 0.5em; +} \ No newline at end of file Added: NMail/trunk/NMail.WebAccess/App_Themes/Default/Default.skin =================================================================== --- NMail/trunk/NMail.WebAccess/App_Themes/Default/Default.skin (rev 0) +++ NMail/trunk/NMail.WebAccess/App_Themes/Default/Default.skin 2006-12-12 12:10:58 UTC (rev 98) @@ -0,0 +1,17 @@ +<%-- +Default skin template. The following skins are provided as examples only. + +1. Named control skin. The SkinId should be uniquely defined because + duplicate SkinId's per control type are not allowed in the same theme. + +<asp:GridView runat="server" SkinId="gridviewSkin" BackColor="White" > + <AlternatingRowStyle BackColor="Blue" /> +</asp:GridView> + +2. Default skin. The SkinId is not defined. Only one default + control skin per control type is allowed in the same theme. + +<asp:Image runat="server" ImageUrl="~/images/image1.jpg" /> +--%> + +<asp:Image runat="server" SkinId="LoginBanner" ImageUrl="~/Images/Skins/Default/LoginBanner.jpg" /> Added: NMail/trunk/NMail.WebAccess/App_WebReferences/RemoteAccessService/RemoteAccessService.disco =================================================================== --- NMail/trunk/NMail.WebAccess/App_WebReferences/RemoteAccessService/RemoteAccessService.disco (rev 0) +++ NMail/trunk/NMail.WebAccess/App_WebReferences/RemoteAccessService/RemoteAccessService.disco 2006-12-12 12:10:58 UTC (rev 98) @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<discovery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/disco/"> + <contractRef ref="http://localhost:1288/NMail.RemoteAccessService/RemoteAccessService.asmx?wsdl" docRef="http://localhost:1288/NMail.RemoteAccessService/RemoteAccessService.asmx" xmlns="http://schemas.xmlsoap.org/disco/scl/" /> + <soap address="http://localhost:1288/NMail.RemoteAccessService/RemoteAccessService.asmx" xmlns:q1="http://nmailserver.sf.net/RemoteAccessService/1.0" binding="q1:RemoteAccessServiceSoap" xmlns="http://schemas.xmlsoap.org/disco/soap/" /> + <soap address="http://localhost:1288/NMail.RemoteAccessService/RemoteAccessService.asmx" xmlns:q2="http://nmailserver.sf.net/RemoteAccessService/1.0" binding="q2:RemoteAccessServiceSoap12" xmlns="http://schemas.xmlsoap.org/disco/soap/" /> +</discovery> \ No newline at end of file Added: NMail/trunk/NMail.WebAccess/App_WebReferences/RemoteAccessService/RemoteAccessService.discomap =================================================================== --- NMail/trunk/NMail.WebAccess/App_WebReferences/RemoteAccessService/RemoteAccessService.discomap (rev 0) +++ NMail/trunk/NMail.WebAccess/App_WebReferences/RemoteAccessService/RemoteAccessService.discomap 2006-12-12 12:10:58 UTC (rev 98) @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<DiscoveryClientResultsFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + <Results> + <DiscoveryClientResult referenceType="System.Web.Services.Discovery.ContractReference" url="http://localhost:1288/NMail.RemoteAccessService/RemoteAccessService.asmx?wsdl" filename="RemoteAccessService.wsdl" /> + <DiscoveryClientResult referenceType="System.Web.Services.Discovery.DiscoveryDocumentReference" url="http://localhost:1288/NMail.RemoteAccessService/RemoteAccessService.asmx?disco" filename="RemoteAccessService.disco" /> + </Results> +</DiscoveryClientResultsFile> \ No newline at end of file Added: NMail/trunk/NMail.WebAccess/App_WebReferences/RemoteAccessService/RemoteAccessService.wsdl =================================================================== --- NMail/trunk/NMail.WebAccess/App_WebReferences/RemoteAccessService/RemoteAccessService.wsdl (rev 0) +++ NMail/trunk/NMail.WebAccess/App_WebReferences/RemoteAccessService/RemoteAccessService.wsdl 2006-12-12 12:10:58 UTC (rev 98) @@ -0,0 +1,116 @@ +<?xml version="1.0" encoding="utf-8"?> +<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://nmailserver.sf.net/RemoteAccessService/1.0" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://nmailserver.sf.net/RemoteAccessService/1.0" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> + <wsdl:types> + <s:schema elementFormDefault="qualified" targetNamespace="http://nmailserver.sf.net/RemoteAccessService/1.0"> + <s:import namespace="http://www.w3.org/2001/XMLSchema" /> + <s:element name="Authenticate"> + <s:complexType> + <s:sequence> + <s:element minOccurs="0" maxOccurs="1" name="user" type="s:string" /> + <s:element minOccurs="0" maxOccurs="1" name="password" type="s:string" /> + </s:sequence> + </s:complexType> + </s:element> + <s:element name="AuthenticateResponse"> + <s:complexType> + <s:sequence> + <s:element minOccurs="0" maxOccurs="1" name="AuthenticateResult" type="s:string" /> + </s:sequence> + </s:complexType> + </s:element> + <s:element name="GetNominalFolder"> + <s:complexType> + <s:sequence> + <s:element minOccurs="0" maxOccurs="1" name="authToken" type="s:string" /> + </s:sequence> + </s:complexType> + </s:element> + <s:element name="GetNominalFolderResponse"> + <s:complexType> + <s:sequence> + <s:element minOccurs="0" maxOccurs="1" name="GetNominalFolderResult"> + <s:complexType> + <s:sequence> + <s:element ref="s:schema" /> + <s:any /> + </s:sequence> + </s:complexType> + </s:element> + </s:sequence> + </s:complexType> + </s:element> + </s:schema> + </wsdl:types> + <wsdl:message name="AuthenticateSoapIn"> + <wsdl:part name="parameters" element="tns:Authenticate" /> + </wsdl:message> + <wsdl:message name="AuthenticateSoapOut"> + <wsdl:part name="parameters" element="tns:AuthenticateResponse" /> + </wsdl:message> + <wsdl:message name="GetNominalFolderSoapIn"> + <wsdl:part name="parameters" element="tns:GetNominalFolder" /> + </wsdl:message> + <wsdl:message name="GetNominalFolderSoapOut"> + <wsdl:part name="parameters" element="tns:GetNominalFolderResponse" /> + </wsdl:message> + <wsdl:portType name="RemoteAccessServiceSoap"> + <wsdl:operation name="Authenticate"> + <wsdl:input message="tns:AuthenticateSoapIn" /> + <wsdl:output message="tns:AuthenticateSoapOut" /> + </wsdl:operation> + <wsdl:operation name="GetNominalFolder"> + <wsdl:input message="tns:GetNominalFolderSoapIn" /> + <wsdl:output message="tns:GetNominalFolderSoapOut" /> + </wsdl:operation> + </wsdl:portType> + <wsdl:binding name="RemoteAccessServiceSoap" type="tns:RemoteAccessServiceSoap"> + <soap:binding transport="http://schemas.xmlsoap.org/soap/http" /> + <wsdl:operation name="Authenticate"> + <soap:operation soapAction="http://nmailserver.sf.net/RemoteAccessService/1.0/Authenticate" style="document" /> + <wsdl:input> + <soap:body use="literal" /> + </wsdl:input> + <wsdl:output> + <soap:body use="literal" /> + </wsdl:output> + </wsdl:operation> + <wsdl:operation name="GetNominalFolder"> + <soap:operation soapAction="http://nmailserver.sf.net/RemoteAccessService/1.0/GetNominalFolder" style="document" /> + <wsdl:input> + <soap:body use="literal" /> + </wsdl:input> + <wsdl:output> + <soap:body use="literal" /> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + <wsdl:binding name="RemoteAccessServiceSoap12" type="tns:RemoteAccessServiceSoap"> + <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" /> + <wsdl:operation name="Authenticate"> + <soap12:operation soapAction="http://nmailserver.sf.net/RemoteAccessService/1.0/Authenticate" style="document" /> + <wsdl:input> + <soap12:body use="literal" /> + </wsdl:input> + <wsdl:output> + <soap12:body use="literal" /> + </wsdl:output> + </wsdl:operation> + <wsdl:operation name="GetNominalFolder"> + <soap12:operation soapAction="http://nmailserver.sf.net/RemoteAccessService/1.0/GetNominalFolder" style="document" /> + <wsdl:input> + <soap12:body use="literal" /> + </wsdl:input> + <wsdl:output> + <soap12:body use="literal" /> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + <wsdl:service name="RemoteAccessService"> + <wsdl:port name="RemoteAccessServiceSoap" binding="tns:RemoteAccessServiceSoap"> + <soap:address location="http://localhost:1288/NMail.RemoteAccessService/RemoteAccessService.asmx" /> + </wsdl:port> + <wsdl:port name="RemoteAccessServiceSoap12" binding="tns:RemoteAccessServiceSoap12"> + <soap12:address location="http://localhost:1288/NMail.RemoteAccessService/RemoteAccessService.asmx" /> + </wsdl:port> + </wsdl:service> +</wsdl:definitions> \ No newline at end of file Added: NMail/trunk/NMail.WebAccess/Calendar.aspx =================================================================== --- NMail/trunk/NMail.WebAccess/Calendar.aspx (rev 0) +++ NMail/trunk/NMail.WebAccess/Calendar.aspx 2006-12-12 12:10:58 UTC (rev 98) @@ -0,0 +1,4 @@ +<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Calendar.aspx.cs" Inherits="Calendar" Title="Untitled Page" %> +<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> +</asp:Content> + Added: NMail/trunk/NMail.WebAccess/Calendar.aspx.cs =================================================================== --- NMail/trunk/NMail.WebAccess/Calendar.aspx.cs (rev 0) +++ NMail/trunk/NMail.WebAccess/Calendar.aspx.cs 2006-12-12 12:10:58 UTC (rev 98) @@ -0,0 +1,18 @@ +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 Calendar : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } +} Added: NMail/trunk/NMail.WebAccess/Controls/LinkButtonList.ascx =================================================================== --- NMail/trunk/NMail.WebAccess/Controls/LinkButtonList.ascx (rev 0) +++ NMail/trunk/NMail.WebAccess/Controls/LinkButtonList.ascx 2006-12-12 12:10:58 UTC (rev 98) @@ -0,0 +1,8 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeFile="LinkButtonList.ascx.cs" Inherits="Controls_LinkButtonList" %> +<asp:Repeater ID="Repeater" runat="server"> + <ItemTemplate> + <div class='<%# Eval("ItemStyleClass") %>'> + <asp:LinkButton runat="server" ID="LinkButton" Text='<%# Eval("Text") %>' /> + </div> + </ItemTemplate> +</asp:Repeater> Added: NMail/trunk/NMail.WebAccess/Controls/LinkButtonList.ascx.cs =================================================================== --- NMail/trunk/NMail.WebAccess/Controls/LinkButtonList.ascx.cs (rev 0) +++ NMail/trunk/NMail.WebAccess/Controls/LinkButtonList.ascx.cs 2006-12-12 12:10:58 UTC (rev 98) @@ -0,0 +1,41 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Collections.Generic; +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_LinkButtonList : System.Web.UI.UserControl +{ + protected override void OnInit(EventArgs e) + { + base.OnInit(e); + + this.Repeater.ItemDataBound += new RepeaterItemEventHandler(Repeater_ItemDataBound); + } + + void Repeater_ItemDataBound(object sender, RepeaterItemEventArgs e) + { + Control control = e.Item.FindControl("LinkButton"); + LinkButtonListItem item = (LinkButtonListItem)e.Item.DataItem; + + if (control != null && item != null && item.ClickHandler != null) + { + // Link this task's button with its click handler + LinkButton button = (LinkButton)control; + button.Click += item.ClickHandler; + } + } + + public void SetListItems(List<LinkButtonListItem> items) + { + RepeaterItemCollection dataSource = new RepeaterItemCollection(new ArrayList(items)); + this.Repeater.DataSource = dataSource; + this.Repeater.DataBind(); + } +} \ No newline at end of file Added: NMail/trunk/NMail.WebAccess/Controls/Mail/FolderTree.ascx =================================================================== --- NMail/trunk/NMail.WebAccess/Controls/Mail/FolderTree.ascx (rev 0) +++ NMail/trunk/NMail.WebAccess/Controls/Mail/FolderTree.ascx 2006-12-12 12:10:58 UTC (rev 98) @@ -0,0 +1,3 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeFile="FolderTree.ascx.cs" Inherits="Controls_Mail_FolderTree" %> +<asp:TreeView ID="FolderTreeView" runat="server"> +</asp:TreeView> Added: NMail/trunk/NMail.WebAccess/Controls/Mail/FolderTree.ascx.cs =================================================================== --- NMail/trunk/NMail.WebAccess/Controls/Mail/FolderTree.ascx.cs (rev 0) +++ NMail/trunk/NMail.WebAccess/Controls/Mail/FolderTree.ascx.cs 2006-12-12 12:10:58 UTC (rev 98) @@ -0,0 +1,21 @@ +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_Mail_FolderTree : System.Web.UI.UserControl +{ + protected void Page_Load(object sender, EventArgs e) + { + RemoteAccessService.RemoteAccessService ras = (RemoteAccessService.RemoteAccessService)Session["RAS"]; + string authToken = Session["AuthToken"]; + + ras.Get + } +} Added: NMail/trunk/NMail.WebAccess/Default.aspx =================================================================== --- NMail/trunk/NMail.WebAccess/Default.aspx (rev 0) +++ NMail/trunk/NMail.WebAccess/Default.aspx 2006-12-12 12:10:58 UTC (rev 98) @@ -0,0 +1,50 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> + +<%@ Register Src="Controls/LinkButtonList.ascx" TagName="LinkButtonList" TagPrefix="uc1" %> + +<!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> +</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> + <td valign="top"> + <asp:WebPartZone ID="TopZone" runat="server" LayoutOrientation="Horizontal"> + </asp:WebPartZone> + </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> +</html> Added: NMail/trunk/NMail.WebAccess/Default.aspx.cs =================================================================== --- NMail/trunk/NMail.WebAccess/Default.aspx.cs (rev 0) +++ NMail/trunk/NMail.WebAccess/Default.aspx.cs 2006-12-12 12:10:58 UTC (rev 98) @@ -0,0 +1,36 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections.Generic; +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; + +using ASP; + +public partial class _Default : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + this.WebPartManager.DisplayMode = WebPartManager.DesignDisplayMode; + + // Setup the view list + List<LinkButtonListItem> viewItems = new List<LinkButtonListItem>(); + viewItems.Add(new LinkButtonListItem("Mail", "ViewButton", new EventHandler(ShowMailView_Clicked))); + viewItems.Add(new LinkButtonListItem("Calendar", "ViewButton", new EventHandler(ShowCalendarView_Clicked))); + + this.ViewList.SetListItems(viewItems); + } + + protected void ShowMailView_Clicked(object sender, EventArgs ea) + { + Response.Redirect("Mail.aspx"); + } + + protected void ShowCalendarView_Clicked(object sender, EventArgs ea) + { + } +} Added: NMail/trunk/NMail.WebAccess/Images/Skins/Default/LoginBanner.jpg =================================================================== (Binary files differ) Property changes on: NMail/trunk/NMail.WebAccess/Images/Skins/Default/LoginBanner.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: NMail/trunk/NMail.WebAccess/Images/Skins/Default/ViewBackground.png =================================================================== (Binary files differ) Property changes on: NMail/trunk/NMail.WebAccess/Images/Skins/Default/ViewBackground.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: NMail/trunk/NMail.WebAccess/Login.aspx =================================================================== --- NMail/trunk/NMail.WebAccess/Login.aspx (rev 0) +++ NMail/trunk/NMail.WebAccess/Login.aspx 2006-12-12 12:10:58 UTC (rev 98) @@ -0,0 +1,28 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" %> + +<!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 runat="server"> + <title>NMail Login</title> +</head> +<body> + <form id="form1" runat="server"> + <div align="center" class="LoginBox"> + + <asp:Image ID="LoginBanner" runat="server" SkinID="LoginBanner" /> + <asp:LoginView ID="LoginView" runat="server"> + <LoggedInTemplate> + You are currently logged in as + <asp:LoginName ID="LoginName" runat="server" />. + </LoggedInTemplate> + <AnonymousTemplate> + <asp:Login ID="Login" runat="server" OnAuthenticate="Login_Authenticate" DestinationPageUrl="~/Default.aspx" TitleText="Log in to NMail web access"> + <TitleTextStyle CssClass="LogonTitle" /> + </asp:Login> + </AnonymousTemplate> + </asp:LoginView> + </div> + </form> +</body> +</html> Added: NMail/trunk/NMail.WebAccess/Login.aspx.cs =================================================================== --- NMail/trunk/NMail.WebAccess/Login.aspx.cs (rev 0) +++ NMail/trunk/NMail.WebAccess/Login.aspx.cs 2006-12-12 12:10:58 UTC (rev 98) @@ -0,0 +1,36 @@ +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; + +using RemoteAccessService; + +public partial class Login : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) { } + + protected void Login_Authenticate(object sender, AuthenticateEventArgs e) + { + System.Web.UI.WebControls.Login login = (System.Web.UI.WebControls.Login)this.LoginView.FindControl("Login"); + + RemoteAccessService.RemoteAccessService ras = new RemoteAccessService.RemoteAccessService(); + string authToken = ras.Authenticate(login.UserName, login.Password); + + if (authToken != string.Empty) + { + Session["AuthToken"] = authToken; + Session["RAS"] = ras; + e.Authenticated = true; + } + else + { + // TODO: an error message + } + } +} Added: NMail/trunk/NMail.WebAccess/Mail.aspx =================================================================== --- NMail/trunk/NMail.WebAccess/Mail.aspx (rev 0) +++ NMail/trunk/NMail.WebAccess/Mail.aspx 2006-12-12 12:10:58 UTC (rev 98) @@ -0,0 +1,53 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Mail.aspx.cs" Inherits="Mail" %> + +<%@ Register Src="Controls/Mail/FolderTree.ascx" TagName="FolderTree" TagPrefix="uc2" %> + +<%@ Register Src="Controls/LinkButtonList.ascx" TagName="LinkButtonList" TagPrefix="uc1" %> + +<!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 runat="server"> + <title>Untitled Page</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> + <td valign="top"> + <asp:WebPartZone ID="TopZone" runat="server" LayoutOrientation="Horizontal"> + </asp:WebPartZone> + </td> + <td rowspan="3" valign="top"> + <asp:WebPartZone ID="RightZone" runat="server"> + <ZoneTemplate> + <uc2:FolderTree ID="FolderTree1" runat="server" /> + </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> +</html> Added: NMail/trunk/NMail.WebAccess/Mail.aspx.cs =================================================================== --- NMail/trunk/NMail.WebAccess/Mail.aspx.cs (rev 0) +++ NMail/trunk/NMail.WebAccess/Mail.aspx.cs 2006-12-12 12:10:58 UTC (rev 98) @@ -0,0 +1,31 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Collections.Generic; +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; + +using ASP; + +public partial class Mail : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + this.WebPartManager.DisplayMode = WebPartManager.DesignDisplayMode; + + // Setup the view list + List<LinkButtonListItem> viewItems = new List<LinkButtonListItem>(); + viewItems.Add(new LinkButtonListItem("Calendar", "ViewButton", new EventHandler(ShowCalendarView_Clicked))); + + this.ViewList.SetListItems(viewItems); + } + + protected void ShowCalendarView_Clicked(object sender, EventArgs ea) + { + } +} Added: NMail/trunk/NMail.WebAccess/Web.config =================================================================== --- NMail/trunk/NMail.WebAccess/Web.config (rev 0) +++ NMail/trunk/NMail.WebAccess/Web.config 2006-12-12 12:10:58 UTC (rev 98) @@ -0,0 +1,55 @@ +<?xml version="1.0"?> +<!-- + Note: As an alternative to hand editing this file you can use the + web admin tool to configure settings for your application. Use + the Website->Asp.Net Configuration option in Visual Studio. + A full list of settings and comments can be found in + machine.config.comments usually located in + \Windows\Microsoft.Net\Framework\v2.x\Config +--> +<configuration> + <appSettings> + <add key="RemoteAccessService.RemoteAccessService" value="http://localhost:1288/NMail.RemoteAccessService/RemoteAccessService.asmx"/> + </appSettings> + <connectionStrings/> + <system.web> + <pages theme="Default"/> + <!-- + Set compilation debug="true" to insert debugging + symbols into the compiled page. Because this + affects performance, set this value to true only + during development. + --> + <compilation debug="true"/> + <!-- + The <authentication> section enables configuration + of the security authentication mode used by + ASP.NET to identify an incoming user. + --> + + <authentication mode="Forms"> + <forms loginUrl="Login.aspx" timeout="60" protection="All" slidingExpiration="true"/> + </authentication> + + <webParts enableExport="true"> + <personalization defaultProvider="XmlFileSharedPersonalizationProvider"> + <providers> + <add applicationName="/" name="XmlFileSharedPersonalizationProvider" type="MarkItUp.SingleUserBlog.Web.WebParts.XmlFileSharedPersonalizationProvider"/> + </providers> + </personalization> + </webParts> + + <!-- + The <customErrors> section enables configuration + of what to do if/when an unhandled error occurs + during the execution of a request. Specifically, + it enables developers to configure html error pages + to be displayed in place of a error stack trace. + + <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm"> + <error statusCode="403" redirect="NoAccess.htm" /> + <error statusCode="404" redirect="FileNotFound.htm" /> + </customErrors> + --> + </system.web> +</configuration> Modified: NMail/trunk/NMail.sln =================================================================== --- NMail/trunk/NMail.sln 2006-12-12 12:06:59 UTC (rev 97) +++ NMail/trunk/NMail.sln 2006-12-12 12:10:58 UTC (rev 98) @@ -46,6 +46,8 @@ 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.RemoteAccessServiceSerializers", "NMail.RemoteAccessServiceSerializers\NMail.RemoteAccessServiceSerializers.csproj", "{A54F735E-454A-4C65-8A61-66330AA64678}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -144,6 +146,10 @@ {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 + {A54F735E-454A-4C65-8A61-66330AA64678}.Release|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...> - 2006-12-13 13:32:53
|
Revision: 102 http://svn.sourceforge.net/nmailserver/?rev=102&view=rev Author: tmyroadctfig Date: 2006-12-13 05:32:53 -0800 (Wed, 13 Dec 2006) Log Message: ----------- Renamed project. Added Paths: ----------- NMail/trunk/NMail.RemoteAccessService.Serializers/ NMail/trunk/NMail.RemoteAccessService.Serializers/DataTypes/ NMail/trunk/NMail.RemoteAccessService.Serializers/DataTypes/LocalStore/ NMail/trunk/NMail.RemoteAccessService.Serializers/DataTypes/LocalStore/StoreFolderSerializer.cs NMail/trunk/NMail.RemoteAccessService.Serializers/NMail.RemoteAccessService.Serializers.csproj Added: NMail/trunk/NMail.RemoteAccessService.Serializers/DataTypes/LocalStore/StoreFolderSerializer.cs =================================================================== --- NMail/trunk/NMail.RemoteAccessService.Serializers/DataTypes/LocalStore/StoreFolderSerializer.cs (rev 0) +++ NMail/trunk/NMail.RemoteAccessService.Serializers/DataTypes/LocalStore/StoreFolderSerializer.cs 2006-12-13 13:32:53 UTC (rev 102) @@ -0,0 +1,69 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Xml; +using System.Xml.Serialization; + +using NMail.DataTypes.LocalStore; + +namespace NMail.RemoteAccessService.Serializers.DataTypes.LocalStore { + /// <summary> + /// A simple XML serializer for the store folder type. + /// </summary> + [XmlRoot("StoreFolder")] + public class StoreFolderSerializer : IXmlSerializable { + + public StoreFolderSerializer() { } + + public StoreFolderSerializer(StoreFolder storeFolder) { + this.storeFolder = storeFolder; + } + + private StoreFolder storeFolder; + + public StoreFolder StoreFolder { + get { return storeFolder; } + set { storeFolder = value; } + } + + #region IXmlSerializable Members + + public System.Xml.Schema.XmlSchema GetSchema() { + return null; + } + + public void ReadXml(XmlReader reader) { + //reader.ReadStartElement("StoreFolder"); + + reader.MoveToAttribute("FolderId"); + int folderId = Int32.Parse(reader.Value); + + reader.MoveToAttribute("Name"); + string name = reader.Value; + + reader.MoveToAttribute("NameSpace"); + string nameSpace = reader.Value; + + int? parentId = null; + if (reader.MoveToAttribute("ParentId")) { + parentId = Int32.Parse(reader.Value); + } + + reader.MoveToAttribute("HasChildren"); + bool hasChildren = Boolean.Parse(reader.Value); + + this.storeFolder = new StoreFolder(nameSpace, name, folderId, parentId, hasChildren); + } + + public void WriteXml(XmlWriter writer) { + writer.WriteAttributeString("FolderId", this.storeFolder.FolderId.ToString()); + writer.WriteAttributeString("Name", this.storeFolder.FolderName); + writer.WriteAttributeString("NameSpace", this.storeFolder.NameSpace); + writer.WriteAttributeString("HasChildren", this.storeFolder.HasChildren.ToString()); + if (this.storeFolder.ParentId.HasValue) { + writer.WriteAttributeString("ParentId", this.storeFolder.ParentId.Value.ToString()); + } + } + #endregion + } +} Added: NMail/trunk/NMail.RemoteAccessService.Serializers/NMail.RemoteAccessService.Serializers.csproj =================================================================== --- NMail/trunk/NMail.RemoteAccessService.Serializers/NMail.RemoteAccessService.Serializers.csproj (rev 0) +++ NMail/trunk/NMail.RemoteAccessService.Serializers/NMail.RemoteAccessService.Serializers.csproj 2006-12-13 13:32:53 UTC (rev 102) @@ -0,0 +1,53 @@ +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>8.0.50727</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{A54F735E-454A-4C65-8A61-66330AA64678}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>NMail.RemoteAccessService.Serializers</RootNamespace> + <AssemblyName>NMail.RemoteAccessService.Serializers</AssemblyName> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>..\References\NMail\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>..\References\NMail\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="DataTypes\LocalStore\StoreFolderSerializer.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\NMail\NMail.csproj"> + <Project>{5A5A5012-B157-49B1-A35F-67EC9680112A}</Project> + <Name>NMail</Name> + </ProjectReference> + </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. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ 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...> - 2006-12-13 13:34:51
|
Revision: 103 http://svn.sourceforge.net/nmailserver/?rev=103&view=rev Author: tmyroadctfig Date: 2006-12-13 05:34:51 -0800 (Wed, 13 Dec 2006) Log Message: ----------- Further work on remote access. Modified Paths: -------------- NMail/trunk/NMail.RemoteAccessService/Web.Config NMail/trunk/NMail.sln Added Paths: ----------- NMail/trunk/NMail.RemoteAccessService/App_Code/ NMail/trunk/NMail.RemoteAccessService/App_Code/RemoteAccessService.cs NMail/trunk/NMail.RemoteAccessService/App_Code/ServiceState.cs NMail/trunk/NMail.RemoteAccessService/App_Data/ NMail/trunk/NMail.RemoteAccessService/Bin/ NMail/trunk/NMail.RemoteAccessService/Bin/NMail.RemoteAccessService.Serializers.dll.refresh NMail/trunk/NMail.RemoteAccessService/Bin/NMail.Server.dll.refresh NMail/trunk/NMail.RemoteAccessService/Bin/NMail.dll.refresh NMail/trunk/NMail.RemoteAccessService/Bin/log4net.dll.refresh NMail/trunk/NMail.RemoteAccessService.Serializers/Properties/ NMail/trunk/NMail.RemoteAccessService.Serializers/Properties/AssemblyInfo.cs Property Changed: ---------------- NMail/trunk/NMail.Administration.Web/Bin/ NMail/trunk/NMail.RemoteAccessService.Serializers/ Property changes on: NMail/trunk/NMail.Administration.Web/Bin ___________________________________________________________________ Name: svn:ignore - log4net.dll NMail.dll NMail.Server.dll + log4net.dll NMail.dll NMail.Server.dll Mono.Security.dll NMail.LocalStoreData.MySql.dll Added: NMail/trunk/NMail.RemoteAccessService/App_Code/RemoteAccessService.cs =================================================================== --- NMail/trunk/NMail.RemoteAccessService/App_Code/RemoteAccessService.cs (rev 0) +++ NMail/trunk/NMail.RemoteAccessService/App_Code/RemoteAccessService.cs 2006-12-13 13:34:51 UTC (rev 103) @@ -0,0 +1,89 @@ +using System; +using System.Collections.Generic; +using System.Web; +using System.Web.Services; +using System.Web.Services.Protocols; + +using NMail.Authentication; +using NMail.DataTypes.LocalStore; +using NMail.Server; +using NMail.RemoteAccessService.Serializers.DataTypes.LocalStore; + +[WebService(Namespace = "http://nmailserver.sf.net/RemoteAccessService/1.0")] +[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] +public class RemoteAccessService : System.Web.Services.WebService +{ + /// <summary> + /// Authenticates the current user. + /// </summary> + /// <param name="user">The username to check.</param> + /// <param name="password">The password to check.</param> + /// <returns> + /// A base 64 encoded guid token or an empty string if authentication fails. + /// </returns> + [WebMethod] + public string Authenticate(string user, string password) + { + // TODO: ensure secure + + IAuthenticationToken token = ServiceState.remoteAdmin.NMailServer.AuthenticationProvider.Authenticate(user, password); + + if (token != null) + { + Guid key = Guid.NewGuid(); + + if (ServiceState.authTokens.ContainsKey(key)) { + ServiceState.authTokens.Remove(key); + } + + ServiceState.authTokens.Add(key, token); + + return Convert.ToBase64String(key.ToByteArray()); + } + + return string.Empty; + } + + /// <summary> + /// Gets the user's nominal folder. + /// </summary> + /// <param name="authToken">The authentication credentials.</param> + /// <returns>The store folder.</returns> + [WebMethod] + public StoreFolderSerializer GetNominalFolder(string authToken) + { + IAuthenticationToken token = ValidateAuthenticationToken(authToken); + if (token != null) + { + StoreFolder storeFolder = ServiceState.remoteAdmin.NMailServer.LocalStore.GetNominalStoreFolder(token); + return new StoreFolderSerializer(storeFolder); + } + + throw new InvalidOperationException("Authentication token is not valid."); + } + + [WebMethod] + public void DoSomething(StoreFolderSerializer folder) + { + } + + protected IAuthenticationToken ValidateAuthenticationToken(string authToken) + { + Guid key = new Guid(Convert.FromBase64String(authToken)); + + if (ServiceState.authTokens.ContainsKey(key)) + { + IAuthenticationToken token = ServiceState.authTokens[key]; + if (token.TokenExpiry > DateTime.Now) + { + return token; + } + else + { + ServiceState.authTokens.Remove(key); + } + } + + return null; + } +} Added: NMail/trunk/NMail.RemoteAccessService/App_Code/ServiceState.cs =================================================================== --- NMail/trunk/NMail.RemoteAccessService/App_Code/ServiceState.cs (rev 0) +++ NMail/trunk/NMail.RemoteAccessService/App_Code/ServiceState.cs 2006-12-13 13:34:51 UTC (rev 103) @@ -0,0 +1,42 @@ +using System; +using System.Configuration; +using System.Collections.Generic; +using System.Data; +using System.Runtime.Remoting.Lifetime; +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; + +using NMail.Authentication; +using NMail.Server; + +/// <summary> +/// Summary description for ServiceState +/// </summary> +public static class ServiceState +{ + public static Dictionary<Guid, IAuthenticationToken> authTokens = new Dictionary<Guid, IAuthenticationToken>(); + + public static RemoteAdministration remoteAdmin; + + static ServiceState() + { + remoteAdmin = (RemoteAdministration)Activator.GetObject(typeof(RemoteAdministration), "tcp://localhost:7877/RemoteAdministration.rem"); + SetupSponsorship(remoteAdmin, TimeSpan.MaxValue); + } + + static void SetupSponsorship(MarshalByRefObject o, TimeSpan timout) + { + ILease lease = o.InitializeLifetimeService() as ILease; + + if (lease != null && lease.CurrentState == LeaseState.Initial) + { + lease.InitialLeaseTime = timout; + lease.SponsorshipTimeout = timout; + lease.RenewOnCallTime = timout; + } + } +} Property changes on: NMail/trunk/NMail.RemoteAccessService/Bin ___________________________________________________________________ Name: svn:ignore + Mono.Security.dll NMail.dll NMail.RemoteAccessService.Serializers.dll NMail.RemoteAccessService.Serializers.pdb NMail.Server.dll log4net.dll Added: NMail/trunk/NMail.RemoteAccessService/Bin/NMail.RemoteAccessService.Serializers.dll.refresh =================================================================== (Binary files differ) Property changes on: NMail/trunk/NMail.RemoteAccessService/Bin/NMail.RemoteAccessService.Serializers.dll.refresh ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: NMail/trunk/NMail.RemoteAccessService/Bin/NMail.Server.dll.refresh =================================================================== (Binary files differ) Property changes on: NMail/trunk/NMail.RemoteAccessService/Bin/NMail.Server.dll.refresh ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: NMail/trunk/NMail.RemoteAccessService/Bin/NMail.dll.refresh =================================================================== (Binary files differ) Property changes on: NMail/trunk/NMail.RemoteAccessService/Bin/NMail.dll.refresh ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: NMail/trunk/NMail.RemoteAccessService/Bin/log4net.dll.refresh =================================================================== (Binary files differ) Property changes on: NMail/trunk/NMail.RemoteAccessService/Bin/log4net.dll.refresh ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: NMail/trunk/NMail.RemoteAccessService/Web.Config =================================================================== --- NMail/trunk/NMail.RemoteAccessService/Web.Config 2006-12-13 13:32:53 UTC (rev 102) +++ NMail/trunk/NMail.RemoteAccessService/Web.Config 2006-12-13 13:34:51 UTC (rev 103) @@ -19,7 +19,8 @@ --> <compilation debug="true"> <assemblies> - <add assembly="System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies></compilation> + <add assembly="System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> + <add assembly="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies></compilation> <!-- The <authentication> section enables configuration of the security authentication mode used by Property changes on: NMail/trunk/NMail.RemoteAccessService.Serializers ___________________________________________________________________ Name: svn:ignore + bin obj Added: NMail/trunk/NMail.RemoteAccessService.Serializers/Properties/AssemblyInfo.cs =================================================================== --- NMail/trunk/NMail.RemoteAccessService.Serializers/Properties/AssemblyInfo.cs (rev 0) +++ NMail/trunk/NMail.RemoteAccessService.Serializers/Properties/AssemblyInfo.cs 2006-12-13 13:34:51 UTC (rev 103) @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("NMail.RemoteAccessServiceSerializers")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("NMail.RemoteAccessServiceSerializers")] +[assembly: AssemblyCopyright("Copyright © 2006")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("993fe48c-1f11-4884-b320-fdb2e300c663")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] Modified: NMail/trunk/NMail.sln =================================================================== --- NMail/trunk/NMail.sln 2006-12-13 13:32:53 UTC (rev 102) +++ NMail/trunk/NMail.sln 2006-12-13 13:34:51 UTC (rev 103) @@ -46,7 +46,7 @@ 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.RemoteAccessServiceSerializers", "NMail.RemoteAccessServiceSerializers\NMail.RemoteAccessServiceSerializers.csproj", "{A54F735E-454A-4C65-8A61-66330AA64678}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NMail.RemoteAccessService.Serializers", "NMail.RemoteAccessService.Serializers\NMail.RemoteAccessService.Serializers.csproj", "{A54F735E-454A-4C65-8A61-66330AA64678}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tmy...@us...> - 2007-01-26 12:46:48
|
Revision: 124 http://svn.sourceforge.net/nmailserver/?rev=124&view=rev Author: tmyroadctfig Date: 2007-01-26 04:46:37 -0800 (Fri, 26 Jan 2007) Log Message: ----------- Further work on WebAccess. Modified Paths: -------------- NMail/trunk/NMail.RemoteAccessService/App_Code/RemoteAccessService.cs NMail/trunk/NMail.WebAccess/App_Code/Helper.cs NMail/trunk/NMail.WebAccess/App_Code/HtmlEscaper.cs NMail/trunk/NMail.WebAccess/App_Code/SubscribedFolderDataSource.cs NMail/trunk/NMail.WebAccess/App_Themes/Default/Default.css NMail/trunk/NMail.WebAccess/App_WebReferences/RemoteAccessService/RemoteAccessService.wsdl 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.cs NMail/trunk/NMail.WebAccess/Mail.aspx NMail/trunk/NMail.WebAccess/Web.config Removed Paths: ------------- NMail/trunk/NMail.WebAccess/Images/Skins/Default/ViewBackground.png Modified: NMail/trunk/NMail.RemoteAccessService/App_Code/RemoteAccessService.cs =================================================================== --- NMail/trunk/NMail.RemoteAccessService/App_Code/RemoteAccessService.cs 2007-01-24 09:02:05 UTC (rev 123) +++ NMail/trunk/NMail.RemoteAccessService/App_Code/RemoteAccessService.cs 2007-01-26 12:46:37 UTC (rev 124) @@ -248,6 +248,29 @@ throw new InvalidOperationException("Authentication token is not valid."); } #endregion + + #region GetMessageEnvelope + /// <summary> + /// Gets the message envelope for a given message Id. + /// </summary> + /// <param name="authToken">The authentication credentials.</param> + /// <param name="messageId">The Id of the message to get the envelope for.</param> + /// <param name="folderId">The Id of the folder the message is in.</param> + /// <returns>The message envelope.</returns> + [WebMethod] + public EnvelopeSerializer GetMessageEnvelope(string authToken, int messageId, int folderId) + { + IAuthenticationToken token = ValidateAuthenticationToken(authToken); + if (token != null) + { + MessageHeaders headers = ServiceState.remoteAdmin.NMailServer.LocalStore.GetMessageHeaders(token, messageId, folderId); + Envelope e = new Envelope(headers); + return new EnvelopeSerializer(e); + } + + throw new InvalidOperationException("Authentication token is not valid."); + } + #endregion #region GetMessageStructure /// <summary> Modified: NMail/trunk/NMail.WebAccess/App_Code/Helper.cs =================================================================== --- NMail/trunk/NMail.WebAccess/App_Code/Helper.cs 2007-01-24 09:02:05 UTC (rev 123) +++ NMail/trunk/NMail.WebAccess/App_Code/Helper.cs 2007-01-26 12:46:37 UTC (rev 124) @@ -29,5 +29,20 @@ return result; } + + public static Envelope GetEnvelope(EnvelopeSerializer es) + { + Envelope result = new Envelope(es.From, es.Date, es.Subject); + + result.Bcc = es.Bcc; + result.Cc = es.Cc; + result.InReplyTo = es.InReplyTo; + result.MessageId = es.MessageId; + result.ReplyTo = es.ReplyTo; + result.Sender = es.Sender; + result.To = es.To; + + return result; + } } } Modified: NMail/trunk/NMail.WebAccess/App_Code/HtmlEscaper.cs =================================================================== --- NMail/trunk/NMail.WebAccess/App_Code/HtmlEscaper.cs 2007-01-24 09:02:05 UTC (rev 123) +++ NMail/trunk/NMail.WebAccess/App_Code/HtmlEscaper.cs 2007-01-26 12:46:37 UTC (rev 124) @@ -27,5 +27,16 @@ return result; } + + public static string EscapeScriptsAndImages(string html) + { + string result = html.Replace("<img", "<img"); + result = result.Replace("<script", "<script"); + + // TODO: other nasty tags + // TODO: css proxy + + return result; + } } } Modified: NMail/trunk/NMail.WebAccess/App_Code/SubscribedFolderDataSource.cs =================================================================== --- NMail/trunk/NMail.WebAccess/App_Code/SubscribedFolderDataSource.cs 2007-01-24 09:02:05 UTC (rev 123) +++ NMail/trunk/NMail.WebAccess/App_Code/SubscribedFolderDataSource.cs 2007-01-26 12:46:37 UTC (rev 124) @@ -24,6 +24,14 @@ string authToken = (string)session["AuthToken"]; RemoteAccessService.RemoteAccessService ras = (RemoteAccessService.RemoteAccessService)session["RAS"]; + if (ras == null || authToken == null) + { + session.Abandon(); + FormsAuthentication.SignOut(); + FormsAuthentication.RedirectToLoginPage(); + return null; + } + StoreFolderSerializer[] serializedFolders = ras.GetAllSubscribedFolders(authToken); List<StoreFolder> result = new List<StoreFolder>(); List<int> folderIds = new List<int>(); Modified: NMail/trunk/NMail.WebAccess/App_Themes/Default/Default.css =================================================================== --- NMail/trunk/NMail.WebAccess/App_Themes/Default/Default.css 2007-01-24 09:02:05 UTC (rev 123) +++ NMail/trunk/NMail.WebAccess/App_Themes/Default/Default.css 2007-01-26 12:46:37 UTC (rev 124) @@ -22,9 +22,7 @@ .ViewButton { text-align: center; - background-image: url('../../Images/Skins/Default/ViewBackground.png'); - background-repeat: repeat-x; - background-position: left top; + background-color: lightblue; height: 30px; vertical-align: middle; padding-left: 0.5em; @@ -62,4 +60,4 @@ .MailListHeader { background-color: buttonface; -} \ No newline at end of file +} Modified: NMail/trunk/NMail.WebAccess/App_WebReferences/RemoteAccessService/RemoteAccessService.wsdl =================================================================== --- NMail/trunk/NMail.WebAccess/App_WebReferences/RemoteAccessService/RemoteAccessService.wsdl 2007-01-24 09:02:05 UTC (rev 123) +++ NMail/trunk/NMail.WebAccess/App_WebReferences/RemoteAccessService/RemoteAccessService.wsdl 2007-01-26 12:46:37 UTC (rev 124) @@ -155,6 +155,22 @@ <s:element minOccurs="0" maxOccurs="1" name="To" type="s:string" /> </s:sequence> </s:complexType> + <s:element name="GetMessageEnvelope"> + <s:complexType> + <s:sequence> + <s:element minOccurs="0" maxOccurs="1" name="authToken" type="s:string" /> + <s:element minOccurs="1" maxOccurs="1" name="messageId" type="s:int" /> + <s:element minOccurs="1" maxOccurs="1" name="folderId" type="s:int" /> + </s:sequence> + </s:complexType> + </s:element> + <s:element name="GetMessageEnvelopeResponse"> + <s:complexType> + <s:sequence> + <s:element minOccurs="1" maxOccurs="1" name="Envelope" nillable="true" type="tns:EnvelopeSerializer" /> + </s:sequence> + </s:complexType> + </s:element> <s:element name="GetMessageStructure"> <s:complexType> <s:sequence> @@ -248,6 +264,12 @@ <wsdl:message name="GetAllMessageEnvelopesSoapOut"> <wsdl:part name="parameters" element="tns:GetAllMessageEnvelopesResponse" /> </wsdl:message> + <wsdl:message name="GetMessageEnvelopeSoapIn"> + <wsdl:part name="parameters" element="tns:GetMessageEnvelope" /> + </wsdl:message> + <wsdl:message name="GetMessageEnvelopeSoapOut"> + <wsdl:part name="parameters" element="tns:GetMessageEnvelopeResponse" /> + </wsdl:message> <wsdl:message name="GetMessageStructureSoapIn"> <wsdl:part name="parameters" element="tns:GetMessageStructure" /> </wsdl:message> @@ -289,6 +311,10 @@ <wsdl:input message="tns:GetAllMessageEnvelopesSoapIn" /> <wsdl:output message="tns:GetAllMessageEnvelopesSoapOut" /> </wsdl:operation> + <wsdl:operation name="GetMessageEnvelope"> + <wsdl:input message="tns:GetMessageEnvelopeSoapIn" /> + <wsdl:output message="tns:GetMessageEnvelopeSoapOut" /> + </wsdl:operation> <wsdl:operation name="GetMessageStructure"> <wsdl:input message="tns:GetMessageStructureSoapIn" /> <wsdl:output message="tns:GetMessageStructureSoapOut" /> @@ -363,6 +389,15 @@ <soap:body use="literal" /> </wsdl:output> </wsdl:operation> + <wsdl:operation name="GetMessageEnvelope"> + <soap:operation soapAction="http://nmailserver.sf.net/RemoteAccessService/1.0/GetMessageEnvelope" style="document" /> + <wsdl:input> + <soap:body use="literal" /> + </wsdl:input> + <wsdl:output> + <soap:body use="literal" /> + </wsdl:output> + </wsdl:operation> <wsdl:operation name="GetMessageStructure"> <soap:operation soapAction="http://nmailserver.sf.net/RemoteAccessService/1.0/GetMessageStructure" style="document" /> <wsdl:input> @@ -447,6 +482,15 @@ <soap12:body use="literal" /> </wsdl:output> </wsdl:operation> + <wsdl:operation name="GetMessageEnvelope"> + <soap12:operation soapAction="http://nmailserver.sf.net/RemoteAccessService/1.0/GetMessageEnvelope" style="document" /> + <wsdl:input> + <soap12:body use="literal" /> + </wsdl:input> + <wsdl:output> + <soap12:body use="literal" /> + </wsdl:output> + </wsdl:operation> <wsdl:operation name="GetMessageStructure"> <soap12:operation soapAction="http://nmailserver.sf.net/RemoteAccessService/1.0/GetMessageStructure" style="document" /> <wsdl:input> Modified: NMail/trunk/NMail.WebAccess/Controls/Mail/MessageBody.aspx.cs =================================================================== --- NMail/trunk/NMail.WebAccess/Controls/Mail/MessageBody.aspx.cs 2007-01-24 09:02:05 UTC (rev 123) +++ NMail/trunk/NMail.WebAccess/Controls/Mail/MessageBody.aspx.cs 2007-01-26 12:46:37 UTC (rev 124) @@ -19,9 +19,23 @@ { protected void Page_Load(object sender, EventArgs e) { + // Ensure there is a valid folder Id + if (Session["SelectedFolderId"] == null) + { + this.MessageBody.Text = "No folder selected."; + return; + } + + // Ensure there is a valid message Id + if (Session["SelectedMessageId"] == null) + { + this.MessageBody.Text = "No message selected."; + return; + } + + // Get our session variables int selectedFolderId = (int) Session["SelectedFolderId"]; int messageId = (int) Session["SelectedMessageId"]; - string authToken = (string) Session["AuthToken"]; RemoteAccessService.RemoteAccessService ras = (RemoteAccessService.RemoteAccessService) Session["RAS"]; @@ -29,6 +43,7 @@ BodyStructure bodyStructure = Helper.GetBodyStructure(bs); int bodyPartNumber = 1; + bool htmlBody = false; if (bodyStructure.Count == 0) { @@ -51,6 +66,7 @@ if (subType == "html") { // We'll display the first HTML part we find + htmlBody = true; break; } } @@ -58,8 +74,16 @@ } string base64Body = ras.GetMessageMimePart(authToken, bodyPartNumber, messageId, selectedFolderId); - string bodyData = Encoding.UTF8.GetString(Convert.FromBase64String(base64Body)); + ByteString bodyData = new ByteString(Convert.FromBase64String(base64Body), Encoding.UTF8); + SimpleBodyPart body = MessageHelper.ParseMessage(bodyData); - this.MessageBody.Text = bodyData; + if (htmlBody) + { + this.MessageBody.Text = HtmlEscaper.EscapeScriptsAndImages(body.Data.ToString()); + } + else + { + this.MessageBody.Text = HtmlEscaper.EscapeAll(body.Data.ToString()); + } } } Modified: NMail/trunk/NMail.WebAccess/Controls/Mail/MessageViewer.ascx =================================================================== --- NMail/trunk/NMail.WebAccess/Controls/Mail/MessageViewer.ascx 2007-01-24 09:02:05 UTC (rev 123) +++ NMail/trunk/NMail.WebAccess/Controls/Mail/MessageViewer.ascx 2007-01-26 12:46:37 UTC (rev 124) @@ -1,3 +1,9 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeFile="MessageViewer.ascx.cs" Inherits="Controls_Mail_MessageViewer" %> -<iframe src="Controls/Mail/MessageBody.aspx"></iframe> \ No newline at end of file +<asp:Panel ID="EnvelopePanel" runat="server" Visible="false" Width="100%"> + <span class="MessageSubject"> + <asp:Literal ID="MessageSubject" runat="server" /> + </span> +</asp:Panel> + +<iframe src="Controls/Mail/MessageBody.aspx" Width="100%" /> \ No newline at end of file Modified: NMail/trunk/NMail.WebAccess/Controls/Mail/MessageViewer.ascx.cs =================================================================== --- NMail/trunk/NMail.WebAccess/Controls/Mail/MessageViewer.ascx.cs 2007-01-24 09:02:05 UTC (rev 123) +++ NMail/trunk/NMail.WebAccess/Controls/Mail/MessageViewer.ascx.cs 2007-01-26 12:46:37 UTC (rev 124) @@ -9,10 +9,29 @@ using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; +using NMail.DataTypes; +using NMail.WebAccess; +using RemoteAccessService; + public partial class Controls_Mail_MessageViewer : System.Web.UI.UserControl { protected void Page_Load(object sender, EventArgs e) { + // Ensure there is a valid folder and message Ids + if (Session["SelectedFolderId"] != null && Session["SelectedMessageId"] != null) + { + // Get our session variables + int selectedFolderId = (int)Session["SelectedFolderId"]; + int messageId = (int)Session["SelectedMessageId"]; + string authToken = (string)Session["AuthToken"]; + RemoteAccessService.RemoteAccessService ras = (RemoteAccessService.RemoteAccessService)Session["RAS"]; - } + EnvelopeSerializer es = ras.GetMessageEnvelope(authToken, messageId, selectedFolderId); + Envelope envelope = Helper.GetEnvelope(es); + + this.MessageSubject.Text = envelope.Subject; + + this.EnvelopePanel.Visible = true; + } + } } Modified: NMail/trunk/NMail.WebAccess/Controls/Mail/SubscribedFolderList.ascx.cs =================================================================== --- NMail/trunk/NMail.WebAccess/Controls/Mail/SubscribedFolderList.ascx.cs 2007-01-24 09:02:05 UTC (rev 123) +++ NMail/trunk/NMail.WebAccess/Controls/Mail/SubscribedFolderList.ascx.cs 2007-01-26 12:46:37 UTC (rev 124) @@ -50,6 +50,17 @@ int folderId = int.Parse(args.CommandArgument as string); NMail.DataTypes.LocalStore.StoreFolder folder = NMail.WebAccess.SubscribedFolderDataSource.GetStoreFolder(folderId); + if (Session["SelectedFolderId"] != null) + { + int currentFolderId = (int)Session["SelectedFolderId"]; + + // If the folder has changed remove the selected message Id + if (folderId != currentFolderId) + { + Session.Remove("SelectedMessageId"); + } + } + Session["SelectedFolderId"] = folderId; Session["SelectedFolderName"] = folder.FullFolderName; } Deleted: NMail/trunk/NMail.WebAccess/Images/Skins/Default/ViewBackground.png =================================================================== (Binary files differ) Modified: NMail/trunk/NMail.WebAccess/Mail.aspx =================================================================== --- NMail/trunk/NMail.WebAccess/Mail.aspx 2007-01-24 09:02:05 UTC (rev 123) +++ NMail/trunk/NMail.WebAccess/Mail.aspx 2007-01-26 12:46:37 UTC (rev 124) @@ -21,7 +21,7 @@ <table width="100%" border="0"> <tr> <td rowspan="3" valign="top"> - <asp:WebPartZone ID="LeftZone" runat="server" HeaderText=" "> + <asp:WebPartZone ID="LeftZone" runat="server" HeaderText=" " BorderColor="Transparent" BorderStyle="None"> <CloseVerb Enabled="false" Visible="false" /> <ZoneTemplate> <uc2:SubscribedFolderList ID="SubscribedFolderList" runat="server" /> @@ -30,13 +30,13 @@ </asp:WebPartZone> </td> <td valign="top"> - <asp:WebPartZone Width="100%" ID="TopZone" runat="server" LayoutOrientation="Horizontal" HeaderText=" "> - <CloseVerb Enabled="false" Visible="false" /> + <asp:WebPartZone Width="100%" ID="TopZone" runat="server" LayoutOrientation="Vertical" HeaderText=" " BorderStyle="None"> + <CloseVerb Enabled="False" Visible="False" /> </asp:WebPartZone> </td> <td rowspan="3" valign="top"> - <asp:WebPartZone ID="RightZone" runat="server" HeaderText=" "> - <CloseVerb Enabled="false" Visible="false" /> + <asp:WebPartZone ID="RightZone" runat="server" HeaderText=" " BorderColor="Transparent" BorderStyle="None"> + <CloseVerb Enabled="False" Visible="False" /> <ZoneTemplate> </ZoneTemplate> </asp:WebPartZone> @@ -44,7 +44,7 @@ </tr> <tr> <td valign="top"> - <asp:WebPartZone Width="100%" ID="CenterZone" runat="server" LayoutOrientation="Vertical" HeaderText=" "> + <asp:WebPartZone Width="100%" ID="CenterZone" runat="server" LayoutOrientation="Vertical" HeaderText=" " BorderColor="Transparent" BorderStyle="None"> <CloseVerb Enabled="false" Visible="false" /> <ZoneTemplate> <uc3:MailList ID="MailList1" runat="server" /> @@ -54,7 +54,7 @@ </tr> <tr> <td valign="top"> - <asp:WebPartZone Width="100%" ID="BottomZone" runat="server" LayoutOrientation="Horizontal" HeaderText=" "> + <asp:WebPartZone ID="BottomZone" runat="server" LayoutOrientation="Vertical" HeaderText=" " BorderColor="Transparent" BorderStyle="None" Width="100%"> <CloseVerb Enabled="false" Visible="false" /> <ZoneTemplate> <uc4:MessageViewer ID="MessageViewer1" runat="server" /> Modified: NMail/trunk/NMail.WebAccess/Web.config =================================================================== --- NMail/trunk/NMail.WebAccess/Web.config 2007-01-24 09:02:05 UTC (rev 123) +++ NMail/trunk/NMail.WebAccess/Web.config 2007-01-26 12:46:37 UTC (rev 124) @@ -24,7 +24,7 @@ <connectionStrings/> <system.web> - <pages theme="Default"/> + <pages theme="Default" enableEventValidation="false" viewStateEncryptionMode="Never"/> <!-- Set compilation debug="true" to insert debugging This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tmy...@us...> - 2007-02-05 11:19:47
|
Revision: 132 http://svn.sourceforge.net/nmailserver/?rev=132&view=rev Author: tmyroadctfig Date: 2007-02-05 03:19:45 -0800 (Mon, 05 Feb 2007) Log Message: ----------- Added some unit tests. Modified Paths: -------------- NMail/trunk/NMail.UnitTests/NMail.UnitTests.csproj Added Paths: ----------- NMail/trunk/NMail.UnitTests/Helper/ NMail/trunk/NMail.UnitTests/Helper/MimeHelperTests.cs Property Changed: ---------------- NMail/trunk/ Property changes on: NMail/trunk ___________________________________________________________________ Name: svn:ignore - NMail.suo NMail.Administration.Web.suo NMail.Administration.Web.Compiled + NMail.suo NMail.Administration.Web.suo NMail.Administration.Web.Compiled NMail.WebAccess.Compiled NMail.RemoteAccessService.Compiled Added: NMail/trunk/NMail.UnitTests/Helper/MimeHelperTests.cs =================================================================== --- NMail/trunk/NMail.UnitTests/Helper/MimeHelperTests.cs (rev 0) +++ NMail/trunk/NMail.UnitTests/Helper/MimeHelperTests.cs 2007-02-05 11:19:45 UTC (rev 132) @@ -0,0 +1,89 @@ +/* + * 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.Generic; +using System.Text; + +using NUnit.Framework; + +using NMail.DataTypes; +using NMail.Helper; + +namespace NMail.Helper { + /// <summary> + /// Unit tests for the MIME helper. + /// </summary> + [TestFixture] + public class MimeHelperTests { + + #region Content Type Parsing + + public const string ContentType1 = "multipart/mixed;\r\n boundary=\"----_=_NextPart_001_01C723C4.37D53E7D\""; + + public const string ContentType2 = "multipart/related;\r\n type=\"multipart/alternative\";\r\n boundary=\"----_=_NextPart_002_01C723C4.37D53E7D\""; + + public const string ContentType3 = "text/html"; + + [Test] + public void ContentTypeParsing() { + Dictionary<string, string> parameters; + string subType; + MimeContentType contentType; + + contentType = MimeHelper.GetContentType(ContentType1, out subType, out parameters); + Assert.AreEqual(contentType, MimeContentType.Multipart, "ContentType1"); + Assert.AreEqual("mixed", subType, "ContentType1"); + Assert.IsTrue(parameters.Count == 1, "ContentType1: parameter count=1"); + Assert.IsTrue(parameters["boundary"].Equals("----_=_NextPart_001_01C723C4.37D53E7D"), "ContentType1: boundary"); + + contentType = MimeHelper.GetContentType(ContentType2, out subType, out parameters); + Assert.AreEqual(contentType, MimeContentType.Multipart, "ContentType2"); + Assert.AreEqual("related", subType, "ContentType2"); + Assert.IsTrue(parameters.Count == 2, "ContentType2: parameter count=2"); + Assert.IsTrue(parameters["type"].Equals("multipart/alternative"), "ContentType2: type"); + Assert.IsTrue(parameters["boundary"].Equals("----_=_NextPart_002_01C723C4.37D53E7D"), "ContentType2: boundary"); + + contentType = MimeHelper.GetContentType(ContentType3, out subType, out parameters); + Assert.AreEqual(contentType, MimeContentType.Text, "ContentType3"); + Assert.AreEqual("html", subType, "ContentType3"); + Assert.IsTrue(parameters.Count == 0, "ContentType3: parameter count=0"); + } + #endregion + + #region Get Attachment Name + + public const string AttachmentName1 = "Content-Type: image/jpeg;\r\n name=\"image001.jpg\""; + + public const string AttachmentName2 = "Content-Type: image/jpeg"; + + [Test] + public void GetAttachmentName() { + string name; + MessageHeaders headers; + + headers = new MessageHeaders(new ByteString(AttachmentName1, Encoding.ASCII)); + name = MimeHelper.GetAttachmentName(headers); + Assert.AreEqual("image001.jpg", name, "AttachmentName1"); + + headers = new MessageHeaders(new ByteString(AttachmentName2, Encoding.ASCII)); + name = MimeHelper.GetAttachmentName(headers); + Assert.AreEqual(null, name, "AttachmentName2 is null"); + } + #endregion + } +} Modified: NMail/trunk/NMail.UnitTests/NMail.UnitTests.csproj =================================================================== --- NMail/trunk/NMail.UnitTests/NMail.UnitTests.csproj 2007-02-05 11:15:44 UTC (rev 131) +++ NMail/trunk/NMail.UnitTests/NMail.UnitTests.csproj 2007-02-05 11:19:45 UTC (rev 132) @@ -44,6 +44,7 @@ <Compile Include="DNSCacheTests.cs" /> <Compile Include="DomainTests.cs" /> <Compile Include="EmailAddressTests.cs" /> + <Compile Include="Helper\MimeHelperTests.cs" /> <Compile Include="HostTests.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="SmtpServiceTests.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. |