X-Git-Url: https://vaikene.ee/gitweb/pswgen09.html?a=blobdiff_plain;ds=inline;f=src%2Fapps%2FPswGen%2FStorage%2Fmodule.h;h=49c7e6a2f02a836198aee8c2b73cb1002ff86e71;hb=a81a943bee20df3c7eb34bafb3e3fe878facfe4e;hp=95b935f2926bec0e31793eba401d7d7668c4fbd4;hpb=d50faf159f17a66fb89ea3e7878b6f56e34b9e72;p=evaf
diff --git a/src/apps/PswGen/Storage/module.h b/src/apps/PswGen/Storage/module.h
index 95b935f..49c7e6a 100644
--- a/src/apps/PswGen/Storage/module.h
+++ b/src/apps/PswGen/Storage/module.h
@@ -3,7 +3,7 @@
* @brief Implementation of the iStorage interface
* @author Enar Vaikene
*
- * Copyright (c) 2011 Enar Vaikene
+ * Copyright (c) 2011-2012 Enar Vaikene
*
* This file is part of the eVaf C++ cross-platform application development framework.
*
@@ -21,6 +21,7 @@
# define __PSWGEN_STORAGE_MODULE_H
#include "istorage.h"
+#include "version.h"
#include
@@ -49,6 +50,7 @@ class Module : public Plugins::iPlugin
{
Q_OBJECT
Q_INTERFACES(eVaf::Plugins::iPlugin)
+ Q_PLUGIN_METADATA(IID VER_MODULE_NAME_STR)
public:
@@ -139,6 +141,16 @@ private: // Methods
*/
bool createTables();
+ /**
+ * Upgrades database tables if necessary
+ * @return True if ok; false if failed
+ *
+ * This function checks if database tables need to upgraded and
+ * performs the upgrade without a loss of data if possible.
+ * Returns false if upgrade is not possible or fails.
+ */
+ bool upgradeTables();
+
/**
* Loads data from the database
* @return True if ok; false if failed