Diffstat (limited to 'libopie2/opiepim/core/opimresolver.h') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiepim/core/opimresolver.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libopie2/opiepim/core/opimresolver.h b/libopie2/opiepim/core/opimresolver.h index adc7c16..dd6f07f 100644 --- a/libopie2/opiepim/core/opimresolver.h +++ b/libopie2/opiepim/core/opimresolver.h @@ -13,53 +13,56 @@ .%`+i> _;_. .i_,=:_. -<s. This program is distributed in the hope that + . -:. = it will be useful, but WITHOUT ANY WARRANTY; : .. .:, . . . without even the implied warranty of =_ + =;=|` MERCHANTABILITY or FITNESS FOR A _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU ..}^=.= = ; Library General Public License for more ++= -. .` .: details. : = ...= . :.=- -. .:....=;==+<; 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. */ -#ifndef OPIE_PIM_RESOLVER -#define OPIE_PIM_RESOLVER +#ifndef OPIMRESOLVER_H +#define OPIMRESOLVER_H +/* OPIE */ +#include <opie2/otemplatebase.h> + +/* QT */ #include <qstring.h> #include <qvaluelist.h> -#include <opie2/otemplatebase.h> - namespace Opie { /** * OPimResolver is a MetaClass to access * available backends read only. * It will be used to resolve uids + app names * to full informations * to traverse through a list of alarms, reminders * to get access to built in PIM functionality * and to more stuff * THE PERFORMANCE will depend on THE BACKEND * USING XML is a waste of memory!!!!! */ class OPimResolver { + public: enum BuiltIn { TodoList = 0, DateBook, AddressBook }; static OPimResolver* self(); /** * return a record for a uid * and an service * You've THE OWNERSHIP NOW! */ OPimRecord *record( const QString& service, int uid ); /** @@ -87,32 +90,33 @@ public: bool add( const QString& service, const OPimRecord& ); /** * record returns an empty record for a given service. * Be sure to delete it!!! * */ OPimRecord* record( const QString& service ); OPimRecord* record( int rtti ); /** * you can cast to your */ OPimBase* backend( const QString& service ); OPimBase* backend( int rtti ); + private: OPimResolver(); void loadData(); inline bool isBuiltIn( const QString& )const; OPimRecord* recordExtern( const QString&, int ); OPimRecord* recordExtern( const QString& ); static OPimResolver* m_self; struct Data; class Private; Data* data; Private* d; QStringList m_builtIns; }; |