11 #include "profiles/Profile.h" 12 #include "settings/lib/ISettingCallback.h" 13 #include "settings/lib/ISettingsHandler.h" 14 #include "threads/CriticalSection.h" 34 void Initialize(
const std::shared_ptr<CSettings>&
settings);
58 bool LoadProfile(
unsigned int index);
61 bool DeleteProfile(
unsigned int index);
63 void CreateProfileFolders();
113 m_usingLoginScreen = !m_usingLoginScreen;
164 m_autoLoginProfile = profileId;
173 bool GetProfileName(
const unsigned int profileId, std::string& name)
const;
175 std::string GetUserDataFolder()
const;
176 std::string GetProfileUserDataFolder()
const;
177 std::string GetDatabaseFolder()
const;
178 std::string GetCDDBFolder()
const;
179 std::string GetThumbnailsFolder()
const;
180 std::string GetVideoThumbFolder()
const;
181 std::string GetBookmarksThumbFolder()
const;
182 std::string GetLibraryFolder()
const;
183 std::string GetSavestatesFolder()
const;
184 std::string GetSettingsFile()
const;
187 std::string GetUserDataItem(
const std::string& strFile)
const;
194 void OnSettingAction(
const std::shared_ptr<const CSetting>& setting)
override;
200 void SetCurrentProfileId(
unsigned int profileId);
202 void PrepareLoadProfile(
unsigned int profileIndex);
203 void FinalizeLoadProfile();
206 std::shared_ptr<CSettings> m_settings;
208 std::vector<CProfile> m_profiles;
209 bool m_usingLoginScreen =
false;
210 bool m_profileLoadedForLogin =
false;
211 bool m_previousProfileLoadedForLogin =
false;
212 int m_autoLoginProfile = -1;
213 unsigned int m_lastUsedProfile = 0;
214 unsigned int m_currentProfile =
216 int m_nextProfileId =
218 mutable CCriticalSection m_critical;
221 std::unique_ptr<CEventLogManager> m_eventLogs;
const CProfile * GetProfile(unsigned int index) const
Retrieve the profile from an index.
Definition: ProfileManager.cpp:560
bool GetProfileName(const unsigned int profileId, std::string &name) const
Retrieve the name of a particular profile by index.
Definition: ProfileManager.cpp:631
uint32_t GetCurrentProfileIndex() const
Retrieve the current profile index.
Definition: ProfileManager.h:141
void OnSettingAction(const std::shared_ptr< const CSetting > &setting) override
The given setting has been activated.
Definition: ProfileManager.cpp:729
int GetAutoLoginProfileId() const
Retrieve the autologin profile id Retrieves the autologin profile id. When set to -1...
Definition: ProfileManager.h:155
Wrapper around CSettingsManager responsible for properly setting up the settings manager and register...
Definition: Settings.h:27
void OnSettingsCleared() override
Settings have been cleared.
Definition: ProfileManager.cpp:134
Definition: ISettingCallback.h:16
int GetProfileIndex(const std::string &name) const
Retrieve index of a particular profile by name.
Definition: ProfileManager.cpp:578
void Clear()
Save the user profile information to disk Saves the list of profiles to the profiles.xml file.
Definition: ProfileManager.cpp:249
bool IsMasterProfile() const
Are we the master user?
Definition: ProfileManager.h:120
void UpdateCurrentProfileDate()
Update the date of the current profile.
Definition: ProfileManager.cpp:603
void OnSettingsSaved() const override
Settings have been saved.
Definition: ProfileManager.cpp:128
bool UsingLoginScreen() const
Are we using the login screen?
Definition: ProfileManager.h:106
Definition: EventLog.h:23
int GetNextProfileId() const
Retrieve the next id to use for a new profile.
Definition: ProfileManager.h:146
void OnSettingsLoaded() override
Settings have been loaded.
Definition: ProfileManager.cpp:112
void ToggleLoginScreen()
Toggle login screen use on and off Toggles the login screen state.
Definition: ProfileManager.h:111
uint32_t GetLastUsedProfileIndex() const
Retrieve the last used profile index.
Definition: ProfileManager.h:136
const CProfile & GetCurrentProfile() const
Retrieve the current profile.
Definition: ProfileManager.cpp:550
Definition: ProfileManager.h:25
Definition: settings.py:1
const CProfile & GetMasterProfile() const
Retrieve the master profile.
Definition: ProfileManager.cpp:540
void SetAutoLoginProfileId(const int profileId)
Retrieve the autologin profile id Retrieves the autologin profile id. When set to -1...
Definition: ProfileManager.h:162
Interface defining methods being called by the settings system if an action is performed on multiple/...
Definition: ISettingsHandler.h:16
bool Save() const
Load the user profile information from disk Loads the profiles.xml file and creates the list of profi...
Definition: ProfileManager.cpp:225
void LoadMasterProfileForLogin()
Load the master user for the purposes of logging in Loads the master user. Identical to LoadProfile(0...
Definition: ProfileManager.cpp:614
size_t GetNumberOfProfiles() const
Retrieve the number of profiles.
Definition: ProfileManager.h:96
void AddProfile(const CProfile &profile)
Add a new profile.
Definition: ProfileManager.cpp:590
Definition: EventLogManager.h:18