Diffstat (limited to 'libopie/pim/odatebookaccessbackend_sql.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie/pim/odatebookaccessbackend_sql.h | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/libopie/pim/odatebookaccessbackend_sql.h b/libopie/pim/odatebookaccessbackend_sql.h deleted file mode 100644 index ba514bc..0000000 --- a/libopie/pim/odatebookaccessbackend_sql.h +++ b/dev/null | |||
@@ -1,65 +0,0 @@ | |||
1 | #ifndef OPIE_DATE_BOOK_ACCESS_BACKEND_SQL__H | ||
2 | #define OPIE_DATE_BOOK_ACCESS_BACKEND_SQL__H | ||
3 | |||
4 | #include <qmap.h> | ||
5 | #include <opie2/osqlresult.h> | ||
6 | |||
7 | #include "odatebookaccessbackend.h" | ||
8 | |||
9 | namespace Opie { namespace DB { | ||
10 | class OSQLDriver; | ||
11 | |||
12 | }} | ||
13 | |||
14 | /** | ||
15 | * This is the default SQL implementation for DateBoook SQL storage | ||
16 | * It fully implements the interface | ||
17 | * @see ODateBookAccessBackend | ||
18 | * @see OPimAccessBackend | ||
19 | */ | ||
20 | class ODateBookAccessBackend_SQL : public ODateBookAccessBackend { | ||
21 | public: | ||
22 | ODateBookAccessBackend_SQL( const QString& appName, | ||
23 | const QString& fileName = QString::null); | ||
24 | ~ODateBookAccessBackend_SQL(); | ||
25 | |||
26 | bool load(); | ||
27 | bool reload(); | ||
28 | bool save(); | ||
29 | |||
30 | QArray<int> allRecords()const; | ||
31 | QArray<int> matchRegexp(const QRegExp &r) const; | ||
32 | QArray<int> queryByExample( const OEvent&, int, const QDateTime& d = QDateTime() ); | ||
33 | OEvent find( int uid )const; | ||
34 | void clear(); | ||
35 | bool add( const OEvent& ev ); | ||
36 | bool remove( int uid ); | ||
37 | bool replace( const OEvent& ev ); | ||
38 | |||
39 | QArray<UID> rawEvents()const; | ||
40 | QArray<UID> rawRepeats()const; | ||
41 | QArray<UID> nonRepeats()const; | ||
42 | |||
43 | OEvent::ValueList directNonRepeats(); | ||
44 | OEvent::ValueList directRawRepeats(); | ||
45 | |||
46 | private: | ||
47 | bool loadFile(); | ||
48 | QString m_fileName; | ||
49 | QArray<int> m_uids; | ||
50 | |||
51 | QMap<int, QString> m_fieldMap; | ||
52 | QMap<QString, int> m_reverseFieldMap; | ||
53 | |||
54 | Opie::DB::OSQLDriver* m_driver; | ||
55 | |||
56 | class Private; | ||
57 | Private *d; | ||
58 | |||
59 | void initFields(); | ||
60 | void update(); | ||
61 | QArray<int> extractUids( Opie::DB::OSQLResult& res ) const; | ||
62 | |||
63 | }; | ||
64 | |||
65 | #endif | ||