]> err.no Git - sope/blob - sope-core/NGMime/NGConcreteMimeType.h
added svn:keywords and svn:ignore where appropriate. removed CVS artifacts.
[sope] / sope-core / NGMime / NGConcreteMimeType.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 __NGMime_NGConcreteMimeType_H__
24 #define __NGMime_NGConcreteMimeType_H__
25
26 #import <Foundation/NSObject.h>
27 #include <NGMime/NGMimeType.h>
28
29 @class NSString, NSDictionary;
30
31 @interface NGParameterMimeType : NGMimeType
32 {
33 @protected
34   NSString     *subType;
35   NSDictionary *parameters;
36 }
37
38 - (id)initWithType:(NSString *)_type subType:(NSString *)_subType
39   parameters:(NSDictionary *)_parameters;
40
41 @end
42
43 /*
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. 
55
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
64   subtypes of "text".
65
66
67   The format parameter is described in:
68
69     http://www.ietf.org/internet-drafts/draft-gellens-format-06.txt
70 */
71 @interface NGConcreteTextMimeType : NGMimeType
72 {
73 @protected
74   NSString *subType;
75   NSString *charset;
76   NSString *name;   // used in vcards
77   NSString *format;
78   NSString *method; // used in iCalendars (method=REQUEST)
79   BOOL     delsp;
80   float    quality;
81 }
82
83 @end
84
85 @interface NGConcreteTextVcardMimeType : NGConcreteTextMimeType
86 @end
87
88 /*
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.)
98 */
99 @interface NGConcreteApplicationMimeType : NGParameterMimeType
100 @end
101
102 /*
103   The "octet-stream" subtype is used to indicate that a body contains arbitrary
104   binary data. The set of currently defined parameters is:
105
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. 
108
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. 
113
114    Both of these parameters are optional. 
115
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. 
121 */
122 @interface NGConcreteAppOctetMimeType : NGMimeType
123 {
124 @protected
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;
128   NSString *name;
129 }
130
131 @end
132
133 @interface NGConcreteMultipartMimeType : NGParameterMimeType
134 @end
135
136 @interface NGConcreteMessageMimeType : NGParameterMimeType
137 @end
138
139
140 @interface NGConcreteImageMimeType : NGParameterMimeType
141 @end
142
143 @interface NGConcreteAudioMimeType : NGParameterMimeType
144 @end
145
146 @interface NGConcreteVideoMimeType : NGParameterMimeType
147 @end
148
149
150 @interface NGConcreteGenericMimeType : NGMimeType
151 {
152 @protected
153   NSString     *type;
154   NSString     *subType;
155   NSDictionary *parameters;
156 }
157
158 @end
159
160 @interface NGConcreteWildcardType : NGMimeType
161 {
162 @protected
163   NSString     *type;    // nil means wildcard
164   NSString     *subType; // nil means wildcard
165   NSDictionary *parameters;
166 }
167
168 @end
169
170 #endif /* __NGMime_NGConcreteMimeType_H__ */