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