X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fscreen.h;h=cea5fe29cef4b73ebbf6903b6e3c0eeed3009430;hb=f17c1575ec037e3ac2ec95f2725335ca306fd700;hp=663b3c3c47434a0ef1ace9d58b2391ae7334e84f;hpb=bb767c7e338414beee132af3e96829c1448e214b;p=dcpomatic.git diff --git a/src/lib/screen.h b/src/lib/screen.h index 663b3c3c4..cea5fe29c 100644 --- a/src/lib/screen.h +++ b/src/lib/screen.h @@ -1,68 +1,52 @@ /* - Copyright (C) 2012 Carl Hetherington + Copyright (C) 2013-2016 Carl Hetherington - This program is free software; you can redistribute it and/or modify + This file is part of DCP-o-matic. + + DCP-o-matic is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + DCP-o-matic is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with DCP-o-matic. If not, see . */ +#include +#include +#include #include -#include -#include -#include "util.h" -class Format; +class Cinema; +/** @class Screen + * @brief A representation of a Screen for KDM generation. + * + * This is the name of the screen and the certificate of its + * `recipient' (i.e. the servers). + */ class Screen { public: - Screen (std::string); - - void set_geometry (Format const *, Position, Size); - - std::string name () const { - return _name; - } - - void set_name (std::string n) { - _name = n; - } - - struct Geometry { - Geometry () {} - - Geometry (Position p, Size s) - : position (p) - , size (s) - {} - - Position position; - Size size; - }; - - typedef std::map GeometryMap; - GeometryMap geometries () const { - return _geometries; - } + Screen (std::string const & n, boost::optional rec, std::vector td) + : name (n) + , recipient (rec) + , trusted_devices (td) + {} - Position position (Format const *) const; - Size size (Format const *) const; + Screen (cxml::ConstNodePtr); - std::string as_metadata () const; - static boost::shared_ptr create_from_metadata (std::string); + void as_xml (xmlpp::Element *) const; -private: - std::string _name; - GeometryMap _geometries; + boost::shared_ptr cinema; + std::string name; + std::string notes; + boost::optional recipient; + std::vector trusted_devices; };