summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk>2011-02-16 12:31:40 -0200
committerAndre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk>2011-02-16 12:41:49 -0200
commit289e9aedd480f2868db1c02ee27f9cf5937c497f (patch)
tree7f05fee70a848549309281c784034d7730d74783
parent0755c21f72f88bf986ad22c74a31f1c5f610f6c7 (diff)
Farstream/Channel: Added a static method to create a FastreamChannelFactory.
Also now the constructor is private to now allow creating a FastreamChannelFactory directly. The create(channel) method is now renamed to createTfChannel as create is used to create an instance of the class.
-rw-r--r--TelepathyQt4Yell/Farstream/channel.cpp10
-rw-r--r--TelepathyQt4Yell/Farstream/channel.h16
2 files changed, 16 insertions, 10 deletions
diff --git a/TelepathyQt4Yell/Farstream/channel.cpp b/TelepathyQt4Yell/Farstream/channel.cpp
index a0aeb1e..2e796ba 100644
--- a/TelepathyQt4Yell/Farstream/channel.cpp
+++ b/TelepathyQt4Yell/Farstream/channel.cpp
@@ -25,6 +25,7 @@
#include <TelepathyQt4/Channel>
#include <TelepathyQt4/Connection>
+
#include <TelepathyQt4Yell/CallChannel>
#include <TelepathyQt4Yell/Farstream/global.h>
@@ -32,6 +33,8 @@
#include <telepathy-glib/connection.h>
#include <telepathy-glib/dbus.h>
+#include <gst/gst.h>
+
namespace Tpy
{
@@ -131,6 +134,11 @@ TfChannel *PendingTfChannel::tfChannel()
return mPriv->mTfChannel;
}
+FarstreamChannelFactoryPtr FarstreamChannelFactory::create()
+{
+ return FarstreamChannelFactoryPtr(new FarstreamChannelFactory());
+}
+
FarstreamChannelFactory::FarstreamChannelFactory()
: mPriv(0)
{
@@ -140,7 +148,7 @@ FarstreamChannelFactory::~FarstreamChannelFactory()
{
}
-PendingTfChannel *FarstreamChannelFactory::create(const CallChannelPtr &channel)
+PendingTfChannel *FarstreamChannelFactory::createTfChannel(const CallChannelPtr &channel)
{
PendingTfChannel *pendingOperation = new PendingTfChannel(FarstreamChannelFactoryPtr(this), channel);
return pendingOperation;
diff --git a/TelepathyQt4Yell/Farstream/channel.h b/TelepathyQt4Yell/Farstream/channel.h
index b1c1c72..ebacf6f 100644
--- a/TelepathyQt4Yell/Farstream/channel.h
+++ b/TelepathyQt4Yell/Farstream/channel.h
@@ -26,21 +26,17 @@
#error IN_TELEPATHY_QT4_YELL_FARSTREAM_HEADER
#endif
-#include <QObject>
+#include <TelepathyQt4Yell/Farstream/Global>
+#include <TelepathyQt4Yell/Farstream/Types>
-#include <TelepathyQt4Yell/Farstream/global.h>
-#include <TelepathyQt4Yell/Types>
#include <TelepathyQt4/PendingOperation>
+#include <TelepathyQt4/RefCounted>
-#include <gst/gst.h>
#include <telepathy-farstream/channel.h>
namespace Tpy
{
-class FarstreamChannelFactory;
-typedef Tp::SharedPtr<FarstreamChannelFactory> FarstreamChannelFactoryPtr;
-
class TELEPATHY_QT4_YELL_FS_EXPORT PendingTfChannel : public Tp::PendingOperation
{
Q_OBJECT
@@ -66,12 +62,14 @@ class TELEPATHY_QT4_YELL_FS_EXPORT FarstreamChannelFactory : public Tp::RefCount
Q_DISABLE_COPY(FarstreamChannelFactory)
public:
- FarstreamChannelFactory();
+ static FarstreamChannelFactoryPtr create();
~FarstreamChannelFactory();
- PendingTfChannel *create(const CallChannelPtr &channel);
+ PendingTfChannel *createTfChannel(const CallChannelPtr &channel);
private:
+ FarstreamChannelFactory();
+
struct Private;
friend struct Private;
Private *mPriv;