summaryrefslogtreecommitdiff
path: root/src/lib/config.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-01-14 21:49:40 +0000
committerCarl Hetherington <cth@carlh.net>2013-01-14 21:49:40 +0000
commit048f9b6b5569f03d1342a04f75c83a2bad340996 (patch)
tree2e9db97154b82b91a7a6ff1002d317f35d11608d /src/lib/config.cc
parent3031638f0ddf23654b72af2088a7616791307310 (diff)
Various work on certificate handling for screens; need XML config here, now.
Diffstat (limited to 'src/lib/config.cc')
-rw-r--r--src/lib/config.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/lib/config.cc b/src/lib/config.cc
index 848e466a6..a74c36f73 100644
--- a/src/lib/config.cc
+++ b/src/lib/config.cc
@@ -50,6 +50,7 @@ Config::Config ()
string line;
shared_ptr<Cinema> cinema;
+ shared_ptr<Screen> screen;
while (getline (f, line)) {
if (line.empty ()) {
@@ -99,8 +100,15 @@ Config::Config ()
assert (cinema);
cinema->email = v;
} else if (k == "screen") {
- shared_ptr<Screen> s (new Screen (v));
- cinema->screens.push_back (s);
+ assert (cinema);
+ if (screen) {
+ cinema->screens.push_back (screen);
+ }
+ screen.reset (new Screen (v, shared_ptr<libdcp::Certificate> ()));
+ } else if (k == "screen_certificate") {
+ assert (screen);
+ shared_ptr<Certificate> c (new libdcp::Certificate);
+ c->set_from_string (v);
}
}