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 #ifndef __CLTSYDISPATCHSECURITYHANDLER_H_ |
|
17 #define __CLTSYDISPATCHSECURITYHANDLER_H_ |
|
18 |
|
19 // INCLUDES |
|
20 #include <e32std.h> |
|
21 #include <e32base.h> |
|
22 |
|
23 #include <ctsy/ltsy/mltsydispatchinterface.h> |
|
24 #include <ctsy/ltsy/mltsydispatchsecurityinterface.h> |
|
25 #include "misdispatchinterfacesupported.h" |
|
26 #include "ltsymacros.h" |
|
27 |
|
28 |
|
29 |
|
30 // FORWARD DECLARATIONS |
|
31 class CCtsyDispatcherCallback; |
|
32 |
|
33 // Can be removed in real LTSY implementation |
|
34 MTEST_FORWARD_DECLARE_MOCKLTSYENGINE |
|
35 |
|
36 // CLASS DECLARATION |
|
37 |
|
38 /** |
|
39 * Implements interfaces from the CTSY Dispatcher. The CTSY Dispatcher uses these |
|
40 * interfaces to make requests to the Licensee LTSY. |
|
41 */ |
|
42 class CLtsySecurityHandler : public CBase, |
|
43 public MIsDispatchInterfaceSupported, |
|
44 public MLtsyDispatchSecurityGetSecurityCodeInfo, |
|
45 public MLtsyDispatchSecurityGetLockInfo, |
|
46 public MLtsyDispatchSecurityAbortSecurityCode, |
|
47 public MLtsyDispatchSecurityGetCurrentActivePin, |
|
48 public MLtsyDispatchSecuritySetLockSetting, |
|
49 public MLtsyDispatchSecurityVerifySecurityCode, |
|
50 public MLtsyDispatchSecurityGetPin1DisableSupported, |
|
51 public MLtsyDispatchSecurityCheckSecurityCode, |
|
52 public MLtsyDispatchSecurityDisablePhoneLock, |
|
53 public MLtsyDispatchSecurityGetCipheringInfo, |
|
54 public MLtsyDispatchSecurityIsSecurityCodeBlocked, |
|
55 public MLtsyDispatchSecurityCheckSecurityCodeCancel |
|
56 { |
|
57 public: |
|
58 |
|
59 virtual ~CLtsySecurityHandler(); |
|
60 static CLtsySecurityHandler* NewL(CCtsyDispatcherCallback& aCtsyDispatcherCallback); |
|
61 static CLtsySecurityHandler* NewLC(CCtsyDispatcherCallback& aCtsyDispatcherCallback); |
|
62 |
|
63 // From MIsDispatchInterfaceSupported |
|
64 virtual TBool IsInterfaceSupported(TLtsyDispatchInterfaceApiId aDispatchApiId); |
|
65 void IsCallbackIndicatorSupported(TLtsyDispatchIndIdGroup aIdGroup, TUint32& aIndIdBitMask); |
|
66 |
|
67 |
|
68 |
|
69 // From MLtsyDispatchSecurityGetSecurityCodeInfo |
|
70 virtual TInt HandleGetSecurityCodeInfoReqL(RMobilePhone::TMobilePhoneSecurityCode aSecCode); |
|
71 |
|
72 // From MLtsyDispatchSecurityGetLockInfo |
|
73 virtual TInt HandleGetLockInfoReqL(RMobilePhone::TMobilePhoneLock aLockType); |
|
74 |
|
75 // From MLtsyDispatchSecurityAbortSecurityCode |
|
76 virtual TInt HandleAbortSecurityCodeReqL(RMobilePhone::TMobilePhoneSecurityCode aSecCode); |
|
77 |
|
78 // From MLtsyDispatchSecurityGetCurrentActivePin |
|
79 virtual TInt HandleGetCurrentActivePinReqL(); |
|
80 |
|
81 // From MLtsyDispatchSecuritySetLockSetting |
|
82 virtual TInt HandleSetLockSettingReqL(RMobilePhone::TMobilePhoneLock aLock, RMobilePhone::TMobilePhoneLockSetting aSetting, const TDesC& aPassword); |
|
83 |
|
84 // From MLtsyDispatchSecurityVerifySecurityCode |
|
85 virtual TInt HandleVerifySecurityCodeReqL(RMobilePhone::TMobilePhoneSecurityCode aSecCode, |
|
86 const RMobilePhone::TCodeAndUnblockCode& aCodes); |
|
87 |
|
88 // From MLtsyDispatchSecurityGetPin1DisableSupported |
|
89 virtual TInt HandleGetPin1DisableSupportedReqL(); |
|
90 |
|
91 // From MLtsyDispatchSecurityCheckSecurityCode |
|
92 virtual TInt HandleCheckSecurityCodeReqL(DispatcherSecurity::TSecurityCodeId aSecCodeID, const TDes& aSecCode); |
|
93 |
|
94 // From MLtsyDispatchSecurityDisablePhoneLock |
|
95 virtual TInt HandleDisablePhoneLockReqL(const TDesC& aSecCode); |
|
96 |
|
97 // From MLtsyDispatchSecurityGetCipheringInfo |
|
98 virtual TInt HandleGetCipheringInfoReqL(); |
|
99 |
|
100 // From MLtsyDispatchSecurityIsSecurityCodeBlocked |
|
101 virtual TInt HandleIsSecurityCodeBlockedReqL(DispatcherSecurity::TSecurityCodeId aSecCodeID); |
|
102 |
|
103 // From MLtsyDispatchSecurityCheckSecurityCodeCancel |
|
104 virtual TInt HandleCheckSecurityCodeCancelReqL(DispatcherSecurity::TSecurityCodeId aSecCodeID); |
|
105 |
|
106 private: |
|
107 |
|
108 CLtsySecurityHandler(CCtsyDispatcherCallback& aCtsyDispatcherCallback); |
|
109 void ConstructL(); |
|
110 |
|
111 private: |
|
112 |
|
113 // Not owned |
|
114 |
|
115 /** |
|
116 * Callback object in the CTSY Dispatcher. |
|
117 * |
|
118 * Used to complete a request back to the CTSY Dispatcher. |
|
119 */ |
|
120 CCtsyDispatcherCallback& iCtsyDispatcherCallback; |
|
121 |
|
122 public: |
|
123 |
|
124 |
|
125 }; // class CLtsySecurityHandler |
|
126 |
|
127 #endif // __CLTSYDISPATCHSECURITYHANDLER_H_ |
|
128 |
|