|
1 /* |
|
2 * Copyright (c) 2002-2007 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: Provides SAT SystemState objects outside of this DLL |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <startupdomainpskeys.h> |
|
20 #include <PSVariables.h> |
|
21 #include <activeidle2domainpskeys.h> |
|
22 #include <CommonEngineDomainCRKeys.h> |
|
23 #include <BTSapDomainPSKeys.h> |
|
24 #include <ProfileEngineSDKCRKeys.h> |
|
25 #include "TSatSystemStateFactory.h" |
|
26 #include "CSatSystemState.h" |
|
27 #include "msatmultimodeapi.h" |
|
28 #include "CSatPSChangeNotifier.h" |
|
29 #include "CSatCenRepChangeNotifier.h" |
|
30 #include "SatLog.h" |
|
31 |
|
32 |
|
33 // ======== MEMBER FUNCTIONS ======== |
|
34 |
|
35 // ----------------------------------------------------------------------------- |
|
36 // (other items were commented in a header). |
|
37 // ----------------------------------------------------------------------------- |
|
38 // |
|
39 EXPORT_C MSatSystemState* TSatSystemStateFactory::CreateSystemStateL( |
|
40 MSatMultiModeApi& aPhone ) |
|
41 { |
|
42 LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::CreateSystemStateL \ |
|
43 calling" ) |
|
44 |
|
45 MSatSystemState* systemState = CSatSystemState::NewL( aPhone ); |
|
46 |
|
47 LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::CreateSystemStateL \ |
|
48 exiting" ) |
|
49 return systemState; |
|
50 } |
|
51 |
|
52 // ----------------------------------------------------------------------------- |
|
53 // TSatSystemStateFactory::CreateIdleModeChangeNotifierL |
|
54 // ----------------------------------------------------------------------------- |
|
55 // |
|
56 EXPORT_C MSatSystemStateChangeNotifier* |
|
57 TSatSystemStateFactory::CreateIdleModeChangeNotifierL( |
|
58 MSatSystemStateObserver& aObserver ) |
|
59 { |
|
60 LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::\ |
|
61 CreateIdleModeChangeNotifierL calling" ) |
|
62 |
|
63 MSatSystemStateChangeNotifier* ret = CSatPSChangeNotifier::NewL( |
|
64 KPSUidAiInformation, |
|
65 KActiveIdleState, |
|
66 aObserver, |
|
67 EPSAiForeground ); |
|
68 |
|
69 LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::\ |
|
70 CreateIdleModeChangeNotifierL exiting" ) |
|
71 return ret; |
|
72 } |
|
73 |
|
74 // ----------------------------------------------------------------------------- |
|
75 // TSatSystemStateFactory::CreateSimStatusChangeNotifierL |
|
76 // ----------------------------------------------------------------------------- |
|
77 // |
|
78 EXPORT_C MSatSystemStateChangeNotifier* |
|
79 TSatSystemStateFactory::CreateSimStatusChangeNotifierL( |
|
80 MSatSystemStateObserver& aObserver ) |
|
81 { |
|
82 LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::\ |
|
83 CreateSimStatusChangeNotifierL calling" ) |
|
84 |
|
85 MSatSystemStateChangeNotifier* ret = CSatPSChangeNotifier::NewL( |
|
86 KPSUidStartup, |
|
87 KPSSimStatus, |
|
88 aObserver, |
|
89 ESimNotPresent ); |
|
90 |
|
91 LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::\ |
|
92 CreateSimStatusChangeNotifierL exiting" ) |
|
93 return ret; |
|
94 } |
|
95 |
|
96 // ----------------------------------------------------------------------------- |
|
97 // TSatSystemStateFactory::CreateSIMAccessProfileChangeNotifierL |
|
98 // ----------------------------------------------------------------------------- |
|
99 // |
|
100 EXPORT_C MSatSystemStateChangeNotifier* |
|
101 TSatSystemStateFactory::CreateSIMAccessProfileChangeNotifierL( |
|
102 MSatSystemStateObserver& aObserver ) |
|
103 { |
|
104 LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::\ |
|
105 CreateSIMAccessProfileChangeNotifier calling" ) |
|
106 |
|
107 MSatSystemStateChangeNotifier* ret = CSatPSChangeNotifier::NewL( |
|
108 KPSUidBluetoothSapConnectionState, |
|
109 KBTSapConnectionState, |
|
110 aObserver, |
|
111 KNotifyValueNotSet ); // No notify value specified |
|
112 |
|
113 LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::\ |
|
114 CreateSIMAccessProfileChangeNotifier exiting" ) |
|
115 return ret; |
|
116 } |
|
117 |
|
118 // ----------------------------------------------------------------------------- |
|
119 // TSatSystemStateFactory::CreateStartupChangeChangeNotifierL |
|
120 // ----------------------------------------------------------------------------- |
|
121 // |
|
122 EXPORT_C MSatSystemStateChangeNotifier* |
|
123 TSatSystemStateFactory::CreateStartupChangeNotifierL( |
|
124 MSatSystemStateObserver& aObserver ) |
|
125 { |
|
126 LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::\ |
|
127 CreateStartupChangeNotifierL calling" ) |
|
128 |
|
129 MSatSystemStateChangeNotifier* ret = CSatPSChangeNotifier::NewL( |
|
130 KPSUidStartup, |
|
131 KPSGlobalSystemState, |
|
132 aObserver, |
|
133 KNotifyValueNotSet ); |
|
134 |
|
135 LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::\ |
|
136 CreateStartupChangeNotifierL exiting" ) |
|
137 return ret; |
|
138 } |
|
139 |
|
140 // ----------------------------------------------------------------------------- |
|
141 // TSatSystemStateFactory::CreateLanguageSelectionChangeNotifierL |
|
142 // ----------------------------------------------------------------------------- |
|
143 // |
|
144 EXPORT_C MSatSystemStateChangeNotifier* |
|
145 TSatSystemStateFactory::CreateLanguageSelectionChangeNotifierL( |
|
146 MSatSystemStateObserver& aObserver ) |
|
147 { |
|
148 LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::\ |
|
149 CreateLanguageSelectionChangeNotifier calling" ) |
|
150 |
|
151 MSatSystemStateChangeNotifier* ret = CSatCenRepChangeNotifier::NewL( |
|
152 KCRUidCommonEngineKeys, |
|
153 KGSDisplayTxtLang, |
|
154 aObserver, |
|
155 CSatCenRepChangeNotifier::ECRTypeInteger ); |
|
156 |
|
157 LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::\ |
|
158 CreateLanguageSelectionChangeNotifier exiting" ) |
|
159 return ret; |
|
160 } |
|
161 |
|
162 // ----------------------------------------------------------------------------- |
|
163 // TSatSystemStateFactory::CreateProfileChangeNotifierL |
|
164 // ----------------------------------------------------------------------------- |
|
165 // |
|
166 EXPORT_C MSatSystemStateChangeNotifier* |
|
167 TSatSystemStateFactory::CreateProfileChangeNotifierL( |
|
168 MSatSystemStateObserver& aObserver ) |
|
169 { |
|
170 LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::\ |
|
171 CreateProfileChangeNotifierL calling" ) |
|
172 |
|
173 MSatSystemStateChangeNotifier* ret = CSatCenRepChangeNotifier::NewL( |
|
174 KCRUidProfileEngine, |
|
175 KProEngActiveProfile, |
|
176 aObserver, |
|
177 CSatCenRepChangeNotifier::ECRTypeInteger ); |
|
178 |
|
179 LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::\ |
|
180 CreateProfileChangeNotifierL exiting" ) |
|
181 return ret; |
|
182 } |