/* Copyright (C) 2012-2016 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 the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program 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 this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef LIBDCP_PACKAGE_BASE_H #define LIBDCP_PACKAGE_BASE_H #include "exceptions.h" #include "types.h" #include "metadata.h" #include namespace dcp { class Asset; class CertificateChain; class PackageBase { public: PackageBase (boost::filesystem::path directory); typedef std::list > ReadErrors; virtual std::list > assets () const = 0; protected: virtual boost::shared_ptr xml_asset_factory (boost::filesystem::path file, std::string root) const = 0; virtual boost::shared_ptr mxf_asset_factory (boost::filesystem::path file) const = 0; virtual std::string pkl_annotation_text () const = 0; std::list > read_assetmap (bool keep_going, ReadErrors* errors) const; void write_volindex (Standard standard) const; /** Write the ASSETMAP file. * @param pkl_uuid UUID of our PKL. * @param pkl_length Length of our PKL in bytes. */ void write_assetmap (Standard standard, std::string pkl_uuid, int pkl_length, XMLMetadata metadata) const; boost::filesystem::path write_pkl ( Standard standard, std::string pkl_uuid, dcp::XMLMetadata metadata, boost::shared_ptr signer ) const; /** the directory that the package is in */ boost::filesystem::path _directory; }; } #endif