searchui/runtimeproviders/searchruntimeprovider/src/searchruntimeprovider.cpp
changeset 2 208a4ba3894c
parent 0 ccd0fd43f247
equal deleted inserted replaced
0:ccd0fd43f247 2:208a4ba3894c
    16  */
    16  */
    17 
    17 
    18 #include "searchruntimeprovider.h"
    18 #include "searchruntimeprovider.h"
    19 #include "searchruntime.h"
    19 #include "searchruntime.h"
    20 
    20 
    21 // constants
       
    22 const char providerFileName[] = "searchruntimeprovider.dll";
       
    23 const char providerFileUri[] = "search.nokia.com/runtime/defaultruntime";
       
    24 
       
    25 // ---------------------------------------------------------------------------
    21 // ---------------------------------------------------------------------------
    26 // SearchRuntimeProvider::SearchRuntimeProvider()
    22 // SearchRuntimeProvider::createPlugin()
    27 // ---------------------------------------------------------------------------
    23 // ---------------------------------------------------------------------------
    28 //
    24 //
    29 SearchRuntimeProvider::SearchRuntimeProvider()
    25 SearchRuntime *SearchRuntimeProvider::createPlugin() const
    30     {
    26 {
    31     mRuntimeToken.mLibrary = providerFileName;
    27     return new SearchRuntime(); 
    32     mRuntimeToken.mUri = providerFileUri;
    28 }
    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