xbmc
DVDStateSerializer.h
1 /*
2  * Copyright (C) 2005-2022 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include <string>
12 
13 namespace tinyxml2
14 {
15 class XMLElement;
16 }
17 
19 struct DVDState
20 {
22  int32_t title = -1;
24  int32_t pgn = -1;
26  int32_t pgcn = -1;
28  int32_t current_angle = -1;
30  int8_t subp_num = -1;
32  int8_t audio_num = -1;
34  bool sub_enabled = false;
35 };
36 
40 {
41 public:
43  CDVDStateSerializer() = default;
44 
46  ~CDVDStateSerializer() = default;
47 
54  bool XMLToDVDState(DVDState& state, const std::string& xmlstate);
55 
61  bool DVDStateToXML(std::string& xmlstate, const DVDState& state);
62 
63 private:
69  void AddXMLElement(tinyxml2::XMLElement& root, const std::string& name, const std::string& value);
70 };
Pod structure which represents the current dvd state with respect to dvdnav properties.
Definition: DVDStateSerializer.h:19
Definition: SkinTimerManager.h:18
Auxiliar class to serialize/deserialize the dvd state (into/from XML)
Definition: DVDStateSerializer.h:39