Update of /cvsroot/mahogany/M/src/classes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6784/src/classes
Modified Files:
ListReceiver.cpp
Log Message:
1. removed MailFolder::GetImapSpec(), it doesn't make sense for an ABC
2. (AS)MailFolder::ListFolders() now always returns relative paths instead
of IMAP specs
Index: ListReceiver.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/classes/ListReceiver.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -b -u -2 -r1.5 -r1.6
--- ListReceiver.cpp 13 Oct 2003 00:41:13 -0000 1.5
+++ ListReceiver.cpp 30 Jun 2005 23:39:47 -0000 1.6
@@ -52,15 +52,12 @@
}
-bool ListEventReceiver::ListAll(ASMailFolder *asmf)
+bool
+ListEventReceiver::List(ASMailFolder *asmf,
+ const String& pattern,
+ const String& root)
{
CHECK( asmf, false, _T("NULL ASMailFolder in ListEventReceiver::ListAll") );
- m_specRoot = asmf->GetImapSpec();
-
- Ticket t = asmf->ListFolders(_T(""), false, _T(""), this);
- if ( t == ILLEGAL_TICKET )
- return false;
-
- return true;
+ return asmf->ListFolders(pattern, false, root, this) != ILLEGAL_TICKET;
}
@@ -92,27 +89,16 @@
// is it the special event which signals that there will be no more of
// folders?
- wxString path = result->GetName();
- if ( path.empty() )
+ if ( result->NoMore() )
{
// end of enumeration
OnNoMoreFolders();
-
- m_specRoot.clear();
}
- else
- {
- // if our ListAll() was called, make path really just a path from the
- // full c-client IMAP spec (otherwise m_specRoot is empty and calling
- // StartsWith() is a NOOP: it just copies path to name)
- String name;
- if ( !path.StartsWith(m_specRoot, &name) )
+ else // notification about a folder
{
- FAIL_MSG( _T("unexpected folder in mm_list()") );
- }
-
const wxChar delim = result->GetDelimiter();
+ String name = result->GetName();
// we don't want the leading slash, if any
- if ( !name.empty() && name[0u] == delim )
+ if ( *name.c_str() == delim )
name.erase(0, 1);
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates