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