diff options
-rw-r--r-- | TelepathyQt/dbus-tube-channel.cpp | 37 | ||||
-rw-r--r-- | TelepathyQt/dbus-tube-channel.h | 10 | ||||
-rw-r--r-- | TelepathyQt/incoming-dbus-tube-channel.cpp | 12 | ||||
-rw-r--r-- | TelepathyQt/outgoing-dbus-tube-channel-internal.h | 4 | ||||
-rw-r--r-- | TelepathyQt/outgoing-dbus-tube-channel.cpp | 21 | ||||
-rw-r--r-- | TelepathyQt/pending-dbus-tube-accept.cpp | 12 | ||||
-rw-r--r-- | TelepathyQt/pending-dbus-tube-accept.h | 3 | ||||
-rw-r--r-- | TelepathyQt/pending-dbus-tube-offer.cpp | 12 | ||||
-rw-r--r-- | TelepathyQt/pending-dbus-tube-offer.h | 11 |
9 files changed, 54 insertions, 68 deletions
diff --git a/TelepathyQt/dbus-tube-channel.cpp b/TelepathyQt/dbus-tube-channel.cpp index e91c971d..67936b25 100644 --- a/TelepathyQt/dbus-tube-channel.cpp +++ b/TelepathyQt/dbus-tube-channel.cpp @@ -20,11 +20,13 @@ #include <TelepathyQt/DBusTubeChannel> -#include <TelepathyQt/Connection> -#include <TelepathyQt/ContactManager> +#include "TelepathyQt/_gen/dbus-tube-channel.moc.hpp" #include "TelepathyQt/debug-internal.h" +#include <TelepathyQt/Connection> +#include <TelepathyQt/ContactManager> + namespace Tp { @@ -47,12 +49,12 @@ struct TP_QT_NO_EXPORT DBusTubeChannel::Private // Properties UIntList accessControls; QString serviceName; - QHash< ContactPtr, QString > busNames; + QHash<ContactPtr, QString> busNames; QString address; }; DBusTubeChannel::Private::Private(DBusTubeChannel *parent) - : parent(parent) + : parent(parent) { // Initialize readinessHelper + introspectables here readinessHelper = parent->readinessHelper(); @@ -101,7 +103,7 @@ void DBusTubeChannel::Private::extractParticipants(const Tp::DBusTubeParticipant } -void DBusTubeChannel::gotDBusTubeProperties(QDBusPendingCallWatcher* watcher) +void DBusTubeChannel::gotDBusTubeProperties(QDBusPendingCallWatcher *watcher) { QDBusPendingReply<QVariantMap> reply = *watcher; @@ -122,8 +124,8 @@ void DBusTubeChannel::onDBusNamesChanged( const Tp::DBusTubeParticipants &added, const Tp::UIntList &removed) { - QHash< ContactPtr, QString > realAdded; - QList< ContactPtr > realRemoved; + QHash<ContactPtr, QString> realAdded; + QList<ContactPtr> realRemoved; for (DBusTubeParticipants::const_iterator i = added.constBegin(); i != added.constEnd(); @@ -146,7 +148,7 @@ void DBusTubeChannel::onDBusNamesChanged( } void DBusTubeChannel::Private::introspectBusNamesMonitoring( - DBusTubeChannel::Private* self) + DBusTubeChannel::Private *self) { DBusTubeChannel *parent = self->parent; @@ -168,7 +170,7 @@ void DBusTubeChannel::Private::introspectBusNamesMonitoring( } void DBusTubeChannel::Private::introspectDBusTube( - DBusTubeChannel::Private* self) + DBusTubeChannel::Private *self) { DBusTubeChannel *parent = self->parent; @@ -183,9 +185,9 @@ void DBusTubeChannel::Private::introspectDBusTube( QLatin1String(TP_QT_IFACE_CHANNEL_TYPE_DBUS_TUBE)), parent); parent->connect(watcher, - SIGNAL(finished(QDBusPendingCallWatcher *)), + SIGNAL(finished(QDBusPendingCallWatcher*)), parent, - SLOT(gotDBusTubeProperties(QDBusPendingCallWatcher *))); + SLOT(gotDBusTubeProperties(QDBusPendingCallWatcher*))); } /** @@ -210,21 +212,18 @@ void DBusTubeChannel::Private::introspectDBusTube( * DBusTubeChannel methods. * See specific methods documentation for more details. */ -const Feature DBusTubeChannel::FeatureDBusTube = -Feature(QLatin1String(DBusTubeChannel::staticMetaObject.className()), 0); +const Feature DBusTubeChannel::FeatureDBusTube = Feature(QLatin1String(DBusTubeChannel::staticMetaObject.className()), 0); /** * Feature used in order to monitor connections to this tube. * Please note that this feature makes sense only in Group tubes. * * %busNamesChanged will be emitted when the participants of this tube change */ -const Feature DBusTubeChannel::FeatureBusNamesMonitoring = -Feature(QLatin1String(DBusTubeChannel::staticMetaObject.className()), 1); +const Feature DBusTubeChannel::FeatureBusNamesMonitoring = Feature(QLatin1String(DBusTubeChannel::staticMetaObject.className()), 1); // Signals documentation /** - * \fn void DBusTubeChannel::busNamesChanged(const QHash< ContactPtr, QString > &added, const QList< ContactPtr > -&removed) + * \fn void DBusTubeChannel::busNamesChanged(const QHash< ContactPtr, QString > &added, const QList< ContactPtr > &removed) * * Emitted when the participants of this tube change * @@ -338,7 +337,7 @@ QHash< ContactPtr, QString > DBusTubeChannel::busNames() const if (!isReady(FeatureBusNamesMonitoring)) { warning() << "DBusTubeChannel::busNames() used with " "FeatureBusNamesMonitoring not ready"; - return QHash< ContactPtr, QString >(); + return QHash<ContactPtr, QString>(); } return mPriv->busNames; @@ -350,5 +349,3 @@ UIntList DBusTubeChannel::accessControls() const } } - -#include "TelepathyQt/_gen/dbus-tube-channel.moc.hpp" diff --git a/TelepathyQt/dbus-tube-channel.h b/TelepathyQt/dbus-tube-channel.h index 07cd907d..2496e6d8 100644 --- a/TelepathyQt/dbus-tube-channel.h +++ b/TelepathyQt/dbus-tube-channel.h @@ -27,10 +27,10 @@ #include <TelepathyQt/TubeChannel> - namespace Tp { + class DBusTubeChannelPrivate; class TP_QT_EXPORT DBusTubeChannel : public TubeChannel { @@ -50,7 +50,7 @@ public: bool supportsCredentials() const; - QHash< Tp::ContactPtr, QString > busNames() const; + QHash<Tp::ContactPtr, QString> busNames() const; QString address() const; @@ -61,11 +61,11 @@ protected: const QVariantMap &immutableProperties); Q_SIGNALS: - void busNamesChanged(const QHash< ContactPtr, QString > &added, const QList< ContactPtr > &removed); + void busNamesChanged(const QHash<ContactPtr, QString> &added, const QList<ContactPtr> &removed); private Q_SLOTS: - void gotDBusTubeProperties(QDBusPendingCallWatcher *watcher); - void onDBusNamesChanged(const Tp::DBusTubeParticipants &added, const Tp::UIntList &removed); + TP_QT_NO_EXPORT void gotDBusTubeProperties(QDBusPendingCallWatcher *watcher); + TP_QT_NO_EXPORT void onDBusNamesChanged(const Tp::DBusTubeParticipants &added, const Tp::UIntList &removed); private: struct Private; diff --git a/TelepathyQt/incoming-dbus-tube-channel.cpp b/TelepathyQt/incoming-dbus-tube-channel.cpp index e40e605a..d1d4ccc6 100644 --- a/TelepathyQt/incoming-dbus-tube-channel.cpp +++ b/TelepathyQt/incoming-dbus-tube-channel.cpp @@ -21,18 +21,20 @@ #include <TelepathyQt/IncomingDBusTubeChannel> #include "TelepathyQt/incoming-dbus-tube-channel-internal.h" +#include "TelepathyQt/_gen/incoming-dbus-tube-channel.moc.hpp" + +#include "TelepathyQt/debug-internal.h" + #include <TelepathyQt/Connection> #include <TelepathyQt/ContactManager> #include <TelepathyQt/PendingDBusTubeAccept> #include <TelepathyQt/PendingString> #include <TelepathyQt/Types> -#include "TelepathyQt/debug-internal.h" - namespace Tp { -IncomingDBusTubeChannel::Private::Private(IncomingDBusTubeChannel* parent) +IncomingDBusTubeChannel::Private::Private(IncomingDBusTubeChannel *parent) : parent(parent) { } @@ -121,7 +123,7 @@ IncomingDBusTubeChannel::~IncomingDBusTubeChannel() * \returns A %PendingOperation which will finish as soon as the tube is ready to be used * (hence in the Open state) */ -PendingDBusTubeAccept* IncomingDBusTubeChannel::acceptTube( +PendingDBusTubeAccept *IncomingDBusTubeChannel::acceptTube( bool requireCredentials) { SocketAccessControl accessControl = requireCredentials ? @@ -172,5 +174,3 @@ QString IncomingDBusTubeChannel::address() const } } - -#include "TelepathyQt/_gen/incoming-dbus-tube-channel.moc.hpp" diff --git a/TelepathyQt/outgoing-dbus-tube-channel-internal.h b/TelepathyQt/outgoing-dbus-tube-channel-internal.h index 2dd38252..8cdf9cc4 100644 --- a/TelepathyQt/outgoing-dbus-tube-channel-internal.h +++ b/TelepathyQt/outgoing-dbus-tube-channel-internal.h @@ -28,8 +28,8 @@ namespace Tp struct TP_QT_NO_EXPORT OutgoingDBusTubeChannel::Private { - Private(OutgoingDBusTubeChannel* parent); - virtual ~Private(); + Private(OutgoingDBusTubeChannel *parent) {} + virtual ~Private() {} // Public object OutgoingDBusTubeChannel *parent; diff --git a/TelepathyQt/outgoing-dbus-tube-channel.cpp b/TelepathyQt/outgoing-dbus-tube-channel.cpp index 37360548..98031978 100644 --- a/TelepathyQt/outgoing-dbus-tube-channel.cpp +++ b/TelepathyQt/outgoing-dbus-tube-channel.cpp @@ -21,26 +21,19 @@ #include <TelepathyQt/OutgoingDBusTubeChannel> #include "TelepathyQt/outgoing-dbus-tube-channel-internal.h" +#include "TelepathyQt/_gen/outgoing-dbus-tube-channel.moc.hpp" + +#include "TelepathyQt/debug-internal.h" + #include <TelepathyQt/Connection> #include <TelepathyQt/ContactManager> #include <TelepathyQt/PendingDBusTubeOffer> #include <TelepathyQt/PendingString> #include <TelepathyQt/Types> -#include "TelepathyQt/debug-internal.h" - namespace Tp { -OutgoingDBusTubeChannel::Private::Private(OutgoingDBusTubeChannel* parent) - : parent(parent) -{ -} - -OutgoingDBusTubeChannel::Private::~Private() -{ -} - /** * \class OutgoingDBusTubeChannel * \headerfile TelepathyQt/stream-tube.h <TelepathyQt/OutgoingDBusTubeChannel> @@ -120,8 +113,8 @@ OutgoingDBusTubeChannel::~OutgoingDBusTubeChannel() * \returns A %PendingOperation which will finish as soon as the tube is ready to be used * (hence in the Open state) */ -PendingDBusTubeOffer* OutgoingDBusTubeChannel::offerTube( - const QVariantMap& parameters, +PendingDBusTubeOffer *OutgoingDBusTubeChannel::offerTube( + const QVariantMap ¶meters, bool requireCredentials) { SocketAccessControl accessControl = requireCredentials ? @@ -173,5 +166,3 @@ QString OutgoingDBusTubeChannel::address() const } } - -#include "TelepathyQt/_gen/outgoing-dbus-tube-channel.moc.hpp" diff --git a/TelepathyQt/pending-dbus-tube-accept.cpp b/TelepathyQt/pending-dbus-tube-accept.cpp index 4371146d..1b682343 100644 --- a/TelepathyQt/pending-dbus-tube-accept.cpp +++ b/TelepathyQt/pending-dbus-tube-accept.cpp @@ -42,7 +42,7 @@ struct TP_QT_NO_EXPORT PendingDBusTubeAccept::Private IncomingDBusTubeChannelPtr tube; }; -PendingDBusTubeAccept::Private::Private(PendingDBusTubeAccept* parent) +PendingDBusTubeAccept::Private::Private(PendingDBusTubeAccept *parent) : parent(parent) { } @@ -51,7 +51,7 @@ PendingDBusTubeAccept::Private::~Private() { } -void PendingDBusTubeAccept::onAcceptFinished(PendingOperation* op) +void PendingDBusTubeAccept::onAcceptFinished(PendingOperation *op) { if (op->isError()) { // Fail @@ -62,7 +62,7 @@ void PendingDBusTubeAccept::onAcceptFinished(PendingOperation* op) debug() << "Accept tube finished successfully"; // Now get the address and set it - PendingString *ps = qobject_cast< PendingString* >(op); + PendingString *ps = qobject_cast<PendingString*>(op); mPriv->tube->mPriv->address = ps->result(); // It might have been already opened - check @@ -89,7 +89,7 @@ void PendingDBusTubeAccept::onTubeStateChanged(TubeChannelState state) } PendingDBusTubeAccept::PendingDBusTubeAccept( - PendingString* string, + PendingString *string, const IncomingDBusTubeChannelPtr &object) : PendingOperation(object) , mPriv(new PendingDBusTubeAccept::Private(this)) @@ -106,8 +106,8 @@ PendingDBusTubeAccept::PendingDBusTubeAccept( } PendingDBusTubeAccept::PendingDBusTubeAccept( - const QString& errorName, - const QString& errorMessage, + const QString &errorName, + const QString &errorMessage, const IncomingDBusTubeChannelPtr &object) : PendingOperation(object) , mPriv(new PendingDBusTubeAccept::Private(this)) diff --git a/TelepathyQt/pending-dbus-tube-accept.h b/TelepathyQt/pending-dbus-tube-accept.h index cde5c14e..e06cee97 100644 --- a/TelepathyQt/pending-dbus-tube-accept.h +++ b/TelepathyQt/pending-dbus-tube-accept.h @@ -52,10 +52,9 @@ private: const IncomingDBusTubeChannelPtr &object); struct Private; + friend class IncomingDBusTubeChannel; friend class Private; Private *mPriv; - - friend class IncomingDBusTubeChannel; }; } diff --git a/TelepathyQt/pending-dbus-tube-offer.cpp b/TelepathyQt/pending-dbus-tube-offer.cpp index bde90e79..805b47c0 100644 --- a/TelepathyQt/pending-dbus-tube-offer.cpp +++ b/TelepathyQt/pending-dbus-tube-offer.cpp @@ -42,7 +42,7 @@ struct TP_QT_NO_EXPORT PendingDBusTubeOffer::Private OutgoingDBusTubeChannelPtr tube; }; -PendingDBusTubeOffer::Private::Private(PendingDBusTubeOffer* parent) +PendingDBusTubeOffer::Private::Private(PendingDBusTubeOffer *parent) : parent(parent) { } @@ -51,7 +51,7 @@ PendingDBusTubeOffer::Private::~Private() { } -void PendingDBusTubeOffer::onOfferFinished(PendingOperation* op) +void PendingDBusTubeOffer::onOfferFinished(PendingOperation *op) { if (op->isError()) { // Fail @@ -62,7 +62,7 @@ void PendingDBusTubeOffer::onOfferFinished(PendingOperation* op) debug() << "Offer tube finished successfully"; // Now get the address and set it - PendingString *ps = qobject_cast< PendingString* >(op); + PendingString *ps = qobject_cast<PendingString*>(op); mPriv->tube->mPriv->address = ps->result(); // It might have been already opened - check @@ -89,7 +89,7 @@ void PendingDBusTubeOffer::onTubeStateChanged(TubeChannelState state) } PendingDBusTubeOffer::PendingDBusTubeOffer( - PendingString* string, + PendingString *string, const OutgoingDBusTubeChannelPtr &object) : PendingOperation(object) , mPriv(new Private(this)) @@ -106,8 +106,8 @@ PendingDBusTubeOffer::PendingDBusTubeOffer( } PendingDBusTubeOffer::PendingDBusTubeOffer( - const QString& errorName, - const QString& errorMessage, + const QString &errorName, + const QString &errorMessage, const OutgoingDBusTubeChannelPtr &object) : PendingOperation(object) , mPriv(new PendingDBusTubeOffer::Private(this)) diff --git a/TelepathyQt/pending-dbus-tube-offer.h b/TelepathyQt/pending-dbus-tube-offer.h index 0c774c01..8196ccf9 100644 --- a/TelepathyQt/pending-dbus-tube-offer.h +++ b/TelepathyQt/pending-dbus-tube-offer.h @@ -42,20 +42,19 @@ public: QString address() const; +private Q_SLOTS: + TP_QT_NO_EXPORT void onOfferFinished(Tp::PendingOperation *op); + TP_QT_NO_EXPORT void onTubeStateChanged(Tp::TubeChannelState state); + private: PendingDBusTubeOffer(PendingString *string, const OutgoingDBusTubeChannelPtr &object); PendingDBusTubeOffer(const QString &errorName, const QString &errorMessage, const OutgoingDBusTubeChannelPtr &object); struct Private; + friend class OutgoingDBusTubeChannel; friend struct Private; Private *mPriv; - - friend class OutgoingDBusTubeChannel; - -private Q_SLOTS: - TP_QT_NO_EXPORT void onOfferFinished(Tp::PendingOperation *op); - TP_QT_NO_EXPORT void onTubeStateChanged(Tp::TubeChannelState state); }; } |