1 /*
2  *  Copyright (C) 2005-2018 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 "guilib/guiinfo/GUIInfoLabel.h"
12 #include "interfaces/info/InfoBool.h"
13 
14 #include <string>
15 #include <vector>
16 
17 class TiXmlElement;
18 
19 namespace INFO
20 {
21 class CSkinVariableString;
22 
23 class CSkinVariable
24 {
25 public:
26   static const CSkinVariableString* CreateFromXML(const TiXmlElement& node, int context);
27 };
28 
29 class CSkinVariableString
30 {
31 public:
32   const std::string& GetName() const;
33   int GetContext() const;
34   std::string GetValue(bool preferImage = false, const CGUIListItem *item = nullptr) const;
35 private:
36   CSkinVariableString();
37 
38   std::string m_name;
39   int m_context;
40 
41   struct ConditionLabelPair
42   {
43     INFO::InfoPtr m_condition;
44     KODI::GUILIB::GUIINFO::CGUIInfoLabel m_label;
45   };
46 
47   typedef std::vector<ConditionLabelPair> VECCONDITIONLABELPAIR;
48   VECCONDITIONLABELPAIR m_conditionLabelPairs;
49 
50   friend class CSkinVariable;
51 };
52 
53 }
54