/// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="rule">Onwer rule that owns this action.</param>
 /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
 /// <param name="id">Action ID.</param>
 /// <param name="description">Action description.</param>
 internal GlobalMessageRuleActionBase(GlobalMessageRule rule,GlobalMessageRuleActionCollection owner,string id,string description)
 {
     m_pRule       = rule;
     m_pOwner      = owner;
     m_ID          = id;
     m_Description = description;
 }
        /// <summary>
        /// Default constructor.
        /// </summary>
        /// <param name="rule">Owner global message rule.</param>
        internal GlobalMessageRuleActionCollection(GlobalMessageRule rule)
        {
            m_pRule = rule;
            m_pActions = new List<GlobalMessageRuleActionBase>();

            Bind();
        }
Example #3
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="rule">Onwer rule that ows this action.</param>
 /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
 /// <param name="id">Action ID.</param>
 /// <param name="description">Action description.</param>
 internal GlobalMessageRuleAction_DeleteMessage(GlobalMessageRule rule, GlobalMessageRuleActionCollection owner, string id, string description) : base(rule, owner, id, description)
 {
     /*  Action data structure:
      *      <ActionData>
      *      </ActionData>
      */
 }
        /// <summary>
        /// Adds new global message rule to virtual server.
        /// </summary>
        /// <param name="enabled">Specifies if global message rules is enabled.</param>
        /// <param name="description">Global message rule description.</param>
        /// <param name="matchExpression">Match expression.</param>
        /// <param name="checkNext">Specifies when next rule is checked.</param>
        /// <returns></returns>
        public GlobalMessageRule Add(bool enabled,string description,string matchExpression,GlobalMessageRule_CheckNextRule_enum checkNext)
        {
            /* AddGlobalMessageRule <virtualServerID> "<ruleID>" <cost> <enabled> "<description>" "<matchExpression>" <checkNext>
                  Responses:
                    +OK                     
                    -ERR <errorText>
            */

            string id   = Guid.NewGuid().ToString();
            long   cost = DateTime.Now.Ticks;

            // Call TCP AddGlopbalMessageRule
            m_pVirtualServer.Server.TcpClient.TcpStream.WriteLine("AddGlobalMessageRule " + 
                m_pVirtualServer.VirtualServerID + " " + 
                TextUtils.QuoteString(id) + " " + 
                cost + " " +
                enabled + " " +
                TextUtils.QuoteString(description) + " " + 
                TextUtils.QuoteString(matchExpression) + " " + 
                (int)checkNext
            );
                        
            string response = m_pVirtualServer.Server.ReadLine();
            if(!response.ToUpper().StartsWith("+OK")){
                throw new Exception(response);
            }

            GlobalMessageRule rule = new GlobalMessageRule(m_pVirtualServer,this,id,cost,enabled,description,matchExpression,checkNext);
            m_pGlobalMessageRules.Add(rule);
            return rule;
        }
Example #5
0
        /// <summary>
        /// Adds new global message rule to virtual server.
        /// </summary>
        /// <param name="enabled">Specifies if global message rules is enabled.</param>
        /// <param name="description">Global message rule description.</param>
        /// <param name="matchExpression">Match expression.</param>
        /// <param name="checkNext">Specifies when next rule is checked.</param>
        /// <returns></returns>
        public GlobalMessageRule Add(bool enabled, string description, string matchExpression, GlobalMessageRule_CheckNextRule_enum checkNext)
        {
            /* AddGlobalMessageRule <virtualServerID> "<ruleID>" <cost> <enabled> "<description>" "<matchExpression>" <checkNext>
             *    Responses:
             +OK
             *      -ERR <errorText>
             */

            string id   = Guid.NewGuid().ToString();
            long   cost = DateTime.Now.Ticks;

            // Call TCP AddGlopbalMessageRule
            m_pVirtualServer.Server.TcpClient.TcpStream.WriteLine("AddGlobalMessageRule " +
                                                                  m_pVirtualServer.VirtualServerID + " " +
                                                                  TextUtils.QuoteString(id) + " " +
                                                                  cost + " " +
                                                                  enabled + " " +
                                                                  TextUtils.QuoteString(description) + " " +
                                                                  TextUtils.QuoteString(matchExpression) + " " +
                                                                  (int)checkNext
                                                                  );

            string response = m_pVirtualServer.Server.ReadLine();

            if (!response.ToUpper().StartsWith("+OK"))
            {
                throw new Exception(response);
            }

            GlobalMessageRule rule = new GlobalMessageRule(m_pVirtualServer, this, id, cost, enabled, description, matchExpression, checkNext);

            m_pGlobalMessageRules.Add(rule);
            return(rule);
        }
Example #6
0
        /// <summary>
        /// Default constructor.
        /// </summary>
        /// <param name="rule">Owner global message rule.</param>
        internal GlobalMessageRuleActionCollection(GlobalMessageRule rule)
        {
            m_pRule    = rule;
            m_pActions = new List <GlobalMessageRuleActionBase>();

            Bind();
        }
