telepathy-qt: dbus-tubes: Remove dbus-tube-channel-internal. h and add protected methods for fulfilling that
Dario Freddi
drf at kemper.freedesktop.org
Tue Jul 3 15:08:40 PDT 2012
Module: telepathy-qt
Branch: master
Commit: fd01ca8dd407eebbb9796a6a13b973c98cc29bcb
URL: http://cgit.freedesktop.org/telepathy/telepathy-qt/commit/?id=fd01ca8dd407eebbb9796a6a13b973c98cc29bcb
Author: Dario Freddi <dario.freddi at collabora.co.uk>
Date: Fri Jun 3 23:41:58 2011 +0200
dbus-tubes: Remove dbus-tube-channel-internal.h and add protected methods for fulfilling that
---
TelepathyQt/dbus-tube-channel-internal.h | 54 ------------------------------
TelepathyQt/dbus-tube-channel.cpp | 29 +++++++++++++++-
TelepathyQt/dbus-tube-channel.h | 2 +
TelepathyQt/pending-dbus-tube.cpp | 5 +--
4 files changed, 32 insertions(+), 58 deletions(-)
diff --git a/TelepathyQt/dbus-tube-channel-internal.h b/TelepathyQt/dbus-tube-channel-internal.h
deleted file mode 100644
index 0c39f78..0000000
--- a/TelepathyQt/dbus-tube-channel-internal.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * This file is part of TelepathyQt4
- *
- * Copyright (C) 2010 Collabora Ltd. <http://www.collabora.co.uk/>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef _TelepathyQt_incoming_dbus_tube_channel_internal_h_HEADER_GUARD_
-#define _TelepathyQt_incoming_dbus_tube_channel_internal_h_HEADER_GUARD_
-
-#include <TelepathyQt/DBusTubeChannel>
-
-namespace Tp
-{
-
-struct TP_QT_NO_EXPORT DBusTubeChannel::Private
-{
- Private(DBusTubeChannel *parent);
- virtual ~Private();
-
- void extractProperties(const QVariantMap &props);
- void extractParticipants(const Tp::DBusTubeParticipants &participants);
-
- static void introspectDBusTube(Private *self);
- static void introspectBusNamesMonitoring(Private *self);
-
- ReadinessHelper *readinessHelper;
-
- // Public object
- DBusTubeChannel *parent;
-
- // Properties
- UIntList accessControls;
- QString serviceName;
- QHash<ContactPtr, QString> busNames;
- QString address;
-};
-
-}
-
-#endif
diff --git a/TelepathyQt/dbus-tube-channel.cpp b/TelepathyQt/dbus-tube-channel.cpp
index a1ce5c4..c16c0cd 100644
--- a/TelepathyQt/dbus-tube-channel.cpp
+++ b/TelepathyQt/dbus-tube-channel.cpp
@@ -19,7 +19,6 @@
*/
#include <TelepathyQt/DBusTubeChannel>
-#include "TelepathyQt/dbus-tube-channel-internal.h"
#include "TelepathyQt/_gen/dbus-tube-channel.moc.hpp"
@@ -31,6 +30,29 @@
namespace Tp
{
+struct TP_QT_NO_EXPORT DBusTubeChannel::Private
+{
+ Private(DBusTubeChannel *parent);
+ virtual ~Private();
+
+ void extractProperties(const QVariantMap &props);
+ void extractParticipants(const Tp::DBusTubeParticipants &participants);
+
+ static void introspectDBusTube(Private *self);
+ static void introspectBusNamesMonitoring(Private *self);
+
+ ReadinessHelper *readinessHelper;
+
+ // Public object
+ DBusTubeChannel *parent;
+
+ // Properties
+ UIntList accessControls;
+ QString serviceName;
+ QHash<ContactPtr, QString> busNames;
+ QString address;
+};
+
DBusTubeChannel::Private::Private(DBusTubeChannel *parent)
: parent(parent)
{
@@ -340,6 +362,11 @@ void DBusTubeChannel::onDBusNamesChanged(const Tp::DBusTubeParticipants &added,
emit busNamesChanged(realAdded, realRemoved);
}
+void DBusTubeChannel::setAddress(const QString& address)
+{
+ mPriv->address = address;
+}
+
// Signals documentation
/**
* \fn void DBusTubeChannel::busNamesChanged(const QHash< ContactPtr, QString > &added, const QList< ContactPtr > &removed)
diff --git a/TelepathyQt/dbus-tube-channel.h b/TelepathyQt/dbus-tube-channel.h
index 4863a0f..57b1c46 100644
--- a/TelepathyQt/dbus-tube-channel.h
+++ b/TelepathyQt/dbus-tube-channel.h
@@ -58,6 +58,8 @@ protected:
DBusTubeChannel(const ConnectionPtr &connection, const QString &objectPath,
const QVariantMap &immutableProperties);
+ void setAddress(const QString &address);
+
Q_SIGNALS:
void busNamesChanged(const QHash<ContactPtr, QString> &added, const QList<ContactPtr> &removed);
diff --git a/TelepathyQt/pending-dbus-tube.cpp b/TelepathyQt/pending-dbus-tube.cpp
index 61462bf..0d597af 100644
--- a/TelepathyQt/pending-dbus-tube.cpp
+++ b/TelepathyQt/pending-dbus-tube.cpp
@@ -22,7 +22,6 @@
#include "TelepathyQt/_gen/pending-dbus-tube.moc.hpp"
-#include "TelepathyQt/dbus-tube-channel-internal.h"
#include "TelepathyQt/debug-internal.h"
#include <TelepathyQt/IncomingDBusTubeChannel>
@@ -141,7 +140,7 @@ void PendingDBusTube::onAcceptFinished(PendingOperation *op)
// Now get the address and set it
PendingString *ps = qobject_cast<PendingString*>(op);
- mPriv->tube->mPriv->address = ps->result();
+ mPriv->tube->setAddress(ps->result());
// It might have been already opened - check
if (mPriv->tube->state() == TubeChannelStateOpen) {
@@ -165,7 +164,7 @@ void PendingDBusTube::onOfferFinished(PendingOperation *op)
// Now get the address and set it
PendingString *ps = qobject_cast<PendingString*>(op);
- mPriv->tube->mPriv->address = ps->result();
+ mPriv->tube->setAddress(ps->result());
// It might have been already opened - check
if (mPriv->tube->state() == TubeChannelStateOpen) {
More information about the telepathy-commits
mailing list