[Telepathy-commits] [telepathy-qt4/master] Add stub Channel high-level proxy
Olli Salli
olli.salli at collabora.co.uk
Sat Sep 20 10:00:55 PDT 2008
---
TelepathyQt4/Makefile.am | 3 +-
TelepathyQt4/cli-channel.cpp | 48 +++++++++++++++++++++++++++++++++++-
TelepathyQt4/cli-channel.h | 54 ++++++++++++++++++++++++++++++++++++++++++
3 files changed, 102 insertions(+), 3 deletions(-)
diff --git a/TelepathyQt4/Makefile.am b/TelepathyQt4/Makefile.am
index 0d581d2..62f01e8 100644
--- a/TelepathyQt4/Makefile.am
+++ b/TelepathyQt4/Makefile.am
@@ -57,7 +57,8 @@ nodist_libtelepathy_qt4_la_SOURCES = \
_gen/cli-media-stream-handler.moc.hpp \
_gen/cli-properties-body.hpp \
_gen/cli-properties.moc.hpp \
- _gen/types-body.hpp
+ _gen/types-body.hpp \
+ cli-channel.moc.hpp
tpqt4include_HEADERS = \
Constants \
diff --git a/TelepathyQt4/cli-channel.cpp b/TelepathyQt4/cli-channel.cpp
index 589fc34..1fe04ce 100644
--- a/TelepathyQt4/cli-channel.cpp
+++ b/TelepathyQt4/cli-channel.cpp
@@ -19,5 +19,49 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <TelepathyQt4/_gen/cli-channel-body.hpp>
-#include <TelepathyQt4/_gen/cli-channel.moc.hpp>
+#include "cli-channel.h"
+
+#include "_gen/cli-channel-body.hpp"
+#include "_gen/cli-channel.moc.hpp"
+#include "cli-channel.moc.hpp"
+
+namespace Telepathy
+{
+namespace Client
+{
+
+struct Channel::Private
+{
+ // Public object
+ Channel& parent;
+
+ Private(Channel& parent)
+ : parent(parent)
+ {
+ }
+};
+
+Channel::Channel(const QString& serviceName,
+ const QString& objectPath,
+ QObject* parent)
+ : ChannelInterface(serviceName, objectPath, parent),
+ mPriv(new Private(*this))
+{
+}
+
+Channel::Channel(const QDBusConnection& connection,
+ const QString& serviceName,
+ const QString& objectPath,
+ QObject* parent)
+ : ChannelInterface(connection, serviceName, objectPath, parent),
+ mPriv(new Private(*this))
+{
+}
+
+Channel::~Channel()
+{
+ delete mPriv;
+}
+
+}
+}
diff --git a/TelepathyQt4/cli-channel.h b/TelepathyQt4/cli-channel.h
index 991745d..5bb343e 100644
--- a/TelepathyQt4/cli-channel.h
+++ b/TelepathyQt4/cli-channel.h
@@ -43,4 +43,58 @@
#include <TelepathyQt4/_gen/cli-channel.h>
+namespace Telepathy
+{
+namespace Client
+{
+
+/**
+ * \class Channel
+ * \ingroup clientchannel
+ *
+ * High-level proxy object for accessing remote %Telepathy %Channel objects.
+ */
+class Channel : public ChannelInterface
+{
+ Q_OBJECT
+
+public:
+ /**
+ * Creates a Channel associated with the given object on the session bus.
+ *
+ * \param serviceName Name of the service the object is on.
+ * \param objectPath Path to the object on the service.
+ * \param parent Passed to the parent class constructor.
+ */
+ Channel(const QString& serviceName,
+ const QString& objectPath,
+ QObject* parent = 0);
+
+ /**
+ * Creates a Channel associated with the given object on the given bus.
+ *
+ * \param connection The bus via which the object can be reached.
+ * \param serviceName Name of the service the object is on.
+ * \param objectPath Path to the object on the service.
+ * \param parent Passed to the parent class constructor.
+ */
+ Channel(const QDBusConnection& connection,
+ const QString &serviceName,
+ const QString &objectPath,
+ QObject* parent = 0);
+
+ /**
+ * Class destructor.
+ */
+ ~Channel();
+
+private:
+ struct Private;
+ friend struct Private;
+ Private *mPriv;
+};
+
+}
+}
+
#endif
--
1.5.6.5
More information about the Telepathy-commits
mailing list