sysstatemgmt/systemstatereferenceplugins/clayer/src/ssmsecuritynotecontroller.cpp
equal
deleted
inserted
replaced
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". |
12 // |
12 // |
13 // Description: |
13 // Description: |
14 // Name : strtsecuritynotecontroller.cpp |
14 // Name : strtsecuritynotecontroller.cpp |
15 // Part of : System Startup / StrtSecObs |
15 // Part of : System Startup / StrtSecObs |
16 // Implementation of CStrtSecurityNoteController class |
16 // Implementation of CStrtSecurityNoteController class |
17 // Version : %version: 1 % << Don't touch! Updated by Synergy at check-out. |
17 // Version : %version: 2 % << Don't touch! Updated by Synergy at check-out. |
18 // This material, including documentation and any related computer |
18 // This material, including documentation and any related computer |
19 // programs, is protected by copyright controlled by Nokia. All |
19 // programs, is protected by copyright controlled by Nokia. All |
20 // rights are reserved. Copying, including reproducing, storing, |
20 // rights are reserved. Copying, including reproducing, storing, |
21 // adapting or translating, any or all of this material requires the |
21 // adapting or translating, any or all of this material requires the |
22 // prior written consent of Nokia. This material also contains |
22 // prior written consent of Nokia. This material also contains |
31 |
31 |
32 #include "strtsecnoterequestqueue.h" |
32 #include "strtsecnoterequestqueue.h" |
33 #include "ssmsecuritynotecontroller.h" |
33 #include "ssmsecuritynotecontroller.h" |
34 #include "ssmsecuritychecknotifier.h" |
34 #include "ssmsecuritychecknotifier.h" |
35 #include "ssmdebug.h" |
35 #include "ssmdebug.h" |
|
36 #include "ssmpanic.h" |
|
37 #include <ssm/ssmstatemanager.h> |
|
38 #include <ssm/startupreason.h> |
36 |
39 |
37 CStrtSecurityNoteController* CStrtSecurityNoteController::NewL() |
40 CStrtSecurityNoteController* CStrtSecurityNoteController::NewL() |
38 { |
41 { |
39 CStrtSecurityNoteController* self = new( ELeave ) CStrtSecurityNoteController; |
42 CStrtSecurityNoteController* self = new( ELeave ) CStrtSecurityNoteController; |
40 CleanupStack::PushL( self ); |
43 CleanupStack::PushL( self ); |
87 { |
90 { |
88 iSecurityNote->ShowNoteL(code, iStatus ); |
91 iSecurityNote->ShowNoteL(code, iStatus ); |
89 SetActive(); |
92 SetActive(); |
90 } |
93 } |
91 } |
94 } |
|
95 #ifdef _DEBUG |
|
96 TInt CStrtSecurityNoteController::RunError(TInt aError) |
|
97 #else |
|
98 TInt CStrtSecurityNoteController::RunError(TInt) |
|
99 #endif // _DEBUG |
|
100 { |
|
101 DEBUGPRINT2A("CStrtSecurityNoteController RunL completed with error %d", aError); |
|
102 #ifdef _DEBUG |
|
103 PanicNow(KPanicSecurityNoteController, aError); |
|
104 #else |
|
105 RSsmStateManager session; |
|
106 TInt errorCode = session.Connect(); |
|
107 if ( KErrNone == errorCode ) |
|
108 { |
|
109 TSsmStateTransition stateinfo( ESsmShutdown, KSsmAnySubState, EUnknownReset ); |
|
110 errorCode = session.RequestStateTransition( stateinfo ); |
|
111 if( KErrNone != errorCode ) |
|
112 { |
|
113 PanicNow(KPanicSecurityNoteController, errorCode); |
|
114 } |
|
115 session.Close(); |
|
116 } |
|
117 else |
|
118 { |
|
119 PanicNow(KPanicSecurityNoteController, errorCode); |
|
120 } |
|
121 #endif //_DEBUG |
|
122 |
|
123 return KErrNone; |
|
124 } |
92 |
125 |
93 CStrtSecurityNoteController::CStrtSecurityNoteController() |
126 CStrtSecurityNoteController::CStrtSecurityNoteController() |
94 : CActive( EPriorityStandard ), |
127 : CActive( EPriorityStandard ), |
95 iQueue( NULL ), |
128 iQueue( NULL ), |
96 iSecurityNote( NULL ) |
129 iSecurityNote( NULL ) |