Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added neccessary stubs to classes ServiceProviderStorage and

EmailServiceProviderStorage.
  • Loading branch information...
commit 64780a85ef68195e6a59f7d95843f1176a82108f 1 parent b8292f9
@dezelin authored
View
24 src/app/emailserviceproviderstorage.cpp
@@ -16,6 +16,9 @@
*/
#include "emailserviceproviderstorage.h"
+#include "store.h"
+
+#include <QScopedPointer>
namespace Maily
{
@@ -24,8 +27,25 @@ namespace Services
namespace Storage
{
-EmailServiceProviderStorage::EmailServiceProviderStorage(QObject *parent) :
- ServiceProviderStorage(parent)
+class EmailServiceProviderStoragePrivate
+{
+public:
+ EmailServiceProviderStoragePrivate(Store *d) :
+ data(d)
+ {
+ }
+
+ QScopedPointer<Store> data;
+};
+
+EmailServiceProviderStorage::EmailServiceProviderStorage(QObject *parent,
+ Store *meta, Store *account, Store *data) :
+ ServiceProviderStorage(parent, meta, account),
+ d_ptr(new EmailServiceProviderStoragePrivate(data))
+{
+}
+
+EmailServiceProviderStorage::~EmailServiceProviderStorage()
{
}
View
14 src/app/emailserviceproviderstorage.h
@@ -19,6 +19,9 @@
#define EMAILSERVICEPROVIDERSTORAGE_H
#include "serviceproviderstorage.h"
+#include "store.h"
+
+#include <QScopedPointer>
namespace Maily
{
@@ -27,16 +30,23 @@ namespace Services
namespace Storage
{
+class EmailServiceProviderStoragePrivate;
class EmailServiceProviderStorage : public ServiceProviderStorage
{
Q_OBJECT
public:
- explicit EmailServiceProviderStorage(QObject *parent = 0);
+ explicit EmailServiceProviderStorage(QObject *parent, Store *meta,
+ Store *account, Store *data);
+ virtual ~EmailServiceProviderStorage();
signals:
public slots:
-
+
+private:
+ Q_DISABLE_COPY(EmailServiceProviderStorage)
+ Q_DECLARE_PRIVATE(EmailServiceProviderStorage)
+ QScopedPointer<EmailServiceProviderStoragePrivate> d_ptr;
};
} // namespace Storage
View
55 src/app/serviceproviderstorage.cpp
@@ -16,6 +16,7 @@
*/
#include "serviceproviderstorage.h"
+#include "store.h"
namespace Maily
{
@@ -24,9 +25,59 @@ namespace Services
namespace Storage
{
-ServiceProviderStorage::ServiceProviderStorage(QObject *parent) :
- QObject(parent)
+class ServiceProviderStoragePrivate
{
+public:
+ ServiceProviderStoragePrivate(Store *m, Store *a) :
+ meta(m), account(a)
+ {
+ }
+
+ QScopedPointer<Store> meta;
+ QScopedPointer<Store> account;
+};
+
+ServiceProviderStorage::ServiceProviderStorage(QObject *parent, Store *meta,
+ Store *account) :
+ QObject(parent),
+ d_ptr(new ServiceProviderStoragePrivate(meta, account))
+{
+}
+
+ServiceProviderStorage::~ServiceProviderStorage()
+{
+}
+
+bool ServiceProviderStorage::close()
+{
+}
+
+bool ServiceProviderStorage::open()
+{
+}
+
+bool ServiceProviderStorage::remove()
+{
+}
+
+bool ServiceProviderStorage::upgrade()
+{
+}
+
+int ServiceProviderStorage::version() const
+{
+ Q_D(const ServiceProviderStorage);
+ return d->meta->version();
+}
+
+ServiceProviderInfo *ServiceProviderStorage::getProviderInfo() const
+{
+}
+
+bool ServiceProviderStorage::isOpened() const
+{
+ Q_D(const ServiceProviderStorage);
+ return d->meta->isOpened() && d->account->isOpened();
}
} // namespace Storage
View
24 src/app/serviceproviderstorage.h
@@ -18,7 +18,11 @@
#ifndef SERVICEPROVIDERSTORAGE_H
#define SERVICEPROVIDERSTORAGE_H
+#include "serviceproviderinfo.h"
+#include "store.h"
+
#include <QObject>
+#include <QScopedPointer>
namespace Maily
{
@@ -27,16 +31,32 @@ namespace Services
namespace Storage
{
+class ServiceProviderStoragePrivate;
class ServiceProviderStorage : public QObject
{
Q_OBJECT
+
public:
- explicit ServiceProviderStorage(QObject *parent = 0);
+ explicit ServiceProviderStorage(QObject *parent, Store *meta, Store *account);
+ virtual ~ServiceProviderStorage();
+
+ virtual bool close();
+ virtual bool open();
+ virtual bool remove();
+ virtual bool upgrade();
+ virtual int version() const;
+
+ virtual ServiceProviderInfo* getProviderInfo() const;
+ virtual bool isOpened() const;
signals:
public slots:
-
+
+private:
+ Q_DISABLE_COPY(ServiceProviderStorage)
+ Q_DECLARE_PRIVATE(ServiceProviderStorage)
+ QScopedPointer<ServiceProviderStoragePrivate> d_ptr;
};
} // namespace Storage
View
2  src/app/serviceproviderstoragefactory.cpp
@@ -31,7 +31,7 @@ ServiceProviderStorageFactory::ServiceProviderStorageFactory()
ServiceProviderStorage *ServiceProviderStorageFactory::createEmailStorage()
{
- return new EmailServiceProviderStorage();
+ return new EmailServiceProviderStorage(0, 0, 0, 0);
}
} // namespace Storage
Please sign in to comment.
Something went wrong with that request. Please try again.