summaryrefslogtreecommitdiffstats
path: root/kioslaves/imap4/imapparser.h
diff options
context:
space:
mode:
Diffstat (limited to 'kioslaves/imap4/imapparser.h')
-rw-r--r--kioslaves/imap4/imapparser.h118
1 files changed, 59 insertions, 59 deletions
diff --git a/kioslaves/imap4/imapparser.h b/kioslaves/imap4/imapparser.h
index 74fad145..61bc2a80 100644
--- a/kioslaves/imap4/imapparser.h
+++ b/kioslaves/imap4/imapparser.h
@@ -24,10 +24,10 @@
*
*********************************************************************/
-#include <qstringlist.h>
-#include <qvaluelist.h>
-#include <qptrlist.h>
-#include <qasciidict.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
+#include <tqptrlist.h>
+#include <tqasciidict.h>
#include <kio/authinfo.h>
#include <kio/slavebase.h>
@@ -55,10 +55,10 @@ public:
parseString() { pos = 0; }
char operator[](uint i) const { return data[i + pos]; }
bool isEmpty() const { return pos >= data.size(); }
- QCString cstr() const
+ TQCString cstr() const
{
- if (pos >= data.size()) return QCString();
- return QCString(data.data() + pos, data.size() - pos + 1);
+ if (pos >= data.size()) return TQCString();
+ return TQCString(data.data() + pos, data.size() - pos + 1);
}
int find(char c, int index = 0)
{
@@ -66,24 +66,24 @@ public:
return (res == -1) ? res : (res - pos);
}
// Warning: does not check for going past end of "data"
- void takeLeft(QCString& dest, uint len) const
+ void takeLeft(TQCString& dest, uint len) const
{
dest.resize(len + 1);
qmemmove(dest.data(), data.data() + pos, len);
}
// Warning: does not check for going past end of "data"
- void takeLeftNoResize(QCString& dest, uint len) const
+ void takeLeftNoResize(TQCString& dest, uint len) const
{
qmemmove(dest.data(), data.data() + pos, len);
}
// Warning: does not check for going past end of "data"
- void takeMid(QCString& dest, uint start, uint len) const
+ void takeMid(TQCString& dest, uint start, uint len) const
{
dest.resize(len + 1);
qmemmove(dest.data(), data.data() + pos + start, len);
}
// Warning: does not check for going past end of "data"
- void takeMidNoResize(QCString& dest, uint start, uint len) const
+ void takeMidNoResize(TQCString& dest, uint start, uint len) const
{
qmemmove(dest.data(), data.data() + pos + start, len);
}
@@ -96,12 +96,12 @@ public:
{
return data.size() - pos;
}
- void fromString(const QString &s)
+ void fromString(const TQString &s)
{
clear();
data.duplicate(s.latin1(), s.length());
}
- QByteArray data;
+ TQByteArray data;
uint pos;
};
@@ -157,11 +157,11 @@ public:
myFlags = inFlags;
}
- QCString getDate ()
+ TQCString getDate ()
{
return myDate;
}
- void setDate (const QCString & _str)
+ void setDate (const TQCString & _str)
{
myDate = _str;
}
@@ -171,7 +171,7 @@ public:
myHeader = NULL;
mySize = 0;
myFlags = 0;
- myDate = QCString();
+ myDate = TQCString();
myUid = 0;
}
@@ -180,7 +180,7 @@ protected:
ulong mySize;
ulong myFlags;
ulong myUid;
- QCString myDate;
+ TQCString myDate;
};
@@ -208,7 +208,7 @@ public:
void setState(enum IMAP_STATE state) { currentState = state; }
/* @brief return the currently selected mailbox */
- const QString getCurrentBox ()
+ const TQString getCurrentBox ()
{
return rfcDecoder::fromIMAP(currentBox);
};
@@ -234,7 +234,7 @@ public:
* @param resultInfo The resultinfo from the command
* @return success or failure
*/
- bool clientLogin (const QString & aUser, const QString & aPass, QString & resultInfo);
+ bool clientLogin (const TQString & aUser, const TQString & aPass, TQString & resultInfo);
/**
* @brief non-plaintext login
* @param aUser Username
@@ -244,8 +244,8 @@ public:
* @param resultInfo The resultinfo from the command
* @return success or failure
*/
- bool clientAuthenticate (KIO::SlaveBase *slave, KIO::AuthInfo &ai, const QString & aFQDN,
- const QString & aAuth, bool isSSL, QString & resultInfo);
+ bool clientAuthenticate (KIO::SlaveBase *slave, KIO::AuthInfo &ai, const TQString & aFQDN,
+ const TQString & aAuth, bool isSSL, TQString & resultInfo);
/**
* main loop for the parser
@@ -262,8 +262,8 @@ public:
/** @brief parse a RECENT line */
void parseRecent (ulong value, parseString & result);
/** @brief parse a RESULT line */
- void parseResult (QByteArray & result, parseString & rest,
- const QString & command = QString::null);
+ void parseResult (TQByteArray & result, parseString & rest,
+ const TQString & command = TQString::null);
/** @brief parse a CAPABILITY line */
void parseCapability (parseString & result);
/** @brief parse a FLAGS line */
@@ -312,7 +312,7 @@ public:
/** read a envelope from imap and parse the addresses */
mailHeader *parseEnvelope (parseString & inWords);
/** @brief parse an address list and return a list of addresses */
- void parseAddressList (parseString & inWords, QPtrList<mailAddress>& list);
+ void parseAddressList (parseString & inWords, TQPtrList<mailAddress>& list);
/** @brief parse an address and return the ref again */
const mailAddress& parseAddress (parseString & inWords, mailAddress& buffer);
@@ -321,38 +321,38 @@ public:
/** parse the body structure recursively */
mimeHeader *parseBodyStructure (parseString & inWords,
- QString & section, mimeHeader * inHeader = 0);
+ TQString & section, mimeHeader * inHeader = 0);
/** parse only one not nested part */
- mimeHeader *parseSimplePart (parseString & inWords, QString & section,
+ mimeHeader *parseSimplePart (parseString & inWords, TQString & section,
mimeHeader * localPart = 0);
/** parse a parameter list (name value pairs) */
- QAsciiDict < QString > parseParameters (parseString & inWords);
+ TQAsciiDict < TQString > parseParameters (parseString & inWords);
/**
* parse the disposition list (disposition (name value pairs))
* the disposition has the key 'content-disposition'
*/
- QAsciiDict < QString > parseDisposition (parseString & inWords);
+ TQAsciiDict < TQString > parseDisposition (parseString & inWords);
// reimplement these
/** relay hook to send the fetched data directly to an upper level */
- virtual void parseRelay (const QByteArray & buffer);
+ virtual void parseRelay (const TQByteArray & buffer);
/** relay hook to announce the fetched data directly to an upper level
*/
virtual void parseRelay (ulong);
/** read at least len bytes */
- virtual bool parseRead (QByteArray & buffer, ulong len, ulong relay = 0);
+ virtual bool parseRead (TQByteArray & buffer, ulong len, ulong relay = 0);
/** read at least a line (up to CRLF) */
- virtual bool parseReadLine (QByteArray & buffer, ulong relay = 0);
+ virtual bool parseReadLine (TQByteArray & buffer, ulong relay = 0);
/** write argument to server */
- virtual void parseWriteLine (const QString &);
+ virtual void parseWriteLine (const TQString &);
// generic parser routines
@@ -360,33 +360,33 @@ public:
void parseSentence (parseString & inWords);
/** parse a literal or word, may require more data */
- QCString parseLiteralC(parseString & inWords, bool relay = false,
+ TQCString parseLiteralC(parseString & inWords, bool relay = false,
bool stopAtBracket = false, int *outlen = 0);
- inline QByteArray parseLiteral (parseString & inWords, bool relay = false,
+ inline TQByteArray parseLiteral (parseString & inWords, bool relay = false,
bool stopAtBracket = false) {
int len = 0; // string size
- // Choice: we can create an extra QCString, or we can get the buffer in
+ // Choice: we can create an extra TQCString, or we can get the buffer in
// the wrong size to start. Let's try option b.
- QCString tmp = parseLiteralC(inWords, relay, stopAtBracket, &len);
- return QByteArray().duplicate(tmp.data(), len);
+ TQCString tmp = parseLiteralC(inWords, relay, stopAtBracket, &len);
+ return TQByteArray().duplicate(tmp.data(), len);
}
// static parser routines, can be used elsewhere
- static QCString b2c(const QByteArray &ba)
- { return QCString(ba.data(), ba.size() + 1); }
+ static TQCString b2c(const TQByteArray &ba)
+ { return TQCString(ba.data(), ba.size() + 1); }
/** parse one word (maybe quoted) upto next space " ) ] } */
- static QCString parseOneWordC (parseString & inWords,
+ static TQCString parseOneWordC (parseString & inWords,
bool stopAtBracket = FALSE, int *len = 0);
/** parse one number using parseOneWord */
static bool parseOneNumber (parseString & inWords, ulong & num);
/** extract the box,section,list type, uid, uidvalidity,info from an url */
- static void parseURL (const KURL & _url, QString & _box, QString & _section,
- QString & _type, QString & _uid, QString & _validity,
- QString & _info);
+ static void parseURL (const KURL & _url, TQString & _box, TQString & _section,
+ TQString & _type, TQString & _uid, TQString & _validity,
+ TQString & _info);
/** @brief return the last handled foo
@@ -398,7 +398,7 @@ public:
};
/** @brief return the last results */
- const QStringList & getResults ()
+ const TQStringList & getResults ()
{
return lastResults;
};
@@ -414,15 +414,15 @@ public:
return selectInfo;
};
- const QByteArray & getContinuation ()
+ const TQByteArray & getContinuation ()
{
return continuation;
};
/** @brief see if server has a capability */
- bool hasCapability (const QString &);
+ bool hasCapability (const TQString &);
- void removeCapability (const QString & cap);
+ void removeCapability (const TQString & cap);
static inline void skipWS (parseString & inWords)
{
@@ -435,7 +435,7 @@ public:
}
/** @brief find the namespace for the given box */
- QString namespaceForBox( const QString & box );
+ TQString namespaceForBox( const TQString & box );
protected:
@@ -444,7 +444,7 @@ protected:
enum IMAP_STATE currentState;
/** the box selected */
- QString currentBox;
+ TQString currentBox;
/** @brief here we store the result from select/examine and unsolicited updates */
imapInfo selectInfo;
@@ -453,43 +453,43 @@ protected:
imapInfo lastStatus;
/** @brief the results from the capabilities, split at ' ' */
- QStringList imapCapabilities;
+ TQStringList imapCapabilities;
/** @brief the results from list/lsub/listrights commands */
- QValueList < imapList > listResponses;
+ TQValueList < imapList > listResponses;
/** @brief queues handling the running commands */
- QPtrList < imapCommand > sentQueue; // no autodelete
- QPtrList < imapCommand > completeQueue; // autodelete !!
+ TQPtrList < imapCommand > sentQueue; // no autodelete
+ TQPtrList < imapCommand > completeQueue; // autodelete !!
/**
* everything we didn't handle, everything but the greeting is bogus
*/
- QStringList unhandled;
+ TQStringList unhandled;
/** the last continuation request (there MUST not be more than one pending) */
- QByteArray continuation;
+ TQByteArray continuation;
/** the last uid seen while a fetch */
- QString seenUid;
+ TQString seenUid;
imapCache *lastHandled;
ulong commandCounter;
/** @brief the results from search/acl commands */
- QStringList lastResults;
+ TQStringList lastResults;
/**
* @brief namespace prefix - delimiter association
* The namespace is cleaned before so that it does not contain the delimiter
*/
- QMap<QString, QString> namespaceToDelimiter;
+ TQMap<TQString, TQString> namespaceToDelimiter;
/**
* @brief list of namespaces in the form: section=namespace=delimiter
* section is 0 (personal), 1 (other users) or 2 (shared)
*/
- QStringList imapNamespaces;
+ TQStringList imapNamespaces;
private: