|
1 /* |
|
2 * Copyright (c) 2002-2005 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 // INCLUDE FILES |
|
26 #include "sensecuritymechanismobserver.h" |
|
27 #include "senbaseidentitymanager.h" |
|
28 |
|
29 #include <flogger.h> |
|
30 #include "sendebug.h" |
|
31 #include "senlogger.h" |
|
32 |
|
33 // CONSTANTS |
|
34 namespace |
|
35 { |
|
36 } |
|
37 |
|
38 CSenSenSecurityMechanismObserver* CSenSenSecurityMechanismObserver::NewL( |
|
39 CSenBaseIdentityManager& aOwner) |
|
40 { |
|
41 CSenSenSecurityMechanismObserver* pNew = |
|
42 CSenSenSecurityMechanismObserver::NewLC(aOwner); |
|
43 CleanupStack::Pop(); |
|
44 return pNew; |
|
45 } |
|
46 |
|
47 CSenSenSecurityMechanismObserver* CSenSenSecurityMechanismObserver::NewLC( |
|
48 CSenBaseIdentityManager& aOwner) |
|
49 { |
|
50 CSenSenSecurityMechanismObserver* pNew = |
|
51 new (ELeave) CSenSenSecurityMechanismObserver(aOwner); |
|
52 CleanupStack::PushL(pNew); |
|
53 |
|
54 pNew->ConstructL(); |
|
55 return pNew; |
|
56 } |
|
57 |
|
58 CSenSenSecurityMechanismObserver::CSenSenSecurityMechanismObserver( |
|
59 CSenBaseIdentityManager& aOwner) |
|
60 : CActive(EPriorityStandard), |
|
61 iOwner(aOwner) |
|
62 { |
|
63 } |
|
64 |
|
65 void CSenSenSecurityMechanismObserver::ConstructL() |
|
66 { |
|
67 CActiveScheduler::Add(this); |
|
68 iEcomSession = REComSession::OpenL(); |
|
69 } |
|
70 |
|
71 CSenSenSecurityMechanismObserver::~CSenSenSecurityMechanismObserver() |
|
72 { |
|
73 iEcomSession.CancelNotifyOnChange(iStatus); |
|
74 Cancel(); |
|
75 iEcomSession.Close(); |
|
76 } |
|
77 |
|
78 void CSenSenSecurityMechanismObserver::RunL() |
|
79 { |
|
80 if (iStatus == KErrNone) |
|
81 { |
|
82 TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"CSenSenSecurityMechanismObserver::RunL"); |
|
83 TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"..calling IdentityManager.ReloadSenSecurityMechanismsL"); |
|
84 iOwner.ReloadSenSecurityMechanismsL(); |
|
85 iEcomSession.NotifyOnChange(iStatus); |
|
86 SetActive(); |
|
87 } |
|
88 } |
|
89 TInt CSenSenSecurityMechanismObserver::RunError(TInt /* aError */) |
|
90 { |
|
91 // if (aError != KErrNone) |
|
92 return KErrNone; |
|
93 } |
|
94 |
|
95 void CSenSenSecurityMechanismObserver::DoCancel() |
|
96 { |
|
97 TRequestStatus status; |
|
98 iEcomSession.CancelNotifyOnChange(status); |
|
99 } |
|
100 |
|
101 void CSenSenSecurityMechanismObserver::Start() |
|
102 { |
|
103 SetActive(); |
|
104 iEcomSession.NotifyOnChange(iStatus); |
|
105 } |
|
106 |
|
107 RFileLogger* CSenSenSecurityMechanismObserver::Log() |
|
108 { |
|
109 return iOwner.Log(); |
|
110 } |
|
111 |
|
112 namespace |
|
113 { |
|
114 } |
|
115 |
|
116 // End of File |