|
1 /* |
|
2 * Copyright (c) 2002 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 * CMsgErrorConnectionObserver declaration file |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef MSGERRORCONNECTIONOBSERVER_H |
|
22 #define MSGERRORCONNECTIONOBSERVER_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 #include <rconnmon.h> |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class CMsgErrorWatcher; |
|
30 |
|
31 // CLASS DECLARATION |
|
32 |
|
33 /** |
|
34 * CMsgErrorConnectionObserver |
|
35 * |
|
36 * @lib msgerrorwatcher.dll |
|
37 * @since 2.0 |
|
38 */ |
|
39 class CMsgErrorConnectionObserver : public CBase, |
|
40 public MConnectionMonitorObserver |
|
41 { |
|
42 public: // Constructors and destructor |
|
43 |
|
44 /** |
|
45 * Two-phased constructor. |
|
46 * |
|
47 * @param aWatcher A pointer to CMsgErrorWatcher |
|
48 */ |
|
49 static CMsgErrorConnectionObserver* NewL( CMsgErrorWatcher* aWatcher ); |
|
50 |
|
51 /** |
|
52 * Destructor. |
|
53 */ |
|
54 virtual ~CMsgErrorConnectionObserver(); |
|
55 |
|
56 /** |
|
57 * Get number of open (packet data) connetions |
|
58 * |
|
59 * @return Number of open (packet data) connetions |
|
60 */ |
|
61 TUint ConnectionsOpen(); |
|
62 |
|
63 /** |
|
64 * Start listening to "connection deleted" events. |
|
65 */ |
|
66 void StartL(); |
|
67 |
|
68 private: |
|
69 |
|
70 /** |
|
71 * By default Symbian OS constructor is private. |
|
72 */ |
|
73 void ConstructL(); |
|
74 |
|
75 /** |
|
76 * Private C++ constructor. |
|
77 * |
|
78 * @param aWatcher A pointer to CMsgErrorWatcher |
|
79 */ |
|
80 CMsgErrorConnectionObserver( CMsgErrorWatcher* aWatcher ); |
|
81 |
|
82 private: |
|
83 |
|
84 /** |
|
85 * From MConnectionMonitorObserver |
|
86 */ |
|
87 virtual void EventL( const CConnMonEventBase &aConnMonEvent ); |
|
88 |
|
89 private: // Data |
|
90 |
|
91 RConnectionMonitor iConnMon; |
|
92 CMsgErrorWatcher* iWatcher; |
|
93 TBool iStarted; |
|
94 TUint iConnectionsOpenWhenStarted; |
|
95 }; |
|
96 |
|
97 #endif // MSGERRORCONNECTIONOBSERVER_H |
|
98 |
|
99 // End of File |