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 ImapParserException(
const char *what )
throw() : mWhat( what ) {}
40 ImapParserException(
const QByteArray &what )
throw() : mWhat( what ) {}
41 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();
95 qint64 readNumber(
bool * ok = 0 );
130 QByteArray readLiteralPart();
136 bool atLiteralEnd()
const;
154 bool hasResponseCode();
160 bool atResponseCodeEnd();
172 QByteArray readUntilCommandEnd();
178 QByteArray readRemainingData();
180 int availableDataSize()
const;
182 void setData(
const QByteArray &data );
186 void stripLeadingSpaces();
187 QByteArray parseQuotedString();
195 bool waitForMoreData(
bool wait);
200 void sendContinuationResponse( qint64 size );
208 bool m_isServerModeEnabled;
211 qint64 m_literalSize;
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jul 13 2013 01:25:17 by
doxygen 1.8.3.1 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.