Update of /cvsroot/mahogany/M/include
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25873/include
Modified Files:
Address.h
Log Message:
extended ContainsOwnAddresses() to return the matching own address and also to only
consider mailing list addresses optionally, not always
Index: Address.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/Address.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -b -u -2 -r1.11 -r1.12
--- Address.h 17 Oct 2003 13:33:32 -0000 1.11
+++ Address.h 6 Jul 2004 12:24:40 -0000 1.12
@@ -153,6 +153,32 @@
const AddressList_obj& addrList2);
-/// check whether the given string contains at least one of our own addresses
-extern bool ContainsOwnAddress(const String& str, Profile *profile);
+/// Values for ContainsOwnAddress() last parameter
+enum OwnAddressKind
+{
+ /// The addresses the user uses for "From:"
+ OwnAddress_From,
+
+ /// The addresses which can reach this user (this includes MLs, ...)
+ OwnAddress_To,
+
+ /// End of enum marker
+ OwnAddress_Max
+};
+
+/**
+ Check whether the given string contains at least one of our own addresses.
+
+ Check if the given address apepars in list of our own addresses, as defined
+ by kind parameter.
+
+ @param str the address to check
+ @param profile to get the own addresses from
+ @param kind of the "own" addresses to check
+ @param own the address which did match, if any
+ */
+extern bool ContainsOwnAddress(const String& str,
+ Profile *profile,
+ OwnAddressKind kind = OwnAddress_To,
+ String *own = NULL);
/// Modifies <mailto:(.*)> to <$1> and removes other <[a-z]+:.*> parts
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates