KMime

kmime_headers.h
Go to the documentation of this file.
1 /* -*- c++ -*-
2  kmime_headers.h
3 
4  KMime, the KDE Internet mail/usenet news message library.
5  Copyright (c) 2001-2002 the KMime authors.
6  See file AUTHORS for details
7  Copyright (c) 2006 Volker Krause <vkrause[email protected]>
8 
9  This library is free software; you can redistribute it and/or
10  modify it under the terms of the GNU Library General Public
11  License as published by the Free Software Foundation; either
12  version 2 of the License, or (at your option) any later version.
13 
14  This library is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  Library General Public License for more details.
18 
19  You should have received a copy of the GNU Library General Public License
20  along with this library; see the file COPYING.LIB. If not, write to
21  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22  Boston, MA 02110-1301, USA.
23 */
40 #ifndef __KMIME_HEADERS_H__
41 #define __KMIME_HEADERS_H__
42 
43 #include "kmime_export.h"
44 #include "kmime_header_parsing.h"
45 
46 #include <QString>
47 #include <QStringList>
48 #include <QDateTime>
49 #include <QMap>
50 #include <QVector>
51 #include <QByteArray>
52 #include <QMetaType>
53 
54 namespace KMime
55 {
56 
57 class Content;
58 
59 namespace Headers
60 {
61 
62 class BasePrivate;
63 
64 enum contentCategory {
65  CCsingle,
66  CCcontainer,
67  CCmixedPart,
68  CCalternativePart
69 };
70 
81 };
82 
91 };
92 
93 //@cond PRIVATE
94 // internal macro to generate default constructors
95 #define kmime_mk_trivial_ctor( subclass ) \
96  public: \
97  subclass(); \
98  ~subclass();
99 
100 #define kmime_mk_dptr_ctor( subclass ) \
101  protected: \
102  explicit subclass( subclass##Private *d );
103 
104 #define kmime_mk_trivial_ctor_with_name( subclass ) \
105  kmime_mk_trivial_ctor( subclass ) \
106  const char *type() const override; \
107  static const char *staticType();
108 //@endcond
109 
110 //
111 //
112 // HEADER'S BASE CLASS. DEFINES THE COMMON INTERFACE
113 //
114 //
115 
118 class KMIME_EXPORT Base
119 {
120 public:
125 
129  Base();
130 
134  virtual ~Base();
135 
140  virtual void from7BitString(const char *s, size_t len);
141  virtual void from7BitString(const QByteArray &s) = 0;
142 
147  Q_REQUIRED_RESULT virtual QByteArray as7BitString(bool withHeaderType = true) const = 0;
148 
152  Q_REQUIRED_RESULT QByteArray rfc2047Charset() const;
153 
158  void setRFC2047Charset(const QByteArray &cs);
159 
165  virtual void fromUnicodeString(const QString &s, const QByteArray &b) = 0;
166 
174  virtual QString asUnicodeString() const = 0;
175 
179  virtual void clear() = 0;
180 
184  virtual bool isEmpty() const = 0;
185 
189  virtual const char *type() const;
190 
194  Q_REQUIRED_RESULT bool is(const char *t) const;
195 
199  Q_REQUIRED_RESULT bool isMimeHeader() const;
200 
201 protected:
205  QByteArray typeIntro() const;
206 
207  //@cond PRIVATE
208  BasePrivate *d_ptr;
209  kmime_mk_dptr_ctor(Base)
210  //@endcond
211 
212 private:
213  Q_DECLARE_PRIVATE(Base)
214  Q_DISABLE_COPY(Base)
215 };
216 
217 //
218 //
219 // GENERIC BASE CLASSES FOR DIFFERENT TYPES OF FIELDS
220 //
221 //
222 
223 namespace Generics
224 {
225 
226 class UnstructuredPrivate;
227 
238 // known issues:
239 // - uses old decodeRFC2047String function, instead of our own...
240 
241 class KMIME_EXPORT Unstructured : public Base
242 {
243  //@cond PRIVATE
244  kmime_mk_dptr_ctor(Unstructured)
245  //@endcond
246 public:
247  Unstructured();
248  ~Unstructured();
249 
250  using Base::from7BitString;
251  void from7BitString(const QByteArray &s) override;
252  QByteArray as7BitString(bool withHeaderType = true) const override;
253 
254  void fromUnicodeString(const QString &s, const QByteArray &b) override;
255  QString asUnicodeString() const override;
256 
257  void clear() override;
258 
259  bool isEmpty() const override;
260 
261 private:
262  Q_DECLARE_PRIVATE(Unstructured)
263 };
264 
265 class StructuredPrivate;
266 
297 class KMIME_EXPORT Structured : public Base
298 {
299 public:
300  Structured();
301  ~Structured();
302 
303  void from7BitString(const char *s, size_t len) override;
304  void from7BitString(const QByteArray &s) override;
305  QString asUnicodeString() const override;
306  void fromUnicodeString(const QString &s, const QByteArray &b) override;
307 
308 protected:
317  virtual bool parse(const char *&scursor, const char *const send,
318  bool isCRLF = false) = 0;
319 
320  //@cond PRIVATE
321  kmime_mk_dptr_ctor(Structured)
322  //@endcond
323 
324 private:
325  Q_DECLARE_PRIVATE(Structured)
326 };
327 
328 class AddressPrivate;
329 
333 class KMIME_EXPORT Address : public Structured
334 {
335 public:
336  Address();
337  ~Address();
338 protected:
339  //@cond PRIVATE
340  kmime_mk_dptr_ctor(Address)
341  //@endcond
342 private:
343  Q_DECLARE_PRIVATE(Address)
344 };
345 
346 class MailboxListPrivate;
347 
354 class KMIME_EXPORT MailboxList : public Address
355 {
356  //@cond PRIVATE
357  kmime_mk_trivial_ctor(MailboxList)
358  kmime_mk_dptr_ctor(MailboxList)
359  //@endcond
360 public:
361  QByteArray as7BitString(bool withHeaderType = true) const override;
362  void fromUnicodeString(const QString &s, const QByteArray &b) override;
363  QString asUnicodeString() const override;
364 
365  void clear() override;
366  bool isEmpty() const override;
367 
373  void addAddress(const Types::Mailbox &mbox);
374 
380  void addAddress(const QByteArray &address,
381  const QString &displayName = QString());
382 
386  QVector<QByteArray> addresses() const;
387 
393  QStringList displayNames() const;
394 
400  QString displayString() const;
401 
405  Types::Mailbox::List mailboxes() const;
406 
407 protected:
408  bool parse(const char *&scursor, const char *const send, bool isCRLF = false) override;
409 
410 private:
411  Q_DECLARE_PRIVATE(MailboxList)
412 };
413 
414 class SingleMailboxPrivate;
415 
420 class KMIME_EXPORT SingleMailbox : public MailboxList
421 {
422  //@cond PRIVATE
423  kmime_mk_trivial_ctor(SingleMailbox)
424  //@endcond
425 protected:
426  bool parse(const char *&scursor, const char *const send, bool isCRLF = false) override;
427 private:
428  Q_DECLARE_PRIVATE(SingleMailbox)
429 };
430 
431 class AddressListPrivate;
432 
444 class KMIME_EXPORT AddressList : public Address
445 {
446  //@cond PRIVATE
447  kmime_mk_trivial_ctor(AddressList)
448  kmime_mk_dptr_ctor(AddressList)
449  //@endcond
450 public:
451  QByteArray as7BitString(bool withHeaderType = true) const override;
452  void fromUnicodeString(const QString &s, const QByteArray &b) override;
453  QString asUnicodeString() const override;
454 
455  void clear() override;
456  bool isEmpty() const override;
457 
463  void addAddress(const Types::Mailbox &mbox);
464 
470  void addAddress(const QByteArray &address, const QString &displayName = QString());
471 
475  QVector<QByteArray> addresses() const;
476 
481  QStringList displayNames() const;
482 
488  QString displayString() const;
489 
493  Types::Mailbox::List mailboxes() const;
494 
495 protected:
496  bool parse(const char *&scursor, const char *const send, bool isCRLF = false) override;
497 
498 private:
499  Q_DECLARE_PRIVATE(AddressList)
500 };
501 
502 class IdentPrivate;
503 
509 class KMIME_EXPORT Ident : public Address
510 {
511  //@cond PRIVATE
512  kmime_mk_trivial_ctor(Ident)
513  kmime_mk_dptr_ctor(Ident)
514  //@endcond
515 public:
516  QByteArray as7BitString(bool withHeaderType = true) const override;
517  void clear() override;
518  bool isEmpty() const override;
519 
523  void fromIdent(const Ident* ident);
524 
531  QVector<QByteArray> identifiers() const;
532 
537  void appendIdentifier(const QByteArray &id);
538 
539 protected:
540  bool parse(const char *&scursor, const char *const send, bool isCRLF = false) override;
541 
542 private:
543  Q_DECLARE_PRIVATE(Ident)
544 };
545 
546 class SingleIdentPrivate;
547 
553 class KMIME_EXPORT SingleIdent : public Ident
554 {
555  //@cond PRIVATE
556  kmime_mk_trivial_ctor(SingleIdent)
557  kmime_mk_dptr_ctor(SingleIdent)
558  //@endcond
559 public:
564  QByteArray identifier() const;
565 
570  void setIdentifier(const QByteArray &id);
571 
572 protected:
573  bool parse(const char *&scursor, const char *const send, bool isCRLF = false) override;
574 
575 private:
576  Q_DECLARE_PRIVATE(SingleIdent)
577 };
578 
579 class TokenPrivate;
580 
584 class KMIME_EXPORT Token : public Structured
585 {
586  //@cond PRIVATE
587  kmime_mk_trivial_ctor(Token)
588  kmime_mk_dptr_ctor(Token)
589  //@endcond
590 public:
591  QByteArray as7BitString(bool withHeaderType = true) const override;
592  void clear() override;
593  bool isEmpty() const override;
594 
598  QByteArray token() const;
599 
603  void setToken(const QByteArray &t);
604 
605 protected:
606  bool parse(const char *&scursor, const char *const send, bool isCRLF = false) override;
607 
608 private:
609  Q_DECLARE_PRIVATE(Token)
610 };
611 
612 class PhraseListPrivate;
613 
617 class KMIME_EXPORT PhraseList : public Structured
618 {
619  //@cond PRIVATE
620  kmime_mk_trivial_ctor(PhraseList)
621  //@endcond
622 public:
623  QByteArray as7BitString(bool withHeaderType = true) const override;
624  QString asUnicodeString() const override;
625  void clear() override;
626  bool isEmpty() const override;
627 
631  QStringList phrases() const;
632 
633 protected:
634  bool parse(const char *&scursor, const char *const send, bool isCRLF = false) override;
635 
636 private:
637  Q_DECLARE_PRIVATE(PhraseList)
638 };
639 
640 class DotAtomPrivate;
641 
645 class KMIME_EXPORT DotAtom : public Structured
646 {
647  //@cond PRIVATE
648  kmime_mk_trivial_ctor(DotAtom)
649  //@endcond
650 public:
651  QByteArray as7BitString(bool withHeaderType = true) const override;
652  QString asUnicodeString() const override;
653  void clear() override;
654  bool isEmpty() const override;
655 
656 protected:
657  bool parse(const char *&scursor, const char *const send, bool isCRLF = false) override;
658 
659 private:
660  Q_DECLARE_PRIVATE(DotAtom)
661 };
662 
663 class ParametrizedPrivate;
664 
668 class KMIME_EXPORT Parametrized : public Structured
669 {
670  //@cond PRIVATE
671  kmime_mk_trivial_ctor(Parametrized)
672  kmime_mk_dptr_ctor(Parametrized)
673  //@endcond
674 public:
675  QByteArray as7BitString(bool withHeaderType = true) const override;
676 
677  bool isEmpty() const override;
678  void clear() override;
679 
680  //FIXME: Shouldn't the parameter keys be QByteArray and not QStrings? Only the values can be
681  // non-ascii!
682 
687  QString parameter(const QString &key) const;
688 
694  bool hasParameter(const QString &key) const;
695 
701  void setParameter(const QString &key, const QString &value);
702 
703 protected:
704  bool parse(const char *&scursor, const char *const send, bool isCRLF = false) override;
705 
706 private:
707  Q_DECLARE_PRIVATE(Parametrized)
708 };
709 
710 } // namespace Generics
711 
712 //
713 //
714 // INCOMPATIBLE, GSTRUCTURED-BASED FIELDS:
715 //
716 //
717 
718 class ReturnPathPrivate;
719 
725 class KMIME_EXPORT ReturnPath : public Generics::Address
726 {
727  //@cond PRIVATE
728  kmime_mk_trivial_ctor_with_name(ReturnPath)
729  //@endcond
730 public:
731  QByteArray as7BitString(bool withHeaderType = true) const override;
732  void clear() override;
733  bool isEmpty() const override;
734 
735 protected:
736  bool parse(const char *&scursor, const char *const send, bool isCRLF = false) override;
737 
738 private:
739  Q_DECLARE_PRIVATE(ReturnPath)
740 };
741 
742 // Address et al.:
743 
744 // rfc(2)822 headers:
750 class KMIME_EXPORT From : public Generics::MailboxList
751 {
752  kmime_mk_trivial_ctor_with_name(From)
753 };
754 
760 class KMIME_EXPORT Sender : public Generics::SingleMailbox
761 {
762  kmime_mk_trivial_ctor_with_name(Sender)
763 };
764 
770 class KMIME_EXPORT To : public Generics::AddressList
771 {
772  kmime_mk_trivial_ctor_with_name(To)
773 };
774 
780 class KMIME_EXPORT Cc : public Generics::AddressList
781 {
782  kmime_mk_trivial_ctor_with_name(Cc)
783 };
784 
790 class KMIME_EXPORT Bcc : public Generics::AddressList
791 {
792  kmime_mk_trivial_ctor_with_name(Bcc)
793 };
794 
800 class KMIME_EXPORT ReplyTo : public Generics::AddressList
801 {
802  kmime_mk_trivial_ctor_with_name(ReplyTo)
803 };
804 
805 class MailCopiesToPrivate;
806 
812 class KMIME_EXPORT MailCopiesTo : public Generics::AddressList
813 {
814  //@cond PRIVATE
815  kmime_mk_trivial_ctor_with_name(MailCopiesTo)
816  //@endcond
817 public:
818  QByteArray as7BitString(bool withHeaderType = true) const override;
819  QString asUnicodeString() const override;
820 
821  void clear() override;
822  bool isEmpty() const override;
823 
827  bool alwaysCopy() const;
828 
832  void setAlwaysCopy();
833 
837  bool neverCopy() const;
838 
842  void setNeverCopy();
843 
844 protected:
845  bool parse(const char *&scursor, const char *const send, bool isCRLF = false) override;
846 
847 private:
848  Q_DECLARE_PRIVATE(MailCopiesTo)
849 };
850 
851 class ContentTransferEncodingPrivate;
852 
858 class KMIME_EXPORT ContentTransferEncoding : public Generics::Token
859 {
860  //@cond PRIVATE
861  kmime_mk_trivial_ctor_with_name(ContentTransferEncoding)
862  //@endcond
863 public:
864  void clear() override;
865 
869  contentEncoding encoding() const;
870 
874  void setEncoding(contentEncoding e);
875 
879  bool isDecoded() const;
880 
887  void setDecoded(bool isDecoded = true);
888 
893  bool needToEncode() const;
894 
895 protected:
896  bool parse(const char *&scursor, const char *const send, bool isCRLF = false) override;
897 
898 private:
899  Q_DECLARE_PRIVATE(ContentTransferEncoding)
900 };
901 
907 class KMIME_EXPORT Keywords : public Generics::PhraseList
908 {
909  kmime_mk_trivial_ctor_with_name(Keywords)
910 };
911 
912 // DotAtom:
913 
919 class KMIME_EXPORT MIMEVersion : public Generics::DotAtom
920 {
921  kmime_mk_trivial_ctor_with_name(MIMEVersion)
922 };
923 
924 // Ident:
925 
931 class KMIME_EXPORT MessageID : public Generics::SingleIdent
932 {
933  //@cond PRIVATE
934  kmime_mk_trivial_ctor_with_name(MessageID)
935  //@endcond
936 public:
941  void generate(const QByteArray &fqdn);
942 };
943 
944 class ContentIDPrivate;
945 
949 class KMIME_EXPORT ContentID : public Generics::SingleIdent
950 {
951  //@cond PRIVATE
952  kmime_mk_trivial_ctor_with_name(ContentID)
953  kmime_mk_dptr_ctor(ContentID)
954  //@endcond
955 
956 protected:
957  bool parse(const char *&scursor, const char *const send, bool isCRLF = false) override;
958 private:
959  Q_DECLARE_PRIVATE(ContentID)
960 };
961 
965 class KMIME_EXPORT Supersedes : public Generics::SingleIdent
966 {
967  kmime_mk_trivial_ctor_with_name(Supersedes)
968 };
969 
975 class KMIME_EXPORT InReplyTo : public Generics::Ident
976 {
977  kmime_mk_trivial_ctor_with_name(InReplyTo)
978 };
979 
985 class KMIME_EXPORT References : public Generics::Ident
986 {
987  kmime_mk_trivial_ctor_with_name(References)
988 };
989 
990 class ContentTypePrivate;
991 
997 class KMIME_EXPORT ContentType : public Generics::Parametrized
998 {
999  //@cond PRIVATE
1000  kmime_mk_trivial_ctor_with_name(ContentType)
1001  //@endcond
1002 public:
1003  QByteArray as7BitString(bool withHeaderType = true) const override;
1004  void clear() override;
1005  bool isEmpty() const override;
1006 
1010  QByteArray mimeType() const;
1011 
1016  QByteArray mediaType() const;
1017 
1021  QByteArray subType() const;
1022 
1027  void setMimeType(const QByteArray &mimeType);
1028 
1032  bool isMediatype(const char *mediatype) const;
1033 
1037  bool isSubtype(const char *subtype) const;
1038 
1042  bool isMimeType(const char *mimeType) const;
1043 
1047  bool isText() const;
1048 
1052  bool isPlainText() const;
1053 
1057  bool isHTMLText() const;
1058 
1062  bool isImage() const;
1063 
1067  bool isMultipart() const;
1068 
1073  bool isPartial() const;
1074 
1078  QByteArray charset() const;
1079 
1083  void setCharset(const QByteArray &s);
1084 
1088  QByteArray boundary() const;
1089 
1093  void setBoundary(const QByteArray &s);
1094 
1098  QString name() const;
1099 
1103  void setName(const QString &s, const QByteArray &cs);
1104 
1108  QByteArray id() const;
1109 
1113  void setId(const QByteArray &s);
1114 
1119  int partialNumber() const;
1120 
1125  int partialCount() const;
1126 
1132  void setPartialParams(int total, int number);
1133 
1134  // TODO: document
1135  contentCategory category() const;
1136 
1137  void setCategory(contentCategory c);
1138 
1139 protected:
1140  bool parse(const char *&scursor, const char *const send, bool isCRLF = false) override;
1141 
1142 private:
1143  Q_DECLARE_PRIVATE(ContentType)
1144 };
1145 
1146 class ContentDispositionPrivate;
1147 
1153 class KMIME_EXPORT ContentDisposition : public Generics::Parametrized
1154 {
1155  //@cond PRIVATE
1156  kmime_mk_trivial_ctor_with_name(ContentDisposition)
1157  //@endcond
1158 public:
1159  QByteArray as7BitString(bool withHeaderType = true) const override;
1160  bool isEmpty() const override;
1161  void clear() override;
1162 
1166  contentDisposition disposition() const;
1167 
1172  void setDisposition(contentDisposition disp);
1173 
1179  QString filename() const;
1180 
1187  void setFilename(const QString &filename);
1188 
1189 protected:
1190  bool parse(const char *&scursor, const char *const send, bool isCRLF = false) override;
1191 
1192 private:
1193  Q_DECLARE_PRIVATE(ContentDisposition)
1194 };
1195 
1196 //
1197 //
1198 // COMPATIBLE GUNSTRUCTURED-BASED FIELDS:
1199 //
1200 //
1201 
1202 class GenericPrivate;
1203 
1209 class KMIME_EXPORT Generic : public Generics::Unstructured
1210 {
1211 public:
1212  Generic();
1213  Generic(const char *t, int len = -1);
1214  ~Generic();
1215 
1216  void clear() override;
1217 
1218  bool isEmpty() const override;
1219 
1220  const char *type() const override;
1221 
1222  void setType(const char *type, int len = -1);
1223 
1224 private:
1225  Q_DECLARE_PRIVATE(Generic)
1226 };
1227 
1233 class KMIME_EXPORT Subject : public Generics::Unstructured
1234 {
1235  //@cond PRIVATE
1236  kmime_mk_trivial_ctor_with_name(Subject)
1237  //@endcond
1238 };
1239 
1243 class KMIME_EXPORT Organization : public Generics::Unstructured
1244 {
1245  kmime_mk_trivial_ctor_with_name(Organization)
1246 };
1247 
1251 class KMIME_EXPORT ContentDescription : public Generics::Unstructured
1252 {
1253  kmime_mk_trivial_ctor_with_name(ContentDescription)
1254 };
1255 
1260 class KMIME_EXPORT ContentLocation : public Generics::Unstructured
1261 {
1262  kmime_mk_trivial_ctor_with_name(ContentLocation)
1263 };
1264 
1265 class ControlPrivate;
1266 
1272 class KMIME_EXPORT Control : public Generics::Structured
1273 {
1274  //@cond PRIVATE
1275  kmime_mk_trivial_ctor_with_name(Control)
1276  //@endcond
1277 public:
1278  QByteArray as7BitString(bool withHeaderType = true) const override;
1279  void clear() override;
1280  bool isEmpty() const override;
1281 
1285  QByteArray controlType() const;
1286 
1290  QByteArray parameter() const;
1291 
1296  bool isCancel() const;
1297 
1302  void setCancel(const QByteArray &msgid);
1303 
1304 protected:
1305  bool parse(const char *&scursor, const char *const send, bool isCRLF = false) override;
1306 
1307 private:
1308  Q_DECLARE_PRIVATE(Control)
1309 };
1310 
1311 class DatePrivate;
1312 
1318 class KMIME_EXPORT Date : public Generics::Structured
1319 {
1320  //@cond PRIVATE
1321  kmime_mk_trivial_ctor_with_name(Date)
1322  //@endcond
1323 public:
1324  QByteArray as7BitString(bool withHeaderType = true) const override;
1325  void clear() override;
1326  bool isEmpty() const override;
1327 
1331  QDateTime dateTime() const;
1332 
1336  void setDateTime(const QDateTime &dt);
1337 
1341  int ageInDays() const;
1342 
1343 protected:
1344  bool parse(const char *&scursor, const char *const send, bool isCRLF = false) override;
1345 
1346 private:
1347  Q_DECLARE_PRIVATE(Date)
1348 };
1349 
1350 class NewsgroupsPrivate;
1351 
1357 class KMIME_EXPORT Newsgroups : public Generics::Structured
1358 {
1359  //@cond PRIVATE
1360  kmime_mk_trivial_ctor_with_name(Newsgroups)
1361  //@endcond
1362 public:
1363  QByteArray as7BitString(bool withHeaderType = true) const override;
1364  void fromUnicodeString(const QString &s, const QByteArray &b) override;
1365  QString asUnicodeString() const override;
1366  void clear() override;
1367  bool isEmpty() const override;
1368 
1372  QVector<QByteArray> groups() const;
1373 
1377  void setGroups(const QVector<QByteArray> &groups);
1378 
1383  bool isCrossposted() const;
1384 
1385 protected:
1386  bool parse(const char *&scursor, const char *const send, bool isCRLF = false) override;
1387 
1388 private:
1389  Q_DECLARE_PRIVATE(Newsgroups)
1390 };
1391 
1397 class KMIME_EXPORT FollowUpTo : public Newsgroups
1398 {
1399  //@cond PRIVATE
1400  kmime_mk_trivial_ctor_with_name(FollowUpTo)
1401  //@endcond
1402 };
1403 
1404 class LinesPrivate;
1405 
1411 class KMIME_EXPORT Lines : public Generics::Structured
1412 {
1413  //@cond PRIVATE
1414  kmime_mk_trivial_ctor_with_name(Lines)
1415  //@endcond
1416 public:
1417  QByteArray as7BitString(bool withHeaderType = true) const override;
1418  QString asUnicodeString() const override;
1419  void clear() override;
1420  bool isEmpty() const override;
1421 
1425  int numberOfLines() const;
1426 
1430  void setNumberOfLines(int lines);
1431 
1432 protected:
1433  bool parse(const char *&scursor, const char *const send, bool isCRLF = false) override;
1434 
1435 private:
1436  Q_DECLARE_PRIVATE(Lines)
1437 };
1438 
1442 class KMIME_EXPORT UserAgent : public Generics::Unstructured
1443 {
1444  kmime_mk_trivial_ctor_with_name(UserAgent)
1445 };
1446 
1449 KMIME_EXPORT Base *createHeader(const QByteArray &type);
1450 
1451 } //namespace Headers
1452 
1453 } //namespace KMime
1454 
1455 // undefine code generation macros again
1456 #undef kmime_mk_trivial_ctor
1457 #undef kmime_mk_dptr_ctor
1458 #undef kmime_mk_trivial_ctor_with_name
1459 
1460 Q_DECLARE_METATYPE(KMime::Headers::To*)
1461 Q_DECLARE_METATYPE(KMime::Headers::Cc*)
1462 Q_DECLARE_METATYPE(KMime::Headers::Bcc*)
1463 
1464 #endif // __KMIME_HEADERS_H__
Base class for headers that deal with exactly one mailbox (e.g.
Represents a "Message-ID" header.
Represents a "Content-Disposition" header.
Represents a "Date" header.
Represents an (email address, display name) pair according RFC 2822, section 3.4. ...
Definition: kmime_types.h:51
Represents a "References" header.
Base class for headers that deal with (possibly multiple) addresses, but don&#39;t allow groups...
Represents a "Mail-Copies-To" header.
Represents a "Cc" header.
Represents a "To" header.
virtual void from7BitString(const char *s, size_t len)
Parses the given string.
parallel (invalid, do not use)
Definition: kmime_headers.h:90
Represents a "Followup-To" header.
Represents a "Control" header.
Base class for all address related headers.
Represents a "Content-ID" header.
Base class for headers that deal with (possibly multiple) addresses, allowing groups.
contentDisposition
Various possible values for the "Content-Disposition" header.
Definition: kmime_headers.h:86
Represents an arbitrary header, that can contain any header-field.
Represents a "MIME-Version" header.
Represents the Return-Path header field.
Default, invalid value.
Definition: kmime_headers.h:87
Base class for headers containing a parameter list such as "Content-Type".
Base class for headers containing a dot atom.
Represent a "From" header.
Baseclass of all header-classes.
Base class for headers containing a list of phrases.
Represents a "ReplyTo" header.
quoted-printable
Definition: kmime_headers.h:77
Represents a "Content-Location" header.
Represents a "Lines" header.
Represents a "Keywords" header.
Represents a "Content-Description" header.
Represents a "Newsgroups" header.
Represents a "In-Reply-To" header.
Represents a "Supersedes" header.
Represents a "Subject" header.
Base class for headers which deal with a single msg-id.
Represents a "Organization" header.
Abstract base class for unstructured header fields (e.g.
Base class for headers which deal with a list of msg-id&#39;s.
Represents a "User-Agent" header.
Represents a "Content-Transfer-Encoding" header.
Base class for structured header fields.
QVector< KMime::Headers::Base * > List
A vector of headers.
Base class for headers which deal with a single atom.
Represents a "Content-Type" header.
Base * createHeader(const QByteArray &type)
Creates a header based on.
Represents a "Bcc" header.
contentEncoding
Various possible values for the "Content-Transfer-Encoding" header.
Definition: kmime_headers.h:74
Represents a "Sender" header.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Aug 10 2020 23:16:30 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.