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);
25 bool createProfilesTable();
26 int insertProfile(org::maemo::vicar::Profile profile);
27 bool updateProfile(org::maemo::vicar::Profile profile);
28 bool selectProfile(int id,org::maemo::vicar::Profile* profile);
29 bool getAllProfiles(org::maemo::vicar::ProfileList* profileList);
30 bool findProfileByNumber(QString number,org::maemo::vicar::Profile* profile);
31 bool deleteProfile(int id);
32 QSqlError lastError();
35 QSqlDatabase profilesDB;
38 #endif // DATABASEUTILITY_H