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.h52
1 files changed, 43 insertions, 9 deletions
diff --git a/libopie2/opiepim/core/opimresolver.h b/libopie2/opiepim/core/opimresolver.h
index 86ae3eb..1ce1619 100644
--- a/libopie2/opiepim/core/opimresolver.h
+++ b/libopie2/opiepim/core/opimresolver.h
@@ -5,4 +5,6 @@
5#include <qvaluelist.h> 5#include <qvaluelist.h>
6 6
7#include <opie/otemplatebase.h>
8
7/** 9/**
8 * OPimResolver is a MetaClass to access 10 * OPimResolver is a MetaClass to access
@@ -16,5 +18,5 @@
16 * USING XML is a waste of memory!!!!! 18 * USING XML is a waste of memory!!!!!
17 */ 19 */
18class OPimResolver : public QObject { 20class OPimResolver {
19public: 21public:
20 enum BuiltIn { TodoList = 0, 22 enum BuiltIn { TodoList = 0,
@@ -25,9 +27,10 @@ public:
25 27
26 28
27 /* 29 /**
28 * return a record for a uid 30 * return a record for a uid
29 * and an app 31 * and an service
32 * You've THE OWNERSHIP NOW!
30 */ 33 */
31 OPimRecord &record( const QString& service, int uid ); 34 OPimRecord *record( const QString& service, int uid );
32 35
33 /** 36 /**
@@ -35,6 +38,12 @@ public:
35 * When we will use Qtopia Services it will be used here 38 * When we will use Qtopia Services it will be used here
36 */ 39 */
37 QString qcopChannel( enum BuiltIn& )const; 40 QCString qcopChannel( enum BuiltIn& )const;
38 QString qcopChannel( const QString& service ); 41 QCString qcopChannel( const QString& service )const;
42
43 /**
44 * The Application channel (QPE/Application/name)
45 */
46 QCString applicationChannel( enum BuiltIn& )const;
47 QCString applicationChannel( const QString& service )const;
39 48
40 /** 49 /**
@@ -42,5 +51,6 @@ public:
42 */ 51 */
43 QStringList services()const; 52 QStringList services()const;
44 53 inline QString serviceName(int rrti )const;
54 int serviceId( const QString& Service);
45 /** 55 /**
46 * add a record to a service... ;) 56 * add a record to a service... ;)
@@ -48,9 +58,33 @@ public:
48 bool add( const QString& service, const OPimRecord& ); 58 bool add( const QString& service, const OPimRecord& );
49 59
60
61 /**
62 * record returns an empty record for a given service.
63 * Be sure to delete it!!!
64 *
65 */
66 OPimRecord* record( const QString& service );
67 OPimRecord* record( int rtti );
68
69 /**
70 * you can cast to your
71 */
72 OPimBase* backend( const QString& service );
73 OPimBase* backend( int rtti );
50private: 74private:
51 OPimResolver(); 75 OPimResolver();
52 OPimRecord *m_last; 76 void loadData();
77 inline bool isBuiltIn( const QString& )const;
78 OPimRecord* recordExtern( const QString&, int );
79 OPimRecord* recordExtern( const QString& );
80
81 static OPimResolver* m_self;
82 struct Data;
83 class Private;
53 84
54}: 85 Data* data;
86 Private* d;
87 QStringList m_builtIns;
88};
55 89
56#endif 90#endif