[telepathy-qt4/master] ClientRegistrar: Added ClientAdaptor - Adaptor for org.freedesktop.Telepath.Client interface.

Andre Moreira Magalhaes (andrunko) andre.magalhaes at collabora.co.uk
Tue May 19 06:48:57 PDT 2009


---
 TelepathyQt4/client-registrar-internal.h |   26 ++++++++++++++++++++++++++
 TelepathyQt4/client-registrar.cpp        |   11 +++++++++++
 2 files changed, 37 insertions(+), 0 deletions(-)

diff --git a/TelepathyQt4/client-registrar-internal.h b/TelepathyQt4/client-registrar-internal.h
index f8653a0..c51e048 100644
--- a/TelepathyQt4/client-registrar-internal.h
+++ b/TelepathyQt4/client-registrar-internal.h
@@ -31,6 +31,32 @@
 namespace Tp
 {
 
+class ClientAdaptor : public QDBusAbstractAdaptor
+{
+    Q_OBJECT
+    Q_CLASSINFO("D-Bus Interface", "org.freedesktop.Telepathy.Client")
+    Q_CLASSINFO("D-Bus Introspection", ""
+"  <interface name=\"org.freedesktop.Telepathy.Client\" >\n"
+"    <property name=\"Interfaces\" type=\"as\" access=\"read\" />\n"
+"  </interface>\n"
+        "")
+
+    Q_PROPERTY(QStringList Interfaces READ Interfaces)
+
+public:
+    ClientAdaptor(const QStringList &interfaces, QObject *parent);
+    virtual ~ClientAdaptor();
+
+public: // Properties
+    inline QStringList Interfaces() const
+    {
+        return mInterfaces;
+    }
+
+private:
+    QStringList mInterfaces;
+};
+
 class ClientHandlerAdaptor : public QDBusAbstractAdaptor
 {
     Q_OBJECT
diff --git a/TelepathyQt4/client-registrar.cpp b/TelepathyQt4/client-registrar.cpp
index c7bfee5..0b7e910 100644
--- a/TelepathyQt4/client-registrar.cpp
+++ b/TelepathyQt4/client-registrar.cpp
@@ -30,6 +30,17 @@
 namespace Tp
 {
 
+ClientAdaptor::ClientAdaptor(const QStringList &interfaces,
+        QObject *parent)
+    : QDBusAbstractAdaptor(parent),
+      mInterfaces(interfaces)
+{
+}
+
+ClientAdaptor::~ClientAdaptor()
+{
+}
+
 ClientHandlerAdaptor::ClientHandlerAdaptor(AbstractClientHandler *client)
     : QDBusAbstractAdaptor(client),
       mClient(client)
-- 
1.5.6.5




More information about the telepathy-commits mailing list