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.h16
1 files changed, 10 insertions, 6 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
@@ -17,46 +17,49 @@
17 =_ + =;=|` MERCHANTABILITY or FITNESS FOR A 17 =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
18 _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU 18 _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
19..}^=.= = ; Library General Public License for more 19..}^=.= = ; Library General Public License for more
20++= -. .` .: details. 20++= -. .` .: details.
21 : = ...= . :.=- 21 : = ...= . :.=-
22 -. .:....=;==+<; You should have received a copy of the GNU 22 -. .:....=;==+<; You should have received a copy of the GNU
23 -_. . . )=. = Library General Public License along with 23 -_. . . )=. = Library General Public License along with
24 -- :-=` this library; see the file COPYING.LIB. 24 -- :-=` this library; see the file COPYING.LIB.
25 If not, write to the Free Software Foundation, 25 If not, write to the Free Software Foundation,
26 Inc., 59 Temple Place - Suite 330, 26 Inc., 59 Temple Place - Suite 330,
27 Boston, MA 02111-1307, USA. 27 Boston, MA 02111-1307, USA.
28*/ 28*/
29#ifndef OPIE_PIM_RESOLVER 29#ifndef OPIMRESOLVER_H
30#define OPIE_PIM_RESOLVER 30#define OPIMRESOLVER_H
31 31
32/* OPIE */
33#include <opie2/otemplatebase.h>
34
35/* QT */
32#include <qstring.h> 36#include <qstring.h>
33#include <qvaluelist.h> 37#include <qvaluelist.h>
34 38
35#include <opie2/otemplatebase.h>
36
37namespace Opie { 39namespace Opie {
38/** 40/**
39 * OPimResolver is a MetaClass to access 41 * OPimResolver is a MetaClass to access
40 * available backends read only. 42 * available backends read only.
41 * It will be used to resolve uids + app names 43 * It will be used to resolve uids + app names
42 * to full informations 44 * to full informations
43 * to traverse through a list of alarms, reminders 45 * to traverse through a list of alarms, reminders
44 * to get access to built in PIM functionality 46 * to get access to built in PIM functionality
45 * and to more stuff 47 * and to more stuff
46 * THE PERFORMANCE will depend on THE BACKEND 48 * THE PERFORMANCE will depend on THE BACKEND
47 * USING XML is a waste of memory!!!!! 49 * USING XML is a waste of memory!!!!!
48 */ 50 */
49class OPimResolver { 51class OPimResolver {
50public: 52
53 public:
51 enum BuiltIn { TodoList = 0, 54 enum BuiltIn { TodoList = 0,
52 DateBook, 55 DateBook,
53 AddressBook 56 AddressBook
54 }; 57 };
55 static OPimResolver* self(); 58 static OPimResolver* self();
56 59
57 60
58 /** 61 /**
59 * return a record for a uid 62 * return a record for a uid
60 * and an service 63 * and an service
61 * You've THE OWNERSHIP NOW! 64 * You've THE OWNERSHIP NOW!
62 */ 65 */
@@ -91,25 +94,26 @@ public:
91 * record returns an empty record for a given service. 94 * record returns an empty record for a given service.
92 * Be sure to delete it!!! 95 * Be sure to delete it!!!
93 * 96 *
94 */ 97 */
95 OPimRecord* record( const QString& service ); 98 OPimRecord* record( const QString& service );
96 OPimRecord* record( int rtti ); 99 OPimRecord* record( int rtti );
97 100
98 /** 101 /**
99 * you can cast to your 102 * you can cast to your
100 */ 103 */
101 OPimBase* backend( const QString& service ); 104 OPimBase* backend( const QString& service );
102 OPimBase* backend( int rtti ); 105 OPimBase* backend( int rtti );
103private: 106
107 private:
104 OPimResolver(); 108 OPimResolver();
105 void loadData(); 109 void loadData();
106 inline bool isBuiltIn( const QString& )const; 110 inline bool isBuiltIn( const QString& )const;
107 OPimRecord* recordExtern( const QString&, int ); 111 OPimRecord* recordExtern( const QString&, int );
108 OPimRecord* recordExtern( const QString& ); 112 OPimRecord* recordExtern( const QString& );
109 113
110 static OPimResolver* m_self; 114 static OPimResolver* m_self;
111 struct Data; 115 struct Data;
112 class Private; 116 class Private;
113 117
114 Data* data; 118 Data* data;
115 Private* d; 119 Private* d;