inc/drmrightsdb.h
changeset 0 95b198f216e5
child 22 ad2863178d17
equal deleted inserted replaced
-1:000000000000 0:95b198f216e5
       
     1 /*
       
     2 * Copyright (c) 2003 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:  Interface for the DRM Rights database
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef DRMRIGHTSDB_H
       
    20 #define DRMRIGHTSDB_H
       
    21 
       
    22 // INCLUDES
       
    23 
       
    24 #include <e32base.h>
       
    25 #include <s32mem.h>
       
    26 #include "DRMBackupInterface.h"
       
    27 #include "DRMTypes.h"
       
    28 
       
    29 // CONSTANTS
       
    30 
       
    31 // Directory for temp files
       
    32 _LIT( KDRMDbTempPath, "c:\\system\\temp\\" );
       
    33 
       
    34 // The primary database temp file
       
    35 _LIT( KDRMDbTempFileName, "c:\\private\\101F51F2\\RightsServer.tmp" );
       
    36 
       
    37 // These are internally defined in the DRM Authenticated API
       
    38 // If they change they should be also changed here
       
    39 _LIT8( KFLKString, "flk:" );
       
    40 LOCAL_C const TInt KFLKStringLength = 4;
       
    41 
       
    42 _LIT8( KCIDString, "cid:" );
       
    43 LOCAL_C const TInt KCIDStringLength = 4;
       
    44 
       
    45 
       
    46 // MACROS
       
    47 
       
    48 // DATA TYPES
       
    49 
       
    50 // FORWARD DECLARATIONS
       
    51 class CDRMPermission;
       
    52 class RFs;
       
    53 class CMD5;
       
    54 class RReadStream;
       
    55 class RWriteStream;
       
    56 class CLogFile;
       
    57 class CDRMRightsCleaner;
       
    58 class CDRMRightsServer;
       
    59 class CDcfRep;
       
    60 
       
    61 // FUNCTION PROTOTYPES
       
    62 
       
    63 // CLASS DECLARATION
       
    64 
       
    65 /**
       
    66 *  CDRMRightsDB implements the rights database required by DRM Engine
       
    67 *
       
    68 *  @lib RightsServer.dll
       
    69 *  @since 2.5
       
    70 */
       
    71 
       
    72 NONSHARABLE_CLASS( CDRMRightsDB ) : public CBase , 
       
    73                                     public MDRMBackupInterface
       
    74     {
       
    75     public: // Constructors and destructor
       
    76         
       
    77         /**
       
    78         * NewLC
       
    79         *
       
    80         * Creates an instance of the CDRMRightDB class and returns a pointer 
       
    81         * to it The function leaves the object into the cleanup stack
       
    82         *
       
    83         * @since  3.0
       
    84         * @param  aFs : Open file server session
       
    85         * @param  aDatabasePath : full pathname of the database path
       
    86         * @param  aKey : content encryption key 16 bytes in length.
       
    87         * @param  aImei: device serial number (used for UDT)
       
    88         * @return Functional CDRMRightsDB object, Function leaves if an error 
       
    89         *         occurs.
       
    90         */
       
    91         static CDRMRightsDB* NewLC( RFs& aFs,
       
    92                                     const TDesC& aDatabasePath,
       
    93                                     const TDesC8& aKey,
       
    94                                     const TDesC& aImei );
       
    95         
       
    96         /**
       
    97         * NewL
       
    98         *
       
    99         * Creates an instance of the CDRMRightDB class and returns a pointer
       
   100         * to it
       
   101         *
       
   102         * @since  3.0
       
   103         * @param  aFs : Open file server session
       
   104         * @param  aDatabasePath : full pathname of the database path
       
   105         * @param  aKey : content encryption key 16 bytes in length.
       
   106         * @param  aImei: device serial number (used for UDT)
       
   107         * @return Functional CDRMRightsDB object, Function leaves if an error
       
   108         *         occurs.
       
   109         */
       
   110         static CDRMRightsDB* NewL( RFs& aFs,
       
   111                                    const TDesC& aDatabasePath,
       
   112                                     const TDesC8& aKey,
       
   113                                     const TDesC& aImei );
       
   114           
       
   115         /**
       
   116         * Destructor
       
   117         */
       
   118         virtual ~CDRMRightsDB();
       
   119 
       
   120     public: // New functions    
       
   121         
       
   122         /**
       
   123         * GetDBEntryByContentIDL
       
   124         *
       
   125         * Gets all rights objects connected to aContentID and inserts them into
       
   126         * the pointer array aRightsList
       
   127         *
       
   128         * @since  2.5
       
   129         * @param  aContentID : content identifier
       
   130         * @param  aRightsList : pointer array of the rights object to be filled
       
   131         * @return none , Function leaves if an error occurs
       
   132         */
       
   133         void GetDBEntryByContentIDL( const TDesC8& aContentID, 
       
   134                                      RPointerArray<CDRMPermission>& aRightsList);
       
   135         
       
   136         /**
       
   137         * GetDBEntryByContentIDL
       
   138         *
       
   139         * Gets the rights object connected to aContentID with the unique
       
   140         * identifier aUniqueID and returns a pointer to it, caller must free 
       
   141         * the memory of the pointer
       
   142         *
       
   143         * @since  2.5
       
   144         * @param  aContentID : content identifier
       
   145         * @param  aUniqueID : unique identifier of the rights object
       
   146         * @return CDRMPermission pointer, Function leaves if an error occurs
       
   147         */
       
   148         CDRMPermission* GetDBEntryByContentIDL( const TDesC8& aContentID, 
       
   149                                                const TDRMUniqueID aUniqueID );
       
   150                 
       
   151         /**
       
   152         * AddDBEntryL
       
   153         *
       
   154         * Adds a new entry to the database connected with aContentID.
       
   155         *
       
   156         * @since  2.5
       
   157         * @param  aContentID : content identifier
       
   158         * @param  aRightsObject : the rights object to be added, all fields but
       
   159         *                         the unique identifier must be set that need to
       
   160         *                         be set
       
   161         * @param  aEncryptionKey : the 16 byte key used to decrypt content
       
   162         * @param  aUniqueID : the unique id of the added rights object, in/out
       
   163         *                     parameter The function will try to use aUniqueID 
       
   164         *                     as the unique id if it is not possible or 
       
   165         *                     aUniqueID is 0 a new random unique id will be 
       
   166         *                     generated
       
   167         * @return None, Function leaves if an error occurs
       
   168         */
       
   169         void AddDBEntryL( const TDesC8& aContentID, 
       
   170                           CDRMPermission& aRightsObject,
       
   171                           const TDesC8& aEncryptionKey,
       
   172                           TDRMUniqueID& aUniqueID );
       
   173                 
       
   174         /**
       
   175         * DeleteDBEntryL
       
   176         *
       
   177         * Deletes an entry from the database connected to aContentID with unique
       
   178         * identifier aUniqueID 
       
   179         *
       
   180         * @since  2.5
       
   181         * @param  aContentID : content identifier
       
   182         * @param  aUniqueID : unique identifier of the rights object
       
   183         * @return None, Function leaves if an error occurs
       
   184         */
       
   185         void DeleteDBEntryL( const TDesC8& aContentID, 
       
   186             const TDRMUniqueID aUniqueID );
       
   187                
       
   188         /**
       
   189         * DeleteDBEntryL
       
   190         *
       
   191         * Deletes all entries from the database connected to aContentID 
       
   192         *
       
   193         * @since  2.5
       
   194         * @param  aContentID : content identifier
       
   195         * @return None, Function leaves if an error occurs
       
   196         */
       
   197         void DeleteDBEntryL( const TDesC8& aContentID );
       
   198                
       
   199         /**
       
   200         * UpdateDBEntryL
       
   201         *
       
   202         * Updates an entry from the database connected to aContentID with 
       
   203         * unique identifier aUniqueID 
       
   204         *
       
   205         * @since  2.5
       
   206         * @param  aContentID : content identifier
       
   207         * @param  aRightsObject : the updated rights object
       
   208         * @return None, Function leaves if an error occurs
       
   209         */
       
   210         void UpdateDBEntryL( const TDesC8& aContentID,  
       
   211                              const CDRMPermission& aRightsObject);
       
   212         
       
   213         /**
       
   214         * ExportContentIDListL
       
   215         *
       
   216         * Exports a list of content id:s to a file
       
   217         *
       
   218         * @since  2.5
       
   219         * @param  aTempFile : return param full pathname of the temporary file
       
   220         *                     to use
       
   221         * @return None, Function leaves if an error occurs
       
   222         */
       
   223         void ExportContentIDListL( TFileName& aTempFile );
       
   224                 
       
   225         /**
       
   226         * BackupDBL
       
   227         *
       
   228         * Backups the database to aBackupDBFile and creates the warranty
       
   229         * transfer file aWTFile and encrypts it with the aKey
       
   230         *
       
   231         * @since  2.5
       
   232         * @param  aWTFile : full pathname of the warranty transfer file
       
   233         * @param  aEncryptionKey : 16 byte encryption key
       
   234         * @return None, Function leaves if an error occurs
       
   235         */
       
   236 /*        void BackupDBL( const TDesC& aWTFile, 
       
   237                         const TDesC8& aEncryptionKey );
       
   238 */               
       
   239         /**
       
   240         * MergeDBL
       
   241         *
       
   242         * Merges the backup database into the current database
       
   243         *
       
   244         * @since  2.5
       
   245         * @return None, Function leaves if an error occurs
       
   246         */
       
   247 //        void MergeDBL();
       
   248         
       
   249         /**
       
   250         * GetDecryptionKey
       
   251         *
       
   252         * Returns the decryption key for rights object connected to aContentID
       
   253         *
       
   254         * @since  2.5
       
   255         * @param  aContentID content ID
       
   256         * @return HBufC8 pointer or NULL if failed
       
   257         */
       
   258         HBufC8* GetDecryptionKeyL( const TDesC8& aContentID );
       
   259                 
       
   260         /**
       
   261         * DeleteDBL
       
   262         *
       
   263         * Deletes the rights database file and creates an empty file in it's
       
   264         * place
       
   265         *
       
   266         * @since  2.5
       
   267         * @return can leave with a symbian error code
       
   268         */
       
   269         void DeleteDBL( void );
       
   270 
       
   271         /**
       
   272         * GetAmountOfRightsObjects
       
   273         *
       
   274         * Returns the amount of unique content id's from in the rights database
       
   275         *
       
   276         * @since  2.5
       
   277         * @return the amount of rights objects in the database
       
   278         */
       
   279         TInt32 GetAmountOfRightsObjectsL();
       
   280         
       
   281         
       
   282         /**
       
   283         * AddDomainROL
       
   284         *
       
   285         * Adds a domain rights object just the XML representation
       
   286         *
       
   287         * @since    3.0
       
   288         * @param    aRoId : The Rights object identifier of the RO
       
   289         * @param    aXmlData : The Xml data to be saved
       
   290         * @return can leave with symbian on error code
       
   291         */
       
   292         void AddDomainROL( const TDesC8& aRoId, const TDesC8& aXmlData );
       
   293         
       
   294         /**
       
   295         * GetDomainROL
       
   296         *
       
   297         * Gets a domain rights object just the XML representation
       
   298         *
       
   299         * @since    3.0
       
   300         * @param    aRoId : The Rights object identifier of the RO
       
   301         * @return   Domain RO Xml representation or NULL
       
   302         *           can leave with symbian on error code
       
   303         */
       
   304         HBufC8* GetDomainROL( const TDesC8& aRoId );
       
   305 
       
   306         /**
       
   307         * DeleteDomainROL
       
   308         *
       
   309         * Deletes a domain rights objects XML representation
       
   310         *
       
   311         * @since    3.0
       
   312         * @param    aRoId : The Rights object identifier of the RO
       
   313         * @return can leave with symbian on error code
       
   314         */
       
   315         void DeleteDomainROL( const TDesC8& aRoId );
       
   316 
       
   317         /**
       
   318         * DeleteExpiredPermissionsL
       
   319         * 
       
   320         * Delete expired permissions.
       
   321         *
       
   322         * @since    3.0
       
   323         * @param    aTime : current time
       
   324         * @param    aStatus : request status for the asynchronous requrest
       
   325         * @return   CDRMRightsCleaner object which is used to control the
       
   326         *           expired permissions deletion process
       
   327         */      
       
   328         CDRMRightsCleaner* DeleteExpiredPermissionsL( const TTime& aTime,
       
   329                                                       TRequestStatus& aStatus );
       
   330         
       
   331         /**
       
   332         * NameContentL
       
   333         * 
       
   334         * Give a name to the content, if the name is empty the content name
       
   335         * will be cleared
       
   336         *
       
   337         * @since    3.0
       
   338         * @param    aContentId : content identifier
       
   339         * @param    aName : the name for the content        
       
   340         * @return   None
       
   341         * @leave	Leaves with KErrNotFound if the content doesn't exist
       
   342         */      
       
   343         void NameContentL( const TDesC8& aContentId,
       
   344         				   const TDesC& aName );
       
   345 
       
   346         /**
       
   347         * ContentNameL
       
   348         * 
       
   349         * Returns a pointer to the name of the content and leaves it in the
       
   350         * cleanup stack
       
   351         *
       
   352         * @since    3.0
       
   353         * @param    aContentId : content identifier       
       
   354         * @return   the name of the content in a HBufC*
       
   355         * @leave	Leaves with KErrNotFound if the content doesn't exist        
       
   356         */          
       
   357         HBufC* ContentNameLC( const TDesC8& aContentID );
       
   358         
       
   359         /**
       
   360         * DeleteExpiredL
       
   361         * 
       
   362         * Delete expired from the current file store
       
   363         *
       
   364         * @since    3.0
       
   365         * @param    aFileName : name of the permission file store
       
   366         * @param    aTime : current time.
       
   367         * @return   TBool : ETrue if the file can be deleted
       
   368         *                   EFalse if the file can't be deleted
       
   369         */         
       
   370         TBool DeleteExpiredL( const TFileName& aFileName,
       
   371                              const TTime& aTime );     
       
   372   
       
   373         /**
       
   374         * GetUdtDataL
       
   375         *
       
   376         * Gets the udt data from a restore file if it exists
       
   377         * if not it leaves with KErrNotFound
       
   378         *
       
   379         * @since    3.0
       
   380         * @param    aStream : the stream to write to
       
   381         * @return   HBufC8* with the UDT data encrypted with the udt public key
       
   382         * @leave Can leave with a Symbian OS error code
       
   383         */
       
   384         HBufC8* GetUdtDataLC();  
       
   385   
       
   386         /**
       
   387         * InitiateUdtL
       
   388         *
       
   389         * Initiates the User Data Transfer
       
   390         *
       
   391         * @since    3.0
       
   392         * @param    aKey : the key used to encrypt the data encrypted with
       
   393         *                  the device public key
       
   394         * @return   none
       
   395         * @leave Can leave with a Symbian OS error code
       
   396         */
       
   397         void InitiateUdtL( const TDesC8& aKey );    
       
   398 
       
   399         /**
       
   400         * CleanUdtData
       
   401         *
       
   402         * Deletes the restore file if it exists
       
   403         *
       
   404         * @since    3.0
       
   405         * @return None
       
   406         */ 
       
   407         void CleanUdtData(); 
       
   408         
       
   409         /**
       
   410         * GetContentIDListL
       
   411         *
       
   412         * Get a list of all the content id's in the database
       
   413         *
       
   414         * @since  2.5
       
   415         * @param  aArray : The pointer array has all the content id's
       
   416         *                  that have been added to the rights database
       
   417         * @return None, Function leaves if an error occurs
       
   418         */
       
   419         void GetContentIDListL( RPointerArray<HBufC8>& aArray );
       
   420 
       
   421         /**
       
   422         * SetAuthenticationSeedL
       
   423         * 
       
   424         * Set the authentication seed for a content ID
       
   425         *
       
   426         * @since    3.0
       
   427         * @param    aContentId : content identifier
       
   428         * @param    aSeed : value for the seed
       
   429         * @return   None
       
   430         * @leave	Leaves with KErrNotFound if the content doesn't exist
       
   431         */      
       
   432         void SetAuthenticationSeedL( const TDesC8& aContentId,
       
   433         				             const TDesC8& aSeed );
       
   434 
       
   435         /**
       
   436         * GetAuthenticationSeedL
       
   437         * 
       
   438         * Get the authentication seed for a content ID
       
   439         *
       
   440         * @since    3.0
       
   441         * @param    aContentId : content identifier
       
   442         * @return   value for the seed
       
   443         * @leave	Leaves with KErrNotFound if the content doesn't exist
       
   444         */      
       
   445         HBufC8* GetAuthenticationSeedL( const TDesC8& aContentID );
       
   446         				               
       
   447         // test function
       
   448         void CreateDummyUDTFileL();        
       
   449            
       
   450     public: // Inherited from MDRMBackupInterface
       
   451     
       
   452         /**
       
   453         * BackupContentToFileL
       
   454         *
       
   455         * Backups content to file in encrypted format
       
   456         *
       
   457         * @since    3.0
       
   458         * @param    aBackupFile : File handle to the backup file
       
   459         * @param    aEncryptionKey : the key to use to encrypt the backup file
       
   460         * @leave    Symbian OS error code if an error occurs 
       
   461         */
       
   462         virtual void BackupContentToFileL( RFile& aBackupFile,
       
   463                                            const TDesC8& aEncryptionKey, 
       
   464                                            const TInt aMode = KDRMNormalBackup );
       
   465 
       
   466         /**
       
   467         * RestoreContentFromFileL
       
   468         *
       
   469         * Restores the content file from encrypted format
       
   470         *
       
   471         * @since    3.0
       
   472         * @param    aBackupFile : File handle to backup file
       
   473         * @param    aEncryptionKey : the key to use to encrypt the backup file
       
   474         * @leave    Symbian OS error code if an error occurs 
       
   475         */                           
       
   476         virtual void RestoreContentFromFileL( RFile& aBackupFile,
       
   477                                               const TDesC8& aEncryptionKey,
       
   478                                               const TInt aMode = KDRMNormalBackup );    
       
   479         
       
   480         
       
   481         /**
       
   482         * Updating
       
   483         *
       
   484         * Returns the ETrue if the database is being updated
       
   485         *
       
   486         * @since    3.0
       
   487         * @param    aStream : the stream to write to
       
   488         * @return   ETrue if files are currently modified in the DB
       
   489         */
       
   490         TBool Updating();
       
   491 
       
   492         /**
       
   493         * MarkAsCorrupted
       
   494         *
       
   495         * Marks the rights database as corrupted, to be deleted on reboot
       
   496         *
       
   497         * @since    3.0
       
   498         */
       
   499         void MarkAsCorrupted();
       
   500 
       
   501     private:
       
   502         /**
       
   503         * Default Constructor - First phase. Prevented.
       
   504         */
       
   505         CDRMRightsDB(); 
       
   506     
       
   507         /**
       
   508         * Default Constructor - First phase.
       
   509         */
       
   510         CDRMRightsDB( RFs& aFs ); 
       
   511         
       
   512         /**
       
   513         * ConstructL
       
   514         *
       
   515         * Second phase constructor
       
   516         *
       
   517         * @since  2.5
       
   518         * @param  aDatabasePath : full pathname of the database
       
   519         * @param  aKey : database encryption key
       
   520         * @param  aImei: device serial number (used for UDT)
       
   521         * @return Leaves if an error occurs
       
   522         */  
       
   523         void ConstructL( const TDesC& aDatabasePath,
       
   524                          const TDesC8& aKey,
       
   525                          const TDesC& aImei );
       
   526 
       
   527         /**
       
   528         * Assignment operator - Prevented
       
   529         */
       
   530         CDRMRightsDB& operator =( const CDRMRightsDB& );    
       
   531     
       
   532         /**
       
   533         * Copy constructor - Prevented
       
   534         */
       
   535         CDRMRightsDB( const CDRMRightsDB& );                
       
   536        
       
   537 
       
   538         /**
       
   539         * InitializeDatabaseL
       
   540         *
       
   541         * Initializes the database for usage
       
   542         *
       
   543         * @since  2.5
       
   544         * @return Leaves if an error occurs.
       
   545         */  
       
   546         void InitializeDatabaseL( void );
       
   547     
       
   548         /**
       
   549         * HashContentID
       
   550         *
       
   551         * Fills the aRightsObject with the correct data from aData and checks if the
       
   552         * rights object can be restored or not.
       
   553         *
       
   554         * @since    3.0  
       
   555         * @param    aHashKey  : hashed key, out parameter
       
   556         * @param    aContentID : the content id to be hashed
       
   557         * @return   None
       
   558         */      
       
   559         void HashContentID( TPtrC8& aHashKey, const TDesC8& aContentID );
       
   560 
       
   561             
       
   562         /**
       
   563         * GetRightsFileNameL
       
   564         * 
       
   565         * Gets the whole path of the permissions file
       
   566         *
       
   567         * @since    3.0
       
   568         * @param    aContentID : the content id to look for
       
   569         * @param    aPath : return parameter for the filename
       
   570         * @return   None, leaves with SymbianOS error code or DRMCommon error
       
   571         *           code if an error occurs
       
   572         */      
       
   573         void GetRightsFileNameL(
       
   574             const TDesC8& aContentID,
       
   575             TFileName& aPath);
       
   576 
       
   577         /**
       
   578         * GetXMLFileNameL
       
   579         * 
       
   580         * Gets the whole path of the domain rights object XML representation
       
   581         *
       
   582         * @since    3.0
       
   583         * @param    aRoID : the rights object id to look for
       
   584         * @param    aPath : return parameter for the filename
       
   585         * @return   None, leaves with SymbianOS error code or DRMCommon error
       
   586         *           code if an error occurs
       
   587         */    
       
   588         void GetXMLFileNameL(
       
   589             const TDesC8& aRoID,
       
   590             TFileName& aPath);
       
   591             
       
   592         /**
       
   593         * ModifyKey
       
   594         * 
       
   595         * Encrypts or decrypts the key
       
   596         *
       
   597         * @since    3.0
       
   598         * @param    aKey : the key to be encrypted or decrypted
       
   599         * @return   None
       
   600         */      
       
   601         void ModifyKey( TDesC8& aKey );
       
   602         
       
   603         /**
       
   604         * AddUDTDataL
       
   605         *
       
   606         * Adds user data transfer data to the header part of the backup
       
   607         * file
       
   608         *
       
   609         * @since    3.0
       
   610         * @param    aStream : the stream to write to
       
   611         * @return None
       
   612         * @leave Can leave with a Symbian OS error code
       
   613         */
       
   614         void AddUDTDataL( RWriteStream& aStream );         
       
   615         
       
   616         // Helper function to do encryption to the stream
       
   617         void WriteEncryptedStreamL( RWriteStream& aStream,
       
   618                                     const TDesC8& aMessageData,
       
   619                                     TDes8& aIv, 
       
   620                                     TDes8& aRemainder,
       
   621                                     HBufC8*& aEncryptionBuffer,
       
   622                                     TInt& aBytesWritten );       
       
   623 
       
   624         // Helper function to do encryption to the stream
       
   625         void FinalizeEncryptedStreamL( RWriteStream& aStream,
       
   626                                        TDes8& aIv, 
       
   627                                        TDes8& aRemainder,
       
   628                                        HBufC8*& aEncryptionBuffer,
       
   629                                        TInt& aBytesWritten ); 
       
   630         
       
   631         // Aes encryption                               
       
   632         void EncryptL( const TDesC8& aIv, 
       
   633                        TPtr8& aData, 
       
   634                        TBool aAddPadding );
       
   635                       
       
   636         void DecryptL( const TDesC8& aIv, 
       
   637                        TPtr8& aData, 
       
   638                        TBool aRemovePadding,
       
   639                        const TDesC8& aEncryptionKey );   
       
   640                        
       
   641         void CheckPaddingL( const TDesC8& aData );
       
   642         
       
   643         // Helper function to read and decrypt data and reserve memory
       
   644         // for it if needed
       
   645         void ReadDataL( RFile& aStream,
       
   646                         TDes8& aEncIV,
       
   647                         TPtr8& aReadData,
       
   648                         HBufC8*& aDataBuffer,
       
   649                         TInt& dataLeft,
       
   650                         TInt size,
       
   651                         TBool aStart,
       
   652                         const TDesC8& aEncryptionKey );    
       
   653         
       
   654         // check if the file can be deleted:                
       
   655         void CheckCleanup( const TDesC& aFileName );                                                                                      
       
   656 
       
   657     private:
       
   658         // fileserver session
       
   659         RFs& iFileServer;
       
   660     
       
   661         // rights database file, fileserver subsession
       
   662         HBufC* iDbPath;
       
   663     
       
   664         // The md5 hash algorithm implementation
       
   665         CMD5 *iHasher;
       
   666         
       
   667         // The Rights database key
       
   668         HBufC8* iKey;
       
   669         
       
   670         // mem stream for restore
       
   671         RMemReadStream iMemStream;
       
   672         
       
   673         // device serial number (used for UDT)
       
   674         HBufC* iImei;
       
   675         
       
   676         // Time stamp of the last update operation
       
   677         TTime iLastUpdate;
       
   678     };
       
   679 
       
   680 #endif      // DRMRIGHTSDB_H   
       
   681             
       
   682 // End of File