omadrm/drmengine/drmbackup/inc/DRMBackupInterface.h
changeset 0 95b198f216e5
equal deleted inserted replaced
-1:000000000000 0:95b198f216e5
       
     1 /*
       
     2 * Copyright (c) 2005 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 DRMBackup service
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef DRMBACKUPINTERFACE_H
       
    20 #define DRMBACKUPINTERFACE_H
       
    21 
       
    22 // INCLUDES
       
    23 
       
    24 // CONSTANTS
       
    25 const TInt KDRMNormalBackup    = 0;
       
    26 const TInt KDRMUDTBackup       = 1;
       
    27 
       
    28 // Backup Directory
       
    29 _LIT(KBackupDirectory, "C:\\private\\101F51F2\\backup\\");
       
    30 
       
    31 // Filename of the rights database
       
    32 _LIT( KRightsDbBackupFile, "rightsdb.bak" );
       
    33 
       
    34 // MACROS
       
    35 
       
    36 // DATA TYPES
       
    37 
       
    38 // FUNCTION PROTOTYPES
       
    39 
       
    40 // FORWARD DECLARATIONS
       
    41 class RFile;
       
    42 class TDesC8;
       
    43 // CLASS DECLARATION
       
    44 
       
    45 /**
       
    46 *  MDRMBackupInterface is the interface required to be
       
    47 *  implemented by components in DRM wanting to use
       
    48 *  active backup
       
    49 *
       
    50 *  @lib rightsserver.exe
       
    51 *  @since 3.0
       
    52 */
       
    53 
       
    54 class MDRMBackupInterface
       
    55     {
       
    56     public:
       
    57 
       
    58     /**
       
    59     * BackupContentToFileL
       
    60     *
       
    61     * Backups content to file in encrypted format
       
    62     *
       
    63     * @since    3.0
       
    64     * @param    aBackupFile : File handle to the backup file
       
    65     * @param    aEncryptionKey : the key to use to encrypt the backup file
       
    66     * @leave    Symbian OS error code if an error occurs 
       
    67     */
       
    68     virtual void BackupContentToFileL( RFile& aBackupFile,
       
    69                                        const TDesC8& aEncryptionKey, 
       
    70                                        const TInt aMode ) = 0;
       
    71 
       
    72     /**
       
    73     * RestoreContentFromFileL
       
    74     *
       
    75     * Restores the content file from encrypted format
       
    76     *
       
    77     * @since    3.0
       
    78     * @param    aBackupFile : File handle to backup file
       
    79     * @param    aEncryptionKey : the key to use to encrypt the backup file
       
    80     * @leave    Symbian OS error code if an error occurs 
       
    81     */                           
       
    82     virtual void RestoreContentFromFileL( RFile& aBackupFile,
       
    83                                           const TDesC8& aEncryptionKey,
       
    84                                           const TInt aMode ) = 0;
       
    85         
       
    86     };
       
    87 #endif      // DRMBACKUPINTERFACE_H   
       
    88             
       
    89 // End of File