2 * Copyright (c) 2005 - 2009 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Contains the OMA DRM CAF Agent specific data types, commands
25 #include <caf/caftypes.h>
28 _LIT(KOmaDrm2AgentName, "OMA DRM Agent");
29 _LIT8(KOma1DrmMessageContentType, "application/vnd.oma.drm.message");
30 _LIT8(KOma1XmlRoContentType, "application/vnd.oma.drm.rights+xml");
31 _LIT8(KOma1WbxmlRoContentType, "application/vnd.oma.drm.rights+wbxml");
32 _LIT8(KOma2RoContentType, "application/vnd.oma.drm.roap-pdu+xml");
33 _LIT8(KOma2ProtectedRoType, "application/vnd.oma.drm.ro+xml");
34 _LIT8(KOma2TriggerContentType, "application/vnd.oma.drm.roap-trigger+xml");
35 _LIT8(KOma1DcfContentType, "application/vnd.oma.drm.content");
36 _LIT8(KOma2DcfContentType, "application/vnd.oma.drm.dcf");
37 _LIT8(KOmaImportContentType, "application/x-vnd.oma.drm.import");
38 _LIT8(KOmaImportMimeTypeField, "Content-type");
39 _LIT8(KOmaImportRightsField, "Rights");
40 _LIT8(KOma2DcfRoBoxId, "cid:Oma2DcfRightsObjectBox@localhost");
41 _LIT8(KOma2DcfTransactionBoxId, "cid:Oma2DcfTransactionBox@localhost");
42 _LIT8(KOma2DcfBranding, "\000\000\000\024ftypodcf\000\000\000\002odcf");
43 _LIT8(KCafMimeType, "application/x-caf");
44 _LIT(KOma1DcfExtension, ".dcf");
45 _LIT(KOma2DcfExtension, ".odf");
46 _LIT(KOma2DcfExtensionAudio, ".o4a");
47 _LIT(KOma2DcfExtensionVideo, ".o4v");
51 // Transport scheme for encrypted rights objects
53 enum TKeyTransportScheme
65 namespace ContentAccess
67 // Agent specific attribute identifiers
69 enum TOma2AgentAttribute
71 EFileType = EAgentSpecificAttributeBase + 1,
78 enum TOma2AgentStringAttribute
80 EInstantPreviewUri = EAgentSpecificAttributeBase + 1,
84 ETransactionTrackingId,
85 EEmbeddedRightsObject,
87 EDomainRightsIssuerUrl,
89 EDomainRightsIssuerId,
93 EOmaDrmContentLocation,
94 EOmaDrmContentVersion,
101 ELocInfoAstronomicalBody,
102 ELocInfoAdditionalNotes,
111 // EOma1DcfBased, The file type is derived from Oma1Dcf but has some extensions to it
122 enum TOmaDrmDeliveryMethod
124 EOmaDrm1LocalDataFile,
126 EOmaDrm1ForwardLockDcf,
127 EOmaDrm1CombinedDelivery,
128 EOmaDrm1CombinedDeliveryDcf,
129 EOmaDrm1SeparateDelivery,
133 // Encryption methods for OMA DRM 2 DCF files
135 enum TEncryptionMethod
138 EMethodAES_128_CBC = 0x01,
139 EMethodAES_128_CTR = 0x02
144 enum TEncryptionPadding
147 EPaddingRFC_2630 = 0x01
150 // Rights refresh and preview options
154 ENoSilentRefresh = 0x00,
162 EInstantPreview = 0x01,
163 EPreviewRights = 0x02
166 // Rights Object version (stored in the iVersionMain field of the version)
175 // Agent specific commands
180 * Embed any present domain RO into a CContent object
181 * Works as an agent specific command for CContent
182 * Input buffer: unused
183 * Output buffer: unused
188 * Return the supported OMA DRM methods
189 * Works as an agent specific command for CManager
190 * Input buffer: unused
191 * Output buffer: String containing the following tokens
192 * FL if OMA DRM 1.0 Forward Lock is supported
193 * CD if OMA DRM 1.0 Combined Delivery is supported
194 * SD if OMA DRM 1.0 Separate Delivery is supported
195 * OMADRM2 if OMA DRM 2.0 is supported
200 * Set the value of the x-oma header
201 * works as an agent specific command for CManager
202 * Input buffer: String containing the following data
203 * 4 bytes(TInt) | ContentURI
204 * Output buffer: unused
206 ESetPendingRightsETA,
209 * Checks whether a memory buffer contains an OMA DRM 1.0 DCF
210 * Input buffer: Memory buffer to check
211 * Output buffer: unused
212 * Return value: KErrNone if the buffer contains a DCF
214 EBufferContainsOma1Dcf,
217 * Decrypt an OMA DRM 1.0 DCF memory buffer
218 * Input buffer: Intent of the decryption (EPlay, ...) in the first byte,
219 * followed by the memory buffer to decrypt
220 * Output buffer: Decrypted data
222 EDecryptOma1DcfBuffer,
226 * Set the content name
227 * Input buffer: first memory buffer 4 bytes of length of the content name |
228 * memory buffer of the new content name |
230 * Output buffer: unused
237 #endif // OMA2AGENT_H