summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/backend
Side-by-side diff
Diffstat (limited to 'libopie2/opiepim/backend') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend_xml.h35
-rw-r--r--libopie2/opiepim/backend/otodoaccessxml.cpp2
-rw-r--r--libopie2/opiepim/backend/otodoaccessxml.h2
3 files changed, 21 insertions, 18 deletions
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_xml.h b/libopie2/opiepim/backend/ocontactaccessbackend_xml.h
index 97ef40f..50ea329 100644
--- a/libopie2/opiepim/backend/ocontactaccessbackend_xml.h
+++ b/libopie2/opiepim/backend/ocontactaccessbackend_xml.h
@@ -14,12 +14,15 @@
*
* =====================================================================
* Version: $Id$
* =====================================================================
* History:
* $Log$
+ * Revision 1.3 2002/10/14 16:21:54 eilers
+ * Some minor interface updates
+ *
* Revision 1.2 2002/10/07 17:34:24 eilers
* added OBackendFactory for advanced backend access
*
* 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 !
@@ -196,31 +199,31 @@ class OContactAccessBackend_XML : public OContactAccessBackend {
* if all fields matches.
*/
bool allcorrect = true;
for ( int i = 0; i < Qtopia::rid; i++ ) {
/* Just compare fields which are not empty in the query object */
if ( !query.field(i).isEmpty() ){
- switch ( settings & ~OContactAccess::query_IgnoreCase ){
- case OContactAccess::query_RegExp:{
+ switch ( settings & ~OContactAccess::IgnoreCase ){
+ case OContactAccess::RegExp:{
QRegExp expr ( query.field(i),
- !(settings & OContactAccess::query_IgnoreCase),
+ !(settings & OContactAccess::IgnoreCase),
false );
if ( expr.find ( (*it).field(i), 0 ) == -1 )
allcorrect = false;
}
break;
- case OContactAccess::query_WildCards:{
+ case OContactAccess::WildCards:{
QRegExp expr ( query.field(i),
- !(settings & OContactAccess::query_IgnoreCase),
+ !(settings & OContactAccess::IgnoreCase),
true );
if ( expr.find ( (*it).field(i), 0 ) == -1 )
allcorrect = false;
}
break;
- case OContactAccess::query_ExactMatch:{
- if (settings & OContactAccess::query_IgnoreCase){
+ case OContactAccess::ExactMatch:{
+ if (settings & OContactAccess::IgnoreCase){
if ( query.field(i).upper() !=
(*it).field(i).upper() )
allcorrect = false;
}else{
if ( query.field(i) != (*it).field(i) )
allcorrect = false;
@@ -240,30 +243,30 @@ class OContactAccessBackend_XML : public OContactAccessBackend {
return m_currentQuery;
}
const uint querySettings()
{
- return ( OContactAccess::query_WildCards
- & OContactAccess::query_IgnoreCase
- & OContactAccess::query_RegExp
- & OContactAccess::query_ExactMatch );
+ return ( OContactAccess::WildCards
+ & OContactAccess::IgnoreCase
+ & OContactAccess::RegExp
+ & OContactAccess::ExactMatch );
}
bool hasQuerySettings (uint querySettings) const
{
- /* OContactAccess::query_IgnoreCase may be added with one
+ /* OContactAccess::IgnoreCase may be added with one
* of the other settings, but never used alone.
* The other settings are just valid alone...
*/
- switch ( querySettings & ~OContactAccess::query_IgnoreCase ){
- case OContactAccess::query_RegExp:
+ switch ( querySettings & ~OContactAccess::IgnoreCase ){
+ case OContactAccess::RegExp:
return ( true );
- case OContactAccess::query_WildCards:
+ case OContactAccess::WildCards:
return ( true );
- case OContactAccess::query_ExactMatch:
+ case OContactAccess::ExactMatch:
return ( true );
default:
return ( false );
}
}
diff --git a/libopie2/opiepim/backend/otodoaccessxml.cpp b/libopie2/opiepim/backend/otodoaccessxml.cpp
index f3b0783..3b4cab2 100644
--- a/libopie2/opiepim/backend/otodoaccessxml.cpp
+++ b/libopie2/opiepim/backend/otodoaccessxml.cpp
@@ -184,13 +184,13 @@ QArray<int> OTodoAccessXML::allRecords()const {
for ( it = m_events.begin(); it != m_events.end(); ++it ) {
ids[i] = it.key();
i++;
}
return ids;
}
-QArray<int> OTodoAccessXML::queryByExample( const OTodo&, int sort ) {
+QArray<int> OTodoAccessXML::queryByExample( const OTodo&, int ) {
QArray<int> ids(0);
return ids;
}
OTodo OTodoAccessXML::find( int uid )const {
OTodo todo;
todo.setUid( 0 ); // isEmpty()
diff --git a/libopie2/opiepim/backend/otodoaccessxml.h b/libopie2/opiepim/backend/otodoaccessxml.h
index 1e7e371..dc41c32 100644
--- a/libopie2/opiepim/backend/otodoaccessxml.h
+++ b/libopie2/opiepim/backend/otodoaccessxml.h
@@ -21,13 +21,13 @@ public:
bool load();
bool reload();
bool save();
QArray<int> allRecords()const;
- QArray<int> queryByExample( const OTodo&, int sort );
+ QArray<int> queryByExample( const OTodo&, int querysettings );
OTodo find( int uid )const;
void clear();
bool add( const OTodo& );
bool remove( int uid );
bool replace( const OTodo& );