getNewFMIDs: new wrapper method around openchangedb_get_new_folderIDs
parent
641eb8013b
commit
ea98a35fad
|
@ -103,6 +103,7 @@
|
|||
|
||||
- (uint64_t) idForObjectWithKey: (NSString *) key
|
||||
inFolderURL: (NSString *) folderURL;
|
||||
- (NSArray *) getNewFMIDs: (uint64_t) max;
|
||||
- (uint64_t) getNewChangeNumber;
|
||||
- (NSArray *) getNewChangeNumbers: (uint64_t) max;
|
||||
|
||||
|
|
|
@ -586,6 +586,33 @@ static inline NSURL *CompleteURLFromMapistoreURI (const char *uri)
|
|||
return newChangeNumbers;
|
||||
}
|
||||
|
||||
- (NSArray *) getNewFMIDs: (uint64_t) max
|
||||
{
|
||||
TALLOC_CTX *memCtx;
|
||||
NSMutableArray *newFMIDs;
|
||||
uint64_t count;
|
||||
struct UI8Array_r *numbers;
|
||||
NSString *newNumber;
|
||||
|
||||
memCtx = talloc_zero(NULL, TALLOC_CTX);
|
||||
newFMIDs = [NSMutableArray arrayWithCapacity: max];
|
||||
|
||||
if (openchangedb_get_new_folderIDs (connInfo->oc_ctx,
|
||||
memCtx, max, &numbers)
|
||||
!= MAPI_E_SUCCESS || numbers->cValues != max)
|
||||
abort ();
|
||||
for (count = 0; count < max; count++)
|
||||
{
|
||||
newNumber
|
||||
= [NSString stringWithUnsignedLongLong: numbers->lpui8[count]];
|
||||
[newFMIDs addObject: newNumber];
|
||||
}
|
||||
|
||||
talloc_free (memCtx);
|
||||
|
||||
return newFMIDs;
|
||||
}
|
||||
|
||||
/* subclasses */
|
||||
|
||||
+ (NSString *) MAPIModuleName
|
||||
|
|
Loading…
Reference in New Issue