21 #include <libconfig.h++>
22 #include <boost/asio.hpp>
30 #include "on_demand/ControlSystemRestClient.h"
35 Middleware( boost::asio::io_service& io_service,
const libconfig::Config&
cfg,
const std::string& api_url,
const std::string& iface);
37 std::shared_ptr<Service>
get_service(
const std::string& service_id);
38 void set_service(
const std::string& service_id, std::shared_ptr<Service> service) {
_services[service_id] = service; };
57 std::map<std::string, std::shared_ptr<Service>>
_services;
62 const libconfig::Config&
_cfg;
const std::string & _interface
std::unique_ptr< MBMS_RT::ServiceAnnouncement > _service_announcement
boost::asio::io_service & _io_service
std::map< std::string, std::shared_ptr< Service > > _services
boost::posix_time::seconds _control_tick_interval
Middleware(boost::asio::io_service &io_service, const libconfig::Config &cfg, const std::string &api_url, const std::string &iface)
std::shared_ptr< Service > get_service(const std::string &service_id)
MBMS_RT::CacheManagement _cache
MBMS_RT::RpRestClient _rp
boost::posix_time::seconds _tick_interval
const libconfig::Config & _cfg
MBMS_RT::RestHandler _api
void set_service(const std::string &service_id, std::shared_ptr< Service > service)
void control_tick_handler()
MBMS_RT::ControlSystemRestClient _control
bool _handle_local_service_announcement()
boost::asio::deadline_timer _control_timer
boost::asio::deadline_timer _timer
static Config cfg
Global configuration object.