Diffstat (limited to 'libopie2/opiepim/core/opimaccesstemplate.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/core/opimaccesstemplate.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/libopie2/opiepim/core/opimaccesstemplate.h b/libopie2/opiepim/core/opimaccesstemplate.h index a0d8f63..3e1f393 100644 --- a/libopie2/opiepim/core/opimaccesstemplate.h +++ b/libopie2/opiepim/core/opimaccesstemplate.h | |||
@@ -18,31 +18,24 @@ | |||
18 | * Just create a OPimRecord and inherit from | 18 | * Just create a OPimRecord and inherit from |
19 | * the plugins | 19 | * the plugins |
20 | */ | 20 | */ |
21 | 21 | ||
22 | template <class T = OPimRecord > | 22 | template <class T = OPimRecord > |
23 | class OPimAccessTemplate : public OTemplateBase<T> { | 23 | class OPimAccessTemplate : public OTemplateBase<T> { |
24 | public: | 24 | public: |
25 | typedef ORecordList<T> List; | 25 | typedef ORecordList<T> List; |
26 | typedef OPimAccessBackend<T> BackEnd; | 26 | typedef OPimAccessBackend<T> BackEnd; |
27 | typedef OPimCache<T> Cache; | 27 | typedef OPimCache<T> Cache; |
28 | 28 | ||
29 | /** | 29 | /** |
30 | * our sort order | ||
31 | * should be safe explaining | ||
32 | */ | ||
33 | enum SortOrder { WildCards = 0, IgnoreCase = 1, | ||
34 | RegExp = 2, ExactMatch = 4 }; | ||
35 | |||
36 | /** | ||
37 | * c'tor BackEnd | 30 | * c'tor BackEnd |
38 | */ | 31 | */ |
39 | OPimAccessTemplate( BackEnd* end); | 32 | OPimAccessTemplate( BackEnd* end); |
40 | virtual ~OPimAccessTemplate(); | 33 | virtual ~OPimAccessTemplate(); |
41 | 34 | ||
42 | /** | 35 | /** |
43 | * load from the backend | 36 | * load from the backend |
44 | */ | 37 | */ |
45 | virtual bool load(); | 38 | virtual bool load(); |
46 | 39 | ||
47 | /** | 40 | /** |
48 | * reload from the backend | 41 | * reload from the backend |
@@ -57,27 +50,28 @@ public: | |||
57 | /** | 50 | /** |
58 | * if the resource was changed externally | 51 | * if the resource was changed externally |
59 | */ | 52 | */ |
60 | bool wasChangedExternally()const; | 53 | bool wasChangedExternally()const; |
61 | 54 | ||
62 | /** | 55 | /** |
63 | * return a List of records | 56 | * return a List of records |
64 | * you can iterate over them | 57 | * you can iterate over them |
65 | */ | 58 | */ |
66 | virtual List allRecords()const; | 59 | virtual List allRecords()const; |
67 | 60 | ||
68 | /** | 61 | /** |
69 | * queryByExample | 62 | * queryByExample) |
63 | * @see otodoaccess, ocontactaccess | ||
70 | */ | 64 | */ |
71 | virtual List queryByExample( const T& t, int sortOrder ); | 65 | virtual List queryByExample( const T& t, int querySettings ); |
72 | 66 | ||
73 | /** | 67 | /** |
74 | * find the OPimRecord uid | 68 | * find the OPimRecord uid |
75 | */ | 69 | */ |
76 | virtual T find( int uid )const; | 70 | virtual T find( int uid )const; |
77 | 71 | ||
78 | /** | 72 | /** |
79 | * read ahead cache find method ;) | 73 | * read ahead cache find method ;) |
80 | */ | 74 | */ |
81 | virtual T find( int uid, const QArray<int>&, | 75 | virtual T find( int uid, const QArray<int>&, |
82 | uint current, CacheDirection dir = Forward )const; | 76 | uint current, CacheDirection dir = Forward )const; |
83 | 77 | ||