drm_plat/roap_api/inc/RoapDef.h
changeset 0 95b198f216e5
equal deleted inserted replaced
-1:000000000000 0:95b198f216e5
       
     1 /*
       
     2 * Copyright (c) 2002-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:  ?Description
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef ROAP_DEF_H
       
    21 #define ROAP_DEF_H
       
    22 
       
    23 #include <e32def.h>
       
    24 
       
    25 // MIME-TYPES
       
    26 
       
    27 // The content type for ROAP protocol data unit
       
    28 _LIT8( KRoapPDUType, "application/vnd.oma.drm.roap-pdu+xml" );
       
    29 
       
    30 // The content type for multipart-mixed 
       
    31 _LIT8( KMultipartMixedType, "multipart/mixed" );
       
    32 
       
    33 // The content type for multipart-related 
       
    34 _LIT8( KMultipartRelatedType, "multipart/related" );
       
    35 
       
    36 _LIT8( KRoapVersion, "1.0" );
       
    37 
       
    38 _LIT8( KRoapCmlaRootHash, "GUZDJRYDWAs7KB4Wz7uz2K58WtA=" );
       
    39 _LIT8( KRoapCmlaRnDRootHashOld, "lipo7D75LumzfXEnbiCIdlmHvKE=" );
       
    40 _LIT8( KRoapCmlaRnDRootHash, "lrfbGaTQWkvI46UciFCI5nk1RGk=" );
       
    41 
       
    42 
       
    43 LOCAL_D const TInt KRoapTransIdLength = 16;
       
    44 // Amout of algorithms
       
    45 LOCAL_D const TInt KRoapAlgorithmCount = 7;
       
    46 
       
    47 _LIT(KOmaDrmOid, "2.23.43.6");
       
    48 _LIT(KOmaKpOid, "2.23.43.6.1");
       
    49 _LIT(KOmaKpRightsIssuerOid, "2.23.43.6.1.1");
       
    50 _LIT(KOmaKpDrmAgentOid, "2.23.43.6.1.1");
       
    51 
       
    52 // ROAP ERROR CODES
       
    53 
       
    54 LOCAL_D const TInt KErrRoapGeneral = -30341;
       
    55 
       
    56 LOCAL_D const TInt KErrRoapUnsupported = -30342;
       
    57 
       
    58 LOCAL_D const TInt KErrRoapServer = -30343;
       
    59 
       
    60 LOCAL_D const TInt KErrRoapServerFatal = -30344;
       
    61 
       
    62 LOCAL_D const TInt KErrRoapDevice = -30345;
       
    63 
       
    64 LOCAL_D const TInt KErrRoapInvalidDomain = -30346;
       
    65 
       
    66 LOCAL_D const TInt KErrRoapDomainFull = -30347;
       
    67 
       
    68 LOCAL_D const TInt KErrRoapNotRegistered = -30348;
       
    69 
       
    70 // ROAP protocol phases
       
    71 
       
    72 LOCAL_D const TInt KRoapProgressDelta = 1024;
       
    73 LOCAL_D const TInt KRoapProgressMax = 8192;
       
    74 
       
    75 enum
       
    76 		{
       
    77 		KErrRoapPermanent = 1,
       
    78 		KErrRoapTemporary = 2
       
    79 		};
       
    80 
       
    81 enum
       
    82     {
       
    83     ERoapStarted = 1,
       
    84     ERoapRegistering = 2,
       
    85     ERightsAcquisition = 3,
       
    86     EDomainJoining = 4,
       
    87     EDomainLeaving = 5,
       
    88     ERoapCompleted = 6,
       
    89     ERoapError = 7
       
    90     };
       
    91     
       
    92 // ROAP features
       
    93 // #define _DISABLE_SIGNATURE_CHECK
       
    94 // #define _DISABLE_OCSP_CHECK
       
    95 // #define _DISABLE_CERT_CHECK
       
    96 // #define _DISABLE_HASH_CHAIN_GENERATION // Use of Hash Chains for Domain Key Generation
       
    97 #define _DISABLE_DRM_TIME_UPDATE_CHECK // Checks that the OCSP responder's cert chain is signed by CMLA
       
    98 
       
    99 #endif // ROAP_DEF_H