summaryrefslogtreecommitdiffabout
Side-by-side diff
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
@@ -80,9 +80,9 @@ 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());
@@ -110,9 +110,9 @@ bool QCopTransferItem::sendMessageToTarget(const QString& uid, const QString& pa
/*********************************************************************************/
void QCopTransferItem::setSourceChannel(const QString& sourceChannel)
{
- if (_sourceChannel.isEmpty())
+ if ( !sourceChannel.isEmpty())
_sourceChannel = sourceChannel;
}
@@ -196,9 +196,9 @@ bool QCopMapTransferItem::sendMessageToSource(const QString& uid, const QMap<QSt
#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
@@ -265,9 +265,9 @@ bool QCopListTransferItem::sendMessageToSource(const QString& uid, const QString
#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
@@ -289,14 +289,15 @@ 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())
{
@@ -603,9 +604,9 @@ 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());
@@ -660,9 +661,9 @@ 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
@@ -737,9 +738,9 @@ 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
@@ -792,9 +793,9 @@ 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
@@ -847,9 +848,9 @@ 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
@@ -902,9 +903,9 @@ 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
@@ -957,9 +958,9 @@ 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
@@ -1063,8 +1064,9 @@ bool ExternalAppHandler::requestNameEmailUidListFromKAPI(const QString& sourceCh
}
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);
}