| 
    Kodi Documentation 22.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.   | |
| void | OnSettingsSaved () const override | 
| Settings have been saved.   | |
| void | OnSettingsCleared () override | 
| Settings have been cleared.   | |
| 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.   | |
| void | Clear () | 
| Save the user profile information to disk Saves the list of profiles to the profiles.xml file.   | |
| bool | LoadProfile (unsigned int index) | 
| void | LogOff () | 
| bool | DeleteProfile (unsigned int index) | 
| void | CreateProfileFolders () | 
| const CProfile & | GetMasterProfile () const | 
| Retrieve the master profile.   | |
| const CProfile & | GetCurrentProfile () const | 
| Retrieve the current profile.   | |
| const CProfile * | GetProfile (unsigned int index) const | 
| Retrieve the profile from an index.   | |
| CProfile * | GetProfile (unsigned int index) | 
| Retrieve the profile from an index.   | |
| int | GetProfileIndex (const std::string &name) const | 
| Retrieve index of a particular profile by name.   | |
| size_t | GetNumberOfProfiles () const | 
| Retrieve the number of profiles.   | |
| void | AddProfile (const CProfile &profile) | 
| Add a new profile.   | |
| bool | UsingLoginScreen () const | 
| Are we using the login screen?   | |
| void | ToggleLoginScreen () | 
| Toggle login screen use on and off Toggles the login screen state.   | |
| bool | IsMasterProfile () const | 
| Are we the master user?   | |
| void | UpdateCurrentProfileDate () | 
| Update the date of the current profile.   | |
| void | LoadMasterProfileForLogin () | 
| Load the master user for the purposes of logging in Loads the master user. Identical to LoadProfile(MASTER_PROFILE_ID) but doesn't update the last logged in details.   | |
| uint32_t | GetLastUsedProfileIndex () const | 
| Retrieve the last used profile index.   | |
| uint32_t | GetCurrentProfileIndex () const | 
| Retrieve the current profile index.   | |
| int | GetNextProfileId () const | 
| Retrieve the next id to use for a new profile.   | |
| int | GetCurrentProfileId () const | 
| int | GetAutoLoginProfileId () const | 
| Retrieve the autologin profile id Retrieves the autologin profile id. When set to INVALID_PROFILE_ID, then the last used profile will be loaded.   | |
| void | SetAutoLoginProfileId (const int profileId) | 
| Set the autologin profile id sets the autologin profile id. When set to INVALID_PROFILE_ID, then the last used profile will be loaded.   | |
| bool | GetProfileName (const unsigned int profileId, std::string &name) const | 
| Retrieve the name of a particular profile by index.   | |
| 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.   | |
  Protected Member Functions inherited from ISettingsHandler | |
| virtual | ~ISettingsHandler ()=default | 
| virtual bool | OnSettingsLoading () | 
| Settings loading has been initiated.   | |
| virtual bool | OnSettingsSaving () const | 
| Settings saving has been initiated.   | |
| virtual void | OnSettingsUnloaded () | 
| Setting values have been unloaded.   | |
  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.   | |
| 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.   | |
| 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 INVALID_PROFILE_ID, 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(MASTER_PROFILE_ID) 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. | 
Set the autologin profile id sets the autologin profile id. When set to INVALID_PROFILE_ID, then the last used profile will be loaded.
| profileId | the id for the autologin profile | 
      
  | 
  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?