diff --git a/ChangeLog b/ChangeLog index 6ee548b46..ebd46c74e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2010-10-14 Wolfgang Sourdeau + + * OpenChange/MAPIStoreContext.m (-openMessage:withMID:inFID:): + implemented method by resolving the url corresponding to the MID + and transferring the call to the new subclassable + "openMessage:atURL:" method. + (-openMessage:atURL:): new subclassable method. + (-createMessageWithMID:inFID:) + (-saveChangesInMessageWithMID:andFlags:): + (-submitMessageWithMID:andFlags:): + (-getProperties:inRow:withMID:type:): + (-getFID:byName:inParentFID:) + (-setPropertiesWithMID:type:inRow:) + (-deleteMessageWithMID:withFlags:): return MAPISTORE_ERROR for + those unimplemented methods. + 2010-10-14 Francis Lachapelle * UI/WebServerResources/UIxAttendeesEditor.js diff --git a/OpenChange/MAPIStoreContext.m b/OpenChange/MAPIStoreContext.m index dce81b95a..fb12692d3 100644 --- a/OpenChange/MAPIStoreContext.m +++ b/OpenChange/MAPIStoreContext.m @@ -898,10 +898,27 @@ static MAPIStoreMapping *mapping = nil; - (int) openMessage: (struct mapistore_message *) msg withMID: (uint64_t) mid inFID: (uint64_t) fid +{ + NSString *childURL; + int rc; + + childURL = [mapping urlFromID: mid]; + if (childURL) + { + rc = [self openMessage: msg atURL: childURL]; + } + else + rc = MAPISTORE_ERR_NOT_FOUND; + + return rc; +} + +- (int) openMessage: (struct mapistore_message *) msg + atURL: (NSString *) childURL { [self logWithFormat: @"METHOD '%s' (%d)", __FUNCTION__, __LINE__]; - return MAPI_E_SUCCESS; + return MAPISTORE_ERROR; } - (int) createMessageWithMID: (uint64_t) mid @@ -909,7 +926,7 @@ static MAPIStoreMapping *mapping = nil; { [self logWithFormat: @"METHOD '%s' (%d)", __FUNCTION__, __LINE__]; - return MAPI_E_SUCCESS; + return MAPISTORE_ERROR; } - (int) saveChangesInMessageWithMID: (uint64_t) mid @@ -917,7 +934,7 @@ static MAPIStoreMapping *mapping = nil; { [self logWithFormat: @"METHOD '%s' (%d)", __FUNCTION__, __LINE__]; - return MAPI_E_SUCCESS; + return MAPISTORE_ERROR; } - (int) submitMessageWithMID: (uint64_t) mid @@ -925,7 +942,7 @@ static MAPIStoreMapping *mapping = nil; { [self logWithFormat: @"METHOD '%s' (%d)", __FUNCTION__, __LINE__]; - return MAPI_E_SUCCESS; + return MAPISTORE_ERROR; } - (int) getProperties: (struct SPropTagArray *) SPropTagArray @@ -944,7 +961,7 @@ static MAPIStoreMapping *mapping = nil; break; } - return MAPI_E_SUCCESS; + return MAPISTORE_ERROR; } - (int) getPath: (char **) path @@ -973,7 +990,7 @@ static MAPIStoreMapping *mapping = nil; [self logWithFormat: @"METHOD '%s' (%d) -- foldername: %s, parent_fid: %lld", __FUNCTION__, __LINE__, foldername, parent_fid]; - return MAPISTORE_ERR_INVALID_PARAMETER; + return MAPISTORE_ERROR; } - (int) setPropertiesWithMID: (uint64_t) fmid @@ -990,7 +1007,7 @@ static MAPIStoreMapping *mapping = nil; break; } - return MAPI_E_SUCCESS; + return MAPISTORE_ERROR; } - (int) deleteMessageWithMID: (uint64_t) mid @@ -998,7 +1015,7 @@ static MAPIStoreMapping *mapping = nil; { [self logWithFormat: @"METHOD '%s' (%d)", __FUNCTION__, __LINE__]; - return MAPI_E_SUCCESS; + return MAPISTORE_ERROR; } - (int) getFoldersList: (struct indexing_folders_list **) folders_list