[telepathy-qt4/master] ClientRegistrar: Do not expose QDBusObjectPath in public API, use QString instead.
Andre Moreira Magalhaes (andrunko)
andre.magalhaes at collabora.co.uk
Tue May 19 06:48:59 PDT 2009
As all other classes QDBusObjectPath is not exposed in public API, so changing
to use QString instead.
---
TelepathyQt4/abstract-client.cpp | 4 ++--
TelepathyQt4/abstract-client.h | 6 +++---
TelepathyQt4/client-registrar.cpp | 10 +++++++---
3 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/TelepathyQt4/abstract-client.cpp b/TelepathyQt4/abstract-client.cpp
index 3eeea08..2361c3b 100644
--- a/TelepathyQt4/abstract-client.cpp
+++ b/TelepathyQt4/abstract-client.cpp
@@ -67,7 +67,7 @@ bool AbstractClientHandler::isListeningRequests() const
}
void AbstractClientHandler::addRequest(
- const QDBusObjectPath &requestObjectPath,
+ const QString &requestObjectPath,
const QVariantMap &requestProperties)
{
// do nothing, subclasses that want to listen requests should reimplement
@@ -75,7 +75,7 @@ void AbstractClientHandler::addRequest(
}
void AbstractClientHandler::removeRequest(
- const QDBusObjectPath &requestObjectPath,
+ const QString &requestObjectPath,
const QString &errorName, const QString &errorMessage)
{
// do nothing, subclasses that want to listen requests should reimplement
diff --git a/TelepathyQt4/abstract-client.h b/TelepathyQt4/abstract-client.h
index 569cf04..aaf1a5d 100644
--- a/TelepathyQt4/abstract-client.h
+++ b/TelepathyQt4/abstract-client.h
@@ -70,14 +70,14 @@ public:
const AccountPtr &account,
const ConnectionPtr &connection,
const QList<ChannelPtr> &channels,
- const ObjectPathList &requestsSatisfied,
+ const QStringList &requestsSatisfied,
qulonglong userActionTime,
const QVariantMap &handlerInfo) = 0;
bool isListeningRequests() const;
- virtual void addRequest(const QDBusObjectPath &requestObjectPath,
+ virtual void addRequest(const QString &requestObjectPath,
const QVariantMap &requestProperties);
- virtual void removeRequest(const QDBusObjectPath &requestObjectPath,
+ virtual void removeRequest(const QString &requestObjectPath,
const QString &errorName, const QString &errorMessage);
protected:
diff --git a/TelepathyQt4/client-registrar.cpp b/TelepathyQt4/client-registrar.cpp
index ec78a35..2b942e3 100644
--- a/TelepathyQt4/client-registrar.cpp
+++ b/TelepathyQt4/client-registrar.cpp
@@ -186,8 +186,12 @@ void ClientHandlerAdaptor::HandleChannelsCall::checkFinished()
}
// now we are ready to call AbstractClientHandler::handleChannels
+ QStringList requestsSatisfied;
+ foreach (const QDBusObjectPath &path, mRequestsSatisfied) {
+ requestsSatisfied.append(path.path());
+ }
mClient->handleChannels(mOperation, mAccount, mConnection, mChannels,
- mRequestsSatisfied, mUserActionTime, mHandlerInfo);
+ requestsSatisfied, mUserActionTime, mHandlerInfo);
emit finished();
}
@@ -218,7 +222,7 @@ void ClientHandlerRequestsAdaptor::AddRequest(
const QDBusMessage &message)
{
mBus.send(message.createReply());
- mClient->addRequest(request, properties);
+ mClient->addRequest(request.path(), properties);
}
void ClientHandlerRequestsAdaptor::RemoveRequest(
@@ -227,7 +231,7 @@ void ClientHandlerRequestsAdaptor::RemoveRequest(
const QDBusMessage &message)
{
mBus.send(message.createReply());
- mClient->removeRequest(request, errorName, errorMessage);
+ mClient->removeRequest(request.path(), errorName, errorMessage);
}
struct ClientRegistrar::Private
--
1.5.6.5
More information about the telepathy-commits
mailing list