|
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: Homescreen shortcut widget plugin. |
|
15 * |
|
16 */ |
|
17 |
|
18 #include <qserviceinterfacedescriptor.h> |
|
19 #include <qabstractsecuritysession.h> |
|
20 #include <qservicecontext.h> |
|
21 |
|
22 #include "hsshortcutwidgetplugin.h" |
|
23 #include "hsshortcutwidget.h" |
|
24 |
|
25 #ifdef COVERAGE_MEASUREMENT |
|
26 #pragma CTC SKIP |
|
27 #endif //COVERAGE_MEASUREMENT |
|
28 |
|
29 /*! |
|
30 \class HsShortcutWidgetPlugin |
|
31 \ingroup group_hsshortcutwidgetplugin |
|
32 \brief The plugin part of the homescreen shortcut widget. |
|
33 */ |
|
34 |
|
35 /*! |
|
36 Instantiates and returns new shortcut widget. |
|
37 */ |
|
38 QObject *HsShortcutWidgetPlugin::createInstance(const QServiceInterfaceDescriptor &descriptor, |
|
39 QServiceContext *context, |
|
40 QAbstractSecuritySession *session) |
|
41 { |
|
42 Q_UNUSED(context); |
|
43 Q_UNUSED(session); |
|
44 |
|
45 if (descriptor.interfaceName() == QLatin1String("com.nokia.symbian.IHomeScreenWidget")) { |
|
46 return new HsShortcutWidget(); |
|
47 } else { |
|
48 return 0; |
|
49 } |
|
50 } |
|
51 |
|
52 Q_EXPORT_PLUGIN2(hsshortcutwidgetplugin, HsShortcutWidgetPlugin) |
|
53 |
|
54 #ifdef COVERAGE_MEASUREMENT |
|
55 #pragma CTC ENDSKIP |
|
56 #endif //COVERAGE_MEASUREMENT |