| 1 | /* |
| 2 | ** CWLocalFolder+mbox.h |
| 3 | ** |
| 4 | ** Copyright (c) 2004-2007 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_CWLocalFolder_mbox |
| 23 | #define _Pantomime_H_CWLocalFolder_mbox |
| 24 | |
| 25 | #include <Pantomime/CWLocalFolder.h> |
| 26 | |
| 27 | @interface CWLocalFolder (mbox) |
| 28 | |
| 29 | - (void) close_mbox; |
| 30 | |
| 31 | - (void) expunge_mbox; |
| 32 | |
| 33 | - (FILE *) open_mbox; |
| 34 | |
| 35 | - (void) parse_mbox: (NSString *) theFile |
| 36 | stream: (FILE *) theStream |
| 37 | flags: (CWFlags *) theFlags |
| 38 | all: (BOOL) theBOOL; |
| 39 | |
| 40 | - (NSData *) unfoldLinesStartingWith: (char *) firstLine |
| 41 | fileStream: (FILE *) theStream; |
| 42 | |
| 43 | /*! |
| 44 | @method numberOfMessagesFromData: |
| 45 | @discussion This method is used to get the number of RFC2822 |
| 46 | messages from the supplied data. The returned value |
| 47 | will always be at least 1 unless the supplied data |
| 48 | is nil or its length is 0. |
| 49 | @param theData The data holding RFC2822 messages |
| 50 | @result The number of messages, 0 otherwise. |
| 51 | */ |
| 52 | + (NSUInteger) numberOfMessagesFromData: (NSData *) theData; |
| 53 | |
| 54 | - (NSArray *) messagesFromMailSpoolFile; |
| 55 | |
| 56 | @end |
| 57 | |
| 58 | #endif // _Pantomime_H_CWLocalFolder_mbox |