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_NGMimeBodyParser_H__
24 #define __NGMime_NGMimeBodyParser_H__
26 #import <Foundation/NSObject.h>
27 #include <NGMime/NGPart.h>
31 @protocol NGMimeBodyParser < NSObject >
33 - (id)parseBodyOfPart:(id<NGMimePart>)_part
35 delegate:(id)_delegate;
39 @interface NGMimeBodyParser : NSObject < NGMimeBodyParser >
42 @interface NGMimeTextBodyParser : NGMimeBodyParser
45 @class NGMimePartParser;
46 @class NGMimeMultipartBody;
49 A multipart body is a part body that contains body-parts separated
52 @interface NGMimeMultipartBodyParser : NGMimeBodyParser
54 - (BOOL)parseBody:(NGMimeMultipartBody *)_body
55 ofMultipart:(id<NGMimePart>)_part
59 - (id<NGMimePart>)parseBodyPartWithData:(NSData *)_rawData
60 inMultipart:(id<NGMimePart>)_multipart
61 parser:(NGMimePartParser *)_parser; // usually a NGMimeBodyPartParser
65 @interface NSObject(NGMimeMultipartBodyParserDelegate)
67 - (BOOL)multipartBodyParser:(NGMimeMultipartBodyParser *)_parser
68 immediatlyParseBodyOfMultipart:(id<NGMimePart>)_part
71 - (void)multipartBodyParser:(NGMimeMultipartBodyParser *)_parser
72 foundPrefix:(NSData *)_prefix
73 inMultipart:(id<NGMimePart>)_part;
75 - (void)multipartBodyParser:(NGMimeMultipartBodyParser *)_parser
76 foundSuffix:(NSData *)_suffix
77 inMultipart:(id<NGMimePart>)_part;
79 - (NGMimePartParser *)multipartBodyParser:(NGMimeMultipartBodyParser *)_parser
80 parserForEntity:(NSData *)_data
81 inMultipart:(id<NGMimePart>)_part;
85 #endif /* __NGMime_NGMimeBodyParser_H__ */