From 1e7f8f22fc10e3ed85b6563332ddc348c95792d0 Mon Sep 17 00:00:00 2001 From: zecke Date: Thu, 18 Nov 2004 21:49:23 +0000 Subject: 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 --- (limited to 'libopie2/opiepim/backend/ocontactaccessbackend.h') 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 { */ class OPimContactAccessBackend: public OPimAccessBackend { public: - /** - * @todo make non line in regard to BC guide of KDE - */ - OPimContactAccessBackend() {} - /** - * @todo make non inline in regard to the BC guide of KDE - */ - virtual ~OPimContactAccessBackend() {} + OPimContactAccessBackend(); - /** - * Return if database was changed externally. - * This may just make sense on file based databases like a XML-File. - * It is used to prevent to overwrite the current database content - * if the file was already changed by something else ! - * If this happens, we have to reload before save our data. - * If we use real databases, this should be handled by the database - * management system themselve, therefore this function should always return false in - * this case. It is not our problem to handle this conflict ... - * @return true if the database was changed and if save without reload will - * be dangerous. false if the database was not changed or it is save to write - * in this situation. - */ - virtual bool wasChangedExternally() = 0; + /** + * Return if database was changed externally. + * This may just make sense on file based databases like a XML-File. + * It is used to prevent to overwrite the current database content + * if the file was already changed by something else ! + * If this happens, we have to reload before save our data. + * If we use real databases, this should be handled by the database + * management system themselve, therefore this function should always return false in + * this case. It is not our problem to handle this conflict ... + * @return true if the database was changed and if save without reload will + * be dangerous. false if the database was not changed or it is save to write + * in this situation. + */ + virtual bool wasChangedExternally() = 0; - virtual QArray matchRegexp( const QRegExp &r ) const = 0; + /** + * Return all possible settings. + * @return All settings provided by the current backend + * (i.e.: query_WildCards & query_IgnoreCase) + */ + virtual const uint querySettings() = 0; - /** - * Return all possible settings. - * @return All settings provided by the current backend - * (i.e.: query_WildCards & query_IgnoreCase) - */ - virtual const uint querySettings() = 0; + /** + * Check whether settings are correct. + * @return true if the given settings are correct and possible. + */ + virtual bool hasQuerySettings (uint querySettings) const = 0; + + /** + * Slow and inefficent default implementation + */ +//@{ + UIDArray queryByExample( const OPimContact&, int settings, const QDateTime& d = QDateTime() )const; + UIDArray sorted( const UIDArray&, bool asc, int, int, const QArray& )const; + OPimBackendOccurrence::List occurrences( const QDate&, const QDate& )const; +//@} - /** - * Check whether settings are correct. - * @return true if the given settings are correct and possible. - */ - virtual bool hasQuerySettings (uint querySettings) const = 0; - /** - * FIXME!!! - * Returns a sorted list of records either ascendinf or descending for a giving criteria and category - */ - virtual QArray sorted( bool ascending, int sortOrder, int sortFilter, int cat ) = 0; - - private: - class Private; - Private *d; + class Private; + Private *d; }; } -- cgit v0.9.0.2