KMIME Library
kmime_headers_p.h
00001 /* 00002 Copyright (c) 2007 Volker Krause <vkrause@kde.org> 00003 00004 This library is free software; you can redistribute it and/or modify it 00005 under the terms of the GNU Library General Public License as published by 00006 the Free Software Foundation; either version 2 of the License, or (at your 00007 option) any later version. 00008 00009 This library is distributed in the hope that it will be useful, but WITHOUT 00010 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00011 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00012 License for more details. 00013 00014 You should have received a copy of the GNU Library General Public License 00015 along with this library; see the file COPYING.LIB. If not, write to the 00016 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 00017 02110-1301, USA. 00018 */ 00019 00020 #ifndef KMIME_HEADERS_P_H 00021 #define KMIME_HEADERS_P_H 00022 00023 //@cond PRIVATE 00024 00025 #define kmime_mk_empty_private( subclass, base ) \ 00026 class subclass##Private : public base##Private {}; 00027 00028 namespace KMime { 00029 00030 namespace Headers { 00031 00032 class BasePrivate 00033 { 00034 public: 00035 BasePrivate() : parent( 0 ) {} 00036 00037 virtual ~BasePrivate() {} 00038 00039 KMime::Content *parent; 00040 QByteArray encCS; 00041 }; 00042 00043 namespace Generics { 00044 00045 class UnstructuredPrivate : public BasePrivate 00046 { 00047 public: 00048 QString decoded; 00049 }; 00050 00051 kmime_mk_empty_private( Structured, Base ) 00052 kmime_mk_empty_private( Address, Structured ) 00053 00054 class MailboxListPrivate : public AddressPrivate 00055 { 00056 public: 00057 QList<Types::Mailbox> mailboxList; 00058 }; 00059 00060 kmime_mk_empty_private( SingleMailbox, MailboxList ) 00061 00062 class AddressListPrivate : public AddressPrivate 00063 { 00064 public: 00065 QList<Types::Address> addressList; 00066 }; 00067 00068 class IdentPrivate : public AddressPrivate 00069 { 00070 public: 00071 QList<Types::AddrSpec> msgIdList; 00072 mutable QByteArray cachedIdentifier; 00073 }; 00074 00075 kmime_mk_empty_private( SingleIdent, Ident ) 00076 00077 class TokenPrivate : public StructuredPrivate 00078 { 00079 public: 00080 QByteArray token; 00081 }; 00082 00083 class PhraseListPrivate : public StructuredPrivate 00084 { 00085 public: 00086 QStringList phraseList; 00087 }; 00088 00089 class DotAtomPrivate : public StructuredPrivate 00090 { 00091 public: 00092 QString dotAtom; 00093 }; 00094 00095 class ParametrizedPrivate : public StructuredPrivate 00096 { 00097 public: 00098 QMap<QString,QString> parameterHash; 00099 }; 00100 00101 } // namespace Generics 00102 00103 class ReturnPathPrivate : public Generics::AddressPrivate 00104 { 00105 public: 00106 Types::Mailbox mailbox; 00107 }; 00108 00109 class MailCopiesToPrivate : public Generics::AddressListPrivate 00110 { 00111 public: 00112 bool alwaysCopy; 00113 bool neverCopy; 00114 }; 00115 00116 class ContentTransferEncodingPrivate : public Generics::TokenPrivate 00117 { 00118 public: 00119 contentEncoding cte; 00120 bool decoded; 00121 }; 00122 00123 class ContentTypePrivate : public Generics::ParametrizedPrivate 00124 { 00125 public: 00126 contentCategory category; 00127 QByteArray mimeType; 00128 QByteArray mimeSubType; 00129 }; 00130 00131 class ContentDispositionPrivate : public Generics::ParametrizedPrivate 00132 { 00133 public: 00134 contentDisposition disposition; 00135 }; 00136 00137 class GenericPrivate : public Generics::UnstructuredPrivate 00138 { 00139 public: 00140 GenericPrivate() : type( 0 ) {} 00141 ~GenericPrivate() 00142 { 00143 delete[] type; 00144 } 00145 00146 char *type; 00147 }; 00148 00149 class ControlPrivate : public Generics::StructuredPrivate 00150 { 00151 public: 00152 QByteArray name; 00153 QByteArray parameter; 00154 }; 00155 00156 class DatePrivate : public Generics::StructuredPrivate 00157 { 00158 public: 00159 KDateTime dateTime; 00160 }; 00161 00162 class NewsgroupsPrivate : public Generics::StructuredPrivate 00163 { 00164 public: 00165 QList<QByteArray> groups; 00166 }; 00167 00168 class LinesPrivate : public Generics::StructuredPrivate 00169 { 00170 public: 00171 int lines; 00172 }; 00173 00174 kmime_mk_empty_private( ContentID, Generics::SingleIdent ) 00175 } 00176 00177 } 00178 00179 #undef kmime_mk_empty_private 00180 00181 //@endcond 00182 00183 #endif