diff --git a/ChangeLog b/ChangeLog index c4363bd4f..2e9b3f8f1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2011-04-19 Wolfgang Sourdeau + * 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 the method selector and pass it as argument to the IMP of the property getter, as would be with any regular method invocation. diff --git a/OpenChange/MAPIStoreCalendarMessage.m b/OpenChange/MAPIStoreCalendarMessage.m index 6a3e8fadd..11ffcfd25 100644 --- a/OpenChange/MAPIStoreCalendarMessage.m +++ b/OpenChange/MAPIStoreCalendarMessage.m @@ -40,7 +40,6 @@ #import #import -#import "MAPIStoreAttachmentTable.h" #import "MAPIStoreCalendarAttachment.h" #import "MAPIStoreContext.h" #import "MAPIStoreRecurrenceUtils.h" @@ -566,11 +565,6 @@ _fillAppointmentRecurrencePattern (struct AppointmentRecurrencePattern *arp, return [attachmentParts objectForKey: childKey]; } -- (MAPIStoreAttachmentTable *) attachmentTable -{ - return [MAPIStoreAttachmentTable tableForContainer: self]; -} - - (MAPIStoreAttachment *) createAttachment { MAPIStoreCalendarAttachment *newAttachment; diff --git a/OpenChange/MAPIStoreDraftsMessage.m b/OpenChange/MAPIStoreDraftsMessage.m index 4135df6c0..82b51fcc2 100644 --- a/OpenChange/MAPIStoreDraftsMessage.m +++ b/OpenChange/MAPIStoreDraftsMessage.m @@ -29,7 +29,6 @@ #import #import -#import "MAPIStoreAttachmentTable.h" #import "MAPIStoreContext.h" #import "MAPIStoreDraftsAttachment.h" #import "MAPIStoreTypes.h" @@ -165,11 +164,6 @@ e) [self _saveAttachment: [attachmentKeys objectAtIndex: count]]; } -- (MAPIStoreAttachmentTable *) attachmentTable -{ - return [MAPIStoreAttachmentTable tableForContainer: self]; -} - - (MAPIStoreAttachment *) createAttachment { MAPIStoreDraftsAttachment *newAttachment; diff --git a/OpenChange/MAPIStoreMailMessage.m b/OpenChange/MAPIStoreMailMessage.m index 2c02b7dce..8a731cc03 100644 --- a/OpenChange/MAPIStoreMailMessage.m +++ b/OpenChange/MAPIStoreMailMessage.m @@ -86,11 +86,6 @@ static Class NSExceptionK, MAPIStoreSentItemsFolderK, MAPIStoreDraftsFolderK; MAPIStoreDraftsFolderK = [MAPIStoreDraftsFolder class]; } -- (MAPIStoreAttachmentTable *) attachmentTable -{ - return [MAPIStoreAttachmentTable tableForContainer: self]; -} - - (int) getPrIconIndex: (void **) data { uint32_t longValue; diff --git a/OpenChange/MAPIStoreMessage.m b/OpenChange/MAPIStoreMessage.m index dbee2c973..1e524f512 100644 --- a/OpenChange/MAPIStoreMessage.m +++ b/OpenChange/MAPIStoreMessage.m @@ -26,6 +26,7 @@ #import #import +#import "MAPIStoreAttachmentTable.h" #import "MAPIStoreContext.h" #import "MAPIStoreTypes.h" #import "NSData+MAPIStore.h" @@ -301,7 +302,7 @@ stringValue = [NSString stringWithFormat: @"SOGo%@%@%@", stringValue, stringValue, stringValue]; *data = [[stringValue dataUsingEncoding: NSASCIIStringEncoding] - asShortBinaryInMemCtx: memCtx]; + asBinaryInMemCtx: memCtx]; } else rc = MAPISTORE_ERR_NOT_FOUND; @@ -416,9 +417,7 @@ - (MAPIStoreAttachmentTable *) attachmentTable { - [self subclassResponsibility: _cmd]; - - return nil; + return [MAPIStoreAttachmentTable tableForContainer: self]; } - (void) addActiveTable: (MAPIStoreTable *) activeTable