3 @author: Sudheer K. <scifi1947 at gmail.com>
4 @license: GNU General Public License
7 #ifndef DATABASEUTILITY_H
8 #define DATABASEUTILITY_H
11 #include "vicarprofiletypes.h"
13 #include <QSqlDatabase>
15 class DatabaseUtility : public QObject
19 DatabaseUtility(QObject *parent = 0);
22 bool deleteDatabase();
24 bool tableExists(QString tableName);
26 QString getSetting(QString setting);
27 bool setSetting(QString setting, QString value);
28 int insertProfile(org::maemo::vicar::Profile profile);
29 bool updateProfile(org::maemo::vicar::Profile profile);
30 bool selectProfile(int id,org::maemo::vicar::Profile* profile);
31 bool getAllProfiles(org::maemo::vicar::ProfileList* profileList);
32 bool findProfileByNumber(QString number,org::maemo::vicar::Profile* profile);
33 bool getDefaultProfile(org::maemo::vicar::Profile* profile);
34 bool deleteProfile(int id);
35 QSqlError lastError();
41 #endif // DATABASEUTILITY_H