1 | /**************************************************************************** |
2 | ** |
3 | ** Copyright (C) 2015 The Qt Company Ltd. |
4 | ** Contact: http://www.qt.io/licensing/ |
5 | ** |
6 | ** This file is part of the QtOrganizer module of the Qt Toolkit. |
7 | ** |
8 | ** $QT_BEGIN_LICENSE:LGPL21$ |
9 | ** Commercial License Usage |
10 | ** Licensees holding valid commercial Qt licenses may use this file in |
11 | ** accordance with the commercial license agreement provided with the |
12 | ** Software or, alternatively, in accordance with the terms contained in |
13 | ** a written agreement between you and The Qt Company. For licensing terms |
14 | ** and conditions see http://www.qt.io/terms-conditions. For further |
15 | ** information use the contact form at http://www.qt.io/contact-us. |
16 | ** |
17 | ** GNU Lesser General Public License Usage |
18 | ** Alternatively, this file may be used under the terms of the GNU Lesser |
19 | ** General Public License version 2.1 or version 3 as published by the Free |
20 | ** Software Foundation and appearing in the file LICENSE.LGPLv21 and |
21 | ** LICENSE.LGPLv3 included in the packaging of this file. Please review the |
22 | ** following information to ensure the GNU Lesser General Public License |
23 | ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and |
24 | ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
25 | ** |
26 | ** As a special exception, The Qt Company gives you certain additional |
27 | ** rights. These rights are described in The Qt Company LGPL Exception |
28 | ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. |
29 | ** |
30 | ** $QT_END_LICENSE$ |
31 | ** |
32 | ****************************************************************************/ |
33 | |
34 | #ifndef QORGANIZERITEMREQUESTS_P_H |
35 | #define QORGANIZERITEMREQUESTS_P_H |
36 | |
37 | // |
38 | // W A R N I N G |
39 | // ------------- |
40 | // |
41 | // This file is not part of the Qt API. It exists purely as an |
42 | // implementation detail. This header file may change from version to |
43 | // version without notice, or even be removed. |
44 | // |
45 | // We mean it. |
46 | // |
47 | |
48 | #ifndef QT_NO_DEBUG_STREAM |
49 | #include <QtCore/qdebug.h> |
50 | #endif |
51 | #include <QtCore/qdatetime.h> |
52 | #include <QtCore/qlist.h> |
53 | #include <QtCore/qmap.h> |
54 | |
55 | #include <QtOrganizer/qorganizeritem.h> |
56 | #include <QtOrganizer/qorganizeritemdetail.h> |
57 | #include <QtOrganizer/qorganizeritemfetchhint.h> |
58 | #include <QtOrganizer/qorganizeritemfilter.h> |
59 | #include <QtOrganizer/qorganizeritemid.h> |
60 | #include <QtOrganizer/qorganizeritemsortorder.h> |
61 | #include <QtOrganizer/private/qorganizerabstractrequest_p.h> |
62 | |
63 | QT_BEGIN_NAMESPACE_ORGANIZER |
64 | |
65 | class QOrganizerItemSaveRequestPrivate : public QOrganizerAbstractRequestPrivate |
66 | { |
67 | public: |
68 | QOrganizerItemSaveRequestPrivate() |
69 | : QOrganizerAbstractRequestPrivate(QOrganizerAbstractRequest::ItemSaveRequest) |
70 | { |
71 | } |
72 | |
73 | ~QOrganizerItemSaveRequestPrivate() |
74 | { |
75 | } |
76 | |
77 | #ifndef QT_NO_DEBUG_STREAM |
78 | QDebug& debugStreamOut(QDebug &dbg) const |
79 | { |
80 | dbg.nospace() << "QOrganizerItemSaveRequest(\n" ; |
81 | dbg.nospace() << "* items=" ; |
82 | dbg.nospace() << m_organizeritems; |
83 | dbg.nospace() << ",\n" ; |
84 | dbg.nospace() << "* definitionMask=" ; |
85 | dbg.nospace() << m_detailMask; |
86 | dbg.nospace() << ",\n" ; |
87 | dbg.nospace() << "* errorMap=" ; |
88 | dbg.nospace() << m_errors; |
89 | dbg.nospace() << "\n)" ; |
90 | return dbg.maybeSpace(); |
91 | } |
92 | #endif |
93 | |
94 | QList<QOrganizerItem> m_organizeritems; |
95 | QMap<int, QOrganizerManager::Error> m_errors; |
96 | QList<QOrganizerItemDetail::DetailType> m_detailMask; |
97 | }; |
98 | |
99 | class QOrganizerItemFetchRequestPrivate : public QOrganizerAbstractRequestPrivate |
100 | { |
101 | public: |
102 | QOrganizerItemFetchRequestPrivate() |
103 | : QOrganizerAbstractRequestPrivate(QOrganizerAbstractRequest::ItemFetchRequest) |
104 | , m_maxCount(-1) |
105 | { |
106 | } |
107 | |
108 | ~QOrganizerItemFetchRequestPrivate() |
109 | { |
110 | } |
111 | |
112 | #ifndef QT_NO_DEBUG_STREAM |
113 | QDebug& debugStreamOut(QDebug &dbg) const |
114 | { |
115 | dbg.nospace() << "QOrganizerItemFetchRequest(\n" ; |
116 | dbg.nospace() << "* items=" ; |
117 | dbg.nospace() << m_organizeritems; |
118 | dbg.nospace() << ",\n" ; |
119 | dbg.nospace() << "* filter=" ; |
120 | dbg.nospace() << m_filter; |
121 | dbg.nospace() << ",\n" ; |
122 | dbg.nospace() << "* sorting=" ; |
123 | dbg.nospace() << m_sorting; |
124 | dbg.nospace() << ",\n" ; |
125 | dbg.nospace() << "* startDate=" ; |
126 | dbg.nospace() << m_startDate; |
127 | dbg.nospace() << ",\n" ; |
128 | dbg.nospace() << "* endDate=" ; |
129 | dbg.nospace() << m_endDate; |
130 | dbg.nospace() << ",\n" ; |
131 | dbg.nospace() << "* fetchHint=" ; |
132 | dbg.nospace() << m_fetchHint; |
133 | dbg.nospace() << ",\n" ; |
134 | dbg.nospace() << "* maxCount=" ; |
135 | dbg.nospace() << m_maxCount; |
136 | dbg.nospace() << "\n)" ; |
137 | return dbg.maybeSpace(); |
138 | } |
139 | #endif |
140 | |
141 | QOrganizerItemFilter m_filter; |
142 | QList<QOrganizerItemSortOrder> m_sorting; |
143 | QOrganizerItemFetchHint m_fetchHint; |
144 | |
145 | QList<QOrganizerItem> m_organizeritems; |
146 | |
147 | QDateTime m_startDate; |
148 | QDateTime m_endDate; |
149 | |
150 | int m_maxCount; |
151 | }; |
152 | |
153 | class QOrganizerItemFetchForExportRequestPrivate : public QOrganizerAbstractRequestPrivate |
154 | { |
155 | public: |
156 | QOrganizerItemFetchForExportRequestPrivate() |
157 | : QOrganizerAbstractRequestPrivate(QOrganizerAbstractRequest::ItemFetchForExportRequest) |
158 | { |
159 | } |
160 | |
161 | ~QOrganizerItemFetchForExportRequestPrivate() |
162 | { |
163 | } |
164 | |
165 | #ifndef QT_NO_DEBUG_STREAM |
166 | QDebug& debugStreamOut(QDebug &dbg) const |
167 | { |
168 | dbg.nospace() << "QOrganizerItemFetchForExportRequest(\n" ; |
169 | dbg.nospace() << "* items=" ; |
170 | dbg.nospace() << m_organizeritems; |
171 | dbg.nospace() << ",\n" ; |
172 | dbg.nospace() << "* filter=" ; |
173 | dbg.nospace() << m_filter; |
174 | dbg.nospace() << ",\n" ; |
175 | dbg.nospace() << "* sorting=" ; |
176 | dbg.nospace() << m_sorting; |
177 | dbg.nospace() << ",\n" ; |
178 | dbg.nospace() << "* startDate=" ; |
179 | dbg.nospace() << m_startDate; |
180 | dbg.nospace() << ",\n" ; |
181 | dbg.nospace() << "* endDate=" ; |
182 | dbg.nospace() << m_endDate; |
183 | dbg.nospace() << ",\n" ; |
184 | dbg.nospace() << "* fetchHint=" ; |
185 | dbg.nospace() << m_fetchHint; |
186 | dbg.nospace() << "\n)" ; |
187 | return dbg.maybeSpace(); |
188 | } |
189 | #endif |
190 | |
191 | QOrganizerItemFilter m_filter; |
192 | QList<QOrganizerItemSortOrder> m_sorting; |
193 | QOrganizerItemFetchHint m_fetchHint; |
194 | |
195 | QList<QOrganizerItem> m_organizeritems; |
196 | |
197 | QDateTime m_startDate; |
198 | QDateTime m_endDate; |
199 | }; |
200 | |
201 | class QOrganizerItemFetchByIdRequestPrivate : public QOrganizerAbstractRequestPrivate |
202 | { |
203 | public: |
204 | QOrganizerItemFetchByIdRequestPrivate() |
205 | : QOrganizerAbstractRequestPrivate(QOrganizerAbstractRequest::ItemFetchByIdRequest) |
206 | { |
207 | } |
208 | |
209 | ~QOrganizerItemFetchByIdRequestPrivate() |
210 | { |
211 | } |
212 | |
213 | #ifndef QT_NO_DEBUG_STREAM |
214 | QDebug& debugStreamOut(QDebug &dbg) const |
215 | { |
216 | dbg.nospace() << "QOrganizerItemFetchByIdRequest(\n" ; |
217 | dbg.nospace() << "* items=" ; |
218 | dbg.nospace() << m_items; |
219 | dbg.nospace() << ",\n" ; |
220 | dbg.nospace() << "* ids=" ; |
221 | dbg.nospace() << m_ids; |
222 | dbg.nospace() << ",\n" ; |
223 | dbg.nospace() << "* fetchHint=" ; |
224 | dbg.nospace() << m_fetchHint; |
225 | dbg.nospace() << ",\n" ; |
226 | dbg.nospace() << "* errorMap=" ; |
227 | dbg.nospace() << m_errors; |
228 | dbg.nospace() << "\n)" ; |
229 | return dbg.maybeSpace(); |
230 | } |
231 | #endif |
232 | |
233 | QList<QOrganizerItemId> m_ids; |
234 | QOrganizerItemFetchHint m_fetchHint; |
235 | |
236 | QList<QOrganizerItem> m_items; |
237 | QMap<int, QOrganizerManager::Error> m_errors; |
238 | }; |
239 | |
240 | class QOrganizerItemOccurrenceFetchRequestPrivate : public QOrganizerAbstractRequestPrivate |
241 | { |
242 | public: |
243 | QOrganizerItemOccurrenceFetchRequestPrivate() |
244 | : QOrganizerAbstractRequestPrivate(QOrganizerAbstractRequest::ItemOccurrenceFetchRequest) |
245 | , m_maxOccurrences(-1) |
246 | { |
247 | } |
248 | |
249 | ~QOrganizerItemOccurrenceFetchRequestPrivate() |
250 | { |
251 | } |
252 | |
253 | #ifndef QT_NO_DEBUG_STREAM |
254 | QDebug& debugStreamOut(QDebug &dbg) const |
255 | { |
256 | dbg.nospace() << "QOrganizerItemOccurrenceFetchRequest(\n" ; |
257 | dbg.nospace() << "* itemOccurrences=" ; |
258 | dbg.nospace() << m_organizeritems; |
259 | dbg.nospace() << ",\n" ; |
260 | dbg.nospace() << "* parentItem=" ; |
261 | dbg.nospace() << m_generator; |
262 | dbg.nospace() << ",\n" ; |
263 | dbg.nospace() << "* startDate=" ; |
264 | dbg.nospace() << m_startDate; |
265 | dbg.nospace() << ",\n" ; |
266 | dbg.nospace() << "* endDate=" ; |
267 | dbg.nospace() << m_endDate; |
268 | dbg.nospace() << ",\n" ; |
269 | dbg.nospace() << "* fetchHint=" ; |
270 | dbg.nospace() << m_fetchHint; |
271 | dbg.nospace() << ",\n" ; |
272 | dbg.nospace() << "* maxOccurrences=" ; |
273 | dbg.nospace() << m_maxOccurrences; |
274 | dbg.nospace() << "\n)" ; |
275 | return dbg.maybeSpace(); |
276 | } |
277 | #endif |
278 | |
279 | QOrganizerItem m_generator; |
280 | QDateTime m_startDate; |
281 | QDateTime m_endDate; |
282 | int m_maxOccurrences; |
283 | QOrganizerItemFetchHint m_fetchHint; |
284 | |
285 | QList<QOrganizerItem> m_organizeritems; |
286 | }; |
287 | |
288 | class QOrganizerItemRemoveRequestPrivate : public QOrganizerAbstractRequestPrivate |
289 | { |
290 | public: |
291 | QOrganizerItemRemoveRequestPrivate() |
292 | : QOrganizerAbstractRequestPrivate(QOrganizerAbstractRequest::ItemRemoveRequest) |
293 | { |
294 | } |
295 | |
296 | ~QOrganizerItemRemoveRequestPrivate() |
297 | { |
298 | } |
299 | |
300 | #ifndef QT_NO_DEBUG_STREAM |
301 | QDebug& debugStreamOut(QDebug &dbg) const |
302 | { |
303 | dbg.nospace() << "QOrganizerItemRemoveRequest(" ; |
304 | dbg.nospace() << "items=" ; |
305 | dbg.nospace() << m_organizeritems; |
306 | dbg.nospace() << "," ; |
307 | dbg.nospace() << "errorMap=" ; |
308 | dbg.nospace() << m_errors; |
309 | dbg.nospace() << "\n)" ; |
310 | return dbg.maybeSpace(); |
311 | } |
312 | #endif |
313 | |
314 | QList<QOrganizerItem> m_organizeritems; |
315 | QMap<int, QOrganizerManager::Error> m_errors; |
316 | }; |
317 | |
318 | class QOrganizerItemRemoveByIdRequestPrivate : public QOrganizerAbstractRequestPrivate |
319 | { |
320 | public: |
321 | QOrganizerItemRemoveByIdRequestPrivate() |
322 | : QOrganizerAbstractRequestPrivate(QOrganizerAbstractRequest::ItemRemoveByIdRequest) |
323 | { |
324 | } |
325 | |
326 | ~QOrganizerItemRemoveByIdRequestPrivate() |
327 | { |
328 | } |
329 | |
330 | #ifndef QT_NO_DEBUG_STREAM |
331 | QDebug& debugStreamOut(QDebug& dbg) const |
332 | { |
333 | dbg.nospace() << "QOrganizerItemRemoveByIdRequest(" ; |
334 | dbg.nospace() << "itemIds=" ; |
335 | dbg.nospace() << m_organizeritemIds; |
336 | dbg.nospace() << "," ; |
337 | dbg.nospace() << "errorMap=" ; |
338 | dbg.nospace() << m_errors; |
339 | dbg.nospace() << "\n)" ; |
340 | return dbg.maybeSpace(); |
341 | } |
342 | #endif |
343 | |
344 | QList<QOrganizerItemId> m_organizeritemIds; |
345 | QMap<int, QOrganizerManager::Error> m_errors; |
346 | }; |
347 | |
348 | class QOrganizerItemIdFetchRequestPrivate : public QOrganizerAbstractRequestPrivate |
349 | { |
350 | public: |
351 | QOrganizerItemIdFetchRequestPrivate() |
352 | : QOrganizerAbstractRequestPrivate(QOrganizerAbstractRequest::ItemIdFetchRequest) |
353 | { |
354 | } |
355 | |
356 | ~QOrganizerItemIdFetchRequestPrivate() |
357 | { |
358 | } |
359 | |
360 | #ifndef QT_NO_DEBUG_STREAM |
361 | QDebug& debugStreamOut(QDebug &dbg) const |
362 | { |
363 | dbg.nospace() << "QOrganizerItemIdFetchRequest(\n" ; |
364 | dbg.nospace() << "* itemIds=" ; |
365 | dbg.nospace() << m_ids; |
366 | dbg.nospace() << ",\n" ; |
367 | dbg.nospace() << "* filter=" ; |
368 | dbg.nospace() << m_filter; |
369 | dbg.nospace() << ",\n" ; |
370 | dbg.nospace() << "* sorting=" ; |
371 | dbg.nospace() << m_sorting; |
372 | dbg.nospace() << ",\n" ; |
373 | dbg.nospace() << "* startDate=" ; |
374 | dbg.nospace() << m_startDate; |
375 | dbg.nospace() << ",\n" ; |
376 | dbg.nospace() << "* endDate=" ; |
377 | dbg.nospace() << m_endDate; |
378 | dbg.nospace() << "\n)" ; |
379 | return dbg.maybeSpace(); |
380 | } |
381 | #endif |
382 | |
383 | QOrganizerItemFilter m_filter; |
384 | QList<QOrganizerItemSortOrder> m_sorting; |
385 | |
386 | QList<QOrganizerItemId> m_ids; |
387 | |
388 | QDateTime m_startDate; |
389 | QDateTime m_endDate; |
390 | }; |
391 | |
392 | class QOrganizerCollectionFetchRequestPrivate : public QOrganizerAbstractRequestPrivate |
393 | { |
394 | public: |
395 | QOrganizerCollectionFetchRequestPrivate() |
396 | : QOrganizerAbstractRequestPrivate(QOrganizerAbstractRequest::CollectionFetchRequest) |
397 | { |
398 | } |
399 | |
400 | ~QOrganizerCollectionFetchRequestPrivate() |
401 | { |
402 | } |
403 | |
404 | #ifndef QT_NO_DEBUG_STREAM |
405 | QDebug& debugStreamOut(QDebug &dbg) const |
406 | { |
407 | dbg.nospace() << "QOrganizerCollectionFetchRequest(" ; |
408 | dbg.nospace() << "collections=" ; |
409 | dbg.nospace() << m_collections; |
410 | dbg.nospace() << ")" ; |
411 | return dbg.maybeSpace(); |
412 | } |
413 | #endif |
414 | |
415 | QList<QOrganizerCollection> m_collections; |
416 | }; |
417 | |
418 | class QOrganizerCollectionRemoveRequestPrivate : public QOrganizerAbstractRequestPrivate |
419 | { |
420 | public: |
421 | QOrganizerCollectionRemoveRequestPrivate() |
422 | : QOrganizerAbstractRequestPrivate(QOrganizerAbstractRequest::CollectionRemoveRequest) |
423 | { |
424 | } |
425 | |
426 | ~QOrganizerCollectionRemoveRequestPrivate() |
427 | { |
428 | } |
429 | |
430 | #ifndef QT_NO_DEBUG_STREAM |
431 | QDebug& debugStreamOut(QDebug &dbg) const |
432 | { |
433 | dbg.nospace() << "QOrganizerCollectionRemoveRequest(" ; |
434 | dbg.nospace() << "collectionIds=" ; |
435 | dbg.nospace() << m_collectionIds; |
436 | dbg.nospace() << "," ; |
437 | dbg.nospace() << "errorMap=" ; |
438 | dbg.nospace() << m_errors; |
439 | dbg.nospace() << ")" ; |
440 | return dbg.maybeSpace(); |
441 | } |
442 | #endif |
443 | |
444 | QList<QOrganizerCollectionId> m_collectionIds; |
445 | QMap<int, QOrganizerManager::Error> m_errors; |
446 | }; |
447 | |
448 | class QOrganizerCollectionSaveRequestPrivate : public QOrganizerAbstractRequestPrivate |
449 | { |
450 | public: |
451 | QOrganizerCollectionSaveRequestPrivate() |
452 | : QOrganizerAbstractRequestPrivate(QOrganizerAbstractRequest::CollectionSaveRequest) |
453 | { |
454 | } |
455 | |
456 | ~QOrganizerCollectionSaveRequestPrivate() |
457 | { |
458 | } |
459 | |
460 | #ifndef QT_NO_DEBUG_STREAM |
461 | QDebug& debugStreamOut(QDebug &dbg) const |
462 | { |
463 | dbg.nospace() << "QOrganizerCollectionSaveRequest(" ; |
464 | dbg.nospace() << "collections=" ; |
465 | dbg.nospace() << m_collections; |
466 | dbg.nospace() << "," ; |
467 | dbg.nospace() << "errorMap=" ; |
468 | dbg.nospace() << m_errors; |
469 | dbg.nospace() << ")" ; |
470 | return dbg.maybeSpace(); |
471 | } |
472 | #endif |
473 | |
474 | QList<QOrganizerCollection> m_collections; |
475 | QMap<int, QOrganizerManager::Error> m_errors; |
476 | }; |
477 | |
478 | QT_END_NAMESPACE_ORGANIZER |
479 | |
480 | #endif // QORGANIZERITEMREQUESTS_P_H |
481 | |