-/* -*- c-basic-offset: 8; default-tab-width: 8; -*- */
-
/*
Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
#include "util.h"
using std::string;
+using std::set;
using boost::shared_ptr;
using boost::lexical_cast;
+int const ContentProperty::START = 400;
+int const ContentProperty::LENGTH = 401;
+
Content::Content (shared_ptr<const Film> f, Time s)
: _film (f)
, _start (s)
+ , _change_signals_frequent (false)
{
}
: _film (f)
, _file (p)
, _start (0)
+ , _change_signals_frequent (false)
{
}
Content::Content (shared_ptr<const Film> f, shared_ptr<const cxml::Node> node)
: _film (f)
+ , _change_signals_frequent (false)
{
_file = node->string_child ("File");
_digest = node->string_child ("Digest");
_start = node->number_child<Time> ("Start");
}
-Content::Content (Content const & o)
- : boost::enable_shared_from_this<Content> (o)
- , _film (o._film)
- , _file (o._file)
- , _digest (o._digest)
- , _start (o._start)
-{
-
-}
-
void
Content::as_xml (xmlpp::Node* node) const
{
void
Content::signal_changed (int p)
{
- Changed (shared_from_this (), p);
+ Changed (shared_from_this (), p, _change_signals_frequent);
+}
+
+void
+Content::set_start (Time s)
+{
+ {
+ boost::mutex::scoped_lock lm (_mutex);
+ _start = s;
+ }
+
+ signal_changed (ContentProperty::START);
}