Example #7
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="rule">Onwer rule that owns this action.</param>
 /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
 /// <param name="id">Action ID.</param>
 /// <param name="description">Action description.</param>
 internal GlobalMessageRuleActionBase(GlobalMessageRule rule, GlobalMessageRuleActionCollection owner, string id, string description)
 {
     m_pRule       = rule;
     m_pOwner      = owner;
     m_ID          = id;
     m_Description = description;
 }
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="rule">Onwer rule that ows this action.</param>
 /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
 /// <param name="id">Action ID.</param>
 /// <param name="description">Action description.</param>
 internal GlobalMessageRuleAction_DeleteMessage(GlobalMessageRule rule,GlobalMessageRuleActionCollection owner,string id,string description) : base(rule,owner,id,description)
 {
     /*  Action data structure:
             <ActionData>
             </ActionData>
     */
 }
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="rule">Onwer rule that ows this action.</param>
 /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
 /// <param name="id">Action ID.</param>
 /// <param name="description">Action description.</param>
 /// <param name="host">FTP server where to store message.</param>
 /// <param name="port">FTP server port.</param>
 /// <param name="userName">FTP server user name.</param>
 /// <param name="password">FTP server user password.</param>
 /// <param name="folder">FTP folder where to store message.</param>
 internal GlobalMessageRuleAction_StoreToFtp(GlobalMessageRule rule, GlobalMessageRuleActionCollection owner, string id, string description, string host, int port, string userName, string password, string folder) : base(rule, owner, id, description)
 {
     m_Server   = host;
     m_Port     = port;
     m_UserName = userName;
     m_Password = password;
     m_Folder   = folder;
 }
        /// <summary>
        /// Default constructor.
        /// </summary>
        /// <param name="rule">Onwer rule that ows this action.</param>
        /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
        /// <param name="id">Action ID.</param>
        /// <param name="description">Action description.</param>
        /// <param name="host">FTP server where to store message.</param>
        /// <param name="port">FTP server port.</param>
        /// <param name="userName">FTP server user name.</param>
        /// <param name="password">FTP server user password.</param>
        /// <param name="folder">FTP folder where to store message.</param>
        internal GlobalMessageRuleAction_StoreToFtp(GlobalMessageRule rule,GlobalMessageRuleActionCollection owner,string id,string description,string host,int port,string userName,string password,string folder) : base(rule,owner,id,description)
        {
            m_Server   = host;
            m_Port     = port;
            m_UserName = userName;
            m_Password = password;
            m_Folder   = folder;

        }
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="rule">Onwer rule that ows this action.</param>
 /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
 /// <param name="id">Action ID.</param>
 /// <param name="description">Action description.</param>
 /// <param name="actionData">Action data.</param>
 internal GlobalMessageRuleAction_RemoveHeaderField(GlobalMessageRule rule,GlobalMessageRuleActionCollection owner,string id,string description,byte[] actionData) : base(rule,owner,id,description)
 {
     /*  Action data structure:
             <ActionData>
                 <HeaderFieldName></HeaderFieldName>
             </ActionData>
     */
                 
     XmlTable table = new XmlTable("ActionData");
     table.Parse(actionData);
     m_HeaderFieldName = table.GetValue("HeaderFieldName");            
 }
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="rule">Onwer rule that ows this action.</param>
 /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
 /// <param name="id">Action ID.</param>
 /// <param name="description">Action description.</param>
 /// <param name="actionData">Action data.</param>
 internal GlobalMessageRuleAction_ForwardToEmail(GlobalMessageRule rule,GlobalMessageRuleActionCollection owner,string id,string description,byte[] actionData) : base(rule,owner,id,description)
 {
     /*  Action data structure:
             <ActionData>
                 <Email></Email>
             </ActionData>
     */
                 
     XmlTable table = new XmlTable("ActionData");
     table.Parse(actionData);
     m_EmailAddress = table.GetValue("Email");            
 }
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="rule">Onwer rule that ows this action.</param>
 /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
 /// <param name="id">Action ID.</param>
 /// <param name="description">Action description.</param>
 /// <param name="actionData">Action data.</param>
 internal GlobalMessageRuleAction_SendError(GlobalMessageRule rule,GlobalMessageRuleActionCollection owner,string id,string description,byte[] actionData) : base(rule,owner,id,description)
 {
     /*  Action data structure:
             <ActionData>
                 <ErrorText></ErrorText>
             </ActionData>
     */
                 
     XmlTable table = new XmlTable("ActionData");
     table.Parse(actionData);
     m_ErrorText = table.GetValue("ErrorText");            
 }
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="rule">Onwer rule that ows this action.</param>
 /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
 /// <param name="id">Action ID.</param>
 /// <param name="description">Action description.</param>
 /// <param name="actionData">Action data.</param>
 internal GlobalMessageRuleAction_MoveToImapFolder(GlobalMessageRule rule,GlobalMessageRuleActionCollection owner,string id,string description,byte[] actionData) : base(rule,owner,id,description)
 {
     /*  Action data structure:
             <ActionData>
                 <Folder></Folder>
             </ActionData>
     */
                 
     XmlTable table = new XmlTable("ActionData");
     table.Parse(actionData);
     m_Folder = table.GetValue("Folder");            
 }
