summaryrefslogtreecommitdiffabout
authorulf69 <ulf69>2004-08-19 00:33:04 (UTC)
committer ulf69 <ulf69>2004-08-19 00:33:04 (UTC)
commit00101d27c9305ac3163e1a0c8ed27408b41fa192 (patch) (unidiff)
tree3051c96ef71245c97fb18d0804749e7d04bd4ad2
parent05a1b5cbea6a7c1a7500632f8e7c1bf5be9328d8 (diff)
downloadkdepimpi-00101d27c9305ac3163e1a0c8ed27408b41fa192.zip
kdepimpi-00101d27c9305ac3163e1a0c8ed27408b41fa192.tar.gz
kdepimpi-00101d27c9305ac3163e1a0c8ed27408b41fa192.tar.bz2
code cleanup
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/externalapphandler.cpp52
-rw-r--r--libkdepim/externalapphandler.h10
2 files changed, 40 insertions, 22 deletions
diff --git a/libkdepim/externalapphandler.cpp b/libkdepim/externalapphandler.cpp
index b57506b..bd83626 100644
--- a/libkdepim/externalapphandler.cpp
+++ b/libkdepim/externalapphandler.cpp
@@ -36,3 +36,6 @@ $Id$
36#ifndef DESKTOP_VERSION 36#ifndef DESKTOP_VERSION
37#include <qpe/qpeapplication.h>
37#include <qtopia/qcopenvelope_qws.h> 38#include <qtopia/qcopenvelope_qws.h>
39#else
40#include <qapplication.h>
38#endif 41#endif
@@ -56,3 +59,10 @@ QCopTransferItem::QCopTransferItem(int usedSourceParameters, const QString& sour
56 //sourceMessage passes later three parameters: sourceChannel, uid, param1 59 //sourceMessage passes later three parameters: sourceChannel, uid, param1
57 _sourceMessageParameters = "(QString,QString,QString)"; 60 if (_usedSourceParameters == 0)
61 _sourceMessageParameters = "(QString,QString)";
62 else if (_usedSourceParameters == 1)
63 _sourceMessageParameters = "(QString,QString,QString)";
64 else if (_usedSourceParameters == 2)
65 _sourceMessageParameters = "(QString,QString,QString,QString)";
66 else if (_usedSourceParameters == 3)
67 _sourceMessageParameters = "(QString,QString,QString,QString,QString)";
58} 68}
@@ -74,3 +84,3 @@ bool QCopTransferItem::sendMessageToTarget(const QString& uid, const QString& pa
74 qDebug("Using QCopEnvelope e(\"%s\",\"%s\")", _targetChannel.latin1(), sourceMessage.latin1()); 84 qDebug("Using QCopEnvelope e(\"%s\",\"%s\")", _targetChannel.latin1(), sourceMessage.latin1());
75 qDebug("passing sourcechannel(%s), uid(%s), param1(%s), param3(%s), param3(%s) as parameter to QCopEnvelope", _sourceChannel.latin1(), uid.latin1(), param1.latin1(), param2.latin1(), param3.latin1()); 85 qDebug("passing sourcechannel(%s), uid(%s), param1(%s), param2(%s), param3(%s) as parameter to QCopEnvelope", _sourceChannel.latin1(), uid.latin1(), param1.latin1(), param2.latin1(), param3.latin1());
76 86
@@ -87,2 +97,3 @@ bool QCopTransferItem::sendMessageToTarget(const QString& uid, const QString& pa
87 97
98 qApp->processEvents();
88 99
@@ -110,16 +121,18 @@ bool QCopTransferItem::appMessage( const QCString& cmsg, const QByteArray& data
110{ 121{
111/*US 122
112 // copied from old mail2 123 // copied from old mail2
124/*
113 static int ii = 0; 125 static int ii = 0;
114 126
115 // block second call 127 // block second call
116 if ( ii < 2 ) { 128 if ( ii < 2 ) {
117 ++ii; 129 ++ii;
118 if ( ii > 1 ) { 130 if ( ii > 1 ) {
119 qDebug("qcop call blocked "); 131 qDebug("qcop call blocked ");
120 return true; 132 return true;
133 }
121 } 134 }
122 }
123*/ 135*/
124 qDebug("QCopTransferItem- QCOP message received: %s ", cmsg.data() ); 136
137// qDebug("QCopTransferItem- QCOP message received: %s ", cmsg.data() );
125 138
@@ -128,2 +141,3 @@ bool QCopTransferItem::appMessage( const QCString& cmsg, const QByteArray& data
128 { 141 {
142
129 QDataStream stream( data, IO_ReadOnly ); 143 QDataStream stream( data, IO_ReadOnly );
@@ -193,2 +207,4 @@ bool QCopMapTransferItem::sendMessageToSource(const QString& uid, const QMap<QSt
193 207
208 qApp->processEvents();
209
194 return true; 210 return true;
@@ -212,3 +228,3 @@ bool QCopMapTransferItem::appMessage( const QCString& cmsg, const QByteArray& da
212 228
213 qDebug("QCopMapTransferItem- QCOP message received: %s ", cmsg.data() ); 229// qDebug("QCopMapTransferItem- QCOP message received: %s ", cmsg.data() );
214 230
@@ -260,2 +276,4 @@ bool QCopListTransferItem::sendMessageToSource(const QString& uid, const QString
260 276
277 qApp->processEvents();
278
261 return true; 279 return true;
@@ -279,3 +297,3 @@ bool QCopListTransferItem::appMessage( const QCString& cmsg, const QByteArray& d
279 297
280 qDebug("QCopListTransferItem- QCOP message received: %s ", cmsg.data() ); 298// qDebug("QCopListTransferItem- QCOP message received: %s ", cmsg.data() );
281 299
@@ -324,3 +342,3 @@ ExternalAppHandler::ExternalAppHandler()
324 mDisplayDetails = new QCopListTransferItem(3, "requestDisplayDetailsFromKAPI", "QPE/Application/kapi", ""); 342 mDisplayDetails = new QCopListTransferItem(3, "requestDisplayDetailsFromKAPI", "QPE/Application/kapi", "");
325 connect(mDisplayDetails, SIGNAL (receivedMessageFromSource(const QString&, const QString&, const QString&, const QString&)), this, SIGNAL (requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&))); 343 connect(mDisplayDetails, SIGNAL (receivedMessageFromSource(const QString&, const QString&, const QString&, const QString&, const QString&)), this, SIGNAL (requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&)));
326} 344}
@@ -988,6 +1006,6 @@ bool ExternalAppHandler::returnFindByEmailFromKAPI(const QString& sourceChannel,
988 1006
989bool ExternalAppHandler::requestDetailsFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid) 1007bool ExternalAppHandler::requestDetailsFromKAPI(const QString& name, const QString& email, const QString& uid)
990{ 1008{
991 mDisplayDetails->setSourceChannel(sourceChannel); 1009 mDisplayDetails->setSourceChannel("");
992 return mDisplayDetails->sendMessageToTarget(sessionuid, name, email, uid); 1010 return mDisplayDetails->sendMessageToTarget("", name, email, uid);
993} 1011}
diff --git a/libkdepim/externalapphandler.h b/libkdepim/externalapphandler.h
index a74080f..1b04b2b 100644
--- a/libkdepim/externalapphandler.h
+++ b/libkdepim/externalapphandler.h
@@ -200,10 +200,10 @@ class ExternalAppHandler : public QObject
200 //Call this method on the source when you want to select names from the addressbook by using QCop 200 //Call this method on the source when you want to select names from the addressbook by using QCop
201 bool requestNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& uid); 201 bool requestNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid);
202 //Call this method on the target when you want to return the name/email map to the source (client). 202 //Call this method on the target when you want to return the name/email map to the source (client).
203 bool returnNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& uid, const QStringList& name, const QStringList& email, const QStringList& uid); 203 bool returnNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& name, const QStringList& email, const QStringList& uid);
204 204
205 bool requestFindByEmailFromKAPI(const QString& sourceChannel, const QString& uid, const QString& email); 205 bool requestFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QString& email);
206 bool returnFindByEmailFromKAPI(const QString& sourceChannel, const QString& uid, const QStringList& name, const QStringList& email, const QStringList& uid); 206 bool returnFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& name, const QStringList& email, const QStringList& uid);
207 207
208 bool requestDetailsFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid); 208 bool requestDetailsFromKAPI(const QString& name, const QString& email, const QString& uid);
209 209