+2005-07-07 Helge Hess <helge.hess@opengroupware.org>
+
+ * NGImap4: added method to store flags for MSN sequences (v4.5.222)
+
2005-07-05 Helge Hess <helge.hess@opengroupware.org>
* NGImap4ResponseNormalizer.[hm], NGImap4Client.[hm],
+2005-07-07 Helge Hess <helge.hess@opengroupware.org>
+
+ * NGImap4Client.m: added -storeFlags:forMSNs:addOrRemove: method to
+ change flags for a set of MSNs (instead of ranges)
+
2005-04-24 Helge Hess <helge.hess@opengroupware.org>
* fixed gcc 4.0 warnings
flags:(NSArray *)_flags;
- (NSDictionary *)storeFrom:(unsigned)_from to:(unsigned)_to
add:(NSNumber *)_add flags:(NSArray *)_flags;
+- (NSDictionary *)storeFlags:(NSArray *)_flags forMSNs:(id)_msns
+ addOrRemove:(BOOL)_flag;
- (NSDictionary *)copyUid:(unsigned)_uid toFolder:(NSString *)_folder;
- (NSDictionary *)copyUids:(NSArray *)_uids toFolder:(NSString *)_folder;
return [self->normer normalizeResponse:[self processCommand:cmd]];
}
+- (NSDictionary *)storeFlags:(NSArray *)_flags forMSNs:(id)_msns
+ addOrRemove:(BOOL)_flag
+{
+ NSString *cmd;
+ NSString *flagstr;
+ NSString *seqstr;
+
+ if ([_msns isKindOfClass:[NSArray class]]) {
+ // TODO: improve by using ranges, eg 1:5 instead of 1,2,3,4,5
+ _msns = [_msns valueForKey:@"stringValue"];
+ seqstr = [_msns componentsJoinedByString:@","];
+ }
+ else
+ seqstr = [_msns stringValue];
+
+ flagstr = [_flags2ImapFlags(self, _flags) componentsJoinedByString:@" "];
+ cmd = [NSString stringWithFormat:@"store %@ %cFLAGS (%@)",
+ seqstr, _flag ? '+' : '-', flagstr];
+
+ return [self->normer normalizeResponse:[self processCommand:cmd]];
+}
+
- (NSDictionary *)copyFrom:(unsigned)_from to:(unsigned)_to
toFolder:(NSString *)_folder
{