Example #15
0
        /// <summary>
        /// Default constructor.
        /// </summary>
        /// <param name="rule">Onwer rule that ows this action.</param>
        /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
        /// <param name="id">Action ID.</param>
        /// <param name="description">Action description.</param>
        /// <param name="actionData">Action data.</param>
        internal GlobalMessageRuleAction_ForwardToEmail(GlobalMessageRule rule, GlobalMessageRuleActionCollection owner, string id, string description, byte[] actionData) : base(rule, owner, id, description)
        {
            /*  Action data structure:
             *      <ActionData>
             *          <Email></Email>
             *      </ActionData>
             */

            XmlTable table = new XmlTable("ActionData");

            table.Parse(actionData);
            m_EmailAddress = table.GetValue("Email");
        }
        /// <summary>
        /// Default constructor.
        /// </summary>
        /// <param name="rule">Onwer rule that ows this action.</param>
        /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
        /// <param name="id">Action ID.</param>
        /// <param name="description">Action description.</param>
        /// <param name="actionData">Action data.</param>
        internal GlobalMessageRuleAction_StoreToDiskFolder(GlobalMessageRule rule, GlobalMessageRuleActionCollection owner, string id, string description, byte[] actionData) : base(rule, owner, id, description)
        {
            /*  Action data structure:
             *      <ActionData>
             *          <Folder></Folder>
             *      </ActionData>
             */

            XmlTable table = new XmlTable("ActionData");

            table.Parse(actionData);
            m_Folder = table.GetValue("Folder");
        }
        /// <summary>
        /// Default constructor.
        /// </summary>
        /// <param name="rule">Onwer rule that ows this action.</param>
        /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
        /// <param name="id">Action ID.</param>
        /// <param name="description">Action description.</param>
        /// <param name="actionData">Action data.</param>
        internal GlobalMessageRuleAction_RemoveHeaderField(GlobalMessageRule rule, GlobalMessageRuleActionCollection owner, string id, string description, byte[] actionData) : base(rule, owner, id, description)
        {
            /*  Action data structure:
             *      <ActionData>
             *          <HeaderFieldName></HeaderFieldName>
             *      </ActionData>
             */

            XmlTable table = new XmlTable("ActionData");

            table.Parse(actionData);
            m_HeaderFieldName = table.GetValue("HeaderFieldName");
        }
        /// <summary>
        /// Default constructor.
        /// </summary>
        /// <param name="rule">Onwer rule that ows this action.</param>
        /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
        /// <param name="id">Action ID.</param>
        /// <param name="description">Action description.</param>
        /// <param name="actionData">Action data.</param>
        internal GlobalMessageRuleAction_SendError(GlobalMessageRule rule, GlobalMessageRuleActionCollection owner, string id, string description, byte[] actionData) : base(rule, owner, id, description)
        {
            /*  Action data structure:
             *      <ActionData>
             *          <ErrorText></ErrorText>
             *      </ActionData>
             */

            XmlTable table = new XmlTable("ActionData");

            table.Parse(actionData);
            m_ErrorText = table.GetValue("ErrorText");
        }
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="rule">Onwer rule that ows this action.</param>
 /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
 /// <param name="id">Action ID.</param>
 /// <param name="description">Action description.</param>
 /// <param name="actionData">Action data.</param>
 internal GlobalMessageRuleAction_ForwardToHost(GlobalMessageRule rule,GlobalMessageRuleActionCollection owner,string id,string description,byte[] actionData) : base(rule,owner,id,description)
 {
     /*  Action data structure:
             <ActionData>
                 <Host></Host>
                 <Port></Port>
             </ActionData>
     */
                 
     XmlTable table = new XmlTable("ActionData");
     table.Parse(actionData);
     m_Host = table.GetValue("Host");
     m_Port = Convert.ToInt32(table.GetValue("Port"));
 }
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="rule">Onwer rule that ows this action.</param>
 /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
 /// <param name="id">Action ID.</param>
 /// <param name="description">Action description.</param>
 /// <param name="actionData">Action data.</param>
 internal GlobalMessageRuleAction_PostToHttp(GlobalMessageRule rule,GlobalMessageRuleActionCollection owner,string id,string description,byte[] actionData) : base(rule,owner,id,description)
 {
     /*  Action data structure:
             <ActionData>
                 <URL></URL>
                 <FileName></FileName>
             </ActionData>
     */
                 
     XmlTable table = new XmlTable("ActionData");
     table.Parse(actionData);
     m_Url = table.GetValue("URL");
  // table.GetValue("FileName");            
 }
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="rule">Onwer rule that ows this action.</param>
 /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
 /// <param name="id">Action ID.</param>
 /// <param name="description">Action description.</param>
 /// <param name="actionData">Action data.</param>
 internal GlobalMessageRuleAction_ExecuteProgram(GlobalMessageRule rule,GlobalMessageRuleActionCollection owner,string id,string description,byte[] actionData) : base(rule,owner,id,description)
 {
     /*  Action data structure:
             <ActionData>
                 <Program></Program>
                 <Arguments></Arguments>
             </ActionData>
     */
                 
     XmlTable table = new XmlTable("ActionData");
     table.Parse(actionData);
     m_Program     = table.GetValue("Program");
     m_ProgramArgs = table.GetValue("Arguments");            
 }
        /// <summary>
        /// Default constructor.
        /// </summary>
        /// <param name="rule">Onwer rule that ows this action.</param>
        /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
        /// <param name="id">Action ID.</param>
        /// <param name="description">Action description.</param>
        /// <param name="actionData">Action data.</param>
        internal GlobalMessageRuleAction_AutoResponse(GlobalMessageRule rule,GlobalMessageRuleActionCollection owner,string id,string description,byte[] actionData) : base(rule,owner,id,description)
        {
            /*  Action data structure:
                    <ActionData>
                        <From></From>
                        <Message></Message>
                    </ActionData>
            */

            
            XmlTable table = new XmlTable("ActionData");
            table.Parse(actionData);
            m_From    = table.GetValue("From");
            m_Message = System.Text.Encoding.Default.GetBytes(table.GetValue("Message"));  
        }
        /// <summary>
        /// Default constructor.
        /// </summary>
        /// <param name="rule">Onwer rule that ows this action.</param>
        /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
        /// <param name="id">Action ID.</param>
        /// <param name="description">Action description.</param>
        /// <param name="actionData">Action data.</param>
        internal GlobalMessageRuleAction_ExecuteProgram(GlobalMessageRule rule, GlobalMessageRuleActionCollection owner, string id, string description, byte[] actionData) : base(rule, owner, id, description)
        {
            /*  Action data structure:
             *      <ActionData>
             *          <Program></Program>
             *          <Arguments></Arguments>
             *      </ActionData>
             */

            XmlTable table = new XmlTable("ActionData");

            table.Parse(actionData);
            m_Program     = table.GetValue("Program");
            m_ProgramArgs = table.GetValue("Arguments");
        }
        /// <summary>
        /// Default constructor.
        /// </summary>
        /// <param name="rule">Onwer rule that ows this action.</param>
        /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
        /// <param name="id">Action ID.</param>
        /// <param name="description">Action description.</param>
        /// <param name="actionData">Action data.</param>
        internal GlobalMessageRuleAction_PostToHttp(GlobalMessageRule rule, GlobalMessageRuleActionCollection owner, string id, string description, byte[] actionData) : base(rule, owner, id, description)
        {
            /*  Action data structure:
             *      <ActionData>
             *          <URL></URL>
             *          <FileName></FileName>
             *      </ActionData>
             */

            XmlTable table = new XmlTable("ActionData");

            table.Parse(actionData);
            m_Url = table.GetValue("URL");
            // table.GetValue("FileName");
        }
        /// <summary>
        /// Default constructor.
        /// </summary>
        /// <param name="rule">Onwer rule that ows this action.</param>
        /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
        /// <param name="id">Action ID.</param>
        /// <param name="description">Action description.</param>
        /// <param name="actionData">Action data.</param>
        internal GlobalMessageRuleAction_ForwardToHost(GlobalMessageRule rule, GlobalMessageRuleActionCollection owner, string id, string description, byte[] actionData) : base(rule, owner, id, description)
        {
            /*  Action data structure:
             *      <ActionData>
             *          <Host></Host>
             *          <Port></Port>
             *      </ActionData>
             */

            XmlTable table = new XmlTable("ActionData");

            table.Parse(actionData);
            m_Host = table.GetValue("Host");
            m_Port = Convert.ToInt32(table.GetValue("Port"));
        }
