| 1 | /* |
| 2 | ** CWPOP3CacheObject.h |
| 3 | ** |
| 4 | ** Copyright (c) 2001-2004 Ludovic Marcotte |
| 5 | ** |
| 6 | ** Author: Ludovic Marcotte <[email protected]> |
| 7 | ** |
| 8 | ** This library is free software; you can redistribute it and/or |
| 9 | ** modify it under the terms of the GNU Lesser General Public |
| 10 | ** License as published by the Free Software Foundation; either |
| 11 | ** version 2.1 of the License, or (at your option) any later version. |
| 12 | ** |
| 13 | ** This library is distributed in the hope that it will be useful, |
| 14 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 16 | ** Lesser General Public License for more details. |
| 17 | ** |
| 18 | ** You should have received a copy of the GNU General Public License |
| 19 | ** along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 20 | */ |
| 21 | |
| 22 | #ifndef _Pantomime_H_CWPOP3CacheObject |
| 23 | #define _Pantomime_H_CWPOP3CacheObject |
| 24 | |
| 25 | #import <Foundation/NSCalendarDate.h> |
| 26 | #import <Foundation/NSCoder.h> |
| 27 | #import <Foundation/NSObject.h> |
| 28 | #import <Foundation/NSString.h> |
| 29 | |
| 30 | /*! |
| 31 | @class CWPOP3CacheObject |
| 32 | @discussion This class provides a simple placeholder for storing |
| 33 | a POP3 unique message identifier combined with a |
| 34 | received date. |
| 35 | */ |
| 36 | @interface CWPOP3CacheObject : NSObject <NSCoding> |
| 37 | { |
| 38 | @private |
| 39 | NSCalendarDate *_date; |
| 40 | NSString *_UID; |
| 41 | } |
| 42 | |
| 43 | /*! |
| 44 | @method initWithUID: date: |
| 45 | @discussion This method is the designated initializer for |
| 46 | the CWPOP3CacheObject class. |
| 47 | @param theUID The POP3 UID of the message |
| 48 | @param theDate The date value of when the message |
| 49 | has been downloaded from the POP3 server. |
| 50 | @result The instance, nil on error. |
| 51 | */ |
| 52 | - (id) initWithUID: (NSString *) theUID |
| 53 | date: (NSCalendarDate *) theDate; |
| 54 | |
| 55 | /*! |
| 56 | @method date |
| 57 | @discussion This method is used to obtain the date value |
| 58 | of when the message has been downloaded from |
| 59 | the POP3 server. |
| 60 | @result The date value, nil if none was set. |
| 61 | */ |
| 62 | - (NSCalendarDate *) date; |
| 63 | |
| 64 | /*! |
| 65 | @method setDate: |
| 66 | @discussion This method is used to set the date value |
| 67 | of when the message has been downloaded from |
| 68 | the POP3 server. |
| 69 | @param theDate The new date value. |
| 70 | */ |
| 71 | - (void) setDate: (NSCalendarDate *) theDate; |
| 72 | |
| 73 | /*! |
| 74 | @method setUID: |
| 75 | @discussion This method is used to set the POP3 unique |
| 76 | identifier of the receiver. |
| 77 | @param theUID The new UID value. |
| 78 | */ |
| 79 | - (void) setUID: (NSString *) theUID; |
| 80 | |
| 81 | /*! |
| 82 | @method UID |
| 83 | @discussion This method to obtain the POP3 unique |
| 84 | identifier of the receiver. |
| 85 | @result The unique identifier. |
| 86 | */ |
| 87 | - (NSString *) UID; |
| 88 | |
| 89 | @end |
| 90 | |
| 91 | #endif // _Pantomime_H_CWPOP3CacheObject |