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". |
14 // |
14 // |
15 |
15 |
16 #include <ssm/ssmstates.hrh> |
16 #include <ssm/ssmstates.hrh> |
17 #include <ssm/ssmstatetransition.h> |
17 #include <ssm/ssmstatetransition.h> |
18 #include <ssm/ssmstatepolicy.h> |
18 #include <ssm/ssmstatepolicy.h> |
|
19 #include <ssm/ssmuiproviderdll.h> |
19 |
20 |
20 #include "ssmserverpanic.h" |
21 #include "ssmserverpanic.h" |
21 #include "ssmserver.h" |
22 #include "ssmserver.h" |
22 #include "ssmsession.h" |
23 #include "ssmsession.h" |
23 #include "ssmclisrv.h" |
24 #include "ssmclisrv.h" |
27 #include "ssmstatepolicyresolverproxy.h" |
28 #include "ssmstatepolicyresolverproxy.h" |
28 #include "ssmstatetransitionrequest.h" |
29 #include "ssmstatetransitionrequest.h" |
29 #include "ssmstatepolicyframe.h" |
30 #include "ssmstatepolicyframe.h" |
30 #include "ssmswppolicyresolver.h" |
31 #include "ssmswppolicyresolver.h" |
31 #include "ssmswprequesthandler.h" |
32 #include "ssmswprequesthandler.h" |
|
33 #include "ssmdebug.h" |
32 |
34 |
33 // ------------------- Policy Server Security Setup ---------------------- |
35 // ------------------- Policy Server Security Setup ---------------------- |
34 |
36 |
35 const TUint KRangeCount = 3; |
37 const TUint KRangeCount = 3; |
36 const TInt KRanges[KRangeCount] = |
38 const TInt KRanges[KRangeCount] = |
132 void CSsmServer::ConstructL(TUint16 aInitialState, TValidation aSetting) |
138 void CSsmServer::ConstructL(TUint16 aInitialState, TValidation aSetting) |
133 { |
139 { |
134 __ASSERT_ALWAYS( KErrNone == User::SetCritical(User::ESystemCritical), PanicNow(KPanicSysStateMgr,ESsmServerError1)); |
140 __ASSERT_ALWAYS( KErrNone == User::SetCritical(User::ESystemCritical), PanicNow(KPanicSysStateMgr,ESsmServerError1)); |
135 __ASSERT_ALWAYS( KErrNone == User::RenameThread(KSsmServerName), PanicNow(KPanicSysStateMgr,ESsmServerError2)); |
141 __ASSERT_ALWAYS( KErrNone == User::RenameThread(KSsmServerName), PanicNow(KPanicSysStateMgr,ESsmServerError2)); |
136 |
142 |
|
143 iSsmUiSpecific = CSsmUiSpecific::InstanceL(); |
|
144 //Reserve memory for critical operation especially when phone memory will be full |
|
145 TInt err = iSsmUiSpecific->ReservePhoneMemorySpace(); |
|
146 DEBUGPRINT2(_L("CSsmUiSpecific::ReservePhoneMemorySpace returned with = %d"), err); |
137 // --- Instantiate the "System State" handling classes --- |
147 // --- Instantiate the "System State" handling classes --- |
138 // Create a state policy resolver and load the initial policy |
148 // Create a state policy resolver and load the initial policy |
139 CSsmStatePolicyResolver* stateResolver = CSsmStatePolicyResolver::NewLC(); |
149 CSsmStatePolicyResolver* stateResolver = CSsmStatePolicyResolver::NewLC(); |
140 const TSsmState initalState = TSsmState(aInitialState, KSsmAnySubState); |
150 const TSsmState initalState = TSsmState(aInitialState, KSsmAnySubState); |
141 stateResolver->GetStatePolicyL(initalState); |
151 stateResolver->GetStatePolicyL(initalState); |