diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-09-25 00:00:33 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-09-25 00:00:33 +0100 |
| commit | 13d924ad844ca6b642880910e21c5e322dbc4408 (patch) | |
| tree | ec38628929587b1687bded178cb4279b47d4eb9a /src/lib | |
| parent | 4abb5ba684d2302fe983cbf472969356fd5b945a (diff) | |
Allow mail server / KDM from email configuration.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/config.cc | 6 | ||||
| -rw-r--r-- | src/lib/config.h | 18 |
2 files changed, 24 insertions, 0 deletions
diff --git a/src/lib/config.cc b/src/lib/config.cc index 9d2d9d1bf..3a3a87faa 100644 --- a/src/lib/config.cc +++ b/src/lib/config.cc @@ -139,6 +139,9 @@ Config::read () cinema->read_screens (*i); _cinemas.push_back (cinema); } + + _mail_server = f.string_child ("MailServer"); + _kdm_from = f.string_child ("KDMFrom"); } void @@ -295,6 +298,9 @@ Config::write () const (*i)->as_xml (root->add_child ("Cinema")); } + root->add_child("MailServer")->add_child_text (_mail_server); + root->add_child("KDMFrom")->add_child_text (_kdm_from); + doc.write_to_file_formatted (file(false).string ()); } diff --git a/src/lib/config.h b/src/lib/config.h index 3e8a975d6..8dcb513a5 100644 --- a/src/lib/config.h +++ b/src/lib/config.h @@ -134,6 +134,14 @@ public: return _colour_conversions; } + std::string mail_server () const { + return _mail_server; + } + + std::string kdm_from () const { + return _kdm_from; + } + /** @param n New number of local encoding threads */ void set_num_local_encoding_threads (int n) { _num_local_encoding_threads = n; @@ -228,6 +236,14 @@ public: void set_colour_conversions (std::vector<PresetColourConversion> 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 write () const; @@ -276,6 +292,8 @@ private: int _default_j2k_bandwidth; std::vector<PresetColourConversion> _colour_conversions; std::list<boost::shared_ptr<Cinema> > _cinemas; + std::string _mail_server; + std::string _kdm_from; /** Singleton instance, or 0 */ static Config* _instance; |
