23 #include "DRMHelperInfoNoteWrapper.h" |
23 #include "DRMHelperInfoNoteWrapper.h" |
24 #include "DRMRightsClient.h" |
24 #include "DRMRightsClient.h" |
25 #include "DcfCommon.h" |
25 #include "DcfCommon.h" |
26 #include "DRMHelperDownloadManager.h" |
26 #include "DRMHelperDownloadManager.h" |
27 |
27 |
28 #include <SaCls.h> |
28 #include <sacls.h> |
29 #include <DRMHelper.rsg> |
29 #include <Drmhelper.rsg> |
30 #include <AknQueryDialog.h> |
30 #include <AknQueryDialog.h> |
31 #include <DRMCommon.h> |
31 #include <DRMCommon.h> |
32 |
32 |
33 #include <StarterClient.h> |
33 #include <starterclient.h> |
34 |
34 |
35 #ifdef RD_MULTIPLE_DRIVE |
35 #ifdef RD_MULTIPLE_DRIVE |
36 #include <DriveInfo.h> |
36 #include <driveinfo.h> |
37 #endif |
37 #endif |
38 |
38 |
39 #include <StringLoader.h> |
39 #include <StringLoader.h> |
40 #include <eikproc.h> //CEikProcess |
40 #include <eikproc.h> //CEikProcess |
41 #include <eikdoc.h> //CEikDocument |
41 #include <eikdoc.h> //CEikDocument |
42 #include <documenthandler.h> // KDRMErr* |
42 #include <DocumentHandler.h> // KDRMErr* |
43 #include <aknnotewrappers.h> // information note |
43 #include <aknnotewrappers.h> // information note |
44 #include <aknglobalnote.h> // global info note |
44 #include <AknGlobalNote.h> // global info note |
45 |
45 |
46 #include <drmconstraint.h> |
46 #include <DrmConstraint.h> |
47 |
47 |
48 #include <stringresourcereader.h> |
48 #include <stringresourcereader.h> |
49 #include <apgcli.h> |
49 #include <apgcli.h> |
50 #include <data_caging_path_literals.hrh> |
50 #include <data_caging_path_literals.hrh> |
51 |
51 |
52 #include <AiwGenericParam.h> |
52 #include <AiwGenericParam.h> |
53 #include <dcfrep.h> |
53 #include <DcfRep.h> |
54 #include <DcfEntry.h> |
54 #include <DcfEntry.h> |
55 |
55 |
56 #include <caf/caf.h> |
56 #include <caf/caf.h> |
|
57 #include <caf/cafplatform.h> |
57 |
58 |
58 #include <AknLaunchAppService.h> // for launching RMUI embedded |
59 #include <AknLaunchAppService.h> // for launching RMUI embedded |
59 |
60 |
60 #include <utf.h> |
61 #include <utf.h> |
61 |
62 |
62 #include <schemehandler.h> // for handling URLs |
63 #include <SchemeHandler.h> // for handling URLs |
63 #include "drmhelperserver.h" |
64 #include "DRMHelperServer.h" |
64 #include "consumedata.h" |
65 #include "ConsumeData.h" |
65 #include "drmtypes.h" |
66 #include "DRMTypes.h" |
66 #include "drmclockclient.h" |
67 #include "DRMClockClient.h" |
67 #include "DRMPointerArray.h" |
68 #include "DRMPointerArray.h" |
68 |
69 |
69 #include <SecondaryDisplay/DRMHelperSecondaryDisplay.h> // for secondary display support |
70 #include <SecondaryDisplay/DRMHelperSecondaryDisplay.h> // for secondary display support |
70 #include <aknmediatorfacade.h> |
71 #include <AknMediatorFacade.h> |
71 #include <mediatoreventprovider.h> |
72 #include <MediatorEventProvider.h> |
72 #include <mediatordomainuids.h> |
73 #include <MediatorDomainUIDs.h> |
73 #include <featmgr.h> |
74 #include <featmgr.h> |
74 |
75 |
75 #include "RoapStorageClient.h" |
76 #include "RoapStorageClient.h" |
76 |
77 |
77 #include <centralrepository.h> |
78 #include <centralrepository.h> |
86 #include <cmdestination.h> |
87 #include <cmdestination.h> |
87 #include <cmconnectionmethoddef.h> |
88 #include <cmconnectionmethoddef.h> |
88 #include <cmmanager.h> |
89 #include <cmmanager.h> |
89 |
90 |
90 // publish & subrscibe |
91 // publish & subrscibe |
91 #include <E32Property.h> |
92 #include <e32property.h> |
92 #include <PsVariables.h> |
93 #include <PSVariables.h> |
93 |
94 |
94 #ifdef __SERIES60_NATIVE_BROWSER |
95 #ifdef __SERIES60_NATIVE_BROWSER |
95 #include <browseruisdkcrkeys.h> |
96 #include <BrowserUiSDKCRKeys.h> |
96 #endif |
97 #endif |
97 |
98 |
98 #ifndef __SERIES60_NATIVE_BROWSER |
99 #ifndef __SERIES60_NATIVE_BROWSER |
99 const TUid KCRUidBrowser = {0x10008D39}; |
100 const TUid KCRUidBrowser = {0x10008D39}; |
100 const TUint32 KBrowserDefaultAccessPoint = 0x0000000E; |
101 const TUint32 KBrowserDefaultAccessPoint = 0x0000000E; |
3585 const HBufC8* aUrl, |
3586 const HBufC8* aUrl, |
3586 HBufC*& aLaunchParam ) |
3587 HBufC*& aLaunchParam ) |
3587 { |
3588 { |
3588 TInt index; |
3589 TInt index; |
3589 |
3590 |
3590 // MaxInt will fit into 10 characters |
3591 // MaxInt will fit into 11 characters |
3591 HBufC* b( HBufC::NewLC( 10 ) ); |
3592 HBufC* b( HBufC::NewLC( 11 ) ); |
3592 b->Des().NumUC( aLocalId ); |
3593 b->Des().NumUC( aLocalId ); |
3593 HBufC* localIDBuf( b->ReAllocL( b->Des().Length() ) ); |
3594 HBufC* localIDBuf( b->ReAllocL( b->Des().Length() ) ); |
3594 CleanupStack::Pop( b ); |
3595 CleanupStack::Pop( b ); |
3595 b = NULL; |
3596 b = NULL; |
3596 CleanupStack::PushL( localIDBuf ); |
3597 CleanupStack::PushL( localIDBuf ); |
3597 |
3598 |
3598 // length of startparam is always 1 and 2 spaces are needed |
3599 // length of startparam is always 1 and some markers are needed |
3599 TInt length = 1 + aUrl->Length() + localIDBuf->Des().Length() + 2; |
3600 TInt length = 1 + aUrl->Length() + localIDBuf->Des().Length() + 3; |
3600 |
3601 |
3601 aLaunchParam = HBufC::NewMaxL( length ); |
3602 aLaunchParam = HBufC::NewMaxL( length ); |
3602 |
3603 |
3603 TPtr ptr( aLaunchParam->Des() ); |
3604 TPtr ptr( aLaunchParam->Des() ); |
3604 ptr.SetLength( 0 ); |
3605 ptr.SetLength( 0 ); |
3605 _LIT( KOne, "1" ); |
3606 _LIT( KOne, "1" ); |
3606 _LIT( KTwo, "2" ); |
3607 _LIT( KTwo, "2" ); |
3607 _LIT( KSpace, " " ); |
3608 _LIT( KMarker, "\x00" ); |
3608 |
3609 |
3609 // start param is 1 for embedded launch and 2 for launching details view |
3610 // start param is 1 for embedded launch and 2 for launching details view |
3610 // standalone |
3611 // standalone |
3611 if ( iUseCoeEnv ) |
3612 if ( iUseCoeEnv ) |
3612 { |
3613 { |
3614 } |
3615 } |
3615 else |
3616 else |
3616 { |
3617 { |
3617 ptr.Append( KTwo() ); |
3618 ptr.Append( KTwo() ); |
3618 } |
3619 } |
3619 ptr.Append( KSpace() ); |
3620 ptr.Append( KMarker() ); |
3620 ptr.Append( localIDBuf->Des() ); |
3621 ptr.Append( localIDBuf->Des() ); |
3621 ptr.Append( KSpace() ); |
3622 ptr.Append( KMarker() ); |
3622 |
3623 |
3623 index = ptr.Length(); |
3624 index = ptr.Length(); |
3624 ptr.SetLength( length ); |
3625 ptr.SetLength( length ); |
3625 for ( TInt i = 0 ; i < aUrl->Length(); i++ ) |
3626 for ( TInt i = 0 ; i < aUrl->Length(); i++ ) |
3626 { |
3627 { |
3627 ptr[index++] = ( unsigned char ) (*aUrl)[i]; |
3628 ptr[index++] = ( unsigned char ) (*aUrl)[i]; |
3628 } |
3629 } |
|
3630 |
|
3631 ptr[index] = ( unsigned char ) KMarker()[0]; |
3629 |
3632 |
3630 CleanupStack::PopAndDestroy( localIDBuf ); |
3633 CleanupStack::PopAndDestroy( localIDBuf ); |
3631 } |
3634 } |
3632 |
3635 |
3633 |
3636 |
5602 TAiwGenericParam param( EGenericParamFile, variantObject ); |
5605 TAiwGenericParam param( EGenericParamFile, variantObject ); |
5603 paramList->AppendL( param ); |
5606 paramList->AppendL( param ); |
5604 |
5607 |
5605 CAknLaunchAppService* launchAppService = |
5608 CAknLaunchAppService* launchAppService = |
5606 CAknLaunchAppService::NewL( KUidDRMUI, this, paramList ); |
5609 CAknLaunchAppService::NewL( KUidDRMUI, this, paramList ); |
5607 |
5610 |
5608 CleanupStack::PushL( launchAppService ); |
5611 CleanupStack::PushL( launchAppService ); |
5609 iWait.Start(); |
5612 iWait.Start(); |
5610 |
5613 |
5611 CleanupStack::PopAndDestroy( 2, paramList ); // paramList, launchAppService |
5614 CleanupStack::PopAndDestroy( 2, paramList ); // paramList, launchAppService |
5612 } |
5615 } |