6 #include <QtSql/QSqlDatabase>
7 #include <QtSql/QSqlError>
11 #include "coordinates/geocoordinate.h"
14 class Database : public QObject
18 Database(QObject *parent = 0);
21 bool addTag(qulonglong userId, const QString &tag);
22 QByteArray getNotifications(qulonglong userId);
23 QHash<QString, QString> getTags(qulonglong userId);
24 QByteArray getInterestingPeople(qulonglong userId,
25 const GeoCoordinate &southWestCoordinates,
26 const GeoCoordinate &northEastCoordinates);
28 bool createNotificationTable();
29 bool createTagTable();
30 bool createUserTagTable();
31 bool createUserTable();
33 bool removeTags(qulonglong userId, const QStringList &tags);
34 bool sendMessage(qulonglong senderId, qulonglong receiverId, const QString &message);
37 QSqlDatabase m_database;
38 QList<Message*> m_notifications;