|
1 /* |
|
2 * Copyright (c) 2002 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: API for managing PIN |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 //INCLUDES |
|
20 #include "WimPin.h" |
|
21 #include "WimMgmt.h" |
|
22 #include "WimTrace.h" |
|
23 #include <mctauthobject.h> |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 // ================= MEMBER FUNCTIONS for CWimPin======================= |
|
30 // |
|
31 // C++ default constructor. Initialize the member variables |
|
32 // |
|
33 // |
|
34 CWimPin::CWimPin( TWimPin aPin, TPinAddress aPinAddr ) |
|
35 :CActive( EPriorityStandard ), iReference( aPinAddr ), iPinType( aPin ) |
|
36 { |
|
37 } |
|
38 |
|
39 |
|
40 // ----------------------------------------------------------------------------- |
|
41 //CWimPin::NewL() |
|
42 //Two phased construction |
|
43 // ----------------------------------------------------------------------------- |
|
44 // |
|
45 EXPORT_C CWimPin* CWimPin::NewL( TWimPin aPin, |
|
46 const TPinAddress aPinAddr, |
|
47 TDesC& aTokenLabel ) |
|
48 { |
|
49 _WIMTRACE ( _L( "CWimPin::NewL()" ) ); |
|
50 __ASSERT_ALWAYS( aPinAddr, User::Leave( KErrArgument ) ); |
|
51 CWimPin* self = new( ELeave ) CWimPin( aPin, aPinAddr ); |
|
52 CleanupStack::PushL( self ); |
|
53 self->ConstructL( aTokenLabel ); |
|
54 CleanupStack::Pop( self ); |
|
55 return self; |
|
56 } |
|
57 |
|
58 |
|
59 // ----------------------------------------------------------------------------- |
|
60 // CWimPin::ConstructL() |
|
61 // ConstructL -this method can leave |
|
62 // ----------------------------------------------------------------------------- |
|
63 // |
|
64 void CWimPin::ConstructL( const TDesC& aTokenLabel ) |
|
65 { |
|
66 _WIMTRACE ( _L( "CWimPin::ConstructL()" ) ); |
|
67 CActiveScheduler::Add( this ); |
|
68 iTokenLabel = aTokenLabel.AllocL(); |
|
69 iLabel = HBufC::NewL( KLabelLen ); |
|
70 } |
|
71 |
|
72 // ----------------------------------------------------------------------------- |
|
73 // CWimPin::~CWimPin() |
|
74 // Destructor, allocated memory is released. |
|
75 // ----------------------------------------------------------------------------- |
|
76 // |
|
77 EXPORT_C CWimPin::~CWimPin() |
|
78 { |
|
79 _WIMTRACE ( _L( "CWimPin::~CWimPin()" ) ); |
|
80 Cancel(); |
|
81 delete iLabel; |
|
82 delete iTokenLabel; |
|
83 } |
|
84 |
|
85 // ----------------------------------------------------------------------------- |
|
86 // CWimPin::EnablePinQuery() |
|
87 // Enables PIN query of the PIN |
|
88 // ----------------------------------------------------------------------------- |
|
89 // |
|
90 EXPORT_C void CWimPin::EnablePinQuery( TRequestStatus& aStatus ) |
|
91 { |
|
92 _WIMTRACE ( _L( "CWimPin::EnablePinQuery()" ) ); |
|
93 |
|
94 iClientStatus = &aStatus; |
|
95 aStatus = KRequestPending; |
|
96 |
|
97 iPhase = EEnablePinQueryStart; |
|
98 SignalOwnStatusAndComplete(); |
|
99 } |
|
100 |
|
101 // ----------------------------------------------------------------------------- |
|
102 // CWimPin::CancelEnablePinQuery() |
|
103 // Cancel Enables PIN query of the PIN |
|
104 // ----------------------------------------------------------------------------- |
|
105 // |
|
106 EXPORT_C void CWimPin::CancelEnablePinQuery() |
|
107 { |
|
108 _WIMTRACE ( _L( "CWimPin::CancelEnablePinQuery()" ) ); |
|
109 |
|
110 if( IsActive() ) |
|
111 { |
|
112 Cancel(); |
|
113 } |
|
114 } |
|
115 |
|
116 // ----------------------------------------------------------------------------- |
|
117 // CWimPin::DisablePinQuery() |
|
118 // Disables PIN query of the PIN |
|
119 // ----------------------------------------------------------------------------- |
|
120 // |
|
121 EXPORT_C void CWimPin::DisablePinQuery( TRequestStatus& aStatus ) |
|
122 { |
|
123 _WIMTRACE ( _L( "CWimPin::DisablePinQuery()" ) ); |
|
124 |
|
125 iClientStatus = &aStatus; |
|
126 aStatus = KRequestPending; |
|
127 |
|
128 iPhase = EDisablePinQueryStart; |
|
129 SignalOwnStatusAndComplete(); |
|
130 |
|
131 } |
|
132 |
|
133 // ----------------------------------------------------------------------------- |
|
134 // CWimPin::CancelDisablePinQuery() |
|
135 // Cancel Disables PIN query of the PIN |
|
136 // ----------------------------------------------------------------------------- |
|
137 // |
|
138 EXPORT_C void CWimPin::CancelDisablePinQuery() |
|
139 { |
|
140 _WIMTRACE ( _L( "CWimPin::CancelDisablePinQuery()" ) ); |
|
141 |
|
142 if( IsActive() ) |
|
143 { |
|
144 Cancel(); |
|
145 } |
|
146 } |
|
147 |
|
148 // ----------------------------------------------------------------------------- |
|
149 // CWimPin::ChangePin() |
|
150 // Changes PIN |
|
151 // ----------------------------------------------------------------------------- |
|
152 // |
|
153 EXPORT_C void CWimPin::ChangePin( TRequestStatus& aStatus ) |
|
154 { |
|
155 _WIMTRACE ( _L( "CWimPin::ChangePin()" ) ); |
|
156 iClientStatus = &aStatus; |
|
157 aStatus = KRequestPending; |
|
158 |
|
159 iPhase = EChangePinStart; |
|
160 SignalOwnStatusAndComplete(); |
|
161 } |
|
162 |
|
163 // ----------------------------------------------------------------------------- |
|
164 // CWimPin::CancelChangePin() |
|
165 // Cancel Changes PIN |
|
166 // ----------------------------------------------------------------------------- |
|
167 // |
|
168 EXPORT_C void CWimPin::CancelChangePin() |
|
169 { |
|
170 _WIMTRACE ( _L( "CWimPin::CancelChangePin()" ) ); |
|
171 if( IsActive() ) |
|
172 { |
|
173 Cancel(); |
|
174 } |
|
175 } |
|
176 // ----------------------------------------------------------------------------- |
|
177 // CWimPin::UnblockPin() |
|
178 // Unblocks PIN |
|
179 // ----------------------------------------------------------------------------- |
|
180 // |
|
181 EXPORT_C void CWimPin::UnblockPin( TRequestStatus& aStatus ) |
|
182 { |
|
183 _WIMTRACE ( _L( "CWimPin::UnblockPin()" ) ); |
|
184 |
|
185 iClientStatus = &aStatus; |
|
186 aStatus = KRequestPending; |
|
187 |
|
188 iPhase = EUnblockPinStart; |
|
189 SignalOwnStatusAndComplete(); |
|
190 |
|
191 } |
|
192 |
|
193 // ----------------------------------------------------------------------------- |
|
194 // CWimPin::CancelUnblockPin() |
|
195 // Cancel Unblocks PIN |
|
196 // ----------------------------------------------------------------------------- |
|
197 // |
|
198 EXPORT_C void CWimPin:: CancelUnblockPin() |
|
199 { |
|
200 _WIMTRACE ( _L( "CWimPin::CancelUnblockPin()" ) ); |
|
201 |
|
202 if( IsActive() ) |
|
203 { |
|
204 Cancel(); |
|
205 } |
|
206 |
|
207 } |
|
208 |
|
209 // ----------------------------------------------------------------------------- |
|
210 // CWimPin::VerifyPin() |
|
211 // Verifies the entered PIN request. |
|
212 // ----------------------------------------------------------------------------- |
|
213 // |
|
214 EXPORT_C void CWimPin::VerifyPin( TRequestStatus& aStatus ) |
|
215 { |
|
216 _WIMTRACE ( _L( "CWimPin::VerifyPin()" ) ); |
|
217 |
|
218 iClientStatus = &aStatus; |
|
219 aStatus = KRequestPending; |
|
220 iPhase = EVerifyPinStart; |
|
221 SignalOwnStatusAndComplete(); |
|
222 |
|
223 } |
|
224 |
|
225 // ----------------------------------------------------------------------------- |
|
226 // CWimPin::CancelVerifyPin() |
|
227 // Cancel Verifies the entered PIN request. |
|
228 // ----------------------------------------------------------------------------- |
|
229 // |
|
230 EXPORT_C void CWimPin::CancelVerifyPin() |
|
231 { |
|
232 _WIMTRACE ( _L( "CWimPin::CancelVerifyPin()" ) ); |
|
233 |
|
234 if( IsActive() ) |
|
235 { |
|
236 Cancel(); |
|
237 } |
|
238 |
|
239 } |
|
240 |
|
241 // ----------------------------------------------------------------------------- |
|
242 // CWimPin::Label |
|
243 // Returns PIN's label. |
|
244 // ----------------------------------------------------------------------------- |
|
245 // |
|
246 EXPORT_C TPtrC CWimPin::Label() |
|
247 { |
|
248 _WIMTRACE ( _L( "CWimPin::Label()" ) ); |
|
249 return iLabel->Des(); |
|
250 } |
|
251 |
|
252 |
|
253 // ----------------------------------------------------------------------------- |
|
254 // CWimPin::PinStatus() |
|
255 // returns the status of PIN. |
|
256 // ----------------------------------------------------------------------------- |
|
257 // |
|
258 EXPORT_C TWimPinStatus CWimPin::PinStatus() |
|
259 { |
|
260 _WIMTRACE ( _L( "CWimPin::PinStatus()" ) ); |
|
261 return iPinStatus; |
|
262 } |
|
263 |
|
264 // ----------------------------------------------------------------------------- |
|
265 // CWimPin::PinNumber() |
|
266 // returns the number of the PIN. It can be 0,1,2.... |
|
267 // ----------------------------------------------------------------------------- |
|
268 // |
|
269 EXPORT_C TUint8 CWimPin::PinNumber() |
|
270 { |
|
271 _WIMTRACE ( _L( "CWimPin::PinNumber()" ) ); |
|
272 return iPinNumber; |
|
273 } |
|
274 |
|
275 // ----------------------------------------------------------------------------- |
|
276 // CWimPin::RunL() |
|
277 // Different phases are handled here |
|
278 // iPhase = EEnablePinQueryStart: Sends enable PIN query message to server. |
|
279 // iPhase = EEnablePinQueryEnd: Deallocates pckgbuffer used for message sending |
|
280 // and completes request with received error code. |
|
281 // iPhase = EDisablePinQueryStart: Sends disable PIN query message to server. |
|
282 // iPhase = EDisablePinQueryEnd: Deallocates pckgbuffer used for message sending |
|
283 // and completes request with received error code. |
|
284 // iPhase = EChangePinStart: Sends change PIN message to server. |
|
285 // iPhase = EChangePinEnd: Dealloactes pckgbuffer used for message sending and |
|
286 // completes request with received error code. |
|
287 // iPhase = EUnblockPinStart: Sends unblock PIN message to server |
|
288 // iPhase = EUnblockPinEnd: Deallocates pckgbuffer used for message sending |
|
289 // and completes request with received error code. |
|
290 // iPhase = EVerifyPinStart: Sends verify PIN message to server. |
|
291 // iPhase = EVerifyPinEnd:Deallocates pckgbuffer used for message sending |
|
292 // and completes request with received error code. |
|
293 // ----------------------------------------------------------------------------- |
|
294 // |
|
295 void CWimPin::RunL() |
|
296 { |
|
297 _WIMTRACE ( _L( "CWimPin::RunL Start()" ) ); |
|
298 if( iStatus.Int() == KErrCancel ) |
|
299 { |
|
300 User::RequestComplete( iClientStatus, KErrCancel ); |
|
301 return; |
|
302 } |
|
303 |
|
304 switch( iPhase ) |
|
305 { |
|
306 case EEnablePinQueryStart: |
|
307 { |
|
308 _WIMTRACE ( _L( "CWimPin::RunL EEnablePinQueryStart" ) ); |
|
309 iCurrentPhase = EEnablePinQueryStart; |
|
310 |
|
311 PinParams( iPinParams ); |
|
312 iPinStateRequest.iEnable = ETrue; //Enable PIN query |
|
313 iClientSession->EnableDisablePinQueryL( iReference, |
|
314 iPinStateRequest, |
|
315 iPinParams, |
|
316 iStatus ); |
|
317 iPhase = EEnablePinQueryEnd; |
|
318 SetActive(); |
|
319 break; |
|
320 } |
|
321 case EEnablePinQueryEnd: |
|
322 { |
|
323 iCurrentPhase = EEnablePinQueryEnd; |
|
324 |
|
325 iClientSession->DeallocMemoryFromEnableDisablePinQuery(); |
|
326 |
|
327 iReceivedStatus = iStatus.Int(); |
|
328 iPhase = EUpdatePinStatus; |
|
329 SignalOwnStatusAndComplete(); |
|
330 break; |
|
331 } |
|
332 case EDisablePinQueryStart: |
|
333 { |
|
334 _WIMTRACE ( _L( "CWimPin::RunL EDisablePinQueryStart" ) ); |
|
335 iCurrentPhase = EDisablePinQueryStart; |
|
336 |
|
337 PinParams( iPinParams ); |
|
338 iPinStateRequest.iEnable = EFalse; //Disable PIN query |
|
339 iClientSession->EnableDisablePinQueryL( iReference, |
|
340 iPinStateRequest, |
|
341 iPinParams, |
|
342 iStatus ); |
|
343 iPhase = EDisablePinQueryEnd; |
|
344 SetActive(); |
|
345 break; |
|
346 } |
|
347 case EDisablePinQueryEnd: |
|
348 { |
|
349 |
|
350 iCurrentPhase = EDisablePinQueryEnd; |
|
351 |
|
352 iClientSession->DeallocMemoryFromEnableDisablePinQuery(); |
|
353 |
|
354 iReceivedStatus = iStatus.Int(); |
|
355 iPhase = EUpdatePinStatus; |
|
356 SignalOwnStatusAndComplete(); |
|
357 break; |
|
358 } |
|
359 case EChangePinStart: |
|
360 { |
|
361 _WIMTRACE ( _L( "CWimPin::RunL EChangePinStart" ) ); |
|
362 iCurrentPhase = EChangePinStart; |
|
363 |
|
364 |
|
365 PinParams( iPinParams ); |
|
366 iClientSession->PinOperationL( iReference, |
|
367 iPinParams, |
|
368 EChangePINReq, |
|
369 iStatus ); |
|
370 iPhase = EChangePinEnd; |
|
371 SetActive(); |
|
372 break; |
|
373 } |
|
374 case EChangePinEnd: |
|
375 { |
|
376 |
|
377 iCurrentPhase = EChangePinEnd; |
|
378 |
|
379 iClientSession->DeallocMemoryFromEnableDisablePinQuery(); |
|
380 |
|
381 iReceivedStatus = iStatus.Int(); |
|
382 iPhase = EUpdatePinStatus; |
|
383 SignalOwnStatusAndComplete(); |
|
384 break; |
|
385 } |
|
386 case EUnblockPinStart: |
|
387 { |
|
388 _WIMTRACE ( _L( "CWimPin::RunL EUnblockPinStart" ) ); |
|
389 iCurrentPhase = EUnblockPinStart; |
|
390 |
|
391 PinParams( iPinParams ); |
|
392 iClientSession->PinOperationL( iReference, |
|
393 iPinParams, |
|
394 EUnblockPinReq, |
|
395 iStatus ); |
|
396 iPhase = EUnblockPinEnd; |
|
397 SetActive(); |
|
398 break; |
|
399 } |
|
400 case EUnblockPinEnd: |
|
401 { |
|
402 |
|
403 iCurrentPhase = EUnblockPinEnd; |
|
404 |
|
405 iClientSession->DeallocMemoryFromEnableDisablePinQuery(); |
|
406 |
|
407 iReceivedStatus = iStatus.Int(); |
|
408 iPhase = EUpdatePinStatus; |
|
409 SignalOwnStatusAndComplete(); |
|
410 break; |
|
411 } |
|
412 case EVerifyPinStart: |
|
413 { |
|
414 _WIMTRACE ( _L( "CWimPin::RunL EVerfiyPinStart" ) ); |
|
415 iCurrentPhase = EVerifyPinStart; |
|
416 |
|
417 PinParams( iPinParams ); |
|
418 iClientSession->PinOperationL( iReference, |
|
419 iPinParams, |
|
420 EVerifyPinReq, |
|
421 iStatus ); |
|
422 iPhase = EVerifyPinEnd; |
|
423 SetActive(); |
|
424 break; |
|
425 } |
|
426 case EVerifyPinEnd: |
|
427 { |
|
428 |
|
429 iCurrentPhase = EVerifyPinEnd; |
|
430 |
|
431 iClientSession->DeallocMemoryFromEnableDisablePinQuery(); |
|
432 |
|
433 iReceivedStatus = iStatus.Int(); |
|
434 iPhase = EUpdatePinStatus; |
|
435 SignalOwnStatusAndComplete(); |
|
436 break; |
|
437 } |
|
438 case EUpdatePinStatus: |
|
439 { |
|
440 _WIMTRACE ( _L( "CWimPin::RunL EUpdatePinStatus" ) ); |
|
441 iCurrentPhase = EUpdatePinStatus; |
|
442 |
|
443 PinInfo( iStatus ); |
|
444 iPhase = EUpdatePinStatusDone; |
|
445 SetActive(); |
|
446 break; |
|
447 } |
|
448 case EUpdatePinStatusDone: |
|
449 { |
|
450 |
|
451 iCurrentPhase = EUpdatePinStatusDone; |
|
452 |
|
453 if ( iStatus.Int() == KErrNone ) |
|
454 { |
|
455 TPtr label = iLabel->Des(); |
|
456 label.Copy( iPinStruct.iLabel.Ptr(), iPinStruct.iLabel.Length() ); |
|
457 label.ZeroTerminate(); |
|
458 iPinStatus = iPinStruct.iStatus; |
|
459 iPinNumber = iPinStruct.iPinNumber; |
|
460 |
|
461 User::RequestComplete( iClientStatus, iReceivedStatus ); |
|
462 } |
|
463 else |
|
464 { |
|
465 User::RequestComplete( iClientStatus, iStatus.Int() ); |
|
466 } |
|
467 break; |
|
468 } |
|
469 default: |
|
470 { |
|
471 break; |
|
472 } |
|
473 } |
|
474 } |
|
475 |
|
476 // ----------------------------------------------------------------------------- |
|
477 // CWimPin::DoCancel() |
|
478 // Not supported |
|
479 // ----------------------------------------------------------------------------- |
|
480 void CWimPin::DoCancel() |
|
481 { |
|
482 switch( iCurrentPhase ) |
|
483 { |
|
484 case EVerifyPinStart: |
|
485 { |
|
486 iClientSession->CancelPinOperation( iReference, |
|
487 ECancelVerifyPin ); |
|
488 break; |
|
489 } |
|
490 case EEnablePinQueryStart: |
|
491 case EDisablePinQueryStart: |
|
492 { |
|
493 iClientSession->CancelEnableDisablePin( iReference ); |
|
494 break; |
|
495 } |
|
496 |
|
497 case EChangePinStart: |
|
498 { |
|
499 iClientSession->CancelPinOperation( iReference, |
|
500 ECancelChangePin ); |
|
501 break; |
|
502 } |
|
503 case EUnblockPinStart: |
|
504 { |
|
505 iClientSession->CancelPinOperation( iReference, |
|
506 ECancelUnblockPin ); |
|
507 break; |
|
508 } |
|
509 |
|
510 default: break; |
|
511 } |
|
512 |
|
513 User::RequestComplete( iClientStatus, KErrCancel ); |
|
514 } |
|
515 |
|
516 // ----------------------------------------------------------------------------- |
|
517 // CWimPin::RunError() |
|
518 // |
|
519 // The active scheduler calls this function if this active object's RunL() |
|
520 // function leaves. This gives this active object the opportunity to perform |
|
521 // any necessary cleanup. |
|
522 // After array's cleanup, complete request with received error code. |
|
523 // ----------------------------------------------------------------------------- |
|
524 TInt CWimPin::RunError( TInt aError ) |
|
525 { |
|
526 iClientSession->DeallocMemoryFromEnableDisablePinQuery(); |
|
527 User::RequestComplete( iClientStatus, aError ); |
|
528 return KErrNone; |
|
529 } |
|
530 |
|
531 // ----------------------------------------------------------------------------- |
|
532 // CWimPin::PinParams() |
|
533 // Constructs PIN -params and returns it |
|
534 // ----------------------------------------------------------------------------- |
|
535 void CWimPin::PinParams( TPINParams& aPinParams) |
|
536 { |
|
537 _WIMTRACE ( _L( "CWimPin::PinParams()" ) ); |
|
538 aPinParams.iMaxLength = KMaxPinLen; |
|
539 aPinParams.iMinLength = KMinPinLen; |
|
540 aPinParams.iPINLabel.Copy( *iLabel ); |
|
541 aPinParams.iTokenLabel.Copy( *iTokenLabel ); |
|
542 } |
|
543 |
|
544 |
|
545 // ----------------------------------------------------------------------------- |
|
546 // CWimPin::SignalOwnStatusAndComplete() |
|
547 // Sets own iStatus to KRequestPending, and signals it |
|
548 // with User::RequestComplete() -request. This gives change |
|
549 // active scheduler to run other active objects. After a quick |
|
550 // visit in active scheduler, signal returns to RunL() and starts next |
|
551 // phase of operation. |
|
552 // @return void |
|
553 // ----------------------------------------------------------------------------- |
|
554 void CWimPin::SignalOwnStatusAndComplete() |
|
555 { |
|
556 _WIMTRACE ( _L( "CWimPin::SignalOwnStatusAndComplete()" ) ); |
|
557 iStatus = KRequestPending; |
|
558 SetActive(); |
|
559 TRequestStatus* status = &iStatus; |
|
560 User::RequestComplete( status, KErrNone ); |
|
561 } |
|
562 |
|
563 // ----------------------------------------------------------------------------- |
|
564 // CWimPin::PINChangeable |
|
565 // Checks can you change the PIN number. |
|
566 // ----------------------------------------------------------------------------- |
|
567 // |
|
568 TBool CWimPin::PinChangeable() |
|
569 { |
|
570 _WIMTRACE ( _L( "CWimPin::PinChangeable()" ) ); |
|
571 return !( iPinStatus & EChangeDisabled ); |
|
572 } |
|
573 |
|
574 |
|
575 // ----------------------------------------------------------------------------- |
|
576 // CWimPin:::PinInfo() |
|
577 // Get PIN info. Gets always latest information from WIM. |
|
578 // ----------------------------------------------------------------------------- |
|
579 // |
|
580 void CWimPin::PinInfo( TRequestStatus& aStatus ) |
|
581 { |
|
582 _WIMTRACE ( _L( "CWimPin::GetPinInfo()" ) ); |
|
583 |
|
584 iPinStruct.iLabel.Delete( 0, KLabelLen ); |
|
585 iPinStruct.iStatus = 0; |
|
586 |
|
587 iClientSession->PINInfo( iReference, iPinStruct, aStatus ); |
|
588 |
|
589 } |
|
590 |
|
591 // ----------------------------------------------------------------------------- |
|
592 // CWimPin::SetClientSession() |
|
593 // Sets client session |
|
594 // ----------------------------------------------------------------------------- |
|
595 // |
|
596 void CWimPin::SetClientSession( RWimMgmt* aClientSession ) |
|
597 { |
|
598 _WIMTRACE ( _L( "CWimPin::SetClientSession()" ) ); |
|
599 iClientSession = aClientSession; |
|
600 } |
|
601 |
|
602 // ----------------------------------------------------------------------------- |
|
603 // CWimPin::SetLabel() |
|
604 // Sets label |
|
605 // ----------------------------------------------------------------------------- |
|
606 // |
|
607 void CWimPin::SetLabel( TBuf<KLabelLen>& aLabel ) |
|
608 { |
|
609 _WIMTRACE ( _L( "CWimPin::SetLabel()" ) ); |
|
610 TPtr label = iLabel->Des(); |
|
611 label.Copy( aLabel.Ptr(), aLabel.Length() ); |
|
612 label.ZeroTerminate(); |
|
613 } |
|
614 |
|
615 // ----------------------------------------------------------------------------- |
|
616 // CWimPin::SetPinStatus() |
|
617 // Sets Pin Status |
|
618 // ----------------------------------------------------------------------------- |
|
619 // |
|
620 void CWimPin::SetPinStatus( TWimPinStatus& aStatus ) |
|
621 { |
|
622 _WIMTRACE ( _L( "CWimPin::SetPinStatus()" ) ); |
|
623 iPinStatus = aStatus; |
|
624 } |
|
625 |
|
626 // ----------------------------------------------------------------------------- |
|
627 // CWimPin::SetPinNumber() |
|
628 // Sets pin number |
|
629 // ----------------------------------------------------------------------------- |
|
630 // |
|
631 void CWimPin::SetPinNumber( TUint8& aPinNumber ) |
|
632 { |
|
633 _WIMTRACE ( _L( "CWimPin::SetPinNumber()" ) ); |
|
634 iPinNumber = aPinNumber; |
|
635 } |