kioslave/imap4
27 #include "imap4-config.h"
29 #include "imapcommand.h"
31 #include "mailheader.h"
33 #include <kio/authinfo.h>
34 #include <kio/slavebase.h>
38 #include <QStringList>
55 char operator[](
int i)
const {
return data.
length() > (i + pos) ? data[i + pos] :
'\0'; }
56 bool isEmpty()
const {
return pos >= data.
size(); }
59 if ( pos >= data.
size() ) {
64 int find(
char c,
int index = 0)
const
66 int res = data.
indexOf( c, index + pos );
67 return ( res == -1 ) ? res : ( res - pos );
70 void takeLeftNoResize(
QByteArray& dest, uint len)
const
72 memmove( dest.
data(), data.
data() + pos, len );
75 void takeMidNoResize(
QByteArray& dest, uint start, uint len)
const
77 memmove( dest.
data(), data.
data() + pos + start, len );
86 return data.
size() - pos;
88 void fromString(
const QString &s)
126 void setSize (ulong inSize)
135 void setUid (ulong inUid)
144 void setFlags (ulong inFlags)
191 virtual ~ imapParser ();
194 enum IMAP_STATE getState () {
return currentState; }
196 void setState(
enum IMAP_STATE state) { currentState = state; }
201 return KIMAP::decodeImapFolderName( currentBox );
209 CommandPtr sendCommand (CommandPtr aCmd);
215 CommandPtr doCommand (CommandPtr aCmd);
235 bool clientAuthenticate (KIO::SlaveBase *slave, KIO::AuthInfo &ai,
const QString & aFQDN,
251 void parseRecent (ulong value,
parseString & result);
272 void parseExists (ulong value,
parseString & result);
274 void parseExpunge (ulong value,
parseString & result);
298 void parseFetch (ulong value,
parseString & inWords);
305 const mailAddress& parseAddress (
parseString & inWords, mailAddress& buffer);
330 virtual void parseRelay (
const QByteArray & buffer);
334 virtual void parseRelay (ulong);
337 virtual bool parseRead (
QByteArray & buffer,
long len,
long relay = 0);
340 virtual bool parseReadLine (
QByteArray & buffer,
long relay = 0);
343 virtual void parseWriteLine (
const QString &);
352 bool stopAtBracket =
false);
358 bool stopAtBracket =
false);
361 static bool parseOneNumber (
parseString & inWords, ulong & num);
364 static void parseURL (
const KUrl & _url,
QString & _box,
QString & _section,
372 imapCache *getLastHandled ()
384 const imapInfo & getStatus ()
389 const imapInfo & getSelected ()
400 bool hasCapability (
const QString &);
402 void removeCapability (
const QString & cap);
407 while ( !inWords.isEmpty() &&
408 ( ( c = inWords[0] ) ==
' ' || c ==
'\t' || c ==
'\r' || c ==
'\n' ) ) {
420 enum IMAP_STATE currentState;
451 imapCache *lastHandled;
453 ulong commandCounter;
473 imapParser & operator = (
const imapParser &);
a string used during parsing the string allows you to move the effective start of the string using st...
int indexOf(char ch, int from) const
QByteArray toLatin1() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:37:08 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.