summaryrefslogtreecommitdiffabout
path: root/libkdepim/externalapphandler.cpp
Unidiff
Diffstat (limited to 'libkdepim/externalapphandler.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/externalapphandler.cpp52
1 files changed, 35 insertions, 17 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}