summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/core
authoreilers <eilers>2003-01-02 14:27:12 (UTC)
committer eilers <eilers>2003-01-02 14:27:12 (UTC)
commit8a9fc13259d7c2797068752687a011f57f613251 (patch) (side-by-side diff)
tree26019057f2974c71881d9d7759732326cd0ede25 /libopie2/opiepim/core
parent12e9ed4ac80ac7fa042059b48d7447db0e59a86c (diff)
downloadopie-8a9fc13259d7c2797068752687a011f57f613251.zip
opie-8a9fc13259d7c2797068752687a011f57f613251.tar.gz
opie-8a9fc13259d7c2797068752687a011f57f613251.tar.bz2
Improved query by example: Search by date is possible.. First step
for a today plugin for birthdays..
Diffstat (limited to 'libopie2/opiepim/core') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/core/ocontactaccess.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/libopie2/opiepim/core/ocontactaccess.h b/libopie2/opiepim/core/ocontactaccess.h
index 961968f..32b2dcb 100644
--- a/libopie2/opiepim/core/ocontactaccess.h
+++ b/libopie2/opiepim/core/ocontactaccess.h
@@ -1,43 +1,47 @@
/*
* Class to manage the Contacts.
*
* Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de)
* Copyright (c) 2002 by Holger Freyther (zecke@handhelds.org)
*
* =====================================================================
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation;
* either version 2 of the License, or (at your option) any later
* version.
* =====================================================================
* ToDo: Define enum for query settings
* =====================================================================
* Version: $Id$
* =====================================================================
* History:
* $Log$
+ * Revision 1.6 2003/01/02 14:27:12 eilers
+ * Improved query by example: Search by date is possible.. First step
+ * for a today plugin for birthdays..
+ *
* Revision 1.5 2002/11/13 14:14:51 eilers
* Added sorted for Contacts..
*
* Revision 1.4 2002/11/01 15:10:42 eilers
* Added regExp-search in database for all fields in a contact.
*
* Revision 1.3 2002/10/16 10:52:40 eilers
* Added some docu to the interface and now using the cache infrastucture by zecke.. :)
*
* Revision 1.2 2002/10/14 16:21:54 eilers
* Some minor interface updates
*
* Revision 1.1 2002/09/27 17:11:44 eilers
* Added API for accessing the Contact-Database ! It is compiling, but
* please do not expect that anything is working !
* I will debug that stuff in the next time ..
* Please read README_COMPILE for compiling !
*
* =====================================================================
*/
#ifndef _OCONTACTACCESS_H
#define _OCONTACTACCESS_H
#include <qobject.h>
@@ -67,49 +71,53 @@ class OContactAccess: public QObject, public OPimAccessTemplate<OContact>
* @param filename The name of the database file. If not set, the default one
* is used.
* @param backend Pointer to an alternative Backend. If not set, we will use
* the default backend.
* @param handlesync If <b>true</b> the database stores the current state
* automatically if it receives the signals <i>flush()</i> and <i>reload()</i>
* which are used before and after synchronisation. If the application wants
* to react itself, it should be disabled by setting it to <b>false</b>
* @see OContactAccessBackend
*/
OContactAccess (const QString appname, const QString filename = 0l,
OContactAccessBackend* backend = 0l, bool handlesync = true);
~OContactAccess ();
/** Constants for query.
* Use this constants to set the query parameters.
* Note: <i>query_IgnoreCase</i> just make sense with one of the other attributes !
* @see queryByExample()
*/
enum QuerySettings {
WildCards = 0x0001,
IgnoreCase = 0x0002,
RegExp = 0x0004,
ExactMatch = 0x0008,
- MatchOne = 0x0010 // Only one Entry must match
+ MatchOne = 0x0010, // Only one Entry must match
+ DateDiff = 0x0020, // Find all entries from today until given date
+ DateYear = 0x0040, // The year matches
+ DateMonth = 0x0080, // The month matches
+ DateDay = 0x0100, // The day matches
};
ORecordList<OContact> matchRegexp( const QRegExp &r )const;
/** Return all Contacts in a sorted manner.
* @param ascending true: Sorted in acending order.
* @param sortOrder Currently not implemented. Just defined to stay compatible to otodoaccess
* @param sortFilter Currently not implemented. Just defined to stay compatible to otodoaccess
* @param cat Currently not implemented. Just defined to stay compatible to otodoaccess
*/
List sorted( bool ascending, int sortOrder, int sortFilter, int cat ) const;
/** Return all possible settings.
* @return All settings provided by the current backend
* (i.e.: query_WildCards & query_IgnoreCase)
*/
const uint querySettings();
/** Check whether settings are correct.
* @return <i>true</i> if the given settings are correct and possible.
*/
bool hasQuerySettings ( int querySettings ) const;