sqliteformat.h
Go to the documentation of this file.
1/*
2 This file is part of the mkcal library.
3
4 Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
5 Contact: Alvaro Manera <alvaro.manera@nokia.com>
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Library General Public License for more details.
16
17 You should have received a copy of the GNU Library General Public License
18 along with this library; see the file COPYING.LIB. If not, write to
19 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 Boston, MA 02110-1301, USA.
21*/
26
27#ifndef MKCAL_SQLITEFORMAT_H
28#define MKCAL_SQLITEFORMAT_H
29
30#include "mkcal_export.h"
31#include "extendedstorage.h"
32#include "notebook.h"
33
34#include <KCalendarCore/Incidence>
35
36#include <sqlite3.h>
37
38namespace mKCal {
39
46
47/*
48 Sqlite format implementation.
49
50 This class implements the Sqlite format. It provides methods for
51 loading/saving/converting Sqlite format data into the internal
52 representation as Calendar and Incidences.
53*/
54// exported just for unit test. Would be better to avoid.
56{
57public:
58 /*
59 The different types of rdates.
60 */
67
68 /*
69 Values stored in the flag column of the calendars table.
70 */
72 AllowEvents = (1 << 0),
73 AllowJournals = (1 << 1),
74 AllowTodos = (1 << 2),
75 Shared = (1 << 3),
76 Master = (1 << 4),
77 Synchronized = (1 << 5),
78 ReadOnly = (1 << 6),
79 Visible = (1 << 7),
80 RunTimeOnly = (1 << 8),
81 Default = (1 << 9),
82 Shareable = (1 << 10)
83 };
84
85 SqliteFormat(sqlite3 *database);
86 virtual ~SqliteFormat();
87
88 /*
89 Update notebook data in Calendars table.
90
91 @param notebook notebook to update
92 @param dbop database operation
93 @param stmt prepared sqlite statement for calendars table
94 @param isDefault if the notebook is the default one in the DB
95 @return true if the operation was successful; false otherwise.
96 */
97 bool modifyCalendars(const Notebook &notebook, DBOperation dbop, sqlite3_stmt *stmt, bool isDefault);
98
99 /*
100 Select notebooks from Calendars table.
101
102 @param stmt prepared sqlite statement for calendars table
103 @param isDefault true if the selected notebook is the DB default one
104 @return the queried notebook.
105 */
106 Notebook::Ptr selectCalendars(sqlite3_stmt *stmt, bool *isDefault);
107
108 /*
109 Update incidence data in Components table.
110
111 @param incidence incidence to update
112 @param notebook notebook of incidence
113 @param dbop database operation
114 @return true if the operation was successful; false otherwise.
115 */
116 bool modifyComponents(const KCalendarCore::Incidence &incidence, const QString &notebook,
117 DBOperation dbop);
118
119 bool purgeDeletedComponents(const KCalendarCore::Incidence &incidence,
120 const QString &notebook = QString());
121
122 /*
123 Select incidences from Components table.
124
125 @param stmt1 prepared sqlite statement for components table
126 @param notebook notebook of incidence
127 @return the queried incidence.
128 */
129 KCalendarCore::Incidence::Ptr selectComponents(sqlite3_stmt *stmt1, QString &notebook);
130
131 bool selectMetadata(int *id);
132 bool incrementTransactionId(int *id);
133
134 // Helper Functions //
135
136 /*
137 Convert datetime to seconds relative to the origin.
138
139 @param dt datetime
140 @return seconds relative to origin
141 */
142 static sqlite3_int64 toOriginTime(const QDateTime &dt);
143
144 /*
145 Convert local datetime to seconds relative to the origin.
146
147 @param dt datetime
148 @return seconds relative to origin
149 */
150 static sqlite3_int64 toLocalOriginTime(const QDateTime &dt);
151
152 /*
153 Convert seconds from the origin to clock time.
154 @param seconds relative to origin.
155 @return clocktime datetime.
156 */
157 static QDateTime fromLocalOriginTime(sqlite3_int64 seconds);
158
159 /*
160 Convert seconds from the origin to UTC datetime.
161 @param seconds relative to origin.
162 @return UTC datetime.
163 */
164 static QDateTime fromOriginTime(sqlite3_int64 seconds);
165
166 /*
167 Convert seconds from the origin to datetime in given timezone.
168 @param seconds relative to origin.
169 @param zonename timezone name.
170 @return datetime in timezone.
171 */
172 static QDateTime fromOriginTime(sqlite3_int64 seconds, const QByteArray &zonename);
173
174private:
175 //@cond PRIVATE
176 Q_DISABLE_COPY(SqliteFormat)
177 class Private;
178 Private *const d;
179 //@endcond
180};
181
182}
183
184#define SL3_try_exec( db ) \
185{ \
186 /* kDebug() << "SQL query:" << query; */ \
187 rv = sqlite3_exec( (db), query, NULL, 0, &errmsg ); \
188 if ( rv ) { \
189 qCWarning(lcMkcal) << "sqlite3_exec error code:" << rv; \
190 if ( errmsg ) { \
191 qCWarning(lcMkcal) << errmsg; \
192 sqlite3_free( errmsg ); \
193 errmsg = NULL; \
194 } \
195 } \
196}
197
198#define SL3_exec( db ) \
199{ \
200 SL3_try_exec( (db) ); \
201 if ( rv && rv != SQLITE_CONSTRAINT ) { \
202 goto error; \
203 } \
204}
205
206#define SL3_prepare_v2( db, query, qsize, stmt, tail ) \
207{ \
208 /* kDebug() << "SQL query:" << query; */ \
209 rv = sqlite3_prepare_v2( (db), (query), (qsize), (stmt), (tail) ); \
210 if ( rv ) { \
211 qCWarning(lcMkcal) << "sqlite3_prepare error code:" << rv; \
212 qCWarning(lcMkcal) << sqlite3_errmsg( (db) ); \
213 goto error; \
214 } \
215}
216
217#define SL3_bind_text( stmt, index, value, size, desc ) \
218{ \
219 rv = sqlite3_bind_text( (stmt), (index), (value), (size), (desc) ); \
220 if ( rv ) { \
221 qCWarning(lcMkcal) << "sqlite3_bind_text error:" << rv << "on index and value:" << index << value; \
222 goto error; \
223 } \
224 index++; \
225}
226
227#define SL3_bind_blob( stmt, index, value, size, desc ) \
228{ \
229 rv = sqlite3_bind_blob( (stmt), (index), (value), (size), (desc) ); \
230 if ( rv ) { \
231 qCWarning(lcMkcal) << "sqlite3_bind_blob error:" << rv << "on index and value:" << index << value; \
232 goto error; \
233 } \
234 index++; \
235}
236
237#define SL3_bind_int( stmt, index, value ) \
238{ \
239 rv = sqlite3_bind_int( (stmt), (index), (value) ); \
240 if ( rv ) { \
241 qCWarning(lcMkcal) << "sqlite3_bind_int error:" << rv << "on index and value:" << index << value; \
242 goto error; \
243 } \
244 index++; \
245}
246
247#define SL3_bind_int64( stmt, index, value ) \
248{ \
249 rv = sqlite3_bind_int64( (stmt), (index), (value) ); \
250 if ( rv ) { \
251 qCWarning(lcMkcal) << "sqlite3_bind_int64 error:" << rv << "on index and value:" << index << value; \
252 goto error; \
253 } \
254 index++; \
255}
256
257#define SL3_bind_double( stmt, index, value ) \
258{ \
259 rv = sqlite3_bind_double( (stmt), (index), (value) ); \
260 if ( rv ) { \
261 qCWarning(lcMkcal) << "sqlite3_bind_int error:" << rv << "on index and value:" << index << value; \
262 goto error; \
263 } \
264 index++; \
265}
266
267#define SL3_step( stmt ) \
268{ \
269 rv = sqlite3_step( (stmt) ); \
270 if ( rv && rv != SQLITE_DONE && rv != SQLITE_ROW ) { \
271 if ( rv != SQLITE_CONSTRAINT ) { \
272 qCWarning(lcMkcal) << "sqlite3_step error:" << rv; \
273 } \
274 goto error; \
275 } \
276}
277
278#define SL3_reset( stmt ) \
279{ \
280 rv = sqlite3_reset( (stmt) ); \
281 if ( rv && rv != SQLITE_OK ) { \
282 qCWarning(lcMkcal) << "sqlite3_reset error:" << rv; \
283 goto error; \
284 } \
285}
286
287#define CREATE_METADATA \
288 "CREATE TABLE IF NOT EXISTS Metadata(transactionId INTEGER)"
289#define CREATE_CALENDARS \
290 "CREATE TABLE IF NOT EXISTS Calendars(CalendarId TEXT PRIMARY KEY, Name TEXT, Description TEXT, Color INTEGER, " \
291 "Flags INTEGER, syncDate INTEGER, pluginName TEXT, account TEXT, attachmentSize INTEGER, modifiedDate INTEGER, " \
292 "sharedWith TEXT, syncProfile TEXT, createdDate INTEGER, extra1 STRING, extra2 STRING)"
293
294//Extra fields added for future use in case they are needed. They will be documented here
295//So we can add something without breaking the schema and not adding tables
296//extra1: used to store the color of a single component.
297
298#define CREATE_COMPONENTS \
299 "CREATE TABLE IF NOT EXISTS Components(ComponentId INTEGER PRIMARY KEY AUTOINCREMENT, Notebook TEXT, Type TEXT, " \
300 "Summary TEXT, Category TEXT, DateStart INTEGER, DateStartLocal INTEGER, StartTimeZone TEXT, HasDueDate INTEGER, " \
301 "DateEndDue INTEGER, DateEndDueLocal INTEGER, EndDueTimeZone TEXT, Duration INTEGER, Classification INTEGER, " \
302 "Location TEXT, Description TEXT, Status INTEGER, GeoLatitude REAL, GeoLongitude REAL, Priority INTEGER, " \
303 "Resources TEXT, DateCreated INTEGER, DateStamp INTEGER, DateLastModified INTEGER, Sequence INTEGER, Comments TEXT, " \
304 "Attachments TEXT, Contact TEXT, InvitationStatus INTEGER, RecurId INTEGER, RecurIdLocal INTEGER, " \
305 "RecurIdTimeZone TEXT, RelatedTo TEXT, URL TEXT, UID TEXT, Transparency INTEGER, LocalOnly INTEGER, Percent INTEGER, " \
306 "DateCompleted INTEGER, DateCompletedLocal INTEGER, CompletedTimeZone TEXT, DateDeleted INTEGER, " \
307 "extra1 STRING, extra2 STRING, extra3 INTEGER, thisAndFuture INTEGER)"
308
309//Extra fields added for future use in case they are needed. They will be documented here
310//So we can add something without breaking the schema and not adding tables
311
312#define CREATE_RDATES \
313 "CREATE TABLE IF NOT EXISTS Rdates(ComponentId INTEGER, Type INTEGER, Date INTEGER, DateLocal INTEGER, TimeZone TEXT)"
314#define CREATE_CUSTOMPROPERTIES \
315 "CREATE TABLE IF NOT EXISTS Customproperties(ComponentId INTEGER, Name TEXT, Value TEXT, Parameters TEXT)"
316#define CREATE_RECURSIVE \
317 "CREATE TABLE IF NOT EXISTS Recursive(ComponentId INTEGER, RuleType INTEGER, Frequency INTEGER, Until INTEGER, " \
318 "UntilLocal INTEGER, untilTimeZone TEXT, Count INTEGER, Interval INTEGER, BySecond TEXT, ByMinute TEXT, " \
319 "ByHour TEXT, ByDay TEXT, ByDayPos Text, ByMonthDay TEXT, ByYearDay TEXT, ByWeekNum TEXT, ByMonth TEXT, " \
320 "BySetPos TEXT, WeekStart INTEGER)"
321#define CREATE_ALARM \
322 "CREATE TABLE IF NOT EXISTS Alarm(ComponentId INTEGER, Action INTEGER, Repeat INTEGER, Duration INTEGER, " \
323 "Offset INTEGER, Relation TEXT, DateTrigger INTEGER, DateTriggerLocal INTEGER, triggerTimeZone TEXT, " \
324 "Description TEXT, Attachment TEXT, Summary TEXT, Address TEXT, CustomProperties TEXT, isEnabled INTEGER)"
325#define CREATE_ATTENDEE \
326"CREATE TABLE IF NOT EXISTS Attendee(ComponentId INTEGER, Email TEXT, Name TEXT, IsOrganizer INTEGER, Role INTEGER, " \
327 "PartStat INTEGER, Rsvp INTEGER, DelegatedTo TEXT, DelegatedFrom TEXT)"
328#define CREATE_ATTACHMENTS \
329"CREATE TABLE IF NOT EXISTS Attachments(ComponentId INTEGER, Data BLOB, Uri TEXT, MimeType TEXT, " \
330 "ShowInLine INTEGER, Label TEXT, Local INTEGER)"
331#define CREATE_CALENDARPROPERTIES \
332 "CREATE TABLE IF NOT EXISTS Calendarproperties(CalendarId REFERENCES Calendars(CalendarId) " \
333 "ON DELETE CASCADE, Name TEXT NOT NULL, Value TEXT, UNIQUE (CalendarId, Name))"
334
335#define INDEX_CALENDAR \
336"CREATE INDEX IF NOT EXISTS IDX_CALENDAR on Calendars(CalendarId)"
337#define INDEX_COMPONENT \
338"CREATE INDEX IF NOT EXISTS IDX_COMPONENT on Components(ComponentId, Notebook, DateStart, DateEndDue, DateDeleted)"
339#define INDEX_COMPONENT_UID \
340"CREATE UNIQUE INDEX IF NOT EXISTS IDX_COMPONENT_UID on Components(UID, RecurId, DateDeleted)"
341#define INDEX_COMPONENT_NOTEBOOK \
342"CREATE INDEX IF NOT EXISTS IDX_COMPONENT_NOTEBOOK on Components(Notebook)"
343#define INDEX_RDATES \
344"CREATE INDEX IF NOT EXISTS IDX_RDATES on Rdates(ComponentId)"
345#define INDEX_CUSTOMPROPERTIES \
346"CREATE INDEX IF NOT EXISTS IDX_CUSTOMPROPERTIES on Customproperties(ComponentId)"
347#define INDEX_RECURSIVE \
348"CREATE INDEX IF NOT EXISTS IDX_RECURSIVE on Recursive(ComponentId)"
349#define INDEX_ALARM \
350"CREATE INDEX IF NOT EXISTS IDX_ALARM on Alarm(ComponentId)"
351#define INDEX_ATTENDEE \
352"CREATE INDEX IF NOT EXISTS IDX_ATTENDEE on Attendee(ComponentId)"
353#define INDEX_ATTACHMENTS \
354"CREATE INDEX IF NOT EXISTS IDX_ATTACHMENTS on Attachments(ComponentId)"
355#define INDEX_CALENDARPROPERTIES \
356"CREATE INDEX IF NOT EXISTS IDX_CALENDARPROPERTIES on Calendarproperties(CalendarId)"
357
358#define INSERT_CALENDARS \
359"insert into Calendars values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, '', '')"
360#define INSERT_COMPONENTS \
361"insert into Components values (NULL, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, " \
362 "?, ?, 0, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 0, ?, '', 0, ?)"
363#define INSERT_CUSTOMPROPERTIES \
364"insert into Customproperties values (?, ?, ?, ?)"
365#define INSERT_CALENDARPROPERTIES \
366"insert into Calendarproperties values (?, ?, ?)"
367#define INSERT_RDATES \
368"insert into Rdates values (?, ?, ?, ?, ?)"
369#define INSERT_RECURSIVE \
370"insert into Recursive values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
371#define INSERT_ALARM \
372"insert into Alarm values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
373#define INSERT_ATTENDEE \
374"insert into Attendee values (?, ?, ?, ?, ?, ?, ?, ?, ?)"
375#define INSERT_ATTACHMENTS \
376"insert into Attachments values (?, ?, ?, ?, ?, ?, ?)"
377
378#define UPDATE_METADATA \
379"replace into Metadata (rowid, transactionId) values (1, ?)"
380#define UPDATE_CALENDARS \
381"update Calendars set Name=?, Description=?, Color=?, Flags=?, syncDate=?, pluginName=?, account=?, attachmentSize=?, " \
382 "modifiedDate=?, sharedWith=?, syncProfile=?, createdDate=? where CalendarId=?"
383#define UPDATE_COMPONENTS \
384 "update Components set Notebook=?, Type=?, Summary=?, Category=?, DateStart=?, DateStartLocal=?, StartTimeZone=?, " \
385 "HasDueDate=?, DateEndDue=?, DateEndDueLocal=?, EndDueTimeZone=?, Duration=?, Classification=?, Location=?, " \
386 "Description=?, Status=?, GeoLatitude=?, GeoLongitude=?, Priority=?, Resources=?, DateCreated=?, DateStamp=?, " \
387 "DateLastModified=?, Sequence=?, Comments=?, Attachments=?, Contact=?, RecurId=?, RecurIdLocal=?, RecurIdTimeZone=?, " \
388 "RelatedTo=?, URL=?, UID=?, Transparency=?, LocalOnly=?, Percent=?, DateCompleted=?, DateCompletedLocal=?, " \
389 "CompletedTimeZone=?, extra1=?, thisAndFuture=? where ComponentId=?"
390#define UPDATE_COMPONENTS_AS_DELETED \
391"update Components set DateDeleted=? where ComponentId=?"
392//"update Components set DateDeleted=strftime('%s','now') where ComponentId=?"
393
394#define DELETE_CALENDARS \
395"delete from Calendars where CalendarId=?"
396#define DELETE_COMPONENTS \
397"delete from Components where ComponentId=?"
398#define DELETE_RDATES \
399"delete from Rdates where ComponentId=?"
400#define DELETE_CUSTOMPROPERTIES \
401"delete from Customproperties where ComponentId=?"
402#define DELETE_CALENDARPROPERTIES \
403"delete from Calendarproperties where CalendarId=?"
404#define DELETE_RECURSIVE \
405"delete from Recursive where ComponentId=?"
406#define DELETE_ALARM \
407"delete from Alarm where ComponentId=?"
408#define DELETE_ATTENDEE \
409"delete from Attendee where ComponentId=?"
410#define DELETE_ATTACHMENTS \
411"delete from Attachments where ComponentId=?"
412
413#define SELECT_METADATA \
414"select * from Metadata where rowid=1"
415#define SELECT_CALENDARS_ALL \
416"select * from Calendars order by Name"
417#define SELECT_COMPONENTS_ALL \
418"select * from Components where DateDeleted=0"
419#define SELECT_COMPONENTS_ALL_DELETED \
420"select * from Components where DateDeleted<>0"
421#define SELECT_COMPONENTS_ALL_DELETED_BY_NOTEBOOK \
422"select * from Components where Notebook=? and DateDeleted<>0"
423#define SELECT_COMPONENTS_BY_RECURSIVE \
424"select * from Components where ((ComponentId in (select DISTINCT ComponentId from Recursive)) "\
425 "or (ComponentId in (select DISTINCT ComponentId from Rdates)) or (RecurId!=0)) and DateDeleted=0"
426#define SELECT_COMPONENTS_BY_DATE_BOTH \
427"select * from Components where DateStart<? and (DateEndDue>=? or (DateEndDue=0 and DateStart>=?)) and DateDeleted=0"
428#define SELECT_COMPONENTS_BY_DATE_START \
429"select * from Components where (DateEndDue>=? or (DateEndDue=0 and DateStart>=?)) and DateDeleted=0"
430#define SELECT_COMPONENTS_BY_DATE_END \
431"select * from Components where DateStart<? and DateDeleted=0"
432#define SELECT_COMPONENTS_BY_UID \
433"select * from Components where UID=? and DateDeleted=0"
434#define SELECT_COMPONENTS_BY_NOTEBOOKUID \
435"select * from Components where Notebook=? and DateDeleted=0"
436#define SELECT_ROWID_FROM_COMPONENTS_BY_NOTEBOOK_UID_AND_RECURID \
437"select ComponentId from Components where Notebook=? and UID=? and RecurId=? and DateDeleted=0"
438
439#define SELECT_RDATES_BY_ID \
440"select * from Rdates where ComponentId=?"
441#define SELECT_CUSTOMPROPERTIES_BY_ID \
442"select * from Customproperties where ComponentId=?"
443#define SELECT_RECURSIVE_BY_ID \
444"select * from Recursive where ComponentId=?"
445#define SELECT_ALARM_BY_ID \
446"select * from Alarm where ComponentId=?"
447#define SELECT_ATTENDEE_BY_ID \
448"select * from Attendee where ComponentId=?"
449#define SELECT_ATTACHMENTS_BY_ID \
450"select * from Attachments where ComponentId=?"
451#define SELECT_CALENDARPROPERTIES_BY_ID \
452"select * from Calendarproperties where CalendarId=?"
453#define SELECT_COMPONENTS_BY_CREATED \
454"select * from Components where DateCreated>=? and DateDeleted=0"
455#define SELECT_COMPONENTS_BY_CREATED_AND_NOTEBOOK \
456"select * from Components where DateCreated>=? and Notebook=? and DateDeleted=0"
457#define SELECT_COMPONENTS_BY_LAST_MODIFIED \
458"select * from Components where DateLastModified>=? and DateCreated<? and DateDeleted=0"
459#define SELECT_COMPONENTS_BY_LAST_MODIFIED_AND_NOTEBOOK \
460"select * from Components where DateLastModified>=? and DateCreated<? and Notebook=? and DateDeleted=0"
461#define SELECT_COMPONENTS_BY_DELETED \
462"select * from Components where DateDeleted>=? and DateCreated<?"
463#define SELECT_COMPONENTS_BY_DELETED_AND_NOTEBOOK \
464"select * from Components where DateDeleted>=? and DateCreated<? and Notebook=?"
465#define SELECT_COMPONENTS_BY_UID_RECID_AND_DELETED \
466"select ComponentId, DateDeleted from Components where UID=? and RecurId=? and DateDeleted<>0"
467#define SELECT_COMPONENTS_BY_NOTEBOOK_UID_RECID_AND_DELETED \
468"select ComponentId from Components where Notebook=? and UID=? and RecurId=? and DateDeleted<>0"
469
470#define SEARCH_COMPONENTS \
471"select *, (ComponentId in (select DISTINCT ComponentId from Recursive)" \
472" or ComponentId in (select DISTINCT ComponentId from Rdates)) as doRecur" \
473" from Components where DateDeleted=0 and (summary like ? escape '\\'" \
474" or description like ? escape '\\'" \
475" or location like ? escape '\\') order by doRecur desc, datestart desc"
476
477#define UNSET_FLAG_FROM_CALENDAR \
478"update Calendars set Flags=(Flags & (~?))"
479
480#define BEGIN_TRANSACTION \
481"BEGIN IMMEDIATE;"
482#define COMMIT_TRANSACTION \
483"END;"
484
485#endif
Placeholder for Notebook parameters.
Definition notebook.h:46
QSharedPointer< Notebook > Ptr
A shared pointer to a Notebook object.
Definition notebook.h:51
Definition sqliteformat.h:56
static QDateTime fromOriginTime(sqlite3_int64 seconds)
CalendarFlag
Definition sqliteformat.h:71
@ Master
Definition sqliteformat.h:76
@ Visible
Definition sqliteformat.h:79
@ AllowJournals
Definition sqliteformat.h:73
@ AllowTodos
Definition sqliteformat.h:74
@ RunTimeOnly
Definition sqliteformat.h:80
@ AllowEvents
Definition sqliteformat.h:72
@ Shared
Definition sqliteformat.h:75
@ Synchronized
Definition sqliteformat.h:77
@ ReadOnly
Definition sqliteformat.h:78
@ Shareable
Definition sqliteformat.h:82
@ Default
Definition sqliteformat.h:81
static sqlite3_int64 toLocalOriginTime(const QDateTime &dt)
SqliteFormat(sqlite3 *database)
Definition sqliteformat.cpp:156
static sqlite3_int64 toOriginTime(const QDateTime &dt)
static QDateTime fromLocalOriginTime(sqlite3_int64 seconds)
RDateType
Definition sqliteformat.h:61
@ RDate
Definition sqliteformat.h:62
@ XDate
Definition sqliteformat.h:63
@ RDateTime
Definition sqliteformat.h:64
@ XDateTime
Definition sqliteformat.h:65
static QDateTime fromOriginTime(sqlite3_int64 seconds, const QByteArray &zonename)
This file is part of the API for handling calendar data and defines the ExtendedStorage interface.
#define MKCAL_EXPORT
Definition mkcal_export.h:29
Definition extendedstorage.h:49
DBOperation
Definition sqliteformat.h:40
@ DBUpdate
Definition sqliteformat.h:42
@ DBMarkDeleted
Definition sqliteformat.h:43
@ DBInsert
Definition sqliteformat.h:41
@ DBDelete
Definition sqliteformat.h:44
This file is part of the API for handling calendar data and defines the Notebook class.

Generated on for libextendedkcal by doxygen 1.16.1