|
1 /* |
|
2 * Copyright (c) 2002-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: This file contains the header file of the CNWNetworkMonitorBase class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CNWNETWORKMONITORBASE_H |
|
20 #define CNWNETWORKMONITORBASE_H |
|
21 |
|
22 // INCLUDES |
|
23 #include "NWHandlingEngine.h" |
|
24 |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class RMmCustomAPI; |
|
28 class RMobilePhone; |
|
29 class CNWMessageHandler; |
|
30 |
|
31 // CLASS DECLARATION |
|
32 |
|
33 /** |
|
34 * Base class for network monitors. |
|
35 * |
|
36 * |
|
37 * @lib networkhandling.lib |
|
38 * @since Series 60_2.8 |
|
39 */ |
|
40 class CNWNetworkMonitorBase : public CActive |
|
41 { |
|
42 public: // Constructors and destructor |
|
43 |
|
44 /** |
|
45 * Destructor. |
|
46 */ |
|
47 virtual ~CNWNetworkMonitorBase(); |
|
48 |
|
49 public: // New functions |
|
50 |
|
51 /** |
|
52 * Is monitor initialised. Is notification completed at least once. |
|
53 * |
|
54 * @return ETrue if initialised. |
|
55 */ |
|
56 TBool IsInitialised() const; |
|
57 |
|
58 /** |
|
59 * Starts initialization ( lanuches notify requests ) |
|
60 * |
|
61 */ |
|
62 void Initialise(); |
|
63 |
|
64 protected: // New functions |
|
65 |
|
66 /** |
|
67 * C++ default constructor. |
|
68 */ |
|
69 CNWNetworkMonitorBase( CNWMessageHandler& aOwner, |
|
70 RMobilePhone& aPhone, |
|
71 TNWInfo& aNetworkInfo, |
|
72 RMmCustomAPI& aCustomAPI ); |
|
73 |
|
74 protected: // Functions from CActive |
|
75 |
|
76 /** |
|
77 * Cancels asyncronous request(s). |
|
78 * |
|
79 */ |
|
80 virtual void DoCancel() = 0; |
|
81 |
|
82 /** |
|
83 * Pure virtual function of request function. |
|
84 * |
|
85 */ |
|
86 virtual void IssueRequest() = 0; |
|
87 |
|
88 /** |
|
89 * Informs object that asyncronous request is ready. |
|
90 * |
|
91 * @return None. |
|
92 */ |
|
93 virtual void RunL() = 0; |
|
94 |
|
95 protected: // Data |
|
96 // Reference to the owner of this instance. |
|
97 CNWMessageHandler& iOwner; |
|
98 // Reference to the phone connection. |
|
99 RMobilePhone& iPhone; |
|
100 // Reference to the network info structure. |
|
101 TNWInfo& iNWNetworkInfo; |
|
102 //Reference to the customAPI connection |
|
103 RMmCustomAPI& iCustomAPI; |
|
104 // Tells if monitor is initialized. |
|
105 TBool iIsInitialised; |
|
106 }; |
|
107 |
|
108 #endif // CNWNETWORKMONITORBASE_H |
|
109 |
|
110 // End of File |