Checking the capability of DRM separate delivery mime-type by the device issue.
| Wed, 2006-03-15 12:24 | |
|
Hi,
I try to check whether a device supports a DRM separate delivery mime-type or not. For this I am using the CDocumentHandler class for this purpose. It has a method "CanHandleL(TDataType aPrm)". So I am doing the following things to be sure whether a device is able to handle separate delivery. //These are the mime-types which should be supported by the particular device to handle separate delivery content, I made the following arrangement only for showing the mime-checking things for which everyting is defined locally. CDocumentHandler* iDocHandler = CDocumentHandler::NewL((CEikProcess*)iEikonEnv->Process()); CleanupStack::PushL(iDocHandler); _LIT8( KMmsDrmContentCT, "application/vnd.oma.drm.content" ); // DRM Content _LIT8( KMmsDrmRightsTFCT, "aapplication/vnd.oma.drm.rights+xml" ); // DRM Rights in textual format _LIT8( KMmsDrmRightsBFCT, "application/vnd.oma.drm.rights+wbxml" ); // DRM Rights in binary format TDataType dContent(KMmsDrmContentCT); TDataType dRight(KMmsDrmRightsTFCT); TDataType dRightBin(KMmsDrmRightsBFCT); //Let me use CanHandle method checking each of these content types separately //Fail reason defined in the DocumentHandler.h //const TInt KMimeNotSupported = -12003; // No handler found TBool handled = EFalse; TRAP( err, handled = iDocHandler->CanHandleL( dContent)); if(handled) { //do something //I get here for the device which does not support separate delivery } TRAP( err, handled = iDocHandler->CanHandleL( dRight )); //I get KMimeNotSupported error for the device which actually supports DRM separate delivery TRAP( err, handled = iDocHandler->CanHandleL( dRightBin )); //Same goes here CleanupStack::PopAndDestroy(iDocHandler); //I used traping to override not showing the message by the CDocumentHandler class any warning I suspect in case there is something to do with '+xml' thing, Should it be escaped? It should be handled by the CDocumentHandler class itself. It would be great to know how to check the drm separate delivery mime types. I could check other mime types by the above mentioned ways though I did not check all. __________________ Regards, shagor |
|





