oc-folder: Flags are now used in indexing db when deleting a msg
Unregistering the URL in indexing db accordingly to the flags (SOFT or HARD)pull/69/head
parent
d076e04ad4
commit
be60fdebcc
|
@ -568,6 +568,8 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||||
struct mapistore_object_notification_parameters *notif_parameters;
|
struct mapistore_object_notification_parameters *notif_parameters;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
/* flags that control the behaviour of the operation
|
||||||
|
(MAPISTORE_SOFT_DELETE or MAPISTORE_PERMANENT_DELETE) */
|
||||||
[self logWithFormat: @"-deleteMessageWithMID: mid: 0x%.16llx flags: %d", mid, flags];
|
[self logWithFormat: @"-deleteMessageWithMID: mid: 0x%.16llx flags: %d", mid, flags];
|
||||||
|
|
||||||
mapping = [self mapping];
|
mapping = [self mapping];
|
||||||
|
@ -646,7 +648,8 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
|
||||||
notifyChangesForChild: message];
|
notifyChangesForChild: message];
|
||||||
}
|
}
|
||||||
[self logWithFormat: @"successfully deleted object at URL: %@", childURL];
|
[self logWithFormat: @"successfully deleted object at URL: %@", childURL];
|
||||||
[mapping unregisterURLWithID: mid];
|
/* Ensure we are respecting flags parameter */
|
||||||
|
[mapping unregisterURLWithID: mid andFlags: flags];
|
||||||
[self cleanupCaches];
|
[self cleanupCaches];
|
||||||
rc = MAPISTORE_SUCCESS;
|
rc = MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,6 +54,8 @@
|
||||||
- (void) registerURLs: (NSArray *) urlString
|
- (void) registerURLs: (NSArray *) urlString
|
||||||
withIDs: (NSArray *) idNbrs;
|
withIDs: (NSArray *) idNbrs;
|
||||||
- (void) unregisterURLWithID: (uint64_t) idNbr;
|
- (void) unregisterURLWithID: (uint64_t) idNbr;
|
||||||
|
- (void) unregisterURLWithID: (uint64_t) idNbr
|
||||||
|
andFlags: (uint8_t) flags;
|
||||||
- (void) updateID: (uint64_t) idNbr
|
- (void) updateID: (uint64_t) idNbr
|
||||||
withURL: (NSString *) urlString;
|
withURL: (NSString *) urlString;
|
||||||
|
|
||||||
|
|
|
@ -278,4 +278,13 @@ MAPIStoreMappingKeyFromId (uint64_t idNbr)
|
||||||
idNbr, MAPISTORE_PERMANENT_DELETE);
|
idNbr, MAPISTORE_PERMANENT_DELETE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void) unregisterURLWithID: (uint64_t) idNbr
|
||||||
|
andFlags: (uint8_t) flags
|
||||||
|
{
|
||||||
|
indexing->del_fmid(indexing, [username UTF8String],
|
||||||
|
idNbr,
|
||||||
|
(flags == MAPISTORE_SOFT_DELETE) ? MAPISTORE_SOFT_DELETE : MAPISTORE_PERMANENT_DELETE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
Loading…
Reference in New Issue