Example #26
0
        /// <summary>
        /// Default constructor.
        /// </summary>
        /// <param name="rule">Onwer rule that ows this action.</param>
        /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
        /// <param name="id">Action ID.</param>
        /// <param name="description">Action description.</param>
        /// <param name="actionData">Action data.</param>
        internal GlobalMessageRuleAction_AutoResponse(GlobalMessageRule rule, GlobalMessageRuleActionCollection owner, string id, string description, byte[] actionData) : base(rule, owner, id, description)
        {
            /*  Action data structure:
             *      <ActionData>
             *          <From></From>
             *          <Message></Message>
             *      </ActionData>
             */


            XmlTable table = new XmlTable("ActionData");

            table.Parse(actionData);
            m_From    = table.GetValue("From");
            m_Message = System.Text.Encoding.Default.GetBytes(table.GetValue("Message"));
        }
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="rule">Onwer rule that ows this action.</param>
 /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
 /// <param name="id">Action ID.</param>
 /// <param name="description">Action description.</param>
 /// <param name="actionData">Action data.</param>
 internal GlobalMessageRuleAction_StoreToFtp(GlobalMessageRule rule,GlobalMessageRuleActionCollection owner,string id,string description,byte[] actionData) : base(rule,owner,id,description)
 {
     /*  Action data structure:
             <ActionData>
                 <Server></Server>
                 <Port></Server>
                 <User></User>
                 <Password></Password>
                 <Folder></Folder>
             </ActionData>
     */
                 
     XmlTable table = new XmlTable("ActionData");
     table.Parse(actionData);
     m_Server   = table.GetValue("Server");
     m_Port     = Convert.ToInt32(table.GetValue("Port"));
     m_UserName = table.GetValue("User");
     m_Password = table.GetValue("Password");
     m_Folder   = table.GetValue("Folder");            
 }
        /// <summary>
        /// Deletes specified global message rule from virtual server.
        /// </summary>
        /// <param name="rule">Global message rule to delete.</param>
        public void Remove(GlobalMessageRule rule)
        {
            /* DeleteGlobalMessageRule <virtualServerID> "<ruleID>"
                  Responses:
                    +OK                     
                    -ERR <errorText>
            */

            string id = Guid.NewGuid().ToString();

            // Call TCP DeleteGlobalMessageRule
            m_pVirtualServer.Server.TcpClient.TcpStream.WriteLine("DeleteGlobalMessageRule " + m_pVirtualServer.VirtualServerID + " " + TextUtils.QuoteString(rule.ID));
                        
            string response = m_pVirtualServer.Server.ReadLine();
            if(!response.ToUpper().StartsWith("+OK")){
                throw new Exception(response);
            }

            m_pGlobalMessageRules.Remove(rule);
        }
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="rule">Onwer rule that ows this action.</param>
 /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
 /// <param name="id">Action ID.</param>
 /// <param name="description">Action description.</param>
 /// <param name="actionData">Action data.</param>
 internal GlobalMessageRuleAction_PostToNntpNewsgroup(GlobalMessageRule rule,GlobalMessageRuleActionCollection owner,string id,string description,byte[] actionData) : base(rule,owner,id,description)
 {
     /*  Action data structure:
             <ActionData>
                 <Server></Server>
                 <Port></Server>
                 <User></User>
                 <Password></Password>
                 <Newsgroup></Newsgroup>
             </ActionData>
     */
                 
     XmlTable table = new XmlTable("ActionData");
     table.Parse(actionData);
     m_Server    = table.GetValue("Server");
     m_Port      = Convert.ToInt32(table.GetValue("Port"));
     // table.Add("User","");
     // table.Add("Password","");
     m_Newsgroup = table.GetValue("Newsgroup");            
 }
        /// <summary>
        /// Default constructor.
        /// </summary>
        /// <param name="rule">Onwer rule that ows this action.</param>
        /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
        /// <param name="id">Action ID.</param>
        /// <param name="description">Action description.</param>
        /// <param name="actionData">Action data.</param>
        internal GlobalMessageRuleAction_PostToNntpNewsgroup(GlobalMessageRule rule, GlobalMessageRuleActionCollection owner, string id, string description, byte[] actionData) : base(rule, owner, id, description)
        {
            /*  Action data structure:
             *      <ActionData>
             *          <Server></Server>
             *          <Port></Server>
             *          <User></User>
             *          <Password></Password>
             *          <Newsgroup></Newsgroup>
             *      </ActionData>
             */

            XmlTable table = new XmlTable("ActionData");

            table.Parse(actionData);
            m_Server = table.GetValue("Server");
            m_Port   = Convert.ToInt32(table.GetValue("Port"));
            // table.Add("User","");
            // table.Add("Password","");
            m_Newsgroup = table.GetValue("Newsgroup");
        }
        /// <summary>
        /// Default constructor.
        /// </summary>
        /// <param name="rule">Onwer rule that ows this action.</param>
        /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
        /// <param name="id">Action ID.</param>
        /// <param name="description">Action description.</param>
        /// <param name="actionData">Action data.</param>
        internal GlobalMessageRuleAction_StoreToFtp(GlobalMessageRule rule, GlobalMessageRuleActionCollection owner, string id, string description, byte[] actionData) : base(rule, owner, id, description)
        {
            /*  Action data structure:
             *      <ActionData>
             *          <Server></Server>
             *          <Port></Server>
             *          <User></User>
             *          <Password></Password>
             *          <Folder></Folder>
             *      </ActionData>
             */

            XmlTable table = new XmlTable("ActionData");

            table.Parse(actionData);
            m_Server   = table.GetValue("Server");
            m_Port     = Convert.ToInt32(table.GetValue("Port"));
            m_UserName = table.GetValue("User");
            m_Password = table.GetValue("Password");
            m_Folder   = table.GetValue("Folder");
        }
