]> err.no Git - sope/blob - sope-mime/NGMime/NGMimeGeneratorProtocols.h
updated framework version
[sope] / sope-mime / NGMime / NGMimeGeneratorProtocols.h
1 /*
2   Copyright (C) 2000-2005 SKYRIX Software AG
3
4   This file is part of SOPE.
5
6   SOPE 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   SOPE 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 SOPE; 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
22 #ifndef __NGMimeGenerator_NGMimeGeneratorProtocols_H__
23 #define __NGMimeGenerator_NGMimeGeneratorProtocols_H__
24
25 #import <Foundation/NSObject.h>
26 #import <NGMime/NGPart.h>
27
28 @class NSData, NGMutableHashMap;
29
30 @protocol NGMimePartGenerator <NSObject>
31
32 /* generate mime from part and store it in _file */
33 - (NSString *)generateMimeFromPartToFile:(id<NGMimePart>)_part;
34
35 - (NSData *)generateMimeFromPart:(id<NGMimePart>)_part;
36 - (void)setDelegate:(id)_delegate;
37 - (id)delegate;
38 - (void)setUseMimeData:(BOOL)_useMimeData;
39
40 @end
41
42 @protocol NGMimeBodyGenerator < NSObject >
43
44 - (NSData *)generateBodyOfPart:(id<NGMimePart>)_part
45   additionalHeaders:(NGMutableHashMap *)_addHeaders
46   delegate:(id)_delegate;
47
48 - (NSData *)encodeData:(NSData *)_data
49   forPart:(id<NGMimePart>)_part
50   additionalHeaders:(NGMutableHashMap *)_addHeaders;
51
52 /* use mime data objects to store mime objects on disk instead in memory */
53
54 - (void)setUseMimeData:(BOOL)_useMimeData;
55 @end
56
57 @protocol NGMimeHeaderFieldGenerator < NSObject >
58
59 - (NSData *)generateDataForHeaderFieldNamed:(NSString *)_headerField
60   value:(id)_value;
61
62 @end
63
64 #endif // __NGMimeGenerator_NGMimeGeneratorProtocols_H__