summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/backend/otodoaccesssql.h
Unidiff
Diffstat (limited to 'libopie2/opiepim/backend/otodoaccesssql.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/backend/otodoaccesssql.h34
1 files changed, 33 insertions, 1 deletions
diff --git a/libopie2/opiepim/backend/otodoaccesssql.h b/libopie2/opiepim/backend/otodoaccesssql.h
index 1c55567..1a6f614 100644
--- a/libopie2/opiepim/backend/otodoaccesssql.h
+++ b/libopie2/opiepim/backend/otodoaccesssql.h
@@ -1,22 +1,53 @@
1/*
2 This file is part of the Opie Project
3 Copyright (C) Stefan Eilers (Eilers.Stefan@epost.de)
4 =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
5 .=l.
6 .>+-=
7 _;:, .> :=|. This program is free software; you can
8.> <`_, > . <= redistribute it and/or modify it under
9:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
10.="- .-=="i, .._ License as published by the Free Software
11 - . .-<_> .<> Foundation; either version 2 of the License,
12 ._= =} : or (at your option) any later version.
13 .%`+i> _;_.
14 .i_,=:_. -<s. This program is distributed in the hope that
15 + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
16 : .. .:, . . . without even the implied warranty of
17 =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
18 _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
19..}^=.= = ; Library General Public License for more
20++= -. .` .: details.
21 : = ...= . :.=-
22 -. .:....=;==+<; You should have received a copy of the GNU
23 -_. . . )=. = Library General Public License along with
24 -- :-=` this library; see the file COPYING.LIB.
25 If not, write to the Free Software Foundation,
26 Inc., 59 Temple Place - Suite 330,
27 Boston, MA 02111-1307, USA.
28*/
1#ifndef OPIE_PIM_ACCESS_SQL_H 29#ifndef OPIE_PIM_ACCESS_SQL_H
2#define OPIE_PIM_ACCESS_SQL_H 30#define OPIE_PIM_ACCESS_SQL_H
3 31
4#include <qasciidict.h> 32#include <qasciidict.h>
5 33
6#include "otodoaccessbackend.h" 34#include <opie2/otodoaccessbackend.h>
7 35
8class OSQLDriver; 36class OSQLDriver;
9class OSQLResult; 37class OSQLResult;
10class OSQLResultItem; 38class OSQLResultItem;
39
40namespace Opie {
41
11class OTodoAccessBackendSQL : public OTodoAccessBackend { 42class OTodoAccessBackendSQL : public OTodoAccessBackend {
12public: 43public:
13 OTodoAccessBackendSQL( const QString& file ); 44 OTodoAccessBackendSQL( const QString& file );
14 ~OTodoAccessBackendSQL(); 45 ~OTodoAccessBackendSQL();
15 46
16 bool load(); 47 bool load();
17 bool reload(); 48 bool reload();
18 bool save(); 49 bool save();
19 QArray<int> allRecords()const; 50 QArray<int> allRecords()const;
20 51
21 QArray<int> queryByExample( const OTodo& t, int settings, const QDateTime& d = QDateTime() ); 52 QArray<int> queryByExample( const OTodo& t, int settings, const QDateTime& d = QDateTime() );
22 OTodo find(int uid)const; 53 OTodo find(int uid)const;
@@ -43,14 +74,15 @@ private:
43 inline OTodo todo( const OSQLResult& )const; 74 inline OTodo todo( const OSQLResult& )const;
44 inline OTodo todo( OSQLResultItem& )const; 75 inline OTodo todo( OSQLResultItem& )const;
45 inline QArray<int> uids( const OSQLResult& )const; 76 inline QArray<int> uids( const OSQLResult& )const;
46 OTodo todo( int uid )const; 77 OTodo todo( int uid )const;
47 QBitArray sup() const; 78 QBitArray sup() const;
48 79
49 QAsciiDict<int> m_dict; 80 QAsciiDict<int> m_dict;
50 OSQLDriver* m_driver; 81 OSQLDriver* m_driver;
51 QArray<int> m_uids; 82 QArray<int> m_uids;
52 bool m_dirty : 1; 83 bool m_dirty : 1;
53}; 84};
54 85
86}
55 87
56#endif 88#endif