KIMAP Library
21 #ifndef KIMAP_IMAPSTREAMPARSER_P_H
22 #define KIMAP_IMAPSTREAMPARSER_P_H
24 #include "kimap_export.h"
28 #include <QtCore/QByteArray>
29 #include <QtCore/QList>
30 #include <QtCore/QString>
36 class ImapParserException :
public std::exception
39 explicit ImapParserException(
const char *what )
throw() : mWhat( what ) {}
40 explicit ImapParserException(
const QByteArray &what )
throw() : mWhat( what ) {}
41 explicit ImapParserException(
const QString &what )
throw() : mWhat( what.toUtf8() ) {}
42 ImapParserException(
const ImapParserException &other )
throw() : std::exception( other ), mWhat( other.what() ) {}
43 virtual ~ImapParserException() throw() {}
44 const char *what()
const throw() {
return mWhat.constData(); }
45 virtual const char *type()
const throw() {
return "ImapParserException"; }
62 explicit ImapStreamParser( QIODevice *socket,
bool serverModeEnabled =
false );
74 QString readUtf8String();
80 QByteArray readString();
87 QList<QByteArray> readParenthesizedList();
94 qint64 readNumber(
bool * ok = 0 );
129 QByteArray readLiteralPart();
135 bool atLiteralEnd()
const;
153 bool hasResponseCode();
159 bool atResponseCodeEnd();
171 QByteArray readUntilCommandEnd();
177 QByteArray readRemainingData();
179 int availableDataSize()
const;
181 void setData(
const QByteArray &data );
184 void stripLeadingSpaces();
185 QByteArray parseQuotedString();
193 bool waitForMoreData(
bool wait);
198 void sendContinuationResponse( qint64 size );
206 bool m_isServerModeEnabled;
209 qint64 m_literalSize;
Parser for IMAP messages that operates on a local socket stream.
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:08 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.