kodi
SettingConditions.h
1 /*
2  * Copyright (C) 2014-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 "settings/lib/SettingConditions.h"
12 
13 #include <set>
14 #include <string>
15 
16 class CProfile;
17 class CProfileManager;
18 
20 {
21 public:
22  static void Initialize();
23  static void Deinitialize();
24 
25  static const CProfile& GetCurrentProfile();
26 
27  static const std::set<std::string>& GetSimpleConditions() { return m_simpleConditions; }
28  static const std::map<std::string, SettingConditionCheck>& GetComplexConditions() { return m_complexConditions; }
29 
30  static bool Check(const std::string& condition,
31  const std::string& value = "",
32  const std::shared_ptr<const CSetting>& setting = NULL);
33 
34 private:
35  // Initialization parameters
36  static const CProfileManager *m_profileManager;
37 
38  static std::set<std::string> m_simpleConditions;
39  static std::map<std::string, SettingConditionCheck> m_complexConditions;
40 };
Definition: SettingConditions.h:19
Definition: ProfileManager.h:25
Definition: Profile.h:19