Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

[9175b5]: xbmc / Settings.h Maximize Restore History

Repo status: analyzing...

Download this file

Settings.h    427 lines (375 with data), 13.2 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
#pragma once
#include "tinyxml/tinyxml.h"
#define CONFIG_VERSION 0x000F
#include <xtl.h>
#include "stdstring.h"
#include "GraphicContext.h"
#include "Profile.h"
#include <vector>
using namespace std;
#define SHARE_TYPE_UNKNOWN 0
#define SHARE_TYPE_LOCAL 1
#define SHARE_TYPE_DVD 2
#define SHARE_TYPE_VIRTUAL_DVD 3
#define SHARE_TYPE_REMOTE 4
#define LCD_MODE_NORMAL 0
#define LCD_MODE_NOTV 1
#define LCD_MODE_TYPE_LCD 0
#define LCD_MODE_TYPE_VFD 1
#define MODCHIP_SMARTXX 0
#define MODCHIP_XENIUM 1
#define CACHE_AUDIO 0
#define CACHE_VIDEO 1
#define CACHE_VOB 2
#define CDDARIP_ENCODER_LAME 0
#define CDDARIP_ENCODER_VORBIS 1
#define CDDARIP_ENCODER_WAV 2
#define CDDARIP_QUALITY_CBR 0
#define CDDARIP_QUALITY_MEDIUM 1
#define CDDARIP_QUALITY_STANDARD 2
#define CDDARIP_QUALITY_EXTREME 3
/*!
\ingroup windows
\brief Represents a share.
\sa VECSHARES, IVECSHARES
*/
class CShare
{
public:
CShare(){};
virtual ~CShare(){};
CStdString strName; ///< Name of the share, can be choosen freely.
CStdString strPath; ///< Path of the share, eg. iso9660:// or F:
int m_iBufferSize; ///< Cachesize of the share
int m_iDepthSize; ///< Depth for My Programs
/*!
\brief The type of the share.
Value can be:
- SHARE_TYPE_UNKNOWN \n
Unknown share, maybe a wrong path.
- SHARE_TYPE_LOCAL \n
Harddisk share.
- SHARE_TYPE_DVD \n
DVD-ROM share of the build in drive, strPath may vary.
- SHARE_TYPE_VIRTUAL_DVD \n
DVD-ROM share, strPath is fix.
- SHARE_TYPE_REMOTE \n
Network share.
*/
int m_iDriveType;
};
/*!
\ingroup windows
\brief A vector to hold CShare objects.
\sa CShare, IVECSHARES
*/
typedef vector<CShare> VECSHARES;
/*!
\ingroup windows
\brief Iterator of VECSHARES.
\sa CShare, VECSHARES
*/
typedef vector<CShare>::iterator IVECSHARES;
typedef vector<CProfile> VECPROFILES;
typedef vector<CProfile>::iterator IVECPROFILES;
class CFileTypeIcon
{
public:
CFileTypeIcon(){};
virtual ~CFileTypeIcon(){};
CStdString m_strName;
CStdString m_strIcon;
};
typedef vector<CFileTypeIcon> VECFILETYPEICONS;
typedef vector<CFileTypeIcon>::iterator IVECFILETYPEICONS;
class CSettings
{
public:
CSettings(void);
virtual ~CSettings(void);
bool Load(bool& bXboxMediacenter, bool& bSettings);
void Save() const;
bool LoadProfile(int index);
bool SaveSettingsToProfile(int index);
struct stSettings
{
public:
unsigned long dwFileVersion;
char szDefaultSkin[1024];
char szHomeDir[1024];
int m_iMyProgramsSortMethod;
bool m_bMyProgramsSortAscending;
int m_iMyProgramsViewAsIcons;
bool m_bMyProgramsFlatten;
bool m_bMyProgramsDefaultXBE;
bool m_bMyProgramsDirectoryName;
char szThumbnailsDirectory[1024];
char szDashboard[1024];
int m_iStartupWindow;
char m_strLocalIPAdres[32];
char m_strLocalNetmask[32];
char m_strGateway[32];
char m_strNameServer[128];
char m_strTimeServer[128];
int m_iMyPicturesViewAsIcons;
int m_iMyPicturesRootViewAsIcons;
int m_iMyPicturesSortMethod;
int m_iMyPicturesRootSortMethod;
bool m_bMyPicturesSortAscending;
bool m_bMyPicturesRootSortAscending;
char m_szMyPicturesExtensions[256];
char m_szMyMusicExtensions[256];
char m_szMyVideoExtensions[256];
char m_szShortcutDirectory[256];
char m_szAlbumDirectory[256];
char m_szScreenshotsDirectory[256];
bool m_bMyFilesSourceViewAsIcons;
bool m_bMyFilesSourceRootViewAsIcons;
bool m_bMyFilesDestViewAsIcons;
bool m_bMyFilesDestRootViewAsIcons;
int m_iMyFilesSourceSortMethod;
int m_iMyFilesSourceRootSortMethod;
bool m_bMyFilesSourceSortAscending;
bool m_bMyFilesSourceRootSortAscending;
int m_iMyFilesDestSortMethod;
int m_iMyFilesDestRootSortMethod;
bool m_bMyFilesDestSortAscending;
bool m_bMyFilesDestRootSortAscending;
int m_iMyMusicSongsRootViewAsIcons;
int m_iMyMusicSongsViewAsIcons;
bool m_bMyMusicSongsRootSortAscending;
bool m_bMyMusicSongsSortAscending;
int m_iMyMusicSongsSortMethod;
int m_iMyMusicSongsRootSortMethod;
bool m_bMyMusicSongsUsePlaylist;
bool m_bMyMusicSongsAutoSwitchThumbsList;
bool m_bMyMusicSongsAutoSwitchBigThumbs;
int m_iMyMusicAlbumRootViewAsIcons;
int m_iMyMusicAlbumViewAsIcons;
bool m_bMyMusicAlbumRootSortAscending;
bool m_bMyMusicAlbumSortAscending;
int m_iMyMusicAlbumSortMethod;
int m_iMyMusicAlbumRootSortMethod;
bool m_bMyMusicAlbumShowRecent;
int m_iMyMusicArtistsRootViewAsIcons;
int m_iMyMusicArtistsAlbumsViewAsIcons;
int m_iMyMusicArtistsSongsViewAsIcons;
bool m_bMyMusicArtistsRootSortAscending;
bool m_bMyMusicArtistsSortAscending;
bool m_bMyMusicArtistsAlbumsSortAscending;
bool m_bMyMusicArtistsAlbumSongsSortAscending;
bool m_bMyMusicArtistsAllSongsSortAscending;
int m_iMyMusicArtistsRootSortMethod;
int m_iMyMusicArtistsAllSongsSortMethod;
int m_iMyMusicArtistsAlbumsSortMethod;
int m_iMyMusicArtistsAlbumsSongsSortMethod;
int m_iMyMusicGenresRootViewAsIcons;
int m_iMyMusicGenresViewAsIcons;
bool m_bMyMusicGenresRootSortAscending;
bool m_bMyMusicGenresSortAscending;
int m_iMyMusicGenresSortMethod;
int m_iMyMusicGenresRootSortMethod;
int m_iMyMusicPlaylistViewAsIcons;
bool m_bMyMusicPlaylistRepeat;
int m_iMyMusicTop100ViewAsIcons;
int m_iMyMusicStartWindow;
bool m_bMyMusicRepeat;
bool m_bMyMusicSongInfoInVis;
bool m_bMyMusicSongThumbInVis;
int m_iMyVideoViewAsIcons;
int m_iMyVideoRootViewAsIcons;
int m_iMyVideoSortMethod;
int m_iMyVideoRootSortMethod;
bool m_bMyVideoSortAscending;
bool m_bMyVideoRootSortAscending;
bool m_bScriptsViewAsIcons;
bool m_bScriptsRootViewAsIcons;
int m_iScriptsSortMethod;
bool m_bScriptsSortAscending;
int m_iMoveDelayIR;
int m_iRepeatDelayIR;
int m_iMoveDelayController;
int m_iRepeatDelayController;
bool m_bTimeServerEnabled;
bool m_bFTPServerEnabled;
bool m_bHTTPServerEnabled;
int m_iSlideShowTransistionFrames;
int m_iSlideShowStayTime;
RESOLUTION m_GUIResolution;
int m_iHTTPProxyPort;
char m_szHTTPProxy[128];
int m_iWebServerPort;
int m_iShutdownTime;
int m_iScreenSaverTime; // CB: SCREENSAVER PATCH
int m_iScreenSaverMode; // CB: SCREENSAVER
int m_iScreenSaverFadeLevel;
char m_szDefaultPrograms[128];
char m_szDefaultMusic[128];
char m_szDefaultPictures[128];
char m_szDefaultFiles[128];
char m_szDefaultVideos[128];
char m_szCDDBIpAdres[128];
bool m_bUseCDDB;
int m_iUIOffsetX;
int m_iUIOffsetY;
int m_iFlickerFilterVideo; // 0..5
int m_iFlickerFilterUI; // 0..5
bool m_bSoftenVideo;
bool m_bSoftenUI;
bool m_bZoom;
bool m_bStretch;
bool m_bAutoWidescreenSwitching;
bool m_bUpsampleVideo;
bool m_bAllowPAL60;
bool m_bAutoShufflePlaylist;
int m_iHDSpinDownTime;
bool m_bHDRemoteplaySpinDownAudio;
bool m_bHDRemoteplaySpinDownVideo;
int m_iHDRemoteplaySpinDownTime; //seconds
int m_iHDRemoteplaySpinDownMinDuration; //minutes
DWORD m_minFilter ;
DWORD m_maxFilter ;
bool m_bAutorunDVD;
bool m_bAutorunVCD;
bool m_bAutorunCdda;
bool m_bAutorunXbox;
bool m_bAutorunMusic;
bool m_bAutorunVideo;
bool m_bAutorunPictures;
char szDefaultLanguage[256];
char szDefaultVisualisation[256];
bool m_bUseFDrive;
bool m_bUseGDrive;
bool m_bUsePCDVDROM;
bool m_bDetectAsIso;
bool m_bAudioOnAllSpeakers;
int m_iChannels;
bool m_bDD_DTSMultiChannelPassThrough;
bool m_bDDStereoPassThrough;
bool m_bUseID3;
char m_szMusicRecordingDirectory[128];
char m_szAlternateSubtitleDirectory[128];
bool m_bPostProcessing;
bool m_bDeInterlace;
char m_szSubtitleFont[40];
int m_iSubtitleHeight;
int m_iEnlargeSubtitlePercent;
float m_fVolumeAmplification;
float m_fVolumeHeadroom;
bool m_bNonInterleaved;
bool m_bPPAuto;
bool m_bPPVertical;
bool m_bPPHorizontal;
bool m_bPPAutoLevels;
int m_iPPHorizontal;
int m_iPPVertical;
bool m_bPPdering;
bool m_bFrameRateConversions;
bool m_bUseDigitalOutput;
int m_iAudioStream;
int m_iSubtitleStream;
int m_iMyVideoGenreViewAsIcons;
int m_iMyVideoGenreRootViewAsIcons;
int m_iMyVideoGenreSortMethod;
int m_iMyVideoGenreRootSortMethod;
bool m_bMyVideoGenreSortAscending;
bool m_bMyVideoGenreRootSortAscending;
int m_iMyVideoActorViewAsIcons;
int m_iMyVideoActorRootViewAsIcons;
int m_iMyVideoActorSortMethod;
int m_iMyVideoActorRootSortMethod;
bool m_bMyVideoActorSortAscending;
bool m_bMyVideoActorRootSortAscending;
int m_iMyVideoYearViewAsIcons;
int m_iMyVideoYearRootViewAsIcons;
int m_iMyVideoYearSortMethod;
int m_iMyVideoYearRootSortMethod;
bool m_bMyVideoYearSortAscending;
bool m_bMyVideoYearRootSortAscending;
int m_iMyVideoTitleViewAsIcons;
int m_iMyVideoTitleRootViewAsIcons;
int m_iMyVideoTitleSortMethod;
bool m_bMyVideoTitleSortAscending;
bool m_bMyVideoVideoStack;
bool m_bMyVideoActorStack;
bool m_bMyVideoGenreStack;
bool m_bMyVideoYearStack;
int m_iVideoStartWindow;
char m_szWeatherArea[3][10]; //WEATHER
char m_szWeatherFTemp[2]; //WEATHER
char m_szWeatherFSpeed[2]; //WEATHER
int m_iWeatherRefresh; //WEATHER
char m_szExternalDVDPlayer[128];
char m_szExternalCDDAPlayer[128];
bool m_bNoCache;
int m_iSmallStepBackSeconds;
int m_iSmallStepBackTries;
int m_iSmallStepBackDelay;
int m_iCacheSizeHD[3];
int m_iCacheSizeUDF[3];
int m_iCacheSizeISO[3];
int m_iCacheSizeLAN[3];
int m_iCacheSizeInternet[3];
int m_iMyVideoPlaylistViewAsIcons;
bool m_bMyVideoPlaylistRepeat;
bool m_bLCDUsed;
int m_iLCDColumns;
int m_iLCDRows;
int m_iLCDAdress[4];
int m_iLCDMode;
int m_iLCDBackLight;
int m_iLCDType;
int m_iLCDBrightness;
bool m_bDisplayRemoteCodes; // Remote code debug info
bool m_bResampleMusicAudio; // resample using SSRC
bool m_bResampleVideoAudio; // separate from music, as it causes a CPU hit
int m_iLCDModChip;
int m_iOSDTimeout; // OSD timeout in seconds
char szOnlineUsername[32]; // KAITAG (username)
char szOnlinePassword[32]; // corresponding password
bool m_mplayerDebug;
int m_iSambaDebugLevel;
char m_strSambaWorkgroup[128];
char m_strSambaWinsServer[32];
char m_strSambaDefaultUserName[128];
char m_strSambaDefaultPassword[128];
bool m_bHideExtensions;
bool m_bRipWithTrackNumber;
int m_iRipEncoder;
int m_iRipQuality;
int m_iRipBitRate;
char m_strRipPath[MAX_PATH + 1];
char m_szFlipBiDiCharset[128];
};
VECSHARES m_vecMyProgramsBookmarks;
VECSHARES m_vecMyPictureShares;
VECSHARES m_vecMyFilesShares;
VECSHARES m_vecMyMusicShares;
VECSHARES m_vecMyVideoShares;
VECFILETYPEICONS m_vecIcons;
VECPROFILES m_vecProfiles;
RESOLUTION_INFO m_ResInfo[10];
int m_iBrightness;
int m_iContrast;
int m_iGamma;
protected:
void GetBoolean(const TiXmlElement* pRootElement, const CStdString& strTagName, bool& bValue);
void GetInteger(const TiXmlElement* pRootElement, const CStdString& strTagName, int& iValue, const int iDefault, const int iMin, const int iMax);
void GetFloat(const TiXmlElement* pRootElement, const CStdString& strTagName, float& fValue, const float fDefault, const float fMin, const float fMax);
void GetString(const TiXmlElement* pRootElement, const CStdString& strTagName, char* szValue, const CStdString& strDefaultValue);
void GetShares(const TiXmlElement* pRootElement, const CStdString& strTagName, VECSHARES& items, CStdString& strDefault);
void ConvertHomeVar(CStdString& strText);
// functions for writing xml files
void SetString(TiXmlNode* pRootNode, const CStdString& strTagName, const CStdString& strValue) const;
void SetInteger(TiXmlNode* pRootNode, const CStdString& strTagName, int iValue) const;
void SetFloat(TiXmlNode* pRootNode, const CStdString& strTagName, float fValue) const;
void SetBoolean(TiXmlNode* pRootNode, const CStdString& strTagName, bool bValue) const;
bool LoadCalibration(const TiXmlElement* pElement, const CStdString& strSettingsFile);
bool SaveCalibration(TiXmlNode* pRootNode) const;
bool LoadSettings(const CStdString& strSettingsFile, const bool loadprofiles);
bool SaveSettings(const CStdString& strSettingsFile, const bool saveprofiles) const;
bool LoadProfiles(const TiXmlElement* pRootElement, const CStdString& strSettingsFile);
bool SaveProfiles(TiXmlNode* pRootElement) const;
};
extern class CSettings g_settings;
extern struct CSettings::stSettings g_stSettings;