1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
9 // Nokia Corporation - initial contribution. |
9 // Nokia Corporation - initial contribution. |
10 // |
10 // |
11 // Contributors: |
11 // Contributors: |
12 // |
12 // |
13 // Description: |
13 // Description: |
14 // Name : strtsecuritynotecontroller.cpp |
|
15 // Part of : System Startup / StrtSecObs |
|
16 // Implementation of CStrtSecurityNoteController class |
14 // Implementation of CStrtSecurityNoteController class |
17 // Version : %version: 1 % << Don't touch! Updated by Synergy at check-out. |
|
18 // This material, including documentation and any related computer |
|
19 // programs, is protected by copyright controlled by Nokia. All |
|
20 // rights are reserved. Copying, including reproducing, storing, |
|
21 // adapting or translating, any or all of this material requires the |
|
22 // prior written consent of Nokia. This material also contains |
|
23 // confidential information which may not be disclosed to others |
|
24 // without the prior written consent of Nokia. |
|
25 // Template version: 4.1.1 |
|
26 // Nokia Core OS * |
|
27 // File renamed from strtsecuritynotecontroller.cpp to ssmsecuritynotecontroller.cpp as part of Core OS transfer. |
|
28 // |
15 // |
29 |
16 |
30 |
17 |
31 |
18 |
32 #include "strtsecnoterequestqueue.h" |
19 #include "strtsecnoterequestqueue.h" |
33 #include "ssmsecuritynotecontroller.h" |
20 #include "ssmsecuritynotecontroller.h" |
34 #include "ssmsecuritychecknotifier.h" |
21 #include "ssmsecuritychecknotifier.h" |
35 #include "ssmdebug.h" |
22 #include "ssmdebug.h" |
|
23 #include "ssmpanic.h" |
|
24 #include <ssm/ssmstatemanager.h> |
|
25 #include <ssm/startupreason.h> |
36 |
26 |
37 CStrtSecurityNoteController* CStrtSecurityNoteController::NewL() |
27 CStrtSecurityNoteController* CStrtSecurityNoteController::NewL() |
38 { |
28 { |
39 CStrtSecurityNoteController* self = new( ELeave ) CStrtSecurityNoteController; |
29 CStrtSecurityNoteController* self = new( ELeave ) CStrtSecurityNoteController; |
40 CleanupStack::PushL( self ); |
30 CleanupStack::PushL( self ); |
87 { |
77 { |
88 iSecurityNote->ShowNoteL(code, iStatus ); |
78 iSecurityNote->ShowNoteL(code, iStatus ); |
89 SetActive(); |
79 SetActive(); |
90 } |
80 } |
91 } |
81 } |
|
82 #ifdef _DEBUG |
|
83 TInt CStrtSecurityNoteController::RunError(TInt aError) |
|
84 #else |
|
85 TInt CStrtSecurityNoteController::RunError(TInt) |
|
86 #endif // _DEBUG |
|
87 { |
|
88 DEBUGPRINT2A("CStrtSecurityNoteController RunL completed with error %d", aError); |
|
89 #ifdef _DEBUG |
|
90 PanicNow(KPanicSecurityNoteController, aError); |
|
91 #else |
|
92 RSsmStateManager session; |
|
93 TInt errorCode = session.Connect(); |
|
94 if ( KErrNone == errorCode ) |
|
95 { |
|
96 TSsmStateTransition stateinfo( ESsmShutdown, KSsmAnySubState, EUnknownReset ); |
|
97 errorCode = session.RequestStateTransition( stateinfo ); |
|
98 if( KErrNone != errorCode ) |
|
99 { |
|
100 PanicNow(KPanicSecurityNoteController, errorCode); |
|
101 } |
|
102 session.Close(); |
|
103 } |
|
104 else |
|
105 { |
|
106 PanicNow(KPanicSecurityNoteController, errorCode); |
|
107 } |
|
108 #endif //_DEBUG |
|
109 |
|
110 return KErrNone; |
|
111 } |
92 |
112 |
93 CStrtSecurityNoteController::CStrtSecurityNoteController() |
113 CStrtSecurityNoteController::CStrtSecurityNoteController() |
94 : CActive( EPriorityStandard ), |
114 : CActive( EPriorityStandard ), |
95 iQueue( NULL ), |
115 iQueue( NULL ), |
96 iSecurityNote( NULL ) |
116 iSecurityNote( NULL ) |