|
ferencd@0
|
1 //
|
|
ferencd@0
|
2 // VMime library (http://www.vmime.org)
|
|
ferencd@0
|
3 // Copyright (C) 2002-2013 Vincent Richard <vincent@vmime.org>
|
|
ferencd@0
|
4 //
|
|
ferencd@0
|
5 // This program is free software; you can redistribute it and/or
|
|
ferencd@0
|
6 // modify it under the terms of the GNU General Public License as
|
|
ferencd@0
|
7 // published by the Free Software Foundation; either version 3 of
|
|
ferencd@0
|
8 // the License, or (at your option) any later version.
|
|
ferencd@0
|
9 //
|
|
ferencd@0
|
10 // This program is distributed in the hope that it will be useful,
|
|
ferencd@0
|
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
ferencd@0
|
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
ferencd@0
|
13 // General Public License for more details.
|
|
ferencd@0
|
14 //
|
|
ferencd@0
|
15 // You should have received a copy of the GNU General Public License along
|
|
ferencd@0
|
16 // with this program; if not, write to the Free Software Foundation, Inc.,
|
|
ferencd@0
|
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
ferencd@0
|
18 //
|
|
ferencd@0
|
19 // Linking this library statically or dynamically with other modules is making
|
|
ferencd@0
|
20 // a combined work based on this library. Thus, the terms and conditions of
|
|
ferencd@0
|
21 // the GNU General Public License cover the whole combination.
|
|
ferencd@0
|
22 //
|
|
ferencd@0
|
23
|
|
ferencd@0
|
24 #ifndef VMIME_CONTENTTYPEFIELD_HPP_INCLUDED
|
|
ferencd@0
|
25 #define VMIME_CONTENTTYPEFIELD_HPP_INCLUDED
|
|
ferencd@0
|
26
|
|
ferencd@0
|
27
|
|
ferencd@0
|
28 #include "vmime/parameterizedHeaderField.hpp"
|
|
ferencd@0
|
29
|
|
ferencd@0
|
30 #include "vmime/mediaType.hpp"
|
|
ferencd@0
|
31 #include "vmime/charset.hpp"
|
|
ferencd@0
|
32
|
|
ferencd@0
|
33
|
|
ferencd@0
|
34 namespace vmime
|
|
ferencd@0
|
35 {
|
|
ferencd@0
|
36
|
|
ferencd@0
|
37
|
|
ferencd@0
|
38 class VMIME_EXPORT contentTypeField : public parameterizedHeaderField
|
|
ferencd@0
|
39 {
|
|
ferencd@0
|
40 friend class headerFieldFactory;
|
|
ferencd@0
|
41
|
|
ferencd@0
|
42 protected:
|
|
ferencd@0
|
43
|
|
ferencd@0
|
44 contentTypeField();
|
|
ferencd@0
|
45 contentTypeField(contentTypeField&);
|
|
ferencd@0
|
46
|
|
ferencd@0
|
47 public:
|
|
ferencd@0
|
48
|
|
ferencd@0
|
49 /** Test whether the "boundary" parameter is set.
|
|
ferencd@0
|
50 *
|
|
ferencd@0
|
51 * @return true if the "boundary" parameter is set, or false otherwise
|
|
ferencd@0
|
52 */
|
|
ferencd@0
|
53 bool hasBoundary() const;
|
|
ferencd@0
|
54
|
|
ferencd@0
|
55 /** Return the value of the "boundary" parameter. Boundary is a
|
|
ferencd@0
|
56 * random string used to separate body parts.
|
|
ferencd@0
|
57 *
|
|
ferencd@0
|
58 * @return value of the "boundary" parameter
|
|
ferencd@0
|
59 */
|
|
ferencd@0
|
60 const string getBoundary() const;
|
|
ferencd@0
|
61
|
|
ferencd@0
|
62 /** Set the value of the "boundary" parameter. Boundary is a
|
|
ferencd@0
|
63 * random string used to separate body parts. Normally, the
|
|
ferencd@0
|
64 * boundary is generated automatically by VMime, you should
|
|
ferencd@0
|
65 * not need to call this.
|
|
ferencd@0
|
66 *
|
|
ferencd@0
|
67 * @param boundary new value for the "boundary" parameter
|
|
ferencd@0
|
68 */
|
|
ferencd@0
|
69 void setBoundary(const string& boundary);
|
|
ferencd@0
|
70
|
|
ferencd@0
|
71 /** Test whether the "charset" parameter is set.
|
|
ferencd@0
|
72 *
|
|
ferencd@0
|
73 * @return true if the "charset" parameter is set, or false otherwise
|
|
ferencd@0
|
74 */
|
|
ferencd@0
|
75 bool hasCharset() const;
|
|
ferencd@0
|
76
|
|
ferencd@0
|
77 /** Return the value of the "charset" parameter. It specifies the
|
|
ferencd@0
|
78 * charset used in the body part contents.
|
|
ferencd@0
|
79 *
|
|
ferencd@0
|
80 * @return value of the "charset" parameter
|
|
ferencd@0
|
81 */
|
|
ferencd@0
|
82 const charset getCharset() const;
|
|
ferencd@0
|
83
|
|
ferencd@0
|
84 /** Set the value of the "charset" parameter. It specifies the
|
|
ferencd@0
|
85 * charset used in the body part contents.
|
|
ferencd@0
|
86 *
|
|
ferencd@0
|
87 * @param ch new value for the "charset" parameter
|
|
ferencd@0
|
88 */
|
|
ferencd@0
|
89 void setCharset(const charset& ch);
|
|
ferencd@0
|
90
|
|
ferencd@0
|
91 /** Test whether the "report-type" parameter is set.
|
|
ferencd@0
|
92 *
|
|
ferencd@0
|
93 * @return true if the "report-type" parameter is set, or false otherwise
|
|
ferencd@0
|
94 */
|
|
ferencd@0
|
95 bool hasReportType() const;
|
|
ferencd@0
|
96
|
|
ferencd@0
|
97 /** Return the value of the "report-type" parameter (RFC-1892).
|
|
ferencd@0
|
98 *
|
|
ferencd@0
|
99 * @return value of the "report-type" parameter
|
|
ferencd@0
|
100 */
|
|
ferencd@0
|
101 const string getReportType() const;
|
|
ferencd@0
|
102
|
|
ferencd@0
|
103 /** Set the value of the "report-type" parameter (RFC-1892).
|
|
ferencd@0
|
104 *
|
|
ferencd@0
|
105 * @param reportType new value for the "report-type" parameter
|
|
ferencd@0
|
106 */
|
|
ferencd@0
|
107 void setReportType(const string& reportType);
|
|
ferencd@0
|
108 };
|
|
ferencd@0
|
109
|
|
ferencd@0
|
110
|
|
ferencd@0
|
111 } // vmime
|
|
ferencd@0
|
112
|
|
ferencd@0
|
113
|
|
ferencd@0
|
114 #endif // VMIME_CONTENTTYPEFIELD_HPP_INCLUDED
|