From 911473db35a9fce5f3589f03c27210456faaba86 Mon Sep 17 00:00:00 2001 From: mickeyl Date: Tue, 24 Feb 2004 12:46:23 +0000 Subject: *phew* here is the class and file rename patch. not converted yet: backend, but that will be not visible to application classes so we can change it later. --- (limited to 'libopie2/opiepim/core/ocontactaccess.cpp') diff --git a/libopie2/opiepim/core/ocontactaccess.cpp b/libopie2/opiepim/core/ocontactaccess.cpp index f67a40c..c12e138 100644 --- a/libopie2/opiepim/core/ocontactaccess.cpp +++ b/libopie2/opiepim/core/ocontactaccess.cpp @@ -55,20 +55,20 @@ namespace Opie { -OContactAccess::OContactAccess ( const QString appname, const QString , - OContactAccessBackend* end, bool autosync ): - OPimAccessTemplate( end ) +OPimContactAccess::OPimContactAccess ( const QString appname, const QString , + OPimContactAccessBackend* end, bool autosync ): + OPimAccessTemplate( end ) { /* take care of the backend. If there is no one defined, we * will use the XML-Backend as default (until we have a cute SQL-Backend..). */ if( end == 0 ) { qWarning ("Using BackendFactory !"); - end = OBackendFactory::Default( "contact", appname ); + end = OBackendFactory::Default( "contact", appname ); } // Set backend locally and in template m_backEnd = end; - OPimAccessTemplate::setBackEnd (end); + OPimAccessTemplate::setBackEnd (end); /* Connect signal of external db change to function */ @@ -83,7 +83,7 @@ OContactAccess::OContactAccess ( const QString appname, const QString , } -OContactAccess::~OContactAccess () +OPimContactAccess::~OPimContactAccess () { /* The user may forget to save the changed database, therefore try to * do it for him.. @@ -93,16 +93,16 @@ OContactAccess::~OContactAccess () } -bool OContactAccess::save () +bool OPimContactAccess::save () { /* If the database was changed externally, we could not save the * Data. This will remove added items which is unacceptable ! * Therefore: Reload database and merge the data... */ - if ( OPimAccessTemplate::wasChangedExternally() ) + if ( OPimAccessTemplate::wasChangedExternally() ) reload(); - bool status = OPimAccessTemplate::save(); + bool status = OPimAccessTemplate::save(); if ( !status ) return false; /* Now tell everyone that new data is available. @@ -112,38 +112,38 @@ bool OContactAccess::save () return true; } -const uint OContactAccess::querySettings() +const uint OPimContactAccess::querySettings() { return ( m_backEnd->querySettings() ); } -bool OContactAccess::hasQuerySettings ( int querySettings ) const +bool OPimContactAccess::hasQuerySettings ( int querySettings ) const { return ( m_backEnd->hasQuerySettings ( querySettings ) ); } -ORecordList OContactAccess::sorted( bool ascending, int sortOrder, int sortFilter, int cat ) const +OPimRecordList OPimContactAccess::sorted( bool ascending, int sortOrder, int sortFilter, int cat ) const { QArray matchingContacts = m_backEnd -> sorted( ascending, sortOrder, sortFilter, cat ); - return ( ORecordList(matchingContacts, this) ); + return ( OPimRecordList(matchingContacts, this) ); } -bool OContactAccess::wasChangedExternally()const +bool OPimContactAccess::wasChangedExternally()const { return ( m_backEnd->wasChangedExternally() ); } -void OContactAccess::copMessage( const QCString &msg, const QByteArray & ) +void OPimContactAccess::copMessage( const QCString &msg, const QByteArray & ) { if ( msg == "addressbookUpdated()" ){ - qWarning ("OContactAccess: Received addressbokUpdated()"); + qWarning ("OPimContactAccess: Received addressbokUpdated()"); emit signalChanged ( this ); } else if ( msg == "flush()" ) { - qWarning ("OContactAccess: Received flush()"); + qWarning ("OPimContactAccess: Received flush()"); save (); } else if ( msg == "reload()" ) { - qWarning ("OContactAccess: Received reload()"); + qWarning ("OPimContactAccess: Received reload()"); reload (); emit signalChanged ( this ); } -- cgit v0.9.0.2