|
1 /* |
|
2 * Copyright (c) 2002-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: This singleton class takes care of creation of different other |
|
15 * classes needed in PECProfiles. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef MT_CSCHEDULERUTILITY_H |
|
22 #define MT_CSCHEDULERUTILITY_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * A singleton class used to handle starting and stopping a new scheduler-loop |
|
33 * This stops the scheduler loop if it was started by this class. |
|
34 * |
|
35 * @lib Profiles_PEC.lib |
|
36 * @since 3.0 |
|
37 */ |
|
38 class MT_CSchedulerUtility : public CBase |
|
39 { |
|
40 public: // New functions |
|
41 |
|
42 /** |
|
43 * Create and return instance of MT_CSchedulerUtility. |
|
44 * @since 3.0 |
|
45 * @return instance of MT_CSchedulerUtility |
|
46 */ |
|
47 //?type ?member_function( ?type ?arg1 ); |
|
48 static MT_CSchedulerUtility* InstanceL(); |
|
49 |
|
50 /** |
|
51 * Destroys the scheduler utility instance. |
|
52 * @since 3.0 |
|
53 */ |
|
54 static void Release(); |
|
55 |
|
56 /** |
|
57 * Starts a new scheduler loop if one isn't already started. |
|
58 * @since 3.0 |
|
59 */ |
|
60 void Start(); |
|
61 |
|
62 /** |
|
63 * Stops a scheduler loop if it was started by this class. |
|
64 * @since 3.0 |
|
65 */ |
|
66 void Stop(); |
|
67 |
|
68 private: |
|
69 |
|
70 /** |
|
71 * Two-phased constructor. |
|
72 */ |
|
73 static MT_CSchedulerUtility* NewL(); |
|
74 |
|
75 /** |
|
76 * Destructor. |
|
77 */ |
|
78 virtual ~MT_CSchedulerUtility(); |
|
79 |
|
80 /** |
|
81 * C++ default constructor. |
|
82 */ |
|
83 MT_CSchedulerUtility(); |
|
84 |
|
85 /** |
|
86 * By default Symbian 2nd phase constructor is private. |
|
87 */ |
|
88 void ConstructL(); |
|
89 |
|
90 private: // Data |
|
91 |
|
92 CActiveSchedulerWait* iWait; |
|
93 }; |
|
94 |
|
95 #endif // MT_CSCHEDULERUTILITY_H |
|
96 |
|
97 // End of File |
|
98 |