2 Copyright (C) 2004-2005 SKYRIX Software AG
4 This file is part of OpenGroupware.org.
6 OGo is free software; you can redistribute it and/or modify it under
7 the terms of the GNU Lesser General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
11 OGo is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14 License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with OGo; see the file COPYING. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
22 #ifndef __Mailer_SOGoMailManager_H__
23 #define __Mailer_SOGoMailManager_H__
25 #import <Foundation/NSObject.h>
26 #import <Foundation/NSRange.h>
31 Coordinates access to IMAP4 mailboxes, caches folder hierarchies, etc.
34 @class NSString, NSData, NSURL, NSArray, NSMutableDictionary, NSTimer;
38 @interface SOGoMailManager : NSObject
40 NSMutableDictionary *urlToEntry;
44 + (id)defaultMailManager;
48 - (NGImap4Client *)imap4ClientForURL:(NSURL *)_url password:(NSString *)_pwd;
49 - (void)flushCachesForURL:(NSURL *)_url;
51 /* folder hierarchy */
53 - (NSArray *)subfoldersForURL:(NSURL *)_url password:(NSString *)_pwd;
54 - (NSArray *)allFoldersForURL:(NSURL *)_url password:(NSString *)_pwd;
58 - (NSArray *)fetchUIDsInURL:(NSURL *)_url qualifier:(id)_q
59 sortOrdering:(id)_so password:(NSString *)_pwd;
60 - (NSArray *)fetchUIDs:(NSArray *)_uids inURL:(NSURL *)_url
61 parts:(NSArray *)_parts password:(NSString *)_pwd;
63 - (NSException *)expungeAtURL:(NSURL *)_url password:(NSString *)_pwd;
65 /* individual message */
67 - (id)fetchURL:(NSURL *)_url parts:(NSArray *)_parts password:(NSString *)_pwd;
69 - (NSData *)fetchContentOfBodyPart:(NSString *)_partId
70 atURL:(NSURL *)_url password:(NSString *)_pwd;
72 - (NSException *)addFlags:(id)_f toURL:(NSURL *)_u password:(NSString *)_p;
73 - (NSException *)removeFlags:(id)_f toURL:(NSURL *)_u password:(NSString *)_p;
74 - (NSException *)markURLDeleted:(NSURL *)_u password:(NSString *)_p;
76 - (NSException *)postData:(NSData *)_data flags:(id)_flags
77 toFolderURL:(NSURL *)_url password:(NSString *)_p;
79 - (NSException *)copyMailURL:(NSURL *)_srcurl toFolderURL:(NSURL *)_desturl
80 password:(NSString *)_pwd;
82 /* managing folders */
84 - (BOOL)doesMailboxExistAtURL:(NSURL *)_url password:(NSString *)_pwd;
85 - (id)infoForMailboxAtURL:(NSURL *)_url password:(NSString *)_pwd;
87 - (NSException *)createMailbox:(NSString *)_mailbox atURL:(NSURL *)_url
88 password:(NSString *)_pwd;
89 - (NSException *)deleteMailboxAtURL:(NSURL *)_url password:(NSString *)_pwd;
91 - (NSException *)moveMailboxAtURL:(NSURL *)_srcurl toURL:(NSURL *)_desturl
92 password:(NSString *)_pwd;
94 - (id)aclForMailboxAtURL:(NSURL *)_url password:(NSString *)_pwd;
95 - (NSString *)myRightsForMailboxAtURL:(NSURL *)_url password:(NSString *)_pwd;
97 - (NSException *)addFlags:(id)_f toAllMessagesInURL:(NSURL *)_u
98 password:(NSString *)_p;
102 #endif /* __Mailer_SOGoMailManager_H__ */