[Telepathy-commits] [telepathy-qt4/master] Connection: Changed FeatureSimplePresence to FeatureSelfPresence.

Andre Moreira Magalhaes (andrunko) andre.magalhaes at collabora.co.uk
Mon Jan 26 06:31:40 PST 2009


---
 TelepathyQt4/Client/connection.cpp |   26 +++++++++++++-------------
 TelepathyQt4/Client/connection.h   |    2 +-
 tests/pinocchio/conn-basics.cpp    |    6 +++---
 3 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/TelepathyQt4/Client/connection.cpp b/TelepathyQt4/Client/connection.cpp
index 48fbd81..9045c3c 100644
--- a/TelepathyQt4/Client/connection.cpp
+++ b/TelepathyQt4/Client/connection.cpp
@@ -523,15 +523,15 @@ QStringList Connection::interfaces() const
  */
 SimpleStatusSpecMap Connection::simplePresenceStatuses() const
 {
-    if (mPriv->missingFeatures & FeatureSimplePresence) {
+    if (mPriv->missingFeatures & FeatureSelfPresence) {
         warning() << "Trying to retrieve simple presence from connection, but "
                      "simple presence is not supported";
     }
-    else if (!(mPriv->features & FeatureSimplePresence)) {
+    else if (!(mPriv->features & FeatureSelfPresence)) {
         warning() << "Trying to retrieve simple presence from connection without "
-                     "calling Connection::becomeReady(FeatureSimplePresence)";
+                     "calling Connection::becomeReady(FeatureSelfPresence)";
     }
-    else if (mPriv->pendingFeatures & FeatureSimplePresence) {
+    else if (mPriv->pendingFeatures & FeatureSelfPresence) {
         warning() << "Trying to retrieve simple presence from connection, but "
                      "simple presence is still being retrieved";
     }
@@ -805,7 +805,7 @@ void Connection::gotInterfaces(QDBusPendingCallWatcher *watcher)
         // again on becomeReady.
         if (mPriv->interfaces.contains(TELEPATHY_INTERFACE_CONNECTION_INTERFACE_SIMPLE_PRESENCE)) {
             mPriv->introspectQueue.enqueue(&Private::introspectSimplePresence);
-            mPriv->pendingFeatures |= FeatureSimplePresence;
+            mPriv->pendingFeatures |= FeatureSelfPresence;
         }
     }
     else {
@@ -823,18 +823,18 @@ void Connection::gotSimpleStatuses(QDBusPendingCallWatcher *watcher)
 {
     QDBusPendingReply<QDBusVariant> reply = *watcher;
 
-    mPriv->pendingFeatures &= ~FeatureSimplePresence;
+    mPriv->pendingFeatures &= ~FeatureSelfPresence;
 
     if (!reply.isError()) {
-        mPriv->features |= FeatureSimplePresence;
-        debug() << "Adding FeatureSimplePresence to features";
+        mPriv->features |= FeatureSelfPresence;
+        debug() << "Adding FeatureSelfPresence to features";
 
         mPriv->simplePresenceStatuses = qdbus_cast<SimpleStatusSpecMap>(reply.value().variant());
         debug() << "Got" << mPriv->simplePresenceStatuses.size() << "simple presence statuses";
     }
     else {
-        mPriv->missingFeatures |= FeatureSimplePresence;
-        debug() << "Adding FeatureSimplePresence to missing features";
+        mPriv->missingFeatures |= FeatureSelfPresence;
+        debug() << "Adding FeatureSelfPresence to missing features";
 
         warning().nospace() << "Getting simple presence statuses failed with" <<
             reply.error().name() << ":" << reply.error().message();
@@ -1168,7 +1168,7 @@ PendingOperation *Connection::becomeReady(Features requestedFeatures)
         }
     }
 
-    Feature optionalFeatures[1] = { FeatureSimplePresence };
+    Feature optionalFeatures[1] = { FeatureSelfPresence };
     Feature optionalFeature;
     for (uint i = 0; i < sizeof(optionalFeatures) / sizeof(Feature); ++i) {
         optionalFeature = optionalFeatures[i];
@@ -1322,8 +1322,8 @@ void Connection::continueIntrospection()
                 // present and we have a feature for it, add the feature to missing
                 // features.
                 if (!mPriv->interfaces.contains(TELEPATHY_INTERFACE_CONNECTION_INTERFACE_SIMPLE_PRESENCE)) {
-                    debug() << "adding FeatureSimplePresence to missing features";
-                    mPriv->missingFeatures |= FeatureSimplePresence;
+                    debug() << "adding FeatureSelfPresence to missing features";
+                    mPriv->missingFeatures |= FeatureSelfPresence;
                 }
             }
         }
diff --git a/TelepathyQt4/Client/connection.h b/TelepathyQt4/Client/connection.h
index 660fade..194f01d 100644
--- a/TelepathyQt4/Client/connection.h
+++ b/TelepathyQt4/Client/connection.h
@@ -57,7 +57,7 @@ class Connection : public StatefulDBusProxy,
 
 public:
     enum Feature {
-        FeatureSimplePresence = 1,
+        FeatureSelfPresence = 1,
         _Padding = 0xFFFFFFFF
     };
     Q_DECLARE_FLAGS(Features, Feature)
diff --git a/tests/pinocchio/conn-basics.cpp b/tests/pinocchio/conn-basics.cpp
index 8127632..f315774 100644
--- a/tests/pinocchio/conn-basics.cpp
+++ b/tests/pinocchio/conn-basics.cpp
@@ -161,18 +161,18 @@ void TestConnBasics::testConnect()
     QVERIFY(disconnect(mConn, SIGNAL(statusChanged(uint, uint)),
           this, SLOT(expectReady(uint, uint))));
 
-    QVERIFY(connect(mConn->becomeReady(Connection::FeatureSimplePresence),
+    QVERIFY(connect(mConn->becomeReady(Connection::FeatureSelfPresence),
             SIGNAL(finished(Telepathy::Client::PendingOperation*)),
             this,
             SLOT(expectSuccessfulCall(Telepathy::Client::PendingOperation*))));
     QCOMPARE(mLoop->exec(), 0);
 
-    QVERIFY(connect(mConn->becomeReady(Connection::FeatureSimplePresence),
+    QVERIFY(connect(mConn->becomeReady(Connection::FeatureSelfPresence),
             SIGNAL(finished(Telepathy::Client::PendingOperation*)),
             this,
             SLOT(expectSuccessfulCall(Telepathy::Client::PendingOperation*))));
     QCOMPARE(mLoop->exec(), 0);
-    QCOMPARE(mConn->isReady(Connection::FeatureSimplePresence), false);
+    QCOMPARE(mConn->isReady(Connection::FeatureSelfPresence), false);
 
     QCOMPARE(static_cast<uint>(mConn->status()),
         static_cast<uint>(Telepathy::ConnectionStatusConnected));
-- 
1.5.6.5




More information about the Telepathy-commits mailing list