summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/core
Side-by-side diff
Diffstat (limited to 'libopie2/opiepim/core') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/core/ocontactaccess.cpp2
-rw-r--r--libopie2/opiepim/core/odatebookaccess.cpp2
-rw-r--r--libopie2/opiepim/core/opimaccessfactory.h2
-rw-r--r--libopie2/opiepim/core/otodoaccess.cpp2
4 files changed, 4 insertions, 4 deletions
diff --git a/libopie2/opiepim/core/ocontactaccess.cpp b/libopie2/opiepim/core/ocontactaccess.cpp
index 67f267f..417a954 100644
--- a/libopie2/opiepim/core/ocontactaccess.cpp
+++ b/libopie2/opiepim/core/ocontactaccess.cpp
@@ -44,49 +44,49 @@
#include <qcopchannel_qws.h>
//#include <qpe/qcopenvelope_qws.h>
#include <qpe/global.h>
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <opie2/ocontactaccessbackend_xml.h>
#include <opie2/opimresolver.h>
namespace Opie {
OPimContactAccess::OPimContactAccess ( const QString appname, const QString ,
OPimContactAccessBackend* end, bool autosync ):
OPimAccessTemplate<OPimContact>( 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<OPimContactAccessBackend>::Default( "contact", appname );
+ end = OBackendFactory<OPimContactAccessBackend>::defaultBackend( "contact", appname );
}
// Set backend locally and in template
m_backEnd = end;
OPimAccessTemplate<OPimContact>::setBackEnd (end);
/* Connect signal of external db change to function */
QCopChannel *dbchannel = new QCopChannel( "QPE/PIM", this );
connect( dbchannel, SIGNAL(received(const QCString&,const QByteArray&)),
this, SLOT(copMessage(const QCString&,const QByteArray&)) );
if ( autosync ){
QCopChannel *syncchannel = new QCopChannel( "QPE/Sync", this );
connect( syncchannel, SIGNAL(received(const QCString&,const QByteArray&)),
this, SLOT(copMessage(const QCString&,const QByteArray&)) );
}
}
OPimContactAccess::~OPimContactAccess ()
{
/* The user may forget to save the changed database, therefore try to
* do it for him..
*/
save();
diff --git a/libopie2/opiepim/core/odatebookaccess.cpp b/libopie2/opiepim/core/odatebookaccess.cpp
index 29298ea..5f471cf 100644
--- a/libopie2/opiepim/core/odatebookaccess.cpp
+++ b/libopie2/opiepim/core/odatebookaccess.cpp
@@ -21,49 +21,49 @@
: = ...= . :.=-
-. .:....=;==+<; You should have received a copy of the GNU
-_. . . )=. = Library General Public License along with
-- :-=` this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include <opie2/obackendfactory.h>
#include <opie2/odatebookaccess.h>
#include <opie2/opimresolver.h>
namespace Opie {
/**
* Simple constructor
* It takes a ODateBookAccessBackend as parent. If it is 0 the default implementation
* will be used!
* @param back The backend to be used or 0 for the default backend
* @param ac What kind of access is intended
*/
ODateBookAccess::ODateBookAccess( ODateBookAccessBackend* back, enum Access ac )
: OPimAccessTemplate<OPimEvent>( back )
{
if (!back )
- back = OBackendFactory<ODateBookAccessBackend>::Default("datebook", QString::null );
+ back = OBackendFactory<ODateBookAccessBackend>::defaultBackend("datebook", QString::null );
m_backEnd = back;
setBackEnd( m_backEnd );
}
ODateBookAccess::~ODateBookAccess() {
}
/**
* @return all events available
*/
ODateBookAccess::List ODateBookAccess::rawEvents()const {
QArray<int> ints = m_backEnd->rawEvents();
List lis( ints, this );
return lis;
}
/**
* @return all repeating events
*/
ODateBookAccess::List ODateBookAccess::rawRepeats()const {
QArray<int> ints = m_backEnd->rawRepeats();
List lis( ints, this );
diff --git a/libopie2/opiepim/core/opimaccessfactory.h b/libopie2/opiepim/core/opimaccessfactory.h
index 7d32958..6aaa5e4 100644
--- a/libopie2/opiepim/core/opimaccessfactory.h
+++ b/libopie2/opiepim/core/opimaccessfactory.h
@@ -83,35 +83,35 @@ class OPimAccessFactory
case OPimGlobal::TODOLIST:
return dynamic_cast<T*>( new OPimTodoAccess( OBackendFactory<OPimTodoAccessBackend>::create( type, dbStyle, appName ) ) );
case OPimGlobal::CONTACTLIST:
return dynamic_cast<T*>( new OPimContactAccess( QString::null, QString::null, OBackendFactory<OPimContactAccessBackend>::create( type, dbStyle, appName ) ) );
case OPimGlobal::DATEBOOK:
return dynamic_cast<T*>( new ODateBookAccess( OBackendFactory<ODateBookAccessBackend>::create( type, dbStyle, appName ) ) );
default:
return 0l;
}
}
/**
* Returns the selected PIM access-object, using the default database style
* Which style is selected is defined in the configfile "pimaccess.conf" in
* the directory "Settings"
* @param type Type of the selected database (addressbook, todolist or datebook)
* @param appName "Name" of your application. This should be any constant string which is used
* by some backends for creating special files (i.e.journal files). Please keep the
* string unique for your application !
* @see OPimGlobal
*
*/
- static T* Default( typename OPimGlobal::PimType type, const QString& appName ){
+ static T* defaultAccess( typename OPimGlobal::PimType type, const QString& appName ){
return create( type, OPimGlobal::DEFAULT, appName );
}
};
}
#endif
diff --git a/libopie2/opiepim/core/otodoaccess.cpp b/libopie2/opiepim/core/otodoaccess.cpp
index 6fa0089..87a211f 100644
--- a/libopie2/opiepim/core/otodoaccess.cpp
+++ b/libopie2/opiepim/core/otodoaccess.cpp
@@ -23,49 +23,49 @@
-_. . . )=. = Library General Public License along with
-- :-=` this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include <qdatetime.h>
#include <qpe/alarmserver.h>
// #include "otodoaccesssql.h"
#include <opie2/otodoaccess.h>
#include <opie2/obackendfactory.h>
#include <opie2/opimresolver.h>
namespace Opie {
OPimTodoAccess::OPimTodoAccess( OPimTodoAccessBackend* end, enum Access )
: QObject(), OPimAccessTemplate<OPimTodo>( end ), m_todoBackEnd( end )
{
// if (end == 0l )
// m_todoBackEnd = new OPimTodoAccessBackendSQL( QString::null);
// Zecke: Du musst hier noch fr das XML-Backend einen Appnamen bergeben !
if (end == 0l )
- m_todoBackEnd = OBackendFactory<OPimTodoAccessBackend>::Default ("todo", QString::null);
+ m_todoBackEnd = OBackendFactory<OPimTodoAccessBackend>::defaultBackend ("todo", QString::null);
setBackEnd( m_todoBackEnd );
}
OPimTodoAccess::~OPimTodoAccess() {
// qWarning("~OPimTodoAccess");
}
void OPimTodoAccess::mergeWith( const QValueList<OPimTodo>& list ) {
QValueList<OPimTodo>::ConstIterator it;
for ( it = list.begin(); it != list.end(); ++it ) {
replace( (*it) );
}
}
OPimTodoAccess::List OPimTodoAccess::effectiveToDos( const QDate& start,
const QDate& end,
bool includeNoDates ) {
QArray<int> ints = m_todoBackEnd->effectiveToDos( start, end, includeNoDates );
List lis( ints, this );
return lis;
}
OPimTodoAccess::List OPimTodoAccess::effectiveToDos( const QDate& start,
bool includeNoDates ) {
return effectiveToDos( start, QDate::currentDate(),
includeNoDates );