mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-04 12:58:50 +00:00
getNewFMIDs: new wrapper method around openchangedb_get_new_folderIDs
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user