Merge master.
[dcpomatic.git] / src / lib / config.h
index c84ce76b514bf64cf6e370c8231871857832c534..ee4e4eaec49cd2a098eb04b66a4b49b517d4cee4 100644 (file)
@@ -32,6 +32,7 @@ class ServerDescription;
 class Scaler;
 class Filter;
 class SoundProcessor;
+class Cinema;
 
 /** @class Config
  *  @brief A singleton class holding configuration.
@@ -94,6 +95,10 @@ public:
                return _sound_processor;
        }
 
+       std::list<boost::shared_ptr<Cinema> > cinemas () const {
+               return _cinemas;
+       }
+
        /** @param n New number of local encoding threads */
        void set_num_local_encoding_threads (int n) {
                _num_local_encoding_threads = n;
@@ -140,14 +145,25 @@ public:
        void set_tms_password (std::string p) {
                _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 write () const;
 
+       std::string crypt_chain_directory () const;
+
        static Config* instance ();
 
 private:
        Config ();
-       std::string file () const;
+       std::string read_file () const;
+       std::string write_file () const;
 
        /** number of threads to use for J2K encoding on the local machine */
        int _num_local_encoding_threads;
@@ -173,6 +189,8 @@ private:
        /** Our sound processor */
        SoundProcessor const * _sound_processor;
 
+       std::list<boost::shared_ptr<Cinema> > _cinemas;
+
        /** Singleton instance, or 0 */
        static Config* _instance;
 };