Monotone-Parent: c3b32ea543ff55ff243677d396e4119c69bc0fbc

Monotone-Revision: 137c790e1a56597f25936f21d69eb6a067d1dc8d

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2011-04-19T22:26:47
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau 2011-04-19 22:26:47 +00:00
parent d21ff302a6
commit 6e2cb1fc3f
5 changed files with 8 additions and 21 deletions

View file

@ -1,5 +1,10 @@
2011-04-19 Wolfgang Sourdeau <wsourdeau@inverse.ca> 2011-04-19 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* OpenChange/MAPIStoreMessage.m (-attachmentTable): as all the
subclasses were using the same MAPIStoreAttachmentTable
implementation, this method now performs the same operation and
thereby no longer requires subclasssing.
* OpenChange/MAPIStoreObject.m (-getProperty:withTag:): compute * OpenChange/MAPIStoreObject.m (-getProperty:withTag:): compute
the method selector and pass it as argument to the IMP of the the method selector and pass it as argument to the IMP of the
property getter, as would be with any regular method invocation. property getter, as would be with any regular method invocation.

View file

@ -40,7 +40,6 @@
#import <SOGo/SOGoUserDefaults.h> #import <SOGo/SOGoUserDefaults.h>
#import <Appointments/SOGoAppointmentObject.h> #import <Appointments/SOGoAppointmentObject.h>
#import "MAPIStoreAttachmentTable.h"
#import "MAPIStoreCalendarAttachment.h" #import "MAPIStoreCalendarAttachment.h"
#import "MAPIStoreContext.h" #import "MAPIStoreContext.h"
#import "MAPIStoreRecurrenceUtils.h" #import "MAPIStoreRecurrenceUtils.h"
@ -566,11 +565,6 @@ _fillAppointmentRecurrencePattern (struct AppointmentRecurrencePattern *arp,
return [attachmentParts objectForKey: childKey]; return [attachmentParts objectForKey: childKey];
} }
- (MAPIStoreAttachmentTable *) attachmentTable
{
return [MAPIStoreAttachmentTable tableForContainer: self];
}
- (MAPIStoreAttachment *) createAttachment - (MAPIStoreAttachment *) createAttachment
{ {
MAPIStoreCalendarAttachment *newAttachment; MAPIStoreCalendarAttachment *newAttachment;

View file

@ -29,7 +29,6 @@
#import <Mailer/SOGoDraftObject.h> #import <Mailer/SOGoDraftObject.h>
#import <NGObjWeb/WOContext+SoObjects.h> #import <NGObjWeb/WOContext+SoObjects.h>
#import "MAPIStoreAttachmentTable.h"
#import "MAPIStoreContext.h" #import "MAPIStoreContext.h"
#import "MAPIStoreDraftsAttachment.h" #import "MAPIStoreDraftsAttachment.h"
#import "MAPIStoreTypes.h" #import "MAPIStoreTypes.h"
@ -165,11 +164,6 @@ e)
[self _saveAttachment: [attachmentKeys objectAtIndex: count]]; [self _saveAttachment: [attachmentKeys objectAtIndex: count]];
} }
- (MAPIStoreAttachmentTable *) attachmentTable
{
return [MAPIStoreAttachmentTable tableForContainer: self];
}
- (MAPIStoreAttachment *) createAttachment - (MAPIStoreAttachment *) createAttachment
{ {
MAPIStoreDraftsAttachment *newAttachment; MAPIStoreDraftsAttachment *newAttachment;

View file

@ -86,11 +86,6 @@ static Class NSExceptionK, MAPIStoreSentItemsFolderK, MAPIStoreDraftsFolderK;
MAPIStoreDraftsFolderK = [MAPIStoreDraftsFolder class]; MAPIStoreDraftsFolderK = [MAPIStoreDraftsFolder class];
} }
- (MAPIStoreAttachmentTable *) attachmentTable
{
return [MAPIStoreAttachmentTable tableForContainer: self];
}
- (int) getPrIconIndex: (void **) data - (int) getPrIconIndex: (void **) data
{ {
uint32_t longValue; uint32_t longValue;

View file

@ -26,6 +26,7 @@
#import <NGExtensions/NSObject+Logs.h> #import <NGExtensions/NSObject+Logs.h>
#import <SOGo/SOGoObject.h> #import <SOGo/SOGoObject.h>
#import "MAPIStoreAttachmentTable.h"
#import "MAPIStoreContext.h" #import "MAPIStoreContext.h"
#import "MAPIStoreTypes.h" #import "MAPIStoreTypes.h"
#import "NSData+MAPIStore.h" #import "NSData+MAPIStore.h"
@ -301,7 +302,7 @@
stringValue = [NSString stringWithFormat: @"SOGo%@%@%@", stringValue = [NSString stringWithFormat: @"SOGo%@%@%@",
stringValue, stringValue, stringValue]; stringValue, stringValue, stringValue];
*data = [[stringValue dataUsingEncoding: NSASCIIStringEncoding] *data = [[stringValue dataUsingEncoding: NSASCIIStringEncoding]
asShortBinaryInMemCtx: memCtx]; asBinaryInMemCtx: memCtx];
} }
else else
rc = MAPISTORE_ERR_NOT_FOUND; rc = MAPISTORE_ERR_NOT_FOUND;
@ -416,9 +417,7 @@
- (MAPIStoreAttachmentTable *) attachmentTable - (MAPIStoreAttachmentTable *) attachmentTable
{ {
[self subclassResponsibility: _cmd]; return [MAPIStoreAttachmentTable tableForContainer: self];
return nil;
} }
- (void) addActiveTable: (MAPIStoreTable *) activeTable - (void) addActiveTable: (MAPIStoreTable *) activeTable