summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-09-17 09:46:54 (UTC)
committer zautrix <zautrix>2004-09-17 09:46:54 (UTC)
commit9421138854b85a9baced09649f617118502610c1 (patch) (side-by-side diff)
treea7f78207de34e2b67d3a4709531714cb848f3d16
parent6341e161c5af4e5ac1d1d3ec9fdabf04b287800f (diff)
downloadkdepimpi-9421138854b85a9baced09649f617118502610c1.zip
kdepimpi-9421138854b85a9baced09649f617118502610c1.tar.gz
kdepimpi-9421138854b85a9baced09649f617118502610c1.tar.bz2
Fixed bug externalapphandler
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libkdepim/externalapphandler.cpp26
1 files changed, 14 insertions, 12 deletions
diff --git a/libkdepim/externalapphandler.cpp b/libkdepim/externalapphandler.cpp
index fa56ee9..99aee86 100644
--- a/libkdepim/externalapphandler.cpp
+++ b/libkdepim/externalapphandler.cpp
@@ -78,13 +78,13 @@ bool QCopTransferItem::sendMessageToTarget(const QString& uid, const QString& pa
{
#ifndef DESKTOP_VERSION
//sourceMessage passes two parameters: sourceChannel, uid
QString sourceMessage = _sourceMessage + _sourceMessageParameters;
- qDebug("Using QCopEnvelope e(\"%s\",\"%s\")", _targetChannel.latin1(), sourceMessage.latin1());
+ qDebug("1Using QCopEnvelope e(\"%s\",\"%s\")", _targetChannel.latin1(), sourceMessage.latin1());
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());
QCopEnvelope e(_targetChannel.latin1(), sourceMessage.latin1());
e << _sourceChannel << uid;
@@ -108,13 +108,13 @@ bool QCopTransferItem::sendMessageToTarget(const QString& uid, const QString& pa
/*********************************************************************************/
void QCopTransferItem::setSourceChannel(const QString& sourceChannel)
{
- if (_sourceChannel.isEmpty())
+ if ( !sourceChannel.isEmpty())
_sourceChannel = sourceChannel;
}
/*********************************************************************************/
bool QCopTransferItem::appMessage( const QCString& cmsg, const QByteArray& data )
@@ -194,13 +194,13 @@ QCopMapTransferItem::QCopMapTransferItem(int usedSourceParameters, const QString
bool QCopMapTransferItem::sendMessageToSource(const QString& uid, const QMap<QString,QString>& nameEmailMap)
{
#ifndef DESKTOP_VERSION
//targetMessage passes two parameters: uid, map
QString targetMessage = _targetMessage + _targetMessageParameters;
- qDebug("Using QCopEnvelope e(\"%s\",\"%s\")", _sourceChannel.latin1(), targetMessage.latin1());
+ qDebug("2Using QCopEnvelope e(\"%s\",\"%s\")", _sourceChannel.latin1(), targetMessage.latin1());
qDebug("passing uid(%s) and map as parameter to QCopEnvelope", uid.latin1());
QCopEnvelope e(_sourceChannel.latin1(), targetMessage.latin1());
//US we need no names in the To field. The emailadresses are enough
e << uid << nameEmailMap;
@@ -263,13 +263,13 @@ QCopListTransferItem::QCopListTransferItem(int usedSourceParameters, const QStri
bool QCopListTransferItem::sendMessageToSource(const QString& uid, const QStringList& list1, const QStringList& list2, const QStringList& list3)
{
#ifndef DESKTOP_VERSION
//targetMessage passes two parameters: uid, map
QString targetMessage = _targetMessage + _targetMessageParameters;
- qDebug("Using QCopEnvelope e(\"%s\",\"%s\")", _sourceChannel.latin1(), targetMessage.latin1());
+ qDebug("3Using QCopEnvelope e(\"%s\",\"%s\")", _sourceChannel.latin1(), targetMessage.latin1());
qDebug("passing uid(%s) and list1, list2, list3 as parameter to QCopEnvelope", uid.latin1());
QCopEnvelope e(_sourceChannel.latin1(), targetMessage.latin1());
//US we need no names in the To field. The emailadresses are enough
e << uid << list1 << list2 << list3;
@@ -287,18 +287,19 @@ bool QCopListTransferItem::sendMessageToSource(const QString& uid, const QString
/*********************************************************************************/
bool QCopListTransferItem::appMessage( const QCString& cmsg, const QByteArray& data )
{
bool res = QCopTransferItem::appMessage( cmsg, data );
+ qDebug("1QCopListTransferItem- QCOP message received: %s ", cmsg.data() );
if (res == false)
{
QDataStream stream( data, IO_ReadOnly );
-// qDebug("QCopListTransferItem- QCOP message received: %s ", cmsg.data() );
+ qDebug("2QCopListTransferItem- QCOP message received: %s ", cmsg.data() );
//we are in the source and get an answer from the target
if ((_targetMessage + _targetMessageParameters) == cmsg.data())
{
QStringList list1;
QStringList list2;
@@ -601,13 +602,13 @@ bool ExternalAppHandler::mailToMultipleContacts( const QString& emails, const QS
}
//first check if one of the mailers need the emails right in the message.
message2 = translateMessage(message2, emails, urls);
- qDebug("Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message2.latin1());
+ qDebug("4Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message2.latin1());
qDebug("passing emailadresses(%s), attachmenturls(%s) as parameters in the form %s to QCopEnvelope", emails.latin1() , urls.latin1(), parameters2.latin1());
QCopEnvelope e(channel.latin1(), message2.latin1());
//US we need no names in the To field. The emailadresses are enough
@@ -658,13 +659,13 @@ bool ExternalAppHandler::mailToOneContact( const QString& name, const QString& e
//first check if one of the mailers need the emails right in the message.
message = translateMessage(message, name, emailadress);
- qDebug("Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1());
+ qDebug("5Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1());
qDebug("passing name(%s), emailadresses(%s) as parameters in the form %s to QCopEnvelope", name.latin1(), emailadress.latin1(), parameters.latin1());
QCopEnvelope e(channel.latin1(), message.latin1());
//US we need no names in the To field. The emailadresses are enough
passParameters(&e, parameters, name, emailadress);
@@ -735,13 +736,13 @@ bool ExternalAppHandler::callByPhone( const QString& phonenumber )
//first check if one of the mailers need the emails right in the message.
message = translateMessage(message, phonenumber, "");
- qDebug("Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1());
+ qDebug("6Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1());
qDebug("passing phonenumber(%s) as parameter in the form %s to QCopEnvelope", phonenumber.latin1(), parameters.latin1());
QCopEnvelope e(channel.latin1(), message.latin1());
//US we need no names in the To field. The emailadresses are enough
passParameters(&e, parameters, phonenumber, "");
@@ -790,13 +791,13 @@ bool ExternalAppHandler::callBySMS( const QString& phonenumber )
//first check if one of the mailers need the emails right in the message.
message = translateMessage(message, phonenumber, "");
- qDebug("Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1());
+ qDebug("7Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1());
qDebug("passing phonenumber(%s) as parameter in the form %s to QCopEnvelope", phonenumber.latin1(), parameters.latin1());
QCopEnvelope e(channel.latin1(), message.latin1());
//US we need no names in the To field. The emailadresses are enough
passParameters(&e, parameters, phonenumber, "");
@@ -845,13 +846,13 @@ bool ExternalAppHandler::callByPager( const QString& pagernumber )
//first check if one of the mailers need the emails right in the message.
message = translateMessage(message, pagernumber, "");
- qDebug("Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1());
+ qDebug("8Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1());
qDebug("passing pagernumber(%s) as parameter in the form %s to QCopEnvelope", pagernumber.latin1(), parameters.latin1());
QCopEnvelope e(channel.latin1(), message.latin1());
//US we need no names in the To field. The emailadresses are enough
passParameters(&e, parameters, pagernumber, "");
@@ -900,13 +901,13 @@ bool ExternalAppHandler::callByFax( const QString& faxnumber )
//first check if one of the mailers need the emails right in the message.
message = translateMessage(message, faxnumber, "");
- qDebug("Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1());
+ qDebug("9Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1());
qDebug("passing faxnumber(%s) as parameter in the form %s to QCopEnvelope", faxnumber.latin1(), parameters.latin1());
QCopEnvelope e(channel.latin1(), message.latin1());
//US we need no names in the To field. The emailadresses are enough
passParameters(&e, parameters, faxnumber, "");
@@ -955,13 +956,13 @@ bool ExternalAppHandler::callBySIP( const QString& sipnumber )
//first check if one of the sip apps need the emails right in the message.
message = translateMessage(message, sipnumber, "");
- qDebug("Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1());
+ qDebug("10Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1());
qDebug("passing sipnumber(%s) as parameter in the form %s to QCopEnvelope", sipnumber.latin1(), parameters.latin1());
QCopEnvelope e(channel.latin1(), message.latin1());
//US we need no names in the To field. The emailadresses are enough
passParameters(&e, parameters, sipnumber, "");
@@ -1061,12 +1062,13 @@ bool ExternalAppHandler::requestNameEmailUidListFromKAPI(const QString& sourceCh
mNameEmailUidListFromKAPITransfer->setSourceChannel(sourceChannel);
return mNameEmailUidListFromKAPITransfer->sendMessageToTarget(sessionuid);
}
bool ExternalAppHandler::returnNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& list1, const QStringList& list2, const QStringList& list3)
{
+
mNameEmailUidListFromKAPITransfer->setSourceChannel(sourceChannel);
return mNameEmailUidListFromKAPITransfer->sendMessageToSource(sessionuid, list1, list2, list3);
}
bool ExternalAppHandler::requestFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QString& email)
{