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 <tmsfactory.h> |
|
20 #include <tmsformat.h> |
|
21 #include <qtms.h> |
|
22 #include <qtmscall.h> |
|
23 #include <qtmsformat.h> |
|
24 #include <qtmseffect.h> |
|
25 #include <qtmsbuffer.h> |
|
26 #include <qtmssource.h> |
|
27 #include <qtmssink.h> |
|
28 #include <qtmsringtone.h> |
|
29 #include <qtmsdtmf.h> |
|
30 #include <qtmsinbandtone.h> |
|
31 #include "tmsutility.h" |
|
32 #include "qtmscallimpl.h" |
|
33 #include "qtmsglobalroutingimpl.h" |
|
34 #include "qtmsglobalvoleffectimpl.h" |
|
35 #include "qtmsglobalgaineffectimpl.h" |
|
36 #include "qtmsvolumeeffectimpl.h" |
|
37 #include "qtmsgaineffectimpl.h" |
|
38 #include "qtmsclientsinkimpl.h" |
|
39 #include "qtmsmodemsinkimpl.h" |
|
40 #include "qtmsspeakersinkimpl.h" |
|
41 #include "qtmsclientsourceimpl.h" |
|
42 #include "qtmsmodemsourceimpl.h" |
|
43 #include "qtmsmicsourceimpl.h" |
|
44 #include "qtmsringtoneimpl.h" |
|
45 #include "qtmsdtmfimpl.h" |
|
46 #include "qtmsinbandtoneimpl.h" |
|
47 #include "qtmsfactoryimpl.h" |
|
48 #include "qtmspcmimpl.h" |
|
49 #include "qtmsamrimpl.h" |
|
50 #include "qtmsg711impl.h" |
|
51 #include "qtmsg729impl.h" |
|
52 #include "qtmsilbcimpl.h" |
|
53 #include "qtmsbufferimpl.h" |
|
54 |
|
55 using namespace QTMS; |
|
56 using namespace TMS; |
|
57 |
|
58 QTMSFactoryImpl::QTMSFactoryImpl() |
|
59 { |
|
60 TRACE_PRN_FN_ENT; |
|
61 TMSVer* ver = NULL; |
|
62 TMSFactory::CreateFactory(iFactory, *ver); |
|
63 TRACE_PRN_FN_EXT; |
|
64 } |
|
65 |
|
66 QTMSFactoryImpl::~QTMSFactoryImpl() |
|
67 { |
|
68 TRACE_PRN_FN_ENT; |
|
69 delete iFactory; |
|
70 TRACE_PRN_FN_EXT; |
|
71 } |
|
72 |
|
73 gint QTMSFactoryImpl::CreateCall(QTMSCallType ctype, QTMSCall*& qtmscall, guint /*ctxid*/) |
|
74 { |
|
75 TRACE_PRN_FN_ENT; |
|
76 gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT); |
|
77 |
|
78 TMSCall* tmscall(NULL); |
|
79 if (iFactory) { |
|
80 ret = iFactory->CreateCall((TMSCallType) ctype, tmscall); |
|
81 |
|
82 if (ret == TMS_RESULT_SUCCESS) { |
|
83 ret = QTMSCallImpl::Create(qtmscall, tmscall); |
|
84 } |
|
85 } |
|
86 TRACE_PRN_FN_EXT; |
|
87 return ret; |
|
88 } |
|
89 |
|
90 gint QTMSFactoryImpl::DeleteCall(QTMSCall*& qtmscall) |
|
91 { |
|
92 TRACE_PRN_FN_ENT; |
|
93 gint ret(QTMS_RESULT_SUCCESS); |
|
94 delete qtmscall; |
|
95 qtmscall = NULL; |
|
96 TRACE_PRN_FN_EXT; |
|
97 return ret; |
|
98 } |
|
99 |
|
100 gint QTMSFactoryImpl::IsCallTypeSupported(QTMSCallType ctype, gboolean& flag) |
|
101 { |
|
102 gint ret(QTMS_RESULT_SUCCESS); |
|
103 |
|
104 switch (ctype) { |
|
105 case QTMS_CALL_CS: |
|
106 case QTMS_CALL_IP: |
|
107 flag = ETrue; |
|
108 break; |
|
109 case QTMS_CALL_ECS: //from TB 10.1 |
|
110 default: |
|
111 flag = EFalse; |
|
112 break; |
|
113 } |
|
114 return ret; |
|
115 } |
|
116 |
|
117 gint QTMSFactoryImpl::GetSupportedFormats(const QTMSStreamType strmtype, FormatVector& fmtlist) |
|
118 { |
|
119 TRACE_PRN_FN_ENT; |
|
120 gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT); |
|
121 TMS::FormatVector tmsfmtlist; |
|
122 if (iFactory) { |
|
123 ret = iFactory->GetSupportedFormats((TMSStreamType) strmtype, tmsfmtlist); |
|
124 } |
|
125 |
|
126 std::vector<TMSFormat*>::iterator itCodecs = tmsfmtlist.begin(); |
|
127 TMSFormatType fmttype; |
|
128 for (; itCodecs < tmsfmtlist.end(); itCodecs++) { |
|
129 (*itCodecs)->GetType(fmttype); |
|
130 QTMSFormat* qtmsfmt(NULL); |
|
131 switch (fmttype) { |
|
132 case QTMS_FORMAT_PCM: |
|
133 ret = QTMSPCMFormatImpl::Create(qtmsfmt, *itCodecs); |
|
134 break; |
|
135 case QTMS_FORMAT_AMR: |
|
136 ret = QTMSAMRFormatImpl::Create(qtmsfmt, *itCodecs); |
|
137 break; |
|
138 case QTMS_FORMAT_G711: |
|
139 ret = QTMSG711FormatImpl::Create(qtmsfmt, *itCodecs); |
|
140 break; |
|
141 case QTMS_FORMAT_G729: |
|
142 ret = QTMSG729FormatImpl::Create(qtmsfmt, *itCodecs); |
|
143 break; |
|
144 case QTMS_FORMAT_ILBC: |
|
145 ret = QTMSILBCFormatImpl::Create(qtmsfmt, *itCodecs); |
|
146 break; |
|
147 default: |
|
148 break; |
|
149 } |
|
150 |
|
151 if (qtmsfmt) { |
|
152 fmtlist.push_back(qtmsfmt); |
|
153 } |
|
154 } |
|
155 TRACE_PRN_FN_EXT; |
|
156 return ret; |
|
157 } |
|
158 |
|
159 gint QTMSFactoryImpl::CreateFormat(QTMSFormatType fmttype, QTMSFormat*& qtmsfmt) |
|
160 { |
|
161 TRACE_PRN_FN_ENT; |
|
162 gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT); |
|
163 TMSFormat* tmsformat(NULL); |
|
164 |
|
165 if (iFactory) { |
|
166 ret = iFactory->CreateFormat((TMSFormatType) fmttype, tmsformat); |
|
167 |
|
168 if (ret == TMS_RESULT_SUCCESS) { |
|
169 switch (fmttype) { |
|
170 case QTMS_FORMAT_PCM: |
|
171 ret = QTMSPCMFormatImpl::Create(qtmsfmt, tmsformat); |
|
172 break; |
|
173 case QTMS_FORMAT_AMR: |
|
174 ret = QTMSAMRFormatImpl::Create(qtmsfmt, tmsformat); |
|
175 break; |
|
176 case QTMS_FORMAT_G711: |
|
177 ret = QTMSG711FormatImpl::Create(qtmsfmt, tmsformat); |
|
178 break; |
|
179 case QTMS_FORMAT_G729: |
|
180 ret = QTMSG729FormatImpl::Create(qtmsfmt, tmsformat); |
|
181 break; |
|
182 case QTMS_FORMAT_ILBC: |
|
183 ret = QTMSILBCFormatImpl::Create(qtmsfmt, tmsformat); |
|
184 break; |
|
185 default: |
|
186 ret = QTMS_RESULT_FORMAT_TYPE_NOT_SUPPORTED; |
|
187 break; |
|
188 } |
|
189 } |
|
190 } |
|
191 TRACE_PRN_FN_EXT; |
|
192 return ret; |
|
193 } |
|
194 |
|
195 gint QTMSFactoryImpl::DeleteFormat(QTMSFormat*& qtmsfmt) |
|
196 { |
|
197 TRACE_PRN_FN_ENT; |
|
198 __ASSERT_ALWAYS(qtmsfmt, PANIC(QTMS_RESULT_NULL_ARGUMENT)); |
|
199 |
|
200 gint ret(QTMS_RESULT_SUCCESS); |
|
201 QTMSFormatType fmttype; |
|
202 ret = qtmsfmt->GetType(fmttype); |
|
203 switch (fmttype) { |
|
204 case QTMS_FORMAT_PCM: |
|
205 delete (static_cast<QTMSPCMFormatImpl*> (qtmsfmt)); |
|
206 qtmsfmt = NULL; |
|
207 break; |
|
208 case QTMS_FORMAT_AMR: |
|
209 delete (static_cast<QTMSAMRFormatImpl*> (qtmsfmt)); |
|
210 qtmsfmt = NULL; |
|
211 break; |
|
212 case QTMS_FORMAT_G711: |
|
213 delete (static_cast<QTMSG711FormatImpl*> (qtmsfmt)); |
|
214 qtmsfmt = NULL; |
|
215 break; |
|
216 case QTMS_FORMAT_G729: |
|
217 delete (static_cast<QTMSG729FormatImpl*> (qtmsfmt)); |
|
218 qtmsfmt = NULL; |
|
219 break; |
|
220 case QTMS_FORMAT_ILBC: |
|
221 delete (static_cast<QTMSILBCFormatImpl*> (qtmsfmt)); |
|
222 qtmsfmt = NULL; |
|
223 break; |
|
224 default: |
|
225 ret = QTMS_RESULT_FORMAT_TYPE_NOT_SUPPORTED; |
|
226 break; |
|
227 } |
|
228 TRACE_PRN_FN_EXT; |
|
229 return ret; |
|
230 } |
|
231 |
|
232 gint QTMSFactoryImpl::CreateEffect(QTMSEffectType tmseffecttype, QTMSEffect*& qtmseffect) |
|
233 { |
|
234 TRACE_PRN_FN_ENT; |
|
235 gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT); |
|
236 TMSEffect* tmseffect(NULL); |
|
237 |
|
238 if (iFactory) { |
|
239 ret = iFactory->CreateEffect((TMSEffectType) tmseffecttype, tmseffect); |
|
240 |
|
241 if (ret == TMS_RESULT_SUCCESS) { |
|
242 switch (tmseffecttype) { |
|
243 case TMS_EFFECT_VOLUME: |
|
244 ret = QTMSVolumeEffectImpl::Create(qtmseffect, tmseffect); |
|
245 break; |
|
246 case TMS_EFFECT_GAIN: |
|
247 ret = QTMSGainEffectImpl::Create(qtmseffect, tmseffect); |
|
248 break; |
|
249 case TMS_EFFECT_GLOBAL_VOL: |
|
250 ret = QTMSGlobalVolEffectImpl::Create(qtmseffect, tmseffect); |
|
251 break; |
|
252 case TMS_EFFECT_GLOBAL_GAIN: |
|
253 ret = QTMSGlobalGainEffectImpl::Create(qtmseffect, tmseffect); |
|
254 break; |
|
255 default: |
|
256 ret = TMS_RESULT_EFFECT_TYPE_NOT_SUPPORTED; |
|
257 break; |
|
258 } |
|
259 } |
|
260 } |
|
261 TRACE_PRN_FN_EXT; |
|
262 return ret; |
|
263 } |
|
264 |
|
265 gint QTMSFactoryImpl::DeleteEffect(QTMSEffect*& qtmseffect) |
|
266 { |
|
267 TRACE_PRN_FN_ENT; |
|
268 gint ret(QTMS_RESULT_SUCCESS); |
|
269 |
|
270 QTMSEffectType effecttype; |
|
271 ret = qtmseffect->GetType(effecttype); |
|
272 switch (effecttype) { |
|
273 case QTMS_EFFECT_VOLUME: |
|
274 delete (static_cast<QTMSVolumeEffectImpl*> (qtmseffect)); |
|
275 qtmseffect = NULL; |
|
276 break; |
|
277 case QTMS_EFFECT_GAIN: |
|
278 delete (static_cast<QTMSGainEffectImpl*> (qtmseffect)); |
|
279 qtmseffect = NULL; |
|
280 break; |
|
281 case QTMS_EFFECT_GLOBAL_VOL: |
|
282 delete (static_cast<QTMSGlobalVolEffectImpl*> (qtmseffect)); |
|
283 qtmseffect = NULL; |
|
284 break; |
|
285 case QTMS_EFFECT_GLOBAL_GAIN: |
|
286 delete (static_cast<QTMSGlobalGainEffectImpl*> (qtmseffect)); |
|
287 qtmseffect = NULL; |
|
288 break; |
|
289 default: |
|
290 ret = QTMS_RESULT_EFFECT_TYPE_NOT_SUPPORTED; |
|
291 break; |
|
292 } |
|
293 TRACE_PRN_FN_EXT; |
|
294 return ret; |
|
295 } |
|
296 |
|
297 gint QTMSFactoryImpl::CreateBuffer(QTMSBufferType buffertype, guint size, QTMSBuffer*& buffer) |
|
298 { |
|
299 TRACE_PRN_FN_ENT; |
|
300 gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT); |
|
301 TMSBuffer* tmsbuffer(NULL); |
|
302 if (iFactory) { |
|
303 ret = iFactory->CreateBuffer((TMSBufferType) buffertype, size, tmsbuffer); |
|
304 if (ret == TMS_RESULT_SUCCESS) { |
|
305 switch (buffertype) { |
|
306 case QTMS_BUFFER_MEMORY: |
|
307 ret = QTMSBufferImpl::Create(buffertype, buffer, tmsbuffer); |
|
308 break; |
|
309 default: |
|
310 ret = QTMS_RESULT_BUFFER_TYPE_NOT_SUPPORTED; |
|
311 break; |
|
312 } |
|
313 } |
|
314 } |
|
315 |
|
316 TRACE_PRN_FN_EXT; |
|
317 return ret; |
|
318 } |
|
319 |
|
320 gint QTMSFactoryImpl::DeleteBuffer(QTMSBuffer*& qtmsbuffer) |
|
321 { |
|
322 TRACE_PRN_FN_ENT; |
|
323 gint ret(QTMS_RESULT_SUCCESS); |
|
324 delete qtmsbuffer; |
|
325 qtmsbuffer = NULL; |
|
326 TRACE_PRN_FN_EXT; |
|
327 return ret; |
|
328 } |
|
329 |
|
330 gint QTMSFactoryImpl::CreateSource(QTMSSourceType srctype, QTMSSource*& qtmssrc) |
|
331 { |
|
332 TRACE_PRN_FN_ENT; |
|
333 gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT); |
|
334 |
|
335 TMS::TMSSource* tmssource(NULL); |
|
336 if (iFactory) { |
|
337 ret = iFactory->CreateSource((TMSSourceType) srctype, tmssource); |
|
338 |
|
339 if (ret == TMS_RESULT_SUCCESS) { |
|
340 switch (srctype) { |
|
341 case QTMS_SOURCE_CLIENT: |
|
342 ret = QTMSClientSourceImpl::Create(qtmssrc, tmssource); |
|
343 break; |
|
344 case QTMS_SOURCE_MODEM: |
|
345 ret = QTMSModemSourceImpl::Create(qtmssrc, tmssource); |
|
346 break; |
|
347 case QTMS_SOURCE_MIC: |
|
348 ret = QTMSMicSourceImpl::Create(qtmssrc, tmssource); |
|
349 break; |
|
350 default: |
|
351 ret = TMS_RESULT_SOURCE_TYPE_NOT_SUPPORTED; |
|
352 break; |
|
353 } |
|
354 } |
|
355 } |
|
356 TRACE_PRN_FN_EXT; |
|
357 return ret; |
|
358 } |
|
359 |
|
360 gint QTMSFactoryImpl::DeleteSource(QTMSSource*& qtmssrc) |
|
361 { |
|
362 TRACE_PRN_FN_ENT; |
|
363 __ASSERT_ALWAYS(qtmssrc, PANIC(QTMS_RESULT_NULL_ARGUMENT)); |
|
364 |
|
365 gint ret(QTMS_RESULT_SUCCESS); |
|
366 QTMSSourceType sourcetype; |
|
367 ret = qtmssrc->GetType(sourcetype); |
|
368 switch (sourcetype) { |
|
369 case QTMS_SOURCE_CLIENT: |
|
370 delete (static_cast<QTMSClientSourceImpl*> (qtmssrc)); |
|
371 qtmssrc = NULL; |
|
372 break; |
|
373 case QTMS_SOURCE_MODEM: |
|
374 { |
|
375 delete (static_cast<QTMSModemSourceImpl*> (qtmssrc)); |
|
376 qtmssrc = NULL; |
|
377 } |
|
378 break; |
|
379 case TMS_SOURCE_MIC: |
|
380 { |
|
381 delete (static_cast<QTMSMicSourceImpl*> (qtmssrc)); |
|
382 qtmssrc = NULL; |
|
383 } |
|
384 break; |
|
385 default: |
|
386 ret = TMS_RESULT_SOURCE_TYPE_NOT_SUPPORTED; |
|
387 break; |
|
388 } |
|
389 |
|
390 TRACE_PRN_FN_EXT; |
|
391 return ret; |
|
392 } |
|
393 |
|
394 gint QTMSFactoryImpl::CreateSink(QTMSSinkType sinktype, QTMSSink*& qtmssink) |
|
395 { |
|
396 TRACE_PRN_FN_ENT; |
|
397 gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT); |
|
398 |
|
399 TMS::TMSSink* tmssink(NULL); |
|
400 |
|
401 if (iFactory) { |
|
402 ret = iFactory->CreateSink((TMSSinkType) sinktype, tmssink); |
|
403 |
|
404 if (ret == TMS_RESULT_SUCCESS) { |
|
405 switch (sinktype) { |
|
406 case QTMS_SINK_CLIENT: |
|
407 ret = QTMSClientSinkImpl::Create(qtmssink, tmssink); |
|
408 break; |
|
409 case QTMS_SINK_MODEM: |
|
410 ret = QTMSModemSinkImpl::Create(qtmssink, tmssink); |
|
411 break; |
|
412 case QTMS_SINK_SPEAKER: |
|
413 ret = QTMSSpeakerSinkImpl::Create(qtmssink, tmssink); |
|
414 break; |
|
415 default: |
|
416 ret = TMS_RESULT_SINK_TYPE_NOT_SUPPORTED; |
|
417 break; |
|
418 } |
|
419 } |
|
420 } |
|
421 TRACE_PRN_FN_EXT; |
|
422 return ret; |
|
423 } |
|
424 |
|
425 gint QTMSFactoryImpl::DeleteSink(QTMSSink*& qtmssink) |
|
426 { |
|
427 TRACE_PRN_FN_ENT; |
|
428 __ASSERT_ALWAYS(qtmssink, PANIC(QTMS_RESULT_NULL_ARGUMENT)); |
|
429 |
|
430 gint ret(QTMS_RESULT_SUCCESS); |
|
431 QTMSSinkType sinktype; |
|
432 ret = qtmssink->GetType(sinktype); |
|
433 switch (sinktype) { |
|
434 case QTMS_SINK_CLIENT: |
|
435 { |
|
436 delete (static_cast<QTMSClientSinkImpl*> (qtmssink)); |
|
437 qtmssink = NULL; |
|
438 } |
|
439 break; |
|
440 case QTMS_SINK_MODEM: |
|
441 { |
|
442 delete (static_cast<QTMSModemSinkImpl*> (qtmssink)); |
|
443 qtmssink = NULL; |
|
444 } |
|
445 break; |
|
446 case QTMS_SINK_SPEAKER: |
|
447 { |
|
448 delete (static_cast<QTMSSpeakerSinkImpl*> (qtmssink)); |
|
449 qtmssink = NULL; |
|
450 } |
|
451 break; |
|
452 default: |
|
453 ret = QTMS_RESULT_SINK_TYPE_NOT_SUPPORTED; |
|
454 break; |
|
455 } |
|
456 TRACE_PRN_FN_EXT; |
|
457 return ret; |
|
458 } |
|
459 |
|
460 gint QTMSFactoryImpl::CreateGlobalRouting(QTMSGlobalRouting*& qrouting) |
|
461 { |
|
462 TRACE_PRN_FN_ENT; |
|
463 gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT); |
|
464 |
|
465 TMS::TMSGlobalRouting* tmsrouting(NULL); |
|
466 if (iFactory) { |
|
467 ret = iFactory->CreateGlobalRouting(tmsrouting); |
|
468 |
|
469 if (ret == TMS_RESULT_SUCCESS) { |
|
470 ret = QTMSGlobalRoutingImpl::Create(qrouting, tmsrouting); |
|
471 } |
|
472 } |
|
473 TRACE_PRN_FN_EXT; |
|
474 return ret; |
|
475 } |
|
476 |
|
477 gint QTMSFactoryImpl::DeleteGlobalRouting(QTMSGlobalRouting*& globalrouting) |
|
478 { |
|
479 TRACE_PRN_FN_ENT; |
|
480 gint ret(QTMS_RESULT_SUCCESS); |
|
481 delete (static_cast<QTMSGlobalRoutingImpl*> (globalrouting)); |
|
482 globalrouting = NULL; |
|
483 TRACE_PRN_FN_EXT; |
|
484 return ret; |
|
485 } |
|
486 |
|
487 gint QTMSFactoryImpl::CreateDTMF(QTMSStreamType streamtype, QTMSDTMF*& qdtmf) |
|
488 { |
|
489 TRACE_PRN_FN_ENT; |
|
490 gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT); |
|
491 |
|
492 TMS::TMSDTMF* tmsdtmf = NULL; |
|
493 |
|
494 if (iFactory) { |
|
495 ret = iFactory->CreateDTMF((TMSStreamType) streamtype, tmsdtmf); |
|
496 |
|
497 if (ret == TMS_RESULT_SUCCESS) { |
|
498 ret = QTMSDTMFImpl::Create(qdtmf, tmsdtmf); |
|
499 } |
|
500 } |
|
501 TRACE_PRN_FN_EXT; |
|
502 return ret; |
|
503 } |
|
504 |
|
505 gint QTMSFactoryImpl::DeleteDTMF(QTMSDTMF*& dtmf) |
|
506 { |
|
507 TRACE_PRN_FN_ENT; |
|
508 gint ret(QTMS_RESULT_SUCCESS); |
|
509 delete (static_cast<QTMSDTMFImpl*> (dtmf)); |
|
510 dtmf = NULL; |
|
511 TRACE_PRN_FN_EXT; |
|
512 return ret; |
|
513 } |
|
514 |
|
515 gint QTMSFactoryImpl::CreateRingTonePlayer(QTMSRingTone*& rt) |
|
516 { |
|
517 TRACE_PRN_FN_ENT; |
|
518 gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT); |
|
519 |
|
520 TMS::TMSRingTone* tmsrt = NULL; |
|
521 |
|
522 if (iFactory) { |
|
523 ret = iFactory->CreateRingTonePlayer(tmsrt); |
|
524 |
|
525 if (ret == TMS_RESULT_SUCCESS) { |
|
526 ret = QTMSRingToneImpl::Create(rt, tmsrt); |
|
527 } |
|
528 } |
|
529 TRACE_PRN_FN_EXT; |
|
530 return ret; |
|
531 } |
|
532 |
|
533 gint QTMSFactoryImpl::DeleteRingTonePlayer(QTMSRingTone*& rt) |
|
534 { |
|
535 TRACE_PRN_FN_ENT; |
|
536 gint ret(QTMS_RESULT_SUCCESS); |
|
537 delete (static_cast<QTMSRingToneImpl*> (rt)); |
|
538 rt = NULL; |
|
539 TRACE_PRN_FN_EXT; |
|
540 return ret; |
|
541 } |
|
542 |
|
543 gint QTMSFactoryImpl::CreateInbandTonePlayer(QTMSInbandTone*& qinbandtone) |
|
544 { |
|
545 TRACE_PRN_FN_ENT; |
|
546 gint ret(QTMS_RESULT_UNINITIALIZED_OBJECT); |
|
547 |
|
548 TMS::TMSInbandTone* tmsinband = NULL; |
|
549 if (iFactory) { |
|
550 ret = iFactory->CreateInbandTonePlayer(tmsinband); |
|
551 |
|
552 if (ret == TMS_RESULT_SUCCESS) { |
|
553 ret = QTMSInbandToneImpl::Create(qinbandtone, tmsinband); |
|
554 } |
|
555 } |
|
556 TRACE_PRN_FN_EXT; |
|
557 return ret; |
|
558 } |
|
559 |
|
560 gint QTMSFactoryImpl::DeleteInbandTonePlayer(QTMSInbandTone*& inbandtone) |
|
561 { |
|
562 TRACE_PRN_FN_ENT; |
|
563 gint ret(QTMS_RESULT_SUCCESS); |
|
564 delete (static_cast<QTMSInbandToneImpl*> (inbandtone)); |
|
565 inbandtone = NULL; |
|
566 TRACE_PRN_FN_EXT; |
|
567 return ret; |
|
568 } |
|
569 |
|
570 // End of file |
|