Remove LiveTV menu.
[vuplus_xbmc] / xbmc / settings / SkinSettings.h
1 #pragma once
2 /*
3  *      Copyright (C) 2013 Team XBMC
4  *      http://xbmc.org
5  *
6  *  This Program is free software; you can redistribute it and/or modify
7  *  it under the terms of the GNU General Public License as published by
8  *  the Free Software Foundation; either version 2, or (at your option)
9  *  any later version.
10  *
11  *  This Program is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  *  GNU General Public License for more details.
15  *
16  *  You should have received a copy of the GNU General Public License
17  *  along with XBMC; see the file COPYING.  If not, see
18  *  <http://www.gnu.org/licenses/>.
19  *
20  */
21
22 #include <map>
23 #include <string>
24
25 #include "settings/lib/ISubSettings.h"
26 #include "threads/CriticalSection.h"
27
28 class TiXmlNode;
29
30 class CSkinString
31 {
32 public:
33   std::string name;
34   std::string value;
35 };
36
37 class CSkinBool
38 {
39 public:
40   CSkinBool()
41     : value(false)
42   { }
43
44   std::string name;
45   bool value;
46 };
47
48 class CSkinSettings : public ISubSettings
49 {
50 public:
51   static CSkinSettings& Get();
52
53   virtual bool Load(const TiXmlNode *settings);
54   virtual bool Save(TiXmlNode *settings) const;
55   virtual void Clear();
56
57   int TranslateString(const std::string &setting);
58   const std::string& GetString(int setting) const;
59   void SetString(int setting, const std::string &label);
60
61   int TranslateBool(const std::string &setting);
62   bool GetBool(int setting) const;
63   void SetBool(int setting, bool set);
64
65   void Reset(const std::string &setting);
66   void Reset();
67
68 protected:
69   CSkinSettings();
70   CSkinSettings(const CSkinSettings&);
71   CSkinSettings& operator=(CSkinSettings const&);
72   virtual ~CSkinSettings();
73
74   std::string GetCurrentSkin() const;
75
76 private:
77   std::map<int, CSkinString> m_strings;
78   std::map<int, CSkinBool> m_bools;
79   CCriticalSection m_critical;
80 };