29
|
1 |
/*
|
|
2 |
* Copyright (c) 2008-2010 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: Copies signals changes between network and local media
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifdef PRJ_USE_NETWORK_STUBS
|
|
20 |
#include <c32comm_stub.h>
|
|
21 |
#else
|
|
22 |
#include <d32comm.h>
|
|
23 |
#endif
|
|
24 |
#include "DunTransporter.h"
|
|
25 |
#include "DunSignalCopy.h"
|
|
26 |
#include "DunDebug.h"
|
|
27 |
|
|
28 |
const TUint KDunSixLowestBitsMask = 0x3F; // Symbian magic
|
|
29 |
|
|
30 |
// ======== MEMBER FUNCTIONS ========
|
|
31 |
|
|
32 |
// ---------------------------------------------------------------------------
|
|
33 |
// Two-phased constructor.
|
|
34 |
// ---------------------------------------------------------------------------
|
|
35 |
//
|
|
36 |
CDunSignalCopy* CDunSignalCopy::NewL()
|
|
37 |
{
|
|
38 |
CDunSignalCopy* self = new (ELeave) CDunSignalCopy();
|
|
39 |
CleanupStack::PushL( self );
|
|
40 |
self->ConstructL();
|
|
41 |
CleanupStack::Pop( self );
|
|
42 |
return self;
|
|
43 |
}
|
|
44 |
|
|
45 |
// ---------------------------------------------------------------------------
|
|
46 |
// Destructor
|
|
47 |
// ---------------------------------------------------------------------------
|
|
48 |
//
|
|
49 |
CDunSignalCopy::~CDunSignalCopy()
|
|
50 |
{
|
|
51 |
FTRACE(FPrint( _L("CDunSignalCopy::~CDunSignalCopy()") ));
|
|
52 |
ResetData();
|
|
53 |
FTRACE(FPrint( _L("CDunSignalCopy::~CDunSignalCopy() complete") ));
|
|
54 |
}
|
|
55 |
|
|
56 |
// ---------------------------------------------------------------------------
|
|
57 |
// Resets data to initial values
|
|
58 |
// ---------------------------------------------------------------------------
|
|
59 |
//
|
|
60 |
void CDunSignalCopy::ResetData()
|
|
61 |
{
|
|
62 |
FTRACE(FPrint( _L("CDunSignalCopy::ResetData()") ));
|
|
63 |
// APIs affecting this:
|
|
64 |
// IssueRequest()
|
|
65 |
Stop();
|
|
66 |
// AddCallback()
|
|
67 |
iCallbacks.Close();
|
|
68 |
// Internal
|
|
69 |
Initialize();
|
|
70 |
FTRACE(FPrint( _L("CDunSignalCopy::ResetData() complete") ));
|
|
71 |
}
|
|
72 |
|
|
73 |
// ---------------------------------------------------------------------------
|
|
74 |
// Adds callback for line status change controlling
|
|
75 |
// The callback will be called when RunL error is detected
|
|
76 |
// ---------------------------------------------------------------------------
|
|
77 |
//
|
|
78 |
TInt CDunSignalCopy::AddCallback( MDunConnMon* aCallback )
|
|
79 |
{
|
|
80 |
FTRACE(FPrint( _L("CDunSignalCopy::AddCallback()" ) ));
|
|
81 |
if ( !aCallback )
|
|
82 |
{
|
|
83 |
FTRACE(FPrint( _L("CDunSignalCopy::AddCallback() (aCallback) not initialized!" ) ));
|
|
84 |
return KErrGeneral;
|
|
85 |
}
|
|
86 |
TInt retTemp = iCallbacks.Find( aCallback );
|
|
87 |
if ( retTemp != KErrNotFound )
|
|
88 |
{
|
|
89 |
FTRACE(FPrint( _L("CDunSignalCopy::AddCallback() (already exists) complete" ) ));
|
|
90 |
return KErrAlreadyExists;
|
|
91 |
}
|
|
92 |
retTemp = iCallbacks.Append( aCallback );
|
|
93 |
if ( retTemp != KErrNone )
|
|
94 |
{
|
|
95 |
FTRACE(FPrint( _L("CDunSignalCopy::AddCallback() (append failed!) complete" ) ));
|
|
96 |
return retTemp;
|
|
97 |
}
|
|
98 |
FTRACE(FPrint( _L("CDunSignalCopy::AddCallback() complete" ) ));
|
|
99 |
return KErrNone;
|
|
100 |
}
|
|
101 |
|
|
102 |
// ---------------------------------------------------------------------------
|
|
103 |
// Sets media to use for this endpoint monitor
|
|
104 |
// ---------------------------------------------------------------------------
|
|
105 |
//
|
|
106 |
TInt CDunSignalCopy::SetMedia( RComm* aComm,
|
|
107 |
RComm* aNetwork,
|
|
108 |
TDunStreamType aStreamType )
|
|
109 |
{
|
|
110 |
FTRACE(FPrint( _L("CDunSignalCopy::SetMedia()" )));
|
|
111 |
if ( !aNetwork )
|
|
112 |
{
|
|
113 |
FTRACE(FPrint( _L("CDunSignalCopy::SetMedia() (aComm) not initialized!" )));
|
|
114 |
return KErrGeneral;
|
|
115 |
}
|
|
116 |
RComm* comm = NULL;
|
|
117 |
if ( aStreamType == EDunStreamTypeUpstream )
|
|
118 |
{
|
|
119 |
iContextInUse = EDunMediaContextLocal;
|
|
120 |
comm = aComm;
|
|
121 |
}
|
|
122 |
else if ( aStreamType == EDunStreamTypeDownstream )
|
|
123 |
{
|
|
124 |
iContextInUse = EDunMediaContextNetwork;
|
|
125 |
comm = aNetwork;
|
|
126 |
}
|
|
127 |
else
|
|
128 |
{
|
|
129 |
FTRACE(FPrint( _L("CDunSignalCopy::SetMedia() (aStreamtype) not initialized!" )));
|
|
130 |
return KErrGeneral;
|
|
131 |
}
|
|
132 |
// No possibility to do iUtility->GetLocalId() here as aComm is not yet
|
|
133 |
// in channel data; use aComm directly
|
|
134 |
TCommCaps2 caps;
|
|
135 |
comm->Caps( caps );
|
|
136 |
if ( !(caps().iNotificationCaps & KNotifySignalsChangeSupported) )
|
|
137 |
{
|
|
138 |
FTRACE(FPrint( _L("CDunSignalCopy::SetMedia() (RComm) (not supported) complete" )));
|
|
139 |
return KErrNotSupported;
|
|
140 |
}
|
|
141 |
iComm = aComm;
|
|
142 |
iNetwork = aNetwork;
|
|
143 |
iStreamType = aStreamType;
|
|
144 |
FTRACE(FPrint( _L("CDunSignalCopy::SetMedia() (RComm) complete" )));
|
|
145 |
return KErrNone;
|
|
146 |
}
|
|
147 |
|
|
148 |
// ---------------------------------------------------------------------------
|
|
149 |
// Issues request to start monitoring the endpoint for line status change
|
|
150 |
// ---------------------------------------------------------------------------
|
|
151 |
//
|
|
152 |
TInt CDunSignalCopy::IssueRequest()
|
|
153 |
{
|
|
154 |
FTRACE(FPrint( _L("CDunSignalCopy::IssueRequest()" )));
|
|
155 |
if ( iSignalCopyState != EDunStateIdle )
|
|
156 |
{
|
|
157 |
FTRACE(FPrint( _L("CDunSignalCopy::IssueRequest() (not ready) complete" ) ));
|
|
158 |
return KErrNotReady;
|
|
159 |
}
|
|
160 |
RComm* comm = NULL;
|
|
161 |
if ( iStreamType == EDunStreamTypeUpstream )
|
|
162 |
{
|
|
163 |
iListenSignals = KSignalDCEInputs;
|
|
164 |
comm = iComm;
|
|
165 |
}
|
|
166 |
else if ( iStreamType == EDunStreamTypeDownstream )
|
|
167 |
{
|
|
168 |
iListenSignals = KSignalDTEInputs;
|
|
169 |
comm = iNetwork;
|
|
170 |
}
|
|
171 |
else
|
|
172 |
{
|
|
173 |
FTRACE(FPrint( _L("CDunSignalCopy::IssueRequest() (ERROR) complete" ) ));
|
|
174 |
return KErrGeneral;
|
|
175 |
}
|
|
176 |
TUint currentSignals = comm->Signals( iListenSignals );
|
|
177 |
TUint oldSignalsLow = iSignals & KDunSixLowestBitsMask;
|
|
178 |
TUint newSignalsLow = currentSignals & KDunSixLowestBitsMask;
|
|
179 |
TUint oldSignalsHigh = oldSignalsLow * KSignalChanged;
|
|
180 |
TUint newSignalsHigh = newSignalsLow * KSignalChanged;
|
|
181 |
FTRACE(FPrint( _L("CDunSignalCopy::IssueRequest() oldSignalsLow=0x%08X" ), oldSignalsLow ));
|
|
182 |
FTRACE(FPrint( _L("CDunSignalCopy::IssueRequest() newSignalsLow=0x%08X" ), newSignalsLow ));
|
|
183 |
FTRACE(FPrint( _L("CDunSignalCopy::IssueRequest() oldSignalsHigh=0x%08X" ), oldSignalsHigh ));
|
|
184 |
FTRACE(FPrint( _L("CDunSignalCopy::IssueRequest() newSignalsHigh=0x%08X" ), newSignalsHigh ));
|
|
185 |
if ( newSignalsLow != oldSignalsLow )
|
|
186 |
{
|
|
187 |
FTRACE(FPrint( _L("CDunSignalCopy::IssueRequest() signals already set..." ) ));
|
|
188 |
iSignals = newSignalsLow | (oldSignalsHigh ^ newSignalsHigh);
|
|
189 |
ManageSignalChange();
|
|
190 |
}
|
|
191 |
else
|
|
192 |
{
|
|
193 |
FTRACE(FPrint( _L("CDunSignalCopy::IssueRequest() start waiting for change..." ) ));
|
|
194 |
iStatus = KRequestPending;
|
|
195 |
comm->NotifySignalChange( iStatus, iSignals, iListenSignals );
|
|
196 |
SetActive();
|
|
197 |
iSignalCopyState = EDunStateSignalCopy;
|
|
198 |
}
|
|
199 |
FTRACE(FPrint( _L("CDunSignalCopy::IssueRequest() complete" )));
|
|
200 |
return KErrNone;
|
|
201 |
}
|
|
202 |
|
|
203 |
// ---------------------------------------------------------------------------
|
|
204 |
// Stops monitoring the endpoint for line status change
|
|
205 |
// ---------------------------------------------------------------------------
|
|
206 |
//
|
|
207 |
TInt CDunSignalCopy::Stop()
|
|
208 |
{
|
|
209 |
FTRACE(FPrint( _L("CDunSignalCopy::Stop()" )));
|
|
210 |
if ( iSignalCopyState != EDunStateSignalCopy )
|
|
211 |
{
|
|
212 |
FTRACE(FPrint( _L("CDunSignalCopy::Stop() (not ready) complete" )));
|
|
213 |
return KErrNotReady;
|
|
214 |
}
|
|
215 |
if ( iStreamType == EDunStreamTypeUpstream )
|
|
216 |
{
|
|
217 |
iComm->NotifySignalChangeCancel();
|
|
218 |
}
|
|
219 |
else if ( iStreamType == EDunStreamTypeDownstream )
|
|
220 |
{
|
|
221 |
iNetwork->NotifySignalChangeCancel();
|
|
222 |
}
|
|
223 |
else
|
|
224 |
{
|
|
225 |
FTRACE(FPrint( _L("CDunSignalCopy::Stop() (ERROR) complete" )));
|
|
226 |
return KErrGeneral;
|
|
227 |
}
|
|
228 |
Cancel();
|
|
229 |
iSignalCopyState = EDunStateIdle;
|
|
230 |
FTRACE(FPrint( _L("CDunSignalCopy::Stop() complete" )));
|
|
231 |
return KErrNone;
|
|
232 |
}
|
|
233 |
|
|
234 |
// ---------------------------------------------------------------------------
|
|
235 |
// CDunSignalCopy::CDunSignalCopy
|
|
236 |
// ---------------------------------------------------------------------------
|
|
237 |
//
|
|
238 |
CDunSignalCopy::CDunSignalCopy() :
|
|
239 |
CActive( EPriorityHigh )
|
|
240 |
{
|
|
241 |
Initialize();
|
|
242 |
}
|
|
243 |
|
|
244 |
// ---------------------------------------------------------------------------
|
|
245 |
// CDunSignalCopy::ConstructL
|
|
246 |
// ---------------------------------------------------------------------------
|
|
247 |
//
|
|
248 |
void CDunSignalCopy::ConstructL()
|
|
249 |
{
|
|
250 |
FTRACE(FPrint( _L("CDunSignalCopy::ConstructL()" ) ));
|
|
251 |
CActiveScheduler::Add( this );
|
|
252 |
FTRACE(FPrint( _L("CDunSignalCopy::ConstructL() complete" ) ));
|
|
253 |
}
|
|
254 |
|
|
255 |
// ---------------------------------------------------------------------------
|
|
256 |
// Initializes this class
|
|
257 |
// ---------------------------------------------------------------------------
|
|
258 |
//
|
|
259 |
void CDunSignalCopy::Initialize()
|
|
260 |
{
|
|
261 |
FTRACE(FPrint( _L("CDunSignalCopy::Initialize()" ) ));
|
|
262 |
iContextInUse = EDunMediaContextUndefined;
|
|
263 |
iStreamType = EDunStreamTypeUndefined;
|
|
264 |
iSignalCopyState = EDunStateIdle;
|
|
265 |
iListenSignals = 0;
|
|
266 |
iSignals = 0;
|
|
267 |
iNetwork = NULL;
|
|
268 |
iComm = NULL;
|
|
269 |
FTRACE(FPrint( _L("CDunSignalCopy::Initialize() complete" ) ));
|
|
270 |
}
|
|
271 |
|
|
272 |
// ---------------------------------------------------------------------------
|
|
273 |
// Manages signal changes
|
|
274 |
// ---------------------------------------------------------------------------
|
|
275 |
//
|
|
276 |
void CDunSignalCopy::ManageSignalChange()
|
|
277 |
{
|
|
278 |
FTRACE(FPrint( _L("CDunSignalCopy::ManageSignalChange()" ) ));
|
|
279 |
|
|
280 |
if ( iStreamType == EDunStreamTypeUpstream )
|
|
281 |
{
|
|
282 |
// Manage upstream case
|
|
283 |
ManageSignalChangeUpstream();
|
|
284 |
}
|
|
285 |
else // iStreamType == EDunStreamTypeDownstream
|
|
286 |
{
|
|
287 |
// Manage downstream case
|
|
288 |
ManageSignalChangeDownstream();
|
|
289 |
}
|
|
290 |
|
|
291 |
FTRACE(FPrint( _L("CDunSignalCopy::ManageSignalChange() complete" ) ));
|
|
292 |
}
|
|
293 |
|
|
294 |
// ---------------------------------------------------------------------------
|
|
295 |
// Manages upstream signal changes
|
|
296 |
// ---------------------------------------------------------------------------
|
|
297 |
//
|
|
298 |
void CDunSignalCopy::ManageSignalChangeUpstream()
|
|
299 |
{
|
|
300 |
FTRACE(FPrint( _L("CDunSignalCopy::ManageSignalChangeUpstream()" ) ));
|
|
301 |
// For upstream the following signals are set for local media:
|
|
302 |
// KSignalDCEInputs = KSignalRTS | KSignalDTR
|
|
303 |
if ( iSignals & KRTSChanged )
|
|
304 |
{
|
|
305 |
FTRACE(FPrint( _L("CDunSignalCopy::ManageSignalChangeUpstream() checking RTS..." ) ));
|
|
306 |
if ( iSignals & KSignalRTS ) // RTS changed to high
|
|
307 |
{
|
|
308 |
ChangeUpstreamSignal( KSignalRTS, 0 );
|
|
309 |
FTRACE(FPrint( _L("CDunSignalCopy::ManageSignalChangeUpstream() RTS changed high" ) ));
|
|
310 |
}
|
|
311 |
else // RTS changed to low
|
|
312 |
{
|
|
313 |
ChangeUpstreamSignal( 0, KSignalRTS );
|
|
314 |
FTRACE(FPrint( _L("CDunSignalCopy::ManageSignalChangeUpstream() RTS changed low" ) ));
|
|
315 |
}
|
|
316 |
}
|
|
317 |
if ( iSignals & KDTRChanged )
|
|
318 |
{
|
|
319 |
FTRACE(FPrint( _L("CDunSignalCopy::ManageSignalChangeUpstream() checking DTR..." ) ));
|
|
320 |
if ( iSignals & KSignalDTR ) // DTR changed to high
|
|
321 |
{
|
|
322 |
ChangeUpstreamSignal( KSignalDTR, 0 );
|
|
323 |
FTRACE(FPrint( _L("CDunSignalCopy::ManageSignalChangeUpstream() DTR changed high" ) ));
|
|
324 |
}
|
|
325 |
else // DTR changed to low
|
|
326 |
{
|
|
327 |
ChangeUpstreamSignal( 0, KSignalDTR );
|
|
328 |
FTRACE(FPrint( _L("CDunSignalCopy::ManageSignalChangeUpstream() DTR changed low" ) ));
|
|
329 |
}
|
|
330 |
}
|
|
331 |
IssueRequest();
|
|
332 |
FTRACE(FPrint( _L("CDunSignalCopy::ManageSignalChangeUpstream() complete" ) ));
|
|
333 |
}
|
|
334 |
|
|
335 |
// ---------------------------------------------------------------------------
|
|
336 |
// Manages downstream signal changes
|
|
337 |
// ---------------------------------------------------------------------------
|
|
338 |
//
|
|
339 |
void CDunSignalCopy::ManageSignalChangeDownstream()
|
|
340 |
{
|
|
341 |
FTRACE(FPrint( _L("CDunSignalCopy::ManageSignalChangeDownstream()" ) ));
|
|
342 |
// For downstream the following signals are set for network:
|
|
343 |
// KSignalDTEInputs = KSignalCTS | KSignalDSR | KSignalDCD | KSignalRNG
|
|
344 |
if ( iSignals & KCTSChanged )
|
|
345 |
{
|
|
346 |
FTRACE(FPrint( _L("CDunSignalCopy::ManageSignalChangeDownstream() checking CTS..." ) ));
|
|
347 |
if ( iSignals & KSignalCTS ) // CTS changed to high or initially high
|
|
348 |
{
|
|
349 |
ChangeDownstreamSignal( KSignalCTS, 0 );
|
|
350 |
FTRACE(FPrint( _L("CDunSignalCopy::ManageSignalChangeDownstream() CTS changed high" ) ));
|
|
351 |
}
|
|
352 |
else // CTS changed to low
|
|
353 |
{
|
|
354 |
ChangeDownstreamSignal( 0, KSignalCTS );
|
|
355 |
FTRACE(FPrint( _L("CDunSignalCopy::ManageSignalChangeDownstream() CTS changed low" ) ));
|
|
356 |
}
|
|
357 |
}
|
|
358 |
if ( iSignals & KDSRChanged )
|
|
359 |
{
|
|
360 |
FTRACE(FPrint( _L("CDunSignalCopy::ManageSignalChangeDownstream() checking DSR..." ) ));
|
|
361 |
if ( iSignals & KSignalDSR ) // DSR changed to high
|
|
362 |
{
|
|
363 |
ChangeDownstreamSignal( KSignalDSR, 0 );
|
|
364 |
FTRACE(FPrint( _L("CDunSignalCopy::ManageSignalChangeDownstream() DSR changed high" ) ));
|
|
365 |
}
|
|
366 |
else // DSR changed to low
|
|
367 |
{
|
|
368 |
ChangeDownstreamSignal( 0, KSignalDSR );
|
|
369 |
FTRACE(FPrint( _L("CDunSignalCopy::ManageSignalChangeDownstream() DSR changed low" ) ));
|
|
370 |
}
|
|
371 |
}
|
|
372 |
if ( iSignals & KDCDChanged )
|
|
373 |
{
|
|
374 |
FTRACE(FPrint( _L("CDunSignalCopy::ManageSignalChangeDownstream() checking DCD..." ) ));
|
|
375 |
if ( iSignals & KSignalDCD ) // DCD changed to high
|
|
376 |
{
|
|
377 |
ChangeDownstreamSignal( KSignalDCD, 0 );
|
|
378 |
FTRACE(FPrint( _L("CDunSignalCopy::ManageSignalChangeDownstream() DCD changed high" ) ));
|
|
379 |
}
|
|
380 |
else // DCD changed to low
|
|
381 |
{
|
|
382 |
ChangeDownstreamSignal( 0, KSignalDCD );
|
|
383 |
FTRACE(FPrint( _L("CDunSignalCopy::ManageSignalChangeDownstream() DCD changed low" ) ));
|
|
384 |
}
|
|
385 |
}
|
|
386 |
if ( iSignals & KRNGChanged )
|
|
387 |
{
|
|
388 |
FTRACE(FPrint( _L("CDunSignalCopy::ManageSignalChangeDownstream() checking RNG..." ) ));
|
|
389 |
if ( iSignals & KSignalRNG ) // RNG changed to high
|
|
390 |
{
|
|
391 |
ChangeDownstreamSignal( KSignalRNG, 0 );
|
|
392 |
FTRACE(FPrint( _L("CDunSignalCopy::ManageSignalChangeDownstream() RNG changed high" ) ));
|
|
393 |
}
|
|
394 |
else // RNG changed to low
|
|
395 |
{
|
|
396 |
ChangeDownstreamSignal( 0, KSignalRNG );
|
|
397 |
FTRACE(FPrint( _L("CDunSignalCopy::ManageSignalChangeDownstream() RNG changed low" ) ));
|
|
398 |
}
|
|
399 |
}
|
|
400 |
IssueRequest();
|
|
401 |
FTRACE(FPrint( _L("CDunSignalCopy::ManageSignalChangeDownstream() complete" ) ));
|
|
402 |
}
|
|
403 |
|
|
404 |
// ---------------------------------------------------------------------------
|
|
405 |
// Changes upstream signal
|
|
406 |
// ---------------------------------------------------------------------------
|
|
407 |
//
|
|
408 |
void CDunSignalCopy::ChangeUpstreamSignal( TUint aSetMask, TUint aClearMask )
|
|
409 |
{
|
|
410 |
FTRACE(FPrint( _L("CDunSignalCopy::ChangeUpstreamSignal()" ) ));
|
|
411 |
if ( iNetwork )
|
|
412 |
{
|
|
413 |
iNetwork->SetSignals( aSetMask, aClearMask );
|
|
414 |
}
|
|
415 |
// Add other cases here if necessary
|
|
416 |
FTRACE(FPrint( _L("CDunSignalCopy::ChangeUpstreamSignal() complete" ) ));
|
|
417 |
}
|
|
418 |
|
|
419 |
// ---------------------------------------------------------------------------
|
|
420 |
// Changes downstream signal
|
|
421 |
// ---------------------------------------------------------------------------
|
|
422 |
//
|
|
423 |
void CDunSignalCopy::ChangeDownstreamSignal( TUint aSetMask, TUint aClearMask )
|
|
424 |
{
|
|
425 |
FTRACE(FPrint( _L("CDunSignalCopy::ChangeDownstreamSignal()" ) ));
|
|
426 |
if ( iComm )
|
|
427 |
{
|
|
428 |
iComm->SetSignals( aSetMask, aClearMask );
|
|
429 |
}
|
|
430 |
// Add other cases here if necessary
|
|
431 |
FTRACE(FPrint( _L("CDunSignalCopy::ChangeDownstreamSignal() complete" ) ));
|
|
432 |
}
|
|
433 |
|
|
434 |
// ---------------------------------------------------------------------------
|
|
435 |
// From class CActive.
|
|
436 |
// Gets called when line status changes
|
|
437 |
// ---------------------------------------------------------------------------
|
|
438 |
//
|
|
439 |
void CDunSignalCopy::RunL()
|
|
440 |
{
|
|
441 |
FTRACE(FPrint( _L("CDunSignalCopy::RunL()" ) ));
|
|
442 |
iSignalCopyState = EDunStateIdle;
|
|
443 |
TInt retTemp = iStatus.Int();
|
|
444 |
if ( retTemp != KErrNone )
|
|
445 |
{
|
|
446 |
FTRACE(FPrint( _L("CDunSignalCopy::RunL() (failed) complete (%d)"), retTemp));
|
|
447 |
TInt i;
|
|
448 |
TInt count = iCallbacks.Count();
|
|
449 |
TDunConnectionReason connReason;
|
|
450 |
connReason.iReasonType = EDunReasonTypeRunL;
|
|
451 |
connReason.iContext = iContextInUse;
|
|
452 |
connReason.iSignalType = 0;
|
|
453 |
connReason.iSignalHigh = EFalse;
|
|
454 |
connReason.iDirection = EDunDirectionUndefined;
|
|
455 |
connReason.iErrorCode = retTemp;
|
|
456 |
for ( i=0; i<count; i++ )
|
|
457 |
{
|
|
458 |
TRAP_IGNORE(
|
|
459 |
iCallbacks[i]->NotifyProgressChangeL( iComm, connReason ) );
|
|
460 |
}
|
|
461 |
return;
|
|
462 |
}
|
|
463 |
FTRACE(FPrint( _L("CDunSignalCopy::RunL() managing signal 0x%08X" ), iSignals ));
|
|
464 |
ManageSignalChange();
|
|
465 |
FTRACE(FPrint( _L("CDunSignalCopy::RunL() complete" ) ));
|
|
466 |
}
|
|
467 |
|
|
468 |
// ---------------------------------------------------------------------------
|
|
469 |
// From class CActive.
|
|
470 |
// Gets called on cancel
|
|
471 |
// ---------------------------------------------------------------------------
|
|
472 |
//
|
|
473 |
void CDunSignalCopy::DoCancel()
|
|
474 |
{
|
|
475 |
}
|