summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/core/opimresolver.h
Unidiff
Diffstat (limited to 'libopie2/opiepim/core/opimresolver.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/core/opimresolver.h33
1 files changed, 32 insertions, 1 deletions
diff --git a/libopie2/opiepim/core/opimresolver.h b/libopie2/opiepim/core/opimresolver.h
index 1ce1619..adc7c16 100644
--- a/libopie2/opiepim/core/opimresolver.h
+++ b/libopie2/opiepim/core/opimresolver.h
@@ -1,32 +1,61 @@
1/*
2 This file is part of the Opie Project
3 Copyright (C) The Main Author <main-author@whereever.org>
4 =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
5 .=l.
6 .>+-=
7 _;:, .> :=|. This program is free software; you can
8.> <`_, > . <= redistribute it and/or modify it under
9:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
10.="- .-=="i, .._ License as published by the Free Software
11 - . .-<_> .<> Foundation; either version 2 of the License,
12 ._= =} : or (at your option) any later version.
13 .%`+i> _;_.
14 .i_,=:_. -<s. This program is distributed in the hope that
15 + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
16 : .. .:, . . . without even the implied warranty of
17 =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
18 _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
19..}^=.= = ; Library General Public License for more
20++= -. .` .: details.
21 : = ...= . :.=-
22 -. .:....=;==+<; You should have received a copy of the GNU
23 -_. . . )=. = Library General Public License along with
24 -- :-=` this library; see the file COPYING.LIB.
25 If not, write to the Free Software Foundation,
26 Inc., 59 Temple Place - Suite 330,
27 Boston, MA 02111-1307, USA.
28*/
1#ifndef OPIE_PIM_RESOLVER 29#ifndef OPIE_PIM_RESOLVER
2#define OPIE_PIM_RESOLVER 30#define OPIE_PIM_RESOLVER
3 31
4#include <qstring.h> 32#include <qstring.h>
5#include <qvaluelist.h> 33#include <qvaluelist.h>
6 34
7#include <opie/otemplatebase.h> 35#include <opie2/otemplatebase.h>
8 36
37namespace Opie {
9/** 38/**
10 * OPimResolver is a MetaClass to access 39 * OPimResolver is a MetaClass to access
11 * available backends read only. 40 * available backends read only.
12 * It will be used to resolve uids + app names 41 * It will be used to resolve uids + app names
13 * to full informations 42 * to full informations
14 * to traverse through a list of alarms, reminders 43 * to traverse through a list of alarms, reminders
15 * to get access to built in PIM functionality 44 * to get access to built in PIM functionality
16 * and to more stuff 45 * and to more stuff
17 * THE PERFORMANCE will depend on THE BACKEND 46 * THE PERFORMANCE will depend on THE BACKEND
18 * USING XML is a waste of memory!!!!! 47 * USING XML is a waste of memory!!!!!
19 */ 48 */
20class OPimResolver { 49class OPimResolver {
21public: 50public:
22 enum BuiltIn { TodoList = 0, 51 enum BuiltIn { TodoList = 0,
23 DateBook, 52 DateBook,
24 AddressBook 53 AddressBook
25 }; 54 };
26 static OPimResolver* self(); 55 static OPimResolver* self();
27 56
28 57
29 /** 58 /**
30 * return a record for a uid 59 * return a record for a uid
31 * and an service 60 * and an service
32 * You've THE OWNERSHIP NOW! 61 * You've THE OWNERSHIP NOW!
@@ -66,25 +95,27 @@ public:
66 OPimRecord* record( const QString& service ); 95 OPimRecord* record( const QString& service );
67 OPimRecord* record( int rtti ); 96 OPimRecord* record( int rtti );
68 97
69 /** 98 /**
70 * you can cast to your 99 * you can cast to your
71 */ 100 */
72 OPimBase* backend( const QString& service ); 101 OPimBase* backend( const QString& service );
73 OPimBase* backend( int rtti ); 102 OPimBase* backend( int rtti );
74private: 103private:
75 OPimResolver(); 104 OPimResolver();
76 void loadData(); 105 void loadData();
77 inline bool isBuiltIn( const QString& )const; 106 inline bool isBuiltIn( const QString& )const;
78 OPimRecord* recordExtern( const QString&, int ); 107 OPimRecord* recordExtern( const QString&, int );
79 OPimRecord* recordExtern( const QString& ); 108 OPimRecord* recordExtern( const QString& );
80 109
81 static OPimResolver* m_self; 110 static OPimResolver* m_self;
82 struct Data; 111 struct Data;
83 class Private; 112 class Private;
84 113
85 Data* data; 114 Data* data;
86 Private* d; 115 Private* d;
87 QStringList m_builtIns; 116 QStringList m_builtIns;
88}; 117};
89 118
119}
120
90#endif 121#endif