-rw-r--r-- | libopie2/opiepim/backend/opimaccessbackend.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/libopie2/opiepim/backend/opimaccessbackend.h b/libopie2/opiepim/backend/opimaccessbackend.h index d9af589..8e744e7 100644 --- a/libopie2/opiepim/backend/opimaccessbackend.h +++ b/libopie2/opiepim/backend/opimaccessbackend.h | |||
@@ -5,25 +5,32 @@ | |||
5 | 5 | ||
6 | #include <opie/opimrecord.h> | 6 | #include <opie/opimrecord.h> |
7 | 7 | ||
8 | template <class T = OPimRecord> | 8 | template <class T = OPimRecord> |
9 | class OPimAccessBackend { | 9 | class OPimAccessBackend { |
10 | public: | 10 | public: |
11 | OPimAccessBackend() { | 11 | OPimAccessBackend(); |
12 | } | 12 | virtual ~OPimAccessBackend(); |
13 | ~OPimAccessBackend() { | ||
14 | } | ||
15 | virtual void load() = 0; | 13 | virtual void load() = 0; |
16 | virtual void reload() = 0; | 14 | virtual void reload() = 0; |
17 | virtual void save() = 0; | 15 | virtual void save() = 0; |
18 | virtual QArray<int> allRecords() = 0; | 16 | virtual QArray<int> allRecords()const = 0; |
19 | virtual QArray<int> queryByExample( const T& t, int sort ) = 0; | 17 | virtual QArray<int> queryByExample( const T& t, int sort ) = 0; |
20 | virtual T find(int uid ) = 0; | 18 | virtual T find(int uid ) = 0; |
21 | virtual void clear() = 0; | 19 | virtual void clear() = 0; |
22 | virtual bool add( const T& t ) = 0; | 20 | virtual bool add( const T& t ) = 0; |
23 | virtual bool remove( int uid ) = 0; | 21 | virtual bool remove( int uid ) = 0; |
24 | virtual void replace( const T& t ) = 0; | 22 | virtual bool replace( const T& t ) = 0; |
25 | 23 | ||
26 | 24 | ||
27 | }; | 25 | }; |
28 | 26 | ||
27 | template <class T> | ||
28 | OPimAccessBackend<T>::OPimAccessBackend() { | ||
29 | |||
30 | } | ||
31 | template <class T> | ||
32 | OPimAccessBackend<T>::~OPimAccessBackend() { | ||
33 | |||
34 | } | ||
35 | |||
29 | #endif | 36 | #endif |