|
1 /* |
|
2 * Copyright (c) 2010 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: Silent widget plugin |
|
15 * |
|
16 */ |
|
17 |
|
18 // System includes |
|
19 #include <qserviceinterfacedescriptor.h> |
|
20 #include <qabstractsecuritysession.h> |
|
21 #include <qservicecontext.h> |
|
22 |
|
23 // User includes |
|
24 #include "silentwidgetplugin.h" |
|
25 #include "silentwidget.h" |
|
26 |
|
27 /*! |
|
28 \class SilentWidgetPlugin |
|
29 \implementation of silent widget plugin. |
|
30 */ |
|
31 |
|
32 // ======== MEMBER FUNCTIONS ======== |
|
33 |
|
34 /*! |
|
35 Initialize plugin for silent world widget |
|
36 */ |
|
37 QObject *SilentWidgetPlugin::createInstance( |
|
38 const QServiceInterfaceDescriptor &descriptor, |
|
39 QServiceContext *context, |
|
40 QAbstractSecuritySession *session) |
|
41 { |
|
42 Q_UNUSED(context); |
|
43 Q_UNUSED(session); |
|
44 |
|
45 if (descriptor.interfaceName() == |
|
46 QLatin1String("com.nokia.symbian.IHomeScreenWidget")) { |
|
47 return new SilentWidget(); |
|
48 } else { |
|
49 return 0; |
|
50 } |
|
51 } |
|
52 |
|
53 Q_EXPORT_PLUGIN2(silentwidgetplugin, SilentWidgetPlugin) |