|
1 /******************************************************************************* |
|
2 * Copyright (c) 2009, 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. This program and the accompanying materials |
|
4 * are made available under the terms of the Eclipse Public License v1.0 |
|
5 * which accompanies this distribution, and is available at |
|
6 * http://www.eclipse.org/legal/epl-v10.html |
|
7 * |
|
8 * Contributors: |
|
9 * Nokia Corporation - initial implementation |
|
10 *******************************************************************************/ |
|
11 |
|
12 #include <QtPlugin> |
|
13 |
|
14 #include "javasoftindicatorplugin.h" |
|
15 #include "javasoftindicator.h" |
|
16 |
|
17 |
|
18 Q_EXPORT_PLUGIN( JavaSoftIndicatorPlugin) |
|
19 |
|
20 // ---------------------------------------------------------------------------- |
|
21 // JavaSoftIndicatorPlugin::JavaSoftIndicatorPlugin |
|
22 // ---------------------------------------------------------------------------- |
|
23 JavaSoftIndicatorPlugin::JavaSoftIndicatorPlugin() : |
|
24 iError(0) |
|
25 { |
|
26 } |
|
27 |
|
28 // ---------------------------------------------------------------------------- |
|
29 // JavaSoftIndicatorPlugin::~JavaSoftIndicatorPlugin |
|
30 // ---------------------------------------------------------------------------- |
|
31 JavaSoftIndicatorPlugin::~JavaSoftIndicatorPlugin() |
|
32 { |
|
33 } |
|
34 |
|
35 // ---------------------------------------------------------------------------- |
|
36 // JavaSoftIndicatorPlugin::indicatorTypes |
|
37 // Return notification types this plugin implements |
|
38 // ---------------------------------------------------------------------------- |
|
39 QStringList JavaSoftIndicatorPlugin::indicatorTypes() const |
|
40 { |
|
41 QStringList iIndicatorTypes; |
|
42 iIndicatorTypes |
|
43 << "com.nokia.javasoftnotification.indicatorplugin/1.0_269487546_203"; |
|
44 iIndicatorTypes |
|
45 << "com.nokia.javasoftnotification.indicatorplugin/1.0_269487546_202"; |
|
46 iIndicatorTypes |
|
47 << "com.nokia.javasoftnotification.indicatorplugin/1.0_269487546_201"; |
|
48 iIndicatorTypes |
|
49 << "com.nokia.javasoftnotification.indicatorplugin/1.0_270212593_203"; |
|
50 iIndicatorTypes |
|
51 << "com.nokia.javasoftnotification.indicatorplugin/1.0_270212593_202"; |
|
52 |
|
53 return iIndicatorTypes; |
|
54 } |
|
55 |
|
56 // ---------------------------------------------------------------------------- |
|
57 // JavaSoftIndicatorPlugin::accessAllowed |
|
58 // Check if client is allowed to use notification widget |
|
59 // ---------------------------------------------------------------------------- |
|
60 bool JavaSoftIndicatorPlugin::accessAllowed(const QString &indicatorType, |
|
61 const QVariantMap &securityInfo) const |
|
62 { |
|
63 Q_UNUSED(indicatorType) |
|
64 Q_UNUSED(securityInfo) |
|
65 // This plugin doesn't perform operations that may compromise security. |
|
66 // All clients are allowed to use. |
|
67 return true; |
|
68 } |
|
69 |
|
70 // ---------------------------------------------------------------------------- |
|
71 // JavaSoftIndicatorPlugin::createIndicator |
|
72 // ---------------------------------------------------------------------------- |
|
73 HbIndicatorInterface* JavaSoftIndicatorPlugin::createIndicator( |
|
74 const QString &indicatorType) |
|
75 { |
|
76 HbIndicatorInterface *indicator = new JavaSoftIndicator(indicatorType); |
|
77 return indicator; |
|
78 } |
|
79 |
|
80 // ---------------------------------------------------------------------------- |
|
81 // JavaSoftIndicatorPlugin::error |
|
82 // ---------------------------------------------------------------------------- |
|
83 int JavaSoftIndicatorPlugin::error() const |
|
84 { |
|
85 return iError; |
|
86 } |
|
87 |