62 #include "qsysteminfo.h" |
62 #include "qsysteminfo.h" |
63 #include <qmobilityglobal.h> |
63 #include <qmobilityglobal.h> |
64 #if !defined(QT_NO_DBUS) |
64 #if !defined(QT_NO_DBUS) |
65 #include <qhalservice_linux_p.h> |
65 #include <qhalservice_linux_p.h> |
66 |
66 |
|
67 typedef enum |
|
68 { |
|
69 NM_DEVICE_STATE_UNKNOWN = 0, |
|
70 NM_DEVICE_STATE_UNMANAGED, |
|
71 NM_DEVICE_STATE_UNAVAILABLE, |
|
72 NM_DEVICE_STATE_DISCONNECTED, |
|
73 NM_DEVICE_STATE_PREPARE, |
|
74 NM_DEVICE_STATE_CONFIG, |
|
75 NM_DEVICE_STATE_NEED_AUTH, |
|
76 NM_DEVICE_STATE_IP_CONFIG, |
|
77 NM_DEVICE_STATE_ACTIVATED, |
|
78 NM_DEVICE_STATE_FAILED |
|
79 } NMDeviceState; |
|
80 |
67 struct ProfileDataValue { |
81 struct ProfileDataValue { |
68 QString key; |
82 QString key; |
69 QString val; |
83 QString val; |
70 QString type; |
84 QString type; |
71 }; |
85 }; |
125 |
139 |
126 QString networkName(QSystemNetworkInfo::NetworkMode mode); |
140 QString networkName(QSystemNetworkInfo::NetworkMode mode); |
127 QString macAddress(QSystemNetworkInfo::NetworkMode mode); |
141 QString macAddress(QSystemNetworkInfo::NetworkMode mode); |
128 |
142 |
129 QNetworkInterface interfaceForMode(QSystemNetworkInfo::NetworkMode mode); |
143 QNetworkInterface interfaceForMode(QSystemNetworkInfo::NetworkMode mode); |
130 |
144 QSystemNetworkInfo::NetworkMode currentMode(); |
|
145 void setWlanSignalStrengthCheckEnabled(bool enabled); |
|
146 |
|
147 protected: |
|
148 void setupNetworkInfo(); |
|
149 |
|
150 private Q_SLOTS: |
|
151 void cellNetworkSignalStrengthChanged(uchar,uchar); |
|
152 void icdStatusChanged(QString,QString,QString,QString); |
|
153 void networkModeChanged(int); |
|
154 void operatorNameChanged(uchar,QString,QString,uint,uint); |
|
155 void registrationStatusChanged(uchar,ushort,uint,uint,uint,uchar,uchar); |
|
156 void usbCableAction(); |
|
157 void wlanSignalStrengthCheck(); |
|
158 |
|
159 private: |
|
160 // The index of wanted argument in the QDBusMessage which is received as a |
|
161 // reply to the sent get_registration_status message via interface Phone.Net |
|
162 |
|
163 enum { // In the received QDBusMessage.. |
|
164 STATUS_INDEX = 0, // the original type of status argument is byte |
|
165 LAC_INDEX, // the original type of lac argument is uint16 |
|
166 CELLID_INDEX, // the original type of cellId argument is uint32 |
|
167 MNC_INDEX, // the original type of mnc argument is uint32 |
|
168 MCC_INDEX // the original type of mcc argument is uint32 |
|
169 }; |
|
170 |
|
171 int cellSignalStrength; |
|
172 int currentCellId; |
|
173 int currentCellNetworkStatus; |
|
174 int currentEthernetSignalStrength; |
|
175 int currentLac; |
|
176 QString currentEthernetState; |
|
177 QString currentMCC; |
|
178 QString currentMNC; |
|
179 QString currentOperatorName; |
|
180 int currentWlanSignalStrength; |
|
181 int radioAccessTechnology; |
|
182 int iWlanStrengthCheckEnabled; |
|
183 QTimer *wlanSignalStrengthTimer; |
131 }; |
184 }; |
132 |
185 |
133 class QSystemDisplayInfoPrivate : public QSystemDisplayInfoLinuxCommonPrivate |
186 class QSystemDisplayInfoPrivate : public QSystemDisplayInfoLinuxCommonPrivate |
134 { |
187 { |
135 Q_OBJECT |
188 Q_OBJECT |