1 /* |
|
2 * Copyright (c) 2009 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 |
|
18 #ifndef INFOWIDGETNETWORKHANDLER_H_ |
|
19 #define INFOWIDGETNETWORKHANDLER_H_ |
|
20 |
|
21 |
|
22 #include <QObject> |
|
23 #include <nwhandlingengine.h> |
|
24 |
|
25 class CNWSession; |
|
26 |
|
27 class InfoWidgetNetworkHandler : public QObject, public MNWMessageObserver |
|
28 { |
|
29 Q_OBJECT |
|
30 |
|
31 public: |
|
32 InfoWidgetNetworkHandler(QObject *parent = NULL); |
|
33 ~InfoWidgetNetworkHandler(); |
|
34 |
|
35 QString serviceProviderName() const; |
|
36 bool serviceProviderNameDisplayRequired() const; |
|
37 QString homeZoneTextTag() const; |
|
38 int homeZoneIndicatorType() const; |
|
39 QString mcnName() const; |
|
40 int mcnIndicatorType() const; |
|
41 int networkRegistrationStatus() const; |
|
42 bool isOnline() const; |
|
43 |
|
44 void logCurrentInfo(); |
|
45 |
|
46 public: // From MNWMessageObserver |
|
47 void HandleNetworkMessage(const TNWMessages aMessage); |
|
48 void HandleNetworkError(const TNWOperation aOperation, TInt aErrorCode); |
|
49 |
|
50 public slots: |
|
51 void suspend(); |
|
52 void resume(); |
|
53 |
|
54 void enableMcn(); |
|
55 void disableMcn(); |
|
56 |
|
57 protected: |
|
58 void writeMcnDisplayState(bool enabled); |
|
59 bool readMcnDisplayState(); |
|
60 |
|
61 signals: |
|
62 void networkDataChanged(); |
|
63 void networkError(int operation, int errorCode); |
|
64 |
|
65 private: |
|
66 TNWInfo m_nwInfo; |
|
67 QScopedPointer<CNWSession> m_nwSession; |
|
68 }; |
|
69 |
|
70 #endif /* INFOWIDGETNETWORKHANDLER_H_ */ |
|
71 |
|
72 |
|