|
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 <tms.h> |
|
19 #include <QObject> |
|
20 #include <qtmsfactory.h> |
|
21 #include "qtmswrapperexport.h" |
|
22 #include "qtmsfactoryimpl.h" |
|
23 |
|
24 using namespace QTMS; |
|
25 |
|
26 QTMSFactory::QTMSFactory() |
|
27 { |
|
28 impl = new QTMSFactoryImpl(); |
|
29 } |
|
30 |
|
31 QTMSFactory::~QTMSFactory() |
|
32 { |
|
33 delete impl; |
|
34 } |
|
35 |
|
36 gint QTMSFactory::CreateFactory(QTMSFactory*& tmsfactory, QTMSVer& /*ver*/) |
|
37 { |
|
38 QTMSFactory* self = new QTMSFactory(); |
|
39 tmsfactory = self; |
|
40 return QTMS_RESULT_SUCCESS; |
|
41 } |
|
42 |
|
43 gint QTMSFactory::CreateCall(QTMSCallType ctype, QTMSCall*& tmscall, guint ctxid) |
|
44 { |
|
45 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
|
46 if (impl) { |
|
47 status = impl->CreateCall(ctype, tmscall, ctxid); |
|
48 } |
|
49 return status; |
|
50 } |
|
51 |
|
52 gint QTMSFactory::DeleteCall(QTMSCall*& tmscall) |
|
53 { |
|
54 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
|
55 if (impl) { |
|
56 status = impl->DeleteCall(tmscall); |
|
57 } |
|
58 return status; |
|
59 } |
|
60 |
|
61 gint QTMSFactory::IsCallTypeSupported(QTMSCallType ctype, gboolean& flag) |
|
62 { |
|
63 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
|
64 if (impl) { |
|
65 status = impl->IsCallTypeSupported(ctype, flag); |
|
66 } |
|
67 return status; |
|
68 } |
|
69 |
|
70 gint QTMSFactory::GetSupportedFormats(const QTMSStreamType strmtype, FormatVector& fmtlist) |
|
71 { |
|
72 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
|
73 if (impl) { |
|
74 status = impl->GetSupportedFormats(strmtype, fmtlist); |
|
75 } |
|
76 return status; |
|
77 } |
|
78 |
|
79 gint QTMSFactory::CreateFormat(QTMSFormatType qfmttype, QTMSFormat*& qfmt) |
|
80 { |
|
81 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
|
82 if (impl) { |
|
83 status = impl->CreateFormat(qfmttype, qfmt); |
|
84 } |
|
85 return status; |
|
86 |
|
87 } |
|
88 |
|
89 gint QTMSFactory::DeleteFormat(QTMSFormat*& qfmt) |
|
90 { |
|
91 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
|
92 if (impl) { |
|
93 status = impl->DeleteFormat(qfmt); |
|
94 } |
|
95 return status; |
|
96 } |
|
97 |
|
98 gint QTMSFactory::CreateEffect(QTMSEffectType tmseffecttype, QTMSEffect*& tmseffect) |
|
99 { |
|
100 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
|
101 if (impl) { |
|
102 status = impl->CreateEffect(tmseffecttype, tmseffect); |
|
103 } |
|
104 return status; |
|
105 } |
|
106 |
|
107 gint QTMSFactory::DeleteEffect(QTMSEffect*& qtmseffect) |
|
108 { |
|
109 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
|
110 if (impl) { |
|
111 impl->DeleteEffect(qtmseffect); |
|
112 } |
|
113 return status; |
|
114 } |
|
115 |
|
116 gint QTMSFactory::CreateBuffer(QTMSBufferType buffertype, guint size, QTMSBuffer*& qbuffer) |
|
117 { |
|
118 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
|
119 if (impl) { |
|
120 status = impl->CreateBuffer(buffertype, size, qbuffer); |
|
121 } |
|
122 return status; |
|
123 } |
|
124 |
|
125 gint QTMSFactory::DeleteBuffer(QTMSBuffer*& qbuffer) |
|
126 { |
|
127 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
|
128 if (impl) { |
|
129 status = impl->DeleteBuffer(qbuffer); |
|
130 } |
|
131 return status; |
|
132 } |
|
133 |
|
134 gint QTMSFactory::CreateSource(QTMSSourceType srctype, QTMSSource*& qtmssrc) |
|
135 { |
|
136 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
|
137 if (impl) { |
|
138 status = impl->CreateSource(srctype, qtmssrc); |
|
139 } |
|
140 return status; |
|
141 } |
|
142 |
|
143 gint QTMSFactory::DeleteSource(QTMSSource*& qtmssrc) |
|
144 { |
|
145 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
|
146 if (impl) { |
|
147 status = impl->DeleteSource(qtmssrc); |
|
148 } |
|
149 return status; |
|
150 } |
|
151 |
|
152 gint QTMSFactory::CreateSink(QTMSSinkType sinktype, QTMSSink*& qtmssink) |
|
153 { |
|
154 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
|
155 if (impl) { |
|
156 status = impl->CreateSink(sinktype, qtmssink); |
|
157 } |
|
158 return status; |
|
159 } |
|
160 |
|
161 gint QTMSFactory::DeleteSink(QTMSSink*& qtmssink) |
|
162 { |
|
163 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
|
164 if (impl) { |
|
165 status = impl->DeleteSink(qtmssink); |
|
166 } |
|
167 return status; |
|
168 } |
|
169 |
|
170 gint QTMSFactory::CreateGlobalRouting(QTMSGlobalRouting*& globalrouting) |
|
171 { |
|
172 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
|
173 if (impl) { |
|
174 status = impl->CreateGlobalRouting(globalrouting); |
|
175 } |
|
176 return status; |
|
177 } |
|
178 |
|
179 gint QTMSFactory::DeleteGlobalRouting(QTMSGlobalRouting*& globrouting) |
|
180 { |
|
181 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
|
182 if (impl) { |
|
183 status = impl->DeleteGlobalRouting(globrouting); |
|
184 } |
|
185 return status; |
|
186 } |
|
187 |
|
188 gint QTMSFactory::CreateDTMF(QTMSStreamType streamtype, QTMSDTMF*& dtmf) |
|
189 { |
|
190 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
|
191 if (impl) { |
|
192 status = impl->CreateDTMF(streamtype, dtmf); |
|
193 } |
|
194 return status; |
|
195 } |
|
196 |
|
197 gint QTMSFactory::DeleteDTMF(QTMSDTMF*& dtmf) |
|
198 { |
|
199 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
|
200 if (impl) { |
|
201 status = impl->DeleteDTMF(dtmf); |
|
202 } |
|
203 return status; |
|
204 } |
|
205 |
|
206 gint QTMSFactory::CreateRingTonePlayer(QTMSRingTone*& rt) |
|
207 { |
|
208 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
|
209 if (impl) { |
|
210 status = impl->CreateRingTonePlayer(rt); |
|
211 } |
|
212 return status; |
|
213 } |
|
214 |
|
215 gint QTMSFactory::DeleteRingTonePlayer(QTMSRingTone*& rt) |
|
216 { |
|
217 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
|
218 if (impl) { |
|
219 status = impl->DeleteRingTonePlayer(rt); |
|
220 } |
|
221 return status; |
|
222 } |
|
223 |
|
224 gint QTMSFactory::CreateInbandTonePlayer(QTMSInbandTone*& inbandtone) |
|
225 { |
|
226 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
|
227 if (impl) { |
|
228 status = impl->CreateInbandTonePlayer(inbandtone); |
|
229 } |
|
230 return status; |
|
231 } |
|
232 |
|
233 gint QTMSFactory::DeleteInbandTonePlayer(QTMSInbandTone*& inbandtone) |
|
234 { |
|
235 gint status(TMS_RESULT_UNINITIALIZED_OBJECT); |
|
236 if (impl) { |
|
237 status = impl->DeleteInbandTonePlayer(inbandtone); |
|
238 } |
|
239 return status; |
|
240 } |