author | zecke <zecke> | 2004-11-18 21:49:23 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-11-18 21:49:23 (UTC) |
commit | 1e7f8f22fc10e3ed85b6563332ddc348c95792d0 (patch) (unidiff) | |
tree | 59498ba1d4a7dbff05228c09bebcf0c849e916be /libopie2/opiepim/backend/ocontactaccessbackend.h | |
parent | 41fa1c196965f17f9748f835d90c307b7e594883 (diff) | |
download | opie-1e7f8f22fc10e3ed85b6563332ddc348c95792d0.zip opie-1e7f8f22fc10e3ed85b6563332ddc348c95792d0.tar.gz opie-1e7f8f22fc10e3ed85b6563332ddc348c95792d0.tar.bz2 |
Backend Changes:
Each Backend can:
-Sort and Filter a set of Records/AllRecords (which can be filtered again)
-QueryByExample by every Backend
-Occurrences for a period of time and a QDateTime
-More common implementation
-OPimBackendOccurrence with common splitting to OPimOccurrence
Diffstat (limited to 'libopie2/opiepim/backend/ocontactaccessbackend.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/backend/ocontactaccessbackend.h | 80 |
1 files changed, 37 insertions, 43 deletions
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend.h b/libopie2/opiepim/backend/ocontactaccessbackend.h index 8436adc..efb04c7 100644 --- a/libopie2/opiepim/backend/ocontactaccessbackend.h +++ b/libopie2/opiepim/backend/ocontactaccessbackend.h | |||
@@ -57,56 +57,50 @@ namespace Opie { | |||
57 | */ | 57 | */ |
58 | class OPimContactAccessBackend: public OPimAccessBackend<OPimContact> { | 58 | class OPimContactAccessBackend: public OPimAccessBackend<OPimContact> { |
59 | public: | 59 | public: |
60 | /** | 60 | OPimContactAccessBackend(); |
61 | * @todo make non line in regard to BC guide of KDE | ||
62 | */ | ||
63 | OPimContactAccessBackend() {} | ||
64 | /** | ||
65 | * @todo make non inline in regard to the BC guide of KDE | ||
66 | */ | ||
67 | virtual ~OPimContactAccessBackend() {} | ||
68 | 61 | ||
69 | 62 | ||
70 | /** | 63 | /** |
71 | * Return if database was changed externally. | 64 | * Return if database was changed externally. |
72 | * This may just make sense on file based databases like a XML-File. | 65 | * This may just make sense on file based databases like a XML-File. |
73 | * It is used to prevent to overwrite the current database content | 66 | * It is used to prevent to overwrite the current database content |
74 | * if the file was already changed by something else ! | 67 | * if the file was already changed by something else ! |
75 | * If this happens, we have to reload before save our data. | 68 | * If this happens, we have to reload before save our data. |
76 | * If we use real databases, this should be handled by the database | 69 | * If we use real databases, this should be handled by the database |
77 | * management system themselve, therefore this function should always return false in | 70 | * management system themselve, therefore this function should always return false in |
78 | * this case. It is not our problem to handle this conflict ... | 71 | * this case. It is not our problem to handle this conflict ... |
79 | * @return <i>true</i> if the database was changed and if save without reload will | 72 | * @return <i>true</i> if the database was changed and if save without reload will |
80 | * be dangerous. <i>false</i> if the database was not changed or it is save to write | 73 | * be dangerous. <i>false</i> if the database was not changed or it is save to write |
81 | * in this situation. | 74 | * in this situation. |
82 | */ | 75 | */ |
83 | virtual bool wasChangedExternally() = 0; | 76 | virtual bool wasChangedExternally() = 0; |
84 | 77 | ||
85 | virtual QArray<int> matchRegexp( const QRegExp &r ) const = 0; | 78 | /** |
79 | * Return all possible settings. | ||
80 | * @return All settings provided by the current backend | ||
81 | * (i.e.: query_WildCards & query_IgnoreCase) | ||
82 | */ | ||
83 | virtual const uint querySettings() = 0; | ||
86 | 84 | ||
87 | /** | 85 | /** |
88 | * Return all possible settings. | 86 | * Check whether settings are correct. |
89 | * @return All settings provided by the current backend | 87 | * @return <i>true</i> if the given settings are correct and possible. |
90 | * (i.e.: query_WildCards & query_IgnoreCase) | 88 | */ |
91 | */ | 89 | virtual bool hasQuerySettings (uint querySettings) const = 0; |
92 | virtual const uint querySettings() = 0; | 90 | |
91 | /** | ||
92 | * Slow and inefficent default implementation | ||
93 | */ | ||
94 | //@{ | ||
95 | UIDArray queryByExample( const OPimContact&, int settings, const QDateTime& d = QDateTime() )const; | ||
96 | UIDArray sorted( const UIDArray&, bool asc, int, int, const QArray<int>& )const; | ||
97 | OPimBackendOccurrence::List occurrences( const QDate&, const QDate& )const; | ||
98 | //@} | ||
93 | 99 | ||
94 | /** | ||
95 | * Check whether settings are correct. | ||
96 | * @return <i>true</i> if the given settings are correct and possible. | ||
97 | */ | ||
98 | virtual bool hasQuerySettings (uint querySettings) const = 0; | ||
99 | 100 | ||
100 | /** | ||
101 | * FIXME!!! | ||
102 | * Returns a sorted list of records either ascendinf or descending for a giving criteria and category | ||
103 | */ | ||
104 | virtual QArray<int> sorted( bool ascending, int sortOrder, int sortFilter, int cat ) = 0; | ||
105 | |||
106 | |||
107 | private: | 101 | private: |
108 | class Private; | 102 | class Private; |
109 | Private *d; | 103 | Private *d; |
110 | }; | 104 | }; |
111 | 105 | ||
112 | } | 106 | } |