18 |
18 |
19 #ifndef CPWLANAPADVANCEDVIEW_H |
19 #ifndef CPWLANAPADVANCEDVIEW_H |
20 #define CPWLANAPADVANCEDVIEW_H |
20 #define CPWLANAPADVANCEDVIEW_H |
21 |
21 |
22 // System includes |
22 // System includes |
|
23 #include <QAbstractSocket> |
|
24 #include <HbMessageBox> |
23 #include <cpbasesettingview.h> |
25 #include <cpbasesettingview.h> |
|
26 #include <cmmanagerdefines_shim.h> |
24 |
27 |
25 // User includes |
28 // User includes |
26 |
29 |
27 // Forward declarations |
30 // Forward declarations |
28 class HbDataForm; |
31 class HbDataForm; |
29 class HbDataFormModel; |
32 class HbDataFormModel; |
|
33 class HbDataFormModelItem; |
|
34 class HbValidator; |
30 class CmConnectionMethodShim; |
35 class CmConnectionMethodShim; |
31 |
36 |
32 // External data types |
37 // External data types |
33 |
38 |
34 // Constants |
39 // Constants |
51 protected: |
56 protected: |
52 |
57 |
53 protected slots: |
58 protected slots: |
54 |
59 |
55 private: |
60 private: |
|
61 Q_DISABLE_COPY(CpWlanApAdvancedView) |
|
62 |
|
63 //! IPv6 DNS type |
|
64 enum Ipv6DnsType { |
|
65 Ipv6DnsTypeAutomatic = 0, |
|
66 Ipv6DnsTypeWellKnown, |
|
67 Ipv6DnsTypeUserDefined |
|
68 }; |
|
69 |
56 void createAdvancedSettings(); |
70 void createAdvancedSettings(); |
|
71 void createIpv4Group(); |
|
72 void updateIpv4Group(); |
|
73 void createIpv6Group(); |
|
74 void updateIpv6Group(); |
|
75 void createProxyGroup(); |
|
76 void updateProxyGroup(); |
|
77 QString getIpAddress(CMManagerShim::ConnectionMethodAttribute attribute); |
|
78 Ipv6DnsType getIpv6DnsType(); |
|
79 void enableIpv4AddressFields(int state); |
|
80 void enableIpv4DnsFields(int state); |
|
81 void enableIpv6DnsFields(int selectionIndex); |
|
82 bool validateAndSaveIpAddress( |
|
83 HbDataFormModelItem *item, |
|
84 CMManagerShim::ConnectionMethodAttribute attribute, |
|
85 QAbstractSocket::NetworkLayerProtocol protocol); |
|
86 void showMessageBox( |
|
87 HbMessageBox::MessageBoxType type, |
|
88 const QString &text); |
|
89 bool tryUpdate(); |
|
90 void handleUpdateError(); |
57 |
91 |
58 private slots: |
92 private slots: |
59 |
93 void setEditorPreferences(const QModelIndex index); |
|
94 void changeIpv4AddressMode(int state); |
|
95 void changeIpv4Address(); |
|
96 void changeIpv4SubnetMask(); |
|
97 void changeIpv4Gateway(); |
|
98 void changeIpv4DnsMode(int state); |
|
99 void changeIpv4PrimaryDnsAddress(); |
|
100 void changeIpv4SecondaryDnsAddress(); |
|
101 void changeIpv6DnsMode(int selectionIndex); |
|
102 void changeIpv6PrimaryDnsAddress(); |
|
103 void changeIpv6SecondaryDnsAddress(); |
|
104 void changeProxyServer(); |
|
105 void changeProxyPort(); |
|
106 |
60 private: // data |
107 private: // data |
61 //! Dataform |
108 //! Dataform |
62 HbDataForm *mForm; |
109 HbDataForm *mForm; |
63 //! Dataform model |
110 //! Dataform model |
64 HbDataFormModel *mModel; |
111 HbDataFormModel *mModel; |
65 //! Connection Settings Shim connection method pointer |
112 //! Connection Settings Shim connection method pointer |
66 CmConnectionMethodShim *mCmConnectionMethod; |
113 CmConnectionMethodShim *mCmConnectionMethod; |
|
114 //! "IPv4 settings" group |
|
115 HbDataFormModelItem *mIpv4Group; |
|
116 //! "Automatic" setting item for phone IP address |
|
117 HbDataFormModelItem *mIpv4Automatic; |
|
118 //! "Phone IP address" setting item |
|
119 HbDataFormModelItem *mIpv4Address; |
|
120 //! "Subnet mask" setting item |
|
121 HbDataFormModelItem *mIpv4SubnetMask; |
|
122 //! "Default gateway" setting item |
|
123 HbDataFormModelItem *mIpv4Gateway; |
|
124 //! "Automatic" setting item for IPv4 DNS addresses |
|
125 HbDataFormModelItem *mIpv4DnsAutomatic; |
|
126 //! "Primary name server" setting item |
|
127 HbDataFormModelItem *mIpv4DnsAddress1; |
|
128 //! "Secondary name server" setting item |
|
129 HbDataFormModelItem *mIpv4DnsAddress2; |
|
130 //! "IPv6 settings" group |
|
131 HbDataFormModelItem *mIpv6Group; |
|
132 //! "Automatic" setting item for IPv6 DNS addresses |
|
133 HbDataFormModelItem *mIpv6DnsAutomatic; |
|
134 //! "Primary name server" setting item |
|
135 HbDataFormModelItem *mIpv6DnsAddress1; |
|
136 //! "Secondary name server" setting item |
|
137 HbDataFormModelItem *mIpv6DnsAddress2; |
|
138 //! "Proxy settings" group |
|
139 HbDataFormModelItem *mProxyGroup; |
|
140 //! "Proxy server address" setting item |
|
141 HbDataFormModelItem *mProxyServer; |
|
142 //! "Proxy port number" setting item |
|
143 HbDataFormModelItem *mProxyPort; |
|
144 //! Message box for info notes |
|
145 QSharedPointer<HbMessageBox> mMessageBox; |
|
146 //! Flag for IPv6 support |
|
147 bool mIpv6Supported; |
|
148 |
|
149 // Friend classes |
|
150 friend class TestCpWlanApPlugin; |
67 }; |
151 }; |
68 |
152 |
69 #endif // CPWLANAPADVANCEDVIEW_H |
153 #endif // CPWLANAPADVANCEDVIEW_H |