2 * Copyright 2013 Sveriges Television AB http://casparcg.com/
4 * This file is part of CasparCG (www.casparcg.com).
6 * CasparCG is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * CasparCG is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with CasparCG. If not, see <http://www.gnu.org/licenses/>.
19 * Author: Robert Nagy, ronag89@gmail.com
20 * Author: Helge Norberg, helge.norberg@svt.se
25 #include <boost/asio/ip/udp.hpp>
26 #include <boost/noncopyable.hpp>
28 #include <common/memory.h>
29 #include <core/monitor/monitor.h>
31 namespace caspar { namespace protocol { namespace osc {
35 client(const client&);
36 client& operator=(const client&);
43 client(std::shared_ptr<boost::asio::io_service> service);
48 * Get a subscription token that ensures that OSC messages are sent to the
49 * given endpoint as long as the token is alive. It will stop sending when
50 * the token is dropped unless another token to the same endpoint has
51 * previously been checked out.
53 * @param endpoint The UDP endpoint to send OSC messages to.
55 * @return The token. It is ok for the token to outlive the client
57 std::shared_ptr<void> get_subscription_token(
58 const boost::asio::ip::udp::endpoint& endpoint);
64 client& operator=(client&&);
68 spl::shared_ptr<core::monitor::sink> sink();
71 spl::shared_ptr<impl> impl_;