|
1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #include <e32base.h> |
|
17 #include <startup.hrh> |
|
18 #include "StartupStateObserverObject.h" |
|
19 |
|
20 CStartupStateObserver::CStartupStateObserver() |
|
21 :CBase(), iState(SsoUndefined) |
|
22 { |
|
23 } |
|
24 |
|
25 CStartupStateObserver::~CStartupStateObserver() |
|
26 { |
|
27 } |
|
28 |
|
29 CStartupStateObserver* CStartupStateObserver::NewL() |
|
30 { |
|
31 CStartupStateObserver* self = CStartupStateObserver::NewLC(); |
|
32 CleanupStack::Pop(self); |
|
33 |
|
34 return self; |
|
35 } |
|
36 |
|
37 CStartupStateObserver* CStartupStateObserver::NewLC() |
|
38 { |
|
39 CStartupStateObserver* self = new(ELeave) CStartupStateObserver; |
|
40 CleanupStack::PushL(self); |
|
41 self->Construct(); |
|
42 |
|
43 return self; |
|
44 } |
|
45 |
|
46 |
|
47 void CStartupStateObserver::Construct() |
|
48 { |
|
49 InitialiseEvent(); |
|
50 } |
|
51 |
|
52 |
|
53 void CStartupStateObserver::InitialiseEvent() |
|
54 { |
|
55 iState = SsoNoPluginsInternalized; |
|
56 } |
|
57 |
|
58 void CStartupStateObserver::ProcessSSAEventL(TStartupStateIdentifier aKnownState) |
|
59 { |
|
60 if(iState == SsoNoPluginsInternalized) |
|
61 { |
|
62 if(aKnownState == EStartupStateCriticalStatic) |
|
63 { |
|
64 iState = SsoCriticalPlugingsInternalized; |
|
65 } |
|
66 else if(aKnownState == EStartupStateNonCritical) |
|
67 { |
|
68 iState = SsoAllPluginsInternalized; |
|
69 } |
|
70 } |
|
71 else if(iState == SsoCriticalPlugingsInternalized && |
|
72 aKnownState == EStartupStateNonCritical) |
|
73 { |
|
74 iState = SsoAllPluginsInternalized; |
|
75 } |
|
76 } |
|
77 |
|
78 CStartupStateObserver::TSsoState CStartupStateObserver::GetState() |
|
79 { |
|
80 return iState; |
|
81 } |
|
82 |
|
83 void CStartupStateObserver::SetState(CStartupStateObserver::TSsoState aState) |
|
84 { |
|
85 iState = aState; |
|
86 } |