|
Kodi Docs 20.0
Kodi is an open source media player and entertainment hub.
|
#include <ProfileManager.h>
Public Member Functions | |
| CProfileManager () | |
| CProfileManager (const CProfileManager &)=delete | |
| CProfileManager & | operator= (CProfileManager const &)=delete |
| ~CProfileManager () override | |
| void | Initialize (const std::shared_ptr< CSettings > &settings) |
| void | Uninitialize () |
| void | OnSettingsLoaded () override |
| Settings have been loaded. More... | |
| void | OnSettingsSaved () const override |
| Settings have been saved. More... | |
| void | OnSettingsCleared () override |
| Settings have been cleared. More... | |
| bool | Load () |
| bool | Save () const |
| Load the user profile information from disk Loads the profiles.xml file and creates the list of profiles. If no profiles exist, a master user is created. Should be called after special://masterprofile/ has been defined. More... | |
| void | Clear () |
| Save the user profile information to disk Saves the list of profiles to the profiles.xml file. More... | |
| bool | LoadProfile (unsigned int index) |
| void | LogOff () |
| bool | DeleteProfile (unsigned int index) |
| void | CreateProfileFolders () |
| const CProfile & | GetMasterProfile () const |
| Retrieve the master profile. More... | |
| const CProfile & | GetCurrentProfile () const |
| Retrieve the current profile. More... | |
| const CProfile * | GetProfile (unsigned int index) const |
| Retrieve the profile from an index. More... | |
| CProfile * | GetProfile (unsigned int index) |
| Retrieve the profile from an index. More... | |
| int | GetProfileIndex (const std::string &name) const |
| Retrieve index of a particular profile by name. More... | |
| size_t | GetNumberOfProfiles () const |
| Retrieve the number of profiles. More... | |
| void | AddProfile (const CProfile &profile) |
| Add a new profile. More... | |
| bool | UsingLoginScreen () const |
| Are we using the login screen? More... | |
| void | ToggleLoginScreen () |
| Toggle login screen use on and off Toggles the login screen state. More... | |
| bool | IsMasterProfile () const |
| Are we the master user? More... | |
| void | UpdateCurrentProfileDate () |
| Update the date of the current profile. More... | |
| void | LoadMasterProfileForLogin () |
| Load the master user for the purposes of logging in Loads the master user. Identical to LoadProfile(0) but doesn't update the last logged in details. More... | |
| uint32_t | GetLastUsedProfileIndex () const |
| Retrieve the last used profile index. More... | |
| uint32_t | GetCurrentProfileIndex () const |
| Retrieve the current profile index. More... | |
| int | GetNextProfileId () const |
| Retrieve the next id to use for a new profile. More... | |
| int | GetCurrentProfileId () const |
| int | GetAutoLoginProfileId () const |
| Retrieve the autologin profile id Retrieves the autologin profile id. When set to -1, then the last used profile will be loaded. More... | |
| void | SetAutoLoginProfileId (const int profileId) |
| Retrieve the autologin profile id Retrieves the autologin profile id. When set to -1, then the last used profile will be loaded. More... | |
| bool | GetProfileName (const unsigned int profileId, std::string &name) const |
| Retrieve the name of a particular profile by index. More... | |
| std::string | GetUserDataFolder () const |
| std::string | GetProfileUserDataFolder () const |
| std::string | GetDatabaseFolder () const |
| std::string | GetCDDBFolder () const |
| std::string | GetThumbnailsFolder () const |
| std::string | GetVideoThumbFolder () const |
| std::string | GetBookmarksThumbFolder () const |
| std::string | GetLibraryFolder () const |
| std::string | GetSavestatesFolder () const |
| std::string | GetSettingsFile () const |
| std::string | GetUserDataItem (const std::string &strFile) const |
| CEventLog & | GetEventLog () |
Protected Member Functions | |
| void | OnSettingAction (const std::shared_ptr< const CSetting > &setting) override |
| The given setting has been activated. More... | |
Protected Member Functions inherited from ISettingsHandler | |
| virtual | ~ISettingsHandler ()=default |
| virtual bool | OnSettingsLoading () |
| Settings loading has been initiated. More... | |
| virtual bool | OnSettingsSaving () const |
| Settings saving has been initiated. More... | |
| virtual void | OnSettingsUnloaded () |
| Setting values have been unloaded. More... | |
Protected 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. 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... | |
| CProfileManager::CProfileManager | ( | ) |
|
delete |
|
overridedefault |
Add a new profile.
| profile | CProfile to add |
| void CProfileManager::Clear | ( | ) |
Save the user profile information to disk Saves the list of profiles to the profiles.xml file.
| file | XML file to save. |
| void CProfileManager::CreateProfileFolders | ( | ) |
|
inline |
Retrieve the autologin profile id Retrieves the autologin profile id. When set to -1, then the last used profile will be loaded.
| std::string CProfileManager::GetBookmarksThumbFolder | ( | ) | const |
| std::string CProfileManager::GetCDDBFolder | ( | ) | const |
| const CProfile & CProfileManager::GetCurrentProfile | ( | ) | const |
Retrieve the current profile.
|
inline |
|
inline |
Retrieve the current profile index.
| std::string CProfileManager::GetDatabaseFolder | ( | ) | const |
| CEventLog & CProfileManager::GetEventLog | ( | ) |
|
inline |
Retrieve the last used profile index.
| std::string CProfileManager::GetLibraryFolder | ( | ) | const |
| const CProfile & CProfileManager::GetMasterProfile | ( | ) | const |
Retrieve the master profile.
|
inline |
Retrieve the next id to use for a new profile.
|
inline |
Retrieve the number of profiles.
Retrieve the profile from an index.
| unsigned | index of the profile to retrieve |
Retrieve the profile from an index.
| unsigned | index of the profile to retrieve |
| int CProfileManager::GetProfileIndex | ( | const std::string & | name | ) | const |
Retrieve index of a particular profile by name.
| name | name of the profile index to retrieve |
Retrieve the name of a particular profile by index.
| profileId | profile index for which to retrieve the name |
| name | will hold the name of the profile when a valid profile index has been provided |
| std::string CProfileManager::GetProfileUserDataFolder | ( | ) | const |
| std::string CProfileManager::GetSavestatesFolder | ( | ) | const |
| std::string CProfileManager::GetSettingsFile | ( | ) | const |
| std::string CProfileManager::GetThumbnailsFolder | ( | ) | const |
| std::string CProfileManager::GetUserDataFolder | ( | ) | const |
| std::string CProfileManager::GetUserDataItem | ( | const std::string & | strFile | ) | const |
| std::string CProfileManager::GetVideoThumbFolder | ( | ) | const |
|
inline |
Are we the master user?
| bool CProfileManager::Load | ( | ) |
| void CProfileManager::LoadMasterProfileForLogin | ( | ) |
Load the master user for the purposes of logging in Loads the master user. Identical to LoadProfile(0) but doesn't update the last logged in details.
| void CProfileManager::LogOff | ( | ) |
|
overrideprotectedvirtual |
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.
|
overridevirtual |
Settings have been cleared.
This callback can be used to trigger clearing any state variables.
Reimplemented from ISettingsHandler.
|
overridevirtual |
Settings have been loaded.
This callback can be used to trigger loading other settings.
Reimplemented from ISettingsHandler.
|
overridevirtual |
Settings have been saved.
This callback can be used to trigger saving other settings.
Reimplemented from ISettingsHandler.
|
delete |
| bool CProfileManager::Save | ( | ) | const |
Load the user profile information from disk Loads the profiles.xml file and creates the list of profiles. If no profiles exist, a master user is created. Should be called after special://masterprofile/ has been defined.
| file | XML file to load. |
Retrieve the autologin profile id Retrieves the autologin profile id. When set to -1, then the last used profile will be loaded.
|
inline |
Toggle login screen use on and off Toggles the login screen state.
| void CProfileManager::Uninitialize | ( | ) |
| void CProfileManager::UpdateCurrentProfileDate | ( | ) |
Update the date of the current profile.
|
inline |
Are we using the login screen?