-rw-r--r-- | libopie2/opiepim/backend/obackendfactory.h | 6 | ||||
-rw-r--r-- | libopie2/opiepim/core/opimaccessfactory.h | 22 |
2 files changed, 16 insertions, 12 deletions
diff --git a/libopie2/opiepim/backend/obackendfactory.h b/libopie2/opiepim/backend/obackendfactory.h index c8a4627..6f46652 100644 --- a/libopie2/opiepim/backend/obackendfactory.h +++ b/libopie2/opiepim/backend/obackendfactory.h | |||
@@ -69,3 +69,3 @@ class OBackendPrivate; | |||
69 | * <pre> | 69 | * <pre> |
70 | * OPimTodoAccessBackend* backend = OBackEndFactory<OPimTodoAccessBackend>::Default("todo", QString::null ); | 70 | * OPimTodoAccessBackend* backend = OBackEndFactory<OPimTodoAccessBackend>::Default( OPimGlobal::TODOLIST, QString::null ); |
71 | * backend->load(); | 71 | * backend->load(); |
@@ -88,2 +88,3 @@ class OBackendFactory | |||
88 | * @param filename Filename of the database file if you don't want to access the default | 88 | * @param filename Filename of the database file if you don't want to access the default |
89 | * @see OPimGlobal() | ||
89 | */ | 90 | */ |
@@ -167,3 +168,3 @@ class OBackendFactory | |||
167 | * @param type the type of the backend | 168 | * @param type the type of the backend |
168 | * @see OPimGlobal | 169 | * @see OPimGlobal() |
169 | */ | 170 | */ |
@@ -210,2 +211,3 @@ class OBackendFactory | |||
210 | * @param appName The name of your application. It will be passed on to the backend | 211 | * @param appName The name of your application. It will be passed on to the backend |
212 | * @see OPimGlobal() | ||
211 | */ | 213 | */ |
diff --git a/libopie2/opiepim/core/opimaccessfactory.h b/libopie2/opiepim/core/opimaccessfactory.h index ee55ba5..3cd448e 100644 --- a/libopie2/opiepim/core/opimaccessfactory.h +++ b/libopie2/opiepim/core/opimaccessfactory.h | |||
@@ -64,6 +64,2 @@ class OPimAccessFactory | |||
64 | public: | 64 | public: |
65 | |||
66 | // Maybe we should introduce a global class for storing such global enums | ||
67 | // (something like opimglobal.h) ? (eilers) | ||
68 | |||
69 | OPimAccessFactory() {}; | 65 | OPimAccessFactory() {}; |
@@ -77,5 +73,7 @@ class OPimAccessFactory | |||
77 | * string unique for your application ! | 73 | * string unique for your application ! |
78 | * @see OPimGlobal | 74 | * @param fileName Filename of database if something different as the default should be used. |
75 | * @see OPimGlobal() | ||
79 | */ | 76 | */ |
80 | static T* create( OPimGlobal::PimType type, OPimGlobal::DatabaseStyle dbStyle, const QString& appName ){ | 77 | static T* create( OPimGlobal::PimType type, OPimGlobal::DatabaseStyle dbStyle, const QString& appName, |
78 | const QString& fileName = QString::null ){ | ||
81 | OPimBase *base; | 79 | OPimBase *base; |
@@ -83,9 +81,13 @@ class OPimAccessFactory | |||
83 | case OPimGlobal::TODOLIST: | 81 | case OPimGlobal::TODOLIST: |
84 | base = new OPimTodoAccess( OBackendFactory<OPimTodoAccessBackend>::create( type, dbStyle, appName ) ); | 82 | base = new OPimTodoAccess( OBackendFactory<OPimTodoAccessBackend>::create( type, dbStyle, |
83 | appName, fileName ) ); | ||
85 | break; | 84 | break; |
86 | case OPimGlobal::CONTACTLIST: | 85 | case OPimGlobal::CONTACTLIST: |
87 | base = new OPimContactAccess( QString::null, QString::null, OBackendFactory<OPimContactAccessBackend>::create( type, dbStyle, appName ) ); | 86 | base = new OPimContactAccess( QString::null, QString::null, |
87 | OBackendFactory<OPimContactAccessBackend>::create( type, dbStyle, | ||
88 | appName, fileName ) ); | ||
88 | break; | 89 | break; |
89 | case OPimGlobal::DATEBOOK: | 90 | case OPimGlobal::DATEBOOK: |
90 | base = new ODateBookAccess( OBackendFactory<ODateBookAccessBackend>::create( type, dbStyle, appName ) ); | 91 | base = new ODateBookAccess( OBackendFactory<ODateBookAccessBackend>::create( type, dbStyle, |
92 | appName, fileName ) ); | ||
91 | break; | 93 | break; |
@@ -106,3 +108,3 @@ class OPimAccessFactory | |||
106 | * string unique for your application ! | 108 | * string unique for your application ! |
107 | * @see OPimGlobal | 109 | * @see OPimGlobal() |
108 | * | 110 | * |