Example #32
0
        /// <summary>
        /// Deletes specified global message rule from virtual server.
        /// </summary>
        /// <param name="rule">Global message rule to delete.</param>
        public void Remove(GlobalMessageRule rule)
        {
            /* DeleteGlobalMessageRule <virtualServerID> "<ruleID>"
             *    Responses:
             +OK
             *      -ERR <errorText>
             */

            string id = Guid.NewGuid().ToString();

            // Call TCP DeleteGlobalMessageRule
            m_pVirtualServer.Server.TcpClient.TcpStream.WriteLine("DeleteGlobalMessageRule " + m_pVirtualServer.VirtualServerID + " " + TextUtils.QuoteString(rule.ID));

            string response = m_pVirtualServer.Server.ReadLine();

            if (!response.ToUpper().StartsWith("+OK"))
            {
                throw new Exception(response);
            }

            m_pGlobalMessageRules.Remove(rule);
        }
Example #33
0
        /// <summary>
        /// Edit constructor.
        /// </summary>
        /// <param name="virtualServer">Virtual server.</param>
        /// <param name="rule">Rule to update.</param>
        public wfrm_GlobalMessageRule(VirtualServer virtualServer,GlobalMessageRule rule)
        {
            m_pVirtualServer = virtualServer;
            m_pRule          = rule;

            InitUI();
            
            m_pTab_General_Enabled.Checked = rule.Enabled;
            if(rule.CheckNextRule == GlobalMessageRule_CheckNextRule_enum.Always){
                m_pTab_General_CheckNextRule.SelectedIndex = 0;
            }
            else if(rule.CheckNextRule == GlobalMessageRule_CheckNextRule_enum.IfMatches){
                m_pTab_General_CheckNextRule.SelectedIndex = 1;
            }
            else if(rule.CheckNextRule == GlobalMessageRule_CheckNextRule_enum.IfNotMatches){
                m_pTab_General_CheckNextRule.SelectedIndex = 2;
            }
            m_pTab_General_Description.Text = rule.Description;
            m_pTab_General_MatchExpression.Text = rule.MatchExpression;
            this.m_pTab_General_MatchExpression_TextChanged(this,new EventArgs());

            LoadActions();
        }
Example #34
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="rule">Onwer rule that ows this action.</param>
 /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
 /// <param name="id">Action ID.</param>
 /// <param name="description">Action description.</param>
 /// <param name="from">MAIL FROM: what is reported to destination SMTP server when auto response is sent.</param>
 /// <param name="message">Full auto response message. This must be rfc 2822 defined message.</param>
 internal GlobalMessageRuleAction_AutoResponse(GlobalMessageRule rule, GlobalMessageRuleActionCollection owner, string id, string description, string from, byte[] message) : base(rule, owner, id, description)
 {
     m_From    = from;
     m_Message = message;
 }
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="rule">Onwer rule that ows this action.</param>
 /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
 /// <param name="id">Action ID.</param>
 /// <param name="description">Action description.</param>
 /// <param name="host">NTTP server where to post message.</param>
 /// <param name="port">NNTP server port.</param>
 /// <param name="newsgroup">NTTP newsgroup where to post message.</param>
 internal GlobalMessageRuleAction_PostToNntpNewsgroup(GlobalMessageRule rule, GlobalMessageRuleActionCollection owner, string id, string description, string host, int port, string newsgroup) : base(rule, owner, id, description)
 {
     m_Server    = host;
     m_Port      = port;
     m_Newsgroup = newsgroup;
 }
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="rule">Onwer rule that ows this action.</param>
 /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
 /// <param name="id">Action ID.</param>
 /// <param name="description">Action description.</param>
 /// <param name="url">HTTP URL where to post message.</param>
 internal GlobalMessageRuleAction_PostToHttp(GlobalMessageRule rule,GlobalMessageRuleActionCollection owner,string id,string description,string url) : base(rule,owner,id,description)
 {
     m_Url = url;
 }
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="rule">Onwer rule that ows this action.</param>
 /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
 /// <param name="id">Action ID.</param>
 /// <param name="description">Action description.</param>
 /// <param name="email">Email address where to forward message.</param>
 internal GlobalMessageRuleAction_ForwardToEmail(GlobalMessageRule rule,GlobalMessageRuleActionCollection owner,string id,string description,string email) : base(rule,owner,id,description)
 {
     m_EmailAddress = email;
 }
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="rule">Onwer rule that ows this action.</param>
 /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
 /// <param name="id">Action ID.</param>
 /// <param name="description">Action description.</param>
 /// <param name="url">HTTP URL where to post message.</param>
 internal GlobalMessageRuleAction_PostToHttp(GlobalMessageRule rule, GlobalMessageRuleActionCollection owner, string id, string description, string url) : base(rule, owner, id, description)
 {
     m_Url = url;
 }
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="rule">Onwer rule that ows this action.</param>
 /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
 /// <param name="id">Action ID.</param>
 /// <param name="description">Action description.</param>
 /// <param name="headerField">Header field name what to remove.</param>
 internal GlobalMessageRuleAction_RemoveHeaderField(GlobalMessageRule rule, GlobalMessageRuleActionCollection owner, string id, string description, string headerField) : base(rule, owner, id, description)
 {
     m_HeaderFieldName = headerField;
 }
