Warning: That file was not part of the compilation database. It may have many parsing errors.
1 | /* |
---|---|
2 | This file is part of libkcal. |
3 | |
4 | Copyright (c) 2009-2010 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.net> |
5 | |
6 | This library is free software; you can redistribute it and/or |
7 | modify it under the terms of the GNU Library General Public |
8 | License as published by the Free Software Foundation; either |
9 | version 2 of the License, or (at your option) any later version. |
10 | |
11 | This library is distributed in the hope that it will be useful, |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
14 | Library General Public License for more details. |
15 | |
16 | You should have received a copy of the GNU Library General Public License |
17 | along with this library; see the file COPYING.LIB. If not, write to |
18 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
19 | Boston, MA 02110-1301, USA. |
20 | */ |
21 | /** |
22 | @file |
23 | This file is part of the API for handling calendar data and provides |
24 | static convenience functions for making decisions about calendar data. |
25 | |
26 | @author Allen Winter \<allen@kdab.net\> |
27 | */ |
28 | |
29 | #ifndef KCAL_CALHELPER_H |
30 | #define KCAL_CALHELPER_H |
31 | |
32 | #include "kcal_export.h" |
33 | #include <QtCore/QPair> |
34 | |
35 | class QString; |
36 | |
37 | namespace KCal { |
38 | class Calendar; |
39 | class Incidence; |
40 | class ResourceCalendar; |
41 | |
42 | /** |
43 | @brief |
44 | Provides methods for making decisions about calendar data. |
45 | */ |
46 | namespace CalHelper { |
47 | |
48 | /** |
49 | Determine if the specified incidence is likely a Kolab incidence |
50 | owned by the user. |
51 | |
52 | @param calendar is a pointer to a valid Calendar object. |
53 | @param incidence is a pointer to an Incidence object. |
54 | |
55 | @return true if it is likely that the specified incidence belongs |
56 | to the user in their Kolab resource; false otherwise. |
57 | @since 4.4 |
58 | */ |
59 | KCAL_DEPRECATED_EXPORT bool isMyKolabIncidence( Calendar *calendar, Incidence *incidence ); |
60 | |
61 | /** |
62 | Determine if the specified incidence is likely owned by the user, |
63 | independent of the Resource type. |
64 | |
65 | @param calendar is a pointer to a valid Calendar object. |
66 | @param incidence is a pointer to an Incidence object. |
67 | |
68 | @return true if it is likely that the specified incidence belongs |
69 | to the user; false otherwise. |
70 | @since 4.4 |
71 | */ |
72 | KCAL_DEPRECATED_EXPORT bool isMyCalendarIncidence( Calendar *calendar, Incidence *incidence ); |
73 | |
74 | /** |
75 | Searches for the specified Incidence by UID, returning an Incidence pointer |
76 | if and only if the found Incidence is owned by the user. |
77 | |
78 | @param calendar is a pointer to a valid Calendar object. |
79 | @param uid is a QString containing an Incidence UID. |
80 | |
81 | @return a pointer to the Incidence found; 0 if the Incidence is not found |
82 | or the Incidence is found but is not owned by the user. |
83 | @since 4.4 |
84 | */ |
85 | KCAL_DEPRECATED_EXPORT Incidence *findMyCalendarIncidenceByUid( Calendar *calendar, const QString &uid ); |
86 | |
87 | /** |
88 | Determines if the Calendar is using a Groupware resource type. |
89 | @param calendar is a pointer to a valid Calendar object. |
90 | |
91 | @return true if the Calendar is using a known Groupware resource type; |
92 | false otherwise. |
93 | @since 4.4 |
94 | */ |
95 | KCAL_DEPRECATED_EXPORT bool usingGroupware( Calendar *calendar ); |
96 | } |
97 | |
98 | } |
99 | |
100 | #endif |
101 | |
102 |
Warning: That file was not part of the compilation database. It may have many parsing errors.