drm_plat/drm_rights_api/inc/DRMTypes.h
changeset 0 95b198f216e5
equal deleted inserted replaced
-1:000000000000 0:95b198f216e5
       
     1 /*
       
     2 * Copyright (c) 2004 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:  Datatype definitions for DRM Rights Database
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef DRMTYPES_H
       
    20 #define DRMTYPES_H
       
    21 
       
    22 // INCLUDES
       
    23 
       
    24 #include <caf/caf.h>
       
    25 
       
    26 // CONSTANTS
       
    27 
       
    28 const TUint KDCFKeySize = 16;
       
    29 const TInt KDRMCounterMax = KMaxTInt32;
       
    30 const TInt KWrappedMacAndRekSize = 40;
       
    31 const TInt KWrappedCekSize = 24;
       
    32 const TInt KCekSize = 16;
       
    33 const TInt KMacAndRekSize = 32;
       
    34 const TInt KRiIdSize = 20;
       
    35 
       
    36 // MACROS
       
    37 
       
    38 // DATA TYPES
       
    39 
       
    40 // FORWARD DECLARATIONS
       
    41 
       
    42 // TYPE DEFINITIONS
       
    43 
       
    44 typedef TUint32 TDRMUniqueID;
       
    45 typedef TInt32 TDRMCounter;
       
    46 
       
    47 // TExportMode defines value of the export mode
       
    48 /*
       
    49 typedef enum
       
    50     {   
       
    51     EExportNone = 0;
       
    52     EExportCopy,
       
    53     EExportMove
       
    54     } TExportMode;
       
    55 */
       
    56 
       
    57 // Rights Object version
       
    58 struct TROVersion
       
    59     {
       
    60     TUint16 iVersionMain;
       
    61     TUint16 iVersionSub;
       
    62     
       
    63     TROVersion() : iVersionMain(0),iVersionSub(0) { };
       
    64     
       
    65     };
       
    66 
       
    67 // Rights type enumeration, determines the bits in the bitvector
       
    68 typedef enum 
       
    69     {
       
    70     ERightsPlay     = 0x0001,
       
    71     ERightsDisplay  = 0x0002,
       
    72     ERightsExecute  = 0x0004,
       
    73     ERightsPrint    = 0x0008,
       
    74     ERightsExport   = 0x0010,
       
    75     ERightsTopLevel = 0x0020,
       
    76     ERightsAll      = 0x003F
       
    77     } TRightsType;
       
    78 
       
    79 // Constraint type enumeration
       
    80 typedef enum 
       
    81     { 
       
    82     EConstraintNone         = 0x00000000,
       
    83     EConstraintStartTime    = 0x00000001,
       
    84     EConstraintEndTime      = 0x00000002,
       
    85     EConstraintInterval     = 0x00000004,
       
    86     EConstraintCounter      = 0x00000008,
       
    87     EConstraintTopLevel     = 0x00000010,
       
    88     EConstraintTimedCounter = 0x00000020,
       
    89     EConstraintAccumulated  = 0x00000040,
       
    90     EConstraintIndividual   = 0x00000080,
       
    91     EConstraintSystem       = 0x00000100,
       
    92     EConstraintVendor       = 0x00000200,
       
    93     EConstraintSoftware     = 0x00000400,
       
    94     EConstraintMetering     = 0x00000800,
       
    95     EConstraintNullDrmTime  = 0x10000000
       
    96     } TConstraintType;
       
    97 
       
    98 typedef enum
       
    99     {
       
   100     } TDrmIntents;
       
   101     
       
   102 typedef enum
       
   103     {
       
   104     ENoRestriction = 0x00000000,
       
   105     ENoRingingTone = 0x00000001      
       
   106     } TInfoBits;
       
   107     
       
   108 // Rights Server specific error codes    
       
   109     
       
   110 enum
       
   111     {
       
   112     KErrRightsServerRiNotRegistered = -30150,
       
   113     KErrRightsServerDomainNotRegistered = -30151,
       
   114     KErrRightsServerMacFailed = -30152
       
   115     };
       
   116 
       
   117 namespace DRMClock
       
   118     {
       
   119     // Security level of the drm clock
       
   120     typedef enum 
       
   121         {
       
   122         KSecure = 0,
       
   123         KInsecure = 1
       
   124         } ESecurityLevel;
       
   125     }
       
   126 #endif      // DRMTYPES_H   
       
   127             
       
   128 // End of File