X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fconfig.h;h=29f401755b06cf814db5c1cb2207848099053d9e;hb=d311043bf3c1e3e7f41b314f7ab7c91ed7e5aa7f;hp=32f9c738ff4c310f8ee5a4ad88ecae5a3bc9fc5c;hpb=450602739388811a6378314d6c309b99f7b28b60;p=dcpomatic.git diff --git a/src/lib/config.h b/src/lib/config.h index 32f9c738f..29f401755 100644 --- a/src/lib/config.h +++ b/src/lib/config.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2021 Carl Hetherington + Copyright (C) 2012-2022 Carl Hetherington This file is part of DCP-o-matic. @@ -22,12 +22,14 @@ * @brief Class holding configuration. */ + #ifndef DCPOMATIC_CONFIG_H #define DCPOMATIC_CONFIG_H -#include "types.h" -#include "state.h" + #include "audio_mapping.h" +#include "state.h" +#include "types.h" #include #include #include @@ -36,13 +38,14 @@ #include #include + +class Cinema; class CinemaSoundProcessor; class DCPContentType; -class Ratio; -class Cinema; -class Film; class DKDMGroup; class DKDMRecipient; +class Film; +class Ratio; extern void save_all_config_as_zip (boost::filesystem::path zip_file); @@ -144,11 +147,11 @@ public: return _tms_password; } - std::list > cinemas () const { + std::list> cinemas () const { return _cinemas; } - std::list > dkdm_recipients () const { + std::list> dkdm_recipients () const { return _dkdm_recipients; } @@ -552,6 +555,19 @@ public: return _use_isdcf_name_by_default; } + bool write_kdms_to_disk () const { + return _write_kdms_to_disk; + } + + bool email_kdms () const { + return _email_kdms; + } + + dcp::Formulation default_kdm_type () const { + return _default_kdm_type; + } + + /* SET (mostly) */ void set_master_encoding_threads (int n) { @@ -1060,6 +1076,18 @@ public: maybe_set (_use_isdcf_name_by_default, use); } + void set_write_kdms_to_disk (bool write) { + maybe_set (_write_kdms_to_disk, write); + } + + void set_email_kdms (bool email) { + maybe_set (_email_kdms, email); + } + + void set_default_kdm_type (dcp::Formulation type) { + maybe_set (_default_kdm_type, type); + } + void changed (Property p = OTHER); boost::signals2::signal Changed; /** Emitted if read() failed on an existing Config file. There is nothing @@ -1194,8 +1222,8 @@ private: */ boost::optional _default_kdm_directory; bool _upload_after_make_dcp; - std::list > _cinemas; - std::list > _dkdm_recipients; + std::list> _cinemas; + std::list> _dkdm_recipients; std::string _mail_server; int _mail_port; EmailProtocol _mail_protocol; @@ -1276,6 +1304,9 @@ private: std::vector _custom_languages; boost::optional _add_files_path; bool _use_isdcf_name_by_default; + bool _write_kdms_to_disk; + bool _email_kdms; + dcp::Formulation _default_kdm_type; static int const _current_version;