+2005-07-19 Helge Hess <helge.hess@opengroupware.org>
+
+ * v0.9.109
+
+ * added fragile base class version checks to most classes
+
+ * SOGoMailBaseObject.m: cache failed login attempts (+ connection) to
+ improve failed-login behaviour
+
2005-07-18 Helge Hess <helge.hess@opengroupware.org>
* SOGoDraftObject.m: send text/* attachments with disposition 'attach'
SOGoMailFolder
SOGoSharedInboxFolder
SOGoMailObject
- SOGoMailConnectionEntry
[EODataSource]
SOGoMailFolderDataSource
- SOGoMailManager
- SOGoMailboxInfo
Defaults
========
#include "common.h"
@implementation SOGoCalendarMailBodyPart
+
++ (int)version {
+ return [super version] + 0 /* v1 */;
+}
+
++ (void)initialize {
+ NSAssert2([super version] == 1,
+ @"invalid superclass (%@) version %i !",
+ NSStringFromClass([self superclass]), [super version]);
+}
+
@end /* SOGoCalendarMailBodyPart */
static BOOL debugOn = NO;
static BOOL showTextAttachmentsInline = NO;
++ (int)version {
+ return [super version] + 0 /* v1 */;
+}
+
+ (void)initialize {
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
+
+ NSAssert2([super version] == 1,
+ @"invalid superclass (%@) version %i !",
+ NSStringFromClass([self superclass]), [super version]);
/* Note: be aware of the charset issues before enabling this! */
showTextAttachmentsInline = [ud boolForKey:@"SOGoShowTextAttachmentsInline"];
static NSString *spoolFolder = nil;
++ (int)version {
+ return [super version] + 0 /* v1 */;
+}
+
+ (void)initialize {
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
+
+ NSAssert2([super version] == 1,
+ @"invalid superclass (%@) version %i !",
+ NSStringFromClass([self superclass]), [super version]);
spoolFolder = [[ud stringForKey:@"SOGoMailSpoolPath"] copy];
if ([spoolFolder length] < 3)
#include "common.h"
@implementation SOGoImageMailBodyPart
+
++ (int)version {
+ return [super version] + 0 /* v1 */;
+}
+
++ (void)initialize {
+ NSAssert2([super version] == 1,
+ @"invalid superclass (%@) version %i !",
+ NSStringFromClass([self superclass]), [super version]);
+}
+
@end /* SOGoImageMailBodyPart */
static NSString *otherUsersFolderName = @""; // TODO: add English default
static BOOL useAltNamespace = NO;
++ (int)version {
+ return [super version] + 0 /* v1 */;
+}
+
+ (void)initialize {
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
+
+ NSAssert2([super version] == 1,
+ @"invalid superclass (%@) version %i !",
+ NSStringFromClass([self superclass]), [super version]);
useAltNamespace = [ud boolForKey:@"SOGoSpecialFoldersInRoot"];
@interface SOGoMailBaseObject : SOGoObject
{
- NSURL *imap4URL;
+ NSURL *imap4URL;
+ NGImap4Connection *imap4;
}
- (id)initWithImap4URL:(NSURL *)_url inContainer:(id)_container;
@implementation SOGoMailBaseObject
++ (int)version {
+ return [super version] + 1 /* v1 */;
+}
++ (void)initialize {
+ NSAssert2([super version] == 0,
+ @"invalid superclass (%@) version %i !",
+ NSStringFromClass([self superclass]), [super version]);
+}
+
#if 0
static BOOL debugOn = YES;
#endif
return [NGImap4ConnectionManager defaultConnectionManager];
}
- (NGImap4Connection *)imap4Connection {
- return [[self mailManager] connectionForURL:[self imap4URL]
- password:[self imap4Password]];
+ if (self->imap4 == nil) {
+ self->imap4 = [[[self mailManager] connectionForURL:[self imap4URL]
+ password:[self imap4Password]] retain];
+ if (self->imap4 == nil) {
+ [self errorWithFormat:@"Could not connect IMAP4."];
+ self->imap4 = [[NSNull null] retain];
+ }
+ }
+ return [self->imap4 isNotNull] ? self->imap4 : nil;
}
- (NSString *)relativeImap4Name {
static BOOL debugOn = NO;
++ (int)version {
+ return [super version] + 0 /* v1 */;
+}
+
++ (void)initialize {
+ NSAssert2([super version] == 1,
+ @"invalid superclass (%@) version %i !",
+ NSStringFromClass([self superclass]), [super version]);
+}
+
- (void)dealloc {
[self->partInfo release];
[self->identifier release];
@implementation SOGoMailFolder
++ (int)version {
+ return [super version] + 0 /* v1 */;
+}
+
++ (void)initialize {
+ NSAssert2([super version] == 1,
+ @"invalid superclass (%@) version %i !",
+ NSStringFromClass([self superclass]), [super version]);
+}
+
- (void)dealloc {
[self->selectInfo release];
[self->filenames release];
static BOOL debugBodyStructure = NO;
static BOOL debugSoParts = NO;
++ (int)version {
+ return [super version] + 0 /* v1 */;
+}
+
+ (void)initialize {
+ NSAssert2([super version] == 1,
+ @"invalid superclass (%@) version %i !",
+ NSStringFromClass([self superclass]), [super version]);
+
/* Note: see SOGoMailManager.m for allowed IMAP4 keys */
/* Note: "BODY" actually returns the structure! */
coreInfoKeys = [[NSArray alloc] initWithObjects:
#include "common.h"
@implementation SOGoMessageMailBodyPart
+
++ (int)version {
+ return [super version] + 0 /* v1 */;
+}
+
++ (void)initialize {
+ NSAssert2([super version] == 1,
+ @"invalid superclass (%@) version %i !",
+ NSStringFromClass([self superclass]), [super version]);
+}
+
@end /* SOGoMessageMailBodyPart */
@implementation SOGoSharedInboxFolder
++ (int)version {
+ return [super version] + 0 /* v1 */;
+}
+
++ (void)initialize {
+ NSAssert2([super version] == 1,
+ @"invalid superclass (%@) version %i !",
+ NSStringFromClass([self superclass]), [super version]);
+}
+
/* listing available folders */
- (NSArray *)toManyRelationshipKeys {
static NSString *otherUsersFolderName = @""; // TODO: add English default
++ (int)version {
+ return [super version] + 0 /* v1 */;
+}
+
+ (void)initialize {
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
+
+ NSAssert2([super version] == 1,
+ @"invalid superclass (%@) version %i !",
+ NSStringFromClass([self superclass]), [super version]);
otherUsersFolderName = [ud stringForKey:@"SOGoOtherUsersFolderName"];
NSLog(@"Note: using other-users-folders name: '%@'", otherUsersFolderName);
#include "common.h"
@implementation SOGoVCardMailBodyPart
+
++ (int)version {
+ return [super version] + 0 /* v1 */;
+}
+
++ (void)initialize {
+ NSAssert2([super version] == 1,
+ @"invalid superclass (%@) version %i !",
+ NSStringFromClass([self superclass]), [super version]);
+}
+
@end /* SOGoVCardMailBodyPart */
# Version file
-SUBMINOR_VERSION:=108
+SUBMINOR_VERSION:=109
# v0.9.96 requires libNGMime v4.5.223
# v0.9.91 requires libNGMime v4.5.222