~ubuntu-branches/ubuntu/saucy/sope/saucy

« back to all changes in this revision

Viewing changes to sope-mime/NGMime/NGConcreteMimeType.h

  • Committer: Package Import Robot
  • Author(s): Jeroen Dekkers
  • Date: 2012-05-09 15:39:17 UTC
  • Revision ID: package-import@ubuntu.com-20120509153917-nr4jlm8mktma1yv3
Tags: upstream-1.3.14
ImportĀ upstreamĀ versionĀ 1.3.14

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
  Copyright (C) 2000-2005 SKYRIX Software AG
 
3
 
 
4
  This file is part of SOPE.
 
5
 
 
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
 
9
  later version.
 
10
 
 
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.
 
15
 
 
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
 
19
  02111-1307, USA.
 
20
*/
 
21
 
 
22
#ifndef __NGMime_NGConcreteMimeType_H__
 
23
#define __NGMime_NGConcreteMimeType_H__
 
24
 
 
25
#import <Foundation/NSObject.h>
 
26
#include <NGMime/NGMimeType.h>
 
27
 
 
28
@class NSString, NSDictionary;
 
29
 
 
30
@interface NGParameterMimeType : NGMimeType
 
31
{
 
32
@protected
 
33
  NSString     *subType;
 
34
  NSDictionary *parameters;
 
35
}
 
36
 
 
37
- (id)initWithType:(NSString *)_type subType:(NSString *)_subType
 
38
  parameters:(NSDictionary *)_parameters;
 
39
 
 
40
@end
 
41
 
 
42
/*
 
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. 
 
54
 
 
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".
 
64
 
 
65
  The format parameter is described in:
 
66
    http://www.ietf.org/internet-drafts/draft-gellens-format-06.txt
 
67
*/
 
68
@interface NGConcreteTextMimeType : NGMimeType
 
69
{
 
70
@protected
 
71
  NSString *subType;
 
72
  NSString *charset;
 
73
  NSString *name;   // used in vcards
 
74
  NSString *format;
 
75
  NSString *method; // used in iCalendars (method=REQUEST)
 
76
  NSString *replyType; // eg value 'response'
 
77
  BOOL     delsp;
 
78
  float    quality;
 
79
}
 
80
 
 
81
@end
 
82
 
 
83
@interface NGConcreteTextVcardMimeType : NGConcreteTextMimeType
 
84
@end
 
85
 
 
86
/*
 
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.)
 
96
*/
 
97
@interface NGConcreteApplicationMimeType : NGParameterMimeType
 
98
@end
 
99
 
 
100
/*
 
101
  The "octet-stream" subtype is used to indicate that a body contains arbitrary
 
102
  binary data. The set of currently defined parameters is:
 
103
 
 
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. 
 
106
 
 
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. 
 
111
 
 
112
   Both of these parameters are optional. 
 
113
 
 
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. 
 
119
*/
 
120
@interface NGConcreteAppOctetMimeType : NGMimeType
 
121
{
 
122
@protected
 
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;
 
126
  NSString *name;
 
127
}
 
128
 
 
129
@end
 
130
 
 
131
@interface NGConcreteMultipartMimeType : NGParameterMimeType
 
132
@end
 
133
 
 
134
@interface NGConcreteMessageMimeType : NGParameterMimeType
 
135
@end
 
136
 
 
137
 
 
138
@interface NGConcreteImageMimeType : NGParameterMimeType
 
139
@end
 
140
 
 
141
@interface NGConcreteAudioMimeType : NGParameterMimeType
 
142
@end
 
143
 
 
144
@interface NGConcreteVideoMimeType : NGParameterMimeType
 
145
@end
 
146
 
 
147
 
 
148
@interface NGConcreteGenericMimeType : NGMimeType
 
149
{
 
150
@protected
 
151
  NSString     *type;
 
152
  NSString     *subType;
 
153
  NSDictionary *parameters;
 
154
}
 
155
 
 
156
@end
 
157
 
 
158
@interface NGConcreteWildcardType : NGMimeType
 
159
{
 
160
@protected
 
161
  NSString     *type;    // nil means wildcard
 
162
  NSString     *subType; // nil means wildcard
 
163
  NSDictionary *parameters;
 
164
}
 
165
 
 
166
@end
 
167
 
 
168
#endif /* __NGMime_NGConcreteMimeType_H__ */