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;
317class MailboxListPrivate;
332 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
333 void fromUnicodeString(
const QString &s)
override;
334 using Base::fromUnicodeString;
335 [[nodiscard]]
QString asUnicodeString()
const override;
337 [[nodiscard]]
bool isEmpty()
const override;
371 [[nodiscard]]
QString displayString()
const;
385 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
391class SingleMailboxPrivate;
403 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
408class AddressListPrivate;
428 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
429 void fromUnicodeString(
const QString &s)
override;
430 using Base::fromUnicodeString;
431 [[nodiscard]]
QString asUnicodeString()
const override;
433 [[nodiscard]]
bool isEmpty()
const override;
465 [[nodiscard]]
QString displayString()
const;
479 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
495 kmime_mk_trivial_ctor(
Ident)
496 kmime_mk_dptr_ctor(
Ident)
499 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
500 [[nodiscard]]
bool isEmpty()
const override;
505 void fromIdent(
const Ident* ident);
522 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
525 Q_DECLARE_PRIVATE(
Ident)
528class SingleIdentPrivate;
555 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
569 kmime_mk_trivial_ctor(
Token)
570 kmime_mk_dptr_ctor(
Token)
573 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
574 [[nodiscard]]
bool isEmpty()
const override;
587 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
590 Q_DECLARE_PRIVATE(
Token)
593class PhraseListPrivate;
604 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
605 [[nodiscard]]
QString asUnicodeString()
const override;
606 [[nodiscard]]
bool isEmpty()
const override;
614 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
631 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
632 [[nodiscard]]
QString asUnicodeString()
const override;
633 [[nodiscard]]
bool isEmpty()
const override;
636 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
642class ParametrizedPrivate;
654 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
656 [[nodiscard]]
bool isEmpty()
const override;
663 [[deprecated(
"use QByteArrayView as argument")]] [[nodiscard]]
inline QString parameter(
const QString &key)
const
667 [[deprecated(
"use QByteArrayView as argument")]] [[nodiscard]]
inline QString parameter(
QLatin1StringView key)
const
672 template <std::
size_t N>
673 [[nodiscard]]
inline QString parameter(
const char (&key)[N])
const
684 [[deprecated(
"use QByteArrayView as argument")]] [[nodiscard]]
inline bool hasParameter(
const QString &key)
const
688 [[deprecated(
"use QByteArrayView as argument")]] [[nodiscard]]
inline bool hasParameter(
QLatin1StringView key)
const
693 template <std::
size_t N>
694 [[nodiscard]]
inline bool hasParameter(
const char (&key)[N])
const {
704 [[deprecated(
"use a QByteArray[Literal] key")]]
inline void setParameter(
const QString &key,
const QString &value)
706 return setParameter(key.toUtf8(), value);
710 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
724class ReturnPathPrivate;
737 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
738 [[nodiscard]]
bool isEmpty()
const override;
741 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
757 kmime_mk_trivial_ctor_with_name(
From)
767 kmime_mk_trivial_ctor_with_name(
Sender)
777 kmime_mk_trivial_ctor_with_name(
To)
787 kmime_mk_trivial_ctor_with_name(
Cc)
797 kmime_mk_trivial_ctor_with_name(
Bcc)
807 kmime_mk_trivial_ctor_with_name(
ReplyTo)
810class MailCopiesToPrivate;
823 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
824 [[nodiscard]]
QString asUnicodeString()
const override;
826 [[nodiscard]]
bool isEmpty()
const override;
831 [[nodiscard]]
bool alwaysCopy()
const;
836 void setAlwaysCopy();
841 [[nodiscard]]
bool neverCopy()
const;
849 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
855class ContentTransferEncodingPrivate;
868 [[nodiscard]]
bool isEmpty()
const override;
869 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
882 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
895 kmime_mk_trivial_ctor_with_name(
Keywords)
920 kmime_mk_trivial_ctor_with_name(
MessageID)
930class ContentIDPrivate;
938 kmime_mk_trivial_ctor_with_name(
ContentID)
943 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
963 kmime_mk_trivial_ctor_with_name(
InReplyTo)
976class ContentTypePrivate;
989 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
990 [[nodiscard]]
bool isEmpty()
const override;
1012 void setMimeType(
const QByteArray &mimeType);
1017 [[nodiscard]]
bool isMediatype(
const char *mediatype)
const;
1022 [[nodiscard]]
bool isSubtype(
const char *subtype)
const;
1027 [[nodiscard]]
bool isMimeType(
const char *mimeType)
const;
1032 [[nodiscard]]
bool isText()
const;
1037 [[nodiscard]]
bool isPlainText()
const;
1042 [[nodiscard]]
bool isHTMLText()
const;
1047 [[nodiscard]]
bool isImage()
const;
1052 [[nodiscard]]
bool isMultipart()
const;
1058 [[nodiscard]]
bool isPartial()
const;
1083 [[nodiscard]]
QString name()
const;
1088 void setName(
const QString &s);
1089 [[deprecated(
"call setRFC2047Charset for the second argument if different from UTF-8, otherwise remove second argument")]]
1092 setRFC2047Charset(cs);
1110 [[nodiscard]]
int partialNumber()
const;
1116 [[nodiscard]]
int partialCount()
const;
1123 void setPartialParams(
int total,
int number);
1126 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
1132class ContentDispositionPrivate;
1145 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
1146 [[nodiscard]]
bool isEmpty()
const override;
1164 [[nodiscard]]
QString filename()
const;
1172 void setFilename(
const QString &filename);
1175 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
1187class GenericPrivate;
1198 Generic(
const char *t, qsizetype len = -1);
1201 [[nodiscard]]
bool isEmpty()
const override;
1203 [[nodiscard]]
const char *type()
const override;
1205 void setType(
const char *type, qsizetype len = -1);
1219 kmime_mk_trivial_ctor_with_name(
Subject)
1248class ControlPrivate;
1258 kmime_mk_trivial_ctor_with_name(
Control)
1261 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
1262 [[nodiscard]]
bool isEmpty()
const override;
1267 [[nodiscard]]
QByteArray controlType()
const;
1278 [[nodiscard]]
bool isCancel()
const;
1287 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
1303 kmime_mk_trivial_ctor_with_name(
Date)
1306 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
1307 [[nodiscard]]
bool isEmpty()
const override;
1312 [[nodiscard]]
QDateTime dateTime()
const;
1320 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
1323 Q_DECLARE_PRIVATE(
Date)
1326class NewsgroupsPrivate;
1339 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
1340 void fromUnicodeString(
const QString &s)
override;
1341 using Base::fromUnicodeString;
1342 [[nodiscard]]
QString asUnicodeString()
const override;
1343 [[nodiscard]]
bool isEmpty()
const override;
1359 [[nodiscard]]
bool isCrossposted()
const;
1362 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
1390 kmime_mk_trivial_ctor_with_name(
Lines)
1393 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
1394 [[nodiscard]]
QString asUnicodeString()
const override;
1395 [[nodiscard]]
bool isEmpty()
const override;
1400 [[nodiscard]]
int numberOfLines()
const;
1405 void setNumberOfLines(
int lines);
1408 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
1411 Q_DECLARE_PRIVATE(
Lines)
1419 kmime_mk_trivial_ctor_with_name(
UserAgent)
1431#undef kmime_mk_trivial_ctor
1432#undef kmime_mk_dptr_ctor
1433#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 Fri Oct 11 2024 12:08:25 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.