Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
#include <GUIPassword.h>
Public Member Functions | |
CGUIPassword (void) | |
~CGUIPassword (void) override | |
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. | |
bool | IsItemUnlocked (CMediaSource *pItem, const std::string &strType) |
Tests if the user is allowed to access the Mediasource. | |
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. | |
bool | CheckMenuLock (int iWindowID) |
bool | IsVideoUnlocked () |
bool | IsMusicUnlocked () |
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, std::vector< CMediaSource > &sources) |
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. | |
void | SetMediaSourcePath (const std::string &strMediaSourcePath) |
void | OnSettingAction (const std::shared_ptr< const CSetting > &setting) override |
The given setting has been activated. | |
Public Member Functions inherited from ISettingCallback | |
virtual | ~ISettingCallback ()=default |
virtual bool | OnSettingChanging (const std::shared_ptr< const CSetting > &setting) |
The value of the given setting is being changed. | |
virtual void | OnSettingChanged (const std::shared_ptr< const CSetting > &setting) |
The value of the given setting has changed. | |
virtual bool | OnSettingUpdate (const std::shared_ptr< CSetting > &setting, const char *oldSettingId, const TiXmlNode *oldSettingNode) |
The given setting needs to be updated. | |
virtual void | OnSettingPropertyChanged (const std::shared_ptr< const CSetting > &setting, const char *propertyName) |
The given property of the given setting has changed. | |
Public Attributes | |
bool | bMasterUser |
int | iMasterLockRetriesLeft |
CGUIPassword::CGUIPassword | ( | void | ) |
|
overridedefault |
bool CGUIPassword::CheckLock | ( | LockType | btnType, |
const std::string & | strPassword, | ||
int | iHeading, | ||
bool & | bCanceled ) |
bool CGUIPassword::CheckSettingLevelLock | ( | const SettingLevel & | level, |
bool | enforce = false ) |
Checks if the current profile is allowed to access the given settings level.
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 |
bool CGUIPassword::CheckStartUpLock | ( | ) |
bool CGUIPassword::IsDatabasePathUnlocked | ( | const std::string & | strPath, |
std::vector< CMediaSource > & | sources ) |
Tests if the user is allowed to access the share folder.
pItem | The share folder item to access |
strType | The type of share being accessed, e.g. "music", "video", etc. See CSettings::UpdateSources() |
bool CGUIPassword::IsItemUnlocked | ( | CMediaSource * | pItem, |
const std::string & | strType ) |
Tests if the user is allowed to access the Mediasource.
pItem | The share folder item to access |
strType | The type of share being accessed, e.g. "music", "video", etc. See CSettings::UpdateSources() |
bool CGUIPassword::IsItemUnlocked | ( | T | pItem, |
const std::string & | strType, | ||
const std::string & | strLabel, | ||
const std::string & | strHeading ) |
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.
type | The type of share being accessed, e.g. "music", "video", etc. |
file | The file to check lock state for |
bool CGUIPassword::IsMusicUnlocked | ( | ) |
bool CGUIPassword::IsVideoUnlocked | ( | ) |
bool CGUIPassword::LockSource | ( | const std::string & | strType, |
const std::string & | strName, | ||
bool | bState ) |
|
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.
setting | The setting which has been activated. |
Reimplemented from ISettingCallback.
void CGUIPassword::RemoveSourceLocks | ( | ) |
|
inline |
bool CGUIPassword::bMasterUser |
int CGUIPassword::iMasterLockRetriesLeft |