summaryrefslogtreecommitdiffabout
path: root/libkdepim
Unidiff
Diffstat (limited to 'libkdepim') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/externalapphandler.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/libkdepim/externalapphandler.cpp b/libkdepim/externalapphandler.cpp
index bd83626..6100097 100644
--- a/libkdepim/externalapphandler.cpp
+++ b/libkdepim/externalapphandler.cpp
@@ -213,193 +213,192 @@ bool QCopMapTransferItem::sendMessageToSource(const QString& uid, const QMap<QSt
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
217} 217}
218 218
219 219
220/*********************************************************************************/ 220/*********************************************************************************/
221bool QCopMapTransferItem::appMessage( const QCString& cmsg, const QByteArray& data ) 221bool QCopMapTransferItem::appMessage( const QCString& cmsg, const QByteArray& data )
222{ 222{
223 bool res = QCopTransferItem::appMessage( cmsg, data ); 223 bool res = QCopTransferItem::appMessage( cmsg, data );
224 224
225 if (res == false) 225 if (res == false)
226 { 226 {
227 QDataStream stream( data, IO_ReadOnly ); 227 QDataStream stream( data, IO_ReadOnly );
228 228
229// qDebug("QCopMapTransferItem- QCOP message received: %s ", cmsg.data() ); 229// qDebug("QCopMapTransferItem- QCOP message received: %s ", cmsg.data() );
230 230
231 //we are in the source and get an answer from the target 231 //we are in the source and get an answer from the target
232 if ((_targetMessage + _targetMessageParameters) == cmsg.data()) 232 if ((_targetMessage + _targetMessageParameters) == cmsg.data())
233 { 233 {
234 QMap<QString,QString> adrMap; 234 QMap<QString,QString> adrMap;
235 QString uid; 235 QString uid;
236 236
237 stream >> uid >> adrMap; 237 stream >> uid >> adrMap;
238 238
239 emit receivedMessageFromTarget(uid, adrMap); 239 emit receivedMessageFromTarget(uid, adrMap);
240 240
241 241
242 return true; 242 return true;
243 } 243 }
244 } 244 }
245 245
246 return false; 246 return false;
247} 247}
248 248
249 249
250/********************************************************************************* 250/*********************************************************************************
251 * 251 *
252 ********************************************************************************/ 252 ********************************************************************************/
253 253
254 254
255QCopListTransferItem::QCopListTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage) 255QCopListTransferItem::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/*********************************************************************************/
263bool QCopListTransferItem::sendMessageToSource(const QString& uid, const QStringList& list1, const QStringList& list2, const QStringList& list3) 263bool 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("Using 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/*********************************************************************************/
290bool QCopListTransferItem::appMessage( const QCString& cmsg, const QByteArray& data ) 290bool 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 293
294 if (res == false) 294 if (res == false)
295 { 295 {
296 QDataStream stream( data, IO_ReadOnly ); 296 QDataStream stream( data, IO_ReadOnly );
297 297
298// qDebug("QCopListTransferItem- QCOP message received: %s ", cmsg.data() ); 298// qDebug("QCopListTransferItem- QCOP message received: %s ", cmsg.data() );
299 299
300 //we are in the source and get an answer from the target 300 //we are in the source and get an answer from the target
301 if ((_targetMessage + _targetMessageParameters) == cmsg.data()) 301 if ((_targetMessage + _targetMessageParameters) == cmsg.data())
302 { 302 {
303 QStringList list1; 303 QStringList list1;
304 QStringList list2; 304 QStringList list2;
305 QStringList list3; 305 QStringList list3;
306 QString uid; 306 QString uid;
307 307
308 stream >> uid >> list1 >> list2 >> list3; 308 stream >> uid >> list1 >> list2 >> list3;
309
310 emit receivedMessageFromTarget(uid, list1, list2, list3); 309 emit receivedMessageFromTarget(uid, list1, list2, list3);
311 310
312 311
313 return true; 312 return true;
314 } 313 }
315 } 314 }
316 315
317 return false; 316 return false;
318} 317}
319 318
320 319
321 320
322/********************************************************************************* 321/*********************************************************************************
323 * 322 *
324 ********************************************************************************/ 323 ********************************************************************************/
325 324
326 325
327ExternalAppHandler *ExternalAppHandler::sInstance = 0; 326ExternalAppHandler *ExternalAppHandler::sInstance = 0;
328static KStaticDeleter<ExternalAppHandler> staticDeleter; 327static KStaticDeleter<ExternalAppHandler> staticDeleter;
329 328
330ExternalAppHandler::ExternalAppHandler() 329ExternalAppHandler::ExternalAppHandler()
331{ 330{
332 mDefaultItems.setAutoDelete(true); 331 mDefaultItems.setAutoDelete(true);
333 332
334 mNameEmailUidListFromKAPITransfer = new QCopListTransferItem(0, "requestNameEmailUIDListFromKAPI", "QPE/Application/kapi", "receiveNameEmailUIDList"); 333 mNameEmailUidListFromKAPITransfer = new QCopListTransferItem(0, "requestNameEmailUIDListFromKAPI", "QPE/Application/kapi", "receiveNameEmailUIDList");
335 connect(mNameEmailUidListFromKAPITransfer, SIGNAL (receivedMessageFromSource(const QString&, const QString&)), this, SIGNAL (requestForNameEmailUidList(const QString&, const QString&))); 334 connect(mNameEmailUidListFromKAPITransfer, SIGNAL (receivedMessageFromSource(const QString&, const QString&)), this, SIGNAL (requestForNameEmailUidList(const QString&, const QString&)));
336 connect(mNameEmailUidListFromKAPITransfer, SIGNAL (receivedMessageFromTarget(const QString&, const QStringList&, const QStringList&, const QStringList&)), this, SIGNAL (receivedNameEmailUidListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&))); 335 connect(mNameEmailUidListFromKAPITransfer, SIGNAL (receivedMessageFromTarget(const QString&, const QStringList&, const QStringList&, const QStringList&)), this, SIGNAL (receivedNameEmailUidListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&)));
337 336
338//US mFindByEmailFromKAPITransfer = new QCopListTransferItem(1, "requestFindByEmailFromKAPI", "QPE/Application/kapi", "receiveFindByEmailNameEmailUIDList"); 337//US mFindByEmailFromKAPITransfer = new QCopListTransferItem(1, "requestFindByEmailFromKAPI", "QPE/Application/kapi", "receiveFindByEmailNameEmailUIDList");
339//US connect(mFindByEmailFromKAPITransfer, SIGNAL (receivedMessageFromSource(const QString&, const QString&, const QString&)), this, SIGNAL (requestForFindByEmail(const QString&, const QString&, const QString&))); 338//US connect(mFindByEmailFromKAPITransfer, SIGNAL (receivedMessageFromSource(const QString&, const QString&, const QString&)), this, SIGNAL (requestForFindByEmail(const QString&, const QString&, const QString&)));
340//US connect(mFindByEmailFromKAPITransfer, SIGNAL (receivedMessageFromTarget(const QString&, const QStringList&, const QStringList&, const QStringList&)), this, SIGNAL (receivedFindByEmailEvent(const QString&, const QStringList&, const QStringList&, const QStringList&))); 339//US connect(mFindByEmailFromKAPITransfer, SIGNAL (receivedMessageFromTarget(const QString&, const QStringList&, const QStringList&, const QStringList&)), this, SIGNAL (receivedFindByEmailEvent(const QString&, const QStringList&, const QStringList&, const QStringList&)));
341 340
342 mDisplayDetails = new QCopListTransferItem(3, "requestDisplayDetailsFromKAPI", "QPE/Application/kapi", ""); 341 mDisplayDetails = new QCopListTransferItem(3, "requestDisplayDetailsFromKAPI", "QPE/Application/kapi", "");
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&))); 342 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&)));
344} 343}
345 344
346ExternalAppHandler::~ExternalAppHandler() 345ExternalAppHandler::~ExternalAppHandler()
347{ 346{
348} 347}
349 348
350void ExternalAppHandler::loadConfig() 349void ExternalAppHandler::loadConfig()
351{ 350{
352 351
353 mDefaultItems.clear(); 352 mDefaultItems.clear();
354 353
355 mEmailAppAvailable = UNDEFINED; 354 mEmailAppAvailable = UNDEFINED;
356 mPhoneAppAvailable = UNDEFINED; 355 mPhoneAppAvailable = UNDEFINED;
357 mFaxAppAvailable = UNDEFINED; 356 mFaxAppAvailable = UNDEFINED;
358 mSMSAppAvailable = UNDEFINED; 357 mSMSAppAvailable = UNDEFINED;
359 mPagerAppAvailable = UNDEFINED; 358 mPagerAppAvailable = UNDEFINED;
360 359
361 360
362 QString opiepath = QString::fromLatin1( getenv("OPIEDIR") ); 361 QString opiepath = QString::fromLatin1( getenv("OPIEDIR") );
363 QString qtopiapath = QString::fromLatin1( getenv("QPEDIR") ); 362 QString qtopiapath = QString::fromLatin1( getenv("QPEDIR") );
364 363
365 if (opiepath.isEmpty()) 364 if (opiepath.isEmpty())
366 opiepath = qtopiapath; 365 opiepath = qtopiapath;
367 366
368 //mailclients 367 //mailclients
369 QString mailmsg1 = "writeMail(QString,QString)"; 368 QString mailmsg1 = "writeMail(QString,QString)";
370 QString mailmsg2 = "writeMail(QMap(QString,QString))"; 369 QString mailmsg2 = "writeMail(QMap(QString,QString))";
371 370
372 QString undefined = ""; 371 QString undefined = "";
373 372
374 addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::NONE_EMC, "No email client installed", undefined, undefined, undefined, undefined, undefined); 373 addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::NONE_EMC, "No email client installed", undefined, undefined, undefined, undefined, undefined);
375 addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::OTHER_EMC, "Userdefined email client", undefined, undefined, undefined, undefined, undefined); 374 addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::OTHER_EMC, "Userdefined email client", undefined, undefined, undefined, undefined, undefined);
376 375
377 if (( QFile::exists( qtopiapath + "/bin/ompi" )) || 376 if (( QFile::exists( qtopiapath + "/bin/ompi" )) ||
378 ( QFile::exists( opiepath + "/bin/ompi" ))) 377 ( QFile::exists( opiepath + "/bin/ompi" )))
379 addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::OMPI_EMC, "OM/Pi email client", "QPE/Application/ompi", mailmsg1, "%1;%2", mailmsg2, "TO=%1;ATTACHMENT=%2"); 378 addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::OMPI_EMC, "OM/Pi email client", "QPE/Application/ompi", mailmsg1, "%1;%2", mailmsg2, "TO=%1;ATTACHMENT=%2");
380 379
381 if ( QFile::exists( qtopiapath + "/bin/qtmail" )) 380 if ( QFile::exists( qtopiapath + "/bin/qtmail" ))
382 addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::QTOPIA_EMC, "Qtopia email client", "QPE/Application/qtmail", mailmsg1, "%1;%2", mailmsg2, "TO=%1;ATTACHMENT=%2"); 381 addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::QTOPIA_EMC, "Qtopia email client", "QPE/Application/qtmail", mailmsg1, "%1;%2", mailmsg2, "TO=%1;ATTACHMENT=%2");
383 382
384 if ( QFile::exists( opiepath + "/bin/opiemail" )) 383 if ( QFile::exists( opiepath + "/bin/opiemail" ))
385 addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::OPIE_EMC, "Opie email client", "QPE/Application/opiemail", mailmsg1, "%1;%2", mailmsg2, "TO=%1;ATTACHMENT=%2"); 384 addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::OPIE_EMC, "Opie email client", "QPE/Application/opiemail", mailmsg1, "%1;%2", mailmsg2, "TO=%1;ATTACHMENT=%2");
386 385
387 386
388 387
389 //phoneclients 388 //phoneclients
390 389
391 addDefaultAppItem(ExternalAppHandler::PHONE, KPimGlobalPrefs::NONE_PHC, "No phone client installed", undefined, undefined, undefined, undefined, undefined); 390 addDefaultAppItem(ExternalAppHandler::PHONE, KPimGlobalPrefs::NONE_PHC, "No phone client installed", undefined, undefined, undefined, undefined, undefined);
392 addDefaultAppItem(ExternalAppHandler::PHONE, KPimGlobalPrefs::OTHER_PHC, "Other phone client", undefined, undefined, undefined, undefined, undefined); 391 addDefaultAppItem(ExternalAppHandler::PHONE, KPimGlobalPrefs::OTHER_PHC, "Other phone client", undefined, undefined, undefined, undefined, undefined);
393 if (( QFile::exists( qtopiapath + "/bin/kppi" )) || 392 if (( QFile::exists( qtopiapath + "/bin/kppi" )) ||
394 ( QFile::exists( opiepath + "/bin/kppi" ))) 393 ( QFile::exists( opiepath + "/bin/kppi" )))
395 addDefaultAppItem(ExternalAppHandler::PHONE, KPimGlobalPrefs::KPPI_PHC, "KP/Pi phone client", "QPE/Application/kppi", "-ring:%1", "", undefined, undefined); 394 addDefaultAppItem(ExternalAppHandler::PHONE, KPimGlobalPrefs::KPPI_PHC, "KP/Pi phone client", "QPE/Application/kppi", "-ring:%1", "", undefined, undefined);
396 395
397 //faxclients 396 //faxclients
398 addDefaultAppItem(ExternalAppHandler::FAX, KPimGlobalPrefs::NONE_FAC, "No fax client installed", undefined, undefined, undefined, undefined, undefined); 397 addDefaultAppItem(ExternalAppHandler::FAX, KPimGlobalPrefs::NONE_FAC, "No fax client installed", undefined, undefined, undefined, undefined, undefined);
399 addDefaultAppItem(ExternalAppHandler::FAX, KPimGlobalPrefs::OTHER_FAC, "Other fax client", undefined, undefined, undefined, undefined, undefined); 398 addDefaultAppItem(ExternalAppHandler::FAX, KPimGlobalPrefs::OTHER_FAC, "Other fax client", undefined, undefined, undefined, undefined, undefined);
400 399
401 //smsclients 400 //smsclients
402 addDefaultAppItem(ExternalAppHandler::SMS, KPimGlobalPrefs::NONE_SMC, "No sms client installed", undefined, undefined, undefined, undefined, undefined); 401 addDefaultAppItem(ExternalAppHandler::SMS, KPimGlobalPrefs::NONE_SMC, "No sms client installed", undefined, undefined, undefined, undefined, undefined);
403 addDefaultAppItem(ExternalAppHandler::SMS, KPimGlobalPrefs::OTHER_SMC, "Other sms client", undefined, undefined, undefined, undefined, undefined); 402 addDefaultAppItem(ExternalAppHandler::SMS, KPimGlobalPrefs::OTHER_SMC, "Other sms client", undefined, undefined, undefined, undefined, undefined);
404 403
405 //pagerclients 404 //pagerclients
@@ -877,140 +876,139 @@ bool ExternalAppHandler::callByFax( const QString& faxnumber )
877 parameters = dai->_parameters; 876 parameters = dai->_parameters;
878 } 877 }
879 878
880 879
881 //first check if one of the mailers need the emails right in the message. 880 //first check if one of the mailers need the emails right in the message.
882 message = translateMessage(message, faxnumber, ""); 881 message = translateMessage(message, faxnumber, "");
883 882
884 883
885 qDebug("Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); 884 qDebug("Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1());
886 qDebug("passing faxnumber(%s) as parameter in the form %s to QCopEnvelope", faxnumber.latin1(), parameters.latin1()); 885 qDebug("passing faxnumber(%s) as parameter in the form %s to QCopEnvelope", faxnumber.latin1(), parameters.latin1());
887 886
888 QCopEnvelope e(channel.latin1(), message.latin1()); 887 QCopEnvelope e(channel.latin1(), message.latin1());
889 //US we need no names in the To field. The emailadresses are enough 888 //US we need no names in the To field. The emailadresses are enough
890 889
891 passParameters(&e, parameters, faxnumber, ""); 890 passParameters(&e, parameters, faxnumber, "");
892 891
893 892
894#else 893#else
895 KMessageBox::sorry( 0, i18n( "This version does not support the sending of faxes." ) ); 894 KMessageBox::sorry( 0, i18n( "This version does not support the sending of faxes." ) );
896#endif 895#endif
897 896
898 897
899 return true; 898 return true;
900} 899}
901 900
902/************************************************************************** 901/**************************************************************************
903 * 902 *
904 **************************************************************************/ 903 **************************************************************************/
905 904
906 905
907QString& ExternalAppHandler::translateMessage(QString& message, const QString& param1, const QString& param2 ) const 906QString& ExternalAppHandler::translateMessage(QString& message, const QString& param1, const QString& param2 ) const
908{ 907{
909 message = message.replace( QRegExp("%1"), param1 ); 908 message = message.replace( QRegExp("%1"), param1 );
910 return message.replace( QRegExp("%2"), param2 ); 909 return message.replace( QRegExp("%2"), param2 );
911} 910}
912 911
913/************************************************************************** 912/**************************************************************************
914 * 913 *
915 **************************************************************************/ 914 **************************************************************************/
916 915
917void ExternalAppHandler::passParameters(QCopEnvelope* e, const QString& parameters, const QString& param1 , const QString& param2) const 916void ExternalAppHandler::passParameters(QCopEnvelope* e, const QString& parameters, const QString& param1 , const QString& param2) const
918{ 917{
919#ifndef DESKTOP_VERSION 918#ifndef DESKTOP_VERSION
920 QMap<QString, QString> valmap; 919 QMap<QString, QString> valmap;
921 bool useValMap = false; 920 bool useValMap = false;
922 921
923 // first extract all parts of the parameters. 922 // first extract all parts of the parameters.
924 QStringList paramlist = QStringList::split(";", parameters); 923 QStringList paramlist = QStringList::split(";", parameters);
925 924
926 //Now check how many parts we have. 925 //Now check how many parts we have.
927 //=0 :no params to pass 926 //=0 :no params to pass
928 //>0 :parameters to pass 927 //>0 :parameters to pass
929 for ( QStringList::Iterator it = paramlist.begin(); it != paramlist.end(); ++it ) 928 for ( QStringList::Iterator it = paramlist.begin(); it != paramlist.end(); ++it )
930 { 929 {
931 QString param = (*it); 930 QString param = (*it);
932 QStringList keyvallist = QStringList::split("=", param); 931 QStringList keyvallist = QStringList::split("=", param);
933 932
934 //if we have keyvalue pairs, we assume that we pass a map to the envelope 933 //if we have keyvalue pairs, we assume that we pass a map to the envelope
935 QStringList::Iterator it2 = keyvallist.begin(); 934 QStringList::Iterator it2 = keyvallist.begin();
936 QString key = (*it2); 935 QString key = (*it2);
937 key = key.replace( QRegExp("%1"), param1 ); 936 key = key.replace( QRegExp("%1"), param1 );
938 key = key.replace( QRegExp("%2"), param2 ); 937 key = key.replace( QRegExp("%2"), param2 );
939 ++it2; 938 ++it2;
940 939
941 if(it2 != keyvallist.end()) 940 if(it2 != keyvallist.end())
942 { 941 {
943 QString value = (*it2); 942 QString value = (*it2);
944 value = value.replace( QRegExp("%1"), param1 ); 943 value = value.replace( QRegExp("%1"), param1 );
945 value = value.replace( QRegExp("%2"), param2 ); 944 value = value.replace( QRegExp("%2"), param2 );
946 945
947 valmap.insert(key, value); 946 valmap.insert(key, value);
948 useValMap = true; 947 useValMap = true;
949 } 948 }
950 else 949 else
951 { 950 {
952 // qDebug("pass parameter << %s", key.latin1()); 951 // qDebug("pass parameter << %s", key.latin1());
953 (*e) << key; 952 (*e) << key;
954 } 953 }
955 } 954 }
956 955
957 if (useValMap == true) 956 if (useValMap == true)
958 (*e) << valmap; 957 (*e) << valmap;
959 958
960#endif 959#endif
961 960
962} 961}
963 962
964 963
965 964
966/************************************************************************** 965/**************************************************************************
967 * 966 *
968 **************************************************************************/ 967 **************************************************************************/
969 968
970void ExternalAppHandler::appMessage( const QCString& cmsg, const QByteArray& data ) 969void ExternalAppHandler::appMessage( const QCString& cmsg, const QByteArray& data )
971{ 970{
972 bool res = mNameEmailUidListFromKAPITransfer->appMessage( cmsg, data ); 971 bool res = mNameEmailUidListFromKAPITransfer->appMessage( cmsg, data );
973
974 if (!res) 972 if (!res)
975 res = mDisplayDetails->appMessage( cmsg, data ); 973 res = mDisplayDetails->appMessage( cmsg, data );
976 974
977// if (!res) 975// if (!res)
978// res = mNameEmailUidListFromKAPITransfer->appMessage( cmsg, data ); 976// res = mNameEmailUidListFromKAPITransfer->appMessage( cmsg, data );
979} 977}
980 978
981 979
982 980
983bool ExternalAppHandler::requestNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid) 981bool ExternalAppHandler::requestNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid)
984{ 982{
985 mNameEmailUidListFromKAPITransfer->setSourceChannel(sourceChannel); 983 mNameEmailUidListFromKAPITransfer->setSourceChannel(sourceChannel);
986 return mNameEmailUidListFromKAPITransfer->sendMessageToTarget(sessionuid); 984 return mNameEmailUidListFromKAPITransfer->sendMessageToTarget(sessionuid);
987} 985}
988 986
989bool ExternalAppHandler::returnNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& list1, const QStringList& list2, const QStringList& list3) 987bool ExternalAppHandler::returnNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& list1, const QStringList& list2, const QStringList& list3)
990{ 988{
991 mNameEmailUidListFromKAPITransfer->setSourceChannel(sourceChannel); 989 mNameEmailUidListFromKAPITransfer->setSourceChannel(sourceChannel);
992 return mNameEmailUidListFromKAPITransfer->sendMessageToSource(sessionuid, list1, list2, list3); 990 return mNameEmailUidListFromKAPITransfer->sendMessageToSource(sessionuid, list1, list2, list3);
993} 991}
994 992
995bool ExternalAppHandler::requestFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QString& email) 993bool ExternalAppHandler::requestFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QString& email)
996{ 994{
997 mFindByEmailFromKAPITransfer->setSourceChannel(sourceChannel); 995 mFindByEmailFromKAPITransfer->setSourceChannel(sourceChannel);
998 return mFindByEmailFromKAPITransfer->sendMessageToTarget(sessionuid, email); 996 return mFindByEmailFromKAPITransfer->sendMessageToTarget(sessionuid, email);
999} 997}
1000 998
1001bool ExternalAppHandler::returnFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& list1, const QStringList& list2, const QStringList& list3) 999bool ExternalAppHandler::returnFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& list1, const QStringList& list2, const QStringList& list3)
1002{ 1000{
1003 mFindByEmailFromKAPITransfer->setSourceChannel(sourceChannel); 1001 mFindByEmailFromKAPITransfer->setSourceChannel(sourceChannel);
1004 return mFindByEmailFromKAPITransfer->sendMessageToSource(sessionuid, list1, list2, list3); 1002 return mFindByEmailFromKAPITransfer->sendMessageToSource(sessionuid, list1, list2, list3);
1005} 1003}
1006 1004
1007bool ExternalAppHandler::requestDetailsFromKAPI(const QString& name, const QString& email, const QString& uid) 1005bool ExternalAppHandler::requestDetailsFromKAPI(const QString& name, const QString& email, const QString& uid)
1008{ 1006{
1009 mDisplayDetails->setSourceChannel(""); 1007 mDisplayDetails->setSourceChannel("");
1010 return mDisplayDetails->sendMessageToTarget("", name, email, uid); 1008 return mDisplayDetails->sendMessageToTarget("", name, email, uid);
1011} 1009}
1012 1010
1013 1011
1014 1012
1015 1013
1016 1014