|
1 /* |
|
2 * Copyright (c) 2008 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: A class that provides logon and logoff functionality. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef C_LOGONSERVICES_H |
|
21 #define C_LOGONSERVICES_H |
|
22 |
|
23 #include <e32base.h> |
|
24 |
|
25 class CUnifiedKeyStore; |
|
26 |
|
27 class CLogonServices : public CActive |
|
28 { |
|
29 public: |
|
30 static CLogonServices* NewL(CUnifiedKeyStore& aUnifiedKeyStore); |
|
31 ~CLogonServices(); |
|
32 |
|
33 |
|
34 void Logon(TRequestStatus& aClientStatus); |
|
35 void Logoff(TRequestStatus& aClientStatus); |
|
36 void ChangePassword(TRequestStatus& aClientStatus); |
|
37 |
|
38 //Used by explicit login |
|
39 void SetAuthenticationObject(MCTAuthenticationObject* aAuthenticationObject); |
|
40 |
|
41 TBool LogonCompleted() const; |
|
42 |
|
43 void RunL(); |
|
44 void DoCancel(); |
|
45 |
|
46 private: |
|
47 enum TLogonServiceState |
|
48 { |
|
49 ELogonServiceIdle = 0, |
|
50 ELogonServiceAlreadyLoggedIn, |
|
51 ELogonServiceListingKeys, |
|
52 ELogonServiceOpeningAuthentication, |
|
53 ELogonServiceClosingAuthentication, |
|
54 ELogonServiceChangingPassword |
|
55 }; |
|
56 |
|
57 CLogonServices(CUnifiedKeyStore& aUnifiedKeyStore); |
|
58 void ConstructL(); |
|
59 |
|
60 void Cleanup(); |
|
61 |
|
62 CUnifiedKeyStore& iUnifiedKeyStore; |
|
63 TRequestStatus* iClientStatus; |
|
64 TLogonServiceState iState; |
|
65 |
|
66 MCTKeyStoreManager* iUserKeyStore; //Not owned by this class |
|
67 RMPointerArray<CCTKeyInfo> iKeysList; |
|
68 MCTAuthenticationObject* iAuthenticationObject; |
|
69 }; |
|
70 |
|
71 #endif //C_LOGONSERVICES_H |
|
72 |