~ubuntu-branches/ubuntu/dapper/pantomime/dapper

« back to all changes in this revision

Viewing changes to Headers/Pantomime/IMAPStore.h

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2004-11-20 00:25:28 UTC
  • mfrom: (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20041120002528-igjuwyao6gubpig1
Tags: 1.1.2-3
Build depend / depend on libgnustep-base-1.10-dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
**  IMAPStore.h
3
3
**
4
 
**  Copyright (c) 2001, 2002
 
4
**  Copyright (c) 2001, 2002, 2003
5
5
**
6
6
**  Author: Ludovic Marcotte <ludovic@Sophos.ca>
7
7
**
20
20
**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
21
*/
22
22
 
23
 
#import <Foundation/Foundation.h>
24
 
#import <Pantomime/Service.h>
25
 
#import <Pantomime/Store.h>
26
 
 
 
23
#ifndef _Pantomime_H_IMAPStore
 
24
#define _Pantomime_H_IMAPStore
 
25
 
 
26
#include <Pantomime/Service.h>
 
27
#include <Pantomime/Store.h>
 
28
 
 
29
#import <Foundation/NSArray.h>
 
30
#import <Foundation/NSDictionary.h>
 
31
#import <Foundation/NSObject.h>
 
32
#import <Foundation/NSString.h>
 
33
 
 
34
@class Connection;
 
35
@class Flags;
27
36
@class IMAPCacheManager;
28
37
@class IMAPFolder;
 
38
@class IMAPMessage;
29
39
@class TCPConnection;
30
40
 
31
41
@interface IMAPStore : NSObject <Service, Store>
32
42
{
33
 
  NSString *name;
 
43
  NSMutableDictionary *folders, *openedFolders, *folderStatus;
 
44
  NSString *name, *folderSeparator, *username;
 
45
  NSMutableArray *subscribedFolders, *capabilities;
 
46
 
 
47
  id<Connection> tcpConnection;  
 
48
  id delegate;
 
49
 
34
50
  int port, tag;
35
 
 
36
 
  TCPConnection *tcpConnection;
37
 
 
38
 
  BOOL messagesHaveBeenPrefetched;
 
51
  
 
52
  @public
 
53
    struct {
 
54
      NSMutableArray *searchResponse;
 
55
      NSString       *lastCommand;
 
56
      NSString       *lastResponse;
 
57
      BOOL           lastCommandWasSuccessful;
 
58
      BOOL           messagesWereReceived;
 
59
      BOOL           messagesWereExpunged;
 
60
      BOOL           messagesFlagsHaveChanged;
 
61
      BOOL           connected;
 
62
    } _status;
39
63
}
40
64
 
41
65
- (IMAPFolder *) folderForName: (NSString *) theName
 
66
                          mode: (int) theMode
42
67
                      prefetch: (BOOL) aBOOL;
43
68
 
44
69
- (IMAPFolder *) folderForName: (NSString *) theName
45
 
          withIMAPCacheManager: (IMAPCacheManager *) theIMAPCacheManager;
 
70
                        select: (BOOL) aBOOL;
46
71
 
47
72
- (NSString *) nextTag;
48
73
- (NSString *) lastTag;
49
74
 
50
 
//
51
 
//
52
 
//
53
 
- (int) parseExists: (NSString *) theLine;
54
 
- (int) parseUIDValidity: (NSString *) theLine;
55
 
 
56
 
@end
 
75
- (BOOL) subscribeToFolderWithName: (NSString *) theName;
 
76
- (BOOL) unsubscribeToFolderWithName: (NSString *) theName;
 
77
 
 
78
- (void) noop;
 
79
 
 
80
- (id) delegate;
 
81
- (void) setDelegate: (id) theDelegate;
 
82
 
 
83
//
 
84
// Other methods
 
85
//
 
86
- (NSDictionary *) folderStatus: (NSArray *) theArray;
 
87
 
 
88
- (NSArray *) capabilities;
 
89
 
 
90
@end
 
91
 
 
92
 
 
93
//
 
94
// Private methods
 
95
//
 
96
@interface IMAPStore (Private)
 
97
 
 
98
- (BOOL) _cramMD5Authentication: (NSString *) theUsername
 
99
                       password: (NSString *) thePassword;
 
100
 
 
101
- (NSString *) _folderNameFromString: (NSString *) theString;
 
102
- (NSString *) _lastCommand;
 
103
 
 
104
- (BOOL) _loginAuthentication: (NSString *) theUsername
 
105
                     password: (NSString *) thePassword;
 
106
 
 
107
- (void) _messagesWereReceived;
 
108
- (void) _parseCapability: (NSString *) theString;
 
109
- (void) _parseExists: (NSString *) theString;
 
110
- (void) _parseExpunge: (NSString *) theString;
 
111
- (void) _parseFetch: (NSString *) theString
 
112
                 msn: (int) theMSN;
 
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;
 
120
- (void) _preInit;
 
121
- (int) _segmentSizeFromWord: (NSString *) theWord;
 
122
- (void) _sendCommand: (NSString *) theCommand;
 
123
 
 
124
@end
 
125
 
 
126
#endif // _Pantomime_H_IMAPStore