|
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_tsdefaultruntimeprovider |
|
28 \brief Provides a default implementation of the taskswitcher runtime. |
|
29 |
|
30 This provider includes a default implementation of the taskswitcher runtime. |
|
31 The runtime is described in the tsdefaultruntimeplugin.xml file. |
|
32 */ |
|
33 |
|
34 #ifdef COVERAGE_MEASUREMENT |
|
35 #pragma CTC SKIP |
|
36 #endif //COVERAGE_MEASUREMENT |
|
37 |
|
38 /*! |
|
39 Creates a runtime based on the given descriptor. |
|
40 */ |
|
41 QObject *TsDefaultRuntimePlugin::createInstance(const QServiceInterfaceDescriptor &descriptor, QServiceContext *context, QAbstractSecuritySession *session) |
|
42 { |
|
43 Q_UNUSED(context); |
|
44 Q_UNUSED(session); |
|
45 |
|
46 if (descriptor.interfaceName() == "com.nokia.taskswitcher.runtime.defaultruntime") { |
|
47 return new TsDefaultRuntime(this); |
|
48 } else { |
|
49 return NULL; |
|
50 } |
|
51 } |
|
52 |
|
53 Q_EXPORT_PLUGIN2(tsdefaultruntimeplugin, TsDefaultRuntimePlugin) |
|
54 |
|
55 #ifdef COVERAGE_MEASUREMENT |
|
56 #pragma CTC ENDSKIP |
|
57 #endif //COVERAGE_MEASUREMENT |