|
1 /* |
|
2 * Copyright (c) 2009-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: class declaration for monitoring network info change |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef IRQNWKINFOOBSERVER_H_ |
|
20 #define IRQNWKINFOOBSERVER_H_ |
|
21 |
|
22 #include <QObject> |
|
23 #include <QString> |
|
24 |
|
25 #include "irqnwkobserverinterface.h" // MIRQNwkInfoUpdate |
|
26 |
|
27 class IRQNwkInfoObserverImpl; |
|
28 |
|
29 class IRQNwkInfoObserver : public QObject, |
|
30 public MIRQNwkInfoUpdate |
|
31 { |
|
32 Q_OBJECT |
|
33 |
|
34 public: |
|
35 /*! |
|
36 * Get the instance of IRQNwkInfoObserver |
|
37 * @return IRQNwkInfoObserver* |
|
38 */ |
|
39 IMPORT_C static IRQNwkInfoObserver* openInstance(); |
|
40 |
|
41 /*! |
|
42 * Close the instance of IRQNwkInfoObserver |
|
43 */ |
|
44 IMPORT_C void closeInstance(); |
|
45 |
|
46 public: |
|
47 /*! |
|
48 * start monitoring network info change |
|
49 */ |
|
50 IMPORT_C void startMonitorNwkInfo(); |
|
51 |
|
52 /*! |
|
53 * stop monitoring network info change |
|
54 */ |
|
55 IMPORT_C void stopMonitorNwkInfo(); |
|
56 |
|
57 signals: |
|
58 |
|
59 void currentNwkChanged(const QString &aCurrentNwkMCC, const QString &aCurrentNwkMNC); |
|
60 |
|
61 void homeNwkChanged(const QString &aHomeNetworkMCC, const QString &aHomeNetworkMNC); |
|
62 |
|
63 private: |
|
64 |
|
65 /*! |
|
66 * Constructor. |
|
67 */ |
|
68 IRQNwkInfoObserver(); |
|
69 |
|
70 /*! |
|
71 * Destructor. |
|
72 */ |
|
73 ~IRQNwkInfoObserver(); |
|
74 |
|
75 /** |
|
76 * Creates IRQNwkInfoObserver instance |
|
77 */ |
|
78 static IRQNwkInfoObserver* createInstanceL(); |
|
79 |
|
80 void constructL(); |
|
81 |
|
82 public: |
|
83 /*! |
|
84 * From MIRQNwkInfoUpdate. |
|
85 */ |
|
86 void updateCurrentNwkInfo(const QString &aCurrentNwkMCC, const QString &aCurrentNwkMNC); |
|
87 |
|
88 void updateHomeNwkInfo(const QString &aHomeNetworkMCC, const QString &aHomeNetworkMNC); |
|
89 |
|
90 private: |
|
91 |
|
92 IRQNwkInfoObserverImpl *iBody; |
|
93 |
|
94 int iSingletonInstances; |
|
95 }; |
|
96 |
|
97 #endif // IRQNWKINFOOBSERVER_H_ |