equal
deleted
inserted
replaced
14 * Description: Telephony Multimedia Service |
14 * Description: Telephony Multimedia Service |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 #include <AudioPreference.h> |
18 #include <AudioPreference.h> |
19 #include "tmsutility.h" |
|
20 #include "tmscsdownlink.h" |
19 #include "tmscsdownlink.h" |
21 #include "tmscsdevsoundobserver.h" |
20 #include "tmscsdevsoundobserver.h" |
22 |
21 |
23 using namespace TMS; |
22 using namespace TMS; |
24 |
23 |
36 |
35 |
37 // ----------------------------------------------------------------------------- |
36 // ----------------------------------------------------------------------------- |
38 // Second phase constructor |
37 // Second phase constructor |
39 // ----------------------------------------------------------------------------- |
38 // ----------------------------------------------------------------------------- |
40 // |
39 // |
41 void TMSCSDownlink::ConstructL(const gint retrytime) |
40 void TMSCSDownlink::ConstructL() |
42 { |
41 { |
43 TMSCSDevSound::ConstructL(TMS_STREAM_DOWNLINK, retrytime); |
42 TMSCSDevSound::ConstructL(TMS_STREAM_DOWNLINK); |
44 |
43 |
45 if (iDevSound) |
44 if (iDevSound) |
46 { |
45 { |
47 iDevSound->SetVolume(KDefaultVolume); |
46 iDevSound->SetVolume(KDefaultVolume); |
48 } |
47 } |
50 |
49 |
51 // ----------------------------------------------------------------------------- |
50 // ----------------------------------------------------------------------------- |
52 // Static constructor |
51 // Static constructor |
53 // ----------------------------------------------------------------------------- |
52 // ----------------------------------------------------------------------------- |
54 // |
53 // |
55 TMSCSDownlink* TMSCSDownlink::NewL(TMSCSDevSoundObserver& observer, |
54 TMSCSDownlink* TMSCSDownlink::NewL(TMSCSDevSoundObserver& observer) |
56 const gint retrytime) |
|
57 { |
55 { |
58 TMSCSDownlink* self = new (ELeave) TMSCSDownlink(observer); |
56 TMSCSDownlink* self = new (ELeave) TMSCSDownlink(observer); |
59 CleanupStack::PushL(self); |
57 CleanupStack::PushL(self); |
60 self->ConstructL(retrytime); |
58 self->ConstructL(); |
61 CleanupStack::Pop(self); |
59 CleanupStack::Pop(self); |
62 return self; |
60 return self; |
63 } |
61 } |
64 |
62 |
65 // ----------------------------------------------------------------------------- |
63 // ----------------------------------------------------------------------------- |
118 // Downlink stream has been activated successfully. |
116 // Downlink stream has been activated successfully. |
119 // ----------------------------------------------------------------------------- |
117 // ----------------------------------------------------------------------------- |
120 // |
118 // |
121 void TMSCSDownlink::BufferToBeFilled(CMMFBuffer* /*aBuffer*/) |
119 void TMSCSDownlink::BufferToBeFilled(CMMFBuffer* /*aBuffer*/) |
122 { |
120 { |
123 TRACE_PRN_N(_L("TMSCSDownlink::BufferToBeFilled")); |
121 //TRACE_PRN_N(_L("TMSCSDownlink::BufferToBeFilled")); |
124 |
122 |
125 // We dont react to devsound messages unless we are activating. |
123 // We dont react to devsound messages unless we are activating. |
126 if (iActivationOngoing) |
124 if (iActivationOngoing) |
127 { |
125 { |
128 iActive = ETrue; |
126 iActive = ETrue; |
136 // Downlink stream activation failed |
134 // Downlink stream activation failed |
137 // ----------------------------------------------------------------------------- |
135 // ----------------------------------------------------------------------------- |
138 // |
136 // |
139 void TMSCSDownlink::PlayError(TInt aError) |
137 void TMSCSDownlink::PlayError(TInt aError) |
140 { |
138 { |
141 TRACE_PRN_N1(_L("TMSCSDownlink::PlayError[%d]"), aError); |
139 //TRACE_PRN_N1(_L("TMSCSDownlink::PlayError[%d]"), aError); |
142 |
140 |
143 // We don't react to devsound errors unless we are activating. |
141 // We don't react to devsound errors unless we are activating. |
144 if (iActivationOngoing && (aError == KErrAccessDenied || |
142 if (iActivationOngoing && aError == KErrAccessDenied) |
145 aError == KErrInUse)) |
|
146 { |
143 { |
147 if (iStartRetryTime != 0) |
144 iActivationOngoing = EFalse; |
148 { |
145 iObserver.DownlinkActivationCompleted(aError); |
149 StartTimer(); |
|
150 } |
|
151 else |
|
152 { |
|
153 CancelTimer(); |
|
154 iActivationOngoing = EFalse; |
|
155 iObserver.DownlinkActivationCompleted(aError); |
|
156 } |
|
157 } |
146 } |
158 } |
147 } |
159 |
148 |
160 // ----------------------------------------------------------------------------- |
149 // ----------------------------------------------------------------------------- |
161 // From class TMSCSDevSound |
150 // From class TMSCSDevSound |