author | zecke <zecke> | 2002-12-10 17:01:18 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-12-10 17:01:18 (UTC) |
commit | 4ecbf7407c19b59fc136c334f9386c53db453930 (patch) (unidiff) | |
tree | 1cba438e2533f7109af169b0b77988cec6664192 /libopie/pim/opimresolver.h | |
parent | 36375df6ff103e52455823f7afd64c4f4ae7fcb8 (diff) | |
download | opie-4ecbf7407c19b59fc136c334f9386c53db453930.zip opie-4ecbf7407c19b59fc136c334f9386c53db453930.tar.gz opie-4ecbf7407c19b59fc136c334f9386c53db453930.tar.bz2 |
get in sync with HEAD again
-OPimBase was added to be used as a default struct inside OPimResolver
and to work with DSOs
-TodoListXML backend now uses mmap and madvise to load data
-OContact added/changed rtti
-OTodo added changed rtti
OPimAccess* added stuff necessary for the Resolver and a 'state'/'hint'
on how to load data
OPimResolver which resolves uid + services to Records, rtti to QCOPChannels
loads arbitary Service backends ( will work with DSOs soon )
-OPimMainWindow added some setDocument scripting possibility and
internal marshalling and demarshalling of Records
-OPimRecord added loadDataFromm and saveDataTo for marshalling purposes
much more :)
-rw-r--r-- | libopie/pim/opimresolver.h | 52 |
1 files changed, 43 insertions, 9 deletions
diff --git a/libopie/pim/opimresolver.h b/libopie/pim/opimresolver.h index 86ae3eb..1ce1619 100644 --- a/libopie/pim/opimresolver.h +++ b/libopie/pim/opimresolver.h | |||
@@ -4,6 +4,8 @@ | |||
4 | #include <qstring.h> | 4 | #include <qstring.h> |
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 |
9 | * available backends read only. | 11 | * available backends read only. |
@@ -15,7 +17,7 @@ | |||
15 | * THE PERFORMANCE will depend on THE BACKEND | 17 | * THE PERFORMANCE will depend on THE BACKEND |
16 | * USING XML is a waste of memory!!!!! | 18 | * USING XML is a waste of memory!!!!! |
17 | */ | 19 | */ |
18 | class OPimResolver : public QObject { | 20 | class OPimResolver { |
19 | public: | 21 | public: |
20 | enum BuiltIn { TodoList = 0, | 22 | enum BuiltIn { TodoList = 0, |
21 | DateBook, | 23 | DateBook, |
@@ -24,33 +26,65 @@ public: | |||
24 | static OPimResolver* self(); | 26 | static OPimResolver* self(); |
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 | /** |
34 | * return the QCopChannel for service | 37 | * return the QCopChannel for service |
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 | /** |
41 | * return a list of available services | 50 | * return a list of available services |
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... ;) |
47 | */ | 57 | */ |
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 ); | ||
50 | private: | 74 | private: |
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 |