xbmc
Public Member Functions | Public Attributes | List of all members
CGUIPassword Class Reference
Inheritance diagram for CGUIPassword:
Inheritance graph
[legend]
Collaboration diagram for CGUIPassword:
Collaboration graph
[legend]

Public Member Functions

template<typename T >
bool IsItemUnlocked (T pItem, const std::string &strType, const std::string &strLabel, const std::string &strHeading)
 
bool IsItemUnlocked (CFileItem *pItem, const std::string &strType)
 Tests if the user is allowed to access the share folder. More...
 
bool IsItemUnlocked (CMediaSource *pItem, const std::string &strType)
 Tests if the user is allowed to access the Mediasource. More...
 
bool CheckLock (LockType btnType, const std::string &strPassword, int iHeading)
 
bool CheckLock (LockType btnType, const std::string &strPassword, int iHeading, bool &bCanceled)
 
bool IsProfileLockUnlocked (int iProfile=-1)
 
bool IsProfileLockUnlocked (int iProfile, bool &bCanceled, bool prompt=true)
 
bool IsMasterLockUnlocked (bool bPromptUser)
 
bool IsMasterLockUnlocked (bool bPromptUser, bool &bCanceled)
 
void UpdateMasterLockRetryCount (bool bResetCount)
 
bool CheckStartUpLock ()
 
bool CheckSettingLevelLock (const SettingLevel &level, bool enforce=false)
 Checks if the current profile is allowed to access the given settings level. More...
 
bool CheckMenuLock (int iWindowID)
 
bool SetMasterLockMode (bool bDetails=true)
 
bool LockSource (const std::string &strType, const std::string &strName, bool bState)
 
void LockSources (bool lock)
 
void RemoveSourceLocks ()
 
bool IsDatabasePathUnlocked (const std::string &strPath, VECSOURCES &vecSources)
 
bool IsMediaFileUnlocked (const std::string &type, const std::string &file) const
 Helper function to test if a matching mediasource is currently unlocked for a given media file. More...
 
void SetMediaSourcePath (const std::string &strMediaSourcePath)
 
void OnSettingAction (const std::shared_ptr< const CSetting > &setting) override
 The given setting has been activated. More...
 
- Public Member Functions inherited from ISettingCallback
virtual bool OnSettingChanging (const std::shared_ptr< const CSetting > &setting)
 The value of the given setting is being changed. More...
 
virtual void OnSettingChanged (const std::shared_ptr< const CSetting > &setting)
 The value of the given setting has changed. More...
 
virtual bool OnSettingUpdate (const std::shared_ptr< CSetting > &setting, const char *oldSettingId, const TiXmlNode *oldSettingNode)
 The given setting needs to be updated. More...
 
virtual void OnSettingPropertyChanged (const std::shared_ptr< const CSetting > &setting, const char *propertyName)
 The given property of the given setting has changed. More...
 

Public Attributes

bool bMasterUser
 
int iMasterLockRetriesLeft
 

Member Function Documentation

◆ CheckSettingLevelLock()

bool CGUIPassword::CheckSettingLevelLock ( const SettingLevel level,
bool  enforce = false 
)

Checks if the current profile is allowed to access the given settings level.

Parameters
level- The level to check
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

◆ IsItemUnlocked() [1/2]

bool CGUIPassword::IsItemUnlocked ( CFileItem pItem,
const std::string &  strType 
)

Tests if the user is allowed to access the share folder.

Parameters
pItemThe share folder item to access
strTypeThe type of share being accessed, e.g. "music", "video", etc. See CSettings::UpdateSources()
Returns
If access is granted, returns true

◆ IsItemUnlocked() [2/2]

bool CGUIPassword::IsItemUnlocked ( CMediaSource pItem,
const std::string &  strType 
)

Tests if the user is allowed to access the Mediasource.

Parameters
pItemThe share folder item to access
strTypeThe type of share being accessed, e.g. "music", "video", etc. See CSettings::UpdateSources()
Returns
If access is granted, returns true

◆ IsMediaFileUnlocked()

bool CGUIPassword::IsMediaFileUnlocked ( const std::string &  type,
const std::string &  file 
) const

Helper function to test if a matching mediasource is currently unlocked for a given media file.

Note
this function only returns the lock state. it does not provide unlock functionality
Parameters
typeThe type of share being accessed, e.g. "music", "video", etc.
fileThe file to check lock state for
Returns
If access is granted, returns true

◆ OnSettingAction()

void CGUIPassword::OnSettingAction ( const std::shared_ptr< const CSetting > &  setting)
overridevirtual

The given setting has been activated.

This callback is triggered whenever the given setting has been activated. This callback is only fired for CSettingAction settings.

Parameters
settingThe setting which has been activated.

Reimplemented from ISettingCallback.


The documentation for this class was generated from the following files: