From e150dfd5151aa59eb373aa58df5d9644c6c65b52 Mon Sep 17 00:00:00 2001 From: zecke Date: Wed, 07 May 2003 15:26:59 +0000 Subject: Make it possible to see what a backend supports --- (limited to 'libopie2/opiepim/core') diff --git a/libopie2/opiepim/core/otodoaccess.cpp b/libopie2/opiepim/core/otodoaccess.cpp index 5e89a1b..37f6fbc 100644 --- a/libopie2/opiepim/core/otodoaccess.cpp +++ b/libopie2/opiepim/core/otodoaccess.cpp @@ -54,3 +54,9 @@ OTodoAccess::List OTodoAccess::sorted( bool ascending, int sort,int filter, int void OTodoAccess::removeAllCompleted() { m_todoBackEnd->removeAllCompleted(); } +QBitArray OTodoAccess::backendSupport( const QString& ) const{ + return m_todoBackEnd->supports(); +} +bool OTodoAccess::backendSupports( int attr, const QString& ar) const{ + return backendSupport(ar).testBit( attr ); +} diff --git a/libopie2/opiepim/core/otodoaccess.h b/libopie2/opiepim/core/otodoaccess.h index a626731..916923f 100644 --- a/libopie2/opiepim/core/otodoaccess.h +++ b/libopie2/opiepim/core/otodoaccess.h @@ -72,6 +72,21 @@ public: */ void removeAllCompleted(); + /** + * request information about what a backend supports. + * Supports in the sense of beeing able to store. + * This is related to the enum in OTodo + * + * @param backend Will be used in the future when we support multiple backend + */ + QBitArray backendSupport( const QString& backend = QString::null )const; + + /** + * see above but for a specefic attribute. This method was added for convience + * @param attr The attribute to be queried for + * @param backend Will be used in the future when we support multiple backends + */ + bool backendSupports( int attr, const QString& backend = QString::null )const; signals: /** * if the OTodoAccess was changed -- cgit v0.9.0.2