class DRMCommon : public CBase |
DRMCommon : provides common DRM functions.
Protected Member Functions | |
---|---|
DRMCommon (void) | |
IMPORT_C void | ConstructL (void) |
IMPORT_C TInt | MapErrorCode (const TInt ) |
Public Member Enumerations | |
---|---|
enum | anonymous { EPlay = ContentAccess::EPlay, EDisplay = ContentAccess::EView, EExecute = ContentAccess::EExecute, EPrint = ContentAccess::EPrint, EInstall = ContentAccess::EInstall } |
enum |
anonymous
{
EOk = KErrNone, EGeneralError = -30100, EUnknownMIME = -30101, EVersionNotSupported = -30102, ESessionError = -30103, ENoRights = KErrCANoRights, ERightsDBCorrupted = -30105, EUnsupported = KErrCANotSupported, ERightsExpired = KErrCANoPermission, EInvalidRights = -30108, EPaddingFailed = -30109, EFileError = -30110 } |
enum | anonymous { EForwardLock = 0x0001, ECombinedDelivery = 0x0002, ESeparateDelivery = 0x0004, ESuperDistribution = 0x0008 } |
enum | TConsumeAction { EStart , EFinish } |
enum | TContentProtection { ENoDCFFile , EForwardLocked , ESuperDistributable } |
enum | TOMALevel { EOMA_None , EOMA_1_0 , EOMA_2_0 } |
IMPORT_C TInt | CheckContentRights | ( | const TDesC8 & | aContentURI, |
TUint32 | aRightsSpec | |||
) |
CheckContentRights
Takes a Content URI and a rights specification. Checks if the specified rights can be exercised with this content by looking up the content URI in the rights database and checking the stored rights.
IMPORT_C TInt | CheckFileRights | ( | const TDesC & | aFileName, |
TUint32 | aRightsSpec | |||
) |
CheckFileRights
Takes a file name and a rights specification. Opens the given file and checks if the specified rights can be exercised with this file by extracting the content URI from the file, looking up the content URI in the rights database and checking the stored rights.
IMPORT_C TInt | CheckFileRights | ( | RFile & | aFileHandle, |
TUint32 | aRightsSpec | |||
) |
CheckFileRights
Takes a file name and a rights specification. Opens the given file and checks if the specified rights can be exercised with this file by extracting the content URI from the file, looking up the content URI in the rights database and checking the stored rights.
IMPORT_C TInt | Connect | ( | void | ) |
Connect
Connect to the DRM Engine.
void |
IMPORT_C void | ConstructL | ( | void | ) | [protected] |
2nd phase constructor.
void |
IMPORT_C TInt | DataTypesCount | ( | TInt & | aCount | ) |
DataTypesCount
Returns the number of previously registered datatypes which are supported by the DRM system and associated applications.
TInt & aCount |
IMPORT_C TInt | Disconnect | ( | void | ) |
Disconnect
Disconnect the current connection.
void |
IMPORT_C TInt | GetActiveRights | ( | const TDesC8 & | aContentURI, |
TUint32 | aRightsSpec, | |||
CDRMRights *& | aRightsObject | |||
) |
GetActiveRights
Takes a Content URI and a rights specification. Finds all rights objects associated with given URI and returns a possible active one. The out parameters will contain a pointer to the found rights object. The found rights object can be expired. The details about expiration and constraints of the rights can be retrieved with the CDRMRights::GetRightsInfo function.
const TDesC8 & aContentURI | |
TUint32 aRightsSpec | |
CDRMRights *& aRightsObject |
IMPORT_C TInt | GetContentHeader | ( | const TDesC8 & | aContent, |
const TDesC8 & | aHeaderName, | |||
HBufC8 *& | aHeaderValue | |||
) |
GetContentHeader
Takes a memory buffer containing a DCF(or at least the header part of it) and a header name and returns the value of the header field in an out parameter. Return value specifies if the header has been found. Search is case insensitive.
IMPORT_C TInt | GetContentInfo | ( | const TDesC8 & | aContent, |
TContentProtection & | aProtection, | |||
HBufC8 *& | aMIMEType, | |||
HBufC8 *& | aContentURI, | |||
TUint & | aDataLength | |||
) |
GetContentInfo
Takes a memory buffer containing a DCF(or at least the header part of it) and returns the protection for this content, the MIME type, Content URI and encrypted data length in out parameters.
const TDesC8 & aContent | |
TContentProtection & aProtection | |
HBufC8 *& aMIMEType | |
HBufC8 *& aContentURI | |
TUint & aDataLength |
IMPORT_C TInt | GetContentURIList | ( | RPointerArray < HBufC8 > *& | aURIList | ) |
GetContentURIList
Returns a list of all content URIs that have rights in the rights database.
RPointerArray < HBufC8 > *& aURIList |
IMPORT_C TInt | GetDetailedContentRights | ( | const TDesC8 & | aContentURI, |
RPointerArray < CDRMRights > *& | aRightsList | |||
) |
GetDetailedContentRights
Takes a Content URI and an array out parameter. Fills the rights specification array with the available rights by looking up the content URI in the rights database and retrieving the stored rights. The array parameter will contain a list of pointers to all rights object for the given content URI. The rights objects themselves can be distinguished by their local ID.
const TDesC8 & aContentURI | |
RPointerArray < CDRMRights > *& aRightsList |
IMPORT_C TInt | GetDetailedFileRights | ( | const TDesC & | aFileName, |
RPointerArray < CDRMRights > *& | aRightsList | |||
) |
GetDetailedFileRights
Takes a file name and a rights specification. Opens the given file and fills the rights specification array with the available rights by looking up the content URI in the rights database and retrieving the stored rights. The array parameter will contain a list of pointers to all rights object for the given content URI. The rights objects themselves can be distinguished by their local ID.
const TDesC & aFileName | |
RPointerArray < CDRMRights > *& aRightsList |
IMPORT_C TInt | GetDetailedFileRights | ( | RFile & | aFileHandle, |
RPointerArray < CDRMRights > *& | aRightsList | |||
) |
GetDetailedFileRights
Takes a file name and a rights specification. Opens the given file and fills the rights specification array with the available rights by looking up the content URI in the rights database and retrieving the stored rights. The array parameter will contain a list of pointers to all rights object for the given content URI. The rights objects themselves can be distinguished by their local ID.
RFile & aFileHandle | |
RPointerArray < CDRMRights > *& aRightsList |
IMPORT_C TInt | GetFileHeader | ( | const TFileName & | aFileName, |
const TDesC8 & | aHeaderName, | |||
HBufC8 *& | aHeaderValue | |||
) |
GetFileHeader
Takes the name of a DCF file and a header name, opens the DCF file and returns the value of the header field in an out parameter. Return value specifies if the header has been found. Search is case insensitive.
IMPORT_C TInt | GetFileHeader | ( | RFile & | aFileHandle, |
const TDesC8 & | aHeaderName, | |||
HBufC8 *& | aHeaderValue | |||
) |
GetFileHeader
Takes the name of a DCF file and a header name, opens the DCF file and returns the value of the header field in an out parameter. Return value specifies if the header has been found. Search is case insensitive.
IMPORT_C TInt | GetFileInfo | ( | const TDesC & | aFileName, |
TContentProtection & | aProtection, | |||
HBufC8 *& | aMIMEType, | |||
HBufC8 *& | aContentURI, | |||
TUint & | aDataLength | |||
) |
GetFileInfo
Takes the name of a DCF file, opens it and returns the protection for this content, the MIME type, Content URI and encrypted data length in out parameters.
const TDesC & aFileName | |
TContentProtection & aProtection | |
HBufC8 *& aMIMEType | |
HBufC8 *& aContentURI | |
TUint & aDataLength |
IMPORT_C TInt | GetFileInfo | ( | RFile & | aFileHandle, |
TContentProtection & | aProtection, | |||
HBufC8 *& | aMIMEType, | |||
HBufC8 *& | aContentURI, | |||
TUint & | aDataLength | |||
) |
GetFileInfo
Takes the name of a DCF file, opens it and returns the protection for this content, the MIME type, Content URI and encrypted data length in out parameters.
RFile & aFileHandle | |
TContentProtection & aProtection | |
HBufC8 *& aMIMEType | |
HBufC8 *& aContentURI | |
TUint & aDataLength |
IMPORT_C TInt | GetSingleRightsObject | ( | const TDesC8 & | aContentURI, |
TUint32 | aLocalID, | |||
CDRMRights *& | aRightsObject | |||
) |
GetSingleRightsObject
Takes a content URI, a local ID and a rights object out parameter. Looks up the rights object using the content URI and the local ID and returns it in the out parameter.
const TDesC8 & aContentURI | |
TUint32 aLocalID | |
CDRMRights *& aRightsObject |
IMPORT_C TInt | IsProtectedContent | ( | const TDesC8 & | aContent, |
TBool & | aProtection | |||
) |
IsProtectedContent
Takes a memory buffer containing a file and checks if it is a DCF file or a regular file.
IMPORT_C TInt | IsProtectedFile | ( | const TDesC & | aFileName, |
TBool & | aProtection | |||
) |
IsProtectedFile
Takes a file name and checks if it is a DCF file or a regular file.
IMPORT_C TInt | IsProtectedFile | ( | RFile & | aFileHandle, |
TBool & | aProtection | |||
) |
IsProtectedFile
Takes a file name and checks if it is a DCF file or a regular file.
IMPORT_C TInt | MapErrorCode | ( | const TInt | aCode | ) | [protected] |
const TInt aCode |
IMPORT_C void | MergeParentAndChild | ( | CDRMRights * | aRights | ) |
MergeParentAndChild
Merge rights with their parent rights
CDRMRights * aRights | Rights to be merged with their parent rights |
IMPORT_C TInt | RegisterDataType | ( | const TDataType & | aDataType | ) |
RegisterDataType
Registers a datatype as a supported datatype.
const TDataType & aDataType |
IMPORT_C TVersion | ServerVersion | ( | void | ) | [static] |
ServerVersion
Returns the version of the DRM Engine.
void |
IMPORT_C TInt | SetContentHeader | ( | HBufC8 *& | aContent, |
const TDesC8 & | aHeaderName, | |||
const TDesC8 & | aHeaderValue | |||
) |
SetContentHeader
Takes a memory buffer containing a DCF(or at least the header part of it), a header name and the value for the header field. Sets the header field in the optional DCF header. If the header field has not existed before, it is created. Any previous value of the header field will be overwritten.
IMPORT_C TInt | SetFileHeader | ( | const TDesC16 & | aFileName, |
const TDesC8 & | aHeaderName, | |||
const TDesC8 & | aHeaderValue | |||
) |
SetFileHeader
Takes the name of a DCF file, a header name and the value for the header field. Opens the DCF file, sets the header field in the optional DCF header and writes the DCF file. If the header field has not existed before, it is created. Any previous value of the header field will be overwritten.
IMPORT_C TInt | SetFileHeader | ( | RFile & | aFileHandle, |
const TDesC8 & | aHeaderName, | |||
const TDesC8 & | aHeaderValue | |||
) |
SetFileHeader
Takes the name of a DCF file, a header name and the value for the header field. Opens the DCF file, sets the header field in the optional DCF header and writes the DCF file. If the header field has not existed before, it is created. Any previous value of the header field will be overwritten.
IMPORT_C TInt | StaticDataTypesCount | ( | TInt & | aCount | ) |
StaticDataTypesCount
Returns the number of default registered datatypes which are supported by the DRM system and associated applications.
TInt & aCount |
IMPORT_C TInt | SupportedDRMMethods | ( | TInt & | aDRMMethod, |
TOMALevel & | aOMALevel | |||
) |
SupportedDRMMethods
Returns the supported DRM protection methods and the OMA compliance level of the DRM engine
IMPORT_C TInt | SupportedDataType | ( | const TInt | aIndex, |
TDataType & | aDataType | |||
) |
SupportedDataType
Returns a specific datatype which has been registered before by giving an index
IMPORT_C TInt | UnRegisterDataType | ( | const TInt | aIndex | ) |
UnRegisterDataType
Unregisters a datatype via its index.
const TInt aIndex |
IMPORT_C TVersion | Version | ( | void | ) | [static] |
Version
Returns the version of this API.
void |
EPlay = ContentAccess::EPlay | |
EDisplay = ContentAccess::EView | |
EExecute = ContentAccess::EExecute | |
EPrint = ContentAccess::EPrint | |
EInstall = ContentAccess::EInstall |
EOk = KErrNone | |
EGeneralError = -30100 | |
EUnknownMIME = -30101 | |
EVersionNotSupported = -30102 | |
ESessionError = -30103 | |
ENoRights = KErrCANoRights | |
ERightsDBCorrupted = -30105 | |
EUnsupported = KErrCANotSupported | |
ERightsExpired = KErrCANoPermission | |
EInvalidRights = -30108 | |
EPaddingFailed = -30109 | |
EFileError = -30110 |
EForwardLock = 0x0001 | |
ECombinedDelivery = 0x0002 | |
ESeparateDelivery = 0x0004 | |
ESuperDistribution = 0x0008 |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.