*
*/
-#include <sstream>
-
#include "firebird_store.h"
-#include "ibpp.h"
+
+#include "stg/ibpp.h"
+#include "stg/message.h"
+#include "stg/common.h"
//-----------------------------------------------------------------------------
-int FIREBIRD_STORE::AddMessage(STG_MSG * msg, const string & login) const
+int FIREBIRD_STORE::AddMessage(STG::Message * msg, const std::string & login) const
{
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
IBPP::Statement st = IBPP::StatementFactory(db, tr);
return 0;
}
//-----------------------------------------------------------------------------
-int FIREBIRD_STORE::EditMessage(const STG_MSG & msg,
- const string & login) const
+int FIREBIRD_STORE::EditMessage(const STG::Message & msg,
+ const std::string & login) const
{
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
IBPP::Statement st = IBPP::StatementFactory(db, tr);
}
//-----------------------------------------------------------------------------
int FIREBIRD_STORE::GetMessage(uint64_t id,
- STG_MSG * msg,
- const string &) const
+ STG::Message * msg,
+ const std::string &) const
{
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amRead, til, tlr);
IBPP::Statement st = IBPP::StatementFactory(db, tr);
return 0;
}
//-----------------------------------------------------------------------------
-int FIREBIRD_STORE::DelMessage(uint64_t id, const string &) const
+int FIREBIRD_STORE::DelMessage(uint64_t id, const std::string &) const
{
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
IBPP::Statement st = IBPP::StatementFactory(db, tr);
return 0;
}
//-----------------------------------------------------------------------------
-int FIREBIRD_STORE::GetMessageHdrs(vector<STG_MSG_HDR> * hdrsList,
- const string & login) const
+int FIREBIRD_STORE::GetMessageHdrs(std::vector<STG::Message::Header> * hdrsList,
+ const std::string & login) const
{
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amRead, til, tlr);
IBPP::Statement st = IBPP::StatementFactory(db, tr);
-STG_MSG_HDR header;
+STG::Message::Header header;
try
{