32 |
33 |
33 // ----------------------------------------------------------------------------- |
34 // ----------------------------------------------------------------------------- |
34 // Second phase constructor |
35 // Second phase constructor |
35 // ----------------------------------------------------------------------------- |
36 // ----------------------------------------------------------------------------- |
36 // |
37 // |
37 void TMSCSUplink::ConstructL() |
38 void TMSCSUplink::ConstructL(const gint retrytime) |
38 { |
39 { |
39 TMSCSDevSound::ConstructL(TMS_STREAM_UPLINK); |
40 TMSCSDevSound::ConstructL(TMS_STREAM_UPLINK, retrytime); |
40 } |
41 } |
41 |
42 |
42 // ----------------------------------------------------------------------------- |
43 // ----------------------------------------------------------------------------- |
43 // Static constructor |
44 // Static constructor |
44 // ----------------------------------------------------------------------------- |
45 // ----------------------------------------------------------------------------- |
45 // |
46 // |
46 TMSCSUplink* TMSCSUplink::NewL(TMSCSDevSoundObserver& observer) |
47 TMSCSUplink* TMSCSUplink::NewL(TMSCSDevSoundObserver& observer, |
|
48 const gint retrytime) |
47 { |
49 { |
48 TMSCSUplink* self = new (ELeave) TMSCSUplink(observer); |
50 TMSCSUplink* self = new (ELeave) TMSCSUplink(observer); |
49 CleanupStack::PushL(self); |
51 CleanupStack::PushL(self); |
50 self->ConstructL(); |
52 self->ConstructL(retrytime); |
51 CleanupStack::Pop(self); |
53 CleanupStack::Pop(self); |
52 return self; |
54 return self; |
53 } |
55 } |
54 |
56 |
55 // ----------------------------------------------------------------------------- |
57 // ----------------------------------------------------------------------------- |
120 // Uplink stream has been activated successfully. |
122 // Uplink stream has been activated successfully. |
121 // ----------------------------------------------------------------------------- |
123 // ----------------------------------------------------------------------------- |
122 // |
124 // |
123 void TMSCSUplink::BufferToBeEmptied(CMMFBuffer* /*aBuffer*/) |
125 void TMSCSUplink::BufferToBeEmptied(CMMFBuffer* /*aBuffer*/) |
124 { |
126 { |
125 //TRACE_PRN_N(_L("TMSCSUplink::BufferToBeEmptied")); |
127 TRACE_PRN_N(_L("TMSCSUplink::BufferToBeEmptied")); |
126 |
128 |
127 // We dont react to devsound messages unless we are activating. |
129 // We dont react to devsound messages unless we are activating. |
128 if (iActivationOngoing) |
130 if (iActivationOngoing) |
129 { |
131 { |
130 iActive = ETrue; |
132 iActive = ETrue; |
138 // Uplink stream activation failed |
140 // Uplink stream activation failed |
139 // ----------------------------------------------------------------------------- |
141 // ----------------------------------------------------------------------------- |
140 // |
142 // |
141 void TMSCSUplink::RecordError(TInt aError) |
143 void TMSCSUplink::RecordError(TInt aError) |
142 { |
144 { |
143 //TRACE_PRN_N1(_L("TMSCSUplink::RecordError[%d]"), aError); |
145 TRACE_PRN_N1(_L("TMSCSUplink::RecordError[%d]"), aError); |
144 |
146 |
145 // We dont react to devsound messages unless we are activating. |
147 // We dont react to devsound messages unless we are activating. |
146 if (iActivationOngoing && aError == KErrAccessDenied) |
148 if (iActivationOngoing && (aError == KErrAccessDenied || |
|
149 aError == KErrInUse)) |
147 { |
150 { |
148 iActivationOngoing = EFalse; |
151 if (iStartRetryTime != 0) |
149 iObserver.UplinkActivationCompleted(aError); |
152 { |
|
153 StartTimer(); |
|
154 } |
|
155 else |
|
156 { |
|
157 CancelTimer(); |
|
158 iActivationOngoing = EFalse; |
|
159 iObserver.UplinkActivationCompleted(aError); |
|
160 } |
150 } |
161 } |
151 } |
162 } |
152 |
163 |
153 // ----------------------------------------------------------------------------- |
164 // ----------------------------------------------------------------------------- |
154 // From class TMSCSDevSound |
165 // From class TMSCSDevSound |