13 * |
13 * |
14 * Description: Search application main class. |
14 * Description: Search application main class. |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 #include "Search.h" |
18 #include "search.h" |
19 #include "hsruntime.h" |
19 #include <qstatemachine.h> |
20 #include "hsruntimefactory.h" |
20 #include <searchruntimeprovider.h> |
|
21 #include <searchruntime.h> |
21 |
22 |
22 // --------------------------------------------------------------------------- |
23 // --------------------------------------------------------------------------- |
23 // Search::Search |
24 // Search::Search |
24 // --------------------------------------------------------------------------- |
25 // --------------------------------------------------------------------------- |
25 // |
26 // |
26 Search::Search(QObject* aParent) : |
27 Search::Search(QObject* aParent) : |
27 QObject(aParent), mRuntime(NULL) |
28 QObject(aParent), mRuntime(NULL) |
28 { |
29 { |
29 SEARCH_FUNC_ENTRY("SEARCH::Search::Search"); |
30 SEARCH_FUNC_ENTRY("SEARCH::Search::Search"); |
30 |
31 |
31 HsRuntimeFactory factory("searchresources/plugins/runtimeproviders", |
32 SearchRuntimeProvider *interface = new SearchRuntimeProvider(); |
32 "searchresources/plugins/runtimeproviders"); |
33 mRuntime = interface->createPlugin(); |
33 |
|
34 HsRuntimeToken token; |
|
35 token.mLibrary = "searchruntimeprovider.dll"; |
|
36 token.mUri = "search.nokia.com/runtime/defaultruntime"; |
|
37 |
|
38 mRuntime = factory.createRuntime(token); |
|
39 if (mRuntime) |
34 if (mRuntime) |
40 { |
35 { |
41 mRuntime->setParent(this); |
36 mRuntime->setParent(this); |
42 connect(mRuntime, SIGNAL(started()), SLOT(handleRuntimeStarted())); |
37 connect(mRuntime, SIGNAL(started()), SLOT(handleRuntimeStarted())); |
43 connect(mRuntime, SIGNAL(stopped()), SLOT(handleRuntimeStopped())); |
38 connect(mRuntime, SIGNAL(stopped()), SLOT(handleRuntimeStopped())); |
44 connect(mRuntime, SIGNAL(faulted()), SLOT(handleRuntimeFaulted())); |
39 connect(mRuntime, SIGNAL(faulted()), SLOT(handleRuntimeFaulted())); |
45 } |
40 } |
46 |
41 SEARCH_FUNC_EXIT("SEARCH::Search::Search"); |
47 SEARCH_FUNC_EXIT("SEARCH::Search::Search"); |
|
48 } |
42 } |
49 |
43 |
50 // --------------------------------------------------------------------------- |
44 // --------------------------------------------------------------------------- |
51 // Search::~Search() |
45 // Search::~Search() |
52 // --------------------------------------------------------------------------- |
46 // --------------------------------------------------------------------------- |