//-----------------------------------------------------------------------------
int FIREBIRD_STORE::AddMessage(STG::Message * msg, const std::string & login) const
{
-STG_LOCKER lock(&mutex);
+std::lock_guard lock(m_mutex);
IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
IBPP::Statement st = IBPP::StatementFactory(db, tr);
int FIREBIRD_STORE::EditMessage(const STG::Message & msg,
const std::string & login) const
{
-STG_LOCKER lock(&mutex);
+std::lock_guard lock(m_mutex);
IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
IBPP::Statement st = IBPP::StatementFactory(db, tr);
STG::Message * msg,
const std::string &) const
{
-STG_LOCKER lock(&mutex);
+std::lock_guard lock(m_mutex);
IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amRead, til, tlr);
IBPP::Statement st = IBPP::StatementFactory(db, tr);
//-----------------------------------------------------------------------------
int FIREBIRD_STORE::DelMessage(uint64_t id, const std::string &) const
{
-STG_LOCKER lock(&mutex);
+std::lock_guard lock(m_mutex);
IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amWrite, til, tlr);
IBPP::Statement st = IBPP::StatementFactory(db, tr);
int FIREBIRD_STORE::GetMessageHdrs(std::vector<STG::Message::Header> * hdrsList,
const std::string & login) const
{
-STG_LOCKER lock(&mutex);
+std::lock_guard lock(m_mutex);
IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amRead, til, tlr);
IBPP::Statement st = IBPP::StatementFactory(db, tr);