feat(imap): add support for UID MOVE operation
parent
0eb64db6e1
commit
4c814c9b9f
|
@ -164,11 +164,12 @@ typedef enum {
|
|||
|
||||
- (NSDictionary *)copyUid:(unsigned)_uid toFolder:(NSString *)_folder;
|
||||
- (NSDictionary *)copyUids:(NSArray *)_uids toFolder:(NSString *)_folder;
|
||||
- (NSDictionary *)copyFrom:(unsigned)_from to:(unsigned)_to
|
||||
toFolder:(NSString *)_folder;
|
||||
- (NSDictionary *)copyFrom:(unsigned)_from to:(unsigned)_to
|
||||
toFolder:(NSString *)_folder;
|
||||
- (NSDictionary *)moveUids:(NSArray *)_uids toFolder:(NSString *)_folder;
|
||||
|
||||
- (NSDictionary *)append:(NSData *)_message toFolder:(NSString *)_folder
|
||||
withFlags:(NSArray *)_flags;
|
||||
- (NSDictionary *)append:(NSData *)_message toFolder:(NSString *)_folder
|
||||
withFlags:(NSArray *)_flags;
|
||||
- (NSDictionary *)threadBySubject:(BOOL)_bySubject
|
||||
charset:(NSString *)_charSet
|
||||
qualifier:(EOQualifier *)_qual;
|
||||
|
|
|
@ -1305,6 +1305,25 @@ static NSMutableDictionary *namespaces;
|
|||
return [self->normer normalizeResponse:[self processCommand:cmd]];
|
||||
}
|
||||
|
||||
- (NSDictionary *) moveUids: (NSArray *)_uids
|
||||
toFolder: (NSString *)_folder
|
||||
{
|
||||
NSArray *capa;
|
||||
NSString *cmd;
|
||||
|
||||
if ((_folder = [self _folder2ImapFolder:_folder]) == nil)
|
||||
return nil;
|
||||
|
||||
capa = [[self capability] objectForKey: @"capability"];
|
||||
if (![capa containsObject: @"move"])
|
||||
return nil;
|
||||
|
||||
cmd = [NSString stringWithFormat:@"uid move %@ \"%@\"",
|
||||
[_uids componentsJoinedByString:@","], SaneFolderName(_folder)];
|
||||
|
||||
return [self->normer normalizeResponse:[self processCommand:cmd]];
|
||||
}
|
||||
|
||||
- (NSDictionary *)getQuotaRoot:(NSString *)_folder {
|
||||
NSString *cmd;
|
||||
|
||||
|
|
Loading…
Reference in New Issue