KissCount/model/Database.h

33 lines
517 B
C
Raw Normal View History

#ifndef DATABASE_H
#define DATABASE_H
2010-05-15 11:21:42 +02:00
#include <stdio.h>
#include <fstream>
#include <list>
#include <wx/wxsqlite3.h>
#include <wx/wx.h>
#include <sha1.h>
2010-05-15 11:21:42 +02:00
#include "model.h"
#define BDD_FILE "kc.bdd"
#define INIT_SCRIPT "init.sql"
class Database
{
public:
Database();
std::list<wxString> GetUsers();
bool IsValidUser(wxString user, wxString password);
2010-05-15 11:21:42 +02:00
User* LoadUser(wxString name);
2010-05-16 10:35:34 +02:00
void LoadYear(User* user, int year);
private:
wxSQLite3Database _db;
void CreateDatabase();
};
#endif