smf/smfcredentialmgr/smfcredmgrserver/inc/smfcredmgrdbuser.h
changeset 26 83d6a149c755
parent 18 013a02bf2bb0
equal deleted inserted replaced
25:a180113055cb 26:83d6a149c755
    49 _LIT(KSmfDbReadAuthAppIdInRegTokenTable, "SELECT AuthAppId, Validity FROM RegTokenValidityTable WHERE RegistrationToken = :iID");
    49 _LIT(KSmfDbReadAuthAppIdInRegTokenTable, "SELECT AuthAppId, Validity FROM RegTokenValidityTable WHERE RegistrationToken = :iID");
    50 
    50 
    51 //UPDATE 
    51 //UPDATE 
    52 _LIT( KUpdatePluginID, "UPDATE PluginIDTable SET PluginId =:iText, IsEnabled =:iFlag WHERE PluginId = :iID");
    52 _LIT( KUpdatePluginID, "UPDATE PluginIDTable SET PluginId =:iText, IsEnabled =:iFlag WHERE PluginId = :iID");
    53 
    53 
       
    54 // DELETE
       
    55 _LIT(KSmfDbDeleteAuthTokens, "DELETE FROM AuthParamsTable WHERE AuthAppId = :iID");
       
    56 _LIT(KSmfDbDeletePluginList, "DELETE FROM PluginIDTable WHERE AuthAppId = :iID");
       
    57 _LIT(KSmfDbDeleteRegTokenValidity, "DELETE FROM RegTokenValidityTable WHERE AuthAppId = :iID");
       
    58 _LIT(KSmfDbDeleteURLList, "DELETE FROM URLTable WHERE AuthAppId = :iID");
       
    59 
       
    60 
    54 /**
    61 /**
    55  * The class to use the server database i.e insert table in Db, query from Db.
    62  * The class to use the server database i.e insert table in Db, query from Db.
    56  */
    63  */
    57 class CSmfCredMgrDbUser : public CBase
    64 class CSmfCredMgrDbUser : public CBase
    58 	{
    65 	{
   195 	 * it is called internally by fetchPluginList().
   202 	 * it is called internally by fetchPluginList().
   196 	 * @param aAuthAppId ID of the Authentication app
   203 	 * @param aAuthAppId ID of the Authentication app
   197 	 * @param aArray [out] The array to be updated with plugin ids 
   204 	 * @param aArray [out] The array to be updated with plugin ids 
   198 	 */
   205 	 */
   199 	void readPluginIdL(const TDesC& aAuthAppId, RPointerArray<HBufC>& aArray);
   206 	void readPluginIdL(const TDesC& aAuthAppId, RPointerArray<HBufC>& aArray);
       
   207 	
       
   208 	/**
       
   209 	 * Method to check if a particular service is logged in or not (ie, key sets 
       
   210 	 * of a service is saved in credential manager or not)
       
   211 	 * @param AuthAppId The Authentication Application Id
       
   212 	 * @param isAuthorised [out] ETrue if service is logged in else EFalse
       
   213 	 */
       
   214 	void checkServiceAuthenticationL(const TDesC& aAuthAppId, TBool& isAuthorised );
       
   215 	
       
   216 	/**
       
   217 	 * Method to delete the auth params of the requested service from the database table 
       
   218 	 * @param AuthAppId The Authentication Application Id
       
   219 	 * @return ETrue if service is data is deleted else EFalse
       
   220 	 */
       
   221 	bool deleteAuthDataSetL( const TDesC& aAuthAppId );
       
   222 	
       
   223 	/**
       
   224 	 * Method to delete the plugin list of the requested service from the database table 
       
   225 	 * @param AuthAppId The Authentication Application Id
       
   226 	 * @return ETrue if service is data is deleted else EFalse
       
   227 	 */
       
   228 	bool deletePluginListL( const TDesC& aAuthAppId );
       
   229 	
       
   230 	/**
       
   231 	 * Method to delete the reg token and validity of the requested service from the database table 
       
   232 	 * @param AuthAppId The Authentication Application Id
       
   233 	 * @return ETrue if service is data is deleted else EFalse
       
   234 	 */
       
   235 	bool deleteRegTokenValidityL( const TDesC& aAuthAppId );
       
   236 	
       
   237 	/**
       
   238 	 * Method to delete the URL list of the requested service from the database table 
       
   239 	 * @param AuthAppId The Authentication Application Id
       
   240 	 * @return ETrue if service is data is deleted else EFalse
       
   241 	 */
       
   242 	bool deleteURLListL( const TDesC& aAuthAppId );
   200 
   243 
   201 private:
   244 private:
   202 	/**
   245 	/**
   203 	 * Constructor
   246 	 * Constructor
   204 	 * @param aSession The CSmfCredMgrServerSession instance
   247 	 * @param aSession The CSmfCredMgrServerSession instance