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*/
31#ifndef MKCAL_SQLITEFORMAT_H
32#define MKCAL_SQLITEFORMAT_H
33
34#include "mkcal_export.h"
35#include "extendedstorage.h"
36#include "notebook.h"
37
38#include <KCalendarCore/Incidence>
39
40#include <sqlite3.h>
41
42namespace mKCal {
43
44class SqliteStorage;
45
55{
56public:
60 enum RDateType {
61 RDate = 1,
64 XDateTime
65 };
66
70 SqliteFormat(SqliteStorage *storage, sqlite3 *database);
71
75 virtual ~SqliteFormat();
76
85 bool modifyCalendars(const Notebook::Ptr &notebook, DBOperation dbop, sqlite3_stmt *stmt);
86
93 Notebook::Ptr selectCalendars(sqlite3_stmt *stmt);
94
109 bool modifyComponents(const KCalendarCore::Incidence::Ptr &incidence, const QString &notebook,
110 DBOperation dbop, sqlite3_stmt *stmt1, sqlite3_stmt *stmt2,
111 sqlite3_stmt *stmt3, sqlite3_stmt *stmt4, sqlite3_stmt *stmt5,
112 sqlite3_stmt *stmt6, sqlite3_stmt *stmt7, sqlite3_stmt *stmt8,
113 sqlite3_stmt *stmt9, sqlite3_stmt *stmt10, sqlite3_stmt *stmt11,
114 sqlite3_stmt *delAttachmentStmt, sqlite3_stmt *insAttachmentStmt);
115
116 bool purgeDeletedComponents(const KCalendarCore::Incidence::Ptr &incidence,
117 sqlite3_stmt *stmt1, sqlite3_stmt *stmt2,
118 sqlite3_stmt *stmt3, sqlite3_stmt *stmt4,
119 sqlite3_stmt *stmt5, sqlite3_stmt *stmt6,
120 sqlite3_stmt *stmt7, sqlite3_stmt *attachmentStmt);
121
135 KCalendarCore::Incidence::Ptr selectComponents(sqlite3_stmt *stmt1, sqlite3_stmt *stmt2,
136 sqlite3_stmt *stmt3, sqlite3_stmt *stmt4,
137 sqlite3_stmt *stmt5, sqlite3_stmt *stmt6,
138 sqlite3_stmt *attachmentStmt,
139 QString &notebook);
140
147 KCalendarCore::Person::List selectContacts(sqlite3_stmt *stmt);
148
149private:
150 //@cond PRIVATE
151 Q_DISABLE_COPY(SqliteFormat)
152 class MKCAL_HIDE Private;
153 Private *const d;
154 //@endcond
155};
156
157}
158
159#endif
QSharedPointer< Notebook > Ptr
A shared pointer to a Notebook object.
Definition: notebook.h:51
Sqlite format implementation.
Definition: sqliteformat.h:55
KCalendarCore::Person::List selectContacts(sqlite3_stmt *stmt)
Select contacts and order them by appearances.
RDateType
The different types of rdates.
Definition: sqliteformat.h:60
@ XDate
Definition: sqliteformat.h:62
@ RDateTime
Definition: sqliteformat.h:63
This class provides a calendar storage as an sqlite database.
Definition: sqlitestorage.h:54
This file is part of the API for handling calendar data and defines the ExtendedStorage interface.
#define MKCAL_EXPORT
Definition: mkcal_export.h:27
#define MKCAL_HIDE
Definition: mkcal_export.h:31
Definition: extendedstorage.h:47
DBOperation
Database operation type.
Definition: extendedstorage.h:52
This file is part of the API for handling calendar data and defines the Notebook class.

Generated on Mon Sep 13 2021 12:08:02 for libextendedkcal by doxygen 1.9.3