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