|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Implementation of the SEARCH default runtime provider. |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "searchruntimeprovider.h" |
|
19 #include "searchruntime.h" |
|
20 |
|
21 // constants |
|
22 const char providerFileName[] = "searchruntimeprovider.dll"; |
|
23 const char providerFileUri[] = "search.nokia.com/runtime/defaultruntime"; |
|
24 |
|
25 // --------------------------------------------------------------------------- |
|
26 // SearchRuntimeProvider::SearchRuntimeProvider() |
|
27 // --------------------------------------------------------------------------- |
|
28 // |
|
29 SearchRuntimeProvider::SearchRuntimeProvider() |
|
30 { |
|
31 mRuntimeToken.mLibrary = providerFileName; |
|
32 mRuntimeToken.mUri = providerFileUri; |
|
33 } |
|
34 |
|
35 // --------------------------------------------------------------------------- |
|
36 // SearchRuntimeProvider::runtimes() |
|
37 // --------------------------------------------------------------------------- |
|
38 // |
|
39 QList<HsRuntimeToken> SearchRuntimeProvider::runtimes() |
|
40 { |
|
41 return QList<HsRuntimeToken> () << mRuntimeToken; |
|
42 } |
|
43 |
|
44 // --------------------------------------------------------------------------- |
|
45 // SearchRuntimeProvider::createRuntime() |
|
46 // --------------------------------------------------------------------------- |
|
47 // |
|
48 HsRuntime* SearchRuntimeProvider::createRuntime(const HsRuntimeToken& aToken) |
|
49 { |
|
50 return (aToken.mUri == providerFileUri ? new SearchRuntime() : 0); |
|
51 } |
|
52 |
|
53 #ifndef COVERAGE_MEASUREMENT |
|
54 Q_EXPORT_PLUGIN2(Searchruntimeprovider, SearchRuntimeProvider) |
|
55 #endif //COVERAGE_MEASUREMENT |