Modified the license text comment type.
[emufront] / src / db / databasemanager.h
index 0d6f16d..84705b5 100644 (file)
@@ -1,28 +1,28 @@
-// EmuFront
-// Copyright 2010 Mikko Keinänen
-//
-// This file is part of EmuFront.
-//
-//
-// EmuFront is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License version 2 as published by
-// the Free Software Foundation and appearing in the file gpl.txt included in the
-// packaging of this file.
-//
-// EmuFront is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with EmuFront.  If not, see <http://www.gnu.org/licenses/>.
-
-#ifndef DATABASEMANAGER_H
+/*
+** EmuFront
+** Copyright 2010 Mikko Keinänen
+**
+** This file is part of EmuFront.
+**
+**
+** EmuFront is free software: you can redistribute it and/or modify
+** it under the terms of the GNU General Public License version 2 as published by
+** the Free Software Foundation and appearing in the file gpl.txt included in the
+** packaging of this file.
+**
+** EmuFront is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with EmuFront.  If not, see <http://www.gnu.org/licenses/>.
+*/#ifndef DATABASEMANAGER_H
 #define DATABASEMANAGER_H
 
 #include <QObject>
 #include <QSqlDatabase>
-#include "../exceptions/emufrontexception.h"
+#include "emufrontexception.h"
 
 class QSqlError;
 class QFile;
@@ -43,6 +43,7 @@ public:
     virtual bool updateDataObjectToModel(const EmuFrontObject*) = 0;
     virtual int insertDataObjectToModel(const EmuFrontObject*) = 0;
     virtual bool deleteDataObjectFromModel(QModelIndex*) = 0;
+    virtual bool deleteDataObject(int id) const = 0;
     int countDataObjectRefs(int id) const;
     static int getCurrentTimeStamp();
     static bool openDB();
@@ -69,15 +70,13 @@ protected:
     static const QString DB_TABLE_MEDIAIMAGECONTAINER_MEDIAIMAGE;
     static const QString DB_TABLE_EXECUTABLE;
 
-
 private:
-       static const QString DB_FILENAME;
+    static const QString DB_FILENAME;
     static const QString DATABASE;
     virtual QSqlQueryModel* getData() = 0;
     static QString getDbPath();
     EmuFrontObject* getFilteredDataObject();
     virtual QString getCountRefsSelect(int) const = 0;
-
 };
 
 #endif