[Telepathy-commits] [telepathy-qt4/master] DBusProxy: Promote InterfaceSupportedChecking to superclass
Simon McVittie
simon.mcvittie at collabora.co.uk
Thu Jan 22 06:52:44 PST 2009
optionalInterface() can't move to the superclass because it uses the
"main interface" functionality, which isn't in the superclass (for good
reason - DBusProxy would have to be a template if we did that).
---
TelepathyQt4/Client/account.cpp | 15 ---------------
TelepathyQt4/Client/account.h | 8 --------
TelepathyQt4/Client/channel.h | 20 --------------------
TelepathyQt4/Client/connection.h | 19 -------------------
TelepathyQt4/Client/dbus-proxy.cpp | 15 +++++++++++++++
TelepathyQt4/Client/dbus-proxy.h | 6 ++++++
6 files changed, 21 insertions(+), 62 deletions(-)
diff --git a/TelepathyQt4/Client/account.cpp b/TelepathyQt4/Client/account.cpp
index c5e1f1c..3139917 100644
--- a/TelepathyQt4/Client/account.cpp
+++ b/TelepathyQt4/Client/account.cpp
@@ -158,21 +158,6 @@ Account::Private::~Private()
*/
/**
- * \enum Account::InterfaceSupportedChecking
- *
- * Specifies if the interface being supported by the remote object should be
- * checked by optionalInterface() and the convenience functions for it.
- *
- * \value CheckInterfaceSupported Don't return an interface instance unless it
- * can be guaranteed that the remote object
- * actually implements the interface.
- * \value BypassInterfaceCheck Return an interface instance even if it can't
- * be verified that the remote object supports the
- * interface.
- * \sa optionalInterface()
- */
-
-/**
* Construct a new Account object.
*
* \param am Account manager.
diff --git a/TelepathyQt4/Client/account.h b/TelepathyQt4/Client/account.h
index e6bc301..6e3f663 100644
--- a/TelepathyQt4/Client/account.h
+++ b/TelepathyQt4/Client/account.h
@@ -63,14 +63,6 @@ public:
};
Q_DECLARE_FLAGS(Features, Feature)
- // TODO this is a copy/paste from Connection, move it somewhere else that
- // could be shared between classes
- enum InterfaceSupportedChecking
- {
- CheckInterfaceSupported,
- BypassInterfaceCheck
- };
-
Account(AccountManager *am, const QString &objectPath,
QObject *parent = 0);
diff --git a/TelepathyQt4/Client/channel.h b/TelepathyQt4/Client/channel.h
index 9850478..6465c56 100644
--- a/TelepathyQt4/Client/channel.h
+++ b/TelepathyQt4/Client/channel.h
@@ -553,26 +553,6 @@ Q_SIGNALS:
public:
/**
- * Specifies if the interface being supported by the remote object should be
- * checked by optionalInterface(), typeInterface() and the convenience
- * functions for them.
- */
- enum InterfaceSupportedChecking
- {
- /**
- * Don't return an interface instance unless it can be guaranteed that
- * the remote object actually implements the interface.
- */
- CheckInterfaceSupported,
-
- /**
- * Return an interface instance even if it can't be verified that the
- * remote object supports the interface.
- */
- BypassInterfaceCheck
- };
-
- /**
* Returns a pointer to a valid instance of a given %Channel optional
* interface class, associated with the same remote object the Channel is
* associated with, and destroyed together with the Channel.
diff --git a/TelepathyQt4/Client/connection.h b/TelepathyQt4/Client/connection.h
index fcc1e87..4ae9a43 100644
--- a/TelepathyQt4/Client/connection.h
+++ b/TelepathyQt4/Client/connection.h
@@ -269,25 +269,6 @@ public:
SimpleStatusSpecMap simplePresenceStatuses() const;
/**
- * Specifies if the interface being supported by the remote object should be
- * checked by optionalInterface() and the convenience functions for it.
- */
- enum InterfaceSupportedChecking
- {
- /**
- * Don't return an interface instance unless it can be guaranteed that
- * the remote object actually implements the interface.
- */
- CheckInterfaceSupported,
-
- /**
- * Return an interface instance even if it can't be verified that the
- * remote object supports the interface.
- */
- BypassInterfaceCheck
- };
-
- /**
* Returns a pointer to a valid instance of a given %Connection optional
* interface class, associated with the same remote object the Connection is
* associated with, and destroyed at the same time the Connection is
diff --git a/TelepathyQt4/Client/dbus-proxy.cpp b/TelepathyQt4/Client/dbus-proxy.cpp
index 4b79088..ebaba0b 100644
--- a/TelepathyQt4/Client/dbus-proxy.cpp
+++ b/TelepathyQt4/Client/dbus-proxy.cpp
@@ -50,6 +50,21 @@ namespace Client
*
*/
+/**
+ * \enum DBusProxy::InterfaceSupportedChecking
+ *
+ * Specifies if the interface being supported by the remote object should be
+ * checked by optionalInterface() and the convenience functions for it.
+ *
+ * \value CheckInterfaceSupported Don't return an interface instance unless it
+ * can be guaranteed that the remote object
+ * actually implements the interface.
+ * \value BypassInterfaceCheck Return an interface instance even if it can't
+ * be verified that the remote object supports the
+ * interface.
+ * \sa optionalInterface()
+ */
+
// Features in TpProxy but not here:
// * tracking which interfaces we have (in tpqt4, subclasses do that)
// * being Introspectable, a Peer and a Properties implementation
diff --git a/TelepathyQt4/Client/dbus-proxy.h b/TelepathyQt4/Client/dbus-proxy.h
index 7626341..67703bb 100644
--- a/TelepathyQt4/Client/dbus-proxy.h
+++ b/TelepathyQt4/Client/dbus-proxy.h
@@ -42,6 +42,12 @@ public:
DBusProxy(const QDBusConnection &dbusConnection, const QString &busName,
const QString &objectPath, QObject *parent = 0);
+ enum InterfaceSupportedChecking
+ {
+ CheckInterfaceSupported,
+ BypassInterfaceCheck
+ };
+
virtual ~DBusProxy();
QDBusConnection dbusConnection() const;
--
1.5.6.5
More information about the Telepathy-commits
mailing list