X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fconfig.h;h=29f401755b06cf814db5c1cb2207848099053d9e;hb=d311043bf3c1e3e7f41b314f7ab7c91ed7e5aa7f;hp=be4e6ecf13814ac01adb54916efe3b9c4d976d1f;hpb=cde563eea0cc9291f2c5eb5205a23723cce010f3;p=dcpomatic.git diff --git a/src/lib/config.h b/src/lib/config.h index be4e6ecf1..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,18 @@ #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); + /** @class Config * @brief A singleton class holding configuration. @@ -140,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; } @@ -544,6 +551,23 @@ public: return _add_files_path; } + bool use_isdcf_name_by_default () const { + 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) { @@ -1048,6 +1072,22 @@ public: changed (); } + void set_use_isdcf_name_by_default (bool use) { + 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 @@ -1084,6 +1124,8 @@ public: void rename_template (std::string old_name, std::string new_name) const; void delete_template (std::string name) const; + boost::optional check_certificates () const; + static Config* instance (); static void drop (); static void restore_defaults (); @@ -1180,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; @@ -1261,6 +1303,10 @@ private: boost::optional _audio_mapping; 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;