PageRenderTime 67ms CodeModel.GetById 2ms app.highlight 60ms RepoModel.GetById 2ms app.codeStats 0ms

/xbmc/settings/Settings.h

http://github.com/xbmc/xbmc
C Header | 514 lines | 410 code | 22 blank | 82 comment | 0 complexity | 649e86288d538411794598367fbc10e3 MD5 | raw file
  1/*
  2 *  Copyright (C) 2005-2018 Team Kodi
  3 *  This file is part of Kodi - https://kodi.tv
  4 *
  5 *  SPDX-License-Identifier: GPL-2.0-or-later
  6 *  See LICENSES/README.md for more information.
  7 */
  8
  9#pragma once
 10
 11#include "settings/ISubSettings.h"
 12#include "settings/SettingControl.h"
 13#include "settings/SettingCreator.h"
 14#include "settings/SettingsBase.h"
 15
 16#include <string>
 17
 18class CSettingList;
 19class TiXmlNode;
 20
 21/*!
 22 \brief Wrapper around CSettingsManager responsible for properly setting up
 23 the settings manager and registering all the callbacks, handlers and custom
 24 setting types.
 25 \sa CSettingsManager
 26 */
 27class CSettings : public CSettingsBase, public CSettingCreator, public CSettingControlCreator
 28                , private ISubSettings
 29{
 30public:
 31  static const std::string SETTING_LOOKANDFEEL_SKIN;
 32  static const std::string SETTING_LOOKANDFEEL_SKINSETTINGS;
 33  static const std::string SETTING_LOOKANDFEEL_SKINTHEME;
 34  static const std::string SETTING_LOOKANDFEEL_SKINCOLORS;
 35  static const std::string SETTING_LOOKANDFEEL_FONT;
 36  static const std::string SETTING_LOOKANDFEEL_SKINZOOM;
 37  static const std::string SETTING_LOOKANDFEEL_STARTUPACTION;
 38  static const std::string SETTING_LOOKANDFEEL_STARTUPWINDOW;
 39  static const std::string SETTING_LOOKANDFEEL_SOUNDSKIN;
 40  static const std::string SETTING_LOOKANDFEEL_ENABLERSSFEEDS;
 41  static const std::string SETTING_LOOKANDFEEL_RSSEDIT;
 42  static const std::string SETTING_LOOKANDFEEL_STEREOSTRENGTH;
 43  static const std::string SETTING_LOCALE_LANGUAGE;
 44  static const std::string SETTING_LOCALE_COUNTRY;
 45  static const std::string SETTING_LOCALE_CHARSET;
 46  static const std::string SETTING_LOCALE_KEYBOARDLAYOUTS;
 47  static const std::string SETTING_LOCALE_ACTIVEKEYBOARDLAYOUT;
 48  static const std::string SETTING_LOCALE_TIMEZONECOUNTRY;
 49  static const std::string SETTING_LOCALE_TIMEZONE;
 50  static const std::string SETTING_LOCALE_SHORTDATEFORMAT;
 51  static const std::string SETTING_LOCALE_LONGDATEFORMAT;
 52  static const std::string SETTING_LOCALE_TIMEFORMAT;
 53  static const std::string SETTING_LOCALE_USE24HOURCLOCK;
 54  static const std::string SETTING_LOCALE_TEMPERATUREUNIT;
 55  static const std::string SETTING_LOCALE_SPEEDUNIT;
 56  static const std::string SETTING_FILELISTS_SHOWPARENTDIRITEMS;
 57  static const std::string SETTING_FILELISTS_SHOWEXTENSIONS;
 58  static const std::string SETTING_FILELISTS_IGNORETHEWHENSORTING;
 59  static const std::string SETTING_FILELISTS_ALLOWFILEDELETION;
 60  static const std::string SETTING_FILELISTS_SHOWADDSOURCEBUTTONS;
 61  static const std::string SETTING_FILELISTS_SHOWHIDDEN;
 62  static const std::string SETTING_SCREENSAVER_MODE;
 63  static const std::string SETTING_SCREENSAVER_SETTINGS;
 64  static const std::string SETTING_SCREENSAVER_PREVIEW;
 65  static const std::string SETTING_SCREENSAVER_TIME;
 66  static const std::string SETTING_SCREENSAVER_USEMUSICVISINSTEAD;
 67  static const std::string SETTING_SCREENSAVER_USEDIMONPAUSE;
 68  static const std::string SETTING_WINDOW_WIDTH;
 69  static const std::string SETTING_WINDOW_HEIGHT;
 70  static const std::string SETTING_VIDEOLIBRARY_SHOWUNWATCHEDPLOTS;
 71  static const std::string SETTING_VIDEOLIBRARY_ACTORTHUMBS;
 72  static const std::string SETTING_MYVIDEOS_FLATTEN;
 73  static const std::string SETTING_VIDEOLIBRARY_FLATTENTVSHOWS;
 74  static const std::string SETTING_VIDEOLIBRARY_TVSHOWSSELECTFIRSTUNWATCHEDITEM;
 75  static const std::string SETTING_VIDEOLIBRARY_TVSHOWSINCLUDEALLSEASONSANDSPECIALS;
 76  static const std::string SETTING_VIDEOLIBRARY_SHOWALLITEMS;
 77  static const std::string SETTING_VIDEOLIBRARY_GROUPMOVIESETS;
 78  static const std::string SETTING_VIDEOLIBRARY_GROUPSINGLEITEMSETS;
 79  static const std::string SETTING_VIDEOLIBRARY_UPDATEONSTARTUP;
 80  static const std::string SETTING_VIDEOLIBRARY_BACKGROUNDUPDATE;
 81  static const std::string SETTING_VIDEOLIBRARY_CLEANUP;
 82  static const std::string SETTING_VIDEOLIBRARY_EXPORT;
 83  static const std::string SETTING_VIDEOLIBRARY_IMPORT;
 84  static const std::string SETTING_VIDEOLIBRARY_SHOWEMPTYTVSHOWS;
 85  static const std::string SETTING_VIDEOLIBRARY_MOVIESETSFOLDER;
 86  static const std::string SETTING_LOCALE_AUDIOLANGUAGE;
 87  static const std::string SETTING_VIDEOPLAYER_PREFERDEFAULTFLAG;
 88  static const std::string SETTING_VIDEOPLAYER_AUTOPLAYNEXTITEM;
 89  static const std::string SETTING_VIDEOPLAYER_SEEKSTEPS;
 90  static const std::string SETTING_VIDEOPLAYER_SEEKDELAY;
 91  static const std::string SETTING_VIDEOPLAYER_ADJUSTREFRESHRATE;
 92  static const std::string SETTING_VIDEOPLAYER_USEDISPLAYASCLOCK;
 93  static const std::string SETTING_VIDEOPLAYER_ERRORINASPECT;
 94  static const std::string SETTING_VIDEOPLAYER_STRETCH43;
 95  static const std::string SETTING_VIDEOPLAYER_TELETEXTENABLED;
 96  static const std::string SETTING_VIDEOPLAYER_TELETEXTSCALE;
 97  static const std::string SETTING_VIDEOPLAYER_STEREOSCOPICPLAYBACKMODE;
 98  static const std::string SETTING_VIDEOPLAYER_QUITSTEREOMODEONSTOP;
 99  static const std::string SETTING_VIDEOPLAYER_RENDERMETHOD;
100  static const std::string SETTING_VIDEOPLAYER_HQSCALERS;
101  static const std::string SETTING_VIDEOPLAYER_USEMEDIACODEC;
102  static const std::string SETTING_VIDEOPLAYER_USEMEDIACODECSURFACE;
103  static const std::string SETTING_VIDEOPLAYER_USEVDPAU;
104  static const std::string SETTING_VIDEOPLAYER_USEVDPAUMIXER;
105  static const std::string SETTING_VIDEOPLAYER_USEVDPAUMPEG2;
106  static const std::string SETTING_VIDEOPLAYER_USEVDPAUMPEG4;
107  static const std::string SETTING_VIDEOPLAYER_USEVDPAUVC1;
108  static const std::string SETTING_VIDEOPLAYER_USEDXVA2;
109  static const std::string SETTING_VIDEOPLAYER_USEVTB;
110  static const std::string SETTING_VIDEOPLAYER_USEMMAL;
111  static const std::string SETTING_VIDEOPLAYER_USEPRIMEDECODER;
112  static const std::string SETTING_VIDEOPLAYER_USESTAGEFRIGHT;
113  static const std::string SETTING_VIDEOPLAYER_LIMITGUIUPDATE;
114  static const std::string SETTING_VIDEOPLAYER_SUPPORTMVC;
115  static const std::string SETTING_MYVIDEOS_SELECTACTION;
116  static const std::string SETTING_MYVIDEOS_USETAGS;
117  static const std::string SETTING_MYVIDEOS_EXTRACTFLAGS;
118  static const std::string SETTING_MYVIDEOS_EXTRACTCHAPTERTHUMBS;
119  static const std::string SETTING_MYVIDEOS_REPLACELABELS;
120  static const std::string SETTING_MYVIDEOS_EXTRACTTHUMB;
121  static const std::string SETTING_MYVIDEOS_STACKVIDEOS;
122  static const std::string SETTING_LOCALE_SUBTITLELANGUAGE;
123  static const std::string SETTING_SUBTITLES_PARSECAPTIONS;
124  static const std::string SETTING_SUBTITLES_ALIGN;
125  static const std::string SETTING_SUBTITLES_STEREOSCOPICDEPTH;
126  static const std::string SETTING_SUBTITLES_FONT;
127  static const std::string SETTING_SUBTITLES_HEIGHT;
128  static const std::string SETTING_SUBTITLES_STYLE;
129  static const std::string SETTING_SUBTITLES_COLOR;
130  static const std::string SETTING_SUBTITLES_BGCOLOR;
131  static const std::string SETTING_SUBTITLES_BGOPACITY;
132  static const std::string SETTING_SUBTITLES_CHARSET;
133  static const std::string SETTING_SUBTITLES_OVERRIDEASSFONTS;
134  static const std::string SETTING_SUBTITLES_LANGUAGES;
135  static const std::string SETTING_SUBTITLES_STORAGEMODE;
136  static const std::string SETTING_SUBTITLES_CUSTOMPATH;
137  static const std::string SETTING_SUBTITLES_PAUSEONSEARCH;
138  static const std::string SETTING_SUBTITLES_DOWNLOADFIRST;
139  static const std::string SETTING_SUBTITLES_TV;
140  static const std::string SETTING_SUBTITLES_MOVIE;
141  static const std::string SETTING_DVDS_AUTORUN;
142  static const std::string SETTING_DVDS_PLAYERREGION;
143  static const std::string SETTING_DVDS_AUTOMENU;
144  static const std::string SETTING_DISC_PLAYBACK;
145  static const std::string SETTING_BLURAY_PLAYERREGION;
146  static const std::string SETTING_ACCESSIBILITY_AUDIOVISUAL;
147  static const std::string SETTING_ACCESSIBILITY_AUDIOHEARING;
148  static const std::string SETTING_ACCESSIBILITY_SUBHEARING;
149  static const std::string SETTING_SCRAPERS_MOVIESDEFAULT;
150  static const std::string SETTING_SCRAPERS_TVSHOWSDEFAULT;
151  static const std::string SETTING_SCRAPERS_MUSICVIDEOSDEFAULT;
152  static const std::string SETTING_PVRMANAGER_PRESELECTPLAYINGCHANNEL;
153  static const std::string SETTING_PVRMANAGER_SYNCCHANNELGROUPS;
154  static const std::string SETTING_PVRMANAGER_BACKENDCHANNELORDER;
155  static const std::string SETTING_PVRMANAGER_USEBACKENDCHANNELNUMBERS;
156  static const std::string SETTING_PVRMANAGER_STARTGROUPCHANNELNUMBERSFROMONE;
157  static const std::string SETTING_PVRMANAGER_CLIENTPRIORITIES;
158  static const std::string SETTING_PVRMANAGER_CHANNELMANAGER;
159  static const std::string SETTING_PVRMANAGER_GROUPMANAGER;
160  static const std::string SETTING_PVRMANAGER_CHANNELSCAN;
161  static const std::string SETTING_PVRMANAGER_RESETDB;
162  static const std::string SETTING_PVRMENU_DISPLAYCHANNELINFO;
163  static const std::string SETTING_PVRMENU_CLOSECHANNELOSDONSWITCH;
164  static const std::string SETTING_PVRMENU_ICONPATH;
165  static const std::string SETTING_PVRMENU_SEARCHICONS;
166  static const std::string SETTING_EPG_PAST_DAYSTODISPLAY;
167  static const std::string SETTING_EPG_FUTURE_DAYSTODISPLAY;
168  static const std::string SETTING_EPG_SELECTACTION;
169  static const std::string SETTING_EPG_HIDENOINFOAVAILABLE;
170  static const std::string SETTING_EPG_EPGUPDATE;
171  static const std::string SETTING_EPG_PREVENTUPDATESWHILEPLAYINGTV;
172  static const std::string SETTING_EPG_RESETEPG;
173  static const std::string SETTING_PVRPLAYBACK_SWITCHTOFULLSCREENCHANNELTYPES;
174  static const std::string SETTING_PVRPLAYBACK_SIGNALQUALITY;
175  static const std::string SETTING_PVRPLAYBACK_CONFIRMCHANNELSWITCH;
176  static const std::string SETTING_PVRPLAYBACK_CHANNELENTRYTIMEOUT;
177  static const std::string SETTING_PVRPLAYBACK_DELAYMARKLASTWATCHED;
178  static const std::string SETTING_PVRPLAYBACK_FPS;
179  static const std::string SETTING_PVRRECORD_INSTANTRECORDACTION;
180  static const std::string SETTING_PVRRECORD_INSTANTRECORDTIME;
181  static const std::string SETTING_PVRRECORD_MARGINSTART;
182  static const std::string SETTING_PVRRECORD_MARGINEND;
183  static const std::string SETTING_PVRRECORD_TIMERNOTIFICATIONS;
184  static const std::string SETTING_PVRRECORD_GROUPRECORDINGS;
185  static const std::string SETTING_PVRREMINDERS_AUTOCLOSEDELAY;
186  static const std::string SETTING_PVRREMINDERS_AUTORECORD;
187  static const std::string SETTING_PVRPOWERMANAGEMENT_ENABLED;
188  static const std::string SETTING_PVRPOWERMANAGEMENT_BACKENDIDLETIME;
189  static const std::string SETTING_PVRPOWERMANAGEMENT_SETWAKEUPCMD;
190  static const std::string SETTING_PVRPOWERMANAGEMENT_PREWAKEUP;
191  static const std::string SETTING_PVRPOWERMANAGEMENT_DAILYWAKEUP;
192  static const std::string SETTING_PVRPOWERMANAGEMENT_DAILYWAKEUPTIME;
193  static const std::string SETTING_PVRPARENTAL_ENABLED;
194  static const std::string SETTING_PVRPARENTAL_PIN;
195  static const std::string SETTING_PVRPARENTAL_DURATION;
196  static const std::string SETTING_PVRCLIENT_MENUHOOK;
197  static const std::string SETTING_PVRTIMERS_HIDEDISABLEDTIMERS;
198  static const std::string SETTING_MUSICLIBRARY_SHOWCOMPILATIONARTISTS;
199  static const std::string SETTING_MUSICLIBRARY_SHOWDISCS;
200  static const std::string SETTING_MUSICLIBRARY_USEORIGINALDATE;
201  static const std::string SETTING_MUSICLIBRARY_USEARTISTSORTNAME;
202  static const std::string SETTING_MUSICLIBRARY_DOWNLOADINFO;
203  static const std::string SETTING_MUSICLIBRARY_ARTISTSFOLDER;
204  static const std::string SETTING_MUSICLIBRARY_PREFERONLINEALBUMART;
205  static const std::string SETTING_MUSICLIBRARY_ALBUMSSCRAPER;
206  static const std::string SETTING_MUSICLIBRARY_ARTISTSSCRAPER;
207  static const std::string SETTING_MUSICLIBRARY_OVERRIDETAGS;
208  static const std::string SETTING_MUSICLIBRARY_SHOWALLITEMS;
209  static const std::string SETTING_MUSICLIBRARY_UPDATEONSTARTUP;
210  static const std::string SETTING_MUSICLIBRARY_BACKGROUNDUPDATE;
211  static const std::string SETTING_MUSICLIBRARY_CLEANUP;
212  static const std::string SETTING_MUSICLIBRARY_EXPORT;
213  static const std::string SETTING_MUSICLIBRARY_EXPORT_FILETYPE;
214  static const std::string SETTING_MUSICLIBRARY_EXPORT_FOLDER;
215  static const std::string SETTING_MUSICLIBRARY_EXPORT_ITEMS;
216  static const std::string SETTING_MUSICLIBRARY_EXPORT_UNSCRAPED;
217  static const std::string SETTING_MUSICLIBRARY_EXPORT_OVERWRITE;
218  static const std::string SETTING_MUSICLIBRARY_EXPORT_ARTWORK;
219  static const std::string SETTING_MUSICLIBRARY_EXPORT_SKIPNFO;
220  static const std::string SETTING_MUSICLIBRARY_IMPORT;
221  static const std::string SETTING_MUSICPLAYER_AUTOPLAYNEXTITEM;
222  static const std::string SETTING_MUSICPLAYER_QUEUEBYDEFAULT;
223  static const std::string SETTING_MUSICPLAYER_SEEKSTEPS;
224  static const std::string SETTING_MUSICPLAYER_SEEKDELAY;
225  static const std::string SETTING_MUSICPLAYER_REPLAYGAINTYPE;
226  static const std::string SETTING_MUSICPLAYER_REPLAYGAINPREAMP;
227  static const std::string SETTING_MUSICPLAYER_REPLAYGAINNOGAINPREAMP;
228  static const std::string SETTING_MUSICPLAYER_REPLAYGAINAVOIDCLIPPING;
229  static const std::string SETTING_MUSICPLAYER_CROSSFADE;
230  static const std::string SETTING_MUSICPLAYER_CROSSFADEALBUMTRACKS;
231  static const std::string SETTING_MUSICPLAYER_VISUALISATION;
232  static const std::string SETTING_MUSICFILES_SELECTACTION;
233  static const std::string SETTING_MUSICFILES_USETAGS;
234  static const std::string SETTING_MUSICFILES_TRACKFORMAT;
235  static const std::string SETTING_MUSICFILES_NOWPLAYINGTRACKFORMAT;
236  static const std::string SETTING_MUSICFILES_LIBRARYTRACKFORMAT;
237  static const std::string SETTING_MUSICFILES_FINDREMOTETHUMBS;
238  static const std::string SETTING_AUDIOCDS_AUTOACTION;
239  static const std::string SETTING_AUDIOCDS_USECDDB;
240  static const std::string SETTING_AUDIOCDS_RECORDINGPATH;
241  static const std::string SETTING_AUDIOCDS_TRACKPATHFORMAT;
242  static const std::string SETTING_AUDIOCDS_ENCODER;
243  static const std::string SETTING_AUDIOCDS_SETTINGS;
244  static const std::string SETTING_AUDIOCDS_EJECTONRIP;
245  static const std::string SETTING_MYMUSIC_SONGTHUMBINVIS;
246  static const std::string SETTING_MYMUSIC_DEFAULTLIBVIEW;
247  static const std::string SETTING_PICTURES_USETAGS;
248  static const std::string SETTING_PICTURES_GENERATETHUMBS;
249  static const std::string SETTING_PICTURES_SHOWVIDEOS;
250  static const std::string SETTING_PICTURES_DISPLAYRESOLUTION;
251  static const std::string SETTING_SLIDESHOW_STAYTIME;
252  static const std::string SETTING_SLIDESHOW_DISPLAYEFFECTS;
253  static const std::string SETTING_SLIDESHOW_SHUFFLE;
254  static const std::string SETTING_SLIDESHOW_HIGHQUALITYDOWNSCALING;
255  static const std::string SETTING_WEATHER_CURRENTLOCATION;
256  static const std::string SETTING_WEATHER_ADDON;
257  static const std::string SETTING_WEATHER_ADDONSETTINGS;
258  static const std::string SETTING_SERVICES_DEVICENAME;
259  static const std::string SETTING_SERVICES_DEVICEUUID;
260  static const std::string SETTING_SERVICES_UPNP;
261  static const std::string SETTING_SERVICES_UPNPSERVER;
262  static const std::string SETTING_SERVICES_UPNPANNOUNCE;
263  static const std::string SETTING_SERVICES_UPNPLOOKFOREXTERNALSUBTITLES;
264  static const std::string SETTING_SERVICES_UPNPCONTROLLER;
265  static const std::string SETTING_SERVICES_UPNPRENDERER;
266  static const std::string SETTING_SERVICES_WEBSERVER;
267  static const std::string SETTING_SERVICES_WEBSERVERPORT;
268  static const std::string SETTING_SERVICES_WEBSERVERUSERNAME;
269  static const std::string SETTING_SERVICES_WEBSERVERPASSWORD;
270  static const std::string SETTING_SERVICES_WEBSERVERSSL;
271  static const std::string SETTING_SERVICES_WEBSKIN;
272  static const std::string SETTING_SERVICES_ESENABLED;
273  static const std::string SETTING_SERVICES_ESPORT;
274  static const std::string SETTING_SERVICES_ESPORTRANGE;
275  static const std::string SETTING_SERVICES_ESMAXCLIENTS;
276  static const std::string SETTING_SERVICES_ESALLINTERFACES;
277  static const std::string SETTING_SERVICES_ESINITIALDELAY;
278  static const std::string SETTING_SERVICES_ESCONTINUOUSDELAY;
279  static const std::string SETTING_SERVICES_ZEROCONF;
280  static const std::string SETTING_SERVICES_AIRPLAY;
281  static const std::string SETTING_SERVICES_AIRPLAYVOLUMECONTROL;
282  static const std::string SETTING_SERVICES_USEAIRPLAYPASSWORD;
283  static const std::string SETTING_SERVICES_AIRPLAYPASSWORD;
284  static const std::string SETTING_SERVICES_AIRPLAYVIDEOSUPPORT;
285  static const std::string SETTING_SMB_WINSSERVER;
286  static const std::string SETTING_SMB_WORKGROUP;
287  static const std::string SETTING_SMB_MINPROTOCOL;
288  static const std::string SETTING_SMB_MAXPROTOCOL;
289  static const std::string SETTING_SMB_LEGACYSECURITY;
290  static const std::string SETTING_VIDEOSCREEN_MONITOR;
291  static const std::string SETTING_VIDEOSCREEN_SCREEN;
292  static const std::string SETTING_VIDEOSCREEN_WHITELIST;
293  static const std::string SETTING_VIDEOSCREEN_RESOLUTION;
294  static const std::string SETTING_VIDEOSCREEN_SCREENMODE;
295  static const std::string SETTING_VIDEOSCREEN_FAKEFULLSCREEN;
296  static const std::string SETTING_VIDEOSCREEN_BLANKDISPLAYS;
297  static const std::string SETTING_VIDEOSCREEN_STEREOSCOPICMODE;
298  static const std::string SETTING_VIDEOSCREEN_PREFEREDSTEREOSCOPICMODE;
299  static const std::string SETTING_VIDEOSCREEN_NOOFBUFFERS;
300  static const std::string SETTING_VIDEOSCREEN_3DLUT;
301  static const std::string SETTING_VIDEOSCREEN_DISPLAYPROFILE;
302  static const std::string SETTING_VIDEOSCREEN_GUICALIBRATION;
303  static const std::string SETTING_VIDEOSCREEN_TESTPATTERN;
304  static const std::string SETTING_VIDEOSCREEN_LIMITEDRANGE;
305  static const std::string SETTING_VIDEOSCREEN_FRAMEPACKING;
306  static const std::string SETTING_AUDIOOUTPUT_AUDIODEVICE;
307  static const std::string SETTING_AUDIOOUTPUT_CHANNELS;
308  static const std::string SETTING_AUDIOOUTPUT_CONFIG;
309  static const std::string SETTING_AUDIOOUTPUT_SAMPLERATE;
310  static const std::string SETTING_AUDIOOUTPUT_STEREOUPMIX;
311  static const std::string SETTING_AUDIOOUTPUT_MAINTAINORIGINALVOLUME;
312  static const std::string SETTING_AUDIOOUTPUT_PROCESSQUALITY;
313  static const std::string SETTING_AUDIOOUTPUT_ATEMPOTHRESHOLD;
314  static const std::string SETTING_AUDIOOUTPUT_STREAMSILENCE;
315  static const std::string SETTING_AUDIOOUTPUT_STREAMNOISE;
316  static const std::string SETTING_AUDIOOUTPUT_GUISOUNDMODE;
317  static const std::string SETTING_AUDIOOUTPUT_PASSTHROUGH;
318  static const std::string SETTING_AUDIOOUTPUT_PASSTHROUGHDEVICE;
319  static const std::string SETTING_AUDIOOUTPUT_AC3PASSTHROUGH;
320  static const std::string SETTING_AUDIOOUTPUT_AC3TRANSCODE;
321  static const std::string SETTING_AUDIOOUTPUT_EAC3PASSTHROUGH;
322  static const std::string SETTING_AUDIOOUTPUT_DTSPASSTHROUGH;
323  static const std::string SETTING_AUDIOOUTPUT_TRUEHDPASSTHROUGH;
324  static const std::string SETTING_AUDIOOUTPUT_DTSHDPASSTHROUGH;
325  static const std::string SETTING_AUDIOOUTPUT_VOLUMESTEPS;
326  static const std::string SETTING_INPUT_PERIPHERALS;
327  static const std::string SETTING_INPUT_PERIPHERALLIBRARIES;
328  static const std::string SETTING_INPUT_ENABLEMOUSE;
329  static const std::string SETTING_INPUT_ASKNEWCONTROLLERS;
330  static const std::string SETTING_INPUT_CONTROLLERCONFIG;
331  static const std::string SETTING_INPUT_RUMBLENOTIFY;
332  static const std::string SETTING_INPUT_TESTRUMBLE;
333  static const std::string SETTING_INPUT_CONTROLLERPOWEROFF;
334  static const std::string SETTING_INPUT_APPLEREMOTEMODE;
335  static const std::string SETTING_INPUT_APPLEREMOTEALWAYSON;
336  static const std::string SETTING_INPUT_APPLEREMOTESEQUENCETIME;
337  static const std::string SETTING_INPUT_APPLESIRI;
338  static const std::string SETTING_INPUT_APPLESIRITIMEOUT;
339  static const std::string SETTING_INPUT_APPLESIRITIMEOUTENABLED;
340  static const std::string SETTING_INPUT_APPLEUSEKODIKEYBOARD;
341  static const std::string SETTING_NETWORK_USEHTTPPROXY;
342  static const std::string SETTING_NETWORK_HTTPPROXYTYPE;
343  static const std::string SETTING_NETWORK_HTTPPROXYSERVER;
344  static const std::string SETTING_NETWORK_HTTPPROXYPORT;
345  static const std::string SETTING_NETWORK_HTTPPROXYUSERNAME;
346  static const std::string SETTING_NETWORK_HTTPPROXYPASSWORD;
347  static const std::string SETTING_NETWORK_BANDWIDTH;
348  static const std::string SETTING_POWERMANAGEMENT_DISPLAYSOFF;
349  static const std::string SETTING_POWERMANAGEMENT_SHUTDOWNTIME;
350  static const std::string SETTING_POWERMANAGEMENT_SHUTDOWNSTATE;
351  static const std::string SETTING_POWERMANAGEMENT_WAKEONACCESS;
352  static const std::string SETTING_POWERMANAGEMENT_WAITFORNETWORK;
353  static const std::string SETTING_DEBUG_SHOWLOGINFO;
354  static const std::string SETTING_DEBUG_EXTRALOGGING;
355  static const std::string SETTING_DEBUG_SETEXTRALOGLEVEL;
356  static const std::string SETTING_DEBUG_SCREENSHOTPATH;
357  static const std::string SETTING_DEBUG_SHARE_LOG;
358  static const std::string SETTING_EVENTLOG_ENABLED;
359  static const std::string SETTING_EVENTLOG_ENABLED_NOTIFICATIONS;
360  static const std::string SETTING_EVENTLOG_SHOW;
361  static const std::string SETTING_MASTERLOCK_LOCKCODE;
362  static const std::string SETTING_MASTERLOCK_STARTUPLOCK;
363  static const std::string SETTING_MASTERLOCK_MAXRETRIES;
364  static const std::string SETTING_CACHE_HARDDISK;
365  static const std::string SETTING_CACHEVIDEO_DVDROM;
366  static const std::string SETTING_CACHEVIDEO_LAN;
367  static const std::string SETTING_CACHEVIDEO_INTERNET;
368  static const std::string SETTING_CACHEAUDIO_DVDROM;
369  static const std::string SETTING_CACHEAUDIO_LAN;
370  static const std::string SETTING_CACHEAUDIO_INTERNET;
371  static const std::string SETTING_CACHEDVD_DVDROM;
372  static const std::string SETTING_CACHEDVD_LAN;
373  static const std::string SETTING_CACHEUNKNOWN_INTERNET;
374  static const std::string SETTING_SYSTEM_PLAYLISTSPATH;
375  static const std::string SETTING_ADDONS_AUTOUPDATES;
376  static const std::string SETTING_ADDONS_NOTIFICATIONS;
377  static const std::string SETTING_ADDONS_SHOW_RUNNING;
378  static const std::string SETTING_ADDONS_MANAGE_DEPENDENCIES;
379  static const std::string SETTING_ADDONS_ALLOW_UNKNOWN_SOURCES;
380  static const std::string SETTING_GENERAL_ADDONFOREIGNFILTER;
381  static const std::string SETTING_GENERAL_ADDONBROKENFILTER;
382  static const std::string SETTING_SOURCE_VIDEOS;
383  static const std::string SETTING_SOURCE_MUSIC;
384  static const std::string SETTING_SOURCE_PICTURES;
385  // values for SETTING_VIDEOLIBRARY_SHOWUNWATCHEDPLOTS
386  static const int VIDEOLIBRARY_PLOTS_SHOW_UNWATCHED_MOVIES = 0;
387  static const int VIDEOLIBRARY_PLOTS_SHOW_UNWATCHED_TVSHOWEPISODES = 1;
388  static const int VIDEOLIBRARY_THUMB_SHOW_UNWATCHED_EPISODE = 2;
389
390  /*!
391   \brief Creates a new settings wrapper around a new settings manager.
392
393   For access to the "global" settings wrapper the static GetInstance() method should
394   be used.
395   */
396  CSettings() = default;
397  ~CSettings() override = default;
398
399  CSettingsManager* GetSettingsManager() const { return m_settingsManager; }
400
401  // specialization of CSettingsBase
402  bool Initialize() override;
403
404  /*!
405   \brief Registers the given ISubSettings implementation.
406
407   \param subSettings ISubSettings implementation
408   */
409  void RegisterSubSettings(ISubSettings* subSettings);
410  /*!
411   \brief Unregisters the given ISubSettings implementation.
412
413   \param subSettings ISubSettings implementation
414   */
415  void UnregisterSubSettings(ISubSettings* subSettings);
416
417  // implementations of CSettingsBase
418  bool Load() override;
419  bool Save() override;
420
421  /*!
422   \brief Loads setting values from the given (XML) file.
423
424   \param file Path to an XML file containing setting values
425   \return True if the setting values were successfully loaded, false otherwise
426   */
427  bool Load(const std::string &file);
428  /*!
429  \brief Loads setting values from the given XML element.
430
431  \param root XML element containing setting values
432  \return True if the setting values were successfully loaded, false otherwise
433  */
434  bool Load(const TiXmlElement* root);
435  /*!
436   \brief Loads setting values from the given XML element.
437
438   \param root XML element containing setting values
439   \param hide Whether to hide the loaded settings or not
440   \return True if the setting values were successfully loaded, false otherwise
441   */
442  bool LoadHidden(const TiXmlElement *root) { return CSettingsBase::LoadHiddenValuesFromXml(root); }
443
444  /*!
445   \brief Saves the setting values to the given (XML) file.
446
447   \param file Path to an XML file
448   \return True if the setting values were successfully saved, false otherwise
449   */
450  bool Save(const std::string &file);
451  /*!
452   \brief Saves the setting values to the given XML node.
453
454   \param root XML node
455   \return True if the setting values were successfully saved, false otherwise
456   */
457  bool Save(TiXmlNode* root) const override;
458
459  /*!
460   \brief Loads the setting being represented by the given XML node with the
461   given identifier.
462
463   \param node XML node representing the setting to load
464   \param settingId Setting identifier
465   \return True if the setting was successfully loaded from the given XML node, false otherwise
466   */
467  bool LoadSetting(const TiXmlNode *node, const std::string &settingId);
468
469  // overwrite (not override) from CSettingsBase
470  bool GetBool(const std::string& id) const;
471
472  /*!
473   \brief Clears the complete settings.
474
475   This removes all initialized settings, groups, categories and sections and
476   returns to the uninitialized state. Any registered callbacks or
477   implementations stay registered.
478   */
479  void Clear() override;
480
481protected:
482  // specializations of CSettingsBase
483  void InitializeSettingTypes() override;
484  void InitializeControls() override;
485  void InitializeOptionFillers() override;
486  void UninitializeOptionFillers() override;
487  void InitializeConditions() override;
488  void UninitializeConditions() override;
489  void InitializeVisibility() override;
490  void InitializeDefaults() override;
491  void InitializeISettingsHandlers() override;
492  void UninitializeISettingsHandlers() override;
493  void InitializeISubSettings() override;
494  void UninitializeISubSettings() override;
495  void InitializeISettingCallbacks() override;
496  void UninitializeISettingCallbacks() override;
497
498  // implementation of CSettingsBase
499  bool InitializeDefinitions() override;
500
501private:
502  CSettings(const CSettings&) = delete;
503  CSettings const& operator=(CSettings const&) = delete;
504
505  bool Load(const TiXmlElement* root, bool& updated);
506
507  // implementation of ISubSettings
508  bool Load(const TiXmlNode* settings) override;
509
510  bool Initialize(const std::string &file);
511  bool Reset();
512
513  std::set<ISubSettings*> m_subSettings;
514};