summaryrefslogtreecommitdiff
path: root/src/lib/config.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-12-16 12:10:51 +0000
committerCarl Hetherington <cth@carlh.net>2016-12-16 12:10:51 +0000
commit532e7faa6ab37681999d1cbb0e9f8b6978198622 (patch)
tree43ea916af86201d08c7f1aaf7b8f02f1aa021920 /src/lib/config.h
parent396c26415da57f42271ddcf56c1169a437d5a981 (diff)
Add preference for default KDM target directory (#1013).
Diffstat (limited to 'src/lib/config.h')
-rw-r--r--src/lib/config.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/lib/config.h b/src/lib/config.h
index c50846707..8b8d7c38a 100644
--- a/src/lib/config.h
+++ b/src/lib/config.h
@@ -56,7 +56,12 @@ public:
return _default_directory;
}
+ boost::optional<boost::filesystem::path> default_kdm_directory () const {
+ return _default_kdm_directory;
+ }
+
boost::filesystem::path default_directory_or (boost::filesystem::path a) const;
+ boost::filesystem::path default_kdm_directory_or (boost::filesystem::path a) const;
enum Property {
USE_ANY_SERVERS,
@@ -178,6 +183,14 @@ public:
return _default_interop;
}
+ void set_default_kdm_directory (boost::filesystem::path d) {
+ if (_default_kdm_directory && _default_kdm_directory.get() == d) {
+ return;
+ }
+ _default_kdm_directory = d;
+ changed ();
+ }
+
std::string mail_server () const {
return _mail_server;
}
@@ -549,6 +562,7 @@ private:
void write_cinemas_xml () const;
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;
template <class T>
void maybe_set (T& member, T new_value) {
@@ -599,6 +613,10 @@ private:
int _default_j2k_bandwidth;
int _default_audio_delay;
bool _default_interop;
+ /** Default directory to offer to write KDMs to; if it's not set,
+ the home directory will be offered.
+ */
+ boost::optional<boost::filesystem::path> _default_kdm_directory;
std::list<boost::shared_ptr<Cinema> > _cinemas;
std::string _mail_server;
int _mail_port;