KMIME Library
23 #ifndef __KMIME_HEADER_PARSING_H__
24 #define __KMIME_HEADER_PARSING_H__
26 #include <QtCore/QString>
27 #include <QtCore/QPair>
28 #include <QtCore/QList>
30 #include <kdatetime.h>
32 #include "kmime_export.h"
34 template <
typename K,
typename V>
class QMap;
49 struct KMIME_EXPORT QStringOrQPair {
50 QStringOrQPair() : qstring(), qpair( 0, 0 ) {}
55 struct KMIME_EXPORT AddrSpec {
80 AddrSpec addrSpec()
const;
90 void setAddress(
const AddrSpec &addr );
100 void setName(
const QString &name );
111 bool hasAddress()
const;
116 bool hasName()
const;
147 QString prettyAddress( Quoting quoting )
const;
152 void fromUnicodeString(
const QString &s );
173 struct KMIME_EXPORT Address {
175 MailboxList mailboxList;
181 namespace HeaderParsing {
198 KMIME_EXPORT
bool parseEncodedWord(
const char* &scursor,
199 const char *
const send,
202 bool forceCS =
false );
210 KMIME_EXPORT
bool parseAtom(
const char* &scursor,
const char *
const send,
211 QString &result,
bool allow8Bit=
false );
213 KMIME_EXPORT
bool parseAtom(
const char* &scursor,
const char *
const send,
215 bool allow8Bit=
false );
219 KMIME_EXPORT
bool parseToken(
const char* &scursor,
const char *
const send,
220 QString &result,
bool allow8Bit=
false );
222 KMIME_EXPORT
bool parseToken(
const char* &scursor,
const char *
const send,
224 bool allow8Bit=
false );
227 KMIME_EXPORT
bool parseGenericQuotedString(
const char* &scursor,
228 const char*
const send,
230 const char openChar=
'"',
231 const char closeChar=
'"' );
234 KMIME_EXPORT
bool parseComment(
const char* &scursor,
const char *
const send,
235 QString &result,
bool isCRLF=
false,
236 bool reallySave=
true );
253 KMIME_EXPORT
bool parsePhrase(
const char* &scursor,
const char *
const send,
254 QString &result,
bool isCRLF=
false );
268 KMIME_EXPORT
bool parseDotAtom(
const char* &scursor,
const char *
const send,
269 QString &result,
bool isCRLF=
false );
285 KMIME_EXPORT
void eatCFWS(
const char* &scursor,
const char *
const send,
288 KMIME_EXPORT
bool parseDomain(
const char* &scursor,
const char *
const send,
289 QString &result,
bool isCRLF=
false );
291 KMIME_EXPORT
bool parseObsRoute(
const char* &scursor,
const char *
const send,
295 KMIME_EXPORT
bool parseAddrSpec(
const char* &scursor,
const char *
const send,
296 Types::AddrSpec &result,
bool isCRLF=
false );
298 KMIME_EXPORT
bool parseAngleAddr(
const char* &scursor,
const char *
const send,
299 Types::AddrSpec &result,
bool isCRLF=
false );
317 KMIME_EXPORT
bool parseMailbox(
const char* &scursor,
const char *
const send,
318 Types::Mailbox &result,
bool isCRLF=
false );
320 KMIME_EXPORT
bool parseGroup(
const char* &scursor,
const char *
const send,
321 Types::Address &result,
bool isCRLF=
false );
323 KMIME_EXPORT
bool parseAddress(
const char* &scursor,
const char *
const send,
324 Types::Address &result,
bool isCRLF=
false );
326 KMIME_EXPORT
bool parseAddressList(
const char* &scursor,
327 const char *
const send,
328 Types::AddressList &result,
331 KMIME_EXPORT
bool parseParameter(
const char* &scursor,
const char *
const send,
335 KMIME_EXPORT
bool parseParameterList(
const char* &scursor,
336 const char *
const send,
340 KMIME_EXPORT
bool parseRawParameterList(
const char* &scursor,
341 const char *
const send,
350 KMIME_EXPORT
bool parseParameterListWithCharset(
const char* &scursor,
351 const char *
const send,
362 KMIME_EXPORT
int parseDigits(
const char* &scursor,
const char*
const send,
int &result );
364 KMIME_EXPORT
bool parseTime(
const char* &scursor,
const char *
const send,
365 int &hour,
int &min,
int &sec,
366 long int &secsEastOfGMT,
367 bool &timeZoneKnown,
bool isCRLF=
false );
369 KMIME_EXPORT
bool parseDateTime(
const char* &scursor,
const char *
const send,
370 KDateTime &result,
bool isCRLF=
false );
390 KMIME_EXPORT
void extractHeaderAndBody(
const QByteArray &content,
398 #endif // __KMIME_HEADER_PARSING_H__
Represents an (email address, display name) pair according RFC 2822, section 3.4. ...
Quoting
Describes how display names should be quoted.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:37:18 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.