summaryrefslogtreecommitdiffstats
path: root/kresources/kolab/shared/kmailconnection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kresources/kolab/shared/kmailconnection.cpp')
-rw-r--r--kresources/kolab/shared/kmailconnection.cpp134
1 files changed, 67 insertions, 67 deletions
diff --git a/kresources/kolab/shared/kmailconnection.cpp b/kresources/kolab/shared/kmailconnection.cpp
index 6db9f3dab..9135e16db 100644
--- a/kresources/kolab/shared/kmailconnection.cpp
+++ b/kresources/kolab/shared/kmailconnection.cpp
@@ -47,7 +47,7 @@ using namespace Kolab;
KMailConnection::KMailConnection( ResourceKolabBase* resource,
- const QCString& objId )
+ const TQCString& objId )
: DCOPObject( objId ), mResource( resource ), mKMailIcalIfaceStub( 0 )
{
// Make the connection to KMail ready
@@ -56,8 +56,8 @@ KMailConnection::KMailConnection( ResourceKolabBase* resource,
mDCOPClient->registerAs( objId, true );
kapp->dcopClient()->setNotifications( true );
- connect( kapp->dcopClient(), SIGNAL( applicationRemoved( const QCString& ) ),
- this, SLOT( unregisteredFromDCOP( const QCString& ) ) );
+ connect( kapp->dcopClient(), TQT_SIGNAL( applicationRemoved( const TQCString& ) ),
+ this, TQT_SLOT( unregisteredFromDCOP( const TQCString& ) ) );
}
KMailConnection::~KMailConnection()
@@ -69,15 +69,15 @@ KMailConnection::~KMailConnection()
mDCOPClient = 0;
}
-static const QCString dcopObjectId = "KMailICalIface";
+static const TQCString dcopObjectId = "KMailICalIface";
bool KMailConnection::connectToKMail()
{
if ( !mKMailIcalIfaceStub ) {
- QString error;
- QCString dcopService;
+ TQString error;
+ TQCString dcopService;
int result = KDCOPServiceStarter::self()->
- findServiceFor( "DCOP/ResourceBackend/IMAP", QString::null,
- QString::null, &error, &dcopService );
+ findServiceFor( "DCOP/ResourceBackend/IMAP", TQString::null,
+ TQString::null, &error, &dcopService );
if ( result != 0 ) {
kdError(5650) << "Couldn't connect to the IMAP resource backend\n";
// TODO: You might want to show "error" (if not empty) here,
@@ -89,34 +89,34 @@ bool KMailConnection::connectToKMail()
dcopService, dcopObjectId );
// Attach to the KMail signals
- if ( !connectKMailSignal( "incidenceAdded(QString,QString,Q_UINT32,int,QString)",
- "fromKMailAddIncidence(QString,QString,Q_UINT32,int,QString)" ) )
+ if ( !connectKMailSignal( "incidenceAdded(TQString,TQString,Q_UINT32,int,TQString)",
+ "fromKMailAddIncidence(TQString,TQString,Q_UINT32,int,TQString)" ) )
kdError(5650) << "DCOP connection to incidenceAdded failed" << endl;
- if ( !connectKMailSignal( "incidenceDeleted(QString,QString,QString)",
- "fromKMailDelIncidence(QString,QString,QString)" ) )
+ if ( !connectKMailSignal( "incidenceDeleted(TQString,TQString,TQString)",
+ "fromKMailDelIncidence(TQString,TQString,TQString)" ) )
kdError(5650) << "DCOP connection to incidenceDeleted failed" << endl;
- if ( !connectKMailSignal( "signalRefresh(QString,QString)",
- "fromKMailRefresh(QString,QString)" ) )
+ if ( !connectKMailSignal( "signalRefresh(TQString,TQString)",
+ "fromKMailRefresh(TQString,TQString)" ) )
kdError(5650) << "DCOP connection to signalRefresh failed" << endl;
- if ( !connectKMailSignal( "subresourceAdded( QString, QString, QString, bool, bool )",
- "fromKMailAddSubresource( QString, QString, QString, bool, bool )" ) )
+ if ( !connectKMailSignal( "subresourceAdded( TQString, TQString, TQString, bool, bool )",
+ "fromKMailAddSubresource( TQString, TQString, TQString, bool, bool )" ) )
kdError(5650) << "DCOP connection to subresourceAdded failed" << endl;
- if ( !connectKMailSignal( "subresourceDeleted(QString,QString)",
- "fromKMailDelSubresource(QString,QString)" ) )
+ if ( !connectKMailSignal( "subresourceDeleted(TQString,TQString)",
+ "fromKMailDelSubresource(TQString,TQString)" ) )
kdError(5650) << "DCOP connection to subresourceDeleted failed" << endl;
- if ( !connectKMailSignal( "asyncLoadResult(QMap<Q_UINT32, QString>, QString, QString)",
- "fromKMailAsyncLoadResult(QMap<Q_UINT32, QString>, QString, QString)" ) )
+ if ( !connectKMailSignal( "asyncLoadResult(TQMap<Q_UINT32, TQString>, TQString, TQString)",
+ "fromKMailAsyncLoadResult(TQMap<Q_UINT32, TQString>, TQString, TQString)" ) )
kdError(5650) << "DCOP connection to asyncLoadResult failed" << endl;
}
return ( mKMailIcalIfaceStub != 0 );
}
-bool KMailConnection::fromKMailAddIncidence( const QString& type,
- const QString& folder,
+bool KMailConnection::fromKMailAddIncidence( const TQString& type,
+ const TQString& folder,
Q_UINT32 sernum,
int format,
- const QString& data )
+ const TQString& data )
{
if ( format != KMailICalIface::StorageXML
&& format != KMailICalIface::StorageIcalVcard )
@@ -126,25 +126,25 @@ bool KMailConnection::fromKMailAddIncidence( const QString& type,
return mResource->fromKMailAddIncidence( type, folder, sernum, format, data );
}
-void KMailConnection::fromKMailDelIncidence( const QString& type,
- const QString& folder,
- const QString& xml )
+void KMailConnection::fromKMailDelIncidence( const TQString& type,
+ const TQString& folder,
+ const TQString& xml )
{
// kdDebug(5650) << "KMailConnection::fromKMailDelIncidence( " << type << ", "
// << folder << ", " << uid << " )\n";
mResource->fromKMailDelIncidence( type, folder, xml );
}
-void KMailConnection::fromKMailRefresh( const QString& type, const QString& folder )
+void KMailConnection::fromKMailRefresh( const TQString& type, const TQString& folder )
{
// kdDebug(5650) << "KMailConnection::fromKMailRefresh( " << type << ", "
// << folder << " )\n";
mResource->fromKMailRefresh( type, folder );
}
-void KMailConnection::fromKMailAddSubresource( const QString& type,
- const QString& resource,
- const QString& label,
+void KMailConnection::fromKMailAddSubresource( const TQString& type,
+ const TQString& resource,
+ const TQString& label,
bool writable,
bool alarmRelevant )
{
@@ -154,30 +154,30 @@ void KMailConnection::fromKMailAddSubresource( const QString& type,
writable, alarmRelevant );
}
-void KMailConnection::fromKMailDelSubresource( const QString& type,
- const QString& resource )
+void KMailConnection::fromKMailDelSubresource( const TQString& type,
+ const TQString& resource )
{
// kdDebug(5650) << "KMailConnection::fromKMailDelSubresource( " << type << ", "
// << resource << " )\n";
mResource->fromKMailDelSubresource( type, resource );
}
-void KMailConnection::fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& map,
- const QString& type,
- const QString& folder )
+void KMailConnection::fromKMailAsyncLoadResult( const TQMap<Q_UINT32, TQString>& map,
+ const TQString& type,
+ const TQString& folder )
{
mResource->fromKMailAsyncLoadResult( map, type, folder );
}
-bool KMailConnection::connectKMailSignal( const QCString& signal,
- const QCString& method )
+bool KMailConnection::connectKMailSignal( const TQCString& signal,
+ const TQCString& method )
{
return connectDCOPSignal( "kmail", dcopObjectId, signal, method, false )
&& connectDCOPSignal( "kontact", dcopObjectId, signal, method, false );
}
-bool KMailConnection::kmailSubresources( QValueList<KMailICalIface::SubResource>& lst,
- const QString& contentsType )
+bool KMailConnection::kmailSubresources( TQValueList<KMailICalIface::SubResource>& lst,
+ const TQString& contentsType )
{
if ( !connectToKMail() )
return false;
@@ -187,8 +187,8 @@ bool KMailConnection::kmailSubresources( QValueList<KMailICalIface::SubResource>
}
bool KMailConnection::kmailIncidencesCount( int& count,
- const QString& mimetype,
- const QString& resource )
+ const TQString& mimetype,
+ const TQString& resource )
{
if ( !connectToKMail() )
return false;
@@ -197,9 +197,9 @@ bool KMailConnection::kmailIncidencesCount( int& count,
return mKMailIcalIfaceStub->ok();
}
-bool KMailConnection::kmailIncidences( QMap<Q_UINT32, QString>& lst,
- const QString& mimetype,
- const QString& resource,
+bool KMailConnection::kmailIncidences( TQMap<Q_UINT32, TQString>& lst,
+ const TQString& mimetype,
+ const TQString& resource,
int startIndex,
int nbMessages )
{
@@ -212,9 +212,9 @@ bool KMailConnection::kmailIncidences( QMap<Q_UINT32, QString>& lst,
bool KMailConnection::kmailGetAttachment( KURL& url,
- const QString& resource,
+ const TQString& resource,
Q_UINT32 sernum,
- const QString& filename )
+ const TQString& filename )
{
if ( !connectToKMail() )
return false;
@@ -223,10 +223,10 @@ bool KMailConnection::kmailGetAttachment( KURL& url,
return mKMailIcalIfaceStub->ok();
}
-bool KMailConnection::kmailAttachmentMimetype( QString & mimeType,
- const QString & resource,
+bool KMailConnection::kmailAttachmentMimetype( TQString & mimeType,
+ const TQString & resource,
Q_UINT32 sernum,
- const QString & filename )
+ const TQString & filename )
{
if ( !connectToKMail() )
return false;
@@ -234,8 +234,8 @@ bool KMailConnection::kmailAttachmentMimetype( QString & mimeType,
return mKMailIcalIfaceStub->ok();
}
-bool KMailConnection::kmailListAttachments(QStringList &list,
- const QString & resource, Q_UINT32 sernum)
+bool KMailConnection::kmailListAttachments(TQStringList &list,
+ const TQString & resource, Q_UINT32 sernum)
{
if ( !connectToKMail() )
return false;
@@ -244,7 +244,7 @@ bool KMailConnection::kmailListAttachments(QStringList &list,
return mKMailIcalIfaceStub->ok();
}
-bool KMailConnection::kmailDeleteIncidence( const QString& resource,
+bool KMailConnection::kmailDeleteIncidence( const TQString& resource,
Q_UINT32 sernum )
{
return connectToKMail()
@@ -252,15 +252,15 @@ bool KMailConnection::kmailDeleteIncidence( const QString& resource,
&& mKMailIcalIfaceStub->ok();
}
-bool KMailConnection::kmailUpdate( const QString& resource,
+bool KMailConnection::kmailUpdate( const TQString& resource,
Q_UINT32& sernum,
- const QString& subject,
- const QString& plainTextBody,
- const QMap<QCString, QString>& customHeaders,
- const QStringList& attachmentURLs,
- const QStringList& attachmentMimetypes,
- const QStringList& attachmentNames,
- const QStringList& deletedAttachments )
+ const TQString& subject,
+ const TQString& plainTextBody,
+ const TQMap<TQCString, TQString>& customHeaders,
+ const TQStringList& attachmentURLs,
+ const TQStringList& attachmentMimetypes,
+ const TQStringList& attachmentNames,
+ const TQStringList& deletedAttachments )
{
//kdDebug(5006) << kdBacktrace() << endl;
if ( connectToKMail() ) {
@@ -272,16 +272,16 @@ bool KMailConnection::kmailUpdate( const QString& resource,
return false;
}
-bool KMailConnection::kmailAddSubresource( const QString& resource,
- const QString& parent,
- const QString& contentsType )
+bool KMailConnection::kmailAddSubresource( const TQString& resource,
+ const TQString& parent,
+ const TQString& contentsType )
{
return connectToKMail()
&& mKMailIcalIfaceStub->addSubresource( resource, parent, contentsType )
&& mKMailIcalIfaceStub->ok();
}
-bool KMailConnection::kmailRemoveSubresource( const QString& resource )
+bool KMailConnection::kmailRemoveSubresource( const TQString& resource )
{
return connectToKMail()
&& mKMailIcalIfaceStub->removeSubresource( resource )
@@ -290,7 +290,7 @@ bool KMailConnection::kmailRemoveSubresource( const QString& resource )
bool KMailConnection::kmailStorageFormat( KMailICalIface::StorageFormat& type,
- const QString& folder )
+ const TQString& folder )
{
bool ok = connectToKMail();
type = mKMailIcalIfaceStub->storageFormat( folder );
@@ -298,13 +298,13 @@ bool KMailConnection::kmailStorageFormat( KMailICalIface::StorageFormat& type,
}
-bool KMailConnection::kmailTriggerSync( const QString &contentsType )
+bool KMailConnection::kmailTriggerSync( const TQString &contentsType )
{
bool ok = connectToKMail();
return ok && mKMailIcalIfaceStub->triggerSync( contentsType );
}
-void KMailConnection::unregisteredFromDCOP( const QCString& appId )
+void KMailConnection::unregisteredFromDCOP( const TQCString& appId )
{
if ( mKMailIcalIfaceStub && mKMailIcalIfaceStub->app() == appId ) {
// Delete the stub so that the next time we need to talk to kmail,