1.1 --- a/epoc32/include/mw/oma2agent.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/mw/oma2agent.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,239 @@
1.4 -oma2agent.h
1.5 +/*
1.6 +* Copyright (c) 2005 - 2009 Nokia Corporation and/or its subsidiary(-ies).
1.7 +* All rights reserved.
1.8 +* This component and the accompanying materials are made available
1.9 +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.10 +* which accompanies this distribution, and is available
1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.12 +*
1.13 +* Initial Contributors:
1.14 +* Nokia Corporation - initial contribution.
1.15 +*
1.16 +* Contributors:
1.17 +*
1.18 +* Description: Contains the OMA DRM CAF Agent specific data types, commands
1.19 +* and attributes
1.20 +*
1.21 +*/
1.22 +
1.23 +
1.24 +
1.25 +#ifndef OMA2AGENT_H
1.26 +#define OMA2AGENT_H
1.27 +
1.28 +// INCLUDES
1.29 +#include <caf/caftypes.h>
1.30 +
1.31 +// CONSTANTS
1.32 +_LIT(KOmaDrm2AgentName, "OMA DRM Agent");
1.33 +_LIT8(KOma1DrmMessageContentType, "application/vnd.oma.drm.message");
1.34 +_LIT8(KOma1XmlRoContentType, "application/vnd.oma.drm.rights+xml");
1.35 +_LIT8(KOma1WbxmlRoContentType, "application/vnd.oma.drm.rights+wbxml");
1.36 +_LIT8(KOma2RoContentType, "application/vnd.oma.drm.roap-pdu+xml");
1.37 +_LIT8(KOma2ProtectedRoType, "application/vnd.oma.drm.ro+xml");
1.38 +_LIT8(KOma2TriggerContentType, "application/vnd.oma.drm.roap-trigger+xml");
1.39 +_LIT8(KOma1DcfContentType, "application/vnd.oma.drm.content");
1.40 +_LIT8(KOma2DcfContentType, "application/vnd.oma.drm.dcf");
1.41 +_LIT8(KOmaImportContentType, "application/x-vnd.oma.drm.import");
1.42 +_LIT8(KOmaImportMimeTypeField, "Content-type");
1.43 +_LIT8(KOmaImportRightsField, "Rights");
1.44 +_LIT8(KOma2DcfRoBoxId, "cid:Oma2DcfRightsObjectBox@localhost");
1.45 +_LIT8(KOma2DcfTransactionBoxId, "cid:Oma2DcfTransactionBox@localhost");
1.46 +_LIT8(KOma2DcfBranding, "\000\000\000\024ftypodcf\000\000\000\002odcf");
1.47 +_LIT8(KCafMimeType, "application/x-caf");
1.48 +_LIT(KOma1DcfExtension, ".dcf");
1.49 +_LIT(KOma2DcfExtension, ".odf");
1.50 +_LIT(KOma2DcfExtensionAudio, ".o4a");
1.51 +_LIT(KOma2DcfExtensionVideo, ".o4v");
1.52 +
1.53 +// DATA TYPES
1.54 +
1.55 +// Transport scheme for encrypted rights objects
1.56 +
1.57 +enum TKeyTransportScheme
1.58 + {
1.59 + EOma,
1.60 + ECmlaIp1,
1.61 + ECmlaIp2,
1.62 + ECmlaIp3,
1.63 + ECmlaIp4,
1.64 + ECmlaIp5,
1.65 + ECmlaIp6,
1.66 + ECmlaIp7,
1.67 + };
1.68 +
1.69 +namespace ContentAccess
1.70 +{
1.71 +// Agent specific attribute identifiers
1.72 +
1.73 +enum TOma2AgentAttribute
1.74 + {
1.75 + EFileType = EAgentSpecificAttributeBase + 1,
1.76 + EPreviewType,
1.77 + ESilentRightsType,
1.78 + EDeliveryMethod,
1.79 + ERecordingYear
1.80 + };
1.81 +
1.82 +enum TOma2AgentStringAttribute
1.83 + {
1.84 + EInstantPreviewUri = EAgentSpecificAttributeBase + 1,
1.85 + EPreviewRightsUri,
1.86 + ERightsIssuerUrl,
1.87 + ESilentRightsUrl,
1.88 + ETransactionTrackingId,
1.89 + EEmbeddedRightsObject,
1.90 + EGroupId,
1.91 + EDomainRightsIssuerUrl,
1.92 + EDomainId,
1.93 + EDomainRightsIssuerId,
1.94 + EContentVendor,
1.95 + ECopyright,
1.96 + EContentName,
1.97 + EOmaDrmContentLocation,
1.98 + EOmaDrmContentVersion,
1.99 + EPerformer,
1.100 + EOmaDrmGenre,
1.101 + ERatingInfo,
1.102 + EClassificationInfo,
1.103 + EKeyword,
1.104 + ELocInfoName,
1.105 + ELocInfoAstronomicalBody,
1.106 + ELocInfoAdditionalNotes,
1.107 + EAlbumTitle,
1.108 + EAlbumTrack,
1.109 + ECoverUri,
1.110 + ELyricsUrl,
1.111 + EFileName
1.112 + };
1.113 +
1.114 +// File types
1.115 +// EOma1DcfBased, The file type is derived from Oma1Dcf but has some extensions to it
1.116 +enum
1.117 + {
1.118 + ENoDcf = 0,
1.119 + EOma1Dcf = 1,
1.120 + EOma2Dcf = 2,
1.121 + EOma1DcfBased = 4
1.122 + };
1.123 +
1.124 +// Delivery method
1.125 +
1.126 +enum TOmaDrmDeliveryMethod
1.127 + {
1.128 + EOmaDrm1LocalDataFile,
1.129 + EOmaDrm1ForwardLock,
1.130 + EOmaDrm1ForwardLockDcf,
1.131 + EOmaDrm1CombinedDelivery,
1.132 + EOmaDrm1CombinedDeliveryDcf,
1.133 + EOmaDrm1SeparateDelivery,
1.134 + EOmaDrm2
1.135 + };
1.136 +
1.137 +// Encryption methods for OMA DRM 2 DCF files
1.138 +
1.139 +enum TEncryptionMethod
1.140 + {
1.141 + EMethodNULL = 0x00,
1.142 + EMethodAES_128_CBC = 0x01,
1.143 + EMethodAES_128_CTR = 0x02
1.144 + };
1.145 +
1.146 +// Padding options
1.147 +
1.148 +enum TEncryptionPadding
1.149 + {
1.150 + EPaddingNone = 0x00,
1.151 + EPaddingRFC_2630 = 0x01
1.152 + };
1.153 +
1.154 +// Rights refresh and preview options
1.155 +
1.156 +enum TSilentRefresh
1.157 + {
1.158 + ENoSilentRefresh = 0x00,
1.159 + EOnDemand = 0x01,
1.160 + EInAdvance = 0x02
1.161 + };
1.162 +
1.163 +enum TPreview
1.164 + {
1.165 + ENoPreview = 0x00,
1.166 + EInstantPreview = 0x01,
1.167 + EPreviewRights = 0x02
1.168 + };
1.169 +
1.170 +// Rights Object version (stored in the iVersionMain field of the version)
1.171 +
1.172 +enum
1.173 + {
1.174 + EOma1Rights = 1,
1.175 + EOma2Rights = 2,
1.176 + ECmlaRights = 3
1.177 + };
1.178 +
1.179 +// Agent specific commands
1.180 +
1.181 +enum
1.182 + {
1.183 + /**
1.184 + * Embed any present domain RO into a CContent object
1.185 + * Works as an agent specific command for CContent
1.186 + * Input buffer: unused
1.187 + * Output buffer: unused
1.188 + */
1.189 + EEmbedDomainRo,
1.190 +
1.191 + /**
1.192 + * Return the supported OMA DRM methods
1.193 + * Works as an agent specific command for CManager
1.194 + * Input buffer: unused
1.195 + * Output buffer: String containing the following tokens
1.196 + * FL if OMA DRM 1.0 Forward Lock is supported
1.197 + * CD if OMA DRM 1.0 Combined Delivery is supported
1.198 + * SD if OMA DRM 1.0 Separate Delivery is supported
1.199 + * OMADRM2 if OMA DRM 2.0 is supported
1.200 + */
1.201 + EOmaDrmMethods,
1.202 +
1.203 + /**
1.204 + * Set the value of the x-oma header
1.205 + * works as an agent specific command for CManager
1.206 + * Input buffer: String containing the following data
1.207 + * 4 bytes(TInt) | ContentURI
1.208 + * Output buffer: unused
1.209 + */
1.210 + ESetPendingRightsETA,
1.211 +
1.212 + /**
1.213 + * Checks whether a memory buffer contains an OMA DRM 1.0 DCF
1.214 + * Input buffer: Memory buffer to check
1.215 + * Output buffer: unused
1.216 + * Return value: KErrNone if the buffer contains a DCF
1.217 + */
1.218 + EBufferContainsOma1Dcf,
1.219 +
1.220 + /**
1.221 + * Decrypt an OMA DRM 1.0 DCF memory buffer
1.222 + * Input buffer: Intent of the decryption (EPlay, ...) in the first byte,
1.223 + * followed by the memory buffer to decrypt
1.224 + * Output buffer: Decrypted data
1.225 + */
1.226 + EDecryptOma1DcfBuffer,
1.227 +
1.228 +
1.229 + /**
1.230 + * Set the content name
1.231 + * Input buffer: first memory buffer 4 bytes of length of the content name |
1.232 + * memory buffer of the new content name |
1.233 + * content id
1.234 + * Output buffer: unused
1.235 + */
1.236 + ESetContentName,
1.237 +
1.238 + };
1.239 +}
1.240 +
1.241 +#endif // OMA2AGENT_H
1.242 +
1.243 +// End of File