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_NGConcreteMimeType_H__
24 #define __NGMime_NGConcreteMimeType_H__
26 #import <Foundation/NSObject.h>
27 #include <NGMime/NGMimeType.h>
29 @class NSString, NSDictionary;
31 @interface NGParameterMimeType : NGMimeType
35 NSDictionary *parameters;
38 - (id)initWithType:(NSString *)_type subType:(NSString *)_subType
39 parameters:(NSDictionary *)_parameters;
44 The "text" media type is intended for sending material which is principally
45 textual in form. A "charset" parameter may be used to indicate the character
46 set of the body text for "text" subtypes, notably including the subtype
47 "text/plain", which is a generic subtype for plain text. Plain text does not
48 provide for or allow formatting commands, font attribute specifications,
49 processing instructions, interpretation directives, or content markup. Plain
50 text is seen simply as a linear sequence of characters, possibly interrupted by
51 line breaks or page breaks. Plain text may allow the stacking of several
52 characters in the same position in the text. Plain text in scripts like Arabic
53 and Hebrew may also include facilitites that allow the arbitrary mixing of text
54 segments with opposite writing directions.
56 Beyond plain text, there are many formats for representing what might be known
57 as "rich text". An interesting characteristic of many such representations is
58 that they are to some extent readable even without the software that interprets
59 them. It is useful, then, to distinguish them, at the highest level, from such
60 unreadable data as images, audio, or text represented in an unreadable form. In
61 the absence of appropriate interpretation software, it is reasonable to show
62 subtypes of "text" to the user, while it is not reasonable to do so with most
63 nontextual data. Such formatted textual data should be represented using
67 The format parameter is described in:
69 http://www.ietf.org/internet-drafts/draft-gellens-format-06.txt
71 @interface NGConcreteTextMimeType : NGMimeType
76 NSString *name; // used in vcards
78 NSString *method; // used in iCalendars (method=REQUEST)
85 @interface NGConcreteTextVcardMimeType : NGConcreteTextMimeType
89 The "application" media type is to be used for discrete data which do not fit in
90 any of the other categories, and particularly for data to be processed by some
91 type of application program.
92 This is information which must be processed by an application before it is
93 viewable or usable by a user. Expected uses for the "application" media type
94 include file transfer, spreadsheets, data for mail-based scheduling systems, and
95 languages for "active" (computational) material. (The latter, in particular, can
96 pose security problems which must be understood by implementors, and are
97 considered in detail in the discussion of the "application/PostScript" media type.)
99 @interface NGConcreteApplicationMimeType : NGParameterMimeType
103 The "octet-stream" subtype is used to indicate that a body contains arbitrary
104 binary data. The set of currently defined parameters is:
106 1. TYPE -- the general type or category of binary data. This is intended as
107 information for the human recipient rather than for any automatic processing.
109 2. PADDING -- the number of bits of padding that were appended to the bit-stream
110 comprising the actual contents to produce the enclosed 8bit byte-oriented
111 data. This is useful for enclosing a bit-stream in a body when the total
112 number of bits is not a multiple of 8.
114 Both of these parameters are optional.
116 An additional parameter, "CONVERSIONS", was defined in RFC 1341 but has since
117 been removed. RFC 1341 also defined the use of a "NAME" parameter which gave a
118 suggested file name to be used if the data were to be written to a file. This
119 has been deprecated in anticipation of a separate Content-Disposition header
120 field, to be defined in a subsequent RFC.
122 @interface NGConcreteAppOctetMimeType : NGMimeType
125 NSString *type; // the general type or category of binary data
126 unsigned padding; // the number of bits of padding that were appended
127 NSString *conversions;
133 @interface NGConcreteMultipartMimeType : NGParameterMimeType
136 @interface NGConcreteMessageMimeType : NGParameterMimeType
140 @interface NGConcreteImageMimeType : NGParameterMimeType
143 @interface NGConcreteAudioMimeType : NGParameterMimeType
146 @interface NGConcreteVideoMimeType : NGParameterMimeType
150 @interface NGConcreteGenericMimeType : NGMimeType
155 NSDictionary *parameters;
160 @interface NGConcreteWildcardType : NGMimeType
163 NSString *type; // nil means wildcard
164 NSString *subType; // nil means wildcard
165 NSDictionary *parameters;
170 #endif /* __NGMime_NGConcreteMimeType_H__ */