qtms/src/qtmsclientsource.cpp
changeset 27 cbb1bfb7ebfb
child 40 4a1905d205a2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qtms/src/qtmsclientsource.cpp	Fri May 14 16:21:14 2010 +0300
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: QT Bindings for TMS
+ *
+ */
+
+#include <tmsclientsource.h>
+#include <tmsbuffer.h>
+#include <qtmsclientsource.h>
+
+using namespace QTMS;
+using namespace TMS;
+
+QTMSClientSource::QTMSClientSource() :
+    iSource(NULL)
+    {
+    }
+
+QTMSClientSource::~QTMSClientSource()
+    {
+    delete iSource;
+    }
+
+gint QTMSClientSource::SetEnqueueMode(const gboolean enable)
+    {
+    gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+    if (iSource)
+        {
+        status = static_cast<TMSClientSource*> (iSource)->SetEnqueueMode(
+                enable);
+        }
+    return status;
+    }
+
+gint QTMSClientSource::GetEnqueueMode(gboolean& enable)
+    {
+    gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+    if (iSource)
+        {
+        status = static_cast<TMSClientSource*> (iSource)->GetEnqueueMode(
+                enable);
+        }
+    return status;
+    }
+
+gint QTMSClientSource::Flush()
+    {
+    gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+    if (iSource)
+        {
+        status = static_cast<TMSClientSource*> (iSource)->Flush();
+        }
+    return status;
+    }
+
+gint QTMSClientSource::GetType(QTMSSourceType& sourcetype)
+    {
+    gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+    if (iSource)
+        {
+        status = static_cast<TMSClientSource*> (iSource)->GetType(sourcetype);
+        }
+    return status;
+    }
+
+gint QTMSClientSource::BufferFilled(TMS::TMSBuffer& buffer)
+    {
+    gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+    if (iSource)
+        {
+        status = static_cast<TMSClientSource*> (iSource)->BufferFilled(buffer);
+        }
+    return status;
+    }
+
+// Push mode
+gint QTMSClientSource::ProcessBuffer(TMS::TMSBuffer* buffer)
+    {
+    gint status(QTMS_RESULT_UNINITIALIZED_OBJECT);
+    if (iSource)
+        {
+        status = static_cast<TMSClientSource*> (iSource)->ProcessBuffer(buffer);
+        }
+    return status;
+    }
+
+// End of file