|
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 widget plugin |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CALENDARWIDGETPLUGIN_H |
|
19 #define CALENDARWIDGETPLUGIN_H |
|
20 |
|
21 // System includes |
|
22 #include <QObject> |
|
23 /*! |
|
24 \class QServicePluginInterface |
|
25 \brief The service framework interface implemented by the plugin. |
|
26 \details The plugin is registered to the service framework. Homescreen loads the widgets through the |
|
27 service framework. The plugin is loaded as a widget only if it implements (which is the case of |
|
28 calendar widget) the interface <b>com.nokia.symbian.IHomeScreenWidget</b> |
|
29 */ |
|
30 #include <qserviceplugininterface.h> |
|
31 |
|
32 QTM_USE_NAMESPACE |
|
33 |
|
34 /*! |
|
35 \class CalendarWidgetPlugin |
|
36 \brief Responsible for loading the whole widget. Called by the service framework. |
|
37 */ |
|
38 |
|
39 // Class declaration |
|
40 class CalendarWidgetPlugin : public QObject, public QServicePluginInterface |
|
41 { |
|
42 Q_OBJECT |
|
43 Q_INTERFACES(QtMobility::QServicePluginInterface) |
|
44 |
|
45 public: |
|
46 /*! |
|
47 \fn QObject *createInstance(const QServiceInterfaceDescriptor &descriptor, |
|
48 QServiceContext *context, |
|
49 QAbstractSecuritySession *session); |
|
50 |
|
51 ........Invoked by service framework. |
|
52 ........@param descriptor contains the interface name. If the interface name contained in the descriptor matches |
|
53 the one implemented createInstance returns and instance of CalendarWidget, otherwise it returns |
|
54 NULL. |
|
55 @param context Not used. |
|
56 @param session Not used. |
|
57 */ |
|
58 QObject *createInstance(const QServiceInterfaceDescriptor &descriptor, |
|
59 QServiceContext *context, |
|
60 QAbstractSecuritySession *session); |
|
61 }; |
|
62 |
|
63 #endif // CALENDARWIDGETPLUGIN_H |