Example #40
0
        private void m_pOk_Click(object sender, EventArgs e)
        {
            if(!CheckSyntax(false)){
                return;
            }

            if(m_pTab_General_Description.Text == ""){
                MessageBox.Show(this,"Please fill description !","Error:",MessageBoxButtons.OK,MessageBoxIcon.Error);
                return;
            }            
                 
            // Add new rule
            if(m_pRule == null){  
                m_pRule = m_pVirtualServer.GlobalMessageRules.Add(
                    m_pTab_General_Enabled.Checked,
                    m_pTab_General_Description.Text,
                    m_pTab_General_MatchExpression.Text,
                    (GlobalMessageRule_CheckNextRule_enum)((WComboBoxItem)m_pTab_General_CheckNextRule.SelectedItem).Tag
                );
            }
            // Edit rule
            else{
                m_pRule.Enabled = m_pTab_General_Enabled.Checked;
                m_pRule.Description = m_pTab_General_Description.Text;
                m_pRule.MatchExpression = m_pTab_General_MatchExpression.Text;
                m_pRule.CheckNextRule = (GlobalMessageRule_CheckNextRule_enum)((WComboBoxItem)m_pTab_General_CheckNextRule.SelectedItem).Tag;
                m_pRule.Commit();
            }

            this.DialogResult = DialogResult.OK;
        }
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="rule">Onwer rule that ows this action.</param>
 /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
 /// <param name="id">Action ID.</param>
 /// <param name="description">Action description.</param>
 /// <param name="from">MAIL FROM: what is reported to destination SMTP server when auto response is sent.</param>
 /// <param name="message">Full auto response message. This must be rfc 2822 defined message.</param>
 internal GlobalMessageRuleAction_AutoResponse(GlobalMessageRule rule,GlobalMessageRuleActionCollection owner,string id,string description,string from,byte[] message) : base(rule,owner,id,description)
 {
     m_From    = from;
     m_Message = message;
 }
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="rule">Onwer rule that ows this action.</param>
 /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
 /// <param name="id">Action ID.</param>
 /// <param name="description">Action description.</param>
 /// <param name="headerField">Header field name what to remove.</param>
 internal GlobalMessageRuleAction_RemoveHeaderField(GlobalMessageRule rule,GlobalMessageRuleActionCollection owner,string id,string description,string headerField) : base(rule,owner,id,description)
 {
     m_HeaderFieldName = headerField;
 }
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="rule">Onwer rule that ows this action.</param>
 /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
 /// <param name="id">Action ID.</param>
 /// <param name="description">Action description.</param>
 /// <param name="program">Program to execute.</param>
 /// <param name="programArgs">Executable program arguments.</param>
 internal GlobalMessageRuleAction_ExecuteProgram(GlobalMessageRule rule, GlobalMessageRuleActionCollection owner, string id, string description, string program, string programArgs) : base(rule, owner, id, description)
 {
     m_Program     = program;
     m_ProgramArgs = programArgs;
 }
