2006-06-15 21:34:10 +02:00
|
|
|
/*
|
2014-05-15 20:44:53 +02:00
|
|
|
Copyright (C) 2009-2014 Inverse inc.
|
2006-06-15 21:34:10 +02:00
|
|
|
Copyright (C) 2004-2005 SKYRIX Software AG
|
|
|
|
|
2011-09-14 22:05:09 +02:00
|
|
|
This file is part of SOGo
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2011-09-14 22:05:09 +02:00
|
|
|
SOGo is free software; you can redistribute it and/or modify it under
|
2006-06-15 21:34:10 +02:00
|
|
|
the terms of the GNU Lesser General Public License as published by the
|
|
|
|
Free Software Foundation; either version 2, or (at your option) any
|
|
|
|
later version.
|
|
|
|
|
2011-09-14 22:05:09 +02:00
|
|
|
SOGo is distributed in the hope that it will be useful, but WITHOUT ANY
|
2006-06-15 21:34:10 +02:00
|
|
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
|
|
|
License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
|
|
License along with OGo; see the file COPYING. If not, write to the
|
|
|
|
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
|
|
|
02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __Mailer_SOGoMailFolder_H__
|
|
|
|
#define __Mailer_SOGoMailFolder_H__
|
|
|
|
|
2010-09-15 22:02:37 +02:00
|
|
|
#include <Mailer/SOGoMailBaseObject.h>
|
2006-06-15 21:34:10 +02:00
|
|
|
#import <Foundation/NSRange.h>
|
2008-09-30 15:42:48 +02:00
|
|
|
#import <NGObjWeb/WOResponse.h>
|
2006-06-15 21:34:10 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
SOGoMailFolder
|
|
|
|
Parent object: the SOGoMailAccount
|
|
|
|
Child objects: SOGoMailObject or SOGoMailFolder
|
|
|
|
|
|
|
|
The SOGoMailFolder maps to an IMAP4 folder from NGImap4.
|
|
|
|
*/
|
|
|
|
|
2011-08-13 00:58:35 +02:00
|
|
|
@class NSData, NSArray, NSException, NSMutableArray, NSMutableDictionary;
|
2006-06-15 21:34:10 +02:00
|
|
|
@class NGImap4MailboxInfo;
|
2008-10-23 17:55:56 +02:00
|
|
|
@class WOResponse;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
|
|
|
@interface SOGoMailFolder : SOGoMailBaseObject
|
|
|
|
{
|
2007-07-30 17:55:28 +02:00
|
|
|
NSMutableArray *filenames;
|
|
|
|
NSString *folderType;
|
2007-08-17 04:27:35 +02:00
|
|
|
NSDictionary *mailboxACL;
|
2011-08-13 00:58:35 +02:00
|
|
|
NSMutableDictionary *prefetchedInfos;
|
2006-06-15 21:34:10 +02:00
|
|
|
}
|
|
|
|
|
2007-10-22 18:07:12 +02:00
|
|
|
- (NSString *) absoluteImap4Name;
|
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
/* messages */
|
2011-08-13 00:58:35 +02:00
|
|
|
- (void) prefetchCoreInfosForMessageKeys: (NSArray *) keys;
|
|
|
|
|
2010-10-01 23:19:03 +02:00
|
|
|
- (NSArray *) toOneRelationshipKeys;
|
|
|
|
- (NSArray *) toManyRelationshipKeys;
|
|
|
|
|
2011-07-29 04:11:52 +02:00
|
|
|
- (NSDictionary *) statusForFlags: (NSArray *) flags;
|
2015-07-31 20:31:38 +02:00
|
|
|
- (unsigned int) unseenCount;
|
2011-07-29 04:11:52 +02:00
|
|
|
|
2010-09-20 16:36:02 +02:00
|
|
|
- (NSException *) deleteUIDs: (NSArray *) uids
|
2011-07-13 20:55:44 +02:00
|
|
|
useTrashFolder: (BOOL *) withTrash
|
2010-09-20 16:36:02 +02:00
|
|
|
inContext: (id) context;
|
2010-04-15 20:27:08 +02:00
|
|
|
- (WOResponse *) archiveUIDs: (NSArray *) uids
|
|
|
|
inArchiveNamed: (NSString *) archiveName
|
|
|
|
inContext: (id) context;
|
|
|
|
- (WOResponse *) archiveAllMessagesInContext: (id) localContext;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2011-06-01 23:10:25 +02:00
|
|
|
- (NSArray *) fetchUIDsMatchingQualifier: (id) _q sortOrdering: (id) _so;
|
|
|
|
- (NSArray *) fetchUIDsMatchingQualifier: (id) _q sortOrdering: (id) _so threaded: (BOOL) _threaded;
|
2007-10-22 18:07:12 +02:00
|
|
|
- (NSArray *) fetchUIDs: (NSArray *) _uids parts: (NSArray *) _parts;
|
2011-07-29 04:11:52 +02:00
|
|
|
- (NSArray *) fetchUIDsOfVanishedItems: (uint64_t) modseq;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2008-10-23 17:55:56 +02:00
|
|
|
- (WOResponse *) copyUIDs: (NSArray *) uids
|
|
|
|
toFolder: (NSString *) destinationFolder
|
|
|
|
inContext: (id) localContext;
|
|
|
|
- (WOResponse *) moveUIDs: (NSArray *) uids
|
|
|
|
toFolder: (NSString *) destinationFolder
|
|
|
|
inContext: (id) localContext;
|
|
|
|
|
2007-10-22 18:07:12 +02:00
|
|
|
- (NSException *) postData: (NSData *) _data flags: (id) _flags;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2007-10-26 16:26:01 +02:00
|
|
|
- (void) markForExpunge;
|
|
|
|
- (void) expungeLastMarkedFolder;
|
|
|
|
|
2012-02-03 15:55:19 +01:00
|
|
|
- (BOOL) exists;
|
|
|
|
|
2010-09-28 17:05:56 +02:00
|
|
|
- (BOOL) create;
|
|
|
|
|
2012-09-25 16:29:24 +02:00
|
|
|
- (BOOL) ensureTrashFolder;
|
|
|
|
|
2007-10-22 18:07:12 +02:00
|
|
|
- (NSException *) expunge;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2012-01-30 21:47:07 +01:00
|
|
|
- (NSException *) renameTo: (NSString *) newName;
|
|
|
|
|
2011-07-08 19:23:48 +02:00
|
|
|
- (NSCalendarDate *) mostRecentMessageDate;
|
|
|
|
|
2014-01-10 20:06:53 +01:00
|
|
|
- (NSString *) davCollectionTag;
|
|
|
|
|
2015-09-09 16:20:31 +02:00
|
|
|
- (NSArray *) syncTokenFieldsWithProperties: (NSDictionary *) properties
|
|
|
|
matchingSyncToken: (NSString *) syncToken
|
|
|
|
fromDate: (NSCalendarDate *) theStartDate
|
|
|
|
initialLoad: (BOOL) initialLoadInProgress;
|
2006-06-15 21:34:10 +02:00
|
|
|
/* flags */
|
|
|
|
|
2007-10-22 18:07:12 +02:00
|
|
|
- (NSException *) addFlagsToAllMessages: (id) _f;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
|
|
|
/* folder type */
|
|
|
|
|
2007-05-28 21:07:21 +02:00
|
|
|
- (NSArray *) subfolders;
|
2007-10-22 18:07:12 +02:00
|
|
|
|
2007-10-31 16:55:47 +01:00
|
|
|
- (BOOL) isSpecialFolder;
|
|
|
|
|
2007-10-22 18:07:12 +02:00
|
|
|
- (NSArray *) allFolderPaths;
|
|
|
|
- (NSArray *) allFolderURLs;
|
2007-05-28 21:07:21 +02:00
|
|
|
|
2008-09-30 15:42:48 +02:00
|
|
|
- (NSString *) userSpoolFolderPath;
|
|
|
|
- (BOOL) ensureSpoolFolderPath;
|
|
|
|
|
2009-09-29 22:13:36 +02:00
|
|
|
- (id) appendMessage: (NSData *) message
|
|
|
|
usingId: (int *) imap4id;
|
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
@end
|
|
|
|
|
2007-10-31 16:55:47 +01:00
|
|
|
@interface SOGoSpecialMailFolder : SOGoMailFolder
|
|
|
|
|
|
|
|
- (BOOL) isSpecialFolder;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
#endif /* __Mailer_SOGoMailFolder_H__ */
|