Simple and optional messagebox notification when jobs finish.
[dcpomatic.git] / src / lib / config.h
index 90ebb0b33c3518022837d033fda1d95ca56b74e8..1e16fc840a607814bd8fcef1891151cb2918a569 100644 (file)
@@ -330,6 +330,7 @@ public:
                NAG_DKDM_CONFIG,
                NAG_ENCRYPTED_METADATA,
                NAG_REMAKE_DECRYPTION_CHAIN,
+               NAG_BAD_SIGNER_CHAIN,
                NAG_COUNT
        };
 
@@ -380,6 +381,10 @@ public:
                return _decode_reduction;
        }
 
+       bool default_notify () const {
+               return _default_notify;
+       }
+
        /* SET (mostly) */
 
        void set_master_encoding_threads (int n) {
@@ -661,6 +666,10 @@ public:
                maybe_set (_decode_reduction, r);
        }
 
+       void set_default_notify (bool n) {
+               maybe_set (_default_notify, n);
+       }
+
        void clear_history () {
                _history.clear ();
                changed ();
@@ -696,6 +705,10 @@ public:
        static boost::signals2::signal<void ()> 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 bad certificate in the signer chain.  Handler can call
+        *  true to ask Config to re-create the chain.
+        */
+       static boost::signals2::signal<bool (void)> BadSignerChain;
 
        void write () const;
        void write_config () const;
@@ -716,7 +729,8 @@ public:
        static bool have_existing (std::string);
        static boost::filesystem::path config_file ();
 
-       static boost::optional<boost::filesystem::path> test_path;
+       /** If set, this overrides the standard path (in home, Library, AppData or wherever) for config.xml and cinemas.xml */
+       static boost::optional<boost::filesystem::path> override_path;
 
 private:
        Config ();
@@ -844,6 +858,7 @@ private:
        boost::optional<DKDMWriteType> _last_dkdm_write_type;
        int _frames_in_memory_multiplier;
        boost::optional<int> _decode_reduction;
+       bool _default_notify;
 
        static int const _current_version;