|
1 /* |
|
2 * Copyright (c) 2004 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: Resolves the network registration state and listens to the |
|
15 * registration state changes |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __CPENGAONWSTATUSOBSERVER_H |
|
22 #define __CPENGAONWSTATUSOBSERVER_H |
|
23 |
|
24 // INCLUDES |
|
25 #include "MIMPSSystemNotifierObserver.h" |
|
26 |
|
27 #include <e32base.h> |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 class MPEngAONwStatusObserver; |
|
31 class MIMPSSystemNotifier; |
|
32 |
|
33 // CLASS DECLARATION |
|
34 |
|
35 /** |
|
36 * Network observer class for getting the current network status and getting |
|
37 * the events of network registration change. |
|
38 * @lib PEngAOPlugin.lib |
|
39 * @since 2.6 |
|
40 */ |
|
41 class CPEngAONwStatusObserver : public CBase, |
|
42 public MIMPSSystemNotifierObserver |
|
43 { |
|
44 |
|
45 public: // Constructors and destructor |
|
46 |
|
47 /** |
|
48 * Two-phased constructor. |
|
49 */ |
|
50 static CPEngAONwStatusObserver* NewL( MPEngAONwStatusObserver& aObserver ); |
|
51 |
|
52 /** |
|
53 * Destructor. |
|
54 */ |
|
55 virtual ~CPEngAONwStatusObserver(); |
|
56 |
|
57 public: // new methods |
|
58 |
|
59 /** |
|
60 * Checks if network is available. If not then starts observe when |
|
61 * network status returns. |
|
62 * @return TBool ETrue if network is available |
|
63 */ |
|
64 TBool IsNetworkAvailable(); |
|
65 |
|
66 /** |
|
67 * Stops observering Network availability changes |
|
68 */ |
|
69 void StopObserving(); |
|
70 |
|
71 protected: // From MIMPSSystemNotifierObserver |
|
72 |
|
73 /** |
|
74 * @see MIMPSSystemNotifierObserver |
|
75 */ |
|
76 void HandleSystemNotifierEventL( TUid aKey, TInt aValue ); |
|
77 |
|
78 private: |
|
79 |
|
80 /** |
|
81 * C++ default constructor. |
|
82 */ |
|
83 CPEngAONwStatusObserver( MPEngAONwStatusObserver& aObserver ); |
|
84 |
|
85 /** |
|
86 * By default Symbian 2nd phase constructor is private. |
|
87 */ |
|
88 void ConstructL(); |
|
89 |
|
90 private: // Data |
|
91 /// system events observer |
|
92 MIMPSSystemNotifier* iSystemNotifier; |
|
93 |
|
94 /// A reference to the observing object |
|
95 MPEngAONwStatusObserver& iObserver; |
|
96 |
|
97 /// Reserved pointer for future extension |
|
98 TAny* iReserved; |
|
99 |
|
100 }; |
|
101 |
|
102 #endif // __CPENGAONWSTATUSOBSERVER_H |
|
103 |
|
104 // End of File |