2 Copyright (C) 2000-2003 SKYRIX Software AG
4 This file is part of OGo
6 OGo is free software; you can redistribute it and/or modify it under
7 the terms of the GNU Lesser General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
11 OGo is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14 License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with OGo; see the file COPYING. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
23 #ifndef __NGMime_NGMimeMultipartBody_H__
24 #define __NGMime_NGMimeMultipartBody_H__
26 #import <Foundation/NSObject.h>
27 #include <NGMime/NGPart.h>
29 @class NSData, NSString, NSMutableArray;
32 Represents bodies of multipart entities.
33 Multipart bodies can be parsed 'on-demand'.
35 ATTENTION: the delegate is _required_ to persist until the multipart body
36 is parsed ! The body does not retain the delegate.
39 @interface NGMimeMultipartBody : NSObject
42 id<NGMimePart> part; /* non-retained */
45 NSMutableArray *bodyParts;
47 // for on-demand parsing
49 id delegate; /* non-retained */
56 - (id)initWithPart:(id<NGMimePart>)_part; // designated initializer
57 - (id)initWithPart:(id<NGMimePart>)_part
59 delegate:(id)_delegate;
63 - (id<NGMimePart>)part; // the part the body belongs to
66 - (void)addBodyPart:(id<NGPart>)_part;
67 - (void)addBodyPart:(id<NGPart>)_part atIndex:(int)_idx;
68 - (void)removeBodyPart:(id<NGPart>)_part;
69 - (void)removeBodyPartAtIndex:(int)_idx;
71 - (void)setPrefix:(NSString *)_prefix;
73 - (void)setSuffix:(NSString *)_suffix;
78 #endif /* __NGMime_NGMimeMultipartBody_H__ */