X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=shell%2Fserver.h;h=99e5b096f2ec6a6547432dd46d0792c4776f7003;hb=fa554b2c591a84274daa6a72497029f751a3c9a4;hp=08b7ad27cc7c901e68839f3717818408ae88723d;hpb=a9bb7ddbd5ce4774a1d29fdd5f4e7a22e4bfed40;p=casparcg diff --git a/shell/server.h b/shell/server.h index 08b7ad27c..99e5b096f 100644 --- a/shell/server.h +++ b/shell/server.h @@ -1,54 +1,60 @@ -/* -* Copyright (c) 2011 Sveriges Television AB -* -* This file is part of CasparCG (www.casparcg.com). -* -* CasparCG is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* CasparCG is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with CasparCG. If not, see . -* -* Author: Robert Nagy, ronag89@gmail.com -*/ - -#pragma once - -#include - -#include - -#include - -#include - -namespace caspar { - -namespace core { - class video_channel; -} - -class server sealed : public monitor::observable - , boost::noncopyable -{ -public: - server(); - const std::vector> channels() const; - - // monitor::observable - - virtual void subscribe(const monitor::observable::observer_ptr& o) override; - virtual void unsubscribe(const monitor::observable::observer_ptr& o) override; -private: - struct impl; - spl::shared_ptr impl_; -}; - +/* +* Copyright (c) 2011 Sveriges Television AB +* +* This file is part of CasparCG (www.casparcg.com). +* +* CasparCG is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* CasparCG is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with CasparCG. If not, see . +* +* Author: Robert Nagy, ronag89@gmail.com +*/ + +#pragma once + +#include +#include + +#include + +#include + +#include + +namespace caspar { + +namespace core { + class video_channel; + class thumbnail_generator; + struct media_info_repository; + class system_info_provider_repository; + class cg_producer_registry; +} + +class server final : public boost::noncopyable +{ +public: + explicit server(std::promise& shutdown_server_now); + void start(); + const std::vector> channels() const; + std::shared_ptr get_thumbnail_generator() const; + spl::shared_ptr get_media_info_repo() const; + spl::shared_ptr get_system_info_provider_repo() const; + spl::shared_ptr get_cg_registry() const; + + core::monitor::subject& monitor_output(); +private: + struct impl; + spl::shared_ptr impl_; +}; + } \ No newline at end of file