summaryrefslogtreecommitdiff
path: root/libopie/pim/opimresolver.h
authorzecke <zecke>2002-12-10 17:01:18 (UTC)
committer zecke <zecke>2002-12-10 17:01:18 (UTC)
commit4ecbf7407c19b59fc136c334f9386c53db453930 (patch) (side-by-side diff)
tree1cba438e2533f7109af169b0b77988cec6664192 /libopie/pim/opimresolver.h
parent36375df6ff103e52455823f7afd64c4f4ae7fcb8 (diff)
downloadopie-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 :)
Diffstat (limited to 'libopie/pim/opimresolver.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/pim/opimresolver.h52
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 @@
#include <qstring.h>
#include <qvaluelist.h>
+#include <opie/otemplatebase.h>
+
/**
* OPimResolver is a MetaClass to access
* available backends read only.
@@ -15,7 +17,7 @@
* THE PERFORMANCE will depend on THE BACKEND
* USING XML is a waste of memory!!!!!
*/
-class OPimResolver : public QObject {
+class OPimResolver {
public:
enum BuiltIn { TodoList = 0,
DateBook,
@@ -24,33 +26,65 @@ public:
static OPimResolver* self();
- /*
+ /**
* return a record for a uid
- * and an app
+ * and an service
+ * You've THE OWNERSHIP NOW!
*/
- OPimRecord &record( const QString& service, int uid );
+ OPimRecord *record( const QString& service, int uid );
/**
* return the QCopChannel for service
* When we will use Qtopia Services it will be used here
*/
- QString qcopChannel( enum BuiltIn& )const;
- QString qcopChannel( const QString& service );
+ QCString qcopChannel( enum BuiltIn& )const;
+ QCString qcopChannel( const QString& service )const;
+
+ /**
+ * The Application channel (QPE/Application/name)
+ */
+ QCString applicationChannel( enum BuiltIn& )const;
+ QCString applicationChannel( const QString& service )const;
/**
* return a list of available services
*/
QStringList services()const;
-
+ inline QString serviceName(int rrti )const;
+ int serviceId( const QString& Service);
/**
* add a record to a service... ;)
*/
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();
- OPimRecord *m_last;
+ 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;
+};
#endif