smf/smfcredentialmgr/smfcredmgrserver/inc/smfcredmgrserversession.h
changeset 18 013a02bf2bb0
parent 14 a469c0e6e7fb
child 26 83d6a149c755
equal deleted inserted replaced
17:106a4bfcb866 18:013a02bf2bb0
     5  * under the terms of the "Eclipse Public License v1.0"
     5  * under the terms of the "Eclipse Public License v1.0"
     6  * which accompanies  this distribution, and is available
     6  * which accompanies  this distribution, and is available
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html"
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html"
     8  *
     8  *
     9  * Initial Contributors:
     9  * Initial Contributors:
    10  * Pritam Roy Biswas, Sasken Communication Technologies Ltd - Initial contribution
    10  * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
       
    11  * 
       
    12  * Contributors:
       
    13  * Pritam Roy Biswas, Sasken Communication Technologies Ltd
    11  *
    14  *
    12  * Description:
    15  * Description:
    13  * Header file for Credential Manager Server Session.
    16  * Header file for Credential Manager Server Session.
    14  */
    17  */
    15 
    18 
    16 #ifndef SMFCREDMGRSERVERSESSION_H_
    19 #ifndef SMFCREDMGRSERVERSESSION_H_
    17 #define SMFCREDMGRSERVERSESSION_H_
    20 #define SMFCREDMGRSERVERSESSION_H_
    18 
    21 
    19 #include <e32base.h>
    22 #include <e32base.h>
       
    23 
    20 #include "smfcredmgrserver.h"
    24 #include "smfcredmgrserver.h"
    21 #include "smfcredmgrclientdatastruct.h"
    25 #include "smfcredmgrclientdatastruct.h"
    22 #include "smfkeystoremanager.h"
    26 #include "smfkeystoremanager.h"
    23 
    27 
    24 /**
    28 /**
    25  * Forward declarations
    29  * Forward declarations
    26  */
    30  */
    27 class CSmfCredMgrDbUser;
    31 class CSmfCredMgrDbUser;
    28 
    32 
    29 /**
    33 /**
    30  * Maximun size for buffer
    34  * Maximum size for buffer
    31  */
    35  */
    32 const TInt KMaxBufSize = 512;
    36 const TInt KMaxBufSize = 512;
    33 
    37 
    34 /**
    38 /**
    35  * Class to establish a client session at server side.
    39  * Class to establish a client session at server side.
    36  *  Derives from CSession2
    40  * Derives from CSession2
    37  */
    41  */
    38 class CSmfCredMgrServerSession : public CSession2
    42 class CSmfCredMgrServerSession : public CSession2
    39 	{
    43 	{
    40 public:
    44 public:
    41 	/**
    45 	/**
    42 	 * New Methods
    46 	 * NewL Method
    43 	 * @param aServer the server object
    47 	 * @param aServer the server object
       
    48 	 * @return The constructed CSmfCredMgrServerSession instance
    44 	 */
    49 	 */
    45 	static CSmfCredMgrServerSession* NewL(CSmfCredMgrServer& aServer);
    50 	static CSmfCredMgrServerSession* NewL(CSmfCredMgrServer& aServer);
       
    51 	
       
    52 	/**
       
    53 	 * NewLC Method
       
    54 	 * @param aServer the server object
       
    55 	 * @return The constructed CSmfCredMgrServerSession instance
       
    56 	 */
    46 	static CSmfCredMgrServerSession* NewLC(CSmfCredMgrServer& aServer);
    57 	static CSmfCredMgrServerSession* NewLC(CSmfCredMgrServer& aServer);
    47 
    58 
    48 	/**
    59 	/**
    49 	 * Destructor
    60 	 * Destructor
    50 	 */
    61 	 */
    51 	~CSmfCredMgrServerSession();
    62 	~CSmfCredMgrServerSession();
    52 
    63 
    53 	/**
    64 public: // from CSession2
    54 	 * Constructor
       
    55 	 * @param aServer The server object
       
    56 	 */
       
    57 	CSmfCredMgrServerSession(CSmfCredMgrServer& aServer);
       
    58 
       
    59 public:
       
    60 	// from CSession2
       
    61 
       
    62 	/**
    65 	/**
    63 	 * Handles the servicing of a client request that has been 
    66 	 * Handles the servicing of a client request that has been 
    64 	 * passed to the server
    67 	 * passed to the server
    65 	 * @param aMessage The message containing the details of the client request
    68 	 * @param aMessage The message containing the details of the client request
    66 	 */
    69 	 */
    67 	virtual void ServiceL(const RMessage2& aMessage);
    70 	virtual void ServiceL(const RMessage2& aMessage);
    68 
    71 
    69 private:
    72 private:
       
    73 	/**
       
    74 	 * Constructor
       
    75 	 * @param aServer The server object
       
    76 	 */
       
    77 	CSmfCredMgrServerSession(CSmfCredMgrServer& aServer);
       
    78 	
    70 	/**
    79 	/**
    71 	 * Two-Phase constructor
    80 	 * Two-Phase constructor
    72 	 */
    81 	 */
    73 	void ConstructL();
    82 	void ConstructL();
    74 
    83 
    77 	 * @param aParams class containg the data to be stored at Db
    86 	 * @param aParams class containg the data to be stored at Db
    78 	 */
    87 	 */
    79 	void storeInDb(CSmfStoreAuthParams* aParams);
    88 	void storeInDb(CSmfStoreAuthParams* aParams);
    80 
    89 
    81 	/**
    90 	/**
    82 	 * Retieves the plugin ids from Db
    91 	 * Retrieves the plugin ids from Db
    83 	 * @param aParams class object to be updated
    92 	 * @param aParams class object to be updated
    84 	 */
    93 	 */
    85 	void fetchPluginIDs(CSmfPluginIDListParams* aParams);
    94 	void fetchPluginIDsL(CSmfPluginIDListParams* aParams);
    86 
    95 
    87 	/**
    96 	/**
    88 	 * Retieves the URLs from Db
    97 	 * Retrieves the URLs from Db
    89 	 * @param aArg class object to be updated
    98 	 * @param aArg class object to be updated
    90 	 */
    99 	 */
    91 	void fetchURLs(CSmfURLListParams* aArg);
   100 	void fetchUrlL(CSmfURLListParams* aArg);
    92 
   101 
    93 	/**
   102 	/**
    94 	 * retrieves each token set from Db and updates the array of CSmfFetchAuthTokenSet
   103 	 * Retrieves each token set from Db and updates the array of CSmfFetchAuthTokenSet
    95 	 * @param aParams class containg the array to be filled
   104 	 * @param aParams class containg the array to be filled
    96 	 */
   105 	 */
    97 	void getTokenArray(CSmfFetchAuthTokenSet* aParams);
   106 	void getTokenArrayL(CSmfFetchAuthTokenSet* aParams);
    98 
   107 
    99 
   108 private:  // Data
   100 private:
       
   101 
       
   102 	CSmfCredMgrServer& iServer;
   109 	CSmfCredMgrServer& iServer;
   103 	CSmfCredMgrDbUser* iDbUser;
   110 	CSmfCredMgrDbUser* iDbUser;
   104 	CSmfKeyStoreManager* iKeyStore;
   111 	CSmfKeyStoreManager* iKeyStore;
   105 	CSmfFetchAuthTokenSet* iFetchAuthTokenSetParams;
   112 	CSmfFetchAuthTokenSet* iFetchAuthTokenSetParams;
   106 
   113