|
1 // Copyright (c) 2008-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 /** |
|
17 @file |
|
18 @internalAll |
|
19 */ |
|
20 |
|
21 #ifndef __CSECURITYDISPATCHER_H_ |
|
22 #define __CSECURITYDISPATCHER_H_ |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32std.h> |
|
26 #include <e32base.h> |
|
27 #include <e32def.h> |
|
28 #include <etelmm.h> |
|
29 |
|
30 #include <ctsy/ltsy/mltsydispatchfactory.h> |
|
31 |
|
32 |
|
33 #include "requestqueueoneshot.h" |
|
34 #include <ctsy/ltsy/ltsylogger.h> |
|
35 #include "mdispatchercallback.h" |
|
36 |
|
37 // FORWARD DECLARATIONS |
|
38 class CMmDataPackage; |
|
39 class MmMessageManagerCallback; |
|
40 class TDispatcherHolder; |
|
41 |
|
42 class MLtsyDispatchSecurityGetSecurityCodeInfo; |
|
43 class MLtsyDispatchSecurityGetLockInfo; |
|
44 class MLtsyDispatchSecurityAbortSecurityCode; |
|
45 class MLtsyDispatchSecurityGetCurrentActivePin; |
|
46 class MLtsyDispatchSecuritySetLockSetting; |
|
47 class MLtsyDispatchSecurityVerifySecurityCode; |
|
48 class MLtsyDispatchSecurityGetPin1DisableSupported; |
|
49 class MLtsyDispatchSecurityCheckSecurityCode; |
|
50 class MLtsyDispatchSecurityDisablePhoneLock; |
|
51 class MLtsyDispatchSecurityGetCipheringInfo; |
|
52 class MLtsyDispatchSecurityIsSecurityCodeBlocked; |
|
53 class MLtsyDispatchSecurityCheckSecurityCodeCancel; |
|
54 |
|
55 // CLASS DECLARATION |
|
56 |
|
57 /** |
|
58 * This class is responsible for packing and unpacking data belonging |
|
59 * to Security related requests to the Licensee LTSY. |
|
60 */ |
|
61 class CSecurityDispatcher : public CBase, public MDispatcherCallback |
|
62 { |
|
63 public: |
|
64 |
|
65 virtual ~CSecurityDispatcher(); |
|
66 |
|
67 static CSecurityDispatcher* NewL( |
|
68 MLtsyDispatchFactoryV1& aLtsyFactory, |
|
69 MmMessageManagerCallback& aMessageManagerCallback, |
|
70 CRequestQueueOneShot& aRequestAsyncOneShot); |
|
71 |
|
72 static CSecurityDispatcher* NewLC( |
|
73 MLtsyDispatchFactoryV1& aLtsyFactory, |
|
74 MmMessageManagerCallback& aMessageManagerCallback, |
|
75 CRequestQueueOneShot& aRequestAsyncOneShot); |
|
76 |
|
77 // Dispatcher functions for dispatching requests DOWN to the Licensee LTSY |
|
78 |
|
79 TInt DispatchGetSecurityCodeInfoL(const CMmDataPackage* aDataPackage); |
|
80 TInt DispatchGetLockInfoL(const CMmDataPackage* aDataPackage); |
|
81 TInt DispatchAbortSecurityCodeL(const CMmDataPackage* aDataPackage); |
|
82 TInt DispatchGetCurrentActivePinL(); |
|
83 TInt DispatchSetLockSettingL(const CMmDataPackage* aDataPackage); |
|
84 TInt DispatchVerifySecurityCodeL(const CMmDataPackage* aDataPackage); |
|
85 TInt DispatchGetPin1DisableSupportedL(); |
|
86 TInt DispatchCheckSecurityCodeL(const CMmDataPackage* aDataPackage); |
|
87 TInt DispatchDisablePhoneLockL(const CMmDataPackage* aDataPackage); |
|
88 TInt DispatchGetCipheringInfoL(); |
|
89 TInt DispatchIsSecurityCodeBlockedL(const CMmDataPackage* aDataPackage); |
|
90 TInt DispatchCheckSecurityCodeCancelL(const CMmDataPackage* aDataPackage); |
|
91 |
|
92 |
|
93 // Complete functions for receiving completions UP from the Licensee LTSY |
|
94 // via the CCtsyDispatcherCallback object. |
|
95 |
|
96 void CallbackBootNotifySecurityReady(TInt aError); |
|
97 void CallbackNotifySecurityEvent(TInt aError, RMobilePhone::TMobilePhoneSecurityEvent aSecEvent); |
|
98 void CallbackNotifyLockInfoChange(TInt aError, RMobilePhone::TMobilePhoneLockStatus aStatus, RMobilePhone::TMobilePhoneLockSetting aSetting, RMobilePhone::TMobilePhoneLock aLock); |
|
99 void CallbackGetSecurityCodeInfo(TInt aError, RMobilePhone::TMobilePhoneSecurityCode aSecCode, TInt aRemainingEntryAttempts); |
|
100 void CallbackGetLockInfo(TInt aError, RMobilePhone::TMobilePhoneLockStatus aLockStatus, RMobilePhone::TMobilePhoneLockSetting aLockSetting); |
|
101 void CallbackAbortSecurityCode(TInt aError); |
|
102 void CallbackGetCurrentActivePin(TInt aError, RMobilePhone::TMobilePhoneSecurityCode aSecCode); |
|
103 void CallbackSetLockSetting(TInt aError); |
|
104 void CallbackVerifySecurityCode(TInt aError); |
|
105 void CallbackGetPin1DisableSupported(TInt aError, TBool aIsSupported); |
|
106 void CallbackNotifyCipheringInfoChange(TInt aError, const RMmCustomAPI::TCipheringInfo& aInfo); |
|
107 void CallbackCheckSecurityCode(TInt aError); |
|
108 void CallbackDisablePhoneLock(TInt aError); |
|
109 void CallbackGetCipheringInfo(TInt aError, TBool aIndStatus); |
|
110 void CallbackIsSecurityCodeBlocked(TInt aError, TBool aIsBlocked); |
|
111 void CallbackCheckSecurityCodeCancel(TInt aError); |
|
112 |
|
113 // From MDispatcherCallback |
|
114 void CallbackSync(CRequestQueueOneShot::TIpcDataPackage& aIpcDataPackage); |
|
115 |
|
116 // Other public functions |
|
117 void SetDispatcherHolder(TDispatcherHolder& aDispatcherHolder); |
|
118 |
|
119 private: |
|
120 |
|
121 CSecurityDispatcher(MLtsyDispatchFactoryV1& aLtsyFactory, |
|
122 MmMessageManagerCallback& aMessageManagerCallback, |
|
123 CRequestQueueOneShot& aRequestAsyncOneShot); |
|
124 |
|
125 void ConstructL(); |
|
126 |
|
127 private: // Not owned |
|
128 |
|
129 MLtsyDispatchFactoryV1& iLtsyFactoryV1; |
|
130 MmMessageManagerCallback& iMessageManagerCallback; |
|
131 CRequestQueueOneShot& iRequestAsyncOneShot; |
|
132 TDispatcherHolder* iDispatcherHolder; |
|
133 |
|
134 // Interfaces in the Licensee LTSY, not owned by this object |
|
135 |
|
136 MLtsyDispatchSecurityGetSecurityCodeInfo* iLtsyDispatchSecurityGetSecurityCodeInfo; |
|
137 MLtsyDispatchSecurityGetLockInfo* iLtsyDispatchSecurityGetLockInfo; |
|
138 MLtsyDispatchSecurityAbortSecurityCode* iLtsyDispatchSecurityAbortSecurityCode; |
|
139 MLtsyDispatchSecurityGetCurrentActivePin* iLtsyDispatchSecurityGetCurrentActivePin; |
|
140 MLtsyDispatchSecuritySetLockSetting* iLtsyDispatchSecuritySetLockSetting; |
|
141 MLtsyDispatchSecurityVerifySecurityCode* iLtsyDispatchSecurityVerifySecurityCode; |
|
142 MLtsyDispatchSecurityGetPin1DisableSupported* iLtsyDispatchSecurityGetPin1DisableSupported; |
|
143 MLtsyDispatchSecurityCheckSecurityCode* iLtsyDispatchSecurityCheckSecurityCode; |
|
144 MLtsyDispatchSecurityDisablePhoneLock* iLtsyDispatchSecurityDisablePhoneLock; |
|
145 MLtsyDispatchSecurityGetCipheringInfo* iLtsyDispatchSecurityGetCipheringInfo; |
|
146 MLtsyDispatchSecurityIsSecurityCodeBlocked* iLtsyDispatchSecurityIsSecurityCodeBlocked; |
|
147 MLtsyDispatchSecurityCheckSecurityCodeCancel* iLtsyDispatchSecurityCheckSecurityCodeCancel; |
|
148 |
|
149 }; // class CSecurityDispatcher |
|
150 |
|
151 #endif // __CSECURITYDISPATCHER_H_ |
|
152 |