Standard standard,
XMLMetadata metadata,
shared_ptr<const CertificateChain> signer,
- FilenameFormat filename_format
+ NameFormat name_format
)
{
BOOST_FOREACH (shared_ptr<CPL> i, cpls ()) {
NameFormat::Map values;
values['t'] = "cpl";
values['i'] = i->id();
- i->write_xml (_directory / (filename_format.get(values) + ".xml"), standard, signer);
+ i->write_xml (_directory / (name_format.get(values) + ".xml"), standard, signer);
}
string const pkl_uuid = make_uuid ();
NameFormat::Map values;
values['t'] = "pkl";
values['i'] = pkl_uuid;
- boost::filesystem::path const pkl_path = write_pkl (filename_format.get(values) + ".xml", standard, pkl_uuid, metadata, signer);
+ boost::filesystem::path const pkl_path = write_pkl (name_format.get(values) + ".xml", standard, pkl_uuid, metadata, signer);
write_volindex (standard);
write_assetmap (standard, pkl_uuid, boost::filesystem::file_size (pkl_path), metadata);
#include "types.h"
#include "certificate.h"
#include "metadata.h"
-#include "filename_format.h"
+#include "name_format.h"
#include <boost/shared_ptr.hpp>
#include <boost/signals2.hpp>
#include <string>
Standard standard,
XMLMetadata metadata = XMLMetadata (),
boost::shared_ptr<const CertificateChain> signer = boost::shared_ptr<const CertificateChain> (),
- FilenameFormat filename_format = FilenameFormat("%t_%i")
+ NameFormat name_format = NameFormat("%t_%i")
);
void resolve_refs (std::list<boost::shared_ptr<Asset> > assets);
+++ /dev/null
-/*
- Copyright (C) 2016 Carl Hetherington <cth@carlh.net>
-
- This file is part of libdcp.
-
- libdcp 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.
-
- libdcp 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 libdcp. If not, see <http://www.gnu.org/licenses/>.
-
- In addition, as a special exception, the copyright holders give
- permission to link the code of portions of this program with the
- OpenSSL library under certain conditions as described in each
- individual source file, and distribute linked combinations
- including the two.
-
- You must obey the GNU General Public License in all respects
- for all of the code used other than OpenSSL. If you modify
- file(s) with this exception, you may extend this exception to your
- version of the file(s), but you are not obligated to do so. If you
- do not wish to do so, delete this exception statement from your
- version. If you delete this exception statement from all source
- files in the program, then also delete it here.
-*/
-
-#include "filename_format.h"
-
-using std::string;
-using namespace dcp;
-
-FilenameFormat::FilenameFormat (string specification)
- : NameFormat (specification)
-{
- /* asset type */
- add ('t');
- /* unique ID */
- add ('i');
- /* reel index */
- add ('r');
- /* reel count */
- add ('n');
- /* content name */
- add ('c');
-}
+++ /dev/null
-/*
- Copyright (C) 2016 Carl Hetherington <cth@carlh.net>
-
- This file is part of libdcp.
-
- libdcp 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.
-
- libdcp 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 libdcp. If not, see <http://www.gnu.org/licenses/>.
-
- In addition, as a special exception, the copyright holders give
- permission to link the code of portions of this program with the
- OpenSSL library under certain conditions as described in each
- individual source file, and distribute linked combinations
- including the two.
-
- You must obey the GNU General Public License in all respects
- for all of the code used other than OpenSSL. If you modify
- file(s) with this exception, you may extend this exception to your
- version of the file(s), but you are not obligated to do so. If you
- do not wish to do so, delete this exception statement from your
- version. If you delete this exception statement from all source
- files in the program, then also delete it here.
-*/
-
-#ifndef LIBDCP_FILENAME_FORMAT
-#define LIBDCP_FILENAME_FORMAT
-
-#include "name_format.h"
-
-namespace dcp {
-
-class FilenameFormat : public NameFormat
-{
-public:
- FilenameFormat () {}
- FilenameFormat (std::string specification);
-};
-
-}
-
-#endif
return o;
}
-void
-NameFormat::add (char placeholder)
-{
- _components.push_back (placeholder);
-}
-
string
NameFormat::get (Map values) const
{
class NameFormat
{
public:
- std::list<char> components () const {
- return _components;
- }
+ NameFormat () {}
+
+ NameFormat (std::string specification)
+ : _specification (specification)
+ {}
std::string specification () const {
return _specification;
std::string get (Map) const;
-protected:
- NameFormat () {}
-
- NameFormat (std::string specification)
- : _specification (specification)
- {}
-
- void add (char placeholder);
-
private:
- /** placeholders for each component */
- std::list<char> _components;
std::string _specification;
};
encrypted_kdm.cc
exceptions.cc
file.cc
- filename_format.cc
font_asset.cc
font_node.cc
gamma_transfer_function.cc
decrypted_kdm_key.h
encrypted_kdm.h
exceptions.h
- filename_format.h
font_asset.h
gamma_transfer_function.h
interop_load_font_node.h