Missing file.
[dcpomatic.git] / src / lib / config.h
index 40d06a1721493ab8105b13109c881ec37fd3b19c..3e8a975d6fcb4330c90edafda325168f8648717e 100644 (file)
 #include <vector>
 #include <boost/shared_ptr.hpp>
 #include <boost/signals2.hpp>
+#include <boost/filesystem.hpp>
 #include <libdcp/metadata.h>
 #include "dci_metadata.h"
+#include "colour_conversion.h"
+#include "server.h"
 
 class ServerDescription;
 class Scaler;
@@ -36,7 +39,7 @@ class Filter;
 class SoundProcessor;
 class DCPContentType;
 class Ratio;
-class ColourConversion;
+class Cinema;
 
 /** @class Config
  *  @brief A singleton class holding configuration.
@@ -50,11 +53,11 @@ public:
                return _num_local_encoding_threads;
        }
 
-       std::string default_directory () const {
+       boost::filesystem::path default_directory () const {
                return _default_directory;
        }
 
-       std::string default_directory_or (std::string a) const;
+       boost::filesystem::path default_directory_or (boost::filesystem::path a) const;
 
        /** @return port to use for J2K encoding servers */
        int server_port () const {
@@ -62,7 +65,7 @@ public:
        }
 
        /** @return J2K encoding servers to use */
-       std::vector<boost::shared_ptr<ServerDescription> > servers () const {
+       std::vector<ServerDescription> servers () const {
                return _servers;
        }
 
@@ -91,6 +94,10 @@ public:
                return _sound_processor;
        }
 
+       std::list<boost::shared_ptr<Cinema> > cinemas () const {
+               return _cinemas;
+       }
+       
        std::list<int> allowed_dcp_frame_rates () const {
                return _allowed_dcp_frame_rates;
        }
@@ -123,7 +130,7 @@ public:
                return _default_j2k_bandwidth;
        }
 
-       std::vector<boost::shared_ptr<ColourConversion> > colour_conversions () const {
+       std::vector<PresetColourConversion> colour_conversions () const {
                return _colour_conversions;
        }
 
@@ -132,7 +139,7 @@ public:
                _num_local_encoding_threads = n;
        }
 
-       void set_default_directory (std::string d) {
+       void set_default_directory (boost::filesystem::path d) {
                _default_directory = d;
        }
 
@@ -142,7 +149,7 @@ public:
        }
 
        /** @param s New list of servers */
-       void set_servers (std::vector<boost::shared_ptr<ServerDescription> > s) {
+       void set_servers (std::vector<ServerDescription> s) {
                _servers = s;
        }
 
@@ -174,6 +181,14 @@ public:
                _tms_password = p;
        }
 
+       void add_cinema (boost::shared_ptr<Cinema> c) {
+               _cinemas.push_back (c);
+       }
+
+       void remove_cinema (boost::shared_ptr<Cinema> c) {
+               _cinemas.remove (c);
+       }
+
        void set_allowed_dcp_frame_rates (std::list<int> const & r) {
                _allowed_dcp_frame_rates = r;
        }
@@ -210,30 +225,32 @@ public:
                _default_j2k_bandwidth = b;
        }
 
-       void set_colour_conversions (std::vector<boost::shared_ptr<ColourConversion> > const & c) {
+       void set_colour_conversions (std::vector<PresetColourConversion> const & c) {
                _colour_conversions = c;
        }
        
        void write () const;
 
+       boost::filesystem::path signer_chain_directory () const;
+
        static Config* instance ();
        static void drop ();
 
 private:
        Config ();
-       std::string file (bool) const;
+       boost::filesystem::path file (bool) const;
        void read ();
        void read_old_metadata ();
 
        /** number of threads to use for J2K encoding on the local machine */
        int _num_local_encoding_threads;
        /** default directory to put new films in */
-       std::string _default_directory;
+       boost::filesystem::path _default_directory;
        /** port to use for J2K encoding servers */
        int _server_port;
 
        /** J2K encoding servers to use */
-       std::vector<boost::shared_ptr<ServerDescription> > _servers;
+       std::vector<ServerDescription> _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 */
@@ -257,7 +274,8 @@ private:
        DCPContentType const * _default_dcp_content_type;
        libdcp::XMLMetadata _dcp_metadata;
        int _default_j2k_bandwidth;
-       std::vector<boost::shared_ptr<ColourConversion> > _colour_conversions;
+       std::vector<PresetColourConversion> _colour_conversions;
+       std::list<boost::shared_ptr<Cinema> > _cinemas;
 
        /** Singleton instance, or 0 */
        static Config* _instance;