summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/backend/odatebookaccessbackend_sql.h
Unidiff
Diffstat (limited to 'libopie2/opiepim/backend/odatebookaccessbackend_sql.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/backend/odatebookaccessbackend_sql.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/libopie2/opiepim/backend/odatebookaccessbackend_sql.h b/libopie2/opiepim/backend/odatebookaccessbackend_sql.h
index 89939ef..cbfeb97 100644
--- a/libopie2/opiepim/backend/odatebookaccessbackend_sql.h
+++ b/libopie2/opiepim/backend/odatebookaccessbackend_sql.h
@@ -34,60 +34,60 @@
34 34
35#include <opie2/odatebookaccessbackend.h> 35#include <opie2/odatebookaccessbackend.h>
36 36
37class OSQLDriver; 37class OSQLDriver;
38 38
39namespace Opie { 39namespace Opie {
40/** 40/**
41 * This is the default SQL implementation for DateBoook SQL storage 41 * This is the default SQL implementation for DateBoook SQL storage
42 * It fully implements the interface 42 * It fully implements the interface
43 * @see ODateBookAccessBackend 43 * @see ODateBookAccessBackend
44 * @see OPimAccessBackend 44 * @see OPimAccessBackend
45 */ 45 */
46class ODateBookAccessBackend_SQL : public ODateBookAccessBackend { 46class ODateBookAccessBackend_SQL : public ODateBookAccessBackend {
47public: 47public:
48 ODateBookAccessBackend_SQL( const QString& appName, 48 ODateBookAccessBackend_SQL( const QString& appName,
49 const QString& fileName = QString::null); 49 const QString& fileName = QString::null);
50 ~ODateBookAccessBackend_SQL(); 50 ~ODateBookAccessBackend_SQL();
51 51
52 bool load(); 52 bool load();
53 bool reload(); 53 bool reload();
54 bool save(); 54 bool save();
55 55
56 QArray<int> allRecords()const; 56 QArray<int> allRecords()const;
57 QArray<int> matchRegexp(const QRegExp &r) const; 57 QArray<int> matchRegexp(const QRegExp &r) const;
58 QArray<int> queryByExample( const OEvent&, int, const QDateTime& d = QDateTime() ); 58 QArray<int> queryByExample( const OPimEvent&, int, const QDateTime& d = QDateTime() );
59 OEvent find( int uid )const; 59 OPimEvent find( int uid )const;
60 void clear(); 60 void clear();
61 bool add( const OEvent& ev ); 61 bool add( const OPimEvent& ev );
62 bool remove( int uid ); 62 bool remove( int uid );
63 bool replace( const OEvent& ev ); 63 bool replace( const OPimEvent& ev );
64 64
65 QArray<UID> rawEvents()const; 65 QArray<UID> rawEvents()const;
66 QArray<UID> rawRepeats()const; 66 QArray<UID> rawRepeats()const;
67 QArray<UID> nonRepeats()const; 67 QArray<UID> nonRepeats()const;
68 68
69 OEvent::ValueList directNonRepeats(); 69 OPimEvent::ValueList directNonRepeats();
70 OEvent::ValueList directRawRepeats(); 70 OPimEvent::ValueList directRawRepeats();
71 71
72private: 72private:
73 bool loadFile(); 73 bool loadFile();
74 QString m_fileName; 74 QString m_fileName;
75 QArray<int> m_uids; 75 QArray<int> m_uids;
76 76
77 QMap<int, QString> m_fieldMap; 77 QMap<int, QString> m_fieldMap;
78 QMap<QString, int> m_reverseFieldMap; 78 QMap<QString, int> m_reverseFieldMap;
79 79
80 OSQLDriver* m_driver; 80 OSQLDriver* m_driver;
81 81
82 class Private; 82 class Private;
83 Private *d; 83 Private *d;
84 84
85 void initFields(); 85 void initFields();
86 void update(); 86 void update();
87 QArray<int> extractUids( OSQLResult& res ) const; 87 QArray<int> extractUids( OSQLResult& res ) const;
88 88
89}; 89};
90 90
91} 91}
92 92
93#endif 93#endif