|
1 /* |
|
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: QT Bindings for TMS |
|
15 * |
|
16 */ |
|
17 |
|
18 #include <tmsclientsource.h> |
|
19 #include <tmsbuffer.h> |
|
20 #include <qtmsclientsource.h> |
|
21 |
|
22 using namespace QTMS; |
|
23 using namespace TMS; |
|
24 |
|
25 QTMSClientSource::QTMSClientSource() : |
|
26 iSource(NULL) |
|
27 { |
|
28 } |
|
29 |
|
30 QTMSClientSource::~QTMSClientSource() |
|
31 { |
|
32 delete iSource; |
|
33 } |
|
34 |
|
35 gint QTMSClientSource::SetEnqueueMode(const gboolean enable) |
|
36 { |
|
37 gint status(QTMS_RESULT_UNINITIALIZED_OBJECT); |
|
38 if (iSource) |
|
39 { |
|
40 status = static_cast<TMSClientSource*> (iSource)->SetEnqueueMode( |
|
41 enable); |
|
42 } |
|
43 return status; |
|
44 } |
|
45 |
|
46 gint QTMSClientSource::GetEnqueueMode(gboolean& enable) |
|
47 { |
|
48 gint status(QTMS_RESULT_UNINITIALIZED_OBJECT); |
|
49 if (iSource) |
|
50 { |
|
51 status = static_cast<TMSClientSource*> (iSource)->GetEnqueueMode( |
|
52 enable); |
|
53 } |
|
54 return status; |
|
55 } |
|
56 |
|
57 gint QTMSClientSource::Flush() |
|
58 { |
|
59 gint status(QTMS_RESULT_UNINITIALIZED_OBJECT); |
|
60 if (iSource) |
|
61 { |
|
62 status = static_cast<TMSClientSource*> (iSource)->Flush(); |
|
63 } |
|
64 return status; |
|
65 } |
|
66 |
|
67 gint QTMSClientSource::GetType(QTMSSourceType& sourcetype) |
|
68 { |
|
69 gint status(QTMS_RESULT_UNINITIALIZED_OBJECT); |
|
70 if (iSource) |
|
71 { |
|
72 status = static_cast<TMSClientSource*> (iSource)->GetType(sourcetype); |
|
73 } |
|
74 return status; |
|
75 } |
|
76 |
|
77 gint QTMSClientSource::BufferFilled(TMS::TMSBuffer& buffer) |
|
78 { |
|
79 gint status(QTMS_RESULT_UNINITIALIZED_OBJECT); |
|
80 if (iSource) |
|
81 { |
|
82 status = static_cast<TMSClientSource*> (iSource)->BufferFilled(buffer); |
|
83 } |
|
84 return status; |
|
85 } |
|
86 |
|
87 // Push mode |
|
88 gint QTMSClientSource::ProcessBuffer(TMS::TMSBuffer* buffer) |
|
89 { |
|
90 gint status(QTMS_RESULT_UNINITIALIZED_OBJECT); |
|
91 if (iSource) |
|
92 { |
|
93 status = static_cast<TMSClientSource*> (iSource)->ProcessBuffer(buffer); |
|
94 } |
|
95 return status; |
|
96 } |
|
97 |
|
98 // End of file |