19 #ifndef MGMAPI_SERVICE_HPP
20 #define MGMAPI_SERVICE_HPP
22 #include <SocketServer.hpp>
25 #include <OutputStream.hpp>
26 #include <InputStream.hpp>
28 #include "MgmtSrvr.hpp"
55 const char*
name() {
return m_name.
c_str(); }
57 const char *get_error_text(
int err_no)
58 {
return m_mgmsrv.
getErrorText(err_no, m_err_str,
sizeof(m_err_str)); }
65 static const unsigned SOCKET_TIMEOUT = 30000;
76 void restart(
const class Properties &args,
int version);
92 void stop(
const class Properties &args,
int version);
137 Uint64 m_next_session_id;
141 m_next_session_id(1) {}
144 return new MgmApiSession(m_mgmsrv, socket, m_next_session_id++);
148 static const char* str_null(
const char* str)
150 return (str ? str :
"(null)");
153 static const char* yes_no(
bool value)
155 return (value ?
"yes" :
"no");