summaryrefslogtreecommitdiffstats
path: root/kioslaves/imap4/imapcommand.cc
diff options
context:
space:
mode:
Diffstat (limited to 'kioslaves/imap4/imapcommand.cc')
-rw-r--r--kioslaves/imap4/imapcommand.cc126
1 files changed, 63 insertions, 63 deletions
diff --git a/kioslaves/imap4/imapcommand.cc b/kioslaves/imap4/imapcommand.cc
index e5eee776f..ae26f0ab2 100644
--- a/kioslaves/imap4/imapcommand.cc
+++ b/kioslaves/imap4/imapcommand.cc
@@ -43,8 +43,8 @@
#include <unistd.h>
#include <stdlib.h>
-#include <qregexp.h>
-#include <qbuffer.h>
+#include <tqregexp.h>
+#include <tqbuffer.h>
#include <kprotocolmanager.h>
#include <ksock.h>
@@ -58,10 +58,10 @@
imapCommand::imapCommand ()
{
mComplete = false;
- mId = QString::null;
+ mId = TQString::null;
}
-imapCommand::imapCommand (const QString & command, const QString & parameter)
+imapCommand::imapCommand (const TQString & command, const TQString & parameter)
// aCommand(NULL),
// mResult(NULL),
// mParameter(NULL)
@@ -69,7 +69,7 @@ imapCommand::imapCommand (const QString & command, const QString & parameter)
mComplete = false;
aCommand = command;
aParameter = parameter;
- mId = QString::null;
+ mId = TQString::null;
}
bool
@@ -78,38 +78,38 @@ imapCommand::isComplete ()
return mComplete;
}
-const QString &
+const TQString &
imapCommand::result ()
{
return mResult;
}
-const QString &
+const TQString &
imapCommand::resultInfo ()
{
return mResultInfo;
}
-const QString &
+const TQString &
imapCommand::id ()
{
return mId;
}
-const QString &
+const TQString &
imapCommand::parameter ()
{
return aParameter;
}
-const QString &
+const TQString &
imapCommand::command ()
{
return aCommand;
}
void
-imapCommand::setId (const QString & id)
+imapCommand::setId (const TQString & id)
{
if (mId.isEmpty ())
mId = id;
@@ -122,25 +122,25 @@ imapCommand::setComplete ()
}
void
-imapCommand::setResult (const QString & result)
+imapCommand::setResult (const TQString & result)
{
mResult = result;
}
void
-imapCommand::setResultInfo (const QString & result)
+imapCommand::setResultInfo (const TQString & result)
{
mResultInfo = result;
}
void
-imapCommand::setCommand (const QString & command)
+imapCommand::setCommand (const TQString & command)
{
aCommand = command;
}
void
-imapCommand::setParameter (const QString & parameter)
+imapCommand::setParameter (const TQString & parameter)
{
aParameter = parameter;
}
@@ -161,16 +161,16 @@ imapCommand::clientNoop ()
}
imapCommand *
-imapCommand::clientFetch (ulong uid, const QString & fields, bool nouid)
+imapCommand::clientFetch (ulong uid, const TQString & fields, bool nouid)
{
return clientFetch (uid, uid, fields, nouid);
}
imapCommand *
-imapCommand::clientFetch (ulong fromUid, ulong toUid, const QString & fields,
+imapCommand::clientFetch (ulong fromUid, ulong toUid, const TQString & fields,
bool nouid)
{
- QString uid = QString::number(fromUid);
+ TQString uid = TQString::number(fromUid);
if (fromUid != toUid)
{
@@ -178,13 +178,13 @@ imapCommand::clientFetch (ulong fromUid, ulong toUid, const QString & fields,
if (toUid < fromUid)
uid += "*";
else
- uid += QString::number(toUid);
+ uid += TQString::number(toUid);
}
return clientFetch (uid, fields, nouid);
}
imapCommand *
-imapCommand::clientFetch (const QString & sequence, const QString & fields,
+imapCommand::clientFetch (const TQString & sequence, const TQString & fields,
bool nouid)
{
return new imapCommand (nouid ? "FETCH" : "UID FETCH",
@@ -192,23 +192,23 @@ imapCommand::clientFetch (const QString & sequence, const QString & fields,
}
imapCommand *
-imapCommand::clientList (const QString & reference, const QString & path,
+imapCommand::clientList (const TQString & reference, const TQString & path,
bool lsub)
{
return new imapCommand (lsub ? "LSUB" : "LIST",
- QString ("\"") + rfcDecoder::toIMAP (reference) +
+ TQString ("\"") + rfcDecoder::toIMAP (reference) +
"\" \"" + rfcDecoder::toIMAP (path) + "\"");
}
imapCommand *
-imapCommand::clientSelect (const QString & path, bool examine)
+imapCommand::clientSelect (const TQString & path, bool examine)
{
Q_UNUSED(examine);
/** @note We use always SELECT, because UW-IMAP doesn't check for new mail, when
used with the "mbox driver" and the folder is opened with EXAMINE
and Courier can't append to a mailbox that is in EXAMINE state */
return new imapCommand ("SELECT",
- QString ("\"") + rfcDecoder::toIMAP (path) + "\"");
+ TQString ("\"") + rfcDecoder::toIMAP (path) + "\"");
}
imapCommand *
@@ -218,7 +218,7 @@ imapCommand::clientClose()
}
imapCommand *
-imapCommand::clientCopy (const QString & box, const QString & sequence,
+imapCommand::clientCopy (const TQString & box, const TQString & sequence,
bool nouid)
{
return new imapCommand (nouid ? "COPY" : "UID COPY",
@@ -226,74 +226,74 @@ imapCommand::clientCopy (const QString & box, const QString & sequence,
}
imapCommand *
-imapCommand::clientAppend (const QString & box, const QString & flags,
+imapCommand::clientAppend (const TQString & box, const TQString & flags,
ulong size)
{
return new imapCommand ("APPEND",
"\"" + rfcDecoder::toIMAP (box) + "\" " +
((flags.isEmpty()) ? "" : ("(" + flags + ") ")) +
- "{" + QString::number(size) + "}");
+ "{" + TQString::number(size) + "}");
}
imapCommand *
-imapCommand::clientStatus (const QString & path, const QString & parameters)
+imapCommand::clientStatus (const TQString & path, const TQString & parameters)
{
return new imapCommand ("STATUS",
- QString ("\"") + rfcDecoder::toIMAP (path) +
+ TQString ("\"") + rfcDecoder::toIMAP (path) +
"\" (" + parameters + ")");
}
imapCommand *
-imapCommand::clientCreate (const QString & path)
+imapCommand::clientCreate (const TQString & path)
{
return new imapCommand ("CREATE",
- QString ("\"") + rfcDecoder::toIMAP (path) + "\"");
+ TQString ("\"") + rfcDecoder::toIMAP (path) + "\"");
}
imapCommand *
-imapCommand::clientDelete (const QString & path)
+imapCommand::clientDelete (const TQString & path)
{
return new imapCommand ("DELETE",
- QString ("\"") + rfcDecoder::toIMAP (path) + "\"");
+ TQString ("\"") + rfcDecoder::toIMAP (path) + "\"");
}
imapCommand *
-imapCommand::clientSubscribe (const QString & path)
+imapCommand::clientSubscribe (const TQString & path)
{
return new imapCommand ("SUBSCRIBE",
- QString ("\"") + rfcDecoder::toIMAP (path) + "\"");
+ TQString ("\"") + rfcDecoder::toIMAP (path) + "\"");
}
imapCommand *
-imapCommand::clientUnsubscribe (const QString & path)
+imapCommand::clientUnsubscribe (const TQString & path)
{
return new imapCommand ("UNSUBSCRIBE",
- QString ("\"") + rfcDecoder::toIMAP (path) + "\"");
+ TQString ("\"") + rfcDecoder::toIMAP (path) + "\"");
}
imapCommand *
imapCommand::clientExpunge ()
{
- return new imapCommand ("EXPUNGE", QString (""));
+ return new imapCommand ("EXPUNGE", TQString (""));
}
imapCommand *
-imapCommand::clientRename (const QString & src, const QString & dest)
+imapCommand::clientRename (const TQString & src, const TQString & dest)
{
return new imapCommand ("RENAME",
- QString ("\"") + rfcDecoder::toIMAP (src) +
+ TQString ("\"") + rfcDecoder::toIMAP (src) +
"\" \"" + rfcDecoder::toIMAP (dest) + "\"");
}
imapCommand *
-imapCommand::clientSearch (const QString & search, bool nouid)
+imapCommand::clientSearch (const TQString & search, bool nouid)
{
return new imapCommand (nouid ? "SEARCH" : "UID SEARCH", search);
}
imapCommand *
-imapCommand::clientStore (const QString & set, const QString & item,
- const QString & data, bool nouid)
+imapCommand::clientStore (const TQString & set, const TQString & item,
+ const TQString & data, bool nouid)
{
return new imapCommand (nouid ? "STORE" : "UID STORE",
set + " " + item + " (" + data + ")");
@@ -312,50 +312,50 @@ imapCommand::clientStartTLS ()
}
imapCommand *
-imapCommand::clientSetACL( const QString& box, const QString& user, const QString& acl )
+imapCommand::clientSetACL( const TQString& box, const TQString& user, const TQString& acl )
{
- return new imapCommand ("SETACL", QString("\"") + rfcDecoder::toIMAP (box)
+ return new imapCommand ("SETACL", TQString("\"") + rfcDecoder::toIMAP (box)
+ "\" \"" + rfcDecoder::toIMAP (user)
+ "\" \"" + rfcDecoder::toIMAP (acl) + "\"");
}
imapCommand *
-imapCommand::clientDeleteACL( const QString& box, const QString& user )
+imapCommand::clientDeleteACL( const TQString& box, const TQString& user )
{
- return new imapCommand ("DELETEACL", QString("\"") + rfcDecoder::toIMAP (box)
+ return new imapCommand ("DELETEACL", TQString("\"") + rfcDecoder::toIMAP (box)
+ "\" \"" + rfcDecoder::toIMAP (user)
+ "\"");
}
imapCommand *
-imapCommand::clientGetACL( const QString& box )
+imapCommand::clientGetACL( const TQString& box )
{
- return new imapCommand ("GETACL", QString("\"") + rfcDecoder::toIMAP (box)
+ return new imapCommand ("GETACL", TQString("\"") + rfcDecoder::toIMAP (box)
+ "\"");
}
imapCommand *
-imapCommand::clientListRights( const QString& box, const QString& user )
+imapCommand::clientListRights( const TQString& box, const TQString& user )
{
- return new imapCommand ("LISTRIGHTS", QString("\"") + rfcDecoder::toIMAP (box)
+ return new imapCommand ("LISTRIGHTS", TQString("\"") + rfcDecoder::toIMAP (box)
+ "\" \"" + rfcDecoder::toIMAP (user)
+ "\"");
}
imapCommand *
-imapCommand::clientMyRights( const QString& box )
+imapCommand::clientMyRights( const TQString& box )
{
- return new imapCommand ("MYRIGHTS", QString("\"") + rfcDecoder::toIMAP (box)
+ return new imapCommand ("MYRIGHTS", TQString("\"") + rfcDecoder::toIMAP (box)
+ "\"");
}
imapCommand *
-imapCommand::clientSetAnnotation( const QString& box, const QString& entry, const QMap<QString, QString>& attributes )
+imapCommand::clientSetAnnotation( const TQString& box, const TQString& entry, const TQMap<TQString, TQString>& attributes )
{
- QString parameter = QString("\"") + rfcDecoder::toIMAP (box)
+ TQString parameter = TQString("\"") + rfcDecoder::toIMAP (box)
+ "\" \"" + rfcDecoder::toIMAP (entry)
+ "\" (";
- for( QMap<QString,QString>::ConstIterator it = attributes.begin(); it != attributes.end(); ++it ) {
+ for( TQMap<TQString,TQString>::ConstIterator it = attributes.begin(); it != attributes.end(); ++it ) {
parameter += "\"";
parameter += rfcDecoder::toIMAP (it.key());
parameter += "\" \"";
@@ -369,16 +369,16 @@ imapCommand::clientSetAnnotation( const QString& box, const QString& entry, cons
}
imapCommand *
-imapCommand::clientGetAnnotation( const QString& box, const QString& entry, const QStringList& attributeNames )
+imapCommand::clientGetAnnotation( const TQString& box, const TQString& entry, const TQStringList& attributeNames )
{
- QString parameter = QString("\"") + rfcDecoder::toIMAP (box)
+ TQString parameter = TQString("\"") + rfcDecoder::toIMAP (box)
+ "\" \"" + rfcDecoder::toIMAP (entry)
+ "\" ";
if ( attributeNames.count() == 1 )
parameter += "\"" + rfcDecoder::toIMAP (attributeNames.first()) + '"';
else {
parameter += '(';
- for( QStringList::ConstIterator it = attributeNames.begin(); it != attributeNames.end(); ++it ) {
+ for( TQStringList::ConstIterator it = attributeNames.begin(); it != attributeNames.end(); ++it ) {
parameter += "\"" + rfcDecoder::toIMAP (*it) + "\" ";
}
// Turn last space into a ')'
@@ -394,14 +394,14 @@ imapCommand::clientNamespace()
}
imapCommand *
-imapCommand::clientGetQuotaroot( const QString& box )
+imapCommand::clientGetQuotaroot( const TQString& box )
{
- QString parameter = QString("\"") + rfcDecoder::toIMAP (box) + '"';
- return new imapCommand ("GETQUOTAROOT", parameter);
+ TQString parameter = TQString("\"") + rfcDecoder::toIMAP (box) + '"';
+ return new imapCommand ("GEQUOTAROOT", parameter);
}
imapCommand *
-imapCommand::clientCustom( const QString& command, const QString& arguments )
+imapCommand::clientCustom( const TQString& command, const TQString& arguments )
{
return new imapCommand (command, arguments);
}