-registerURLs:withIDs: new method to register multiple urls at once

This commit is contained in:
Wolfgang Sourdeau
2012-10-12 17:44:26 -04:00
parent 5e2453f3c4
commit 641eb8013b
2 changed files with 21 additions and 0 deletions

View File

@@ -333,6 +333,25 @@ MAPIStoreMappingTDBTraverse (TDB_CONTEXT *ctx, TDB_DATA data1, TDB_DATA data2,
return rc;
}
- (void) registerURLs: (NSArray *) urlStrings
withIDs: (struct UI8Array_r *) idNbrs
{
uint64_t count, max;
max = [urlStrings count];
if (max == idNbrs->cValues)
{
tdb_transaction_start (indexing->tdb);
for (count = 0; count < max; count++)
[self registerURL: [urlStrings objectAtIndex: count]
withID: idNbrs->lpui8[count]];
tdb_transaction_commit (indexing->tdb);
}
else
[NSException raise: NSInvalidArgumentException
format: @"number of urls and ids do not match"];
}
- (void) unregisterURLWithID: (uint64_t) idNbr
{
NSString *urlString;