summaryrefslogtreecommitdiffstats
path: root/kioslaves/imap4/imapparser.cc
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /kioslaves/imap4/imapparser.cc
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kioslaves/imap4/imapparser.cc')
-rw-r--r--kioslaves/imap4/imapparser.cc260
1 files changed, 130 insertions, 130 deletions
diff --git a/kioslaves/imap4/imapparser.cc b/kioslaves/imap4/imapparser.cc
index cf3465a4c..e4294bd06 100644
--- a/kioslaves/imap4/imapparser.cc
+++ b/kioslaves/imap4/imapparser.cc
@@ -47,10 +47,10 @@ extern "C" {
}
#endif
-#include <qregexp.h>
-#include <qbuffer.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqregexp.h>
+#include <tqbuffer.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kdebug.h>
#include <kmdcodec.h>
@@ -103,11 +103,11 @@ imapParser::doCommand (imapCommand * aCmd)
imapCommand *
imapParser::sendCommand (imapCommand * aCmd)
{
- aCmd->setId (QString::number(commandCounter++));
+ aCmd->setId (TQString::number(commandCounter++));
sentQueue.append (aCmd);
continuation.resize(0);
- const QString& command = aCmd->command();
+ const TQString& command = aCmd->command();
if (command == "SELECT" || command == "EXAMINE")
{
@@ -120,7 +120,7 @@ imapParser::sendCommand (imapCommand * aCmd)
else if (command == "CLOSE")
{
// we no longer have a box open
- currentBox = QString::null;
+ currentBox = TQString::null;
}
else if (command.find ("SEARCH") != -1
|| command == "GETACL"
@@ -128,8 +128,8 @@ imapParser::sendCommand (imapCommand * aCmd)
|| command == "MYRIGHTS"
|| command == "GETANNOTATION"
|| command == "NAMESPACE"
- || command == "GETQUOTAROOT"
- || command == "GETQUOTA"
+ || command == "GEQUOTAROOT"
+ || command == "GEQUOTA"
|| command == "X-GET-OTHER-USERS"
|| command == "X-GET-DELEGATES"
|| command == "X-GET-OUT-OF-OFFICE")
@@ -146,8 +146,8 @@ imapParser::sendCommand (imapCommand * aCmd)
}
bool
-imapParser::clientLogin (const QString & aUser, const QString & aPass,
- QString & resultInfo)
+imapParser::clientLogin (const TQString & aUser, const TQString & aPass,
+ TQString & resultInfo)
{
imapCommand *cmd;
bool retVal = false;
@@ -216,7 +216,7 @@ static bool sasl_interact( KIO::SlaveBase *slave, KIO::AuthInfo &ai, void *in )
bool
imapParser::clientAuthenticate ( KIO::SlaveBase *slave, KIO::AuthInfo &ai,
- const QString & aFQDN, const QString & aAuth, bool isSSL, QString & resultInfo)
+ const TQString & aFQDN, const TQString & aAuth, bool isSSL, TQString & resultInfo)
{
bool retVal = false;
#ifdef HAVE_LIBSASL2
@@ -226,7 +226,7 @@ imapParser::clientAuthenticate ( KIO::SlaveBase *slave, KIO::AuthInfo &ai,
const char *out = 0;
uint outlen = 0;
const char *mechusing = 0;
- QByteArray tmp, challenge;
+ TQByteArray tmp, challenge;
kdDebug(7116) << "aAuth: " << aAuth << " FQDN: " << aFQDN << " isSSL: " << isSSL << endl;
@@ -242,7 +242,7 @@ imapParser::clientAuthenticate ( KIO::SlaveBase *slave, KIO::AuthInfo &ai,
if ( result != SASL_OK ) {
kdDebug(7116) << "sasl_client_new failed with: " << result << endl;
- resultInfo = QString::fromUtf8( sasl_errdetail( conn ) );
+ resultInfo = TQString::fromUtf8( sasl_errdetail( conn ) );
return false;
}
@@ -260,7 +260,7 @@ imapParser::clientAuthenticate ( KIO::SlaveBase *slave, KIO::AuthInfo &ai,
if ( result != SASL_CONTINUE && result != SASL_OK ) {
kdDebug(7116) << "sasl_client_start failed with: " << result << endl;
- resultInfo = QString::fromUtf8( sasl_errdetail( conn ) );
+ resultInfo = TQString::fromUtf8( sasl_errdetail( conn ) );
sasl_dispose( &conn );
return false;
}
@@ -270,10 +270,10 @@ imapParser::clientAuthenticate ( KIO::SlaveBase *slave, KIO::AuthInfo &ai,
KCodecs::base64Encode( tmp, challenge );
tmp.resetRawData( out, outlen );
// then lets try it
- QString firstCommand = aAuth;
+ TQString firstCommand = aAuth;
if ( !challenge.isEmpty() ) {
firstCommand += " ";
- firstCommand += QString::fromLatin1( challenge.data(), challenge.size() );
+ firstCommand += TQString::fromLatin1( challenge.data(), challenge.size() );
}
cmd = sendCommand (new imapCommand ("AUTHENTICATE", firstCommand.latin1()));
@@ -285,11 +285,11 @@ imapParser::clientAuthenticate ( KIO::SlaveBase *slave, KIO::AuthInfo &ai,
if (!continuation.isEmpty())
{
-// kdDebug(7116) << "S: " << QCString(continuation.data(),continuation.size()+1) << endl;
+// kdDebug(7116) << "S: " << TQCString(continuation.data(),continuation.size()+1) << endl;
if ( continuation.size() > 4 ) {
tmp.setRawData( continuation.data() + 2, continuation.size() - 4 );
KCodecs::base64Decode( tmp, challenge );
-// kdDebug(7116) << "S-1: " << QCString(challenge.data(),challenge.size()+1) << endl;
+// kdDebug(7116) << "S-1: " << TQCString(challenge.data(),challenge.size()+1) << endl;
tmp.resetRawData( continuation.data() + 2, continuation.size() - 4 );
}
@@ -309,16 +309,16 @@ imapParser::clientAuthenticate ( KIO::SlaveBase *slave, KIO::AuthInfo &ai,
if ( result != SASL_CONTINUE && result != SASL_OK ) {
kdDebug(7116) << "sasl_client_step failed with: " << result << endl;
- resultInfo = QString::fromUtf8( sasl_errdetail( conn ) );
+ resultInfo = TQString::fromUtf8( sasl_errdetail( conn ) );
sasl_dispose( &conn );
return false;
}
tmp.setRawData( out, outlen );
-// kdDebug(7116) << "C-1: " << QCString(tmp.data(),tmp.size()+1) << endl;
+// kdDebug(7116) << "C-1: " << TQCString(tmp.data(),tmp.size()+1) << endl;
KCodecs::base64Encode( tmp, challenge );
tmp.resetRawData( out, outlen );
-// kdDebug(7116) << "C: " << QCString(challenge.data(),challenge.size()+1) << endl;
+// kdDebug(7116) << "C: " << TQCString(challenge.data(),challenge.size()+1) << endl;
parseWriteLine (challenge);
continuation.resize(0);
}
@@ -343,7 +343,7 @@ imapParser::parseUntagged (parseString & result)
//kdDebug(7116) << "imapParser::parseUntagged - '" << result.cstr() << "'" << endl;
parseOneWordC(result); // *
- QByteArray what = parseLiteral (result); // see whats coming next
+ TQByteArray what = parseLiteral (result); // see whats coming next
switch (what[0])
{
@@ -478,7 +478,7 @@ imapParser::parseUntagged (parseString & result)
ulong number;
bool valid;
- number = QCString(what, what.size() + 1).toUInt(&valid);
+ number = TQCString(what, what.size() + 1).toUInt(&valid);
if (valid)
{
what = parseLiteral (result);
@@ -498,7 +498,7 @@ imapParser::parseUntagged (parseString & result)
case 'F':
if (qstrncmp(what, "FETCH", what.size()) == 0)
{
- seenUid = QString::null;
+ seenUid = TQString::null;
parseFetch (number, result);
}
break;
@@ -506,7 +506,7 @@ imapParser::parseUntagged (parseString & result)
case 'S':
if (qstrncmp(what, "STORE", what.size()) == 0) // deprecated store
{
- seenUid = QString::null;
+ seenUid = TQString::null;
parseFetch (number, result);
}
break;
@@ -528,8 +528,8 @@ imapParser::parseUntagged (parseString & result)
void
-imapParser::parseResult (QByteArray & result, parseString & rest,
- const QString & command)
+imapParser::parseResult (TQByteArray & result, parseString & rest,
+ const TQString & command)
{
if (command == "SELECT")
selectInfo.setReadWrite(true);
@@ -537,7 +537,7 @@ imapParser::parseResult (QByteArray & result, parseString & rest,
if (rest[0] == '[')
{
rest.pos++;
- QCString option = parseOneWordC(rest, TRUE);
+ TQCString option = parseOneWordC(rest, TRUE);
switch (option[0])
{
@@ -564,7 +564,7 @@ imapParser::parseResult (QByteArray & result, parseString & rest,
else if (option == "PERMANENTFLAGS")
{
uint end = rest.data.find(']', rest.pos);
- QCString flags(rest.data.data() + rest.pos, end - rest.pos);
+ TQCString flags(rest.data.data() + rest.pos, end - rest.pos);
selectInfo.setPermanentFlags (flags);
rest.pos = end;
}
@@ -645,7 +645,7 @@ imapParser::parseResult (QByteArray & result, parseString & rest,
{
if (currentState == ISTATE_SELECT)
currentState = ISTATE_LOGIN;
- currentBox = QString::null;
+ currentBox = TQString::null;
}
kdDebug(7116) << "imapParser::parseResult - current box is now " << currentBox << endl;
}
@@ -660,7 +660,7 @@ imapParser::parseResult (QByteArray & result, parseString & rest,
{
if (currentState == ISTATE_SELECT)
currentState = ISTATE_LOGIN;
- currentBox = QString::null;
+ currentBox = TQString::null;
}
kdDebug(7116) << "imapParser::parseResult - current box is now " << currentBox << endl;
}
@@ -674,8 +674,8 @@ imapParser::parseResult (QByteArray & result, parseString & rest,
void imapParser::parseCapability (parseString & result)
{
- QCString temp( result.cstr() );
- imapCapabilities = QStringList::split ( ' ', KPIM::kAsciiToLower( temp.data() ) );
+ TQCString temp( result.cstr() );
+ imapCapabilities = TQStringList::split ( ' ', KPIM::kAsciiToLower( temp.data() ) );
}
void imapParser::parseFlags (parseString & result)
@@ -715,7 +715,7 @@ void imapParser::parseListRights (parseString & result)
parseOneWordC (result); // skip user id
int outlen = 1;
while ( outlen ) {
- QCString word = parseOneWordC (result, false, &outlen);
+ TQCString word = parseOneWordC (result, false, &outlen);
lastResults.append (word);
}
}
@@ -726,7 +726,7 @@ void imapParser::parseAcl (parseString & result)
int outlen = 1;
// The result is user1 perm1 user2 perm2 etc. The caller will sort it out.
while ( outlen && !result.isEmpty() ) {
- QCString word = parseLiteralC (result, false, false, &outlen);
+ TQCString word = parseLiteralC (result, false, false, &outlen);
lastResults.append (word);
}
}
@@ -744,7 +744,7 @@ void imapParser::parseAnnotation (parseString & result)
int outlen = 1;
// The result is name1 value1 name2 value2 etc. The caller will sort it out.
while ( outlen && !result.isEmpty() && result[0] != ')' ) {
- QCString word = parseLiteralC (result, false, false, &outlen);
+ TQCString word = parseLiteralC (result, false, false, &outlen);
lastResults.append (word);
}
}
@@ -755,7 +755,7 @@ void imapParser::parseQuota (parseString & result)
// quota_response ::= "QUOTA" SP astring SP quota_list
// quota_list ::= "(" #quota_resource ")"
// quota_resource ::= atom SP number SP number
- QCString root = parseOneWordC( result );
+ TQCString root = parseOneWordC( result );
if ( root.isEmpty() ) {
lastResults.append( "" );
} else {
@@ -765,10 +765,10 @@ void imapParser::parseQuota (parseString & result)
return;
result.pos++;
skipWS (result);
- QStringList triplet;
+ TQStringList triplet;
int outlen = 1;
while ( outlen && !result.isEmpty() && result[0] != ')' ) {
- QCString word = parseLiteralC (result, false, false, &outlen);
+ TQCString word = parseLiteralC (result, false, false, &outlen);
triplet.append(word);
}
lastResults.append( triplet.join(" ") );
@@ -782,10 +782,10 @@ void imapParser::parseQuotaRoot (parseString & result)
skipWS (result);
if ( result.isEmpty() )
return;
- QStringList roots;
+ TQStringList roots;
int outlen = 1;
while ( outlen && !result.isEmpty() ) {
- QCString word = parseLiteralC (result, false, false, &outlen);
+ TQCString word = parseLiteralC (result, false, false, &outlen);
roots.append (word);
}
lastResults.append( roots.isEmpty()? "" : roots.join(" ") );
@@ -794,7 +794,7 @@ void imapParser::parseQuotaRoot (parseString & result)
void imapParser::parseCustom (parseString & result)
{
int outlen = 1;
- QCString word = parseLiteralC (result, false, false, &outlen);
+ TQCString word = parseLiteralC (result, false, false, &outlen);
lastResults.append( word );
}
@@ -805,12 +805,12 @@ void imapParser::parseOtherUser (parseString & result)
void imapParser::parseDelegate (parseString & result)
{
- const QString email = parseOneWordC( result );
+ const TQString email = parseOneWordC( result );
- QStringList rights;
+ TQStringList rights;
int outlen = 1;
while ( outlen && !result.isEmpty() ) {
- QCString word = parseLiteralC( result, false, false, &outlen );
+ TQCString word = parseLiteralC( result, false, false, &outlen );
rights.append( word );
}
@@ -819,13 +819,13 @@ void imapParser::parseDelegate (parseString & result)
void imapParser::parseOutOfOffice (parseString & result)
{
- const QString state = parseOneWordC (result);
+ const TQString state = parseOneWordC (result);
parseOneWordC (result); // skip encoding
int outlen = 1;
- QCString msg = parseLiteralC (result, false, false, &outlen);
+ TQCString msg = parseLiteralC (result, false, false, &outlen);
- lastResults.append( state + "^" + QString::fromUtf8( msg ) );
+ lastResults.append( state + "^" + TQString::fromUtf8( msg ) );
}
void imapParser::parseMyRights (parseString & result)
@@ -841,7 +841,7 @@ void imapParser::parseSearch (parseString & result)
while (parseOneNumber (result, value))
{
- lastResults.append (QString::number(value));
+ lastResults.append (TQString::number(value));
}
}
@@ -860,7 +860,7 @@ void imapParser::parseStatus (parseString & inWords)
{
ulong value;
- QCString label = parseOneWordC(inWords);
+ TQCString label = parseOneWordC(inWords);
if (parseOneNumber (inWords, value))
{
if (label == "MESSAGES")
@@ -893,7 +893,7 @@ void imapParser::parseExpunge (ulong value, parseString & result)
Q_UNUSED(result);
}
-void imapParser::parseAddressList (parseString & inWords, QPtrList<mailAddress>& list)
+void imapParser::parseAddressList (parseString & inWords, TQPtrList<mailAddress>& list)
{
if (inWords.isEmpty())
return;
@@ -957,7 +957,7 @@ mailHeader * imapParser::parseEnvelope (parseString & inWords)
//subject
envelope->setSubject(parseLiteralC(inWords));
- QPtrList<mailAddress> list;
+ TQPtrList<mailAddress> list;
list.setAutoDelete(true);
//from
@@ -1015,10 +1015,10 @@ mailHeader * imapParser::parseEnvelope (parseString & inWords)
// parse parameter pairs into a dictionary
// caller must clean up the dictionary items
-QAsciiDict < QString > imapParser::parseDisposition (parseString & inWords)
+TQAsciiDict < TQString > imapParser::parseDisposition (parseString & inWords)
{
- QCString disposition;
- QAsciiDict < QString > retVal (17, false);
+ TQCString disposition;
+ TQAsciiDict < TQString > retVal (17, false);
// return value is a shallow copy
retVal.setAutoDelete (false);
@@ -1044,7 +1044,7 @@ QAsciiDict < QString > imapParser::parseDisposition (parseString & inWords)
if (!disposition.isEmpty ())
{
- retVal.insert ("content-disposition", new QString(disposition));
+ retVal.insert ("content-disposition", new TQString(disposition));
}
return retVal;
@@ -1052,9 +1052,9 @@ QAsciiDict < QString > imapParser::parseDisposition (parseString & inWords)
// parse parameter pairs into a dictionary
// caller must clean up the dictionary items
-QAsciiDict < QString > imapParser::parseParameters (parseString & inWords)
+TQAsciiDict < TQString > imapParser::parseParameters (parseString & inWords)
{
- QAsciiDict < QString > retVal (17, false);
+ TQAsciiDict < TQString > retVal (17, false);
// return value is a shallow copy
retVal.setAutoDelete (false);
@@ -1071,9 +1071,9 @@ QAsciiDict < QString > imapParser::parseParameters (parseString & inWords)
while (!inWords.isEmpty () && inWords[0] != ')')
{
- QCString l1 = parseLiteralC(inWords);
- QCString l2 = parseLiteralC(inWords);
- retVal.insert (l1, new QString(l2));
+ TQCString l1 = parseLiteralC(inWords);
+ TQCString l2 = parseLiteralC(inWords);
+ retVal.insert (l1, new TQString(l2));
}
if (inWords[0] != ')')
@@ -1086,11 +1086,11 @@ QAsciiDict < QString > imapParser::parseParameters (parseString & inWords)
}
mimeHeader * imapParser::parseSimplePart (parseString & inWords,
- QString & inSection, mimeHeader * localPart)
+ TQString & inSection, mimeHeader * localPart)
{
- QCString subtype;
- QCString typeStr;
- QAsciiDict < QString > parameters (17, false);
+ TQCString subtype;
+ TQCString typeStr;
+ TQAsciiDict < TQString > parameters (17, false);
ulong size;
parameters.setAutoDelete (true);
@@ -1117,7 +1117,7 @@ mimeHeader * imapParser::parseSimplePart (parseString & inWords,
//body parameter parenthesized list
parameters = parseParameters (inWords);
{
- QAsciiDictIterator < QString > it (parameters);
+ TQAsciiDictIterator < TQString > it (parameters);
while (it.current ())
{
@@ -1170,12 +1170,12 @@ mimeHeader * imapParser::parseSimplePart (parseString & inWords,
// body disposition
parameters = parseDisposition (inWords);
{
- QString *disposition = parameters["content-disposition"];
+ TQString *disposition = parameters["content-disposition"];
if (disposition)
localPart->setDisposition (disposition->ascii ());
parameters.remove ("content-disposition");
- QAsciiDictIterator < QString > it (parameters);
+ TQAsciiDictIterator < TQString > it (parameters);
while (it.current ())
{
localPart->setDispositionParm (it.currentKey (),
@@ -1207,7 +1207,7 @@ mimeHeader * imapParser::parseSimplePart (parseString & inWords,
}
mimeHeader * imapParser::parseBodyStructure (parseString & inWords,
- QString & inSection, mimeHeader * localPart)
+ TQString & inSection, mimeHeader * localPart)
{
bool init = false;
if (inSection.isEmpty())
@@ -1230,9 +1230,9 @@ mimeHeader * imapParser::parseBodyStructure (parseString & inWords,
if (inWords[0] == '(')
{
- QByteArray subtype;
- QAsciiDict < QString > parameters (17, false);
- QString outSection;
+ TQByteArray subtype;
+ TQAsciiDict < TQString > parameters (17, false);
+ TQString outSection;
parameters.setAutoDelete (true);
if (!localPart)
localPart = new mimeHeader;
@@ -1258,7 +1258,7 @@ mimeHeader * imapParser::parseBodyStructure (parseString & inWords,
// is multipart (otherwise its a simplepart and handled later)
while (inWords[0] == '(')
{
- outSection = QString::number(++section);
+ outSection = TQString::number(++section);
if (!init)
outSection = inSection + "." + outSection;
mimeHeader *subpart = parseBodyStructure (inWords, outSection, 0);
@@ -1273,7 +1273,7 @@ mimeHeader * imapParser::parseBodyStructure (parseString & inWords,
// fetch parameters
parameters = parseParameters (inWords);
{
- QAsciiDictIterator < QString > it (parameters);
+ TQAsciiDictIterator < TQString > it (parameters);
while (it.current ())
{
@@ -1286,12 +1286,12 @@ mimeHeader * imapParser::parseBodyStructure (parseString & inWords,
// body disposition
parameters = parseDisposition (inWords);
{
- QString *disposition = parameters["content-disposition"];
+ TQString *disposition = parameters["content-disposition"];
if (disposition)
localPart->setDisposition (disposition->ascii ());
parameters.remove ("content-disposition");
- QAsciiDictIterator < QString > it (parameters);
+ TQAsciiDictIterator < TQString > it (parameters);
while (it.current ())
{
localPart->setDispositionParm (it.currentKey (),
@@ -1339,8 +1339,8 @@ void imapParser::parseBody (parseString & inWords)
// see if we got a part specifier
if (inWords[0] == '[')
{
- QCString specifier;
- QCString label;
+ TQCString specifier;
+ TQCString label;
inWords.pos++;
specifier = parseOneWordC (inWords, TRUE);
@@ -1378,7 +1378,7 @@ void imapParser::parseBody (parseString & inWords)
{
kdDebug(7116) << "imapParser::parseBody - reading " << envelope << " " << seenUid.ascii () << endl;
// fill it up with data
- QString theHeader = parseLiteralC(inWords, true);
+ TQString theHeader = parseLiteralC(inWords, true);
mimeIOQString myIO;
myIO.setString (theHeader);
@@ -1390,7 +1390,7 @@ void imapParser::parseBody (parseString & inWords)
{
// BODY[HEADER.FIELDS (References)] {n}
//kdDebug(7116) << "imapParser::parseBody - HEADER.FIELDS: "
- // << QCString(label.data(), label.size()+1) << endl;
+ // << TQCString(label.data(), label.size()+1) << endl;
if (label == "REFERENCES")
{
mailHeader *envelope = 0;
@@ -1405,7 +1405,7 @@ void imapParser::parseBody (parseString & inWords)
}
else
{
- QCString references = parseLiteralC(inWords, true);
+ TQCString references = parseLiteralC(inWords, true);
int start = references.find ('<');
int end = references.findRev ('>');
if (start < end)
@@ -1423,7 +1423,7 @@ void imapParser::parseBody (parseString & inWords)
if (specifier.find(".MIME") != -1)
{
mailHeader *envelope = new mailHeader;
- QString theHeader = parseLiteralC(inWords, false);
+ TQString theHeader = parseLiteralC(inWords, false);
mimeIOQString myIO;
myIO.setString (theHeader);
envelope->parseHeader (myIO);
@@ -1453,7 +1453,7 @@ void imapParser::parseBody (parseString & inWords)
{
kdDebug(7116) << "imapParser::parseBody - reading " << envelope << " " << seenUid.ascii () << endl;
// fill it up with data
- QString section;
+ TQString section;
mimeHeader *body = parseBodyStructure (inWords, section, envelope);
if (body != envelope)
delete body;
@@ -1477,7 +1477,7 @@ void imapParser::parseFetch (ulong /* value */, parseString & inWords)
parseSentence (inWords);
else
{
- QCString word = parseLiteralC(inWords, false, true);
+ TQCString word = parseLiteralC(inWords, false, true);
switch (word[0])
{
@@ -1528,11 +1528,11 @@ void imapParser::parseFetch (ulong /* value */, parseString & inWords)
envelope = lastHandled->getHeader ();
// fill it up with data
- QString section;
+ TQString section;
mimeHeader *body =
parseBodyStructure (inWords, section, envelope);
- QByteArray data;
- QDataStream stream( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream stream( data, IO_WriteOnly );
if (body) body->serialize(stream);
parseRelay(data);
@@ -1583,7 +1583,7 @@ void imapParser::parseFetch (ulong /* value */, parseString & inWords)
case 'I':
if (word == "INTERNALDATE")
{
- QCString date = parseOneWordC(inWords);
+ TQCString date = parseOneWordC(inWords);
if (!lastHandled) lastHandled = new imapCache();
lastHandled->setDate(date);
}
@@ -1674,9 +1674,9 @@ void imapParser::parseNamespace (parseString & result)
if ( result[0] != '(' )
return;
- QString delimEmpty;
- if ( namespaceToDelimiter.contains( QString::null ) )
- delimEmpty = namespaceToDelimiter[QString::null];
+ TQString delimEmpty;
+ if ( namespaceToDelimiter.contains( TQString::null ) )
+ delimEmpty = namespaceToDelimiter[TQString::null];
namespaceToDelimiter.clear();
imapNamespaces.clear();
@@ -1696,9 +1696,9 @@ void imapParser::parseNamespace (parseString & result)
++ns;
}
// namespace prefix
- QCString prefix = parseOneWordC( result );
+ TQCString prefix = parseOneWordC( result );
// delimiter
- QCString delim = parseOneWordC( result );
+ TQCString delim = parseOneWordC( result );
kdDebug(7116) << "imapParser::parseNamespace ns='" << prefix <<
"',delim='" << delim << "'" << endl;
if ( ns == 0 )
@@ -1706,8 +1706,8 @@ void imapParser::parseNamespace (parseString & result)
// at least one personal ns
personalAvailable = true;
}
- QString nsentry = QString::number( ns ) + "=" + QString(prefix) +
- "=" + QString(delim);
+ TQString nsentry = TQString::number( ns ) + "=" + TQString(prefix) +
+ "=" + TQString(delim);
imapNamespaces.append( nsentry );
if ( prefix.right( 1 ) == delim ) {
// strip delimiter to get a correct entry for comparisons
@@ -1733,12 +1733,12 @@ void imapParser::parseNamespace (parseString & result)
}
if ( !delimEmpty.isEmpty() ) {
// remember default delimiter
- namespaceToDelimiter[QString::null] = delimEmpty;
+ namespaceToDelimiter[TQString::null] = delimEmpty;
if ( !personalAvailable )
{
// at least one personal ns would be nice
kdDebug(7116) << "imapParser::parseNamespace - registering own personal ns" << endl;
- QString nsentry = "0==" + delimEmpty;
+ TQString nsentry = "0==" + delimEmpty;
imapNamespaces.append( nsentry );
}
}
@@ -1774,11 +1774,11 @@ int imapParser::parseLoop ()
break;
default:
{
- QCString tag = parseLiteralC(result);
+ TQCString tag = parseLiteralC(result);
if (current->id() == tag.data())
{
result.data.resize(result.data.size() - 2); // tie off CRLF
- QByteArray resultCode = parseLiteral (result); //the result
+ TQByteArray resultCode = parseLiteral (result); //the result
current->setResult (resultCode);
current->setResultInfo(result.cstr());
current->setComplete ();
@@ -1791,7 +1791,7 @@ int imapParser::parseLoop ()
else
{
kdDebug(7116) << "imapParser::parseLoop - unknown tag '" << tag << "'" << endl;
- QCString cstr = tag + " " + result.cstr();
+ TQCString cstr = tag + " " + result.cstr();
result.data = cstr;
result.pos = 0;
result.data.resize(cstr.length());
@@ -1805,7 +1805,7 @@ int imapParser::parseLoop ()
}
void
-imapParser::parseRelay (const QByteArray & buffer)
+imapParser::parseRelay (const TQByteArray & buffer)
{
Q_UNUSED(buffer);
qWarning
@@ -1820,7 +1820,7 @@ imapParser::parseRelay (ulong len)
("imapParser::parseRelay - virtual function not reimplemented - announcement lost");
}
-bool imapParser::parseRead (QByteArray & buffer, ulong len, ulong relay)
+bool imapParser::parseRead (TQByteArray & buffer, ulong len, ulong relay)
{
Q_UNUSED(buffer);
Q_UNUSED(len);
@@ -1830,7 +1830,7 @@ bool imapParser::parseRead (QByteArray & buffer, ulong len, ulong relay)
return FALSE;
}
-bool imapParser::parseReadLine (QByteArray & buffer, ulong relay)
+bool imapParser::parseReadLine (TQByteArray & buffer, ulong relay)
{
Q_UNUSED(buffer);
Q_UNUSED(relay);
@@ -1840,7 +1840,7 @@ bool imapParser::parseReadLine (QByteArray & buffer, ulong relay)
}
void
-imapParser::parseWriteLine (const QString & str)
+imapParser::parseWriteLine (const TQString & str)
{
Q_UNUSED(str);
qWarning
@@ -1848,25 +1848,25 @@ imapParser::parseWriteLine (const QString & str)
}
void
-imapParser::parseURL (const KURL & _url, QString & _box, QString & _section,
- QString & _type, QString & _uid, QString & _validity, QString & _info)
+imapParser::parseURL (const KURL & _url, TQString & _box, TQString & _section,
+ TQString & _type, TQString & _uid, TQString & _validity, TQString & _info)
{
- QStringList parameters;
+ TQStringList parameters;
_box = _url.path ();
kdDebug(7116) << "imapParser::parseURL " << _box << endl;
int paramStart = _box.find("/;");
if ( paramStart > -1 )
{
- QString paramString = _box.right( _box.length() - paramStart-2 );
- parameters = QStringList::split (';', paramString); //split parameters
+ TQString paramString = _box.right( _box.length() - paramStart-2 );
+ parameters = TQStringList::split (';', paramString); //split parameters
_box.truncate( paramStart ); // strip parameters
}
// extract parameters
- for (QStringList::ConstIterator it (parameters.begin ());
+ for (TQStringList::ConstIterator it (parameters.begin ());
it != parameters.end (); ++it)
{
- QString temp = (*it);
+ TQString temp = (*it);
int pt = temp.find ('/');
if (pt > 0)
@@ -1906,17 +1906,17 @@ imapParser::parseURL (const KURL & _url, QString & _box, QString & _section,
}
-QCString imapParser::parseLiteralC(parseString & inWords, bool relay, bool stopAtBracket, int *outlen) {
+TQCString imapParser::parseLiteralC(parseString & inWords, bool relay, bool stopAtBracket, int *outlen) {
if (!inWords.isEmpty() && inWords[0] == '{')
{
- QCString retVal;
+ TQCString retVal;
ulong runLen = inWords.find ('}', 1);
if (runLen > 0)
{
bool proper;
ulong runLenSave = runLen + 1;
- QCString tmpstr(runLen);
+ TQCString tmpstr(runLen);
inWords.takeMidNoResize(tmpstr, 1, runLen - 1);
runLen = tmpstr.toULong (&proper);
inWords.pos += runLenSave;
@@ -1925,7 +1925,7 @@ QCString imapParser::parseLiteralC(parseString & inWords, bool relay, bool stopA
//now get the literal from the server
if (relay)
parseRelay (runLen);
- QByteArray rv;
+ TQByteArray rv;
parseRead (rv, runLen, relay ? runLen : 0);
rv.resize(QMAX(runLen, rv.size())); // what's the point?
retVal = b2c(rv);
@@ -1956,12 +1956,12 @@ QCString imapParser::parseLiteralC(parseString & inWords, bool relay, bool stopA
}
// does not know about literals ( {7} literal )
-QCString imapParser::parseOneWordC (parseString & inWords, bool stopAtBracket, int *outLen)
+TQCString imapParser::parseOneWordC (parseString & inWords, bool stopAtBracket, int *outLen)
{
uint retValSize = 0;
uint len = inWords.length();
if (len == 0) {
- return QCString();
+ return TQCString();
}
if (len > 0 && inWords[0] == '"')
@@ -1976,7 +1976,7 @@ QCString imapParser::parseOneWordC (parseString & inWords, bool stopAtBracket, i
}
if (i < len)
{
- QCString retVal(i);
+ TQCString retVal(i);
inWords.pos++;
inWords.takeLeftNoResize(retVal, i - 1);
len = i - 1;
@@ -2000,7 +2000,7 @@ QCString imapParser::parseOneWordC (parseString & inWords, bool stopAtBracket, i
else
{
kdDebug(7116) << "imapParser::parseOneWord - error parsing unmatched \"" << endl;
- QCString retVal = inWords.cstr();
+ TQCString retVal = inWords.cstr();
retValSize = len;
inWords.clear();
if (outLen) {
@@ -2021,7 +2021,7 @@ QCString imapParser::parseOneWordC (parseString & inWords, bool stopAtBracket, i
break;
}
- QCString retVal(i+1);
+ TQCString retVal(i+1);
inWords.takeLeftNoResize(retVal, i);
retValSize = i;
inWords.pos += i;
@@ -2045,11 +2045,11 @@ bool imapParser::parseOneNumber (parseString & inWords, ulong & num)
return valid;
}
-bool imapParser::hasCapability (const QString & cap)
+bool imapParser::hasCapability (const TQString & cap)
{
- QString c = cap.lower();
+ TQString c = cap.lower();
// kdDebug(7116) << "imapParser::hasCapability - Looking for '" << cap << "'" << endl;
- for (QStringList::ConstIterator it = imapCapabilities.begin ();
+ for (TQStringList::ConstIterator it = imapCapabilities.begin ();
it != imapCapabilities.end (); ++it)
{
// kdDebug(7116) << "imapParser::hasCapability - Examining '" << (*it) << "'" << endl;
@@ -2061,20 +2061,20 @@ bool imapParser::hasCapability (const QString & cap)
return false;
}
-void imapParser::removeCapability (const QString & cap)
+void imapParser::removeCapability (const TQString & cap)
{
imapCapabilities.remove(cap.lower());
}
-QString imapParser::namespaceForBox( const QString & box )
+TQString imapParser::namespaceForBox( const TQString & box )
{
kdDebug(7116) << "imapParse::namespaceForBox " << box << endl;
- QString myNamespace;
+ TQString myNamespace;
if ( !box.isEmpty() )
{
- QValueList<QString> list = namespaceToDelimiter.keys();
- QString cleanPrefix;
- for ( QValueList<QString>::Iterator it = list.begin(); it != list.end(); ++it )
+ TQValueList<TQString> list = namespaceToDelimiter.keys();
+ TQString cleanPrefix;
+ for ( TQValueList<TQString>::Iterator it = list.begin(); it != list.end(); ++it )
{
if ( !(*it).isEmpty() && box.find( *it ) != -1 )
return (*it);