Rename KDMNameFormat.
authorCarl Hetherington <cth@carlh.net>
Fri, 29 Jul 2016 15:29:34 +0000 (16:29 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 29 Jul 2016 15:29:34 +0000 (16:29 +0100)
16 files changed:
src/lib/cinema_kdms.cc
src/lib/cinema_kdms.h
src/lib/config.cc
src/lib/config.h
src/lib/kdm_filename_format.cc [new file with mode: 0644]
src/lib/kdm_filename_format.h [new file with mode: 0644]
src/lib/kdm_name_format.cc [deleted file]
src/lib/kdm_name_format.h [deleted file]
src/lib/screen_kdm.cc
src/lib/screen_kdm.h
src/lib/send_kdm_email_job.cc
src/lib/send_kdm_email_job.h
src/lib/wscript
src/wx/kdm_dialog.h
src/wx/kdm_output_panel.cc
src/wx/kdm_output_panel.h

index c5057873417622c1cb24b8276cdcde695e0ad661..78e7c5ace6f2c3f12daeda4a50f6c319d88a1583 100644 (file)
@@ -27,7 +27,7 @@
 #include "emailer.h"
 #include "compose.hpp"
 #include "log.h"
-#include "kdm_name_format.h"
+#include "kdm_filename_format.h"
 #include <zip.h>
 #include <boost/foreach.hpp>
 
@@ -40,7 +40,7 @@ using std::runtime_error;
 using boost::shared_ptr;
 
 void
-CinemaKDMs::make_zip_file (boost::filesystem::path zip_file, KDMNameFormat name_format, dcp::NameFormat::Map name_values) const
+CinemaKDMs::make_zip_file (boost::filesystem::path zip_file, KDMFilenameFormat name_format, dcp::NameFormat::Map name_values) const
 {
        int error;
        struct zip* zip = zip_open (zip_file.string().c_str(), ZIP_CREATE | ZIP_EXCL, &error);
@@ -119,7 +119,7 @@ void
 CinemaKDMs::write_zip_files (
        list<CinemaKDMs> cinema_kdms,
        boost::filesystem::path directory,
-       KDMNameFormat name_format,
+       KDMFilenameFormat name_format,
        dcp::NameFormat::Map name_values
        )
 {
@@ -140,7 +140,7 @@ CinemaKDMs::write_zip_files (
 void
 CinemaKDMs::email (
        list<CinemaKDMs> cinema_kdms,
-       KDMNameFormat name_format,
+       KDMFilenameFormat name_format,
        dcp::NameFormat::Map name_values,
        string cpl_name,
        shared_ptr<Log> log
index 53cf84d66036bef1f31cac2a6d71c047bda509fa..826b938066f1c13aa98f8aca3b7bb9542e15116c 100644 (file)
@@ -27,20 +27,20 @@ class Log;
 class CinemaKDMs
 {
 public:
-       void make_zip_file (boost::filesystem::path zip_file, KDMNameFormat name_format, dcp::NameFormat::Map name_values) const;
+       void make_zip_file (boost::filesystem::path zip_file, KDMFilenameFormat name_format, dcp::NameFormat::Map name_values) const;
 
        static std::list<CinemaKDMs> collect (std::list<ScreenKDM> kdms);
 
        static void write_zip_files (
                std::list<CinemaKDMs> cinema_kdms,
                boost::filesystem::path directory,
-               KDMNameFormat name_format,
+               KDMFilenameFormat name_format,
                dcp::NameFormat::Map name_values
                );
 
        static void email (
                std::list<CinemaKDMs> cinema_kdms,
-               KDMNameFormat name_format,
+               KDMFilenameFormat name_format,
                dcp::NameFormat::Map name_values,
                std::string cpl_name,
                boost::shared_ptr<Log> log
index b456c605c93bd685351ddcf007e70bcec4100294..d332c805a9b2752c67c0621565975bde843a4c7e 100644 (file)
@@ -30,7 +30,7 @@
 #include "util.h"
 #include "cross.h"
 #include "raw_convert.h"
-#include "kdm_name_format.h"
+#include "kdm_filename_format.h"
 #include <dcp/filename_format.h>
 #include <dcp/colour_matrix.h>
 #include <dcp/certificate_chain.h>
@@ -110,7 +110,7 @@ Config::set_defaults ()
 #endif
        _cinemas_file = path ("cinemas.xml");
        _show_hints_before_make_dcp = true;
-       _kdm_filename_format = KDMNameFormat ("KDM %f %c %s");
+       _kdm_filename_format = KDMFilenameFormat ("KDM %f %c %s");
        _dcp_filename_format = dcp::FilenameFormat ("%t_%i");
 
        _allowed_dcp_frame_rates.clear ();
@@ -294,7 +294,7 @@ try
 
        _cinemas_file = f.optional_string_child("CinemasFile").get_value_or (path ("cinemas.xml").string ());
        _show_hints_before_make_dcp = f.optional_bool_child("ShowHintsBeforeMakeDCP").get_value_or (true);
-       _kdm_filename_format = KDMNameFormat (f.optional_string_child("KDMFilenameFormat").get_value_or ("KDM %f %c %s"));
+       _kdm_filename_format = KDMFilenameFormat (f.optional_string_child("KDMFilenameFormat").get_value_or ("KDM %f %c %s"));
        _dcp_filename_format = dcp::FilenameFormat (f.optional_string_child("DCPFilenameFormat").get_value_or ("%t_%i.mxf"));
 
        /* Replace any cinemas from config.xml with those from the configured file */
index 37a55a6954f7f9f7db41fc1b8ebceef19fb5cdc2..913372c317e1aa9f2dd5f058184531edc678e204 100644 (file)
@@ -26,7 +26,7 @@
 #define DCPOMATIC_CONFIG_H
 
 #include "isdcf_metadata.h"
-#include "kdm_name_format.h"
+#include "kdm_filename_format.h"
 #include "types.h"
 #include <dcp/filename_format.h>
 #include <dcp/certificate_chain.h>
@@ -268,7 +268,7 @@ public:
                return _show_hints_before_make_dcp;
        }
 
-       KDMNameFormat kdm_filename_format () const {
+       KDMFilenameFormat kdm_filename_format () const {
                return _kdm_filename_format;
        }
 
@@ -484,7 +484,7 @@ public:
                maybe_set (_show_hints_before_make_dcp, s);
        }
 
-       void set_kdm_filename_format (KDMNameFormat n) {
+       void set_kdm_filename_format (KDMFilenameFormat n) {
                maybe_set (_kdm_filename_format, n);
        }
 
@@ -603,7 +603,7 @@ private:
        std::vector<dcp::EncryptedKDM> _dkdms;
        boost::filesystem::path _cinemas_file;
        bool _show_hints_before_make_dcp;
-       KDMNameFormat _kdm_filename_format;
+       KDMFilenameFormat _kdm_filename_format;
        dcp::FilenameFormat _dcp_filename_format;
 
        /** Singleton instance, or 0 */
diff --git a/src/lib/kdm_filename_format.cc b/src/lib/kdm_filename_format.cc
new file mode 100644 (file)
index 0000000..20e8298
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+    Copyright (C) 2016 Carl Hetherington <cth@carlh.net>
+
+    This file is part of DCP-o-matic.
+
+    DCP-o-matic 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.
+
+    DCP-o-matic 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 DCP-o-matic.  If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+#include "kdm_filename_format.h"
+
+using std::string;
+
+KDMFilenameFormat::KDMFilenameFormat (string specification)
+       : NameFormat (specification)
+{
+       /* film name */
+       add ('f');
+       /* cinema */
+       add ('c');
+       /* screen */
+       add ('s');
+       /* from date/time */
+       add ('b');
+       /* to date/time */
+       add ('e');
+}
diff --git a/src/lib/kdm_filename_format.h b/src/lib/kdm_filename_format.h
new file mode 100644 (file)
index 0000000..b96ac34
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+    Copyright (C) 2016 Carl Hetherington <cth@carlh.net>
+
+    This file is part of DCP-o-matic.
+
+    DCP-o-matic 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.
+
+    DCP-o-matic 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 DCP-o-matic.  If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef DCPOMATIC_KDM_FILENAME_FORMAT
+#define DCPOMATIC_KDM_FILENAME_FORMAT
+
+#include <dcp/name_format.h>
+
+class KDMFilenameFormat : public dcp::NameFormat
+{
+public:
+       KDMFilenameFormat () {}
+       KDMFilenameFormat (std::string specification);
+};
+
+#endif
diff --git a/src/lib/kdm_name_format.cc b/src/lib/kdm_name_format.cc
deleted file mode 100644 (file)
index bf17acb..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-    Copyright (C) 2016 Carl Hetherington <cth@carlh.net>
-
-    This file is part of DCP-o-matic.
-
-    DCP-o-matic 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.
-
-    DCP-o-matic 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 DCP-o-matic.  If not, see <http://www.gnu.org/licenses/>.
-
-*/
-
-#include "kdm_name_format.h"
-
-using std::string;
-
-KDMNameFormat::KDMNameFormat (string specification)
-       : NameFormat (specification)
-{
-       /* film name */
-       add ('f');
-       /* cinema */
-       add ('c');
-       /* screen */
-       add ('s');
-       /* from date/time */
-       add ('b');
-       /* to date/time */
-       add ('e');
-}
diff --git a/src/lib/kdm_name_format.h b/src/lib/kdm_name_format.h
deleted file mode 100644 (file)
index 1f5a9ab..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
-    Copyright (C) 2016 Carl Hetherington <cth@carlh.net>
-
-    This file is part of DCP-o-matic.
-
-    DCP-o-matic 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.
-
-    DCP-o-matic 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 DCP-o-matic.  If not, see <http://www.gnu.org/licenses/>.
-
-*/
-
-#ifndef DCPOMATIC_KDM_NAME_FORMAT
-#define DCPOMATIC_KDM_NAME_FORMAT
-
-#include <dcp/name_format.h>
-
-class KDMNameFormat : public dcp::NameFormat
-{
-public:
-       KDMNameFormat () {}
-       KDMNameFormat (std::string specification);
-};
-
-#endif
index 3290d2a685d1ba8d9883ab2e050f963718952348..9cb83162215f5d840d7e2be963a9087ab74e968f 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2016 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
@@ -35,7 +35,7 @@ operator== (ScreenKDM const & a, ScreenKDM const & b)
 }
 
 void
-ScreenKDM::write_files (list<ScreenKDM> screen_kdms, boost::filesystem::path directory, KDMNameFormat name_format, dcp::NameFormat::Map name_values)
+ScreenKDM::write_files (list<ScreenKDM> screen_kdms, boost::filesystem::path directory, KDMFilenameFormat name_format, dcp::NameFormat::Map name_values)
 {
        /* Write KDMs to the specified directory */
        BOOST_FOREACH (ScreenKDM const & i, screen_kdms) {
index d9031f18855ef04f770f805e7889b962967bcd8d..227526449a3b18abe8ec4a5b6a7a715535677e40 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2016 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
@@ -21,7 +21,7 @@
 #ifndef DCPOMATIC_SCREEN_KDM_H
 #define DCPOMATIC_SCREEN_KDM_H
 
-#include "kdm_name_format.h"
+#include "kdm_filename_format.h"
 #include <dcp/encrypted_kdm.h>
 #include <boost/shared_ptr.hpp>
 
@@ -38,7 +38,7 @@ public:
 
        static void write_files (
                std::list<ScreenKDM> screen_kdms, boost::filesystem::path directory,
-               KDMNameFormat name_format, dcp::NameFormat::Map name_values
+               KDMFilenameFormat name_format, dcp::NameFormat::Map name_values
                );
 
        boost::shared_ptr<Screen> screen;
index e4b20167e2fcd4176c16d09b82c5d84c7234020e..b06704545ab4e2321f7018938c20952770f15cd5 100644 (file)
@@ -33,7 +33,7 @@ using boost::shared_ptr;
 /** @param log Log to write to, or 0 */
 SendKDMEmailJob::SendKDMEmailJob (
        list<CinemaKDMs> cinema_kdms,
-       KDMNameFormat name_format,
+       KDMFilenameFormat name_format,
        dcp::NameFormat::Map name_values,
        string cpl_name,
        shared_ptr<Log> log
index bfb4d6c522837ef07f4ee34a7522ee95e60bd345..17b2db89c9fae430cddb29fc21f833b6dd8948d5 100644 (file)
@@ -19,7 +19,7 @@
 */
 
 #include "job.h"
-#include "kdm_name_format.h"
+#include "kdm_filename_format.h"
 #include <dcp/types.h>
 #include <boost/filesystem.hpp>
 
@@ -32,7 +32,7 @@ class SendKDMEmailJob : public Job
 public:
        SendKDMEmailJob (
                std::list<CinemaKDMs> cinema_kdms,
-               KDMNameFormat name_format,
+               KDMFilenameFormat name_format,
                dcp::NameFormat::Map name_values,
                std::string cpl_name,
                boost::shared_ptr<Log> log
@@ -43,7 +43,7 @@ public:
        void run ();
 
 private:
-       KDMNameFormat _name_format;
+       KDMFilenameFormat _name_format;
        dcp::NameFormat::Map _name_values;
        std::string _cpl_name;
        std::list<CinemaKDMs> _cinema_kdms;
index 6a8945d8483bbe50307e16d5ae107e87818d0a6e..6e937c26f39ca14de4466cdcb647d8f5f0b88251 100644 (file)
@@ -94,7 +94,7 @@ sources = """
           job.cc
           job_manager.cc
           json_server.cc
-          kdm_name_format.cc
+          kdm_filename_format.cc
           log.cc
           log_entry.cc
           magick_image_proxy.cc
index bae2fc16ba5c05b80257f78db1fa583b1ee8cafe..07b998224dba662a33583f95d83e4896d1826619 100644 (file)
@@ -19,7 +19,7 @@
 */
 
 #include "wx_util.h"
-#include "lib/kdm_name_format.h"
+#include "lib/kdm_filename_format.h"
 #include <dcp/types.h>
 #include <wx/wx.h>
 #include <boost/shared_ptr.hpp>
index 4efb9fb27ab02fff695108d9be13ab829b3a5a76..2808357d49ebac986a876b1d781f408914cacc65 100644 (file)
@@ -68,7 +68,7 @@ KDMOutputPanel::KDMOutputPanel (wxWindow* parent, bool interop)
        ex['s'] = "Screen 1";
        ex['b'] = "2012/03/15 12:30";
        ex['e'] = "2012/03/22 02:30";
-       _filename_format = new NameFormatEditor<KDMNameFormat> (this, Config::instance()->kdm_filename_format(), titles, ex);
+       _filename_format = new NameFormatEditor<KDMFilenameFormat> (this, Config::instance()->kdm_filename_format(), titles, ex);
        table->Add (_filename_format->panel(), 1, wxEXPAND);
 
        _write_to = new wxRadioButton (this, wxID_ANY, _("Write to"));
@@ -126,7 +126,7 @@ KDMOutputPanel::save_kdm_name_format () const
        Config::instance()->set_kdm_filename_format (name_format ());
 }
 
-KDMNameFormat
+KDMFilenameFormat
 KDMOutputPanel::name_format () const
 {
        return _filename_format->get ();
index 002b189f591db6bcf63318dbcd7059d6be47f254..ee6a94e6857d68ba795557e297651eefb1201b63 100644 (file)
@@ -20,7 +20,7 @@
 
 #include "wx_util.h"
 #include "name_format_editor.h"
-#include "lib/kdm_name_format.h"
+#include "lib/kdm_filename_format.h"
 #include <dcp/types.h>
 #include <wx/wx.h>
 #include <boost/filesystem.hpp>
@@ -36,14 +36,14 @@ public:
        boost::filesystem::path directory () const;
        bool write_to () const;
        dcp::Formulation formulation () const;
-       KDMNameFormat name_format () const;
+       KDMFilenameFormat name_format () const;
 
        void setup_sensitivity ();
        void save_kdm_name_format () const;
 
 private:
        wxChoice* _type;
-       NameFormatEditor<KDMNameFormat>* _filename_format;
+       NameFormatEditor<KDMFilenameFormat>* _filename_format;
        wxRadioButton* _write_to;
 #ifdef DCPOMATIC_USE_OWN_PICKER
        DirPickerCtrl* _folder;