|
1 /* |
|
2 * Copyright (c) 2002-2005 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: Monitors browser termination. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CSATBROWSERTERMINATIONMONITOR_H |
|
20 #define CSATBROWSERTERMINATIONMONITOR_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <w32std.h> |
|
24 #include "msatbrowserwsobserver.h" |
|
25 #include "CSatEventMonitorHandler.h" |
|
26 |
|
27 // FORWARD DECLARATION |
|
28 class CSatBrowserWSMonitor; |
|
29 |
|
30 // CLASS DECLARATION |
|
31 |
|
32 /** |
|
33 * Monitors browser termination. |
|
34 * |
|
35 * @lib EventMonitors.lib |
|
36 * @since Series 60 3.0 |
|
37 */ |
|
38 class CSatBrowserTerminationMonitor : public MSatBrowserWSObserver, |
|
39 public CSatEventMonitorHandler |
|
40 { |
|
41 public: // Constructor and destructor |
|
42 |
|
43 /** |
|
44 * Two-phased constructor. |
|
45 * @param aUtils Event monitor utils interface |
|
46 */ |
|
47 static CSatBrowserTerminationMonitor* NewL( |
|
48 MSatEventMonitorUtils& aUtils ); |
|
49 |
|
50 /** |
|
51 * Destructor. |
|
52 */ |
|
53 virtual ~CSatBrowserTerminationMonitor(); |
|
54 |
|
55 public: // From base class |
|
56 |
|
57 /** |
|
58 * From CSatEventMonitorHandler Cancels event monitoring |
|
59 */ |
|
60 void DoCancelMonitor(); |
|
61 |
|
62 /** |
|
63 * This function is called when browser's thread has actually died. |
|
64 * @param aCause The cause for the browser termination. |
|
65 */ |
|
66 void NotifyBrowserTerminated( |
|
67 const RSat::TBrowserTerminationCause aCause ); |
|
68 |
|
69 protected: // From CTimer |
|
70 |
|
71 /** |
|
72 * From CActive. |
|
73 */ |
|
74 void RunL(); |
|
75 |
|
76 /** |
|
77 * From CActive, implements the cancel protocol. |
|
78 */ |
|
79 void DoCancel(); |
|
80 |
|
81 protected: // From CSatEventMonitorHandler |
|
82 |
|
83 /** |
|
84 * From CSatEventMonitorHandler Starts event monitoring |
|
85 * @return Error code indicating the status of starting the monitor |
|
86 */ |
|
87 TInt StartMonitor(); |
|
88 |
|
89 private: |
|
90 |
|
91 /** |
|
92 * C++ default constructor. |
|
93 * @param aUtils Event monitor utils interface |
|
94 */ |
|
95 CSatBrowserTerminationMonitor( MSatEventMonitorUtils& aUtils ); |
|
96 |
|
97 /** |
|
98 * By default Symbian 2nd phase constructor is private. |
|
99 */ |
|
100 void ConstructL(); |
|
101 |
|
102 private: // Data |
|
103 |
|
104 // Window session termination monitor. |
|
105 CSatBrowserWSMonitor* iWSMonitor; |
|
106 }; |
|
107 |
|
108 #endif // CSATBROWSERTERMINATIONMONITOR_H |
|
109 |
|
110 // End of File |