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 /libkdepim/externalapphandler.cpp | |
parent | 6341e161c5af4e5ac1d1d3ec9fdabf04b287800f (diff) | |
download | kdepimpi-9421138854b85a9baced09649f617118502610c1.zip kdepimpi-9421138854b85a9baced09649f617118502610c1.tar.gz kdepimpi-9421138854b85a9baced09649f617118502610c1.tar.bz2 |
Fixed bug externalapphandler
Diffstat (limited to 'libkdepim/externalapphandler.cpp') (more/less context) (ignore whitespace changes)
-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 | |||
@@ -68,64 +68,64 @@ QCopTransferItem::QCopTransferItem(int usedSourceParameters, const QString& sour | |||
68 | } | 68 | } |
69 | 69 | ||
70 | /*********************************************************************************/ | 70 | /*********************************************************************************/ |
71 | 71 | ||
72 | QCopTransferItem::QCopTransferItem() | 72 | QCopTransferItem::QCopTransferItem() |
73 | { | 73 | { |
74 | } | 74 | } |
75 | 75 | ||
76 | /*********************************************************************************/ | 76 | /*********************************************************************************/ |
77 | bool QCopTransferItem::sendMessageToTarget(const QString& uid, const QString& param1, const QString& param2, const QString& param3) | 77 | bool QCopTransferItem::sendMessageToTarget(const QString& uid, const QString& param1, const QString& param2, const QString& param3) |
78 | { | 78 | { |
79 | 79 | ||
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 | ||
89 | e << _sourceChannel << uid; | 89 | e << _sourceChannel << uid; |
90 | 90 | ||
91 | if (_usedSourceParameters == 1) | 91 | if (_usedSourceParameters == 1) |
92 | e << param1; | 92 | e << param1; |
93 | else if (_usedSourceParameters == 2) | 93 | else if (_usedSourceParameters == 2) |
94 | e << param1 << param2; | 94 | e << param1 << param2; |
95 | else if (_usedSourceParameters == 3) | 95 | else if (_usedSourceParameters == 3) |
96 | e << param1 << param2 << param3; | 96 | e << param1 << param2 << param3; |
97 | 97 | ||
98 | qApp->processEvents(); | 98 | qApp->processEvents(); |
99 | 99 | ||
100 | return true; | 100 | return true; |
101 | 101 | ||
102 | #else | 102 | #else |
103 | KMessageBox::sorry( 0, i18n( "This version does not support QCop." ) ); | 103 | KMessageBox::sorry( 0, i18n( "This version does not support QCop." ) ); |
104 | return false; | 104 | return false; |
105 | #endif | 105 | #endif |
106 | 106 | ||
107 | } | 107 | } |
108 | 108 | ||
109 | 109 | ||
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 | /*********************************************************************************/ |
120 | bool QCopTransferItem::appMessage( const QCString& cmsg, const QByteArray& data ) | 120 | bool QCopTransferItem::appMessage( const QCString& cmsg, const QByteArray& data ) |
121 | { | 121 | { |
122 | 122 | ||
123 | // copied from old mail2 | 123 | // copied from old mail2 |
124 | /* | 124 | /* |
125 | static int ii = 0; | 125 | static int ii = 0; |
126 | 126 | ||
127 | // block second call | 127 | // block second call |
128 | if ( ii < 2 ) { | 128 | if ( ii < 2 ) { |
129 | ++ii; | 129 | ++ii; |
130 | if ( ii > 1 ) { | 130 | if ( ii > 1 ) { |
131 | qDebug("qcop call blocked "); | 131 | qDebug("qcop call blocked "); |
@@ -184,33 +184,33 @@ bool QCopTransferItem::appMessage( const QCString& cmsg, const QByteArray& data | |||
184 | 184 | ||
185 | 185 | ||
186 | QCopMapTransferItem::QCopMapTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage) | 186 | QCopMapTransferItem::QCopMapTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage) |
187 | : QCopTransferItem(usedSourceParameters, sourceMessage, targetChannel,targetMessage) | 187 | : QCopTransferItem(usedSourceParameters, sourceMessage, targetChannel,targetMessage) |
188 | { | 188 | { |
189 | //targetMessage returns later two parameters: uid, and map<qstring,qstring> | 189 | //targetMessage returns later two parameters: uid, and map<qstring,qstring> |
190 | _targetMessageParameters = "(QString,QMAP<QString,QString>)"; | 190 | _targetMessageParameters = "(QString,QMAP<QString,QString>)"; |
191 | } | 191 | } |
192 | 192 | ||
193 | /*********************************************************************************/ | 193 | /*********************************************************************************/ |
194 | bool QCopMapTransferItem::sendMessageToSource(const QString& uid, const QMap<QString,QString>& nameEmailMap) | 194 | bool QCopMapTransferItem::sendMessageToSource(const QString& uid, const QMap<QString,QString>& nameEmailMap) |
195 | { | 195 | { |
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 |
205 | 205 | ||
206 | e << uid << nameEmailMap; | 206 | e << uid << nameEmailMap; |
207 | 207 | ||
208 | qApp->processEvents(); | 208 | qApp->processEvents(); |
209 | 209 | ||
210 | return true; | 210 | return true; |
211 | 211 | ||
212 | #else | 212 | #else |
213 | KMessageBox::sorry( 0, i18n( "This version does not support QCop." ) ); | 213 | KMessageBox::sorry( 0, i18n( "This version does not support QCop." ) ); |
214 | return false; | 214 | return false; |
215 | #endif | 215 | #endif |
216 | 216 | ||
@@ -253,62 +253,63 @@ bool QCopMapTransferItem::appMessage( const QCString& cmsg, const QByteArray& da | |||
253 | 253 | ||
254 | 254 | ||
255 | QCopListTransferItem::QCopListTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage) | 255 | QCopListTransferItem::QCopListTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage) |
256 | : QCopTransferItem(usedSourceParameters, sourceMessage, targetChannel,targetMessage) | 256 | : QCopTransferItem(usedSourceParameters, sourceMessage, targetChannel,targetMessage) |
257 | { | 257 | { |
258 | //targetMessage returns later two parameters: uid, and three lists | 258 | //targetMessage returns later two parameters: uid, and three lists |
259 | _targetMessageParameters = "(QString,QStringList,QStringList,QStringList)"; | 259 | _targetMessageParameters = "(QString,QStringList,QStringList,QStringList)"; |
260 | } | 260 | } |
261 | 261 | ||
262 | /*********************************************************************************/ | 262 | /*********************************************************************************/ |
263 | bool QCopListTransferItem::sendMessageToSource(const QString& uid, const QStringList& list1, const QStringList& list2, const QStringList& list3) | 263 | bool QCopListTransferItem::sendMessageToSource(const QString& uid, const QStringList& list1, const QStringList& list2, const QStringList& list3) |
264 | { | 264 | { |
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 |
274 | 274 | ||
275 | e << uid << list1 << list2 << list3; | 275 | e << uid << list1 << list2 << list3; |
276 | 276 | ||
277 | qApp->processEvents(); | 277 | qApp->processEvents(); |
278 | 278 | ||
279 | return true; | 279 | return true; |
280 | 280 | ||
281 | #else | 281 | #else |
282 | KMessageBox::sorry( 0, i18n( "This version does not support QCop." ) ); | 282 | KMessageBox::sorry( 0, i18n( "This version does not support QCop." ) ); |
283 | return false; | 283 | return false; |
284 | #endif | 284 | #endif |
285 | 285 | ||
286 | } | 286 | } |
287 | 287 | ||
288 | 288 | ||
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 | { |
303 | QStringList list1; | 304 | QStringList list1; |
304 | QStringList list2; | 305 | QStringList list2; |
305 | QStringList list3; | 306 | QStringList list3; |
306 | QString uid; | 307 | QString uid; |
307 | 308 | ||
308 | stream >> uid >> list1 >> list2 >> list3; | 309 | stream >> uid >> list1 >> list2 >> list3; |
309 | emit receivedMessageFromTarget(uid, list1, list2, list3); | 310 | emit receivedMessageFromTarget(uid, list1, list2, list3); |
310 | 311 | ||
311 | 312 | ||
312 | return true; | 313 | return true; |
313 | } | 314 | } |
314 | } | 315 | } |
@@ -591,33 +592,33 @@ bool ExternalAppHandler::mailToMultipleContacts( const QString& emails, const QS | |||
591 | { | 592 | { |
592 | DefaultAppItem* dai = getDefaultItem(EMAIL, client); | 593 | DefaultAppItem* dai = getDefaultItem(EMAIL, client); |
593 | if (!dai) | 594 | if (!dai) |
594 | { | 595 | { |
595 | qDebug("could not find configured email application."); | 596 | qDebug("could not find configured email application."); |
596 | return false; | 597 | return false; |
597 | } | 598 | } |
598 | channel = dai->_channel; | 599 | channel = dai->_channel; |
599 | message2 = dai->_message2; | 600 | message2 = dai->_message2; |
600 | parameters2 = dai->_parameters2; | 601 | parameters2 = dai->_parameters2; |
601 | } | 602 | } |
602 | 603 | ||
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()); |
612 | //US we need no names in the To field. The emailadresses are enough | 613 | //US we need no names in the To field. The emailadresses are enough |
613 | 614 | ||
614 | passParameters(&e, parameters2, emails, urls); | 615 | passParameters(&e, parameters2, emails, urls); |
615 | 616 | ||
616 | 617 | ||
617 | 618 | ||
618 | #else | 619 | #else |
619 | KMessageBox::sorry( 0, i18n( "This version does not support the sending of emails." ) ); | 620 | KMessageBox::sorry( 0, i18n( "This version does not support the sending of emails." ) ); |
620 | #endif | 621 | #endif |
621 | 622 | ||
622 | return true; | 623 | return true; |
623 | } | 624 | } |
@@ -648,33 +649,33 @@ bool ExternalAppHandler::mailToOneContact( const QString& name, const QString& e | |||
648 | DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(EMAIL, client); | 649 | DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(EMAIL, client); |
649 | if (!dai) | 650 | if (!dai) |
650 | { | 651 | { |
651 | qDebug("could not find configured email application."); | 652 | qDebug("could not find configured email application."); |
652 | return false; | 653 | return false; |
653 | } | 654 | } |
654 | channel = dai->_channel; | 655 | channel = dai->_channel; |
655 | message = dai->_message; | 656 | message = dai->_message; |
656 | parameters = dai->_parameters; | 657 | parameters = dai->_parameters; |
657 | } | 658 | } |
658 | 659 | ||
659 | 660 | ||
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 |
669 | 670 | ||
670 | passParameters(&e, parameters, name, emailadress); | 671 | passParameters(&e, parameters, name, emailadress); |
671 | 672 | ||
672 | 673 | ||
673 | #else | 674 | #else |
674 | KMessageBox::sorry( 0, i18n( "This version does not support the sending of emails." ) ); | 675 | KMessageBox::sorry( 0, i18n( "This version does not support the sending of emails." ) ); |
675 | #endif | 676 | #endif |
676 | 677 | ||
677 | 678 | ||
678 | return true; | 679 | return true; |
679 | } | 680 | } |
680 | 681 | ||
@@ -725,33 +726,33 @@ bool ExternalAppHandler::callByPhone( const QString& phonenumber ) | |||
725 | DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(PHONE, client); | 726 | DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(PHONE, client); |
726 | if (!dai) | 727 | if (!dai) |
727 | { | 728 | { |
728 | qDebug("could not find configured phone application."); | 729 | qDebug("could not find configured phone application."); |
729 | return false; | 730 | return false; |
730 | } | 731 | } |
731 | channel = dai->_channel; | 732 | channel = dai->_channel; |
732 | message = dai->_message; | 733 | message = dai->_message; |
733 | parameters = dai->_parameters; | 734 | parameters = dai->_parameters; |
734 | } | 735 | } |
735 | 736 | ||
736 | 737 | ||
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 |
746 | 747 | ||
747 | passParameters(&e, parameters, phonenumber, ""); | 748 | passParameters(&e, parameters, phonenumber, ""); |
748 | 749 | ||
749 | 750 | ||
750 | #else | 751 | #else |
751 | KMessageBox::sorry( 0, i18n( "This version does not support phonecalls." ) ); | 752 | KMessageBox::sorry( 0, i18n( "This version does not support phonecalls." ) ); |
752 | #endif | 753 | #endif |
753 | 754 | ||
754 | 755 | ||
755 | return true; | 756 | return true; |
756 | } | 757 | } |
757 | 758 | ||
@@ -780,33 +781,33 @@ bool ExternalAppHandler::callBySMS( const QString& phonenumber ) | |||
780 | DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(SMS, client); | 781 | DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(SMS, client); |
781 | if (!dai) | 782 | if (!dai) |
782 | { | 783 | { |
783 | qDebug("could not find configured sms application."); | 784 | qDebug("could not find configured sms application."); |
784 | return false; | 785 | return false; |
785 | } | 786 | } |
786 | channel = dai->_channel; | 787 | channel = dai->_channel; |
787 | message = dai->_message; | 788 | message = dai->_message; |
788 | parameters = dai->_parameters; | 789 | parameters = dai->_parameters; |
789 | } | 790 | } |
790 | 791 | ||
791 | 792 | ||
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 |
801 | 802 | ||
802 | passParameters(&e, parameters, phonenumber, ""); | 803 | passParameters(&e, parameters, phonenumber, ""); |
803 | 804 | ||
804 | 805 | ||
805 | #else | 806 | #else |
806 | KMessageBox::sorry( 0, i18n( "This version does not support the sending of sms." ) ); | 807 | KMessageBox::sorry( 0, i18n( "This version does not support the sending of sms." ) ); |
807 | #endif | 808 | #endif |
808 | 809 | ||
809 | 810 | ||
810 | return true; | 811 | return true; |
811 | } | 812 | } |
812 | 813 | ||
@@ -835,33 +836,33 @@ bool ExternalAppHandler::callByPager( const QString& pagernumber ) | |||
835 | DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(PAGER, client); | 836 | DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(PAGER, client); |
836 | if (!dai) | 837 | if (!dai) |
837 | { | 838 | { |
838 | qDebug("could not find configured pager application."); | 839 | qDebug("could not find configured pager application."); |
839 | return false; | 840 | return false; |
840 | } | 841 | } |
841 | channel = dai->_channel; | 842 | channel = dai->_channel; |
842 | message = dai->_message; | 843 | message = dai->_message; |
843 | parameters = dai->_parameters; | 844 | parameters = dai->_parameters; |
844 | } | 845 | } |
845 | 846 | ||
846 | 847 | ||
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 |
856 | 857 | ||
857 | passParameters(&e, parameters, pagernumber, ""); | 858 | passParameters(&e, parameters, pagernumber, ""); |
858 | 859 | ||
859 | 860 | ||
860 | #else | 861 | #else |
861 | KMessageBox::sorry( 0, i18n( "This version does not support paging." ) ); | 862 | KMessageBox::sorry( 0, i18n( "This version does not support paging." ) ); |
862 | #endif | 863 | #endif |
863 | 864 | ||
864 | 865 | ||
865 | return true; | 866 | return true; |
866 | } | 867 | } |
867 | 868 | ||
@@ -890,33 +891,33 @@ bool ExternalAppHandler::callByFax( const QString& faxnumber ) | |||
890 | DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(FAX, client); | 891 | DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(FAX, client); |
891 | if (!dai) | 892 | if (!dai) |
892 | { | 893 | { |
893 | qDebug("could not find configured fax application."); | 894 | qDebug("could not find configured fax application."); |
894 | return false; | 895 | return false; |
895 | } | 896 | } |
896 | channel = dai->_channel; | 897 | channel = dai->_channel; |
897 | message = dai->_message; | 898 | message = dai->_message; |
898 | parameters = dai->_parameters; | 899 | parameters = dai->_parameters; |
899 | } | 900 | } |
900 | 901 | ||
901 | 902 | ||
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 |
911 | 912 | ||
912 | passParameters(&e, parameters, faxnumber, ""); | 913 | passParameters(&e, parameters, faxnumber, ""); |
913 | 914 | ||
914 | 915 | ||
915 | #else | 916 | #else |
916 | KMessageBox::sorry( 0, i18n( "This version does not support the sending of faxes." ) ); | 917 | KMessageBox::sorry( 0, i18n( "This version does not support the sending of faxes." ) ); |
917 | #endif | 918 | #endif |
918 | 919 | ||
919 | 920 | ||
920 | return true; | 921 | return true; |
921 | } | 922 | } |
922 | 923 | ||
@@ -945,33 +946,33 @@ bool ExternalAppHandler::callBySIP( const QString& sipnumber ) | |||
945 | DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(SIP, client); | 946 | DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(SIP, client); |
946 | if (!dai) | 947 | if (!dai) |
947 | { | 948 | { |
948 | qDebug("could not find configured sip application."); | 949 | qDebug("could not find configured sip application."); |
949 | return false; | 950 | return false; |
950 | } | 951 | } |
951 | channel = dai->_channel; | 952 | channel = dai->_channel; |
952 | message = dai->_message; | 953 | message = dai->_message; |
953 | parameters = dai->_parameters; | 954 | parameters = dai->_parameters; |
954 | } | 955 | } |
955 | 956 | ||
956 | 957 | ||
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 |
966 | 967 | ||
967 | passParameters(&e, parameters, sipnumber, ""); | 968 | passParameters(&e, parameters, sipnumber, ""); |
968 | 969 | ||
969 | 970 | ||
970 | #else | 971 | #else |
971 | KMessageBox::sorry( 0, i18n( "This version does not support sip." ) ); | 972 | KMessageBox::sorry( 0, i18n( "This version does not support sip." ) ); |
972 | #endif | 973 | #endif |
973 | 974 | ||
974 | 975 | ||
975 | return true; | 976 | return true; |
976 | } | 977 | } |
977 | 978 | ||
@@ -1051,32 +1052,33 @@ void ExternalAppHandler::appMessage( const QCString& cmsg, const QByteArray& dat | |||
1051 | res = mDisplayDetails->appMessage( cmsg, data ); | 1052 | res = mDisplayDetails->appMessage( cmsg, data ); |
1052 | 1053 | ||
1053 | // if (!res) | 1054 | // if (!res) |
1054 | // res = mNameEmailUidListFromKAPITransfer->appMessage( cmsg, data ); | 1055 | // res = mNameEmailUidListFromKAPITransfer->appMessage( cmsg, data ); |
1055 | } | 1056 | } |
1056 | 1057 | ||
1057 | 1058 | ||
1058 | 1059 | ||
1059 | bool ExternalAppHandler::requestNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid) | 1060 | bool ExternalAppHandler::requestNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid) |
1060 | { | 1061 | { |
1061 | mNameEmailUidListFromKAPITransfer->setSourceChannel(sourceChannel); | 1062 | mNameEmailUidListFromKAPITransfer->setSourceChannel(sourceChannel); |
1062 | return mNameEmailUidListFromKAPITransfer->sendMessageToTarget(sessionuid); | 1063 | return mNameEmailUidListFromKAPITransfer->sendMessageToTarget(sessionuid); |
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 | ||
1071 | bool ExternalAppHandler::requestFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QString& email) | 1073 | bool ExternalAppHandler::requestFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QString& email) |
1072 | { | 1074 | { |
1073 | mFindByEmailFromKAPITransfer->setSourceChannel(sourceChannel); | 1075 | mFindByEmailFromKAPITransfer->setSourceChannel(sourceChannel); |
1074 | return mFindByEmailFromKAPITransfer->sendMessageToTarget(sessionuid, email); | 1076 | return mFindByEmailFromKAPITransfer->sendMessageToTarget(sessionuid, email); |
1075 | } | 1077 | } |
1076 | 1078 | ||
1077 | bool ExternalAppHandler::returnFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& list1, const QStringList& list2, const QStringList& list3) | 1079 | bool ExternalAppHandler::returnFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& list1, const QStringList& list2, const QStringList& list3) |
1078 | { | 1080 | { |
1079 | mFindByEmailFromKAPITransfer->setSourceChannel(sourceChannel); | 1081 | mFindByEmailFromKAPITransfer->setSourceChannel(sourceChannel); |
1080 | return mFindByEmailFromKAPITransfer->sendMessageToSource(sessionuid, list1, list2, list3); | 1082 | return mFindByEmailFromKAPITransfer->sendMessageToSource(sessionuid, list1, list2, list3); |
1081 | } | 1083 | } |
1082 | 1084 | ||