drm_plat/drm_rights_api/inc/DrmAsset.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:  Declaration of class CDRMAsset
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef DRMASSET_H
       
    20 #define DRMASSET_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <caf/caf.h>
       
    24 #include "DcfCommon.h"
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 
       
    28 const TInt KProtectedDCFKeySize = 24;
       
    29 const TInt KDcfDigestSize = 20;
       
    30 
       
    31 class RWriteStream;
       
    32 class RReadStream;
       
    33 
       
    34 // CLASS DECLARATION
       
    35 
       
    36 /**
       
    37 *  CDrmAsset: Encapsulates the content ID, the key and the hash for a RO
       
    38 *
       
    39 *  @lib    DrmRights.dll
       
    40 *  @since  3.0
       
    41 */
       
    42 class CDRMAsset: public CBase
       
    43     {
       
    44 public:
       
    45 
       
    46     IMPORT_C static CDRMAsset* NewL(void);
       
    47     IMPORT_C static CDRMAsset* NewLC(void);
       
    48     IMPORT_C virtual ~CDRMAsset(void);
       
    49     
       
    50     IMPORT_C void DuplicateL(CDRMAsset& aAsset);
       
    51     IMPORT_C void ExternalizeL(RWriteStream& aStream);
       
    52     IMPORT_C void InternalizeL(RReadStream& aStream);
       
    53     
       
    54     HBufC8* iUid;
       
    55     HBufC8* iParentRights;
       
    56     TBuf8<KDCFKeySize> iKey;
       
    57     TBuf8<KProtectedDCFKeySize> iProtectedKey;
       
    58     TBuf8<KDcfDigestSize> iDigest;
       
    59 
       
    60     TBuf8<KDCFKeySize> iAuthenticationSeed;
       
    61     TBuf8<KProtectedDCFKeySize> iProtectedAuthSeed;
       
    62     
       
    63 protected:
       
    64     CDRMAsset(void);
       
    65     };
       
    66 
       
    67 #endif      // DRMASSET_H
       
    68 
       
    69 // End of File