44
|
1 |
// Copyright (c) 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 |
// CLtsySecurityHandler
|
|
15 |
|
|
16 |
#include <ctsy/ltsy/cctsydispatchercallback.h>
|
|
17 |
#include <mmtsy_ipcdefs.h>
|
|
18 |
|
|
19 |
#include "cltsysecurityhandler.h"
|
|
20 |
#include <ctsy/ltsy/ltsylogger.h>
|
|
21 |
#include "ltsymacros.h"
|
|
22 |
|
|
23 |
|
|
24 |
|
|
25 |
CLtsySecurityHandler::CLtsySecurityHandler(
|
|
26 |
CCtsyDispatcherCallback& aCtsyDispatcherCallback)
|
|
27 |
: iCtsyDispatcherCallback(aCtsyDispatcherCallback)
|
|
28 |
{
|
|
29 |
}
|
|
30 |
|
|
31 |
|
|
32 |
CLtsySecurityHandler::~CLtsySecurityHandler()
|
|
33 |
{
|
|
34 |
}
|
|
35 |
|
|
36 |
|
|
37 |
CLtsySecurityHandler* CLtsySecurityHandler::NewLC(
|
|
38 |
CCtsyDispatcherCallback& aCtsyDispatcherCallback)
|
|
39 |
{
|
|
40 |
TSYLOGENTRYEXIT;
|
|
41 |
CLtsySecurityHandler* self = new (ELeave) CLtsySecurityHandler(aCtsyDispatcherCallback);
|
|
42 |
CleanupStack::PushL(self);
|
|
43 |
self->ConstructL();
|
|
44 |
return self;
|
|
45 |
}
|
|
46 |
|
|
47 |
|
|
48 |
CLtsySecurityHandler* CLtsySecurityHandler::NewL(CCtsyDispatcherCallback& aCtsyDispatcherCallback)
|
|
49 |
{
|
|
50 |
TSYLOGENTRYEXIT;
|
|
51 |
CLtsySecurityHandler* self=
|
|
52 |
CLtsySecurityHandler::NewLC(aCtsyDispatcherCallback);
|
|
53 |
CleanupStack::Pop(self);
|
|
54 |
return self;
|
|
55 |
}
|
|
56 |
|
|
57 |
|
|
58 |
void CLtsySecurityHandler::ConstructL()
|
|
59 |
/**
|
|
60 |
* Second phase constructor.
|
|
61 |
*/
|
|
62 |
{
|
|
63 |
TSYLOGENTRYEXIT;
|
|
64 |
|
|
65 |
|
|
66 |
} // CLtsySecurityHandler::ConstructL
|
|
67 |
|
|
68 |
TBool CLtsySecurityHandler::IsInterfaceSupported(TLtsyDispatchInterfaceApiId aDispatchApiId)
|
|
69 |
/**
|
|
70 |
* Returns whether a Dispatch Interface APi is supported or not.
|
|
71 |
*
|
|
72 |
* @param aDispatchApiId Id of Dispatch interface being queried
|
|
73 |
* @return indication whether interface is supported or not
|
|
74 |
*/
|
|
75 |
{
|
|
76 |
|
|
77 |
switch(aDispatchApiId)
|
|
78 |
{
|
|
79 |
// Insert ApiIds when support is provided in LTSY e.g.
|
|
80 |
// case MLtsyDispatchPhoneBootNotifySimStatusReady::KLtsyDispatchPhoneBootNotifySimStatusReadyApiId: return ETrue;
|
|
81 |
|
|
82 |
default:
|
|
83 |
return EFalse;
|
|
84 |
}
|
|
85 |
}
|
|
86 |
|
|
87 |
void CLtsySecurityHandler::IsCallbackIndicatorSupported(TLtsyDispatchIndIdGroup /*aIdGroup*/, TUint32& /*aIndIdBitMask*/)
|
|
88 |
/**
|
|
89 |
* Returns the set of callback indicators that are supported.
|
|
90 |
*
|
|
91 |
* @param aIdGroup ID of group that is being queried e.g. aIdGroup=EIndIdGroup1
|
|
92 |
* @param aIndIdBitMask [out] argument that should return a bitmask indicating which indicator callbacks are supported.
|
|
93 |
*/
|
|
94 |
{
|
|
95 |
|
|
96 |
//Create bitmask with bitset for each indicator ID that is supported. E.g.
|
|
97 |
/*
|
|
98 |
if(aIdGroup == EIndIdGroup1)
|
|
99 |
aIndIdBitMask = KLtsyDispatchPhoneNotifyNetworkModeChangeIndId |
|
|
100 |
KLtsyDispatchPhoneNotifyEgprsInfoChangeIndId |
|
|
101 |
KLtsyDispatchPhoneNotifySignalStrengthChangeIndId;
|
|
102 |
else
|
|
103 |
aIndIdBitMask = 0; //no indicators from other groups supported
|
|
104 |
*/
|
|
105 |
}
|
|
106 |
|
|
107 |
|
|
108 |
TInt CLtsySecurityHandler::HandleGetSecurityCodeInfoReqL(RMobilePhone::TMobilePhoneSecurityCode /*aSecCode*/)
|
|
109 |
/**
|
|
110 |
* This request is completed by invoking
|
|
111 |
* CCtsyDispatcherCallback::CallbackSecurityGetSecurityCodeInfoComp()
|
|
112 |
*
|
|
113 |
* @param aSecCode Security code.
|
|
114 |
*
|
|
115 |
* @return KErrNone on success, KErrNotSupported if this request is not supported,
|
|
116 |
* or another error code to indicate the failure otherwise.
|
|
117 |
*/
|
|
118 |
{
|
|
119 |
TSYLOGENTRYEXIT;
|
|
120 |
|
|
121 |
TInt ret = KErrNotSupported;
|
|
122 |
|
|
123 |
// TODO: Add implementation here.......
|
|
124 |
|
|
125 |
|
|
126 |
|
|
127 |
return TSYLOGSETEXITERR(ret);
|
|
128 |
} // CLtsySecurityHandler::HandleGetSecurityCodeInfoReqL
|
|
129 |
|
|
130 |
|
|
131 |
TInt CLtsySecurityHandler::HandleGetLockInfoReqL(RMobilePhone::TMobilePhoneLock /*aLockType*/)
|
|
132 |
/**
|
|
133 |
* This request is completed by invoking
|
|
134 |
* CCtsyDispatcherCallback::CallbackSecurityGetLockInfoComp()
|
|
135 |
*
|
|
136 |
* @param aLockType Phone lock type.
|
|
137 |
*
|
|
138 |
* @return KErrNone on success, KErrNotSupported if this request is not supported,
|
|
139 |
* or another error code to indicate the failure otherwise.
|
|
140 |
*/
|
|
141 |
{
|
|
142 |
TSYLOGENTRYEXIT;
|
|
143 |
|
|
144 |
TInt ret = KErrNotSupported;
|
|
145 |
|
|
146 |
// TODO: Add implementation here.......
|
|
147 |
|
|
148 |
|
|
149 |
|
|
150 |
return TSYLOGSETEXITERR(ret);
|
|
151 |
} // CLtsySecurityHandler::HandleGetLockInfoReqL
|
|
152 |
|
|
153 |
|
|
154 |
TInt CLtsySecurityHandler::HandleAbortSecurityCodeReqL(RMobilePhone::TMobilePhoneSecurityCode /*aSecCode*/)
|
|
155 |
/**
|
|
156 |
* This request is completed by invoking
|
|
157 |
* CCtsyDispatcherCallback::CallbackSecurityAbortSecurityCodeComp()
|
|
158 |
*
|
|
159 |
* @param aSecCode Security code.
|
|
160 |
*
|
|
161 |
* @return KErrNone on success, KErrNotSupported if this request is not supported,
|
|
162 |
* or another error code to indicate the failure otherwise.
|
|
163 |
*/
|
|
164 |
{
|
|
165 |
TSYLOGENTRYEXIT;
|
|
166 |
|
|
167 |
TInt ret = KErrNotSupported;
|
|
168 |
|
|
169 |
// TODO: Add implementation here.......
|
|
170 |
|
|
171 |
|
|
172 |
|
|
173 |
return TSYLOGSETEXITERR(ret);
|
|
174 |
} // CLtsySecurityHandler::HandleAbortSecurityCodeReqL
|
|
175 |
|
|
176 |
|
|
177 |
TInt CLtsySecurityHandler::HandleGetCurrentActivePinReqL()
|
|
178 |
/**
|
|
179 |
* This request is completed by invoking
|
|
180 |
* CCtsyDispatcherCallback::CallbackSecurityGetCurrentActivePinComp()
|
|
181 |
*
|
|
182 |
* @return KErrNone on success, KErrNotSupported if this request is not supported,
|
|
183 |
* or another error code to indicate the failure otherwise.
|
|
184 |
*/
|
|
185 |
{
|
|
186 |
TSYLOGENTRYEXIT;
|
|
187 |
|
|
188 |
TInt ret = KErrNotSupported;
|
|
189 |
|
|
190 |
// TODO: Add implementation here.......
|
|
191 |
|
|
192 |
|
|
193 |
return TSYLOGSETEXITERR(ret);
|
|
194 |
} // CLtsySecurityHandler::HandleGetCurrentActivePinReqL
|
|
195 |
|
|
196 |
|
|
197 |
TInt CLtsySecurityHandler::HandleSetLockSettingReqL(RMobilePhone::TMobilePhoneLock /*aLock*/, RMobilePhone::TMobilePhoneLockSetting /*aSetting*/, const TDesC& /*aPassword*/)
|
|
198 |
/**
|
|
199 |
* This request is completed by invoking
|
|
200 |
* CCtsyDispatcherCallback::CallbackSecuritySetLockSettingComp()
|
|
201 |
*
|
|
202 |
* @param aLock The lock to change.
|
|
203 |
* @param aSetting The new settings for the lock.
|
|
204 |
* @param aPassword The password paramaters.
|
|
205 |
*
|
|
206 |
* @return KErrNone on success, KErrNotSupported if this request is not supported,
|
|
207 |
* or another error code to indicate the failure otherwise.
|
|
208 |
*/
|
|
209 |
{
|
|
210 |
TSYLOGENTRYEXIT;
|
|
211 |
|
|
212 |
TInt ret = KErrNotSupported;
|
|
213 |
|
|
214 |
// TODO: Add implementation here.......
|
|
215 |
|
|
216 |
|
|
217 |
|
|
218 |
return TSYLOGSETEXITERR(ret);
|
|
219 |
} // CLtsySecurityHandler::HandleSetLockSettingReqL
|
|
220 |
|
|
221 |
|
|
222 |
TInt CLtsySecurityHandler::HandleVerifySecurityCodeReqL(
|
|
223 |
RMobilePhone::TMobilePhoneSecurityCode /*aSecCode*/,
|
|
224 |
const RMobilePhone::TCodeAndUnblockCode& /*aCodes*/)
|
|
225 |
/**
|
|
226 |
* This request is completed by invoking
|
|
227 |
* CCtsyDispatcherCallback::CallbackSecurityVerifySecurityCodeComp()
|
|
228 |
*
|
|
229 |
* @param aSecCode Security code.
|
|
230 |
* @param aCodes Code and unblock code.
|
|
231 |
*
|
|
232 |
* @return KErrNone on success, KErrNotSupported if this request is not supported,
|
|
233 |
* or another error code to indicate the failure otherwise.
|
|
234 |
*/
|
|
235 |
{
|
|
236 |
TSYLOGENTRYEXIT;
|
|
237 |
|
|
238 |
TInt ret = KErrNotSupported;
|
|
239 |
|
|
240 |
// TODO: Add implementation here.......
|
|
241 |
|
|
242 |
|
|
243 |
|
|
244 |
return TSYLOGSETEXITERR(ret);
|
|
245 |
} // CLtsySecurityHandler::HandleVerifySecurityCodeReqL
|
|
246 |
|
|
247 |
TInt CLtsySecurityHandler::HandleGetPin1DisableSupportedReqL()
|
|
248 |
/**
|
|
249 |
* This request is completed by invoking
|
|
250 |
* CCtsyDispatcherCallback::CallbackSecurityGetPin1DisableSupportedComp()
|
|
251 |
*
|
|
252 |
* @return KErrNone on success, KErrNotSupported if this request is not supported,
|
|
253 |
* or another error code to indicate the failure otherwise.
|
|
254 |
*/
|
|
255 |
{
|
|
256 |
TSYLOGENTRYEXIT;
|
|
257 |
|
|
258 |
TInt ret = KErrNotSupported;
|
|
259 |
|
|
260 |
//TO DO: Add implementation here.......
|
|
261 |
|
|
262 |
|
|
263 |
return TSYLOGSETEXITERR(ret);
|
|
264 |
} // CLtsySecurityHandler::HandleGetPin1DisableSupportedReqL
|
|
265 |
|
|
266 |
TInt CLtsySecurityHandler::HandleCheckSecurityCodeReqL(DispatcherSecurity::TSecurityCodeId /*aSecCodeID*/, const TDes& /*aSecCode*/)
|
|
267 |
/**
|
|
268 |
* This request is completed by invoking
|
|
269 |
* CCtsyDispatcherCallback::CallbackSecurityCheckSecurityCodeComp()
|
|
270 |
*
|
|
271 |
* @param aSecCodeID Code ID.
|
|
272 |
* @param aSecCode Security code (maximum length = KMaxMobilePasswordSize).
|
|
273 |
*
|
|
274 |
* @return KErrNone on success, KErrNotSupported if this request is not supported,
|
|
275 |
* or another error code to indicate the failure otherwise.
|
|
276 |
*/
|
|
277 |
{
|
|
278 |
TSYLOGENTRYEXIT;
|
|
279 |
|
|
280 |
TInt ret = KErrNotSupported;
|
|
281 |
|
|
282 |
// TODO: Add implementation here.......
|
|
283 |
|
|
284 |
|
|
285 |
|
|
286 |
return TSYLOGSETEXITERR(ret);
|
|
287 |
} // CLtsySecurityHandler::HandleCheckSecurityCodeReqL
|
|
288 |
|
|
289 |
|
|
290 |
TInt CLtsySecurityHandler::HandleDisablePhoneLockReqL(const TDesC& /*aSecCode*/)
|
|
291 |
/**
|
|
292 |
* This request is completed by invoking
|
|
293 |
* CCtsyDispatcherCallback::CallbackSecurityDisablePhoneLockComp()
|
|
294 |
*
|
|
295 |
* @param aSecCode Security password (maximum length = KMaxMobilePasswordSize).
|
|
296 |
*
|
|
297 |
* @return KErrNone on success, KErrNotSupported if this request is not supported,
|
|
298 |
* or another error code to indicate the failure otherwise.
|
|
299 |
*/
|
|
300 |
{
|
|
301 |
TSYLOGENTRYEXIT;
|
|
302 |
|
|
303 |
TInt ret = KErrNotSupported;
|
|
304 |
|
|
305 |
// TODO: Add implementation here.......
|
|
306 |
|
|
307 |
|
|
308 |
|
|
309 |
return TSYLOGSETEXITERR(ret);
|
|
310 |
} // CLtsySecurityHandler::HandleDisablePhoneLockReqL
|
|
311 |
|
|
312 |
|
|
313 |
TInt CLtsySecurityHandler::HandleGetCipheringInfoReqL()
|
|
314 |
/**
|
|
315 |
* This request is completed by invoking
|
|
316 |
* CCtsyDispatcherCallback::CallbackSecurityGetCipheringInfoComp()
|
|
317 |
*
|
|
318 |
* @return KErrNone on success, KErrNotSupported if this request is not supported,
|
|
319 |
* or another error code to indicate the failure otherwise.
|
|
320 |
*/
|
|
321 |
{
|
|
322 |
TSYLOGENTRYEXIT;
|
|
323 |
|
|
324 |
TInt ret = KErrNotSupported;
|
|
325 |
|
|
326 |
// TODO: Add implementation here.......
|
|
327 |
|
|
328 |
|
|
329 |
return TSYLOGSETEXITERR(ret);
|
|
330 |
} // CLtsySecurityHandler::HandleGetCipheringInfoReqL
|
|
331 |
|
|
332 |
|
|
333 |
TInt CLtsySecurityHandler::HandleIsSecurityCodeBlockedReqL(DispatcherSecurity::TSecurityCodeId /*aSecCodeID*/)
|
|
334 |
/**
|
|
335 |
* This request is completed by invoking
|
|
336 |
* CCtsyDispatcherCallback::CallbackSecurityIsSecurityCodeBlockedComp()
|
|
337 |
*
|
|
338 |
* @param aSecCodeID Code ID.
|
|
339 |
*
|
|
340 |
* @return KErrNone on success, KErrNotSupported if this request is not supported,
|
|
341 |
* or another error code to indicate the failure otherwise.
|
|
342 |
*/
|
|
343 |
{
|
|
344 |
TSYLOGENTRYEXIT;
|
|
345 |
|
|
346 |
TInt ret = KErrNotSupported;
|
|
347 |
|
|
348 |
// TODO: Add implementation here.......
|
|
349 |
|
|
350 |
|
|
351 |
return TSYLOGSETEXITERR(ret);
|
|
352 |
} // CLtsySecurityHandler::HandleIsSecurityCodeBlockedReqL
|
|
353 |
|
|
354 |
TInt CLtsySecurityHandler::HandleCheckSecurityCodeCancelReqL(DispatcherSecurity::TSecurityCodeId /*aSecCodeID*/)
|
|
355 |
/**
|
|
356 |
* This request is completed by invoking
|
|
357 |
* CCtsyDispatcherCallback::CallbackSecurityCheckSecurityCodeCancelComp()
|
|
358 |
*
|
|
359 |
* @param aCodeID Code ID.
|
|
360 |
*
|
|
361 |
* @return KErrNone on success, KErrNotSupported if this request is not supported,
|
|
362 |
* or another error code to indicate the failure otherwise.
|
|
363 |
*/
|
|
364 |
{
|
|
365 |
TSYLOGENTRYEXIT;
|
|
366 |
|
|
367 |
TInt ret = KErrNotSupported;
|
|
368 |
|
|
369 |
// TODO: Add implementation here.......
|
|
370 |
|
|
371 |
|
|
372 |
|
|
373 |
return TSYLOGSETEXITERR(ret);
|
|
374 |
} // CLtsySecurityHandler::HandleCheckSecurityCodeCancelReqL
|