telepathy-qt: Pass the whole request to ensureChannel() and createChannel( )
David Edmundson
davidedmundson at kemper.freedesktop.org
Tue Feb 10 06:30:10 PST 2015
Module: telepathy-qt
Branch: master
Commit: 16304b8388afb7529be1f234470d73c4b8eeac49
URL: http://cgit.freedesktop.org/telepathy/telepathy-qt/commit/?id=16304b8388afb7529be1f234470d73c4b8eeac49
Author: Tiago Salem Herrmann <tiago.herrmann at canonical.com>
Date: Fri Jan 30 18:31:09 2015 -0200
Pass the whole request to ensureChannel() and createChannel()
---
TelepathyQt/base-connection.cpp | 9 +++++++--
TelepathyQt/base-connection.h | 6 +++---
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/TelepathyQt/base-connection.cpp b/TelepathyQt/base-connection.cpp
index 9e02d7b..43f9a65 100644
--- a/TelepathyQt/base-connection.cpp
+++ b/TelepathyQt/base-connection.cpp
@@ -154,6 +154,7 @@ void BaseConnection::Adaptee::requestChannel(const QString &type, uint handleTyp
yours,
selfHandle(),
suppressHandler,
+ QVariantMap(),
&error);
if (error.isValid() || !channel) {
context->setFinishedWithError(error.name(), error.message());
@@ -289,6 +290,7 @@ Tp::BaseChannelPtr BaseConnection::createChannel(const QString &channelType,
uint targetHandle,
uint initiatorHandle,
bool suppressHandler,
+ const QVariantMap &request,
DBusError *error)
{
if (!mPriv->createChannelCB.isValid()) {
@@ -300,7 +302,7 @@ Tp::BaseChannelPtr BaseConnection::createChannel(const QString &channelType,
return BaseChannelPtr();
}
- BaseChannelPtr channel = mPriv->createChannelCB(channelType, targetHandleType, targetHandle, error);
+ BaseChannelPtr channel = mPriv->createChannelCB(channelType, targetHandleType, targetHandle, request, error);
if (error->isValid())
return BaseChannelPtr();
@@ -404,6 +406,7 @@ Tp::ChannelDetailsList BaseConnection::channelsDetails()
BaseChannelPtr BaseConnection::ensureChannel(const QString &channelType, uint targetHandleType,
uint targetHandle, bool &yours, uint initiatorHandle,
bool suppressHandler,
+ const QVariantMap &request,
DBusError* error)
{
foreach(BaseChannelPtr channel, mPriv->channels) {
@@ -415,7 +418,7 @@ BaseChannelPtr BaseConnection::ensureChannel(const QString &channelType, uint ta
}
}
yours = true;
- return createChannel(channelType, targetHandleType, targetHandle, initiatorHandle, suppressHandler, error);
+ return createChannel(channelType, targetHandleType, targetHandle, initiatorHandle, suppressHandler, request, error);
}
void BaseConnection::addChannel(BaseChannelPtr channel)
@@ -782,6 +785,7 @@ void BaseConnectionRequestsInterface::ensureChannel(const QVariantMap &request,
targetHandle, yours,
mPriv->connection->selfHandle(),
suppressHandler,
+ request,
error);
if (error->isValid())
return;
@@ -810,6 +814,7 @@ void BaseConnectionRequestsInterface::createChannel(const QVariantMap &request,
targetHandle,
mPriv->connection->selfHandle(),
suppressHandler,
+ request,
error);
if (error->isValid())
return;
diff --git a/TelepathyQt/base-connection.h b/TelepathyQt/base-connection.h
index 28bba93..28ea68f 100644
--- a/TelepathyQt/base-connection.h
+++ b/TelepathyQt/base-connection.h
@@ -82,9 +82,9 @@ public:
void setStatus(uint newStatus, uint reason);
- typedef Callback4<BaseChannelPtr, const QString&, uint, uint, DBusError*> CreateChannelCallback;
+ typedef Callback5<BaseChannelPtr, const QString&, uint, uint, const QVariantMap&, DBusError*> CreateChannelCallback;
void setCreateChannelCallback(const CreateChannelCallback &cb);
- Tp::BaseChannelPtr createChannel(const QString &channelType, uint targetHandleType, uint targetHandle, uint initiatorHandle, bool suppressHandler, DBusError *error);
+ Tp::BaseChannelPtr createChannel(const QString &channelType, uint targetHandleType, uint targetHandle, uint initiatorHandle, bool suppressHandler, const QVariantMap &request, DBusError *error);
typedef Callback3<UIntList, uint, const QStringList&, DBusError*> RequestHandlesCallback;
void setRequestHandlesCallback(const RequestHandlesCallback &cb);
@@ -106,7 +106,7 @@ public:
Tp::ChannelDetailsList channelsDetails();
BaseChannelPtr ensureChannel(const QString &channelType, uint targetHandleType,
- uint targetHandle, bool &yours, uint initiatorHandle, bool suppressHandler, DBusError *error);
+ uint targetHandle, bool &yours, uint initiatorHandle, bool suppressHandler, const QVariantMap &request, DBusError *error);
void addChannel(BaseChannelPtr channel);
QList<AbstractConnectionInterfacePtr> interfaces() const;
More information about the telepathy-commits
mailing list