22#ifndef KIMAP2_IMAPSTREAMPARSER_P_H
23#define KIMAP2_IMAPSTREAMPARSER_P_H
25#include "kimap2_export.h"
27#include <QtCore/QByteArray>
28#include <QtCore/QList>
29#include <QtCore/QScopedPointer>
58 int availableDataSize()
const;
62 void onResponseReceived(std::function<
void(
const Message &)>);
78 void sendContinuationResponse(qint64 size);
84 char at(
int pos)
const;
96 bool m_isServerModeEnabled;
100 qint64 m_literalSize;
112 AngleBracketStringState,
116 States m_currentState;
119 void setState(States state);
120 void forwardToState(States state);
124 int m_stringStartPos;
125 bool m_readingLiteral;
128 std::function<void(
const char *data,
const int size)> string;
129 std::function<void()> listStart;
130 std::function<void()> listEnd;
131 std::function<void()> responseCodeStart;
132 std::function<void()> responseCodeEnd;
133 std::function<void(
int size)> literalStart;
134 std::function<void(
const char *data,
const int size)> literalPart;
135 std::function<void()> literalEnd;
136 std::function<void()> lineEnd;
138 void onString(std::function<
void(
const char *data,
const int size)> f)
143 void onListStart(std::function<
void()> f)
148 void onListEnd(std::function<
void()> f)
153 void onResponseCodeStart(std::function<
void()> f)
155 responseCodeStart = f;
158 void onResponseCodeEnd(std::function<
void()> f)
163 void onLiteralStart(std::function<
void(
int size)> f)
168 void onLiteralPart(std::function<
void(
const char *data,
const int size)> f)
173 void onLiteralEnd(std::function<
void()> f)
178 void onLineEnd(std::function<
void()> f)
183 std::function<void(
const Message &)> responseReceived;
185 void setupCallbacks();
Parser for IMAP messages that operates on a local socket stream.
Q_SCRIPTABLE Q_NOREPLY void start()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:09:53 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.