58 {"com.nokia.eap.mschapv2oldpassworddialog/1.0"}, |
68 {"com.nokia.eap.mschapv2oldpassworddialog/1.0"}, |
59 {"com.nokia.eap.mschapv2newpassworddialog/1.0"}, |
69 {"com.nokia.eap.mschapv2newpassworddialog/1.0"}, |
60 {"com.nokia.eap.fastshowprovnotsuccessnotedialog/1.0"} |
70 {"com.nokia.eap.fastshowprovnotsuccessnotedialog/1.0"} |
61 }; |
71 }; |
62 |
72 |
63 /** |
73 // ======== LOCAL FUNCTIONS ======== |
64 * Constructor |
74 |
65 */ |
75 // ======== MEMBER FUNCTIONS ======== |
|
76 |
|
77 /*! |
|
78 * Constructor. |
|
79 */ |
66 EapDialogPlugin::EapDialogPlugin() |
80 EapDialogPlugin::EapDialogPlugin() |
67 { |
81 { |
68 OstTraceFunctionEntry0( EAPDIALOGPLUGIN_EAPDIALOGPLUGIN_ENTRY ); |
82 OstTraceFunctionEntry0( EAPDIALOGPLUGIN_EAPDIALOGPLUGIN_ENTRY ); |
69 qDebug("EapDialogPlugin::EapDialogPlugin"); |
83 qDebug("EapDialogPlugin::EapDialogPlugin"); |
70 |
84 |
71 OstTraceFunctionExit0( EAPDIALOGPLUGIN_EAPDIALOGPLUGIN_EXIT ); |
85 OstTraceFunctionExit0( EAPDIALOGPLUGIN_EAPDIALOGPLUGIN_EXIT ); |
72 } |
86 } |
73 |
87 |
74 /** |
88 /*! |
75 * Destructor |
89 * Destructor |
76 */ |
90 */ |
77 EapDialogPlugin::~EapDialogPlugin() |
91 EapDialogPlugin::~EapDialogPlugin() |
78 { |
92 { |
79 OstTraceFunctionEntry0( DUP1_EAPDIALOGPLUGIN_DEAPDIALOGPLUGIN_ENTRY ); |
93 OstTraceFunctionEntry0( DUP1_EAPDIALOGPLUGIN_DEAPDIALOGPLUGIN_ENTRY ); |
80 |
94 |
81 OstTraceFunctionExit0( EAPDIALOGPLUGIN_DEAPDIALOGPLUGIN_EXIT ); |
95 OstTraceFunctionExit0( EAPDIALOGPLUGIN_DEAPDIALOGPLUGIN_EXIT ); |
82 } |
96 } |
83 |
97 |
84 /** |
98 /*! |
85 * Create device dialog widget |
99 * Create device dialog widget |
|
100 * |
|
101 * @param [in] deviceDialogType Tells which Dialog to create |
|
102 * @param [in] parameters Parameters for the Construction of the dialog. |
|
103 * @return created dialog widget |
86 */ |
104 */ |
87 HbDeviceDialogInterface *EapDialogPlugin::createDeviceDialog( |
105 HbDeviceDialogInterface *EapDialogPlugin::createDeviceDialog( |
88 const QString &deviceDialogType, |
106 const QString &deviceDialogType, |
89 const QVariantMap ¶meters) |
107 const QVariantMap ¶meters) |
90 { |
108 { |
91 OstTraceFunctionEntry0( EAPDIALOGPLUGIN_CREATEDEVICEDIALOG_ENTRY ); |
109 OstTraceFunctionEntry0( EAPDIALOGPLUGIN_CREATEDEVICEDIALOG_ENTRY ); |
92 qDebug("EapDialogPlugin::createDeviceDialog ENTER"); |
110 qDebug("EapDialogPlugin::createDeviceDialog ENTER"); |
|
111 |
|
112 HbDeviceDialogInterface* dialog = NULL; |
93 |
113 |
94 if ( deviceDialogType.compare("com.nokia.eap.usernamepassworddialog/1.0") == 0 ) |
114 if ( deviceDialogType.compare(dialogInfos[0].mTypeString) == 0 ) |
95 { |
115 { |
96 qDebug("EapDialogPlugin::createDeviceDialog: new EapUsernamePwdDialog"); |
116 qDebug("EapDialogPlugin::createDeviceDialog: new EapUsernamePwdDialog"); |
97 return ( new EapUsernamePwdDialog(parameters) ); |
117 dialog = new EapUsernamePwdDialog(parameters); |
98 } |
118 } |
99 else if ( deviceDialogType.compare("com.nokia.eap.querydialog/1.0") == 0 ) |
119 else if ( deviceDialogType.compare(dialogInfos[1].mTypeString) == 0 ) |
100 { |
120 { |
101 qDebug("EapDialogPlugin::createDeviceDialog: new EapQueryDialog"); |
121 qDebug("EapDialogPlugin::createDeviceDialog: new EapQueryDialog"); |
102 return ( new EapQueryDialog(parameters) ); |
122 dialog = new EapQueryDialog(parameters); |
103 } |
123 } |
104 else if ( deviceDialogType.compare("com.nokia.eap.passwordquerydialog/1.0") == 0 ) |
124 else if ( deviceDialogType.compare(dialogInfos[2].mTypeString) == 0 ) |
105 { |
125 { |
106 qDebug("EapDialogPlugin::createDeviceDialog: new EapPasswordQueryDialog"); |
126 qDebug("EapDialogPlugin::createDeviceDialog: new EapPasswordQueryDialog"); |
107 return ( new EapPasswordQueryDialog(parameters) ); |
127 dialog = new EapPasswordQueryDialog(parameters); |
108 } |
128 } |
109 else if ( deviceDialogType.compare("com.nokia.eap.fastinstallpacquerydialog/1.0") == 0 ) |
129 else if ( deviceDialogType.compare(dialogInfos[3].mTypeString) == 0 ) |
110 { |
130 { |
111 qDebug("EapDialogPlugin::createDeviceDialog: new EapFastInstallPacQueryDialog"); |
131 qDebug("EapDialogPlugin::createDeviceDialog: new EapFastInstallPacQueryDialog"); |
112 return ( new EapFastInstallPacQueryDialog(parameters) ); |
132 dialog = new EapFastInstallPacQueryDialog(parameters); |
113 } |
133 } |
114 else if ( deviceDialogType.compare("com.nokia.eap.fastpacstorepwquerydialog/1.0") == 0 ) |
134 else if ( deviceDialogType.compare(dialogInfos[4].mTypeString) == 0 ) |
115 { |
135 { |
116 qDebug("EapDialogPlugin::createDeviceDialog: new EapFastPacStorePwQueryDialog"); |
136 qDebug("EapDialogPlugin::createDeviceDialog: new EapFastPacStorePwQueryDialog"); |
117 return ( new EapFastPacStorePwQueryDialog(parameters)); |
137 dialog = new EapFastPacStorePwQueryDialog(parameters); |
118 } |
138 } |
119 else if ( deviceDialogType.compare("com.nokia.eap.fastcreatemasterkeyquerydialog/1.0") == 0 ) |
139 else if ( deviceDialogType.compare(dialogInfos[5].mTypeString) == 0 ) |
120 { |
140 { |
121 qDebug("EapDialogPlugin::createDeviceDialog: new EapFastCreateMasterKeyQueryDialog"); |
141 qDebug("EapDialogPlugin::createDeviceDialog: new EapFastCreateMasterKeyQueryDialog"); |
122 return ( new EapFastCreateMasterKeyQueryDialog(parameters) ); |
142 dialog = new EapFastCreateMasterKeyQueryDialog(parameters); |
123 } |
143 } |
124 else if ( deviceDialogType.compare("com.nokia.eap.fastpacfilepwquerydialog/1.0") == 0 ) |
144 else if ( deviceDialogType.compare(dialogInfos[6].mTypeString) == 0 ) |
125 { |
145 { |
126 qDebug("EapDialogPlugin::createDeviceDialog: new EapFastPacFilePwQueryDialog"); |
146 qDebug("EapDialogPlugin::createDeviceDialog: new EapFastPacFilePwQueryDialog"); |
127 return ( new EapFastPacFilePwQueryDialog(parameters) ); |
147 dialog = new EapFastPacFilePwQueryDialog(parameters); |
128 } |
148 } |
129 else if ( deviceDialogType.compare("com.nokia.eap.fastprovwaitnotedialog/1.0") == 0 ) |
149 else if ( deviceDialogType.compare(dialogInfos[7].mTypeString) == 0 ) |
130 { |
150 { |
131 qDebug("EapDialogPlugin::createDeviceDialog: new EapFastProvWaitNoteDialog"); |
151 qDebug("EapDialogPlugin::createDeviceDialog: new EapFastProvWaitNoteDialog"); |
132 return ( new EapFastProvWaitNoteDialog(parameters) ); |
152 dialog = new EapFastProvWaitNoteDialog(parameters); |
133 } |
153 } |
134 else if ( deviceDialogType.compare("com.nokia.eap.mschapv2passwordexpirednotedialog/1.0") == 0 ) |
154 else if ( deviceDialogType.compare(dialogInfos[8].mTypeString) == 0 ) |
135 { |
155 { |
136 qDebug("EapDialogPlugin::createDeviceDialog: new EapMschapv2PwdExpNoteDialog"); |
156 qDebug("EapDialogPlugin::createDeviceDialog: new EapMschapv2PwdExpNoteDialog"); |
137 return ( new EapMschapv2PwdExpNoteDialog(parameters) ); |
157 dialog = new EapMschapv2PwdExpNoteDialog(parameters); |
138 } |
158 } |
139 else if ( deviceDialogType.compare("com.nokia.eap.mschapv2oldpassworddialog/1.0") == 0 ) |
159 else if ( deviceDialogType.compare(dialogInfos[9].mTypeString) == 0 ) |
140 { |
160 { |
141 qDebug("EapDialogPlugin::createDeviceDialog: new EapMschapv2OldPwdDialog"); |
161 qDebug("EapDialogPlugin::createDeviceDialog: new EapMschapv2OldPwdDialog"); |
142 return ( new EapMschapv2OldPwdDialog(parameters) ); |
162 dialog = new EapMschapv2OldPwdDialog(parameters); |
143 } |
163 } |
144 else if ( deviceDialogType.compare("com.nokia.eap.mschapv2newpassworddialog/1.0") == 0 ) |
164 else if ( deviceDialogType.compare(dialogInfos[10].mTypeString) == 0 ) |
145 { |
165 { |
146 qDebug("EapDialogPlugin::createDeviceDialog: new EapMschapv2NewPwdDialog"); |
166 qDebug("EapDialogPlugin::createDeviceDialog: new EapMschapv2NewPwdDialog"); |
147 return ( new EapMschapv2NewPwdDialog(parameters) ); |
167 dialog = new EapMschapv2NewPwdDialog(parameters); |
148 } |
168 } |
149 else if ( deviceDialogType.compare("com.nokia.eap.fastshowprovnotsuccessnotedialog/1.0") == 0 ) |
169 else if ( deviceDialogType.compare(dialogInfos[11].mTypeString) == 0 ) |
150 { |
170 { |
151 qDebug("EapDialogPlugin::createDeviceDialog: new EapFastProvNotSuccessNoteDialog"); |
171 qDebug("EapDialogPlugin::createDeviceDialog: new EapFastProvNotSuccessNoteDialog"); |
152 return ( new EapFastProvNotSuccessNoteDialog(parameters) ); |
172 dialog = new EapFastProvNotSuccessNoteDialog(parameters); |
153 } |
173 } |
154 OstTraceFunctionExit0( EAPDIALOGPLUGIN_CREATEDEVICEDIALOG_EXIT ); |
174 OstTraceFunctionExit0( EAPDIALOGPLUGIN_CREATEDEVICEDIALOG_EXIT ); |
155 qDebug("EapDialogPlugin::createDeviceDialog EXIT"); |
175 qDebug("EapDialogPlugin::createDeviceDialog EXIT"); |
156 |
176 |
157 return NULL; |
177 return dialog; |
158 } |
178 } |
159 |
179 |
160 /** |
180 /*! |
161 * Check if client is allowed to use device dialog widget |
181 * Check if client is allowed to use device dialog widget. For the meantime |
162 */ |
182 * this plugin doesn't perform operations that may compromise security. |
|
183 * All clients are allowed to use. |
|
184 * |
|
185 * @param [in] deviceDialogType Tells which Dialog type |
|
186 * @param [in] parameters Device dialog parameters |
|
187 * @param [in] securityInfo Information for Security check |
|
188 * @return returns always true |
|
189 */ |
163 bool EapDialogPlugin::accessAllowed(const QString &deviceDialogType, |
190 bool EapDialogPlugin::accessAllowed(const QString &deviceDialogType, |
164 const QVariantMap ¶meters, const QVariantMap &securityInfo) const |
191 const QVariantMap ¶meters, const QVariantMap &securityInfo) const |
165 { |
192 { |
166 OstTraceFunctionEntry0( EAPDIALOGPLUGIN_ACCESSALLOWED_ENTRY ); |
193 OstTraceFunctionEntry0( EAPDIALOGPLUGIN_ACCESSALLOWED_ENTRY ); |
167 |
194 |
168 Q_UNUSED(deviceDialogType) |
195 Q_UNUSED(deviceDialogType) |
169 Q_UNUSED(parameters) |
196 Q_UNUSED(parameters) |
170 Q_UNUSED(securityInfo) |
197 Q_UNUSED(securityInfo) |
171 |
198 |
172 // This plugin doesn't perform operations that may compromise security. |
|
173 // All clients are allowed to use. |
|
174 return true; |
199 return true; |
175 } |
200 } |
176 |
201 |
177 /** |
202 /*! |
178 * Return information of device dialog the plugin creates |
203 * Return information of device dialog the plugin creates |
|
204 * |
|
205 * @param [in] deviceDialogType Tells which Dialog type |
|
206 * @param [in] parameters Device dialog parameters |
|
207 * @param [in,out] info Structure the plugin fills with an information |
|
208 * @return returns always true |
179 */ |
209 */ |
180 bool EapDialogPlugin::deviceDialogInfo(const QString &deviceDialogType, |
210 bool EapDialogPlugin::deviceDialogInfo(const QString &deviceDialogType, |
181 const QVariantMap ¶meters, DeviceDialogInfo *info) const |
211 const QVariantMap ¶meters, DeviceDialogInfo *info) const |
182 { |
212 { |
183 OstTraceFunctionEntry0( EAPDIALOGPLUGIN_DEVICEDIALOGINFO_ENTRY ); |
213 OstTraceFunctionEntry0( EAPDIALOGPLUGIN_DEVICEDIALOGINFO_ENTRY ); |