Example #44
0
        private void m_pTab_General_Create_Click(object sender,EventArgs e)
        {
            if(!CheckSyntax(false)){
                return;
            }
            
            m_pRule = m_pVirtualServer.GlobalMessageRules.Add(
                m_pTab_General_Enabled.Checked,
                m_pTab_General_Description.Text,
                m_pTab_General_MatchExpression.Text,
                (GlobalMessageRule_CheckNextRule_enum)((WComboBoxItem)m_pTab_General_CheckNextRule.SelectedItem).Tag
            );

            m_pTab_General_Create.Visible = false;
            m_pTab_General_MatchExpression.Height += 25;
            m_pTab.TabPages.Add(m_pTab_Actions);
        }
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="rule">Onwer rule that owns this action.</param>
 /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
 /// <param name="id">Action ID.</param>
 /// <param name="description">Action description.</param>
 /// <param name="headerFieldName">Header field name.</param>
 /// <param name="headerFieldValue">Header field name.</param>
 internal GlobalMessageRuleAction_AddHeaderField(GlobalMessageRule rule, GlobalMessageRuleActionCollection owner, string id, string description, string headerFieldName, string headerFieldValue) : base(rule, owner, id, description)
 {
     m_HeaderFieldName  = headerFieldName;
     m_HeaderFieldValue = headerFieldValue;
 }
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="rule">Onwer rule that ows this action.</param>
 /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
 /// <param name="id">Action ID.</param>
 /// <param name="description">Action description.</param>
 /// <param name="errorText">Error text.</param>
 internal GlobalMessageRuleAction_SendError(GlobalMessageRule rule,GlobalMessageRuleActionCollection owner,string id,string description,string errorText) : base(rule,owner,id,description)
 {
     m_ErrorText = errorText;
 }
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="rule">Onwer rule that ows this action.</param>
 /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
 /// <param name="id">Action ID.</param>
 /// <param name="description">Action description.</param>
 /// <param name="host">Host name or IP where to forward message.</param>
 /// <param name="port">Destination host port.</param>
 internal GlobalMessageRuleAction_ForwardToHost(GlobalMessageRule rule, GlobalMessageRuleActionCollection owner, string id, string description, string host, int port) : base(rule, owner, id, description)
 {
     m_Host = host;
     m_Port = port;
 }
 /// <summary>
 /// Default constructor. 
 /// </summary>
 /// <param name="rule">Onwer rule that owns this action.</param>
 /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
 /// <param name="id">Action ID.</param>
 /// <param name="description">Action description.</param>
 /// <param name="headerFieldName">Header field name.</param>
 /// <param name="headerFieldValue">Header field name.</param>
 internal GlobalMessageRuleAction_AddHeaderField(GlobalMessageRule rule,GlobalMessageRuleActionCollection owner,string id,string description,string headerFieldName,string headerFieldValue) : base(rule,owner,id,description)
 {
     m_HeaderFieldName  = headerFieldName;
     m_HeaderFieldValue = headerFieldValue;
 }
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="rule">Onwer rule that ows this action.</param>
 /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
 /// <param name="id">Action ID.</param>
 /// <param name="description">Action description.</param>
 /// <param name="host">Host name or IP where to forward message.</param>
 /// <param name="port">Destination host port.</param>
 internal GlobalMessageRuleAction_ForwardToHost(GlobalMessageRule rule,GlobalMessageRuleActionCollection owner,string id,string description,string host,int port) : base(rule,owner,id,description)
 {
     m_Host = host;
     m_Port = port;
 }
        /// <summary>
        /// Add constructor.
        /// </summary>
        /// <param name="rule">Owner rule.</param>
        public wfrm_GlobalMessageRule_Action(GlobalMessageRule rule)
        {
            m_pRule = rule;

            InitUI();

            m_pAction.SelectedIndex = 0;
        }
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="rule">Onwer rule that ows this action.</param>
 /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
 /// <param name="id">Action ID.</param>
 /// <param name="description">Action description.</param>
 /// <param name="program">Program to execute.</param>
 /// <param name="programArgs">Executable program arguments.</param>
 internal GlobalMessageRuleAction_ExecuteProgram(GlobalMessageRule rule,GlobalMessageRuleActionCollection owner,string id,string description,string program,string programArgs) : base(rule,owner,id,description)
 {
     m_Program     = program;
     m_ProgramArgs = programArgs;
 }
        /// <summary>
        /// Edit constructor.
        /// </summary>
        /// <param name="rule">Owner rule.</param>
        /// <param name="action">Global messgae rule action action.</param>
        public wfrm_GlobalMessageRule_Action(GlobalMessageRule rule,GlobalMessageRuleActionBase action)
        {
            m_pRule       = rule;
            m_pActionData = action;

            InitUI();

            m_pDescription.Text = action.Description;
            m_pAction.Enabled = false;

            //--- Pase action data -------------------------------------------------//

            #region AutoResponse

            if(action.ActionType == GlobalMessageRuleAction_enum.AutoResponse){
                GlobalMessageRuleAction_AutoResponse a = (GlobalMessageRuleAction_AutoResponse)action;
                m_pAutoResponse_From.Text        = a.From;
                m_pAutoResponse_FullMEssage.Text = System.Text.Encoding.Default.GetString(a.Message);

                m_pAction.SelectedIndex = 0;
            }

            #endregion

            #region DeleteMessage

            else if(action.ActionType == GlobalMessageRuleAction_enum.DeleteMessage){
                GlobalMessageRuleAction_DeleteMessage a = (GlobalMessageRuleAction_DeleteMessage)action;

                m_pAction.SelectedIndex = 1;
            }

            #endregion

            #region ExecuteProgram

            else if(action.ActionType == GlobalMessageRuleAction_enum.ExecuteProgram){
                GlobalMessageRuleAction_ExecuteProgram a = (GlobalMessageRuleAction_ExecuteProgram)action;
                m_pExecuteProgram_ProgramToExecute.Text = a.Program;
                m_pExecuteProgram_ProgramArguments.Text = a.ProgramArguments;

                m_pAction.SelectedIndex = 2;
            }

            #endregion

            #region ForwardToEmail

            else if(action.ActionType == GlobalMessageRuleAction_enum.ForwardToEmail){
                GlobalMessageRuleAction_ForwardToEmail a = (GlobalMessageRuleAction_ForwardToEmail)action;
                m_pForwardToEmail_Email.Text = a.EmailAddress;

                m_pAction.SelectedIndex = 3;
            }

            #endregion

            #region ForwardToHost

            else if(action.ActionType == GlobalMessageRuleAction_enum.ForwardToHost){
                GlobalMessageRuleAction_ForwardToHost a = (GlobalMessageRuleAction_ForwardToHost)action;
                m_pForwardToHost_Host.Text      = a.Host;
                m_pForwardToHost_HostPort.Value = a.Port;

                m_pAction.SelectedIndex = 4;
            }

            #endregion

            #region StoreToDiskFolder

            else if(action.ActionType == GlobalMessageRuleAction_enum.StoreToDiskFolder){
                GlobalMessageRuleAction_StoreToDiskFolder a = (GlobalMessageRuleAction_StoreToDiskFolder)action;
                m_pStoreToDiskFolder_Folder.Text = a.Folder;

                m_pAction.SelectedIndex = 5;
            }

            #endregion

            #region StoreToIMAPFolder

            else if(action.ActionType == GlobalMessageRuleAction_enum.MoveToIMAPFolder){
                GlobalMessageRuleAction_MoveToImapFolder a = (GlobalMessageRuleAction_MoveToImapFolder)action;
                m_pMoveToIMAPFolder_Folder.Text = a.Folder;

                m_pAction.SelectedIndex = 6;
            }

            #endregion

            #region AddHeaderField

            else if(action.ActionType == GlobalMessageRuleAction_enum.AddHeaderField){
                GlobalMessageRuleAction_AddHeaderField a = (GlobalMessageRuleAction_AddHeaderField)action;
                m_pAddHeaderField_FieldName.Text  = a.HeaderFieldName;
                m_pAddHeaderField_FieldValue.Text = a.HeaderFieldValue;

                m_pAction.SelectedIndex = 7;
            }

            #endregion

            #region RemoveHeaderField

            else if(action.ActionType == GlobalMessageRuleAction_enum.RemoveHeaderField){
                GlobalMessageRuleAction_RemoveHeaderField a = (GlobalMessageRuleAction_RemoveHeaderField)action;
                m_pRemoveHeaderField_FieldName.Text = a.HeaderFieldName;

                m_pAction.SelectedIndex = 8;
            }

            #endregion

            #region SendErrorToClient

            else if(action.ActionType == GlobalMessageRuleAction_enum.SendErrorToClient){
                GlobalMessageRuleAction_SendError a = (GlobalMessageRuleAction_SendError)action;
                m_pSendErrorToClient_ErrorText.Text = a.SmtpErrorText;

                m_pAction.SelectedIndex = 9;
            }

            #endregion

            #region StoreToFTPFolder

            else if(action.ActionType == GlobalMessageRuleAction_enum.StoreToFTPFolder){
                GlobalMessageRuleAction_StoreToFtp a = (GlobalMessageRuleAction_StoreToFtp)action;
                m_pStoreToFTPFolder_Server.Text   = a.Server;
                m_pStoreToFTPFolder_Port.Value    = a.Port;
                m_pStoreToFTPFolder_User.Text     = a.UserName;
                m_pStoreToFTPFolder_Password.Text = a.Password;
                m_pStoreToFTPFolder_Folder.Text   = a.Folder;

                m_pAction.SelectedIndex = 10;
            }

            #endregion

            #region PostToNNTPNewsGroup

            else if(action.ActionType == GlobalMessageRuleAction_enum.PostToNNTPNewsGroup){
                GlobalMessageRuleAction_PostToNntpNewsgroup a = (GlobalMessageRuleAction_PostToNntpNewsgroup)action;
                m_pPostToNNTPNewsgroup_Server.Text = a.Server;
                m_pPostToNNTPNewsgroup_Port.Value  = a.Port;
                // table.Add("User","");
                // table.Add("Password","");
                m_pPostToNNTPNewsgroup_Newsgroup.Text = a.Newsgroup;

                m_pAction.SelectedIndex = 11;
            }

            #endregion

            #region PostToHTTP

            else if(action.ActionType == GlobalMessageRuleAction_enum.PostToHTTP){
                GlobalMessageRuleAction_PostToHttp a = (GlobalMessageRuleAction_PostToHttp)action;
                m_pPostToHTTP_URL.Text = a.Url;
                // table.GetValue("FileName");

                m_pAction.SelectedIndex = 12;
            }

            #endregion

            //---------------------------------------------------------------------//
        }
