/*
- Copyright (C) 2012-2017 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2018 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
return _default_interop;
}
+ bool default_upload_after_make_dcp () {
+ return _default_upload_after_make_dcp;
+ }
+
void set_default_kdm_directory (boost::filesystem::path d) {
if (_default_kdm_directory && _default_kdm_directory.get() == d) {
return;
return _history;
}
+ std::vector<boost::filesystem::path> player_history () const {
+ return _player_history;
+ }
+
boost::shared_ptr<DKDMGroup> dkdms () const {
return _dkdms;
}
return _last_player_load_directory;
}
+ enum KDMWriteType {
+ KDM_WRITE_FLAT,
+ KDM_WRITE_FOLDER,
+ KDM_WRITE_ZIP
+ };
+
+ boost::optional<KDMWriteType> last_kdm_write_type () const {
+ return _last_kdm_write_type;
+ }
+
int frames_in_memory_multiplier () const {
return _frames_in_memory_multiplier;
}
maybe_set (_default_interop, i);
}
+ void set_default_upload_after_make_dcp (bool u) {
+ maybe_set (_default_upload_after_make_dcp, u);
+ }
+
void set_mail_server (std::string s) {
maybe_set (_mail_server, s);
}
maybe_set (_last_player_load_directory, d);
}
+ void set_last_kdm_write_type (KDMWriteType t) {
+ maybe_set (_last_kdm_write_type, t);
+ }
+
void unset_sound_output () {
if (!_sound_output) {
return;
changed ();
}
+ void clear_player_history () {
+ _player_history.clear ();
+ changed ();
+ }
+
void add_to_history (boost::filesystem::path p);
+ void add_to_player_history (boost::filesystem::path p);
void set_jump_to_selected (bool j) {
maybe_set (_jump_to_selected, j);
static bool have_existing (std::string);
static boost::filesystem::path config_file ();
+ static boost::optional<boost::filesystem::path> test_path;
+
private:
Config ();
static boost::filesystem::path path (std::string file, bool create_directories = true);
void read_cinemas (cxml::Document const & f);
boost::shared_ptr<dcp::CertificateChain> create_certificate_chain ();
boost::filesystem::path directory_or (boost::optional<boost::filesystem::path> dir, boost::filesystem::path a) const;
+ void add_to_history_internal (std::vector<boost::filesystem::path>& h, boost::filesystem::path p);
template <class T>
void maybe_set (T& member, T new_value, Property prop = OTHER) {
the home directory will be offered.
*/
boost::optional<boost::filesystem::path> _default_kdm_directory;
+ bool _default_upload_after_make_dcp;
std::list<boost::shared_ptr<Cinema> > _cinemas;
std::string _mail_server;
int _mail_port;
bool _win32_console;
#endif
std::vector<boost::filesystem::path> _history;
+ std::vector<boost::filesystem::path> _player_history;
boost::shared_ptr<DKDMGroup> _dkdms;
boost::filesystem::path _cinemas_file;
bool _show_hints_before_make_dcp;
boost::optional<std::string> _sound_output;
std::string _cover_sheet;
boost::optional<boost::filesystem::path> _last_player_load_directory;
+ boost::optional<KDMWriteType> _last_kdm_write_type;
int _frames_in_memory_multiplier;
/** Singleton instance, or 0 */