20
20
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23
#import <Foundation/Foundation.h>
24
#import <Pantomime/Service.h>
25
#import <Pantomime/Store.h>
23
#ifndef _Pantomime_H_IMAPStore
24
#define _Pantomime_H_IMAPStore
26
#include <Pantomime/Service.h>
27
#include <Pantomime/Store.h>
29
#import <Foundation/NSArray.h>
30
#import <Foundation/NSDictionary.h>
31
#import <Foundation/NSObject.h>
32
#import <Foundation/NSString.h>
27
36
@class IMAPCacheManager;
29
39
@class TCPConnection;
31
41
@interface IMAPStore : NSObject <Service, Store>
43
NSMutableDictionary *folders, *openedFolders, *folderStatus;
44
NSString *name, *folderSeparator, *username;
45
NSMutableArray *subscribedFolders, *capabilities;
47
id<Connection> tcpConnection;
36
TCPConnection *tcpConnection;
38
BOOL messagesHaveBeenPrefetched;
54
NSMutableArray *searchResponse;
55
NSString *lastCommand;
56
NSString *lastResponse;
57
BOOL lastCommandWasSuccessful;
58
BOOL messagesWereReceived;
59
BOOL messagesWereExpunged;
60
BOOL messagesFlagsHaveChanged;
41
65
- (IMAPFolder *) folderForName: (NSString *) theName
42
67
prefetch: (BOOL) aBOOL;
44
69
- (IMAPFolder *) folderForName: (NSString *) theName
45
withIMAPCacheManager: (IMAPCacheManager *) theIMAPCacheManager;
47
72
- (NSString *) nextTag;
48
73
- (NSString *) lastTag;
53
- (int) parseExists: (NSString *) theLine;
54
- (int) parseUIDValidity: (NSString *) theLine;
75
- (BOOL) subscribeToFolderWithName: (NSString *) theName;
76
- (BOOL) unsubscribeToFolderWithName: (NSString *) theName;
81
- (void) setDelegate: (id) theDelegate;
86
- (NSDictionary *) folderStatus: (NSArray *) theArray;
88
- (NSArray *) capabilities;
96
@interface IMAPStore (Private)
98
- (BOOL) _cramMD5Authentication: (NSString *) theUsername
99
password: (NSString *) thePassword;
101
- (NSString *) _folderNameFromString: (NSString *) theString;
102
- (NSString *) _lastCommand;
104
- (BOOL) _loginAuthentication: (NSString *) theUsername
105
password: (NSString *) thePassword;
107
- (void) _messagesWereReceived;
108
- (void) _parseCapability: (NSString *) theString;
109
- (void) _parseExists: (NSString *) theString;
110
- (void) _parseExpunge: (NSString *) theString;
111
- (void) _parseFetch: (NSString *) theString
113
- (void) _parseFlags: (NSString *) aString
114
message: (IMAPMessage *) theMessage;
115
- (void) _parseList: (NSString *) theString;
116
- (void) _parseSearch: (NSString *) theString;
117
- (void) _parseServerOutput;
118
- (void) _parseStatus: (NSString *) theString;
119
- (void) _parseUIDValidity: (NSString *) theString;
121
- (int) _segmentSizeFromWord: (NSString *) theWord;
122
- (void) _sendCommand: (NSString *) theCommand;
126
#endif // _Pantomime_H_IMAPStore