/* gstreamermm - a C++ wrapper for gstreamer
 *
 * Copyright 2013-2016 The gstreamermm Development Team
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */


#include <gst/gsttocsetter.h>
#include <glibmm/interface.h>

_DEFS(gstreamermm,gst)

namespace Gst
{
class Toc;

/** An interface that allows setting and retrieval of the TOC.
 *
 * Elements that support some kind of chapters or editions (or tracks like in
 * the FLAC cue sheet) will implement this interface.
 *
 * If you just want to retrieve the TOC in your application then all you
 * need to do is watch for TOC messages on your pipeline's bus (or you can
 * perform TOC query). This interface is only for setting TOC data, not for
 * extracting it. To set TOC from the application, find proper tocsetter element
 * and set TOC using set_toc().
 *
 * Elements implementing the Gst::TocSetter interface can extend existing TOC
 * by getting extend UID for that (you can use gst_toc_find_entry() to retrieve it)
 * with any TOC entries received from downstream.
 *
 * Last reviewed on 2016-08-27 (1.8.0)
 *
 * @ingroup GstInterfaces
 */
class TocSetter : public Glib::Interface
{
  _CLASS_INTERFACE(TocSetter, GstTocSetter, GST_TOC_SETTER, GstTocSetterInterface)

public:
  _WRAP_METHOD(void set_toc(const Glib::RefPtr<Gst::Toc>& toc), gst_toc_setter_set_toc)
  _WRAP_METHOD(Glib::RefPtr<Gst::Toc> get_toc() const, gst_toc_setter_get_toc)
  _WRAP_METHOD(void reset(), gst_toc_setter_reset)
};
}
