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