author | ulf69 <ulf69> | 2004-10-07 01:04:18 (UTC) |
---|---|---|
committer | ulf69 <ulf69> | 2004-10-07 01:04:18 (UTC) |
commit | 0406c1ac252f2fa631f7a486e73b0a97d09874f9 (patch) (unidiff) | |
tree | 72de99490603b5913a39a101ef571ba74acd6798 /libkdepim/externalapphandler.cpp | |
parent | 0afcfa29ace7bc5e42a11fae44301e1e8230a376 (diff) | |
download | kdepimpi-0406c1ac252f2fa631f7a486e73b0a97d09874f9.zip kdepimpi-0406c1ac252f2fa631f7a486e73b0a97d09874f9.tar.gz kdepimpi-0406c1ac252f2fa631f7a486e73b0a97d09874f9.tar.bz2 |
added functionality for Birthdaylookup from kopi via qCop
Diffstat (limited to 'libkdepim/externalapphandler.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libkdepim/externalapphandler.cpp | 68 |
1 files changed, 58 insertions, 10 deletions
diff --git a/libkdepim/externalapphandler.cpp b/libkdepim/externalapphandler.cpp index 99aee86..07bdff2 100644 --- a/libkdepim/externalapphandler.cpp +++ b/libkdepim/externalapphandler.cpp | |||
@@ -258,3 +258,3 @@ QCopListTransferItem::QCopListTransferItem(int usedSourceParameters, const QStri | |||
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,QStringList,QStringList,QStringList)"; |
260 | } | 260 | } |
@@ -262,3 +262,3 @@ QCopListTransferItem::QCopListTransferItem(int usedSourceParameters, const QStri | |||
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, const QStringList& list4, const QStringList& list5, const QStringList& list6) |
264 | { | 264 | { |
@@ -269,3 +269,7 @@ bool QCopListTransferItem::sendMessageToSource(const QString& uid, const QString | |||
269 | qDebug("3Using 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, list4, list5, list6 as parameter to QCopEnvelope", uid.latin1()); |
271 | |||
272 | |||
273 | for ( int i = 0; i < list3.count(); i++) | ||
274 | qDebug("listentry list3: %s",list3[i].latin1()); | ||
271 | 275 | ||
@@ -274,3 +278,3 @@ bool QCopListTransferItem::sendMessageToSource(const QString& uid, const QString | |||
274 | 278 | ||
275 | e << uid << list1 << list2 << list3; | 279 | e << uid << list1 << list2 << list3 << list4 << list5 << list6; |
276 | 280 | ||
@@ -306,6 +310,11 @@ bool QCopListTransferItem::appMessage( const QCString& cmsg, const QByteArray& d | |||
306 | QStringList list3; | 310 | QStringList list3; |
311 | QStringList list4; | ||
312 | QStringList list5; | ||
313 | QStringList list6; | ||
307 | QString uid; | 314 | QString uid; |
308 | 315 | ||
309 | stream >> uid >> list1 >> list2 >> list3; | 316 | qDebug("3QCopListTransferItem- QCOP message received: %s ", cmsg.data() ); |
310 | emit receivedMessageFromTarget(uid, list1, list2, list3); | 317 | |
318 | stream >> uid >> list1 >> list2 >> list3 >> list4 >> list5 >> list6; | ||
319 | emit receivedMessageFromTarget(uid, list1, list2, list3, list4, list5, list6); | ||
311 | 320 | ||
@@ -335,3 +344,3 @@ ExternalAppHandler::ExternalAppHandler() | |||
335 | connect(mNameEmailUidListFromKAPITransfer, SIGNAL (receivedMessageFromSource(const QString&, const QString&)), this, SIGNAL (requestForNameEmailUidList(const QString&, const QString&))); | 344 | 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&))); | 345 | connect(mNameEmailUidListFromKAPITransfer, SIGNAL (receivedMessageFromTarget(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)), this, SLOT (receivedNameEmailUidList_Slot(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&))); |
337 | 346 | ||
@@ -343,2 +352,10 @@ ExternalAppHandler::ExternalAppHandler() | |||
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&))); | 352 | 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&))); |
353 | |||
354 | |||
355 | |||
356 | mBirthdayListFromKAPITransfer = new QCopListTransferItem(0, "requestBirthdayListFromKAPI", "QPE/Application/kapi", "receiveBirthdayList"); | ||
357 | connect(mBirthdayListFromKAPITransfer, SIGNAL (receivedMessageFromSource(const QString&, const QString&)), this, SIGNAL (requestForBirthdayList(const QString&, const QString&))); | ||
358 | connect(mBirthdayListFromKAPITransfer, SIGNAL (receivedMessageFromTarget(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)), this, SIGNAL (receivedBirthdayListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&))); | ||
359 | |||
360 | |||
344 | } | 361 | } |
@@ -349,2 +366,15 @@ ExternalAppHandler::~ExternalAppHandler() | |||
349 | 366 | ||
367 | void ExternalAppHandler::receivedNameEmailUidList_Slot(const QString& uid, | ||
368 | const QStringList& nameList, | ||
369 | const QStringList& emailList, | ||
370 | const QStringList& uidList, | ||
371 | const QStringList&, | ||
372 | const QStringList&, | ||
373 | const QStringList& ) | ||
374 | { | ||
375 | // this method is a conevnient way to reduce the number of parameters I have to pass | ||
376 | emit receivedNameEmailUidListEvent(uid, nameList, emailList, uidList); | ||
377 | } | ||
378 | |||
379 | |||
350 | void ExternalAppHandler::loadConfig() | 380 | void ExternalAppHandler::loadConfig() |
@@ -1051,2 +1081,5 @@ void ExternalAppHandler::appMessage( const QCString& cmsg, const QByteArray& dat | |||
1051 | if (!res) | 1081 | if (!res) |
1082 | res = mBirthdayListFromKAPITransfer->appMessage( cmsg, data ); | ||
1083 | |||
1084 | if (!res) | ||
1052 | res = mDisplayDetails->appMessage( cmsg, data ); | 1085 | res = mDisplayDetails->appMessage( cmsg, data ); |
@@ -1067,5 +1100,6 @@ bool ExternalAppHandler::returnNameEmailUidListFromKAPI(const QString& sourceCha | |||
1067 | { | 1100 | { |
1068 | 1101 | QStringList list4, list5, list6; | |
1102 | |||
1069 | mNameEmailUidListFromKAPITransfer->setSourceChannel(sourceChannel); | 1103 | mNameEmailUidListFromKAPITransfer->setSourceChannel(sourceChannel); |
1070 | return mNameEmailUidListFromKAPITransfer->sendMessageToSource(sessionuid, list1, list2, list3); | 1104 | return mNameEmailUidListFromKAPITransfer->sendMessageToSource(sessionuid, list1, list2, list3, list4, list5, list6); |
1071 | } | 1105 | } |
@@ -1080,4 +1114,6 @@ bool ExternalAppHandler::returnFindByEmailFromKAPI(const QString& sourceChannel, | |||
1080 | { | 1114 | { |
1115 | QStringList list4, list5, list6; | ||
1116 | |||
1081 | mFindByEmailFromKAPITransfer->setSourceChannel(sourceChannel); | 1117 | mFindByEmailFromKAPITransfer->setSourceChannel(sourceChannel); |
1082 | return mFindByEmailFromKAPITransfer->sendMessageToSource(sessionuid, list1, list2, list3); | 1118 | return mFindByEmailFromKAPITransfer->sendMessageToSource(sessionuid, list1, list2, list3, list4, list5, list6); |
1083 | } | 1119 | } |
@@ -1090,2 +1126,14 @@ bool ExternalAppHandler::requestDetailsFromKAPI(const QString& name, const QStri | |||
1090 | 1126 | ||
1127 | bool ExternalAppHandler::requestBirthdayListFromKAPI(const QString& sourceChannel, const QString& sessionuid) | ||
1128 | { | ||
1129 | mBirthdayListFromKAPITransfer->setSourceChannel(sourceChannel); | ||
1130 | return mBirthdayListFromKAPITransfer->sendMessageToTarget(sessionuid); | ||
1131 | } | ||
1132 | |||
1133 | bool ExternalAppHandler::returnBirthdayListFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& list1, const QStringList& list2, const QStringList& list3, const QStringList& list4, const QStringList& list5, const QStringList& list6) | ||
1134 | { | ||
1135 | mBirthdayListFromKAPITransfer->setSourceChannel(sourceChannel); | ||
1136 | return mBirthdayListFromKAPITransfer->sendMessageToSource(sessionuid, list1, list2, list3, list4, list5, list6); | ||
1137 | } | ||
1138 | |||
1091 | 1139 | ||