|
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 <tms.h> |
|
19 #include "tmsvolumeeffectbodyimpl.h" |
|
20 #include "tmsutility.h" |
|
21 #include "tmsvolumeeffectimpl.h" |
|
22 |
|
23 using namespace TMS; |
|
24 |
|
25 TMSVolumeEffectImpl::TMSVolumeEffectImpl() |
|
26 { |
|
27 TRACE_PRN_FN_ENT; |
|
28 TRACE_PRN_FN_EXT; |
|
29 } |
|
30 |
|
31 TMSVolumeEffectImpl::~TMSVolumeEffectImpl() |
|
32 { |
|
33 TRACE_PRN_FN_ENT; |
|
34 TRACE_PRN_FN_EXT; |
|
35 } |
|
36 |
|
37 gint TMSVolumeEffectImpl::PostConstruct() |
|
38 { |
|
39 gint ret(TMS_RESULT_INSUFFICIENT_MEMORY); |
|
40 TMSVolumeEffectBody* bodyimpl(NULL); |
|
41 TRACE_PRN_FN_ENT; |
|
42 ret = TMSVolumeEffectBodyImpl::Create(bodyimpl); |
|
43 |
|
44 if (ret == TMS_RESULT_SUCCESS) |
|
45 { |
|
46 this->iBody = bodyimpl; |
|
47 } |
|
48 TRACE_PRN_FN_EXT; |
|
49 return ret; |
|
50 } |
|
51 |
|
52 gint TMSVolumeEffectImpl::Create(TMSEffect*& tmseffect) |
|
53 { |
|
54 gint ret(TMS_RESULT_INSUFFICIENT_MEMORY); |
|
55 TMSVolumeEffectImpl *self = new TMSVolumeEffectImpl; |
|
56 |
|
57 TRACE_PRN_FN_ENT; |
|
58 if (self) |
|
59 { |
|
60 ret = self->PostConstruct(); |
|
61 if (ret != TMS_RESULT_SUCCESS) |
|
62 { |
|
63 delete self; |
|
64 self = NULL; |
|
65 } |
|
66 } |
|
67 |
|
68 if (self && ret == TMS_RESULT_SUCCESS) |
|
69 { |
|
70 tmseffect = self; |
|
71 ret = self->SetParentEffect(tmseffect); |
|
72 } |
|
73 TRACE_PRN_FN_EXT; |
|
74 return ret; |
|
75 } |
|
76 |
|
77 gint TMSVolumeEffectImpl::SetParentEffect(TMSEffect*& parenteffect) |
|
78 { |
|
79 gint ret(TMS_RESULT_SUCCESS); |
|
80 if (this->iBody) |
|
81 { |
|
82 ((TMSVolumeEffectBodyImpl*) this->iBody)->SetParentEffect(parenteffect); |
|
83 } |
|
84 else |
|
85 { |
|
86 ret = TMS_RESULT_UNINITIALIZED_OBJECT; |
|
87 } |
|
88 return ret; |
|
89 } |
|
90 |
|
91 gint TMSVolumeEffectImpl::SetProxy(TMSCallProxy* aProxy, gpointer queuehandler) |
|
92 { |
|
93 gint ret(TMS_RESULT_SUCCESS); |
|
94 if (this->iBody) |
|
95 { |
|
96 ((TMSVolumeEffectBodyImpl*) this->iBody)->SetProxy(aProxy, |
|
97 queuehandler); |
|
98 } |
|
99 else |
|
100 { |
|
101 ret = TMS_RESULT_UNINITIALIZED_OBJECT; |
|
102 } |
|
103 return ret; |
|
104 } |
|
105 |
|
106 // End of file |