Example #53
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="rule">Onwer rule that ows this action.</param>
 /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
 /// <param name="id">Action ID.</param>
 /// <param name="description">Action description.</param>
 /// <param name="email">Email address where to forward message.</param>
 internal GlobalMessageRuleAction_ForwardToEmail(GlobalMessageRule rule, GlobalMessageRuleActionCollection owner, string id, string description, string email) : base(rule, owner, id, description)
 {
     m_EmailAddress = email;
 }
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="rule">Onwer rule that ows this action.</param>
 /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
 /// <param name="id">Action ID.</param>
 /// <param name="description">Action description.</param>
 /// <param name="errorText">Error text.</param>
 internal GlobalMessageRuleAction_SendError(GlobalMessageRule rule, GlobalMessageRuleActionCollection owner, string id, string description, string errorText) : base(rule, owner, id, description)
 {
     m_ErrorText = errorText;
 }
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="rule">Onwer rule that ows this action.</param>
 /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
 /// <param name="id">Action ID.</param>
 /// <param name="description">Action description.</param>
 /// <param name="folder">IMAP folder where to move message. If specified folder doesn't exist, message is store users Inbox.</param>
 internal GlobalMessageRuleAction_MoveToImapFolder(GlobalMessageRule rule,GlobalMessageRuleActionCollection owner,string id,string description,string folder) : base(rule,owner,id,description)
 {
     m_Folder = folder;
 }
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="rule">Onwer rule that ows this action.</param>
 /// <param name="owner">Owner GlobalMessageRuleActionCollection that owns this action.</param>
 /// <param name="id">Action ID.</param>
 /// <param name="description">Action description.</param>
 /// <param name="folder">Disk folder where to store message.</param>
 internal GlobalMessageRuleAction_StoreToDiskFolder(GlobalMessageRule rule, GlobalMessageRuleActionCollection owner, string id, string description, string folder) : base(rule, owner, id, description)
 {
     m_Folder = folder;
 }