#ifndef KISSCOUNT_H #define KISSCOUNT_H #include #include #include #include #include class wxUI; class KissCount { public: KissCount(); ~KissCount(); std::list GetUsers(); bool IsValidUser(const wxString& user, const wxString& password); void LoadUser(const wxString& user); User* GetUser(); void ChangePassword(const wxString& password); bool UserExists(const wxString& name); void ChangeName(const wxString& name); void NewUser(const wxString& name); void LoadYear(int year, bool force=false); wxString AddOperation(Operation& op); void UpdateOperation(Operation& op); void DeleteOperation(Operation& op); void DeleteOperations(int month, int year); double GetAccountAmount(const wxString& id, int month, int year); void SetAccountAmount(int month, int year, const wxString& accountId, double value); wxString AddAccount(Account& ac); void UpdateAccount(Account& ac); void DeleteAccount(Account& ac); wxString AddCategory(Category& category); void UpdateCategory(Category& category); void DeleteCategory(Category& category); std::map > GetAllOperations(); void GenerateMonth(int monthFrom, int yearFrom, int monthTo, int yearTo); void KillMe(); private: wxUI* _wxUI; Database* _db; User* _user; }; #endif