|
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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef _CCSESCHEDULERAPI_H |
|
21 #define _CCSESCHEDULERAPI_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <ipvideo/RCseSchedulerClient.h> // Client common methods (server start up etc) |
|
26 #include <ipvideo/RCseSchedulerService.h> // Client common methods (open, close etc) |
|
27 |
|
28 // CONSTANTS |
|
29 // None. |
|
30 |
|
31 // MACROS |
|
32 // None. |
|
33 |
|
34 // DATA TYPES |
|
35 // None. |
|
36 |
|
37 // FUNCTION PROTOTYPES |
|
38 // None. |
|
39 |
|
40 // FORWARD DECLARATIONS |
|
41 class CCseScheduledProgram; |
|
42 |
|
43 // CLASS DECLARATION |
|
44 /** |
|
45 * General client api that manages service functionality. |
|
46 * |
|
47 * @lib CseSchedulerClient.lib |
|
48 */ |
|
49 class CCseSchedulerApi : public CBase |
|
50 { |
|
51 public: // Constructors and destructor |
|
52 |
|
53 /** |
|
54 * Two-phased constructor. |
|
55 */ |
|
56 IMPORT_C static CCseSchedulerApi* NewL(); |
|
57 |
|
58 /** |
|
59 * Destructor. |
|
60 * @return None. |
|
61 */ |
|
62 IMPORT_C virtual ~CCseSchedulerApi(); |
|
63 |
|
64 private: // Constructors and destructor |
|
65 |
|
66 /** |
|
67 * C++ default constructor. |
|
68 */ |
|
69 CCseSchedulerApi(); |
|
70 |
|
71 /** |
|
72 * Symbian 2nd phase constructor can leave. |
|
73 */ |
|
74 void ConstructL(); |
|
75 |
|
76 public: // New methods |
|
77 /** |
|
78 * Adds given schedule to Common Scheduling Engine database. After the call is |
|
79 * completed, the parameter contains the DB identifier of the schedule. |
|
80 * @param aData Schedule to be added to database. |
|
81 * @return Generic symbian error code. |
|
82 */ |
|
83 IMPORT_C TInt AddSchedule( CCseScheduledProgram& aData ) const; |
|
84 |
|
85 /** |
|
86 * Removes schedule from database. |
|
87 * @param aDbIdentifier Database identifier of the schedule to be removed. |
|
88 * @return Generic symbian error code. |
|
89 */ |
|
90 IMPORT_C TInt RemoveSchedule( const TUint32 aDbIdentifier ) const; |
|
91 |
|
92 /** |
|
93 * Gets schedule from database. |
|
94 * @param aDbIdentifier Database identifier of the schedule that is wanted |
|
95 * from the database |
|
96 * @param aProg Pointer where this scheduled program is get. |
|
97 * @return Generic symbian error codes. |
|
98 */ |
|
99 IMPORT_C TInt GetSchedule( const TUint32 aDbIdentifier, |
|
100 CCseScheduledProgram* aProg ) const; |
|
101 |
|
102 /** |
|
103 * Get list of scheduled events from the scheduling engine based on given UID. |
|
104 * @param aAppUid Application UID. |
|
105 * @param aArray On return contains items from the database. |
|
106 * @return Generic symbian error code. |
|
107 */ |
|
108 IMPORT_C TInt GetSchedulesByAppUid( const TInt32 aAppUid, |
|
109 RPointerArray<CCseScheduledProgram>& aArray ) const; |
|
110 |
|
111 /** |
|
112 * Get overlapping schedule (if any) from the scheduling engine. |
|
113 * Uses schedule type, start and end times to find overalapping |
|
114 * schedules from the Commone Scheduling Engine database. |
|
115 * @param aProgram Schedule to used for finding overlapping schedules. |
|
116 * @param aResultArray On return, contains array of overlapping |
|
117 * schedules, empty if none found. |
|
118 * @return Generic symbian error code. |
|
119 */ |
|
120 IMPORT_C TInt GetOverlappingSchedules( CCseScheduledProgram& aProgram, |
|
121 RPointerArray<CCseScheduledProgram>& aResultArray ); |
|
122 |
|
123 /** |
|
124 * Get list of scheduled events from the scheduling engine based on given UID. |
|
125 * @param aPluginUid Plugin UID. |
|
126 * @param aArray On return contains items from the database. |
|
127 * @return Generic symbian error code. |
|
128 */ |
|
129 IMPORT_C TInt GetSchedulesByPluginUid( const TInt32 aPluginUid, |
|
130 RPointerArray<CCseScheduledProgram>& aArray ) const; |
|
131 |
|
132 /** |
|
133 * Get list of scheduled events from the scheduling engine based on given schedule type. |
|
134 * @param aScheduleType Schedule type. |
|
135 * @param aArray On return contains items from the database. |
|
136 * @return Generic symbian error code. |
|
137 */ |
|
138 IMPORT_C TInt GetSchedulesByType( const TInt32 aScheduleType, |
|
139 RPointerArray<CCseScheduledProgram>& aArray ) const; |
|
140 |
|
141 /** |
|
142 * Get list of scheduled events from the scheduling engine between given timeframe. |
|
143 * @param aBeginning Beginning of the time frame |
|
144 * @param aEnd End of the time frame |
|
145 * @return Generic symbian error code. |
|
146 */ |
|
147 IMPORT_C TInt GetSchedulesByTime( const TTime& aBeginning, |
|
148 const TTime& aEnd, |
|
149 RPointerArray<CCseScheduledProgram>& aArray ) const; |
|
150 |
|
151 |
|
152 private: // Data |
|
153 /** |
|
154 * Scheduler engine - Client |
|
155 */ |
|
156 RCseSchedulerClient iClient; |
|
157 |
|
158 /** |
|
159 * Scheduler engine - Service |
|
160 */ |
|
161 RCseSchedulerService iService; |
|
162 }; |
|
163 |
|
164 #endif //_CCSESCHEDULERAPI_H |
|
165 |
|
166 // End of file |