Update of /cvsroot/mahogany/M/include
In directory usw-pr-cvs1:/tmp/cvs-serv6662/include
Modified Files:
HeaderInfoImpl.h MailFolder.h MailFolderCC.h MailFolderCmn.h
Log Message:
1. made it possible to return either msgnos or UIDs from MF::SearchMessages()
2. moved the generic implementation to MFCmn from MFCC
Index: HeaderInfoImpl.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/HeaderInfoImpl.h,v
retrieving revision 1.42
retrieving revision 1.43
diff -b -u -2 -r1.42 -r1.43
--- HeaderInfoImpl.h 23 Nov 2001 17:28:19 -0000 1.42
+++ HeaderInfoImpl.h 5 Jul 2002 15:57:05 -0000 1.43
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////////
// Project: M - cross platform e-mail GUI client
-// File name: include/HeaderInfoCC.h: HeaderInfoListImpl class
+// File name: include/HeaderInfoImpl.h: HeaderInfoListImpl class
// Purpose: provide implementation of the ABC HeaderInfoList
// Author: Karsten Ball�der, Vadim Zeitlin
@@ -32,6 +32,5 @@
/**
This is a very simple HeaderInfoList implementation. It preallocates an
- array big enough to store the info for all the messages and doesn't support
- sorting nor threading.
+ array big enough to store the info for all the messages.
It should be considered just as a prototype. The final version should
@@ -40,16 +39,10 @@
TODO:
- 1. combine sorting and threading: we need to thread messages first and then
- to sort the siblings _separately_ (i.e. first sort the roots, then the
- children of the first root, &c) - but for this we need to store the
- parent-children relationships and not only the order of the threaded
- messages...
-
- 2. although there is nothing wrong with preallocating all the memory we need
+ 1. although there is nothing wrong with preallocating all the memory we need
(even for 100000 message we take just 400Kb), it would still be nice to
have some smart way of storing HeaderInfo objects as using array is less
than ideal because adding/removing messages is a common operation.
- 3. batch processing of OnRemove() calls: instead of removing the item
+ 2. batch processing of OnRemove() calls: instead of removing the item
immediately, remember the range of items to be removed. If the new
item to remove is not contiguous to the existing range, DoRemove()
@@ -183,5 +176,5 @@
MsgnoType posFrom, MsgnoType posTo) const;
- /// the folder we contain the listinf for
+ /// the folder we contain the listing for
MailFolder *m_mf;
Index: MailFolder.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/MailFolder.h,v
retrieving revision 1.177
retrieving revision 1.178
diff -b -u -2 -r1.177 -r1.178
--- MailFolder.h 4 Jul 2002 17:22:36 -0000 1.177
+++ MailFolder.h 5 Jul 2002 15:57:06 -0000 1.178
@@ -129,4 +129,7 @@
enum
{
+ /// return the msgnos, not UIDs of the messages (default)
+ SEARCH_MSGNO = 0,
+
/// search messages with the given flag set (default)
SEARCH_SET = 0,
@@ -615,7 +618,10 @@
Search messages for certain criteria.
+ @param crit the search criterium
+ @param flags the search flags, only SEARCH_UID and SEARCH_MSGNO allowed
@return UIdArray with UIds of matching messages, caller must free it
*/
- virtual UIdArray *SearchMessages(const SearchCriterium *crit) = 0;
+ virtual UIdArray *SearchMessages(const SearchCriterium *crit,
+ int flags = SEARCH_UID) = 0;
//@}
Index: MailFolderCC.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/MailFolderCC.h,v
retrieving revision 1.205
retrieving revision 1.206
diff -b -u -2 -r1.205 -r1.206
--- MailFolderCC.h 4 Jul 2002 17:22:36 -0000 1.205
+++ MailFolderCC.h 5 Jul 2002 15:57:06 -0000 1.206
@@ -179,5 +179,5 @@
MsgnoType last = 0) const;
- virtual UIdArray *SearchMessages(const SearchCriterium *crit);
+ virtual UIdArray *SearchMessages(const SearchCriterium *crit, int flags);
@@ -361,6 +361,14 @@
unsigned long SearchAndCountResults(struct search_program *pgm) const;
- /// helper of SearchAndCountResults() and SearchByFlag()
- MsgnoArray *DoSearch(struct search_program *pgm, int ccSearchFlags) const;
+ /**
+ common part of the various Search() functions: calls c-client
+ mail_search()
+
+ @param pgm the search program
+ @param flags either SEARCH_UID or SEARCH_MSGNO
+ @return array containing either UIDs or msgnos of the found messages
+ */
+ MsgnoArray *DoSearch(struct search_program *pgm,
+ int flags = SEARCH_MSGNO) const;
/// called by CountAllMessages() to perform actual counting
Index: MailFolderCmn.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/MailFolderCmn.h,v
retrieving revision 1.74
retrieving revision 1.75
diff -b -u -2 -r1.74 -r1.75
--- MailFolderCmn.h 19 Nov 2001 20:32:27 -0000 1.74
+++ MailFolderCmn.h 5 Jul 2002 15:57:06 -0000 1.75
@@ -143,4 +143,5 @@
wxWindow *parent = NULL);
+ virtual UIdArray *SearchMessages(const SearchCriterium *crit, int flags);
virtual bool ThreadMessages(const ThreadParams& thrParams,
ThreadData *thrData);
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Bringing you mounds of caffeinated joy.
http://thinkgeek.com/sf
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates