|
1 /* |
|
2 * Copyright (c) 2009 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: Telephony Multimedia Service |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "tmsutility.h" |
|
19 #include "tmsdtmfbodyimpl.h" |
|
20 #include "tmsdtmfimpl.h" |
|
21 |
|
22 using namespace TMS; |
|
23 |
|
24 TMSDTMFImpl::TMSDTMFImpl() |
|
25 { |
|
26 TRACE_PRN_FN_ENT; |
|
27 TRACE_PRN_FN_EXT; |
|
28 } |
|
29 |
|
30 TMSDTMFImpl::~TMSDTMFImpl() |
|
31 { |
|
32 TRACE_PRN_FN_ENT; |
|
33 TRACE_PRN_FN_EXT; |
|
34 } |
|
35 |
|
36 gint TMSDTMFImpl::PostConstruct(TMSStreamType streamtype) |
|
37 { |
|
38 TRACE_PRN_FN_ENT; |
|
39 gint ret(TMS_RESULT_INSUFFICIENT_MEMORY); |
|
40 TMSDTMFBody* bodyimpl(NULL); |
|
41 ret = TMSDTMFBodyImpl::Create(streamtype, *this, bodyimpl); |
|
42 |
|
43 if (ret == TMS_RESULT_SUCCESS) |
|
44 { |
|
45 this->iBody = bodyimpl; |
|
46 } |
|
47 TRACE_PRN_FN_EXT; |
|
48 return ret; |
|
49 } |
|
50 |
|
51 EXPORT_C gint TMSDTMFImpl::Create(TMSStreamType streamtype, TMSDTMF*& dtmf) |
|
52 { |
|
53 TRACE_PRN_FN_ENT; |
|
54 gint ret(TMS_RESULT_INSUFFICIENT_MEMORY); |
|
55 TMSDTMFImpl *self = new TMSDTMFImpl(); |
|
56 |
|
57 if (self) |
|
58 { |
|
59 ret = self->PostConstruct(streamtype); |
|
60 if (ret != TMS_RESULT_SUCCESS) |
|
61 { |
|
62 delete self; |
|
63 self = NULL; |
|
64 } |
|
65 } |
|
66 |
|
67 dtmf = self; |
|
68 TRACE_PRN_FN_EXT; |
|
69 return ret; |
|
70 } |
|
71 |
|
72 EXPORT_C gint TMSDTMFImpl::Delete(TMSDTMF*& dtmf) |
|
73 { |
|
74 TRACE_PRN_FN_ENT; |
|
75 gint ret(TMS_RESULT_SUCCESS); |
|
76 delete (static_cast<TMSDTMFImpl*> (dtmf)); |
|
77 dtmf = NULL; |
|
78 TRACE_PRN_FN_EXT; |
|
79 return ret; |
|
80 } |
|
81 |