mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-05 20:10:33 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user