commondrm/drmutility/src/drmutilitywmdrmwrapper.cpp
branchRCL_3
changeset 9 89a1f2bd800d
parent 2 76350b5be3d8
child 18 8a03a285ab14
equal deleted inserted replaced
5:79d62d1d7957 9:89a1f2bd800d
     1 /*
     1 /*
     2 * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
   670     __ASSERT_DEBUG( !aLaunchParam && aUrl,
   670     __ASSERT_DEBUG( !aLaunchParam && aUrl,
   671                     User::Panic( KWmDrmWrapperDebugPanicMessage,
   671                     User::Panic( KWmDrmWrapperDebugPanicMessage,
   672                                  KWmDrmWrapperDebugPanicCode ) );
   672                                  KWmDrmWrapperDebugPanicCode ) );
   673 
   673 
   674     _LIT( KZero, "0" );
   674     _LIT( KZero, "0" );
   675     _LIT( KSpace, " " );
   675     _LIT( KMarker, "\x00" );
   676 
   676 
   677     TPtr ptr( NULL, 0 );
   677     TPtr ptr( NULL, 0 );
   678 
   678 
   679     // length of startparam and drm protection type indicator and zero local id
   679     // length of startparam and drm protection type indicator and zero local id
   680     // are always 1 and total of 3 spaces are needed
   680     // are always 1 and total of 4 markers are needed
   681     TInt length( 1 + aUrl->Length() + 1 + 3 + 1 );
   681     TInt length( 1 + aUrl->Length() + 1 + 4 + 1 );
   682 
   682 
   683     aLaunchParam = HBufC::NewLC( length );
   683     aLaunchParam = HBufC::NewLC( length );
   684     ptr.Set( aLaunchParam->Des() );
   684     ptr.Set( aLaunchParam->Des() );
   685 
   685 
   686     // Start parameter is 3 or 4 for launching details view embedded or standalone from
   686     // Start parameter is 3 or 4 for launching details view embedded or standalone from
   692         }
   692         }
   693     else
   693     else
   694         {
   694         {
   695         ptr.AppendNum( EDrmLaunchParamStandAloneUtility );
   695         ptr.AppendNum( EDrmLaunchParamStandAloneUtility );
   696         }
   696         }
   697     ptr.Append( KSpace );
   697     ptr.Append( KMarker );
   698     // Default value 0 for localId in case of WM DRM file
   698     // Default value 0 for localId in case of WM DRM file
   699     ptr.Append( KZero );
   699     ptr.Append( KZero );
   700     ptr.Append( KSpace );
   700     ptr.Append( KMarker );
   701     ptr.Append( *aUrl );
   701     ptr.Append( *aUrl );
   702     ptr.Append( KSpace );
   702     ptr.Append( KMarker );
   703     // WM DRM protection scheme
   703     // WM DRM protection scheme
   704     ptr.AppendNum( EDrmSchemeWmDrm );
   704     ptr.AppendNum( EDrmSchemeWmDrm );
       
   705 	ptr.Append( KMarker );
   705 
   706 
   706     CleanupStack::Pop( aLaunchParam );
   707     CleanupStack::Pop( aLaunchParam );
   707     }
   708     }
   708 
   709 
   709 // -----------------------------------------------------------------------------
   710 // -----------------------------------------------------------------------------