+2004-11-09 Helge Hess <helge.hess@skyrix.com>
+
+ * SOGoMailBaseObject.m, SOGoMailManager.m, SOGoMailConnectionEntry.m:
+ added cache flush operations for getmail (v0.9.49)
+
+2004-11-08 Helge Hess <helge.hess@skyrix.com>
+
+ * SOGoMailManager.m: improved a log message (v0.9.48)
+
2004-10-30 Helge Hess <helge.hess@skyrix.com>
* v0.9.47
- (NSString *)imap4FolderName;
- (NGImap4Client *)imap4Client;
+- (void)flushMailCaches;
+
/* UI navigation */
- (NSArray *)treeNavigationNodes;
password:[self imap4Password]];
}
+- (void)flushMailCaches {
+ [[self mailManager] flushCachesForURL:[self imap4URL]];
+}
+
/* UI navigation */
- (NSString *)treeNavigationLinkAtDepth:(int)_depth {
- (void)cacheUIDs:(NSArray *)_uids forURL:(NSURL *)_url
qualifier:(id)_q sortOrdering:(id)_so;
+- (void)flushMailCaches;
+
@end
#endif /* __SOGo_SOGoMailConnectionEntry_H__ */
ASSIGNCOPY(self->cachedUIDs, _uids);
}
+- (void)flushMailCaches {
+ ASSIGNCOPY(self->uidSortOrdering, nil);
+ ASSIGNCOPY(self->uidFolderURL, nil);
+ ASSIGNCOPY(self->cachedUIDs, nil);
+}
+
@end /* SOGoMailConnectionEntry */
/* client object */
- (NGImap4Client *)imap4ClientForURL:(NSURL *)_url password:(NSString *)_pwd;
+- (void)flushCachesForURL:(NSURL *)_url;
/* folder hierarchy */
imap4Separator = [[ud stringForKey:@"SOGoIMAP4StringSeparator"] copy];
if ([imap4Separator length] == 0)
imap4Separator = @"/";
- NSLog(@"Note: using '%@' as the IMAP4 folder separator.", imap4Separator);
+ NSLog(@"Note(SOGoMailManager): using '%@' as the IMAP4 folder separator.",
+ imap4Separator);
}
+ (id)defaultMailManager {
return client;
}
+- (void)flushCachesForURL:(NSURL *)_url {
+ SOGoMailConnectionEntry *entry;
+
+ if ((entry = [self entryForURL:_url]) == nil) /* nothing cached */
+ return;
+
+ [entry flushFolderHierarchyCache];
+ [entry flushMailCaches];
+}
+
/* folder hierarchy */
- (NSArray *)_getDirectChildren:(NSArray *)_array folderName:(NSString *)_fn {
return [NSException exceptionWithHTTPStatus:500 /* server error */
reason:[result valueForKey:@"reason"]];
}
-
+
[entry flushFolderHierarchyCache];
// [self debugWithFormat:@"created mailbox: %@: %@", newPath, result];
return nil;
# Version file
-SUBMINOR_VERSION:=46
+SUBMINOR_VERSION:=49
# v0.9.44 requires NGMime v4.3.194
# v0.9.41 requires NGMime v4.3.190
+2004-11-09 Helge Hess <helge.hess@skyrix.com>
+
+ * UIxMailListView.m: flush mail caches in the getMail action (v0.9.58)
+
2004-10-29 Helge Hess <helge.hess@skyrix.com>
* UIxMailEditor.m: reenabled deletion of temporary mail files (v0.9.57)
*/
// $Id$
-
#include <SOGoUI/UIxComponent.h>
+/*
+ UIxMailListView
+
+ This component represent a list of mails and is attached to an SOGoMailFolder
+ object.
+*/
+
@interface UIxMailListView : UIxComponent
{
NSArray *sortedUIDs; /* we always need to retrieve all anyway! */
- (id)getMailAction {
// TODO: we might want to flush the caches?
+ id client;
+
+ if ((client = [self clientObject]) == nil) {
+ return [NSException exceptionWithHTTPStatus:404 /* Not Found */
+ reason:@"did not find mail folder"];
+ }
+
+ if (![client respondsToSelector:@selector(flushMailCaches)]) {
+ return [NSException exceptionWithHTTPStatus:500 /* Server Error */
+ reason:
+ @"invalid client object (does not support flush)"];
+ }
+
+ [client flushMailCaches];
return [self redirectToLocation:@"view"];
}
# $Id$
-SUBMINOR_VERSION:=57
+SUBMINOR_VERSION:=58
# v0.9.50 requires NGMime v4.3.190
# v0.9.43 requires NGObjWeb v4.3.73