commondrm/drmutility/src/drmutilitywmdrmwrapper.cpp
changeset 49 69d8e75812b7
parent 29 3bdc3b853094
child 69 5ce76b969369
equal deleted inserted replaced
48:c68061d56109 49:69d8e75812b7
    53 
    53 
    54 #include    "drmutilityinternaltypes.h"
    54 #include    "drmutilityinternaltypes.h"
    55 #include    "drmutilitywmdrmutilities.h"
    55 #include    "drmutilitywmdrmutilities.h"
    56 
    56 
    57 #include    "wmdrmdlawrapper.h"
    57 #include    "wmdrmdlawrapper.h"
       
    58 #include    "drmuidialogids.h"
    58 
    59 
    59 // CONSTANTS
    60 // CONSTANTS
    60 const TInt KMaxUrlLength( 1024 );
    61 const TInt KMaxUrlLength( 1024 );
    61 const TInt KMaxUrlSanityLength( 102400 );
    62 const TInt KMaxUrlSanityLength( 102400 );
    62 
    63 
   544     TUint32 /*aReason*/ )
   545     TUint32 /*aReason*/ )
   545     {
   546     {
   546     TRAPD( err, LoadDlaWrapperL() );
   547     TRAPD( err, LoadDlaWrapperL() );
   547     if ( !err )
   548     if ( !err )
   548         {
   549         {
   549         TInt ret( EAknSoftkeyYes );
   550         TInt ret( EOk );
   550         RFile file;
   551         RFile file;
   551         GetRFileFromCDataL( aContent, file );
   552         GetRFileFromCDataL( aContent, file );
   552         CleanupClosePushL( file );
   553         CleanupClosePushL( file );
   553         TBool isSilent( EFalse );
   554         TBool isSilent( EFalse );
   554         TRAP( err, isSilent = IsDlaLicenseAcquisitionSilentL( file ) );
   555         TRAP( err, isSilent = IsDlaLicenseAcquisitionSilentL( file ) );
   558                 {
   559                 {
   559                 iDrmUtilityUi = DRM::CDrmUtilityUI::NewL( iCoeEnv );
   560                 iDrmUtilityUi = DRM::CDrmUtilityUI::NewL( iCoeEnv );
   560                 }
   561                 }
   561             TFileName fileName;
   562             TFileName fileName;
   562             User::LeaveIfError( aContent.GetStringAttribute( DRM::EDrmFileName, fileName ) );
   563             User::LeaveIfError( aContent.GetStringAttribute( DRM::EDrmFileName, fileName ) );
   563             ret = iDrmUtilityUi->DisplayQueryL( R_DRM_QUERY_EXPIRED_OR_NO_RO, fileName );
   564             // Qt dialog not implemented yet
   564             }
   565             ret = iDrmUtilityUi->DisplayQueryL( EQueryFileWithNoRightsObj, fileName );
   565 
   566             }
   566         if ( !err && ( ret == EAknSoftkeyYes || ret == EAknSoftkeyOk ) )
   567 
       
   568         if ( !err && ret == EOk )
   567             {
   569             {
   568             TRAP_IGNORE( DlaLicenseAcquisitionL( file ) );
   570             TRAP_IGNORE( DlaLicenseAcquisitionL( file ) );
   569             }
   571             }
   570         CleanupStack::PopAndDestroy( &file );
   572         CleanupStack::PopAndDestroy( &file );
   571         }
   573         }
   573         {
   575         {
   574         if ( !iDrmUtilityUi )
   576         if ( !iDrmUtilityUi )
   575             {
   577             {
   576             iDrmUtilityUi = DRM::CDrmUtilityUI::NewL( iCoeEnv );
   578             iDrmUtilityUi = DRM::CDrmUtilityUI::NewL( iCoeEnv );
   577             }
   579             }
   578         iDrmUtilityUi->DisplayNoteL( R_DRM_INFO_EXPIRED_OR_NO_RO );
   580         iDrmUtilityUi->DisplayNoteL( EConfLicenceExpired );
   579         }
   581         }
   580     }
   582     }
   581 
   583 
   582 // -----------------------------------------------------------------------------
   584 // -----------------------------------------------------------------------------
   583 // CDrmUtilityWMDrmWrapper::RejectReason
   585 // CDrmUtilityWMDrmWrapper::RejectReason