blob: 21288e542ce6cf455c6930667297b9b4edc67f66 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// -*- c++ -*-
#pragma once
#include "moses/ThreadPool.h"
#include "moses/parameters/ServerOptions.h"
#include "session.h"
#include <xmlrpc-c/base.hpp>
#include <xmlrpc-c/registry.hpp>
#include <xmlrpc-c/server_abyss.hpp>
#ifndef WITH_THREADS
#pragma message("COMPILING WITHOUT THREADS!")
#endif
namespace MosesServer
{
class
Translator : public xmlrpc_c::method
{
Moses::ServerOptions m_server_options;
public:
Translator(Moses::ServerOptions const& sopts);
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;
SessionCache m_session_cache;
};
}
|