127 void networkNameChanged(QSystemNetworkInfo::NetworkMode,const QString &); |
128 void networkNameChanged(QSystemNetworkInfo::NetworkMode,const QString &); |
128 void networkModeChanged(QSystemNetworkInfo::NetworkMode); |
129 void networkModeChanged(QSystemNetworkInfo::NetworkMode); |
129 |
130 |
130 protected: //from MTelephonyInfoObserver |
131 protected: //from MTelephonyInfoObserver |
131 void batteryLevelChanged(){}; |
132 void batteryLevelChanged(){}; |
132 void powerStateChanged(){}; |
|
133 |
133 |
134 void countryCodeChanged(); |
134 void countryCodeChanged(); |
135 void networkCodeChanged(); |
135 void networkCodeChanged(); |
136 void networkNameChanged(); |
136 void networkNameChanged(); |
137 void networkModeChanged(); |
137 void networkModeChanged(); |
187 QTM_BEGIN_NAMESPACE |
187 QTM_BEGIN_NAMESPACE |
188 |
188 |
189 class QSystemDeviceInfoPrivate : public QObject, |
189 class QSystemDeviceInfoPrivate : public QObject, |
190 public MTelephonyInfoObserver, |
190 public MTelephonyInfoObserver, |
191 public MProEngProfileActivationObserver, |
191 public MProEngProfileActivationObserver, |
192 public MCenRepNotifyHandlerCallback |
192 public MCenRepNotifyHandlerCallback, |
|
193 public MChargingStatusObserver |
193 { |
194 { |
194 Q_OBJECT |
195 Q_OBJECT |
195 |
196 |
196 public: |
197 public: |
197 |
198 |
235 private: |
236 private: |
236 QSystemDeviceInfo::Profile s60ProfileIdToProfile(TInt profileId) const; |
237 QSystemDeviceInfo::Profile s60ProfileIdToProfile(TInt profileId) const; |
237 |
238 |
238 protected: //from MTelephonyInfoObserver |
239 protected: //from MTelephonyInfoObserver |
239 void batteryLevelChanged(); |
240 void batteryLevelChanged(); |
240 void powerStateChanged(); |
|
241 |
241 |
242 void countryCodeChanged(){}; |
242 void countryCodeChanged(){}; |
243 void networkCodeChanged(){}; |
243 void networkCodeChanged(){}; |
244 void networkNameChanged(){}; |
244 void networkNameChanged(){}; |
245 void networkModeChanged(){}; |
245 void networkModeChanged(){}; |
246 |
246 |
247 void cellNetworkSignalStrengthChanged(){}; |
247 void cellNetworkSignalStrengthChanged(){}; |
248 void cellNetworkStatusChanged(){}; |
248 void cellNetworkStatusChanged(){}; |
249 |
249 |
|
250 protected: //from MChargingStatusObserver |
|
251 void chargingStatusChanged(); |
|
252 |
250 private: //data |
253 private: //data |
251 MProEngEngine *m_profileEngine; |
254 MProEngEngine *m_profileEngine; |
252 MProEngNotifyHandler* m_proEngNotifyHandler; |
255 MProEngNotifyHandler* m_proEngNotifyHandler; |
253 |
256 |
254 CRepository *m_bluetoothRepository; |
257 CRepository *m_bluetoothRepository; |
301 m_subscriberInfo = new CSubscriberInfo(*m_telephony); |
304 m_subscriberInfo = new CSubscriberInfo(*m_telephony); |
302 } |
305 } |
303 return m_subscriberInfo; |
306 return m_subscriberInfo; |
304 } |
307 } |
305 |
308 |
|
309 CChargingStatus *chargingStatus() |
|
310 { |
|
311 if (!m_chargingStatus) { |
|
312 m_chargingStatus = new CChargingStatus; |
|
313 } |
|
314 return m_chargingStatus; |
|
315 } |
|
316 |
306 CBatteryInfo *batteryInfo() |
317 CBatteryInfo *batteryInfo() |
307 { |
318 { |
308 if (!m_batteryInfo) { |
319 if (!m_batteryInfo) { |
309 m_batteryInfo = new CBatteryInfo(*m_telephony); |
320 m_batteryInfo = new CBatteryInfo(*m_telephony); |
310 } |
321 } |
334 } |
345 } |
335 return m_cellSignalStrengthInfo; |
346 return m_cellSignalStrengthInfo; |
336 } |
347 } |
337 |
348 |
338 private: |
349 private: |
339 DeviceInfo() : m_phoneInfo(NULL), m_subscriberInfo(NULL), m_batteryInfo(NULL), |
350 DeviceInfo() : m_phoneInfo(NULL), m_subscriberInfo(NULL), m_chargingStatus(NULL), |
340 m_cellNetworkInfo(NULL), m_cellNetworkRegistrationInfo(NULL), |
351 m_batteryInfo(NULL), m_cellNetworkInfo(NULL), m_cellNetworkRegistrationInfo(NULL), |
341 m_cellSignalStrengthInfo(NULL) |
352 m_cellSignalStrengthInfo(NULL) |
342 { |
353 { |
343 m_telephony = CTelephony::NewL(); |
354 m_telephony = CTelephony::NewL(); |
344 }; |
355 }; |
345 |
356 |
347 { |
358 { |
348 delete m_cellSignalStrengthInfo; |
359 delete m_cellSignalStrengthInfo; |
349 delete m_cellNetworkRegistrationInfo; |
360 delete m_cellNetworkRegistrationInfo; |
350 delete m_cellNetworkInfo; |
361 delete m_cellNetworkInfo; |
351 delete m_batteryInfo; |
362 delete m_batteryInfo; |
|
363 delete m_chargingStatus; |
352 delete m_subscriberInfo; |
364 delete m_subscriberInfo; |
353 delete m_phoneInfo; |
365 delete m_phoneInfo; |
354 delete m_telephony; |
366 delete m_telephony; |
355 } |
367 } |
356 |
368 |
357 static DeviceInfo *m_instance; |
369 static DeviceInfo *m_instance; |
358 |
370 |
359 CTelephony *m_telephony; |
371 CTelephony *m_telephony; |
360 CPhoneInfo *m_phoneInfo; |
372 CPhoneInfo *m_phoneInfo; |
361 CSubscriberInfo *m_subscriberInfo; |
373 CSubscriberInfo *m_subscriberInfo; |
|
374 CChargingStatus *m_chargingStatus; |
362 CBatteryInfo *m_batteryInfo; |
375 CBatteryInfo *m_batteryInfo; |
363 CCellNetworkInfo *m_cellNetworkInfo; |
376 CCellNetworkInfo *m_cellNetworkInfo; |
364 CCellNetworkRegistrationInfo *m_cellNetworkRegistrationInfo; |
377 CCellNetworkRegistrationInfo *m_cellNetworkRegistrationInfo; |
365 CCellSignalStrengthInfo *m_cellSignalStrengthInfo; |
378 CCellSignalStrengthInfo *m_cellSignalStrengthInfo; |
366 }; |
379 }; |