]> err.no Git - sope/blob - sope-mime/NGMime/NGMimeBodyGenerator.h
minor fixes
[sope] / sope-mime / NGMime / NGMimeBodyGenerator.h
1 /*
2   Copyright (C) 2000-2003 SKYRIX Software AG
3
4   This file is part of OGo
5
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
9   later version.
10
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.
15
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
19   02111-1307, USA.
20 */
21 // $Id$
22
23 #ifndef __NGMimeGenerator_NGMimeBodyGenerator_H__
24 #define __NGMimeGenerator_NGMimeBodyGenerator_H__
25
26 #import <Foundation/NSObject.h>
27 #import <NGMime/NGPart.h>
28 #import <NGMime/NGMimeGeneratorProtocols.h>
29
30 @class NSData, NSString, NSArray, NGMutableHashMap;
31 @class NGMimeMultipartBodyGenerator, NGMimeMultipartBody;
32
33 @interface NGMimeBodyGenerator : NSObject <NGMimeBodyGenerator>
34 {
35   BOOL useMimeData;
36 }
37 - (NSData *)generateBodyOfPart:(id<NGMimePart>)_part
38   additionalHeaders:(NGMutableHashMap *)_addHeaders
39   delegate:(id)_delegate;
40
41 - (NSData *)encodeData:(NSData *)_data
42   forPart:(id<NGMimePart>)_part
43   additionalHeaders:(NGMutableHashMap *)_addHeaders;
44
45 - (BOOL)useMimeData;
46 - (void)setUseMimeData:(BOOL)_b;
47 @end
48
49 @interface NGMimeTextBodyGenerator : NGMimeBodyGenerator
50 @end
51
52 @interface NGMimeRfc822BodyGenerator : NGMimeBodyGenerator
53
54 - (id<NGMimePartGenerator>)generatorForPart:(id<NGMimePart>)_part;
55
56 @end
57
58 @interface NGMimeMultipartBodyGenerator : NGMimeBodyGenerator
59
60 + (NSString *)boundaryPrefix;
61
62 - (NSString *)multipartBodyGenerator:(NGMimeMultipartBodyGenerator *)_gen
63   prefixForPart:(id<NGMimePart>)_part
64   mimeMultipart:(NGMimeMultipartBody *)_body;
65   
66 - (NSString *)multipartBodyGenerator:(NGMimeMultipartBodyGenerator *)_gen
67   suffixForPart:(id<NGMimePart>)_part
68   mimeMultipart:(NGMimeMultipartBody *)_body;
69   
70 - (id<NGMimePartGenerator>)multipartBodyGenerator:(NGMimeBodyGenerator *)_gen
71   generatorForPart:(id<NGMimePart>)_part;
72
73 - (NSData *)buildDataWithBoundary:(NSString *)_boundary
74   partsData:(NSArray *)_parts;
75
76 - (NSString *)buildBoundaryForPart:(id<NGMimePart>)_part data:(NSArray *)_data
77   additionalHeaders:(NGMutableHashMap *)_addHeaders; 
78   
79 @end
80
81 #endif // __NGMimeGenerator_NGMimeBodyGenerator_H__