taskswitcherapp/runtimeplugins/tsdefaultruntimeplugin/src/tsdefaultruntimeplugin.cpp
changeset 39 4e8ebe173323
parent 36 cdae8c6c3876
child 42 517f4fb5ec74
child 46 23b5d6a29cce
equal deleted inserted replaced
36:cdae8c6c3876 39:4e8ebe173323
     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: Default runtime provider.
       
    15 *
       
    16 */
       
    17 
       
    18 #include <qserviceinterfacedescriptor.h>
       
    19 #include <qabstractsecuritysession.h>
       
    20 #include <qservicecontext.h>
       
    21 
       
    22 #include "tsdefaultruntimeplugin.h"
       
    23 #include "tsdefaultruntime.h"
       
    24 
       
    25 /*!
       
    26     \class TsDefaultRuntimePlugin
       
    27     \ingroup group_tsdefaultruntimeplugin
       
    28     \brief Provides a default implementation of the taskswitcher runtime.
       
    29 
       
    30     This provider includes a default implementation of the taskswitcher runtime.
       
    31 */
       
    32 
       
    33 #ifdef COVERAGE_MEASUREMENT
       
    34 #pragma CTC SKIP
       
    35 #endif //COVERAGE_MEASUREMENT
       
    36 
       
    37 /*!
       
    38     Creates a runtime based on the given descriptor.
       
    39 */
       
    40 QObject *TsDefaultRuntimePlugin::createInstance(const QServiceInterfaceDescriptor &descriptor, QServiceContext *context, QAbstractSecuritySession *session)
       
    41 {
       
    42     Q_UNUSED(context);
       
    43     Q_UNUSED(session);
       
    44 
       
    45     if (descriptor.interfaceName() == "com.nokia.taskswitcher.runtime.defaultruntime") {
       
    46         return new TsDefaultRuntime(this);
       
    47     } else {
       
    48         return NULL;
       
    49     }
       
    50 }
       
    51 
       
    52 Q_EXPORT_PLUGIN2(tsdefaultruntimeplugin, TsDefaultRuntimePlugin)
       
    53 
       
    54 #ifdef COVERAGE_MEASUREMENT
       
    55 #pragma CTC ENDSKIP
       
    56 #endif //COVERAGE_MEASUREMENT