2015-03-04 03:07:11 +03:00
|
|
|
// -*- c++ -*-
|
|
|
|
#pragma once
|
|
|
|
|
2015-08-02 23:26:54 +03:00
|
|
|
#include "moses/parameters/ServerOptions.h"
|
2015-08-04 03:59:28 +03:00
|
|
|
#include "Session.h"
|
2015-03-18 16:46:15 +03:00
|
|
|
#include <xmlrpc-c/base.hpp>
|
|
|
|
#include <xmlrpc-c/registry.hpp>
|
|
|
|
#include <xmlrpc-c/server_abyss.hpp>
|
|
|
|
#ifndef WITH_THREADS
|
|
|
|
#pragma message("COMPILING WITHOUT THREADS!")
|
2015-08-10 17:40:04 +03:00
|
|
|
#else
|
|
|
|
#include "moses/ThreadPool.h"
|
2015-03-18 16:46:15 +03:00
|
|
|
#endif
|
|
|
|
namespace MosesServer
|
2015-03-04 03:07:11 +03:00
|
|
|
{
|
2015-08-02 23:26:54 +03:00
|
|
|
|
2015-08-04 03:59:28 +03:00
|
|
|
class Server;
|
|
|
|
|
|
|
|
class
|
|
|
|
Translator : public xmlrpc_c::method
|
|
|
|
{
|
|
|
|
Server& m_server;
|
|
|
|
// Moses::ServerOptions m_server_options;
|
|
|
|
public:
|
|
|
|
Translator(Server& server);
|
|
|
|
|
|
|
|
void execute(xmlrpc_c::paramList const& paramList,
|
|
|
|
xmlrpc_c::value * const retvalP);
|
|
|
|
|
|
|
|
Session const& get_session(uint64_t session_id);
|
|
|
|
private:
|
|
|
|
Moses::ThreadPool m_threadPool;
|
|
|
|
};
|
2015-04-30 08:05:11 +03:00
|
|
|
|
2015-03-04 03:07:11 +03:00
|
|
|
}
|