Monotone-Parent: b485f305175502819e660d9557bad5fa6d20222f

Monotone-Revision: a5370a41693bc2294eb25921c8e19dda7570a063

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-07-11T05:05:03
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2007-07-11 05:05:03 +00:00
parent 18026b4f47
commit 956c4f2109
12 changed files with 87 additions and 18 deletions
+27
View File
@@ -29,10 +29,12 @@
#import <NGObjWeb/WOResponse.h>
#import <NGObjWeb/WORequest.h>
#import <NGImap4/NGImap4Connection.h>
#import <NGImap4/NGImap4Client.h>
#import <SoObjects/Mailer/SOGoMailFolder.h>
#import <SoObjects/Mailer/SOGoTrashFolder.h>
#import <SoObjects/Mailer/SOGoMailAccount.h>
#import <SoObjects/SOGo/NSObject+Utilities.h>
#import "UIxMailFolderActions.h"
@@ -249,4 +251,29 @@
return [self _subscriptionStubAction];
}
- (WOResponse *) quotasAction
{
SOGoMailFolder *folder;
NSURL *folderURL;
id infos;
WOResponse *response;
NGImap4Client *client;
NSString *responseString;
response = [context response];
[response setStatus: 200];
[response setHeader: @"text/plain; charset=UTF-8"
forKey: @"content-type"];
folder = [self clientObject];
folderURL = [folder imap4URL];
client = [[folder imap4Connection] client];
infos = [client getQuotaRoot: [folder nameInContainer]];
responseString = [[infos objectForKey: @"quotas"] jsonRepresentation];
[response appendContentString: responseString];
return response;
}
@end