|
1 /* |
|
2 * Copyright (c) 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: Class to handle server delayed shutdown |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __CSuplServerDelayedShutDown_H__ |
|
21 #define __CSuplServerDelayedShutDown_H__ |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class CSuplServer; |
|
28 // CLASS DECLARATION |
|
29 |
|
30 /** |
|
31 * Class to handle delayed server shutdown |
|
32 */ |
|
33 class CSuplServerDelayedShutdown : public CTimer |
|
34 { |
|
35 private: // Constructor |
|
36 /** |
|
37 * C++ Constructor |
|
38 */ |
|
39 CSuplServerDelayedShutdown(CSuplServer& aServer); |
|
40 |
|
41 public: // Destructor |
|
42 /** |
|
43 * C++ Destructor |
|
44 */ |
|
45 ~CSuplServerDelayedShutdown(); |
|
46 |
|
47 /** |
|
48 * Two-phase constructor |
|
49 */ |
|
50 static CSuplServerDelayedShutdown* NewL( |
|
51 /* IN */ CSuplServer& aServer |
|
52 ); |
|
53 |
|
54 public: // New functions |
|
55 |
|
56 /** |
|
57 * Start shutdown countdown. |
|
58 */ |
|
59 void Start(TTimeIntervalMicroSeconds32 aDelay); |
|
60 |
|
61 private: |
|
62 /** |
|
63 * EPOC default constructor |
|
64 */ |
|
65 void ConstructL(); |
|
66 |
|
67 // By default, prohibit copy constructor |
|
68 CSuplServerDelayedShutdown( const CSuplServerDelayedShutdown& ); |
|
69 // Prohibit assigment operator |
|
70 CSuplServerDelayedShutdown& operator= ( const CSuplServerDelayedShutdown& ); |
|
71 |
|
72 protected: // Functions from base classes |
|
73 |
|
74 /** |
|
75 * From CActive. |
|
76 * Called when timer completes |
|
77 */ |
|
78 void RunL(); |
|
79 |
|
80 private: // Data |
|
81 CSuplServer& iSuplServer; |
|
82 }; |
|
83 |
|
84 #endif // __CSuplServerDelayedShutDown_H__ |
|
85 |
|
86 // End of File |