TBool CMcAppUi::invokWapUrl(TDesC & url) {
const TInt KBrowserUid = 0x10008D39; // the inner browser's id
TUid id( TUid::Uid( KBrowserUid ) );
TApaTaskList taskList( CEikonEnv::Static()->WsSession() ) ;
TApaTask task = taskList.FindApp( id ) ;
RApaLsSession appArcSession;
TThreadId thread_id = 0;
HBufC * param ;
HBufC8 * param8 ;
param = HBufC::NewLC( 50 );
param->Des().Copy( _L( "4 " ) );
param->Des().Append(url) ;
if ( task.Exists() ) {
param8 = HBufC8::NewLC( param->Length() );
param8->Des().Append( *param );
task.SendMessage( TUid::Uid( 0 ), *param8 ); // Uid is not used
CleanupStack::PopAndDestroy();
} else {
User::LeaveIfError(appArcSession.Connect()); // connect to AppArc server
appArcSession.StartDocument( *param, TUid::Uid( KBrowserUid ), thread_id );
appArcSession.Close();
}
CleanupStack::PopAndDestroy();
return ETrue ;
}
const TInt KBrowserUid = 0x10008D39; // the inner browser's id
TUid id( TUid::Uid( KBrowserUid ) );
TApaTaskList taskList( CEikonEnv::Static()->WsSession() ) ;
TApaTask task = taskList.FindApp( id ) ;
RApaLsSession appArcSession;
TThreadId thread_id = 0;
HBufC * param ;
HBufC8 * param8 ;
param = HBufC::NewLC( 50 );
param->Des().Copy( _L( "4 " ) );
param->Des().Append(url) ;
if ( task.Exists() ) {
param8 = HBufC8::NewLC( param->Length() );
param8->Des().Append( *param );
task.SendMessage( TUid::Uid( 0 ), *param8 ); // Uid is not used
CleanupStack::PopAndDestroy();
} else {
User::LeaveIfError(appArcSession.Connect()); // connect to AppArc server
appArcSession.StartDocument( *param, TUid::Uid( KBrowserUid ), thread_id );
appArcSession.Close();
}
CleanupStack::PopAndDestroy();
return ETrue ;
}