[Telepathy-commits] [telepathy-qt4/master] dbus-proxy.cpp: re-order so all DBusProxy code is together
Simon McVittie
simon.mcvittie at collabora.co.uk
Wed Jan 21 08:04:25 PST 2009
No code changes.
---
TelepathyQt4/Client/dbus-proxy.cpp | 158 ++++++++++++++++++------------------
1 files changed, 79 insertions(+), 79 deletions(-)
diff --git a/TelepathyQt4/Client/dbus-proxy.cpp b/TelepathyQt4/Client/dbus-proxy.cpp
index 4028b26..4b79088 100644
--- a/TelepathyQt4/Client/dbus-proxy.cpp
+++ b/TelepathyQt4/Client/dbus-proxy.cpp
@@ -138,85 +138,6 @@ void DBusProxy::setBusName(const QString &busName)
mPriv->busName = busName;
}
-// ==== StatelessDBusProxy =============================================
-
-/**
- * \class StatelessDBusProxy
- * \ingroup FIXME: what group is it in?
- * \headerfile TelepathyQt4/Client/dbus-proxy.h <TelepathyQt4/Client/DBusProxy>
- *
- * Base class representing a remote object whose API is basically stateless.
- * These objects can remain valid even if the service providing them exits
- * and is restarted.
- *
- * Examples in Telepathy include the AccountManager, Account and
- * ConnectionManager.
- */
-
-/**
- * Constructor
- */
-StatelessDBusProxy::StatelessDBusProxy(const QDBusConnection &dbusConnection,
- const QString &busName, const QString &objectPath, QObject *parent)
- : DBusProxy(dbusConnection, busName, objectPath, parent),
- mPriv(0)
-{
- if (busName.startsWith(QChar(':'))) {
- warning() <<
- "Using StatelessDBusProxy for a unique name does not make sense";
- }
-}
-
-/**
- * Destructor
- */
-StatelessDBusProxy::~StatelessDBusProxy()
-{
-}
-
-// ==== StatefulDBusProxy ==============================================
-
-/**
- * \class StatefulDBusProxy
- * \ingroup FIXME: what group is it in?
- * \headerfile TelepathyQt4/Client/dbus-proxy.h <TelepathyQt4/Client/DBusProxy>
- *
- * Base class representing a remote object whose API is stateful. These
- * objects do not remain useful if the service providing them exits or
- * crashes, so they emit #invalidated() if this happens.
- *
- * Examples in Telepathy include the Connection and Channel.
- */
-
-StatefulDBusProxy::StatefulDBusProxy(const QDBusConnection &dbusConnection,
- const QString &busName, const QString &objectPath, QObject *parent)
- : DBusProxy(dbusConnection, busName, objectPath, parent),
- mPriv(0)
-{
- QString uniqueName = busName;
-
- connect(dbusConnection.interface(), SIGNAL(serviceOwnerChanged(QString, QString, QString)),
- this, SLOT(onServiceOwnerChanged(QString, QString, QString)));
-
- if (!busName.startsWith(QChar(':'))) {
- // For a stateful interface, it makes no sense to follow name-owner
- // changes, so we want to bind to the unique name.
- QDBusReply<QString> reply = dbusConnection.interface()->serviceOwner(
- busName);
- if (reply.isValid()) {
- uniqueName = reply.value();
- } else {
- invalidate(reply.error());
- }
- }
-
- setBusName(uniqueName);
-}
-
-StatefulDBusProxy::~StatefulDBusProxy()
-{
-}
-
/**
* If this object is usable (has not emitted #invalidated()), returns
* <code>true</code>. Otherwise returns <code>false</code>.
@@ -315,5 +236,84 @@ void StatefulDBusProxy::onServiceOwnerChanged(const QString &name, const QString
}
}
+// ==== StatefulDBusProxy ==============================================
+
+/**
+ * \class StatefulDBusProxy
+ * \ingroup FIXME: what group is it in?
+ * \headerfile TelepathyQt4/Client/dbus-proxy.h <TelepathyQt4/Client/DBusProxy>
+ *
+ * Base class representing a remote object whose API is stateful. These
+ * objects do not remain useful if the service providing them exits or
+ * crashes, so they emit #invalidated() if this happens.
+ *
+ * Examples in Telepathy include the Connection and Channel.
+ */
+
+StatefulDBusProxy::StatefulDBusProxy(const QDBusConnection &dbusConnection,
+ const QString &busName, const QString &objectPath, QObject *parent)
+ : DBusProxy(dbusConnection, busName, objectPath, parent),
+ mPriv(0)
+{
+ QString uniqueName = busName;
+
+ connect(dbusConnection.interface(), SIGNAL(serviceOwnerChanged(QString, QString, QString)),
+ this, SLOT(onServiceOwnerChanged(QString, QString, QString)));
+
+ if (!busName.startsWith(QChar(':'))) {
+ // For a stateful interface, it makes no sense to follow name-owner
+ // changes, so we want to bind to the unique name.
+ QDBusReply<QString> reply = dbusConnection.interface()->serviceOwner(
+ busName);
+ if (reply.isValid()) {
+ uniqueName = reply.value();
+ } else {
+ invalidate(reply.error());
+ }
+ }
+
+ setBusName(uniqueName);
+}
+
+StatefulDBusProxy::~StatefulDBusProxy()
+{
+}
+
+// ==== StatelessDBusProxy =============================================
+
+/**
+ * \class StatelessDBusProxy
+ * \ingroup FIXME: what group is it in?
+ * \headerfile TelepathyQt4/Client/dbus-proxy.h <TelepathyQt4/Client/DBusProxy>
+ *
+ * Base class representing a remote object whose API is basically stateless.
+ * These objects can remain valid even if the service providing them exits
+ * and is restarted.
+ *
+ * Examples in Telepathy include the AccountManager, Account and
+ * ConnectionManager.
+ */
+
+/**
+ * Constructor
+ */
+StatelessDBusProxy::StatelessDBusProxy(const QDBusConnection &dbusConnection,
+ const QString &busName, const QString &objectPath, QObject *parent)
+ : DBusProxy(dbusConnection, busName, objectPath, parent),
+ mPriv(0)
+{
+ if (busName.startsWith(QChar(':'))) {
+ warning() <<
+ "Using StatelessDBusProxy for a unique name does not make sense";
+ }
+}
+
+/**
+ * Destructor
+ */
+StatelessDBusProxy::~StatelessDBusProxy()
+{
+}
+
}
}
--
1.5.6.5
More information about the Telepathy-commits
mailing list