Update of /cvsroot/mahogany/M/include
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv7889/include

Modified Files:
        Address.h Message.h Moptions.h 
Log Message:
removed deprecated address-parsing functions from Message and replaced them 
with Address class methods

Index: Address.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/Address.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -b -u -2 -r1.14 -r1.15
--- Address.h   16 Jan 2006 20:31:59 -0000      1.14
+++ Address.h   23 Jun 2006 23:27:30 -0000      1.15
@@ -72,14 +72,38 @@
 
    /**
-     Removes Re: Re[n]: Re(n): and the local translation of
-     it from the beginning of a subject line - used to convert the subject to
-     the canonical form
+      Compares two address strings, returns true if they're equal.
+    */
+   static bool Compare(const String& address1, const String& address2);
+
+   /**
+      Removes Re: Re[n]: Re(n): and the local translation of it from the
+      beginning of a subject line.
+
+      This is used to convert the subject to the canonical form before
+      comparing it &c.
     */
    static String NormalizeSubject(const String& subject);
 
    /**
+      Returns a string of the form "personal <address>".
+
+      This function should be used instead of simple string concatenation
+      because the personal part may need to be quoted.
     */
    static String BuildFullForm(const String& personal, const String& address);
 
+   /**
+      Returns true if the address matches any of the entries in the array.
+
+      Array entries may contain wildcards (? and *).
+
+      @param addresses the array of the addresses to check against
+      @param address the address to match
+      @param match if non-NULL, filled in with the matched address
+    */
+   static bool IsInList(const wxArrayString& addresses,
+                        const String& address,
+                        String *match = NULL);
+
 protected:
    /// must have default ctor because we declare copy ctor private
@@ -188,7 +212,4 @@
                                String *own = NULL);
 
-/// Modifies <mailto:(.*)> to <$1> and removes other <[a-z]+:.*> parts
-extern String FilterAddressList(const String& original);
-
 #endif // _ADDRESS_H_
 

Index: Message.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/Message.h,v
retrieving revision 1.71
retrieving revision 1.72
diff -b -u -2 -r1.71 -r1.72
--- Message.h   14 Jul 2004 18:20:00 -0000      1.71
+++ Message.h   23 Jun 2006 23:27:30 -0000      1.72
@@ -236,5 +236,5 @@
        @return the number of addresses retrieved
    */
-   virtual size_t ExtractAddressesFromHeader(wxArrayString& addresses);
+   virtual size_t ExtractAddressesFromHeader(wxArrayString& addresses) const;
 
    //@}
@@ -459,30 +459,4 @@
    };
 
-   /** @name Address stuff
-
-       THESE FUNCTIONS ARE DEPRECATED, USE Address AND AddressList INSTEAD!
-    */
-   //@{
-
-   /// return "Foo" from address of form "Foo Bar <baz>"
-   static String GetFirstNameFromAddress(const String& address);
-
-   /// return "Bar" from address of form "Foo Bar <baz>"
-   static String GetLastNameFromAddress(const String& address);
-
-   /// return "Foo Bar" from address of form "Foo Bar <baz>"
-   static String GetNameFromAddress(const String& address);
-
-   /// return "baz" from address of form "Foo Bar <baz>"
-   static String GetEMailFromAddress(const String &address);
-
-   /// compare 2 addresses, return TRUE if they're the same
-   static bool CompareAddresses(const String& adr1, const String& adr2);
-
-   /// return the address index in the array of addresses or wxNOT_FOUND
-   static int FindAddress(const wxArrayString& addresses, const String& addr);
-
-   //@}
-
 protected:
    /** virtual destructor */

Index: Moptions.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/Moptions.h,v
retrieving revision 1.104
retrieving revision 1.105
diff -b -u -2 -r1.104 -r1.105
--- Moptions.h  9 Apr 2006 00:41:03 -0000       1.104
+++ Moptions.h  23 Jun 2006 23:27:30 -0000      1.105
@@ -2285,5 +2285,5 @@
 
 /// name of addressbook to use in whitelist spam filter
-#define MP_WHITE_LIST_DEFVAL _T("whitelist.adb")
+#define MP_WHITE_LIST_DEFVAL wxEmptyString
 
 /// treat mail in this folder as junk mail


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to