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 __NGMimeGenerator_NGMimeBodyGenerator_H__
24 #define __NGMimeGenerator_NGMimeBodyGenerator_H__
26 #import <Foundation/NSObject.h>
27 #import <NGMime/NGPart.h>
28 #import <NGMime/NGMimeGeneratorProtocols.h>
30 @class NSData, NSString, NSArray, NGMutableHashMap;
31 @class NGMimeMultipartBodyGenerator, NGMimeMultipartBody;
33 @interface NGMimeBodyGenerator : NSObject <NGMimeBodyGenerator>
37 - (NSData *)generateBodyOfPart:(id<NGMimePart>)_part
38 additionalHeaders:(NGMutableHashMap *)_addHeaders
39 delegate:(id)_delegate;
41 - (NSData *)encodeData:(NSData *)_data
42 forPart:(id<NGMimePart>)_part
43 additionalHeaders:(NGMutableHashMap *)_addHeaders;
46 - (void)setUseMimeData:(BOOL)_b;
49 @interface NGMimeTextBodyGenerator : NGMimeBodyGenerator
52 @interface NGMimeRfc822BodyGenerator : NGMimeBodyGenerator
54 - (id<NGMimePartGenerator>)generatorForPart:(id<NGMimePart>)_part;
58 @interface NGMimeMultipartBodyGenerator : NGMimeBodyGenerator
60 + (NSString *)boundaryPrefix;
62 - (NSString *)multipartBodyGenerator:(NGMimeMultipartBodyGenerator *)_gen
63 prefixForPart:(id<NGMimePart>)_part
64 mimeMultipart:(NGMimeMultipartBody *)_body;
66 - (NSString *)multipartBodyGenerator:(NGMimeMultipartBodyGenerator *)_gen
67 suffixForPart:(id<NGMimePart>)_part
68 mimeMultipart:(NGMimeMultipartBody *)_body;
70 - (id<NGMimePartGenerator>)multipartBodyGenerator:(NGMimeBodyGenerator *)_gen
71 generatorForPart:(id<NGMimePart>)_part;
73 - (NSData *)buildDataWithBoundary:(NSString *)_boundary
74 partsData:(NSArray *)_parts;
76 - (NSString *)buildBoundaryForPart:(id<NGMimePart>)_part data:(NSArray *)_data
77 additionalHeaders:(NGMutableHashMap *)_addHeaders;
81 #endif // __NGMimeGenerator_NGMimeBodyGenerator_H__