1/*
2 Copyright (c) 2007 Volker Krause <vkrause@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20#ifndef KMIME_HEADERS_P_H
21#define KMIME_HEADERS_P_H
22
23//@cond PRIVATE
24
25#define kmime_mk_empty_private( subclass, base ) \
26class subclass##Private : public base##Private {};
27
28namespace KMime {
29
30namespace Headers {
31
32class BasePrivate
33{
34 public:
35 BasePrivate() : parent( 0 ) {}
36
37 virtual ~BasePrivate() {}
38
39 KMime::Content *parent;
40 QByteArray encCS;
41};
42
43namespace Generics {
44
45class UnstructuredPrivate : public BasePrivate
46{
47 public:
48 QString decoded;
49};
50
51kmime_mk_empty_private( Structured, Base )
52kmime_mk_empty_private( Address, Structured )
53
54class MailboxListPrivate : public AddressPrivate
55{
56 public:
57 QList<Types::Mailbox> mailboxList;
58};
59
60kmime_mk_empty_private( SingleMailbox, MailboxList )
61
62class AddressListPrivate : public AddressPrivate
63{
64 public:
65 QList<Types::Address> addressList;
66};
67
68class IdentPrivate : public AddressPrivate
69{
70 public:
71 QList<Types::AddrSpec> msgIdList;
72 mutable QByteArray cachedIdentifier;
73};
74
75kmime_mk_empty_private( SingleIdent, Ident )
76
77class TokenPrivate : public StructuredPrivate
78{
79 public:
80 QByteArray token;
81};
82
83class PhraseListPrivate : public StructuredPrivate
84{
85 public:
86 QStringList phraseList;
87};
88
89class DotAtomPrivate : public StructuredPrivate
90{
91 public:
92 QString dotAtom;
93};
94
95class ParametrizedPrivate : public StructuredPrivate
96{
97 public:
98 QMap<QString, QString> parameterHash;
99};
100
101} // namespace Generics
102
103class ReturnPathPrivate : public Generics::AddressPrivate
104{
105 public:
106 Types::Mailbox mailbox;
107};
108
109class MailCopiesToPrivate : public Generics::AddressListPrivate
110{
111 public:
112 bool alwaysCopy;
113 bool neverCopy;
114};
115
116class ContentTransferEncodingPrivate : public Generics::TokenPrivate
117{
118 public:
119 contentEncoding cte;
120 bool decoded;
121};
122
123class ContentTypePrivate : public Generics::ParametrizedPrivate
124{
125 public:
126 QByteArray mimeType;
127 contentCategory category;
128};
129
130class ContentDispositionPrivate : public Generics::ParametrizedPrivate
131{
132 public:
133 contentDisposition disposition;
134};
135
136class GenericPrivate : public Generics::UnstructuredPrivate
137{
138 public:
139 GenericPrivate() : type( 0 ) {}
140 ~GenericPrivate()
141 {
142 delete[] type;
143 }
144
145 char *type;
146};
147
148class ControlPrivate : public Generics::StructuredPrivate
149{
150 public:
151 QByteArray name;
152 QByteArray parameter;
153};
154
155class DatePrivate : public Generics::StructuredPrivate
156{
157 public:
158 KDateTime dateTime;
159};
160
161class NewsgroupsPrivate : public Generics::StructuredPrivate
162{
163 public:
164 QList<QByteArray> groups;
165};
166
167class LinesPrivate : public Generics::StructuredPrivate
168{
169 public:
170 int lines;
171};
172
173kmime_mk_empty_private( ContentID, Generics::SingleIdent )
174}
175
176}
177
178#undef kmime_mk_empty_private
179
180//@endcond
181
182#endif
183