2 Copyright (C) 2000-2005 SKYRIX Software AG
4 This file is part of SOPE.
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
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.
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
22 #ifndef __NGMime_NGMimeBodyParser_H__
23 #define __NGMime_NGMimeBodyParser_H__
25 #import <Foundation/NSObject.h>
26 #include <NGMime/NGPart.h>
30 @protocol NGMimeBodyParser < NSObject >
32 - (id)parseBodyOfPart:(id<NGMimePart>)_part
34 delegate:(id)_delegate;
38 @interface NGMimeBodyParser : NSObject < NGMimeBodyParser >
41 @interface NGMimeTextBodyParser : NGMimeBodyParser
44 @class NGMimePartParser;
45 @class NGMimeMultipartBody;
48 A multipart body is a part body that contains body-parts separated
51 @interface NGMimeMultipartBodyParser : NGMimeBodyParser
53 - (BOOL)parseBody:(NGMimeMultipartBody *)_body
54 ofMultipart:(id<NGMimePart>)_part
58 - (id<NGMimePart>)parseBodyPartWithData:(NSData *)_rawData
59 inMultipart:(id<NGMimePart>)_multipart
60 parser:(NGMimePartParser *)_parser; // usually a NGMimeBodyPartParser
64 @interface NSObject(NGMimeMultipartBodyParserDelegate)
66 - (BOOL)multipartBodyParser:(NGMimeMultipartBodyParser *)_parser
67 immediatlyParseBodyOfMultipart:(id<NGMimePart>)_part
70 - (void)multipartBodyParser:(NGMimeMultipartBodyParser *)_parser
71 foundPrefix:(NSData *)_prefix
72 inMultipart:(id<NGMimePart>)_part;
74 - (void)multipartBodyParser:(NGMimeMultipartBodyParser *)_parser
75 foundSuffix:(NSData *)_suffix
76 inMultipart:(id<NGMimePart>)_part;
78 - (NGMimePartParser *)multipartBodyParser:(NGMimeMultipartBodyParser *)_parser
79 parserForEntity:(NSData *)_data
80 inMultipart:(id<NGMimePart>)_part;
84 #endif /* __NGMime_NGMimeBodyParser_H__ */