|
1 /** |
|
2 * Copyright (c) 2010 Sasken Communication Technologies Ltd. |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the "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 * Pritam Roy Biswas, Sasken Communication Technologies Ltd - Initial contribution |
|
11 * |
|
12 * Description: |
|
13 * Header file for Credential Manager Server Session. |
|
14 */ |
|
15 |
|
16 #ifndef SMFCREDMGRSERVERSESSION_H_ |
|
17 #define SMFCREDMGRSERVERSESSION_H_ |
|
18 |
|
19 #include <e32base.h> |
|
20 #include "smfcredmgrserver.h" |
|
21 #include "smfcredmgrclientdatastruct.h" |
|
22 #include "smfkeystoremanager.h" |
|
23 |
|
24 /** |
|
25 * Forward declarations |
|
26 */ |
|
27 class CSmfCredMgrDbUser; |
|
28 |
|
29 /** |
|
30 * Maximun size for buffer |
|
31 */ |
|
32 const TInt KMaxBufSize = 512; |
|
33 |
|
34 /** |
|
35 * Class to establish a client session at server side. |
|
36 * Derives from CSession2 |
|
37 */ |
|
38 class CSmfCredMgrServerSession : public CSession2 |
|
39 { |
|
40 public: |
|
41 /** |
|
42 * New Methods |
|
43 * @param aServer the server object |
|
44 */ |
|
45 static CSmfCredMgrServerSession* NewL(CSmfCredMgrServer& aServer); |
|
46 static CSmfCredMgrServerSession* NewLC(CSmfCredMgrServer& aServer); |
|
47 |
|
48 /** |
|
49 * Destructor |
|
50 */ |
|
51 ~CSmfCredMgrServerSession(); |
|
52 |
|
53 /** |
|
54 * Constructor |
|
55 * @param aServer The server object |
|
56 */ |
|
57 CSmfCredMgrServerSession(CSmfCredMgrServer& aServer); |
|
58 |
|
59 public: |
|
60 // from CSession2 |
|
61 |
|
62 /** |
|
63 * Handles the servicing of a client request that has been |
|
64 * passed to the server |
|
65 * @param aMessage The message containing the details of the client request |
|
66 */ |
|
67 virtual void ServiceL(const RMessage2& aMessage); |
|
68 |
|
69 private: |
|
70 /** |
|
71 * Two-Phase constructor |
|
72 */ |
|
73 void ConstructL(); |
|
74 |
|
75 /** |
|
76 * Stores data to Db during Authentication process |
|
77 * @param aParams class containg the data to be stored at Db |
|
78 */ |
|
79 void storeInDb(CSmfStoreAuthParams* aParams); |
|
80 |
|
81 /** |
|
82 * Retieves the plugin ids from Db |
|
83 * @param aParams class object to be updated |
|
84 */ |
|
85 void fetchPluginIDs(CSmfPluginIDListParams* aParams); |
|
86 |
|
87 /** |
|
88 * Retieves the URLs from Db |
|
89 * @param aArg class object to be updated |
|
90 */ |
|
91 void fetchURLs(CSmfURLListParams* aArg); |
|
92 |
|
93 /** |
|
94 * retrieves each token set from Db and updates the array of CSmfFetchAuthTokenSet |
|
95 * @param aParams class containg the array to be filled |
|
96 */ |
|
97 void getTokenArray(CSmfFetchAuthTokenSet* aParams); |
|
98 |
|
99 |
|
100 private: |
|
101 |
|
102 CSmfCredMgrServer& iServer; |
|
103 CSmfCredMgrDbUser* iDbUser; |
|
104 CSmfKeyStoreManager* iKeyStore; |
|
105 CSmfFetchAuthTokenSet* iFetchAuthTokenSetParams; |
|
106 |
|
107 }; |
|
108 |
|
109 #endif /* SMFCREDMGRSERVERSESSION_H_ */ |