| 1 | /* |
| 2 | ** CWMIMEMultipart.h |
| 3 | ** |
| 4 | ** Copyright (c) 2001-2004 Ludovic Marcotte |
| 5 | ** Copyright (C) 2013-2017 The GNUstep team |
| 6 | ** |
| 7 | ** Author: Ludovic Marcotte <[email protected]> |
| 8 | ** Riccardo Mottola |
| 9 | ** |
| 10 | ** This library is free software; you can redistribute it and/or |
| 11 | ** modify it under the terms of the GNU Lesser General Public |
| 12 | ** License as published by the Free Software Foundation; either |
| 13 | ** version 2.1 of the License, or (at your option) any later version. |
| 14 | ** |
| 15 | ** This library is distributed in the hope that it will be useful, |
| 16 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 18 | ** Lesser General Public License for more details. |
| 19 | ** |
| 20 | ** You should have received a copy of the GNU General Public License |
| 21 | ** along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 22 | */ |
| 23 | |
| 24 | #ifndef _Pantomime_H_CWMIMEMultipart |
| 25 | #define _Pantomime_H_CWMIMEMultipart |
| 26 | |
| 27 | #import <Foundation/NSArray.h> |
| 28 | #import <Foundation/NSObject.h> |
| 29 | |
| 30 | #if defined(__APPLE__) && (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4) |
| 31 | #ifndef NSUInteger |
| 32 | #define NSUInteger unsigned int |
| 33 | #endif |
| 34 | #endif |
| 35 | |
| 36 | @class CWPart; |
| 37 | |
| 38 | /*! |
| 39 | @class CWMIMEMultipart |
| 40 | @discussion This class is used to define a composite multipart. |
| 41 | It holds CWPart instances. |
| 42 | */ |
| 43 | @interface CWMIMEMultipart : NSObject |
| 44 | { |
| 45 | @private |
| 46 | NSMutableArray *_parts; |
| 47 | } |
| 48 | |
| 49 | /*! |
| 50 | @method addPart: |
| 51 | @discussion This method is used to add new body part |
| 52 | to the multipart instance. |
| 53 | @param thePart The CWPart instance to add. |
| 54 | */ |
| 55 | - (void) addPart: (CWPart *) thePart; |
| 56 | |
| 57 | /*! |
| 58 | @method removePart: |
| 59 | @discussion This method is used to remove an existing body part |
| 60 | from the multipart instance. |
| 61 | @param thePart The CWPart instance to remove. |
| 62 | */ |
| 63 | - (void) removePart: (CWPart *) thePart; |
| 64 | |
| 65 | /*! |
| 66 | @method count |
| 67 | @discussion This method returns the number of CWPart objects |
| 68 | present in the receiver. |
| 69 | @result The number of Part instances. |
| 70 | */ |
| 71 | - (NSUInteger) count; |
| 72 | |
| 73 | /*! |
| 74 | @method partAtIndex: |
| 75 | @discussion This method is used to get the CWPart instance |
| 76 | at the specified index. |
| 77 | @param theIndex The index of the CWPart instance to get. |
| 78 | @result The CWPart instance. If the index is out of bounds, |
| 79 | an NSRangeException is raised. |
| 80 | */ |
| 81 | - (CWPart *) partAtIndex: (NSUInteger) theIndex; |
| 82 | |
| 83 | @end |
| 84 | |
| 85 | #endif // _Pantomime_H_CWMIMEMultipart |