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 <incidence.h>
39 
40 #include <sqlite3.h>
41 
42 namespace mKCal {
43 
44 class SqliteStorage;
45 
55 {
56 public:
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 
107  bool modifyComponents(const KCalCore::Incidence::Ptr &incidence, const QString &notebook,
108  DBOperation dbop, sqlite3_stmt *stmt1, sqlite3_stmt *stmt2,
109  sqlite3_stmt *stmt3, sqlite3_stmt *stmt4, sqlite3_stmt *stmt5,
110  sqlite3_stmt *stmt6, sqlite3_stmt *stmt7, sqlite3_stmt *stmt8,
111  sqlite3_stmt *stmt9, sqlite3_stmt *stmt10, sqlite3_stmt *stmt11);
112 
113  bool purgeDeletedComponents(const KCalCore::Incidence::Ptr &incidence,
114  sqlite3_stmt *stmt1, sqlite3_stmt *stmt2,
115  sqlite3_stmt *stmt3, sqlite3_stmt *stmt4,
116  sqlite3_stmt *stmt5, sqlite3_stmt *stmt6,
117  sqlite3_stmt *stmt7);
118 
130  KCalCore::Incidence::Ptr selectComponents(sqlite3_stmt *stmt1, sqlite3_stmt *stmt2,
131  sqlite3_stmt *stmt3, sqlite3_stmt *stmt4,
132  sqlite3_stmt *stmt5, sqlite3_stmt *stmt6,
133  QString &notebook);
134 
141  KCalCore::Person::List selectContacts(sqlite3_stmt *stmt);
142 
143 private:
144  //@cond PRIVATE
145  Q_DISABLE_COPY(SqliteFormat)
146  class MKCAL_HIDE Private;
147  Private *const d;
148  //@endcond
149 };
150 
151 }
152 
153 #endif
MKCAL_HIDE
#define MKCAL_HIDE
Definition: mkcal_export.h:31
mKCal::SqliteStorage
This class provides a calendar storage as an sqlite database.
Definition: sqlitestorage.h:53
mKCal::SqliteFormat::RDateType
RDateType
The different types of rdates.
Definition: sqliteformat.h:60
notebook.h
mKCal::DBOperation
DBOperation
Database operation type.
Definition: extendedstorage.h:54
mKCal::SqliteFormat
Sqlite format implementation.
Definition: sqliteformat.h:54
mkcal_export.h
mKCal::Notebook::Ptr
QSharedPointer< Notebook > Ptr
A shared pointer to a Notebook object.
Definition: notebook.h:53
mKCal
Definition: extendedstorage.h:49
mKCal::SqliteFormat::XDate
@ XDate
Definition: sqliteformat.h:62
mKCal::SqliteFormat::RDateTime
@ RDateTime
Definition: sqliteformat.h:63
MKCAL_EXPORT
#define MKCAL_EXPORT
Definition: mkcal_export.h:27
extendedstorage.h

Generated on Sat Oct 17 2020 06:54:57 for libextendedkcal by doxygen 1.8.17