diff -r 000000000000 -r ccd0fd43f247 searchui/runtimeproviders/searchruntimeprovider/src/searchruntimeprovider.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/searchui/runtimeproviders/searchruntimeprovider/src/searchruntimeprovider.cpp Mon Apr 19 14:40:05 2010 +0300 @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2009 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: Implementation of the SEARCH default runtime provider. + * + */ + +#include "searchruntimeprovider.h" +#include "searchruntime.h" + +// constants +const char providerFileName[] = "searchruntimeprovider.dll"; +const char providerFileUri[] = "search.nokia.com/runtime/defaultruntime"; + +// --------------------------------------------------------------------------- +// SearchRuntimeProvider::SearchRuntimeProvider() +// --------------------------------------------------------------------------- +// +SearchRuntimeProvider::SearchRuntimeProvider() + { + mRuntimeToken.mLibrary = providerFileName; + mRuntimeToken.mUri = providerFileUri; + } + +// --------------------------------------------------------------------------- +// SearchRuntimeProvider::runtimes() +// --------------------------------------------------------------------------- +// +QList SearchRuntimeProvider::runtimes() + { + return QList () << mRuntimeToken; + } + +// --------------------------------------------------------------------------- +// SearchRuntimeProvider::createRuntime() +// --------------------------------------------------------------------------- +// +HsRuntime* SearchRuntimeProvider::createRuntime(const HsRuntimeToken& aToken) + { + return (aToken.mUri == providerFileUri ? new SearchRuntime() : 0); + } + +#ifndef COVERAGE_MEASUREMENT +Q_EXPORT_PLUGIN2(Searchruntimeprovider, SearchRuntimeProvider) +#endif //COVERAGE_MEASUREMENT