+ if (_gdc_username) {
+ root->add_child("GDCUsername")->add_child_text(*_gdc_username);
+ }
+ if (_gdc_password) {
+ root->add_child("GDCPassword")->add_child_text(*_gdc_password);
+ }
+
+ switch (_interface_complexity) {
+ case INTERFACE_SIMPLE:
+ root->add_child("InterfaceComplexity")->add_child_text("simple");
+ break;
+ case INTERFACE_FULL:
+ root->add_child("InterfaceComplexity")->add_child_text("full");
+ break;
+ }
+
+ switch (_player_mode) {
+ case PLAYER_MODE_WINDOW:
+ root->add_child("PlayerMode")->add_child_text("window");
+ break;
+ case PLAYER_MODE_FULL:
+ root->add_child("PlayerMode")->add_child_text("full");
+ break;
+ case PLAYER_MODE_DUAL:
+ root->add_child("PlayerMode")->add_child_text("dual");
+ break;
+ }
+
+ root->add_child("ImageDisplay")->add_child_text(raw_convert<string>(_image_display));
+ root->add_child("RespectKDMValidityPeriods")->add_child_text(_respect_kdm_validity_periods ? "1" : "0");
+ if (_player_log_file) {
+ root->add_child("PlayerLogFile")->add_child_text(_player_log_file->string());
+ }
+ if (_player_content_directory) {
+ root->add_child("PlayerContentDirectory")->add_child_text(_player_content_directory->string());
+ }
+ if (_player_playlist_directory) {
+ root->add_child("PlayerPlaylistDirectory")->add_child_text(_player_playlist_directory->string());
+ }
+ if (_player_kdm_directory) {
+ root->add_child("PlayerKDMDirectory")->add_child_text(_player_kdm_directory->string());
+ }
+#ifdef DCPOMATIC_VARIANT_SWAROOP
+ if (_player_background_image) {
+ root->add_child("PlayerBackgroundImage")->add_child_text(_player_background_image->string());
+ }
+ root->add_child("KDMServerURL")->add_child_text(_kdm_server_url);
+ root->add_child("PlayerWatermarkTheatre")->add_child_text(_player_watermark_theatre);
+ root->add_child("PlayerWatermarkPeriod")->add_child_text(raw_convert<string>(_player_watermark_period));
+ root->add_child("PlayerWatermarkDuration")->add_child_text(raw_convert<string>(_player_watermark_duration));
+ BOOST_FOREACH (Monitor i, _required_monitors) {
+ i.as_xml(root->add_child("RequiredMonitor"));
+ }
+ if (_player_lock_file) {
+ root->add_child("PlayerLockFile")->add_child_text(_player_lock_file->string());
+ }
+#endif
+