Go to the documentation of this file.
29#include "kmime_export.h"
30#include "headerparsing.h"
73#define kmime_mk_trivial_ctor( subclass ) \
78#define kmime_mk_dptr_ctor( subclass ) \
80 explicit subclass( subclass##Private *d );
82#define kmime_mk_trivial_ctor_with_name( subclass ) \
83 kmime_mk_trivial_ctor( subclass ) \
84 [[nodiscard]] const char *type() const override; \
85 [[nodiscard]] static const char *staticType();
130 [[nodiscard]]
QByteArray rfc2047Charset()
const;
143 [[deprecated(
"call setRFC2047Charset for the second argument if different from UTF-8, otherwise remove second argument")]]
146 setRFC2047Charset(b);
147 fromUnicodeString(s);
162 [[nodiscard]]
virtual bool isEmpty()
const = 0;
167 [[nodiscard]]
virtual const char *type()
const;
182 kmime_mk_dptr_ctor(
Base)
186 Q_DECLARE_PRIVATE(
Base)
199class UnstructuredPrivate;
224 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
226 void fromUnicodeString(
const QString &s)
override;
227 using Base::fromUnicodeString;
228 [[nodiscard]]
QString asUnicodeString()
const override;
230 [[nodiscard]]
bool isEmpty()
const override;
236class StructuredPrivate;
275 [[nodiscard]]
QString asUnicodeString()
const override;
276 void fromUnicodeString(
const QString &s)
override;
277 using Base::fromUnicodeString;
288 virtual bool parse(
const char *&scursor,
const char *
const send,
289 bool isCRLF =
false) = 0;
299class MailboxListPrivate;
314 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
315 void fromUnicodeString(
const QString &s)
override;
316 using Base::fromUnicodeString;
317 [[nodiscard]]
QString asUnicodeString()
const override;
319 [[nodiscard]]
bool isEmpty()
const override;
353 [[nodiscard]]
QString displayString()
const;
367 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
373class SingleMailboxPrivate;
385 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
386 void fromUnicodeString(
const QString &s)
override;
387 using Base::fromUnicodeString;
388 [[nodiscard]]
QString asUnicodeString()
const override;
389 [[nodiscard]]
bool isEmpty()
const override;
404 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
410class AddressListPrivate;
430 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
431 void fromUnicodeString(
const QString &s)
override;
432 using Base::fromUnicodeString;
433 [[nodiscard]]
QString asUnicodeString()
const override;
435 [[nodiscard]]
bool isEmpty()
const override;
467 [[nodiscard]]
QString displayString()
const;
481 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
497 kmime_mk_trivial_ctor(
Ident)
498 kmime_mk_dptr_ctor(
Ident)
501 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
502 [[nodiscard]]
bool isEmpty()
const override;
507 void fromIdent(
const Ident* ident);
524 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
527 Q_DECLARE_PRIVATE(
Ident)
530class SingleIdentPrivate;
544 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
545 [[nodiscard]]
bool isEmpty()
const override;
560 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
574 kmime_mk_trivial_ctor(
Token)
575 kmime_mk_dptr_ctor(
Token)
578 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
579 [[nodiscard]]
bool isEmpty()
const override;
592 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
595 Q_DECLARE_PRIVATE(
Token)
598class PhraseListPrivate;
609 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
610 [[nodiscard]]
QString asUnicodeString()
const override;
611 [[nodiscard]]
bool isEmpty()
const override;
619 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
636 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
637 [[nodiscard]]
QString asUnicodeString()
const override;
638 [[nodiscard]]
bool isEmpty()
const override;
641 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
647class ParametrizedPrivate;
659 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
661 [[nodiscard]]
bool isEmpty()
const override;
668 [[deprecated(
"use QByteArrayView as argument")]] [[nodiscard]]
inline QString parameter(
const QString &key)
const
672 [[deprecated(
"use QByteArrayView as argument")]] [[nodiscard]]
inline QString parameter(
QLatin1StringView key)
const
677 template <std::
size_t N>
678 [[nodiscard]]
inline QString parameter(
const char (&key)[N])
const
689 [[deprecated(
"use QByteArrayView as argument")]] [[nodiscard]]
inline bool hasParameter(
const QString &key)
const
693 [[deprecated(
"use QByteArrayView as argument")]] [[nodiscard]]
inline bool hasParameter(
QLatin1StringView key)
const
698 template <std::
size_t N>
699 [[nodiscard]]
inline bool hasParameter(
const char (&key)[N])
const {
709 [[deprecated(
"use a QByteArray[Literal] key")]]
inline void setParameter(
const QString &key,
const QString &value)
711 return setParameter(key.toUtf8(), value);
715 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
729class ReturnPathPrivate;
742 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
743 [[nodiscard]]
bool isEmpty()
const override;
746 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
762 kmime_mk_trivial_ctor_with_name(
From)
772 kmime_mk_trivial_ctor_with_name(
Sender)
782 kmime_mk_trivial_ctor_with_name(
To)
792 kmime_mk_trivial_ctor_with_name(
Cc)
802 kmime_mk_trivial_ctor_with_name(
Bcc)
812 kmime_mk_trivial_ctor_with_name(
ReplyTo)
815class MailCopiesToPrivate;
828 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
829 [[nodiscard]]
QString asUnicodeString()
const override;
831 [[nodiscard]]
bool isEmpty()
const override;
836 [[nodiscard]]
bool alwaysCopy()
const;
841 void setAlwaysCopy();
846 [[nodiscard]]
bool neverCopy()
const;
854 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
860class ContentTransferEncodingPrivate;
873 [[nodiscard]]
bool isEmpty()
const override;
874 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
887 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
900 kmime_mk_trivial_ctor_with_name(
Keywords)
925 kmime_mk_trivial_ctor_with_name(
MessageID)
935class ContentIDPrivate;
943 kmime_mk_trivial_ctor_with_name(
ContentID)
948 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
968 kmime_mk_trivial_ctor_with_name(
InReplyTo)
981class ContentTypePrivate;
994 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
995 [[nodiscard]]
bool isEmpty()
const override;
1017 void setMimeType(
const QByteArray &mimeType);
1022 [[nodiscard]]
bool isMediatype(
const char *mediatype)
const;
1027 [[nodiscard]]
bool isSubtype(
const char *subtype)
const;
1032 [[nodiscard]]
bool isMimeType(
const char *mimeType)
const;
1037 [[nodiscard]]
bool isText()
const;
1042 [[nodiscard]]
bool isPlainText()
const;
1047 [[nodiscard]]
bool isHTMLText()
const;
1052 [[nodiscard]]
bool isImage()
const;
1057 [[nodiscard]]
bool isMultipart()
const;
1063 [[nodiscard]]
bool isPartial()
const;
1088 [[nodiscard]]
QString name()
const;
1093 void setName(
const QString &s);
1094 [[deprecated(
"call setRFC2047Charset for the second argument if different from UTF-8, otherwise remove second argument")]]
1097 setRFC2047Charset(cs);
1115 [[nodiscard]]
int partialNumber()
const;
1121 [[nodiscard]]
int partialCount()
const;
1128 void setPartialParams(
int total,
int number);
1131 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
1137class ContentDispositionPrivate;
1150 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
1151 [[nodiscard]]
bool isEmpty()
const override;
1169 [[nodiscard]]
QString filename()
const;
1177 void setFilename(
const QString &filename);
1180 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
1192class GenericPrivate;
1203 Generic(
const char *t, qsizetype len = -1);
1206 [[nodiscard]]
bool isEmpty()
const override;
1208 [[nodiscard]]
const char *type()
const override;
1210 void setType(
const char *type, qsizetype len = -1);
1224 kmime_mk_trivial_ctor_with_name(
Subject)
1253class ControlPrivate;
1263 kmime_mk_trivial_ctor_with_name(
Control)
1266 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
1267 [[nodiscard]]
bool isEmpty()
const override;
1272 [[nodiscard]]
QByteArray controlType()
const;
1283 [[nodiscard]]
bool isCancel()
const;
1292 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
1308 kmime_mk_trivial_ctor_with_name(
Date)
1311 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
1312 [[nodiscard]]
bool isEmpty()
const override;
1317 [[nodiscard]]
QDateTime dateTime()
const;
1325 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
1328 Q_DECLARE_PRIVATE(
Date)
1331class NewsgroupsPrivate;
1344 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
1345 void fromUnicodeString(
const QString &s)
override;
1346 using Base::fromUnicodeString;
1347 [[nodiscard]]
QString asUnicodeString()
const override;
1348 [[nodiscard]]
bool isEmpty()
const override;
1364 [[nodiscard]]
bool isCrossposted()
const;
1367 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
1395 kmime_mk_trivial_ctor_with_name(
Lines)
1398 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
1399 [[nodiscard]]
QString asUnicodeString()
const override;
1400 [[nodiscard]]
bool isEmpty()
const override;
1405 [[nodiscard]]
int numberOfLines()
const;
1410 void setNumberOfLines(
int lines);
1413 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
1416 Q_DECLARE_PRIVATE(
Lines)
1424 kmime_mk_trivial_ctor_with_name(
UserAgent)
1436#undef kmime_mk_trivial_ctor
1437#undef kmime_mk_dptr_ctor
1438#undef kmime_mk_trivial_ctor_with_name
Represents an (email address, display name) pair according RFC 2822, section 3.4.
QByteArray toUtf8() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:05:57 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.