mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-03 20:38:50 +00:00
registerURLs:withIDs: now takes an array of NSNumber or NSString instances
This commit is contained in:
@@ -54,7 +54,7 @@
|
||||
- (BOOL) registerURL: (NSString *) urlString
|
||||
withID: (uint64_t) idNbr;
|
||||
- (void) registerURLs: (NSArray *) urlString
|
||||
withIDs: (struct UI8Array_r *) idNbrs;
|
||||
withIDs: (NSArray *) idNbrs;
|
||||
- (void) unregisterURLWithID: (uint64_t) idNbr;
|
||||
- (void) updateID: (uint64_t) idNbr
|
||||
withURL: (NSString *) urlString;
|
||||
|
||||
@@ -334,17 +334,21 @@ MAPIStoreMappingTDBTraverse (TDB_CONTEXT *ctx, TDB_DATA data1, TDB_DATA data2,
|
||||
}
|
||||
|
||||
- (void) registerURLs: (NSArray *) urlStrings
|
||||
withIDs: (struct UI8Array_r *) idNbrs
|
||||
withIDs: (NSArray *) idNbrs
|
||||
{
|
||||
uint64_t count, max;
|
||||
uint64_t count, max, newID;
|
||||
|
||||
max = [urlStrings count];
|
||||
if (max == idNbrs->cValues)
|
||||
if (max == [idNbrs count])
|
||||
{
|
||||
tdb_transaction_start (indexing->tdb);
|
||||
for (count = 0; count < max; count++)
|
||||
[self registerURL: [urlStrings objectAtIndex: count]
|
||||
withID: idNbrs->lpui8[count]];
|
||||
{
|
||||
newID = [[idNbrs objectAtIndex: count]
|
||||
unsignedLongLongValue];
|
||||
[self registerURL: [urlStrings objectAtIndex: count]
|
||||
withID: newID];
|
||||
}
|
||||
tdb_transaction_commit (indexing->tdb);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user