Files
TCPlayerbotCore/src/server/shared/Database/DatabaseWorker.h
T

45 lines
1.3 KiB
C++
Raw Normal View History

2010-10-07 15:54:07 +02:00
/*
2014-01-01 00:07:53 +01:00
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
2010-10-07 15:54:07 +02:00
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
2010-08-18 02:25:52 +02:00
*/
#ifndef _WORKERTHREAD_H
#define _WORKERTHREAD_H
2014-04-20 16:48:35 +02:00
#include "Define.h"
2010-08-18 02:25:52 +02:00
#include <ace/Task.h>
#include <ace/Activation_Queue.h>
class MySQLConnection;
class DatabaseWorker : protected ACE_Task_Base
2010-08-18 02:25:52 +02:00
{
public:
2010-12-13 09:18:49 +01:00
DatabaseWorker(ACE_Activation_Queue* new_queue, MySQLConnection* con);
2010-08-18 02:25:52 +02:00
///- Inherited from ACE_Task_Base
2010-12-13 09:18:49 +01:00
int svc();
2010-08-26 20:55:09 +02:00
int wait() { return ACE_Task_Base::wait(); }
2010-08-18 02:25:52 +02:00
private:
ACE_Activation_Queue* m_queue;
MySQLConnection* m_conn;
2014-04-20 16:48:35 +02:00
DatabaseWorker(DatabaseWorker const& right) = delete;
DatabaseWorker& operator=(DatabaseWorker const& right) = delete;
2010-08-18 02:25:52 +02:00
};
#endif