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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "tsserviceplugin.h" |
|
19 |
|
20 #include <qserviceinterfacedescriptor.h> |
|
21 #include <qabstractsecuritysession.h> |
|
22 #include <qservicecontext.h> |
|
23 |
|
24 #include "tsitemprovider.h" |
|
25 #include "tsactivation.h" |
|
26 #include "tsdeactivation.h" |
|
27 #include "tspresentation.h" |
|
28 |
|
29 #ifdef COVERAGE_MEASUREMENT |
|
30 #pragma CTC SKIP |
|
31 #endif //COVERAGE_MEASUREMENT |
|
32 |
|
33 /*! |
|
34 \class TsServicePlugin |
|
35 \ingroup group_tsserviceplugin |
|
36 \brief Plugin implementation. |
|
37 */ |
|
38 |
|
39 QObject *TsServicePlugin::createInstance(const QServiceInterfaceDescriptor &descriptor, QServiceContext *context, QAbstractSecuritySession *session) |
|
40 { |
|
41 Q_UNUSED(context); |
|
42 Q_UNUSED(session); |
|
43 |
|
44 if (descriptor.interfaceName() == "com.nokia.taskswitcher.itemprovider") { |
|
45 return new TsItemProvider(this); |
|
46 } else if (descriptor.interfaceName() == "com.nokia.taskswitcher.activation") { |
|
47 return new TsActivation(this); |
|
48 } else if (descriptor.interfaceName() == "com.nokia.taskswitcher.deactivation") { |
|
49 return new TsDeactivation(this); |
|
50 } else if (descriptor.interfaceName() == "com.nokia.taskswitcher.presentation") { |
|
51 return new TsPresentation(this); |
|
52 } else { |
|
53 return NULL; |
|
54 } |
|
55 } |
|
56 |
|
57 Q_EXPORT_PLUGIN2(tsserviceplugin, TsServicePlugin) |
|
58 |
|
59 #ifdef COVERAGE_MEASUREMENT |
|
60 #pragma CTC ENDSKIP |
|
61 #endif //COVERAGE_MEASUREMENT |
|