X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=include%2Fboard.h;h=bf9eb0924c8863ba7677321167d4801604e2f9cf;hb=59a5414ec47a2932a7802fcd1d98c4d80166564f;hp=2230f001f77881a1977132664c5a6924a4adf9ea;hpb=6b896a9e1dc143bba86795be1e9336549db9b85f;p=fms.git diff --git a/include/board.h b/include/board.h index 2230f00..bf9eb09 100644 --- a/include/board.h +++ b/include/board.h @@ -1,38 +1,45 @@ #ifndef _board_ #define _board_ -#include "datetime.h" #include "ilogger.h" #include "idatabase.h" #include +#include class Board:public ILogger,public IDatabase { public: - Board(); - Board(const long boardid); - Board(const std::string &boardname); + Board(SQLite3DB::DB *db); + Board(SQLite3DB::DB *db, const long boardid); + Board(SQLite3DB::DB *db, const std::string &boardname); + Board(SQLite3DB::DB *db, const long boardid, const std::string &boardname, const std::string &boarddescription, const std::string datecreated, const long lowmessageid, const long highmessageid, const long messagecount, const bool savereceivedmessages, const std::string &addedmethod); const bool Load(const long boardid); const bool Load(const std::string &boardname); - const long GetBoardID() const { return m_boardid; } - std::string GetBoardName() const { return m_boardname; } - std::string GetBoardDescription() const { return m_boarddescription; } - DateTime GetDateCreated() const { return m_datecreated; } - const long GetLowMessageID() const { return m_lowmessageid; } - const long GetHighMessageID() const { return m_highmessageid; } - const long GetMessageCount() const { return m_messagecount; } + const long GetBoardID() const { return m_boardid; } + std::string GetBoardName() const { return m_boardname; } + std::string GetBoardDescription() const { return m_boarddescription; } + Poco::DateTime GetDateCreated() const { return m_datecreated; } + const long GetLowMessageID() const { return m_lowmessageid; } + const long GetHighMessageID() const { return m_highmessageid; } + const long GetMessageCount() const { return m_messagecount; } + const bool GetSaveReceivedMessages() const { return m_savereceivedmessages; } + std::string GetAddedMethod() const { return m_addedmethod; } private: + void SetDateFromString(const std::string &datestring); + long m_boardid; std::string m_boardname; std::string m_boarddescription; - DateTime m_datecreated; + Poco::DateTime m_datecreated; long m_lowmessageid; // lowest id of all message currently in this board long m_highmessageid; // highest id of all message currently in this board long m_messagecount; // number of messages in this board + bool m_savereceivedmessages; + std::string m_addedmethod; }; -#endif _board_ +#endif // _board_