Merge pull request #4630 from Red-F/gotham-resume-pvr-lastplayedposition
[vuplus_xbmc] / xbmc / GUIPassword.h
index 7719dd9..a090a82 100644 (file)
@@ -2,7 +2,7 @@
 
 /*
  *      Copyright (C) 2005-2013 Team XBMC
- *      http://www.xbmc.org
+ *      http://xbmc.org
  *
  *  This Program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -23,8 +23,9 @@
 #include <map>
 #include <vector>
 
-#include "settings/ISettingCallback.h"
+#include "settings/lib/ISettingCallback.h"
 #include "utils/StdString.h"
+#include "settings/lib/Setting.h"
 
 class CFileItem;
 class CMediaSource;
@@ -42,6 +43,20 @@ typedef enum
   LOCK_MODE_EEPROM_PARENTAL    =  5
 } LockType;
 
+namespace LOCK_LEVEL {
+  /**
+   Specifies, what Settings levels are locked for the user
+   **/
+  enum SETTINGS_LOCK
+  {
+    NONE,     //settings are unlocked => user can access all settings levels
+    ALL,      //all settings are locked => user always has to enter password, when entering the settings screen
+    STANDARD, //settings level standard and up are locked => user can still access the beginner levels
+    ADVANCED, 
+    EXPERT
+  };
+}
+
 class CGUIPassword : public ISettingCallback
 {
 public:
@@ -58,6 +73,13 @@ public:
 
   void UpdateMasterLockRetryCount(bool bResetCount);
   bool CheckStartUpLock();
+  /*! \brief Checks if the current profile is allowed to access the given settings level
+   \param level - The level to check
+   \param enforce - If false, CheckSettingLevelLock is allowed to lower the current settings level
+                    to a level we're allowed to access
+   \returns true if we're allowed to access the settings
+   */
+  bool CheckSettingLevelLock(const SettingLevel& level, bool enforce = false);
   bool CheckMenuLock(int iWindowID);
   bool SetMasterLockMode(bool bDetails=true);
   bool LockSource(const CStdString& strType, const CStdString& strName, bool bState);