diff -r 000000000000 -r f979ecb2b13e searchui/searchapp/srchaiwprovider/src/searchservicelauncher.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/searchui/searchapp/srchaiwprovider/src/searchservicelauncher.cpp Tue Feb 02 10:12:19 2010 +0200 @@ -0,0 +1,120 @@ +/* +* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: This class is used to launch InDevice Search with a list of parameters +* +*/ + + + + + + +// System includes +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +// User Includes +#include "searchservicelauncher.h" + +// ------------------------------------------------------------------------------------------------- +// Symbian OS 2 phased constructor. +// ------------------------------------------------------------------------------------------------- +// +CSearchServiceLauncher* CSearchServiceLauncher::NewL() + { + CSearchServiceLauncher* self = CSearchServiceLauncher::NewLC(); + CleanupStack::Pop( self ); + return self; + } + +// ------------------------------------------------------------------------------------------------- +// Symbian OS 2 phased constructor. +// ------------------------------------------------------------------------------------------------- +// +CSearchServiceLauncher* CSearchServiceLauncher::NewLC() + { + CSearchServiceLauncher* self = new ( ELeave ) CSearchServiceLauncher(); + CleanupStack::PushL( self ); + self->ConstructL(); + return self; + } + +// ------------------------------------------------------------------------------------------------- +// Destructor +// ------------------------------------------------------------------------------------------------- +// +CSearchServiceLauncher::~CSearchServiceLauncher() + { + } + +// ------------------------------------------------------------------------------------------------- +// Launch In-Device-Search with a list of parameters +// ------------------------------------------------------------------------------------------------- +// +void CSearchServiceLauncher::SearchL( TInt /*aFunction*/, const CAiwGenericParamList& aParamList ) + { + TApaAppInfo *appInfo = new ( ELeave ) TApaAppInfo; + CleanupStack::PushL ( appInfo ); + RApaLsSession apaSession; + User::LeaveIfError( apaSession.Connect() ); + CleanupClosePushL( apaSession ); + TInt error = apaSession.GetAppInfo( *appInfo, KSrchAppUid ); + User::LeaveIfError(error); + CleanupStack::PopAndDestroy( &apaSession ); // apaSession + + if ( iLaunchAppService ) + { + delete iLaunchAppService; + iLaunchAppService = NULL; + } + + iLaunchAppService = CAknLaunchAppService::NewL(appInfo->iUid, this, const_cast(&aParamList)); + + CleanupStack::PopAndDestroy( appInfo ); // appInfo + } + + +// ------------------------------------------------------------------------------------------------- +// Performs the second phase construction. +// ------------------------------------------------------------------------------------------------- +// +void CSearchServiceLauncher::ConstructL() + { + } + + +// ------------------------------------------------------------------------------------------------- +// Performs the first phase construction. +// ------------------------------------------------------------------------------------------------- +// +CSearchServiceLauncher::CSearchServiceLauncher() + { + } + + + + +//end of file