55 const TUid KBrowserAppUid = { 0x10008D39 }; |
55 const TUid KBrowserAppUid = { 0x10008D39 }; |
56 |
56 |
57 const TInt KVcxHgMyVideosUrlMaxLen = 1024; |
57 const TInt KVcxHgMyVideosUrlMaxLen = 1024; |
58 |
58 |
59 _LIT( KBrowserProtocol, "4 " ); |
59 _LIT( KBrowserProtocol, "4 " ); |
|
60 |
|
61 // URL to Ovi Store videos. If Ovi Store Launcher is not installed, this |
|
62 // address will be opened to web browser. |
|
63 _LIT( KOviVideoStoreURL, "http://lr.ovi.mobi/store/video" ); |
60 |
64 |
61 // ============================ MEMBER FUNCTIONS =============================== |
65 // ============================ MEMBER FUNCTIONS =============================== |
62 |
66 |
63 // ----------------------------------------------------------------------------- |
67 // ----------------------------------------------------------------------------- |
64 // CVcxHgMyVideosMainView::CVcxHgMyVideosMainView() |
68 // CVcxHgMyVideosMainView::CVcxHgMyVideosMainView() |
861 |
865 |
862 LaunchAppL( KBrowserAppUid, *param ); |
866 LaunchAppL( KBrowserAppUid, *param ); |
863 |
867 |
864 CleanupStack::PopAndDestroy( param ); |
868 CleanupStack::PopAndDestroy( param ); |
865 } |
869 } |
|
870 |
|
871 // ------------------------------------------------------------------------------ |
|
872 // CVcxHgMyVideosMainView::LaunchOviStoreL() |
|
873 // ------------------------------------------------------------------------------ |
|
874 // |
|
875 void CVcxHgMyVideosMainView::LaunchOviStoreL( const TUid aAppUid, const TDesC& aArgs ) |
|
876 { |
|
877 IPTVLOGSTRING_LOW_LEVEL( "CVcxHgMyVideosMainView::LaunchOviStoreL() enter" ); |
|
878 RApaLsSession appArcSession; |
|
879 User::LeaveIfError( appArcSession.Connect() ); |
|
880 CleanupClosePushL<RApaLsSession>( appArcSession ); |
|
881 |
|
882 TApaAppInfo appInfo; |
|
883 TInt err = appArcSession.GetAppInfo( appInfo, aAppUid ); |
|
884 IPTVLOGSTRING2_LOW_LEVEL( "CVcxHgMyVideosMainView::LaunchOviStoreL() GetAppInfo() error = %d", err ); |
|
885 |
|
886 if ( KErrNone == err ) |
|
887 { |
|
888 IPTVLOGSTRING3_LOW_LEVEL( "CVcxHgMyVideosMainView::LaunchOviStoreL() launch '%S' with arguments '%S'", &appInfo.iFullName, &aArgs ); |
|
889 RProcess process; |
|
890 User::LeaveIfError( process.Create( appInfo.iFullName, aArgs ) ); |
|
891 process.Resume(); |
|
892 process.Close(); |
|
893 } |
|
894 else |
|
895 { |
|
896 // Launcher not found, use browser until launcher is available |
|
897 IPTVLOGSTRING_LOW_LEVEL( "CVcxHgMyVideosMainView::LaunchOviStoreL() launcher not found, launch browser" ); |
|
898 LaunchBrowserL( KOviVideoStoreURL ); |
|
899 } |
|
900 |
|
901 CleanupStack::PopAndDestroy( &appArcSession ); |
|
902 } |