|
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 MultiPluginController-class* |
|
15 */ |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __CCSESCHEDULERMULTIPLUGINCONTROLLER_H |
|
21 #define __CCSESCHEDULERMULTIPLUGINCONTROLLER_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 several in run at same time |
|
47 */ |
|
48 class CCseSchedulerMultiPluginController : 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 CCseSchedulerMultiPluginController* NewL( CCseSchedulerServerEngine& aEngine, TInt32 aPluginUid ); |
|
58 |
|
59 /** |
|
60 * Destructor. |
|
61 */ |
|
62 virtual ~CCseSchedulerMultiPluginController(); |
|
63 |
|
64 public: // from CCseSchedulerPluginControllerBase |
|
65 void ClearControllerL(); |
|
66 |
|
67 TBool IsControllerActive(); |
|
68 |
|
69 void RunPluginsL() ; |
|
70 |
|
71 void DoCleanUp() ; |
|
72 |
|
73 void ScheduleCompletedL( const TUint32 aDbIdentifier, TInt aCompletitionCode ); |
|
74 |
|
75 private: // Constructors and destructor |
|
76 /** |
|
77 * C++ default constructor. |
|
78 */ |
|
79 CCseSchedulerMultiPluginController( CCseSchedulerServerEngine& aEngine, TInt32 aPluginUid ); |
|
80 |
|
81 /** |
|
82 * By default Symbian 2nd phase constructor is private. |
|
83 */ |
|
84 void ConstructL(); |
|
85 |
|
86 private: // New methods |
|
87 /** |
|
88 * Handles succesfully completed schedules. |
|
89 * @param aDbIdentifier DbIdentifier of schedule just completed |
|
90 */ |
|
91 void ScheduleCompletedSuccesfullyL( const TUint32 aDbIdentifier ); |
|
92 |
|
93 /** |
|
94 * Handles failed schedules. |
|
95 * @param aDbIdentifier DbIdentifier of schedule just completed |
|
96 * @param aCompletitionCode Error code of the completed schedule. |
|
97 */ |
|
98 void HandleScheduleErrorL( const TUint32 aDbIdentifier, |
|
99 TUint32 aCompletitionCode ); |
|
100 private: // Data |
|
101 |
|
102 /** |
|
103 * LandLords. Owns data that is given to new thread and acts as observer to thread. |
|
104 * Own. |
|
105 */ |
|
106 RPointerArray<CCseSchedulerLandLord> iLandLords; |
|
107 }; |
|
108 |
|
109 #endif // __CCSESCHEDULERMULTIPLUGINCONTROLLER_H |