1 /* Copyright 2018 Codership Oy <info@codership.com> 2 3 This program is free software; you can redistribute it and/or modify 4 it under the terms of the GNU General Public License as published by 5 the Free Software Foundation; version 2 of the License. 6 7 This program is distributed in the hope that it will be useful, 8 but WITHOUT ANY WARRANTY; without even the implied warranty of 9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 GNU General Public License for more details. 11 12 You should have received a copy of the GNU General Public License 13 along with this program; if not, write to the Free Software 14 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15 16 #ifndef WSREP_CLIENT_STATE_H 17 #define WSREP_CLIENT_STATE_H 18 19 /* wsrep-lib */ 20 #include "wsrep/client_state.hpp" 21 #include "my_global.h" 22 23 class THD; 24 25 class Wsrep_client_state : public wsrep::client_state 26 { 27 public: Wsrep_client_state(THD * thd,wsrep::mutex & mutex,wsrep::condition_variable & cond,wsrep::server_state & server_state,wsrep::client_service & client_service,const wsrep::client_id & id)28 Wsrep_client_state(THD* thd, 29 wsrep::mutex& mutex, 30 wsrep::condition_variable& cond, 31 wsrep::server_state& server_state, 32 wsrep::client_service& client_service, 33 const wsrep::client_id& id) 34 : wsrep::client_state(mutex, 35 cond, 36 server_state, 37 client_service, 38 id, 39 wsrep::client_state::m_local) 40 , m_thd(thd) 41 { } thd()42 THD* thd() { return m_thd; } 43 private: 44 THD* m_thd; 45 }; 46 47 #endif /* WSREP_CLIENT_STATE_H */ 48