author | zautrix <zautrix> | 2004-09-17 09:46:54 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-17 09:46:54 (UTC) |
commit | 9421138854b85a9baced09649f617118502610c1 (patch) (unidiff) | |
tree | a7f78207de34e2b67d3a4709531714cb848f3d16 | |
parent | 6341e161c5af4e5ac1d1d3ec9fdabf04b287800f (diff) | |
download | kdepimpi-9421138854b85a9baced09649f617118502610c1.zip kdepimpi-9421138854b85a9baced09649f617118502610c1.tar.gz kdepimpi-9421138854b85a9baced09649f617118502610c1.tar.bz2 |
Fixed bug externalapphandler
-rw-r--r-- | libkdepim/externalapphandler.cpp | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/libkdepim/externalapphandler.cpp b/libkdepim/externalapphandler.cpp index fa56ee9..99aee86 100644 --- a/libkdepim/externalapphandler.cpp +++ b/libkdepim/externalapphandler.cpp | |||
@@ -80,9 +80,9 @@ bool QCopTransferItem::sendMessageToTarget(const QString& uid, const QString& pa | |||
80 | #ifndef DESKTOP_VERSION | 80 | #ifndef DESKTOP_VERSION |
81 | //sourceMessage passes two parameters: sourceChannel, uid | 81 | //sourceMessage passes two parameters: sourceChannel, uid |
82 | QString sourceMessage = _sourceMessage + _sourceMessageParameters; | 82 | QString sourceMessage = _sourceMessage + _sourceMessageParameters; |
83 | 83 | ||
84 | qDebug("Using QCopEnvelope e(\"%s\",\"%s\")", _targetChannel.latin1(), sourceMessage.latin1()); | 84 | qDebug("1Using QCopEnvelope e(\"%s\",\"%s\")", _targetChannel.latin1(), sourceMessage.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()); | 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()); |
86 | 86 | ||
87 | QCopEnvelope e(_targetChannel.latin1(), sourceMessage.latin1()); | 87 | QCopEnvelope e(_targetChannel.latin1(), sourceMessage.latin1()); |
88 | 88 | ||
@@ -110,10 +110,10 @@ bool QCopTransferItem::sendMessageToTarget(const QString& uid, const QString& pa | |||
110 | /*********************************************************************************/ | 110 | /*********************************************************************************/ |
111 | void QCopTransferItem::setSourceChannel(const QString& sourceChannel) | 111 | void QCopTransferItem::setSourceChannel(const QString& sourceChannel) |
112 | { | 112 | { |
113 | 113 | ||
114 | if (_sourceChannel.isEmpty()) | 114 | if ( !sourceChannel.isEmpty()) |
115 | _sourceChannel = sourceChannel; | 115 | _sourceChannel = sourceChannel; |
116 | } | 116 | } |
117 | 117 | ||
118 | 118 | ||
119 | /*********************************************************************************/ | 119 | /*********************************************************************************/ |
@@ -196,9 +196,9 @@ bool QCopMapTransferItem::sendMessageToSource(const QString& uid, const QMap<QSt | |||
196 | #ifndef DESKTOP_VERSION | 196 | #ifndef DESKTOP_VERSION |
197 | //targetMessage passes two parameters: uid, map | 197 | //targetMessage passes two parameters: uid, map |
198 | QString targetMessage = _targetMessage + _targetMessageParameters; | 198 | QString targetMessage = _targetMessage + _targetMessageParameters; |
199 | 199 | ||
200 | qDebug("Using QCopEnvelope e(\"%s\",\"%s\")", _sourceChannel.latin1(), targetMessage.latin1()); | 200 | qDebug("2Using QCopEnvelope e(\"%s\",\"%s\")", _sourceChannel.latin1(), targetMessage.latin1()); |
201 | qDebug("passing uid(%s) and map as parameter to QCopEnvelope", uid.latin1()); | 201 | qDebug("passing uid(%s) and map as parameter to QCopEnvelope", uid.latin1()); |
202 | 202 | ||
203 | QCopEnvelope e(_sourceChannel.latin1(), targetMessage.latin1()); | 203 | QCopEnvelope e(_sourceChannel.latin1(), targetMessage.latin1()); |
204 | //US we need no names in the To field. The emailadresses are enough | 204 | //US we need no names in the To field. The emailadresses are enough |
@@ -265,9 +265,9 @@ bool QCopListTransferItem::sendMessageToSource(const QString& uid, const QString | |||
265 | #ifndef DESKTOP_VERSION | 265 | #ifndef DESKTOP_VERSION |
266 | //targetMessage passes two parameters: uid, map | 266 | //targetMessage passes two parameters: uid, map |
267 | QString targetMessage = _targetMessage + _targetMessageParameters; | 267 | QString targetMessage = _targetMessage + _targetMessageParameters; |
268 | 268 | ||
269 | qDebug("Using QCopEnvelope e(\"%s\",\"%s\")", _sourceChannel.latin1(), targetMessage.latin1()); | 269 | qDebug("3Using QCopEnvelope e(\"%s\",\"%s\")", _sourceChannel.latin1(), targetMessage.latin1()); |
270 | qDebug("passing uid(%s) and list1, list2, list3 as parameter to QCopEnvelope", uid.latin1()); | 270 | qDebug("passing uid(%s) and list1, list2, list3 as parameter to QCopEnvelope", uid.latin1()); |
271 | 271 | ||
272 | QCopEnvelope e(_sourceChannel.latin1(), targetMessage.latin1()); | 272 | QCopEnvelope e(_sourceChannel.latin1(), targetMessage.latin1()); |
273 | //US we need no names in the To field. The emailadresses are enough | 273 | //US we need no names in the To field. The emailadresses are enough |
@@ -289,14 +289,15 @@ bool QCopListTransferItem::sendMessageToSource(const QString& uid, const QString | |||
289 | /*********************************************************************************/ | 289 | /*********************************************************************************/ |
290 | bool QCopListTransferItem::appMessage( const QCString& cmsg, const QByteArray& data ) | 290 | bool QCopListTransferItem::appMessage( const QCString& cmsg, const QByteArray& data ) |
291 | { | 291 | { |
292 | bool res = QCopTransferItem::appMessage( cmsg, data ); | 292 | bool res = QCopTransferItem::appMessage( cmsg, data ); |
293 | qDebug("1QCopListTransferItem- QCOP message received: %s ", cmsg.data() ); | ||
293 | 294 | ||
294 | if (res == false) | 295 | if (res == false) |
295 | { | 296 | { |
296 | QDataStream stream( data, IO_ReadOnly ); | 297 | QDataStream stream( data, IO_ReadOnly ); |
297 | 298 | ||
298 | // qDebug("QCopListTransferItem- QCOP message received: %s ", cmsg.data() ); | 299 | qDebug("2QCopListTransferItem- QCOP message received: %s ", cmsg.data() ); |
299 | 300 | ||
300 | //we are in the source and get an answer from the target | 301 | //we are in the source and get an answer from the target |
301 | if ((_targetMessage + _targetMessageParameters) == cmsg.data()) | 302 | if ((_targetMessage + _targetMessageParameters) == cmsg.data()) |
302 | { | 303 | { |
@@ -603,9 +604,9 @@ bool ExternalAppHandler::mailToMultipleContacts( const QString& emails, const QS | |||
603 | //first check if one of the mailers need the emails right in the message. | 604 | //first check if one of the mailers need the emails right in the message. |
604 | message2 = translateMessage(message2, emails, urls); | 605 | message2 = translateMessage(message2, emails, urls); |
605 | 606 | ||
606 | 607 | ||
607 | qDebug("Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message2.latin1()); | 608 | qDebug("4Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message2.latin1()); |
608 | qDebug("passing emailadresses(%s), attachmenturls(%s) as parameters in the form %s to QCopEnvelope", emails.latin1() , urls.latin1(), parameters2.latin1()); | 609 | qDebug("passing emailadresses(%s), attachmenturls(%s) as parameters in the form %s to QCopEnvelope", emails.latin1() , urls.latin1(), parameters2.latin1()); |
609 | 610 | ||
610 | 611 | ||
611 | QCopEnvelope e(channel.latin1(), message2.latin1()); | 612 | QCopEnvelope e(channel.latin1(), message2.latin1()); |
@@ -660,9 +661,9 @@ bool ExternalAppHandler::mailToOneContact( const QString& name, const QString& e | |||
660 | //first check if one of the mailers need the emails right in the message. | 661 | //first check if one of the mailers need the emails right in the message. |
661 | message = translateMessage(message, name, emailadress); | 662 | message = translateMessage(message, name, emailadress); |
662 | 663 | ||
663 | 664 | ||
664 | qDebug("Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); | 665 | qDebug("5Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); |
665 | qDebug("passing name(%s), emailadresses(%s) as parameters in the form %s to QCopEnvelope", name.latin1(), emailadress.latin1(), parameters.latin1()); | 666 | qDebug("passing name(%s), emailadresses(%s) as parameters in the form %s to QCopEnvelope", name.latin1(), emailadress.latin1(), parameters.latin1()); |
666 | 667 | ||
667 | QCopEnvelope e(channel.latin1(), message.latin1()); | 668 | QCopEnvelope e(channel.latin1(), message.latin1()); |
668 | //US we need no names in the To field. The emailadresses are enough | 669 | //US we need no names in the To field. The emailadresses are enough |
@@ -737,9 +738,9 @@ bool ExternalAppHandler::callByPhone( const QString& phonenumber ) | |||
737 | //first check if one of the mailers need the emails right in the message. | 738 | //first check if one of the mailers need the emails right in the message. |
738 | message = translateMessage(message, phonenumber, ""); | 739 | message = translateMessage(message, phonenumber, ""); |
739 | 740 | ||
740 | 741 | ||
741 | qDebug("Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); | 742 | qDebug("6Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); |
742 | qDebug("passing phonenumber(%s) as parameter in the form %s to QCopEnvelope", phonenumber.latin1(), parameters.latin1()); | 743 | qDebug("passing phonenumber(%s) as parameter in the form %s to QCopEnvelope", phonenumber.latin1(), parameters.latin1()); |
743 | 744 | ||
744 | QCopEnvelope e(channel.latin1(), message.latin1()); | 745 | QCopEnvelope e(channel.latin1(), message.latin1()); |
745 | //US we need no names in the To field. The emailadresses are enough | 746 | //US we need no names in the To field. The emailadresses are enough |
@@ -792,9 +793,9 @@ bool ExternalAppHandler::callBySMS( const QString& phonenumber ) | |||
792 | //first check if one of the mailers need the emails right in the message. | 793 | //first check if one of the mailers need the emails right in the message. |
793 | message = translateMessage(message, phonenumber, ""); | 794 | message = translateMessage(message, phonenumber, ""); |
794 | 795 | ||
795 | 796 | ||
796 | qDebug("Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); | 797 | qDebug("7Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); |
797 | qDebug("passing phonenumber(%s) as parameter in the form %s to QCopEnvelope", phonenumber.latin1(), parameters.latin1()); | 798 | qDebug("passing phonenumber(%s) as parameter in the form %s to QCopEnvelope", phonenumber.latin1(), parameters.latin1()); |
798 | 799 | ||
799 | QCopEnvelope e(channel.latin1(), message.latin1()); | 800 | QCopEnvelope e(channel.latin1(), message.latin1()); |
800 | //US we need no names in the To field. The emailadresses are enough | 801 | //US we need no names in the To field. The emailadresses are enough |
@@ -847,9 +848,9 @@ bool ExternalAppHandler::callByPager( const QString& pagernumber ) | |||
847 | //first check if one of the mailers need the emails right in the message. | 848 | //first check if one of the mailers need the emails right in the message. |
848 | message = translateMessage(message, pagernumber, ""); | 849 | message = translateMessage(message, pagernumber, ""); |
849 | 850 | ||
850 | 851 | ||
851 | qDebug("Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); | 852 | qDebug("8Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); |
852 | qDebug("passing pagernumber(%s) as parameter in the form %s to QCopEnvelope", pagernumber.latin1(), parameters.latin1()); | 853 | qDebug("passing pagernumber(%s) as parameter in the form %s to QCopEnvelope", pagernumber.latin1(), parameters.latin1()); |
853 | 854 | ||
854 | QCopEnvelope e(channel.latin1(), message.latin1()); | 855 | QCopEnvelope e(channel.latin1(), message.latin1()); |
855 | //US we need no names in the To field. The emailadresses are enough | 856 | //US we need no names in the To field. The emailadresses are enough |
@@ -902,9 +903,9 @@ bool ExternalAppHandler::callByFax( const QString& faxnumber ) | |||
902 | //first check if one of the mailers need the emails right in the message. | 903 | //first check if one of the mailers need the emails right in the message. |
903 | message = translateMessage(message, faxnumber, ""); | 904 | message = translateMessage(message, faxnumber, ""); |
904 | 905 | ||
905 | 906 | ||
906 | qDebug("Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); | 907 | qDebug("9Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); |
907 | qDebug("passing faxnumber(%s) as parameter in the form %s to QCopEnvelope", faxnumber.latin1(), parameters.latin1()); | 908 | qDebug("passing faxnumber(%s) as parameter in the form %s to QCopEnvelope", faxnumber.latin1(), parameters.latin1()); |
908 | 909 | ||
909 | QCopEnvelope e(channel.latin1(), message.latin1()); | 910 | QCopEnvelope e(channel.latin1(), message.latin1()); |
910 | //US we need no names in the To field. The emailadresses are enough | 911 | //US we need no names in the To field. The emailadresses are enough |
@@ -957,9 +958,9 @@ bool ExternalAppHandler::callBySIP( const QString& sipnumber ) | |||
957 | //first check if one of the sip apps need the emails right in the message. | 958 | //first check if one of the sip apps need the emails right in the message. |
958 | message = translateMessage(message, sipnumber, ""); | 959 | message = translateMessage(message, sipnumber, ""); |
959 | 960 | ||
960 | 961 | ||
961 | qDebug("Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); | 962 | qDebug("10Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); |
962 | qDebug("passing sipnumber(%s) as parameter in the form %s to QCopEnvelope", sipnumber.latin1(), parameters.latin1()); | 963 | qDebug("passing sipnumber(%s) as parameter in the form %s to QCopEnvelope", sipnumber.latin1(), parameters.latin1()); |
963 | 964 | ||
964 | QCopEnvelope e(channel.latin1(), message.latin1()); | 965 | QCopEnvelope e(channel.latin1(), message.latin1()); |
965 | //US we need no names in the To field. The emailadresses are enough | 966 | //US we need no names in the To field. The emailadresses are enough |
@@ -1063,8 +1064,9 @@ bool ExternalAppHandler::requestNameEmailUidListFromKAPI(const QString& sourceCh | |||
1063 | } | 1064 | } |
1064 | 1065 | ||
1065 | bool ExternalAppHandler::returnNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& list1, const QStringList& list2, const QStringList& list3) | 1066 | bool ExternalAppHandler::returnNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& list1, const QStringList& list2, const QStringList& list3) |
1066 | { | 1067 | { |
1068 | |||
1067 | mNameEmailUidListFromKAPITransfer->setSourceChannel(sourceChannel); | 1069 | mNameEmailUidListFromKAPITransfer->setSourceChannel(sourceChannel); |
1068 | return mNameEmailUidListFromKAPITransfer->sendMessageToSource(sessionuid, list1, list2, list3); | 1070 | return mNameEmailUidListFromKAPITransfer->sendMessageToSource(sessionuid, list1, list2, list3); |
1069 | } | 1071 | } |
1070 | 1072 | ||