File: CWPOP3Store.h

package info (click to toggle)
pantomime 1.4.0%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 2,288 kB
  • sloc: objc: 22,039; makefile: 11; sh: 4
file content (111 lines) | stat: -rw-r--r-- 3,795 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
/*
**  CWPOP3Store.h
**
**  Copyright (c) 2001-2006 Ludovic Marcotte
**
**  Author: Ludovic Marcotte <ludovic@Sophos.ca>
**
**  This library is free software; you can redistribute it and/or
**  modify it under the terms of the GNU Lesser General Public
**  License as published by the Free Software Foundation; either
**  version 2.1 of the License, or (at your option) any later version.
**  
**  This library is distributed in the hope that it will be useful,
**  but WITHOUT ANY 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 General Public License
** along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef _Pantomime_H_CWPOP3Store
#define _Pantomime_H_CWPOP3Store

#include <Pantomime/CWService.h>
#include <Pantomime/CWStore.h>

#import <Foundation/NSObject.h>
#import <Foundation/NSString.h>

/*!
  @typedef POP3Command
  @abstract Supported POP3 commands.
  @discussion This enum lists the supported POP3 commands available
              in Pantomime's POP3 client code.
  @constant POP3_APOP APOP authentication command.
  @constant POP3_AUTHORIZATION Special command so that we know we are
                               in the authorization state.
  @constant POP3_DELE The POP3 DELE command. See RFC 1939 for details.
  @constant POP3_LIST The POP3 LIST command. See RFC 1939 for details.
  @constant POP3_NOOP The POP3 NOOP command. See RFC 1939 for details.
  @constant POP3_PASS The POP3 PASS command. See RFC 1939 for details.
  @constant POP3_QUIT The POP3 QUIT command. See RFC 1939 for details.
  @constant POP3_RETR The POP3 RETR command. See RFC 1939 for details.
  @constant POP3_RETR_AND_INITIALIZE Same as POP3_RETR but also initialize the message with the received content.
  @constant POP3_STAT The POP3 STAT command. See RFC 1939 for details.
  @constant POP3_STLS The STLS POP3 command - see RFC2595.
  @constant POP3_TOP The POP3 TOP command. See RFC 1939 for details.
  @constant POP3_UIDL The POP3 UIDL command. See RFC 1939 for details.
  @constant POP3_USER The POP3 USER command. See RFC 1939 for details.
  @constant POP3_EMPTY_QUEUE Special command to empty the command queue.
  @constant POP3_EXPUNGE_COMPLETED Special command to indicate we are 
                                   done expunging the deleted messages.
*/
typedef enum {
  POP3_APOP = 0x100,
  POP3_AUTHORIZATION,
  POP3_CAPA,
  POP3_DELE,
  POP3_LIST,
  POP3_NOOP,
  POP3_PASS,
  POP3_QUIT,
  POP3_RETR,
  POP3_RETR_AND_INITIALIZE,
  POP3_STAT,
  POP3_STLS,
  POP3_TOP,
  POP3_UIDL,
  POP3_USER,
  POP3_EMPTY_QUEUE,      
  POP3_EXPUNGE_COMPLETED
} POP3Command;

@class CWPOP3Folder;

/*!
  @class CWPOP3Store
  @abstract Pantomime POP3 client code.
  @discussion This class, which extends the CWService class and implements
              the CWStore protocol, is Pantomime's POP3 client code.
*/ 
@interface CWPOP3Store : CWService <CWStore>
{
  @private
    NSString *_timestamp;
    CWPOP3Folder *_folder;
}


/*!
  @method timestamp
  @discussion This method is used to obtain the timestamp in the
              server's greeting. Servers must send that if they do
	      support APOP.
  @result The timestamp, as a NSString instance.
*/
- (NSString *) timestamp;

/*!
  @method sendCommand:arguments:...
  @discussion This method is used to send commands to the POP3 server.
              Normally, you should not call this method directly.
  @param theCommand The POP3 command to send.
  @param theFormat The format defining the variable arguments list.
*/
- (void) sendCommand: (POP3Command) theCommand  arguments: (NSString *) theFormat, ...;

@end

#endif // _Pantomime_H_CWPOP3Store