author | eilers <eilers> | 2003-11-17 15:57:10 (UTC) |
---|---|---|
committer | eilers <eilers> | 2003-11-17 15:57:10 (UTC) |
commit | 5228be0c7dfe6ce10330133fde6a5b15f836403b (patch) (unidiff) | |
tree | af8e5771fce916db0544f23e5c513d3cb3d60c7b | |
parent | 3ba032c6a4833260ef6274b6b2bf6a6a9ccc2540 (diff) | |
download | opie-5228be0c7dfe6ce10330133fde6a5b15f836403b.zip opie-5228be0c7dfe6ce10330133fde6a5b15f836403b.tar.gz opie-5228be0c7dfe6ce10330133fde6a5b15f836403b.tar.bz2 |
Added #include QDateTime which is needed by this header file itself
-rw-r--r-- | libopie/pim/opimaccessbackend.h | 1 | ||||
-rw-r--r-- | libopie2/opiepim/backend/opimaccessbackend.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/libopie/pim/opimaccessbackend.h b/libopie/pim/opimaccessbackend.h index c3d91f7..fd264fc 100644 --- a/libopie/pim/opimaccessbackend.h +++ b/libopie/pim/opimaccessbackend.h | |||
@@ -1,100 +1,101 @@ | |||
1 | #ifndef OPIE_PIM_ACCESS_BACKEND | 1 | #ifndef OPIE_PIM_ACCESS_BACKEND |
2 | #define OPIE_PIM_ACCESS_BACKEND | 2 | #define OPIE_PIM_ACCESS_BACKEND |
3 | 3 | ||
4 | #include <qarray.h> | 4 | #include <qarray.h> |
5 | #include <qdatetime.h> | ||
5 | 6 | ||
6 | #include <opie/otemplatebase.h> | 7 | #include <opie/otemplatebase.h> |
7 | #include <opie/opimrecord.h> | 8 | #include <opie/opimrecord.h> |
8 | 9 | ||
9 | 10 | ||
10 | class OPimAccessBackendPrivate; | 11 | class OPimAccessBackendPrivate; |
11 | /** | 12 | /** |
12 | * OPimAccessBackend is the base class | 13 | * OPimAccessBackend is the base class |
13 | * for all private backends | 14 | * for all private backends |
14 | * it operates on OPimRecord as the base class | 15 | * it operates on OPimRecord as the base class |
15 | * and it's responsible for fast manipulating | 16 | * and it's responsible for fast manipulating |
16 | * the resource the implementation takes care | 17 | * the resource the implementation takes care |
17 | * of | 18 | * of |
18 | */ | 19 | */ |
19 | template <class T = OPimRecord> | 20 | template <class T = OPimRecord> |
20 | class OPimAccessBackend { | 21 | class OPimAccessBackend { |
21 | public: | 22 | public: |
22 | typedef OTemplateBase<T> Frontend; | 23 | typedef OTemplateBase<T> Frontend; |
23 | 24 | ||
24 | /** The access hint from the frontend */ | 25 | /** The access hint from the frontend */ |
25 | OPimAccessBackend(int access = 0); | 26 | OPimAccessBackend(int access = 0); |
26 | virtual ~OPimAccessBackend(); | 27 | virtual ~OPimAccessBackend(); |
27 | 28 | ||
28 | /** | 29 | /** |
29 | * load the resource | 30 | * load the resource |
30 | */ | 31 | */ |
31 | virtual bool load() = 0; | 32 | virtual bool load() = 0; |
32 | 33 | ||
33 | /** | 34 | /** |
34 | * reload the resource | 35 | * reload the resource |
35 | */ | 36 | */ |
36 | virtual bool reload() = 0; | 37 | virtual bool reload() = 0; |
37 | 38 | ||
38 | /** | 39 | /** |
39 | * save the resource and | 40 | * save the resource and |
40 | * all it's changes | 41 | * all it's changes |
41 | */ | 42 | */ |
42 | virtual bool save() = 0; | 43 | virtual bool save() = 0; |
43 | 44 | ||
44 | /** | 45 | /** |
45 | * return an array of | 46 | * return an array of |
46 | * all available uids | 47 | * all available uids |
47 | */ | 48 | */ |
48 | virtual QArray<int> allRecords()const = 0; | 49 | virtual QArray<int> allRecords()const = 0; |
49 | 50 | ||
50 | /** | 51 | /** |
51 | * return a List of records | 52 | * return a List of records |
52 | * that match the regex | 53 | * that match the regex |
53 | */ | 54 | */ |
54 | virtual QArray<int> matchRegexp(const QRegExp &r) const = 0; | 55 | virtual QArray<int> matchRegexp(const QRegExp &r) const = 0; |
55 | 56 | ||
56 | /** | 57 | /** |
57 | * queryByExample for T with the given Settings | 58 | * queryByExample for T with the given Settings |
58 | * | 59 | * |
59 | */ | 60 | */ |
60 | virtual QArray<int> queryByExample( const T& t, int settings, const QDateTime& d = QDateTime() ) = 0; | 61 | virtual QArray<int> queryByExample( const T& t, int settings, const QDateTime& d = QDateTime() ) = 0; |
61 | 62 | ||
62 | /** | 63 | /** |
63 | * find the OPimRecord with uid @param uid | 64 | * find the OPimRecord with uid @param uid |
64 | * returns T and T.isEmpty() if nothing was found | 65 | * returns T and T.isEmpty() if nothing was found |
65 | */ | 66 | */ |
66 | virtual T find(int uid )const = 0; | 67 | virtual T find(int uid )const = 0; |
67 | 68 | ||
68 | virtual T find(int uid, const QArray<int>& items, | 69 | virtual T find(int uid, const QArray<int>& items, |
69 | uint current, typename Frontend::CacheDirection )const ; | 70 | uint current, typename Frontend::CacheDirection )const ; |
70 | /** | 71 | /** |
71 | * clear the back end | 72 | * clear the back end |
72 | */ | 73 | */ |
73 | virtual void clear() = 0; | 74 | virtual void clear() = 0; |
74 | 75 | ||
75 | /** | 76 | /** |
76 | * add T | 77 | * add T |
77 | */ | 78 | */ |
78 | virtual bool add( const T& t ) = 0; | 79 | virtual bool add( const T& t ) = 0; |
79 | 80 | ||
80 | /** | 81 | /** |
81 | * remove | 82 | * remove |
82 | */ | 83 | */ |
83 | virtual bool remove( int uid ) = 0; | 84 | virtual bool remove( int uid ) = 0; |
84 | 85 | ||
85 | /** | 86 | /** |
86 | * replace a record with T.uid() | 87 | * replace a record with T.uid() |
87 | */ | 88 | */ |
88 | virtual bool replace( const T& t ) = 0; | 89 | virtual bool replace( const T& t ) = 0; |
89 | 90 | ||
90 | /* | 91 | /* |
91 | * setTheFrontEnd!!! | 92 | * setTheFrontEnd!!! |
92 | */ | 93 | */ |
93 | void setFrontend( Frontend* front ); | 94 | void setFrontend( Frontend* front ); |
94 | 95 | ||
95 | /** | 96 | /** |
96 | * set the read ahead count | 97 | * set the read ahead count |
97 | */ | 98 | */ |
98 | void setReadAhead( uint count ); | 99 | void setReadAhead( uint count ); |
99 | protected: | 100 | protected: |
100 | int access()const; | 101 | int access()const; |
diff --git a/libopie2/opiepim/backend/opimaccessbackend.h b/libopie2/opiepim/backend/opimaccessbackend.h index c3d91f7..fd264fc 100644 --- a/libopie2/opiepim/backend/opimaccessbackend.h +++ b/libopie2/opiepim/backend/opimaccessbackend.h | |||
@@ -1,100 +1,101 @@ | |||
1 | #ifndef OPIE_PIM_ACCESS_BACKEND | 1 | #ifndef OPIE_PIM_ACCESS_BACKEND |
2 | #define OPIE_PIM_ACCESS_BACKEND | 2 | #define OPIE_PIM_ACCESS_BACKEND |
3 | 3 | ||
4 | #include <qarray.h> | 4 | #include <qarray.h> |
5 | #include <qdatetime.h> | ||
5 | 6 | ||
6 | #include <opie/otemplatebase.h> | 7 | #include <opie/otemplatebase.h> |
7 | #include <opie/opimrecord.h> | 8 | #include <opie/opimrecord.h> |
8 | 9 | ||
9 | 10 | ||
10 | class OPimAccessBackendPrivate; | 11 | class OPimAccessBackendPrivate; |
11 | /** | 12 | /** |
12 | * OPimAccessBackend is the base class | 13 | * OPimAccessBackend is the base class |
13 | * for all private backends | 14 | * for all private backends |
14 | * it operates on OPimRecord as the base class | 15 | * it operates on OPimRecord as the base class |
15 | * and it's responsible for fast manipulating | 16 | * and it's responsible for fast manipulating |
16 | * the resource the implementation takes care | 17 | * the resource the implementation takes care |
17 | * of | 18 | * of |
18 | */ | 19 | */ |
19 | template <class T = OPimRecord> | 20 | template <class T = OPimRecord> |
20 | class OPimAccessBackend { | 21 | class OPimAccessBackend { |
21 | public: | 22 | public: |
22 | typedef OTemplateBase<T> Frontend; | 23 | typedef OTemplateBase<T> Frontend; |
23 | 24 | ||
24 | /** The access hint from the frontend */ | 25 | /** The access hint from the frontend */ |
25 | OPimAccessBackend(int access = 0); | 26 | OPimAccessBackend(int access = 0); |
26 | virtual ~OPimAccessBackend(); | 27 | virtual ~OPimAccessBackend(); |
27 | 28 | ||
28 | /** | 29 | /** |
29 | * load the resource | 30 | * load the resource |
30 | */ | 31 | */ |
31 | virtual bool load() = 0; | 32 | virtual bool load() = 0; |
32 | 33 | ||
33 | /** | 34 | /** |
34 | * reload the resource | 35 | * reload the resource |
35 | */ | 36 | */ |
36 | virtual bool reload() = 0; | 37 | virtual bool reload() = 0; |
37 | 38 | ||
38 | /** | 39 | /** |
39 | * save the resource and | 40 | * save the resource and |
40 | * all it's changes | 41 | * all it's changes |
41 | */ | 42 | */ |
42 | virtual bool save() = 0; | 43 | virtual bool save() = 0; |
43 | 44 | ||
44 | /** | 45 | /** |
45 | * return an array of | 46 | * return an array of |
46 | * all available uids | 47 | * all available uids |
47 | */ | 48 | */ |
48 | virtual QArray<int> allRecords()const = 0; | 49 | virtual QArray<int> allRecords()const = 0; |
49 | 50 | ||
50 | /** | 51 | /** |
51 | * return a List of records | 52 | * return a List of records |
52 | * that match the regex | 53 | * that match the regex |
53 | */ | 54 | */ |
54 | virtual QArray<int> matchRegexp(const QRegExp &r) const = 0; | 55 | virtual QArray<int> matchRegexp(const QRegExp &r) const = 0; |
55 | 56 | ||
56 | /** | 57 | /** |
57 | * queryByExample for T with the given Settings | 58 | * queryByExample for T with the given Settings |
58 | * | 59 | * |
59 | */ | 60 | */ |
60 | virtual QArray<int> queryByExample( const T& t, int settings, const QDateTime& d = QDateTime() ) = 0; | 61 | virtual QArray<int> queryByExample( const T& t, int settings, const QDateTime& d = QDateTime() ) = 0; |
61 | 62 | ||
62 | /** | 63 | /** |
63 | * find the OPimRecord with uid @param uid | 64 | * find the OPimRecord with uid @param uid |
64 | * returns T and T.isEmpty() if nothing was found | 65 | * returns T and T.isEmpty() if nothing was found |
65 | */ | 66 | */ |
66 | virtual T find(int uid )const = 0; | 67 | virtual T find(int uid )const = 0; |
67 | 68 | ||
68 | virtual T find(int uid, const QArray<int>& items, | 69 | virtual T find(int uid, const QArray<int>& items, |
69 | uint current, typename Frontend::CacheDirection )const ; | 70 | uint current, typename Frontend::CacheDirection )const ; |
70 | /** | 71 | /** |
71 | * clear the back end | 72 | * clear the back end |
72 | */ | 73 | */ |
73 | virtual void clear() = 0; | 74 | virtual void clear() = 0; |
74 | 75 | ||
75 | /** | 76 | /** |
76 | * add T | 77 | * add T |
77 | */ | 78 | */ |
78 | virtual bool add( const T& t ) = 0; | 79 | virtual bool add( const T& t ) = 0; |
79 | 80 | ||
80 | /** | 81 | /** |
81 | * remove | 82 | * remove |
82 | */ | 83 | */ |
83 | virtual bool remove( int uid ) = 0; | 84 | virtual bool remove( int uid ) = 0; |
84 | 85 | ||
85 | /** | 86 | /** |
86 | * replace a record with T.uid() | 87 | * replace a record with T.uid() |
87 | */ | 88 | */ |
88 | virtual bool replace( const T& t ) = 0; | 89 | virtual bool replace( const T& t ) = 0; |
89 | 90 | ||
90 | /* | 91 | /* |
91 | * setTheFrontEnd!!! | 92 | * setTheFrontEnd!!! |
92 | */ | 93 | */ |
93 | void setFrontend( Frontend* front ); | 94 | void setFrontend( Frontend* front ); |
94 | 95 | ||
95 | /** | 96 | /** |
96 | * set the read ahead count | 97 | * set the read ahead count |
97 | */ | 98 | */ |
98 | void setReadAhead( uint count ); | 99 | void setReadAhead( uint count ); |
99 | protected: | 100 | protected: |
100 | int access()const; | 101 | int access()const; |