1 /* |
|
2 * Copyright (c) 2008 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: |
|
15 * |
|
16 */ |
|
17 #ifndef JAVAAPPLICATIONSETTINGSVIEW_P_H |
|
18 #define JAVAAPPLICATIONSETTINGSVIEW_P_H |
|
19 |
|
20 #include <QVector> |
|
21 #include <memory> |
|
22 #include "javastorage.h" |
|
23 |
|
24 class HbComboBox; |
|
25 class HbDataForm; |
|
26 class HbDataFormModel; |
|
27 class HbDataFormModelItem; |
|
28 class JavaApplicationSettingsView; |
|
29 class JavaApplicationSettings; |
|
30 |
|
31 class JavaApplicationSettingsViewPrivate |
|
32 { |
|
33 |
|
34 public: |
|
35 JavaApplicationSettingsViewPrivate(const QString& aApplication); |
|
36 virtual ~JavaApplicationSettingsViewPrivate(); |
|
37 void init(JavaApplicationSettingsView*); |
|
38 |
|
39 // slots |
|
40 void _q_settingsChanged(const QString &newValue); |
|
41 void _q_dataItemDisplayed(const QModelIndex); |
|
42 |
|
43 private: |
|
44 void readAllSettings(); |
|
45 void initSettings(QVector<JavaApplicationSettings>& settings, HbDataFormModelItem * parent); |
|
46 void writeSettings(JavaApplicationSettings& settings, const QString &newValue); |
|
47 void securityWarningsChanged(const QString &); |
|
48 bool blanketAllowed(const JavaApplicationSettings &settings); |
|
49 HbComboBox * itemToComboBox(const HbDataFormModelItem *); |
|
50 JavaApplicationSettings* findSettings(HbComboBox* id); |
|
51 JavaApplicationSettings* findSettings(HbComboBox* id, QVector<JavaApplicationSettings>& settings); |
|
52 int readFromStorage(JavaApplicationSettings& settings); |
|
53 void writeToStorage(JavaApplicationSettings& settings); |
|
54 bool findFromStorage(const std::wstring&, const std::wstring&, const std::wstring&, const std::string&); |
|
55 std::wstring readFromStorage(const std::wstring&, const std::wstring&, const std::wstring&, const std::string&); |
|
56 void findEntry(const java::storage::JavaStorageApplicationList_t&, const std::wstring&, std::wstring& eValue); |
|
57 private: |
|
58 HbDataForm * mainForm; |
|
59 HbDataFormModel *model; |
|
60 HbDataFormModelItem * generalSettingsGroup; |
|
61 HbDataFormModelItem * securitySettingsGroup; |
|
62 QVector<JavaApplicationSettings> generalSettings; |
|
63 QVector<JavaApplicationSettings> securitySettings; |
|
64 QVector<JavaApplicationSettings> extraSettings; |
|
65 JavaApplicationSettingsView* iPublicView; |
|
66 std::auto_ptr<java::storage::JavaStorage> iStorage; |
|
67 std::wstring iJavaAppUid; |
|
68 QString BLANKET,SESSION,ONESHOT,DENIED,SECURITY_LEVEL,USER_DEFINED,SENSITIVE_SETTINGS,SENSITIVE_SETTINGS_NET_USAGE,MUTUALLY_EXCLUSIVE_SETTINGS,OK,CANCEL,SECURITY_WARNING_TITLE,NET_ACCESS,LOW_LEVEL_NET_ACCESS; |
|
69 }; |
|
70 |
|
71 |
|
72 #endif // JAVAAPPLICATIONSETTINGSVIEW_P_H |
|