X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fcontent.h;h=6bbf33b35cd4d4e10377bdda2ad77be6cf673f7c;hb=3574212ee42b2bd924eb95d5c0f4f69ec9e0a2f0;hp=fc3a531faf8293b69d484581810b0ea3fd351801;hpb=7f2e74604a51b984e4c8cbb5d5f4bb642677ec00;p=dcpomatic.git diff --git a/src/lib/content.h b/src/lib/content.h index fc3a531fa..6bbf33b35 100644 --- a/src/lib/content.h +++ b/src/lib/content.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2013 Carl Hetherington + Copyright (C) 2013-2014 Carl Hetherington This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,6 +17,10 @@ */ +/** @file src/lib/content.h + * @brief Content class. + */ + #ifndef DCPOMATIC_CONTENT_H #define DCPOMATIC_CONTENT_H @@ -26,6 +30,7 @@ #include #include #include +#include #include "types.h" #include "dcpomatic_time.h" @@ -46,13 +51,16 @@ public: static int const TRIM_END; }; +/** @class Content + * @brief A piece of content represented by one or more files on disk. + */ class Content : public boost::enable_shared_from_this, public boost::noncopyable { public: Content (boost::shared_ptr); Content (boost::shared_ptr, DCPTime); Content (boost::shared_ptr, boost::filesystem::path); - Content (boost::shared_ptr, boost::shared_ptr); + Content (boost::shared_ptr, cxml::ConstNodePtr); Content (boost::shared_ptr, std::vector >); virtual ~Content () {} @@ -130,6 +138,10 @@ public: _change_signals_frequent = f; } + boost::shared_ptr film () const { + return _film.lock (); + } + boost::signals2::signal, int, bool)> Changed; protected: @@ -138,8 +150,8 @@ protected: boost::weak_ptr _film; /** _mutex which should be used to protect accesses, as examine - jobs can update content state in threads other than the main one. - */ + * jobs can update content state in threads other than the main one. + */ mutable boost::mutex _mutex; /** Paths of our data files */