98 HBufC* urlToLaunch = HBufC::NewLC( |
98 HBufC* urlToLaunch = HBufC::NewLC( |
99 parsed->Length() + KUrlLaunchParameter.iTypeLength ); |
99 parsed->Length() + KUrlLaunchParameter.iTypeLength ); |
100 urlToLaunch->Des().Append( KUrlLaunchParameter ); |
100 urlToLaunch->Des().Append( KUrlLaunchParameter ); |
101 urlToLaunch->Des().Append( *parsed ); |
101 urlToLaunch->Des().Append( *parsed ); |
102 |
102 |
103 #if defined(__WINSCW__) |
|
104 //custom ap overriden settings cannot be used in emulator environment |
|
105 iLauncher->LaunchBrowserEmbeddedL( *urlToLaunch, NULL, this ); |
|
106 #else |
|
107 //Get available iap and pass it to browser |
103 //Get available iap and pass it to browser |
108 TUint32 wap = iModel.GetAvailableWapIdL(); |
104 TUint32 wap = iModel.GetAvailableWapIdL(); |
109 if ( wap == 0 ) |
105 if ( wap == 0 ) |
110 { |
106 { |
111 User::Leave( KErrCouldNotConnect ); |
107 User::Leave( KErrCouldNotConnect ); |
112 } |
108 } |
113 TBrowserOverriddenSettings overriddenSettings; |
109 TBrowserOverriddenSettings overriddenSettings; |
114 overriddenSettings.SetBrowserSetting( EBrowserOverSettingsCustomAp, wap ); |
110 overriddenSettings.SetBrowserSetting( EBrowserOverSettingsCustomAp, wap ); |
115 |
111 |
116 iLauncher->LaunchBrowserEmbeddedL( *urlToLaunch, NULL, this, &overriddenSettings ); |
112 // Check, that the state has not been changed while launching |
117 #endif |
113 if ( iModel.VcAppState() == EStateBrowser ) |
|
114 { |
|
115 iLauncher->LaunchBrowserEmbeddedL( *urlToLaunch, NULL, this, &overriddenSettings ); |
|
116 } |
118 |
117 |
119 CleanupStack::PopAndDestroy( urlToLaunch ); |
118 CleanupStack::PopAndDestroy( urlToLaunch ); |
120 CleanupStack::PopAndDestroy( parsed ); |
119 CleanupStack::PopAndDestroy( parsed ); |
121 CleanupStack::PopAndDestroy( parameter ); |
120 CleanupStack::PopAndDestroy( parameter ); |
122 CleanupStack::PopAndDestroy( inetUri ); |
121 CleanupStack::PopAndDestroy( inetUri ); |