Fix typo in log message.
[dcpomatic.git] / src / lib / config.h
index f53b8986e0ff890ebb36379ad52a9e4fca46c17f..8fbdeaf9584ffe9f9aa85c9084b2fd867aa80bb9 100644 (file)
@@ -586,6 +586,10 @@ public:
                return _auto_crop_threshold;
        }
 
+       boost::optional<std::string> last_release_notes_version () const {
+               return _last_release_notes_version;
+       }
+
        /* SET (mostly) */
 
        void set_master_encoding_threads (int n) {
@@ -1122,6 +1126,14 @@ public:
                maybe_set (_auto_crop_threshold, threshold, AUTO_CROP_THRESHOLD);
        }
 
+       void set_last_release_notes_version (std::string version) {
+               maybe_set (_last_release_notes_version, version);
+       }
+
+       void unset_last_release_notes_version() {
+               maybe_set(_last_release_notes_version, boost::optional<std::string>());
+       }
+
        ExportConfig& export_config() {
                return _export;
        }
@@ -1131,7 +1143,12 @@ public:
        /** Emitted if read() failed on an existing Config file.  There is nothing
            a listener can do about it: this is just for information.
        */
-       static boost::signals2::signal<void ()> FailedToLoad;
+       enum class LoadFailure {
+               CONFIG,
+               CINEMAS,
+               DKDM_RECIPIENTS
+       };
+       static boost::signals2::signal<void (LoadFailure)> FailedToLoad;
        /** Emitted if read() issued a warning which the user might want to know about */
        static boost::signals2::signal<void (std::string)> Warning;
        /** Emitted if there is a something wrong the contents of our config.  Handler can call
@@ -1192,6 +1209,9 @@ public:
 private:
        Config ();
        void read () override;
+       void read_config();
+       void read_cinemas();
+       void read_dkdm_recipients();
        void set_defaults ();
        void set_kdm_email_to_default ();
        void set_notification_email_to_default ();
@@ -1349,6 +1369,7 @@ private:
        dcp::Formulation _default_kdm_type;
        RoughDuration _default_kdm_duration;
        double _auto_crop_threshold;
+       boost::optional<std::string> _last_release_notes_version;
 
        ExportConfig _export;