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 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
390class AddressListPrivate;
410 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
411 void fromUnicodeString(
const QString &s)
override;
412 using Base::fromUnicodeString;
413 [[nodiscard]]
QString asUnicodeString()
const override;
415 [[nodiscard]]
bool isEmpty()
const override;
447 [[nodiscard]]
QString displayString()
const;
461 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
477 kmime_mk_trivial_ctor(
Ident)
478 kmime_mk_dptr_ctor(
Ident)
481 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
482 [[nodiscard]]
bool isEmpty()
const override;
487 void fromIdent(
const Ident* ident);
504 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
507 Q_DECLARE_PRIVATE(
Ident)
510class SingleIdentPrivate;
524 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
525 [[nodiscard]]
bool isEmpty()
const override;
540 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
554 kmime_mk_trivial_ctor(
Token)
555 kmime_mk_dptr_ctor(
Token)
558 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
559 [[nodiscard]]
bool isEmpty()
const override;
572 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
575 Q_DECLARE_PRIVATE(
Token)
578class PhraseListPrivate;
589 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
590 [[nodiscard]]
QString asUnicodeString()
const override;
591 [[nodiscard]]
bool isEmpty()
const override;
599 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
616 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
617 [[nodiscard]]
QString asUnicodeString()
const override;
618 [[nodiscard]]
bool isEmpty()
const override;
621 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
627class ParametrizedPrivate;
639 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
641 [[nodiscard]]
bool isEmpty()
const override;
648 [[deprecated(
"use QByteArrayView as argument")]] [[nodiscard]]
inline QString parameter(
const QString &key)
const
652 [[deprecated(
"use QByteArrayView as argument")]] [[nodiscard]]
inline QString parameter(
QLatin1StringView key)
const
657 template <std::
size_t N>
658 [[nodiscard]]
inline QString parameter(
const char (&key)[N])
const
669 [[deprecated(
"use QByteArrayView as argument")]] [[nodiscard]]
inline bool hasParameter(
const QString &key)
const
673 [[deprecated(
"use QByteArrayView as argument")]] [[nodiscard]]
inline bool hasParameter(
QLatin1StringView key)
const
678 template <std::
size_t N>
679 [[nodiscard]]
inline bool hasParameter(
const char (&key)[N])
const {
689 [[deprecated(
"use a QByteArray[Literal] key")]]
inline void setParameter(
const QString &key,
const QString &value)
691 return setParameter(key.toUtf8(), value);
695 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
709class ReturnPathPrivate;
722 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
723 [[nodiscard]]
bool isEmpty()
const override;
726 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
742 kmime_mk_trivial_ctor_with_name(
From)
752 kmime_mk_trivial_ctor_with_name(
Sender)
762 kmime_mk_trivial_ctor_with_name(
To)
772 kmime_mk_trivial_ctor_with_name(
Cc)
782 kmime_mk_trivial_ctor_with_name(
Bcc)
792 kmime_mk_trivial_ctor_with_name(
ReplyTo)
795class MailCopiesToPrivate;
808 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
809 [[nodiscard]]
QString asUnicodeString()
const override;
811 [[nodiscard]]
bool isEmpty()
const override;
816 [[nodiscard]]
bool alwaysCopy()
const;
821 void setAlwaysCopy();
826 [[nodiscard]]
bool neverCopy()
const;
834 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
840class ContentTransferEncodingPrivate;
853 [[nodiscard]]
bool isEmpty()
const override;
854 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
867 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
880 kmime_mk_trivial_ctor_with_name(
Keywords)
905 kmime_mk_trivial_ctor_with_name(
MessageID)
915class ContentIDPrivate;
923 kmime_mk_trivial_ctor_with_name(
ContentID)
928 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
948 kmime_mk_trivial_ctor_with_name(
InReplyTo)
961class ContentTypePrivate;
974 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
975 [[nodiscard]]
bool isEmpty()
const override;
1002 [[nodiscard]]
bool isMediatype(
const char *mediatype)
const;
1007 [[nodiscard]]
bool isSubtype(
const char *subtype)
const;
1012 [[nodiscard]]
bool isMimeType(
const char *mimeType)
const;
1017 [[nodiscard]]
bool isText()
const;
1022 [[nodiscard]]
bool isPlainText()
const;
1027 [[nodiscard]]
bool isHTMLText()
const;
1032 [[nodiscard]]
bool isImage()
const;
1037 [[nodiscard]]
bool isMultipart()
const;
1043 [[nodiscard]]
bool isPartial()
const;
1068 [[nodiscard]]
QString name()
const;
1073 void setName(
const QString &s);
1074 [[deprecated(
"call setRFC2047Charset for the second argument if different from UTF-8, otherwise remove second argument")]]
1077 setRFC2047Charset(cs);
1095 [[nodiscard]]
int partialNumber()
const;
1101 [[nodiscard]]
int partialCount()
const;
1108 void setPartialParams(
int total,
int number);
1111 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
1117class ContentDispositionPrivate;
1130 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
1131 [[nodiscard]]
bool isEmpty()
const override;
1149 [[nodiscard]]
QString filename()
const;
1157 void setFilename(
const QString &filename);
1160 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
1172class GenericPrivate;
1183 Generic(
const char *t, qsizetype len = -1);
1186 [[nodiscard]]
bool isEmpty()
const override;
1188 [[nodiscard]]
const char *type()
const override;
1190 void setType(
const char *type, qsizetype len = -1);
1204 kmime_mk_trivial_ctor_with_name(
Subject)
1233class ControlPrivate;
1243 kmime_mk_trivial_ctor_with_name(
Control)
1246 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
1247 [[nodiscard]]
bool isEmpty()
const override;
1252 [[nodiscard]]
QByteArray controlType()
const;
1263 [[nodiscard]]
bool isCancel()
const;
1272 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
1288 kmime_mk_trivial_ctor_with_name(
Date)
1291 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
1292 [[nodiscard]]
bool isEmpty()
const override;
1297 [[nodiscard]]
QDateTime dateTime()
const;
1305 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
1308 Q_DECLARE_PRIVATE(
Date)
1311class NewsgroupsPrivate;
1324 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
1325 void fromUnicodeString(
const QString &s)
override;
1326 using Base::fromUnicodeString;
1327 [[nodiscard]]
QString asUnicodeString()
const override;
1328 [[nodiscard]]
bool isEmpty()
const override;
1344 [[nodiscard]]
bool isCrossposted()
const;
1347 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
1375 kmime_mk_trivial_ctor_with_name(
Lines)
1378 [[nodiscard]]
QByteArray as7BitString(
bool withHeaderType =
true)
const override;
1379 [[nodiscard]]
QString asUnicodeString()
const override;
1380 [[nodiscard]]
bool isEmpty()
const override;
1385 [[nodiscard]]
int numberOfLines()
const;
1390 void setNumberOfLines(
int lines);
1393 bool parse(
const char *&scursor,
const char *
const send,
bool isCRLF =
false)
override;
1396 Q_DECLARE_PRIVATE(
Lines)
1404 kmime_mk_trivial_ctor_with_name(
UserAgent)
1416#undef kmime_mk_trivial_ctor
1417#undef kmime_mk_dptr_ctor
1418#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 Mon Nov 18 2024 12:18:08 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.