summaryrefslogtreecommitdiff
path: root/libopie/pim/opimaccessbackend.h
blob: 8e744e79ed98b8273fb5710ed8145633f4eebc45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef OPIE_PIM_ACCESS_BACKEND
#define OPIE_PIM_ACCESS_BACKEND

#include <qarray.h>

#include <opie/opimrecord.h>

template <class T = OPimRecord>
class OPimAccessBackend {
public:
    OPimAccessBackend();
    virtual ~OPimAccessBackend();
    virtual void load() = 0;
    virtual void reload() = 0;
    virtual void save() = 0;
    virtual QArray<int> allRecords()const = 0;
    virtual QArray<int> queryByExample( const T& t, int sort ) = 0;
    virtual T find(int uid ) = 0;
    virtual void clear() = 0;
    virtual bool add( const T& t ) = 0;
    virtual bool remove( int uid ) = 0;
    virtual bool replace( const T& t ) = 0;


};

template <class T>
OPimAccessBackend<T>::OPimAccessBackend() {

}
template <class T>
OPimAccessBackend<T>::~OPimAccessBackend() {

}

#endif