browserui/browser/BrowserAppSrc/BrowserAppViewBase.cpp
changeset 10 57d5b8e231c4
parent 0 84ad3b177aa3
child 31 868cceedabd3
equal deleted inserted replaced
0:84ad3b177aa3 10:57d5b8e231c4
    28 #include <avkon.rsg>
    28 #include <avkon.rsg>
    29 #include <LayoutMetaData.cdl.h> // check landscape/portrait modes
    29 #include <LayoutMetaData.cdl.h> // check landscape/portrait modes
    30 #include <aknenv.h>
    30 #include <aknenv.h>
    31 #include <AknSgcc.h>
    31 #include <AknSgcc.h>
    32 #include <StringLoader.h>
    32 #include <StringLoader.h>
    33 
    33 #include "BrowserUtil.h"
    34 
    34 #include <BrowserUiSDKCRKeys.h>
    35 // ================= MEMBER FUNCTIONS =======================
    35 // ================= MEMBER FUNCTIONS =======================
    36 
    36 
    37 // ---------------------------------------------------------
    37 // ---------------------------------------------------------
    38 // TSKPair::TSKPair
    38 // TSKPair::TSKPair
    39 // ---------------------------------------------------------
    39 // ---------------------------------------------------------
   278     {
   278     {
   279     TInt commandSet = R_AVKON_SOFTKEYS_EMPTY;
   279     TInt commandSet = R_AVKON_SOFTKEYS_EMPTY;
   280     Cba()->SetCommandSetL( commandSet );
   280     Cba()->SetCommandSetL( commandSet );
   281     Cba()->DrawNow();
   281     Cba()->DrawNow();
   282     }
   282     }
       
   283 	
       
   284 // -----------------------------------------------------------------------------
       
   285 // CBrowserContentView::LaunchSearchApplicationL
       
   286 // -----------------------------------------------------------------------------
       
   287 //
       
   288 void CBrowserViewBase::LaunchSearchApplicationL( const TDesC& aSearchString )
       
   289     {
       
   290     TInt id = iApiProvider.Preferences().GetIntValue( KBrowserSearchAppUid );
       
   291     TUid searchAppId( TUid::Uid( id ) );
       
   292     TApaTaskList taskList( CEikonEnv::Static()->WsSession() );
       
   293     TApaTask task = taskList.FindApp( searchAppId );
       
   294     HBufC8* searchParam8 = HBufC8::NewLC( aSearchString.Length() + 1);
       
   295     searchParam8->Des().Append( aSearchString );
       
   296     if ( task.Exists() )
       
   297         {
       
   298         User::LeaveIfError( task.SendMessage( TUid::Uid( 0 ), *searchParam8 ) );
       
   299         }
       
   300     else
       
   301         {
       
   302         RApaLsSession appArcSession;
       
   303         TApaAppInfo appInfo;
       
   304         User::LeaveIfError(appArcSession.Connect());
       
   305         CleanupClosePushL( appArcSession );
       
   306         TInt err  = appArcSession.GetAppInfo( appInfo, searchAppId );
       
   307         if( err == KErrNone )
       
   308             {
       
   309             CApaCommandLine* cmdLine = CApaCommandLine::NewLC();
       
   310             cmdLine->SetExecutableNameL( appInfo.iFullName );
       
   311             cmdLine->SetTailEndL( *searchParam8 );
       
   312             User::LeaveIfError( appArcSession.StartApp( *cmdLine ));
       
   313             CleanupStack::PopAndDestroy( cmdLine ); 
       
   314             }
       
   315         CleanupStack::PopAndDestroy( &appArcSession );
       
   316         }
       
   317     CleanupStack::PopAndDestroy( searchParam8 );
       
   318     } 
   283 // End of File
   319 // End of File