|
1 /* |
|
2 * Copyright (c) 2006 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 the License "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: Header for UniPluginController-class* |
|
15 */ |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __CCSESCHEDULERUNIPLUGINCONTROLLER_H |
|
21 #define __CCSESCHEDULERUNIPLUGINCONTROLLER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include "CCseSchedulerPluginControllerBase.h" |
|
25 |
|
26 // CONSTANTS |
|
27 // None |
|
28 |
|
29 // MACROS |
|
30 // None |
|
31 |
|
32 // DATA TYPES |
|
33 // None |
|
34 |
|
35 // FUNCTION PROTOTYPES |
|
36 // None |
|
37 |
|
38 // FORWARD DECLARATIONS |
|
39 // None |
|
40 |
|
41 // CLASS DECLARATION |
|
42 class CCseSchedulerPluginStarter; |
|
43 class CCseSchedulerLandLord; |
|
44 |
|
45 /** |
|
46 * Controller for plugins that can be only be in run one at the time |
|
47 */ |
|
48 class CCseSchedulerUniPluginController : public CCseSchedulerPluginControllerBase |
|
49 { |
|
50 public: // Constructors and destructor |
|
51 /** |
|
52 * Two-phased constructor. |
|
53 * @params aEngine reference to engine |
|
54 * @params aPluginUid plugin uid of the plugin this plugin controller is made for |
|
55 * @return CCseSchedulerPluginControllerBase pointer to CCseSchedulerPluginControllerBase class |
|
56 */ |
|
57 static CCseSchedulerUniPluginController* NewL( CCseSchedulerServerEngine& aEngine, TInt32 aPluginUid ); |
|
58 |
|
59 /** |
|
60 * Destructor. |
|
61 */ |
|
62 virtual ~CCseSchedulerUniPluginController(); |
|
63 |
|
64 |
|
65 public: // from CCseSchedulerPluginControllerBase |
|
66 |
|
67 void ClearControllerL(); |
|
68 |
|
69 TBool IsControllerActive(); |
|
70 |
|
71 void RunPluginsL() ; |
|
72 |
|
73 void SetSchedulesL( RPointerArray<CCseScheduledProgram>& aScheduleArray ); |
|
74 |
|
75 void ScheduleCompletedL( const TUint32 aDbIdentifier, TInt aCompletitionCode ); |
|
76 |
|
77 void TimerErrorL( const TInt32 aError ); |
|
78 |
|
79 private: // Constructors and destructor |
|
80 /** |
|
81 * C++ default constructor. |
|
82 */ |
|
83 CCseSchedulerUniPluginController( CCseSchedulerServerEngine& aEngine, TInt32 aPluginUid ); |
|
84 |
|
85 /** |
|
86 * By default Symbian 2nd phase constructor is private. |
|
87 */ |
|
88 void ConstructL(); |
|
89 |
|
90 private: // New methods |
|
91 /** |
|
92 * Handles succesfully completed schedules. |
|
93 * @param aDbIdentifier DbIdentifier of schedule just completed |
|
94 */ |
|
95 void ScheduleCompletedSuccesfullyL( const TUint32 aDbIdentifier ); |
|
96 |
|
97 /** |
|
98 * Handles failed schedules. |
|
99 * @param aDbIdentifier DbIdentifier of schedule just completed |
|
100 * @param aCompletitionCode Error code of the completed schedule. |
|
101 */ |
|
102 void HandleScheduleErrorL( const TUint32 aDbIdentifier, |
|
103 TUint32 aCompletitionCode ); |
|
104 private: // Data |
|
105 |
|
106 /** |
|
107 * LandLord. Owns data that is given to new thread and acts as observer to thread. |
|
108 * Own. |
|
109 */ |
|
110 CCseSchedulerLandLord* iLandLord; |
|
111 |
|
112 /** |
|
113 * Boolean representing if the LandLord is active or not. |
|
114 */ |
|
115 TBool iIsLandLordWorking; |
|
116 }; |
|
117 |
|
118 #endif // __CCSESCHEDULERUNIPLUGINCONTROLLER_H |