X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fconfig.h;h=1fa54f669bd83130fa8502faf3c9789e9a5a8285;hb=2d5b8cdde08044d323aa7193dfac6c9f8bca7131;hp=3e8a975d6fcb4330c90edafda325168f8648717e;hpb=089b90439e745a218494e76b45e7df6215af01df;p=dcpomatic.git diff --git a/src/lib/config.h b/src/lib/config.h index 3e8a975d6..1fa54f669 100644 --- a/src/lib/config.h +++ b/src/lib/config.h @@ -59,13 +59,26 @@ public: boost::filesystem::path default_directory_or (boost::filesystem::path a) const; - /** @return port to use for J2K encoding servers */ - int server_port () const { - return _server_port; + /** @return base port number to use for J2K encoding servers */ + int server_port_base () const { + return _server_port_base; } - /** @return J2K encoding servers to use */ - std::vector servers () const { + void set_use_any_servers (bool u) { + _use_any_servers = u; + } + + bool use_any_servers () const { + return _use_any_servers; + } + + /** @param s New list of servers */ + void set_servers (std::vector s) { + _servers = s; + } + + /** @return Host names / IP addresses of J2K encoding servers that should definitely be used */ + std::vector servers () const { return _servers; } @@ -73,7 +86,7 @@ public: std::string tms_ip () const { return _tms_ip; } - + /** @return The path on a TMS that we should write DCPs to */ std::string tms_path () const { return _tms_path; @@ -134,6 +147,18 @@ public: return _colour_conversions; } + std::string mail_server () const { + return _mail_server; + } + + std::string kdm_from () const { + return _kdm_from; + } + + std::string kdm_email () const { + return _kdm_email; + } + /** @param n New number of local encoding threads */ void set_num_local_encoding_threads (int n) { _num_local_encoding_threads = n; @@ -144,13 +169,8 @@ public: } /** @param p New server port */ - void set_server_port (int p) { - _server_port = p; - } - - /** @param s New list of servers */ - void set_servers (std::vector s) { - _servers = s; + void set_server_port_base (int p) { + _server_port_base = p; } void set_reference_scaler (Scaler const * s) { @@ -228,6 +248,18 @@ public: void set_colour_conversions (std::vector const & c) { _colour_conversions = c; } + + void set_mail_server (std::string s) { + _mail_server = s; + } + + void set_kdm_from (std::string f) { + _kdm_from = f; + } + + void set_kdm_email (std::string e) { + _kdm_email = e; + } void write () const; @@ -246,11 +278,14 @@ private: int _num_local_encoding_threads; /** default directory to put new films in */ boost::filesystem::path _default_directory; - /** port to use for J2K encoding servers */ - int _server_port; - - /** J2K encoding servers to use */ - std::vector _servers; + /** base port number to use for J2K encoding servers; + * this port and the one above it will be used. + */ + int _server_port_base; + /** true to broadcast on the `any' address to look for servers */ + bool _use_any_servers; + /** J2K encoding servers that should definitely be used */ + std::vector _servers; /** Scaler to use for the "A" part of A/B comparisons */ Scaler const * _reference_scaler; /** Filters to use for the "A" part of A/B comparisons */ @@ -276,6 +311,9 @@ private: int _default_j2k_bandwidth; std::vector _colour_conversions; std::list > _cinemas; + std::string _mail_server; + std::string _kdm_from; + std::string _kdm_email; /** Singleton instance, or 0 */ static Config* _instance;