//this file is part of eMule
//Copyright (C)2002-2007 Merkur ( strEmail.Format("%s@%s", "devteam", "emule-project.net") / http://www.emule-project.net )
//
//This program is free software; you can redistribute it and/or
//modify it under the terms of the GNU General Public License
//as published by the Free Software Foundation; either
//version 2 of the License, or (at your option) any later version.
//
//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the
//GNU General Public License for more details.
//
//You should have received a copy of the GNU General Public License
//along with this program; if not, write to the Free Software
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#pragma once

#include "Opcodes.h"//dlarge QuickStart
#include "Ini2.h" //dlarge Design Settings 

//dlarge Sorting
enum ServerListColumns
{
	SL_COLUMN_SERVERNAME = 0,
	SL_COLUMN_COUNTRY,
	SL_COLUMN_SERVERIP,
	SL_COLUMN_DESCRIPTION,
	SL_COLUMN_PING,
	SL_COLUMN_UUSERS,
	SL_COLUMN_MAXCLIENT,
	SL_COLUMN_PW_FILES,
	SL_COLUMN_PREFERENCE,
	SL_COLUMN_FAILEDCOUNT,
	SL_COLUMN_STATIC,
	SL_COLUMN_SOFTFILELIMIT,
	SL_COLUMN_HARDFILELIMIT,
	SL_COLUMN_SOFTWAREVER,
	SL_COLUMN_IDLOW,

	SL_COLUMN_NUMCOLUMNS
};

enum EnumDownloadListColumns
{
	DLCOL_FILENAME = 0,
	DLCOL_SIZE,
	DLCOL_TRANSFERRED,
	DLCOL_COMPLETED,
	DLCOL_SPEED,
	DLCOL_PROGRESS,
	DLCOL_NUMSOURCES,
	DLCOL_HARDLIMIT,
	DLCOL_AVGQR,
	DLCOL_MODVERSION,
	DLCOL_PRIORITY,
	DLCOL_STATUS,
	DLCOL_REMAINING,
	DLCOL_LASTSEENCOMPLETE,
	DLCOL_LASTRECEIVED,
	DLCOL_CATEGORY,
	DLCOL_FAKECHECK,

	DLCOL_NUMCOLUMNS
};

enum EnumUploadListColumns
{
	ULCOL_USERNAME 
	ULCOL_FILENAME 
	ULCOL_SPEED 
	ULCOL_TRANSFERRED 
        ULCOL_WAITED 
	ULCOL_UPLOADTIME 
	ULCOL_STATUS 
	ULCOL_PROGRESS 
	ULCOL_CLIENTSOFTWARE 
	ULCOL_COUNTRY 
//	ULCOL_SLOTNR 
//	ULCOL_TOTALUPDOWN 
//	ULCOL_RQR}


	ULCOL_NUMCOLUMNS
};

enum EnumUploadQueueListColumns
{
	QLCOL_USERNAME = 0,
	QLCOL_COUNTRY,
	QLCOL_CLIENTSOFTWARE,
	QLCOL_FILENAME,
	QLCOL_FILEPRIORITY,
	QLCOL_QLRATING,
	QLCOL_SCORE,
	QLCOL_TIMESASKED,
	QLCOL_LASTSEEN,
	QLCOL_ENTEREDQUEUE,
	QLCOL_BANNED,
	QLCOL_UPSTATUS,
	QLCOL_TOTALUPDOWN,
	QLCOL_RQR,

	QLCOL_NUMCOLUMNS
};

enum EnumClientListColumns
{
	CLCOL_USERNAME = 0,
	CLCOL_COUNTRY,
	CLCOL_CLIENTSOFTWARE,
	CLCOL_SUI,
	CLCOL_BANNED,
	CLCOL_UPLOADSTATUS,
	CLCOL_TRANSFERREDUP,
	CLCOL_DOWNLOADSTATUS,
	CLCOL_TRANSFERREDDOWN,
	CLCOL_CONNECTEDTIME,
	CLCOL_USERHASH,

	CLCOL_NUMCOLUMNS
};

enum SearchListColumns
{
	SL_COLUMN_FILENAME = 0,
	SL_COLUMN_SIZE,
	SL_COLUMN_SEARCHAVAIL,
	SL_COLUMN_SOURCES,
	SL_COLUMN_TYPE,
	SL_COLUMN_FILEHASH,
	SL_COLUMN_ARTIST,
	SL_COLUMN_ALBUM,
	SL_COLUMN_TITLE,
	SL_COLUMN_LENGTH,
	SL_COLUMN_BITRATE,
	SL_COLUMN_CODEC,
	SL_COLUMN_FOLDER,
	SL_COLUMN_KNOWN,
	SL_COLUMN_FAKECHECK,

	SL_NUMCOLUMNS
};

enum EnumSharedFilesListColumns
{
	SFL_COLUMN_FILENAME = 0,
	SFL_COLUMN_FILESIZE,
	SFL_COLUMN_TYPE,
	SFL_COLUMN_PRIORITY,
	SFL_COLUMN_FILEID,
	SFL_COLUMN_REQUESTS,
	SFL_COLUMN_ACCEPTED,
	SFL_COLUMN_TRANSFERRED,
	SFL_COLUMN_UPSTATUS,
	SFL_COLUMN_FOLDER,
	SFL_COLUMN_COMPLSOURCES,
	SFL_COLUMN_SHAREDTITLE,

	SFL_NUMCOLUMNS
};

//dlarge end

enum EViewSharedFilesAccess{
	vsfaEverybody = 0,
	vsfaFriends = 1,
	vsfaNobody = 2
};

enum ENotifierSoundType{
	ntfstNoSound = 0,
	ntfstSoundFile = 1,
	ntfstSpeech = 2
};

enum EDefaultDirectory{
	EMULE_CONFIGDIR = 0,
	EMULE_TEMPDIR = 1,
	EMULE_INCOMINGDIR = 2,
	EMULE_LOGDIR = 3,
	EMULE_ADDLANGDIR = 4, // directories with languages installed by the eMule (parent: EMULE_EXPANSIONDIR)
	EMULE_INSTLANGDIR = 5, // directories with languages installed by the user or installer (parent: EMULE_EXECUTEABLEDIR)
	EMULE_WEBSERVERDIR = 6,
	EMULE_DATABASEDIR = 7, // the parent directory of the incoming/temp folder
	EMULE_CONFIGBASEDIR = 8, // the parent directory of the config folder 
	EMULE_EXECUTEABLEDIR = 9, // assumed to be not writeable (!)
	EMULE_EXPANSIONDIR = 10, // this is a base directory accessable for all users for things eMule installs
	EMULE_ADDONDIR = 11			//>>> shadow2004::AddonDirectory
};


enum EToolbarLabelType;
enum ELogFileFormat;

// DO NOT EDIT VALUES like making a uint16 to uint32, or insert any value. ONLY append new vars
#pragma pack(1)
struct Preferences_Ext_Struct{
	uint8	version;
	uchar	userhash[16];
	WINDOWPLACEMENT EmuleWindowPlacement;
};
#pragma pack()

// deadlake PROXYSUPPORT
struct ProxySettings{
	uint16		type;
	uint16		port;
	CStringA	name;
	CStringA	user;
	CStringA	password;
	bool		EnablePassword;
	bool		UseProxy;
};

//dlarge Smart Category Control 
/*
struct Category_Struct{
	CString	strIncomingPath;
	CString	strTitle;
	CString	strComment;
	DWORD	color;
	UINT	prio;
	CString autocat;
	CString	regexp;
	int		filter;
	bool	filterNeg;
	bool	care4all;
	bool	ac_regexpeval;
	bool	downloadInAlphabeticalOrder; // ZZ:DownloadManager
};
*/
// View Filter Struct
#pragma pack(1)
struct CategoryViewFilter_Struct{
	//		General View Filters
	UINT	nFromCats;  // 0 == All; 1 == Unassigned; 2 == This Cat Only
	bool	bSuspendFilters;
	//		File Type View Filters
	bool	bVideo;
	bool	bAudio;
	bool	bArchives;
	bool	bImages;
	//		File State View Filters
	bool	bWaiting;
	bool	bTransferring;
	bool	bPaused;
	bool	bStopped;
	bool	bComplete;
	bool	bHashing;
	bool	bErrorUnknown;
	bool	bCompleting;
	bool	bSeenComplet;
	//		File Size View Filters
	uint64	nFSizeMin;
	uint64	nFSizeMax;
	uint64	nRSizeMin;
	uint64	nRSizeMax;
	//		Time Remaining Filters
	uint32	nTimeRemainingMin;
	uint32	nTimeRemainingMax;
	//		Source Count Filters
	UINT	nSourceCountMin;
	UINT	nSourceCountMax;
	UINT	nAvailSourceCountMin;
	UINT	nAvailSourceCountMax;
	//		Advanced Filter Mask
	CString	sAdvancedFilterMask;
};
#pragma pack()

// Criteria Selection Struct
#pragma pack(1)
struct CategorySelectionCriteria_Struct{
	bool	bFileSize;
	bool	bAdvancedFilterMask;
};
#pragma pack()

#pragma pack(1)
struct Category_Struct{
	CString	strIncomingPath;
	CString	strTitle;
	CString	strComment;
	DWORD	color;
	UINT	prio;
	bool	bResumeFileOnlyInSameCat;
	// View Filter Struct
	CategoryViewFilter_Struct viewfilters;
	CategorySelectionCriteria_Struct selectioncriteria;
	UINT	m_iDlMode; // 0 = NONE, 1 = alphabetical, 2 = LP
};
#pragma pack()
//dlarge end

//dlarge Design Settings 
#define STYLE_VERSION 2
struct StylesStruct 
{
	short nOnOff;
	DWORD nFlags;
	COLORREF nFontColor;
	COLORREF nBackColor;
};

#define STYLE_BOLD		0x0001
#define STYLE_UNDERLINE	0x0002
#define STYLE_ITALIC	0x0003
#define STYLE_USED		0x80000000
#define STYLE_FONTMASK	0x0003

// master styles
enum eMasterStyles
{
	client_styles = 0,
	download_styles,
	share_styles,
	server_styles,
	background_styles,
	window_styles,
	master_count
};

	// client styles
enum eClientStyles
{
	style_c_default = 0,
	style_c_friend,
	style_c_powershare,
	style_c_downloading,
	style_c_uploading,
	style_c_leecher,
	style_c_lowid,
	style_c_credits,
	style_c_count
};

	// download styles
enum eDownloadStyles
{
	style_d_default = 0,
	style_d_downloading,
	style_d_complete,
	style_d_completing,
	style_d_hashing,
	style_d_paused,
	style_d_stopped,
	style_d_errunk,
	style_d_count
};

	// share styles
enum eShareStyles
{
	style_s_default = 0,
	style_s_incomplete,
	style_s_powershare,
	style_s_auto,
	style_s_verylow,
	style_s_low,
	style_s_normal,
	style_s_high,
	style_s_release,
	style_s_count
};

// server styles
enum eServerStyles
{
	style_se_default = 0,
	style_se_connected,
	style_se_static,
	style_se_filtered,
	style_se_dead,
	style_se_unreliable,
	style_se_count
};

	// background styles
enum eBackgroundStyles
{
	style_b_default = 0,
	style_b_clientlist,
	style_b_dlclientlist,
	style_b_queuelist,
	style_b_uploadlist,
	style_b_downloadlist,
	style_b_sharedlist,
	style_b_serverwnd,
	style_b_count
};

// window styles
enum eWindowStyles
{
	style_w_default = 0,
	style_w_kademlia,
	style_w_server,
	style_w_transfer,
	style_w_search,
	style_w_shared,
	style_w_messages,
	style_w_irc,
	style_w_statistic,
	style_w_statusbar,
	style_w_toolbar,
	style_w_count
};
//dlarge end


class CPreferences
{
public:
	static	CString	strNick;
	// ZZ:UploadSpeedSense -->
	static	uint16	minupload;
	// ZZ:UploadSpeedSense <--

//dlarge Smart Upload Control v2 
	static bool		m_bSUCEnabled;
	static int		m_iSUCHigh;
	static int		m_iSUCLow;
	static int		m_iSUCPitch;
	static int		m_iSUCDrift;
	static bool		m_bSUCLog;
	
	static	bool	IsSUCDoesWork();
	static	bool	IsSUCEnabled()				{return m_bSUCEnabled;}
	static	bool	IsSUCLog()					{return m_bSUCLog;}
	static	int		GetSUCHigh()				{return m_iSUCHigh;}
	static	int		GetSUCLow()					{return m_iSUCLow;}
	static	int		GetSUCDrift()				{return m_iSUCDrift;}
	static	int		GetSUCPitch()				{return m_iSUCPitch;}
//dlarge end

	static	uint16	maxupload;
	static	uint16	maxdownload;
	static	LPCSTR	m_pszBindAddrA;
	static	CStringA m_strBindAddrA;
	static	LPCWSTR	m_pszBindAddrW;
	static	CStringW m_strBindAddrW;
	static	uint16	port;
	static	uint16	udpport;
	static	uint16	nServerUDPPort;
	static	UINT	maxconnections;
	static	UINT	maxhalfconnections;
	static	bool	m_bConditionalTCPAccept;
	static	bool	reconnect;
	static	bool	m_bUseServerPriorities;
	static	bool	m_bUseUserSortedServerList;
	static	CString	m_strIncomingDir;
	static	CStringArray	tempdir;
	static	bool	ICH;
	static	bool	m_bAutoUpdateServerList;
	static	bool	updatenotify;
	static	bool	mintotray;
	static	bool	autoconnect;
	static	bool	m_bAutoConnectToStaticServersOnly; // Barry
	static	bool	autotakeed2klinks;	   // Barry
	static	bool	addnewfilespaused;	   // Barry
	static	UINT	depth3D;			   // Barry
	static	bool	m_bEnableMiniMule;
	static	int		m_iStraightWindowStyles;
	static	bool	m_bRTLWindowsLayout;
	static	bool	m_bAddServersFromServer;
	static	bool	m_bAddServersFromClients;
	static	UINT	maxsourceperfile;
	static	UINT	trafficOMeterInterval;
	static	UINT	statsInterval;
	static	bool	m_bFillGraphs;
	static	uchar	userhash[16];
	static	WINDOWPLACEMENT EmuleWindowPlacement;
	static	int		maxGraphDownloadRate;
	static	int		maxGraphUploadRate;
	static	uint32	maxGraphUploadRateEstimated;
	static	bool	beepOnError;
	static	bool	confirmExit;
	//dlarge Source Graph
	/*
	static	DWORD	m_adwStatsColors[15];
	*/
	static	DWORD	m_adwStatsColors[16];
	//dlarge end
	static  bool	m_bIconflashOnNewMessage;

	static	bool	splashscreen;
	static	bool	filterLANIPs;
	static	bool	m_bAllocLocalHostIP;
	static	bool	onlineSig;
//dlarge Drop
	static  uint16  MaxRemoveQRS;
	static	bool	m_bDropSourcesNNS;
	static	bool	m_bDropSourcesFQ;
	static	bool	m_bDropSourcesHQR;
	static	uint32	m_iDropSourcesTimerNNS;
	static	uint32	m_iDropSourcesTimerFQ;
	static	uint32	m_iDropSourcesTimerHQR;
//dlarge end

//dlarge InvisibleMode
    static bool		m_bInvisibleMode;         
    static bool		m_bStartInvisible; 
    static UINT		m_iInvisibleModeHotKeyModifier; 
    static char		m_cInvisibleModeHotKey; 
//dlarge end

//dlarge Mass Rename
	static int      m_SimpleCleanupOptions;
	static CString  m_SimpleCleanupSearch;
	static CString  m_SimpleCleanupReplace;
	static CString  m_SimpleCleanupSearchChars;
	static CString  m_SimpleCleanupReplaceChars;
//dlarge end

//dlarge QuickStart
	static bool		m_bQuickStart;
	static int		m_iQuickStartTime;
	static int	m_iQuickMaxConperFive;
	static int	m_iQuickMaxHalfOpen;
	static int	m_iQuickMaxConnections;
	static bool		m_bOnQuickStart;
//dlarge end
	// -khaos--+++> Struct Members for Storing Statistics

	// Saved stats for cumulative downline overhead...
	static	uint64	cumDownOverheadTotal;
	static	uint64	cumDownOverheadFileReq;
	static	uint64	cumDownOverheadSrcEx;
	static	uint64	cumDownOverheadServer;
	static	uint64	cumDownOverheadKad;
	static	uint64	cumDownOverheadTotalPackets;
	static	uint64	cumDownOverheadFileReqPackets;
	static	uint64	cumDownOverheadSrcExPackets;
	static	uint64	cumDownOverheadServerPackets;
	static	uint64	cumDownOverheadKadPackets;

	// Saved stats for cumulative upline overhead...
	static	uint64	cumUpOverheadTotal;
	static	uint64	cumUpOverheadFileReq;
	static	uint64	cumUpOverheadSrcEx;
	static	uint64	cumUpOverheadServer;
	static	uint64	cumUpOverheadKad;
	static	uint64	cumUpOverheadTotalPackets;
	static	uint64	cumUpOverheadFileReqPackets;
	static	uint64	cumUpOverheadSrcExPackets;
	static	uint64	cumUpOverheadServerPackets;
	static	uint64	cumUpOverheadKadPackets;

	// Saved stats for cumulative upline data...
	static	uint32	cumUpSuccessfulSessions;
	static	uint32	cumUpFailedSessions;
	static	uint32	cumUpAvgTime;
	// Cumulative client breakdown stats for sent bytes...
	static	uint64	cumUpData_EDONKEY;
	static	uint64	cumUpData_EDONKEYHYBRID;
	static	uint64	cumUpData_EMULE;
	static	uint64	cumUpData_MLDONKEY;
	static	uint64	cumUpData_AMULE;
	static	uint64	cumUpData_EMULECOMPAT;
	static	uint64	cumUpData_SHAREAZA;
	// Session client breakdown stats for sent bytes...
	static	uint64	sesUpData_EDONKEY;
	static	uint64	sesUpData_EDONKEYHYBRID;
	static	uint64	sesUpData_EMULE;
	static	uint64	sesUpData_MLDONKEY;
	static	uint64	sesUpData_AMULE;
	static	uint64	sesUpData_EMULECOMPAT;
	static	uint64	sesUpData_SHAREAZA;

	// Cumulative port breakdown stats for sent bytes...
	static	uint64	cumUpDataPort_4662;
	static	uint64	cumUpDataPort_OTHER;
	static	uint64	cumUpDataPort_PeerCache;
	// Session port breakdown stats for sent bytes...
	static	uint64	sesUpDataPort_4662;
	static	uint64	sesUpDataPort_OTHER;
	static	uint64	sesUpDataPort_PeerCache;

	// Cumulative source breakdown stats for sent bytes...
	static	uint64	cumUpData_File;
	static	uint64	cumUpData_Partfile;
	// Session source breakdown stats for sent bytes...
	static	uint64	sesUpData_File;
	static	uint64	sesUpData_Partfile;

	// Saved stats for cumulative downline data...
	static	uint32	cumDownCompletedFiles;
	static	uint32	cumDownSuccessfulSessions;
	static	uint32	cumDownFailedSessions;
	static	uint32	cumDownAvgTime;

	// Cumulative statistics for saved due to compression/lost due to corruption
	static	uint64	cumLostFromCorruption;
	static	uint64	cumSavedFromCompression;
	static	uint32	cumPartsSavedByICH;

	// Session statistics for download sessions
	static	uint32	sesDownSuccessfulSessions;
	static	uint32	sesDownFailedSessions;
	static	uint32	sesDownAvgTime;
	static	uint32	sesDownCompletedFiles;
	static	uint64	sesLostFromCorruption;
	static	uint64	sesSavedFromCompression;
	static	uint32	sesPartsSavedByICH;

	// Cumulative client breakdown stats for received bytes...
	static	uint64	cumDownData_EDONKEY;
	static	uint64	cumDownData_EDONKEYHYBRID;
	static	uint64	cumDownData_EMULE;
	static	uint64	cumDownData_MLDONKEY;
	static	uint64	cumDownData_AMULE;
	static	uint64	cumDownData_EMULECOMPAT;
	static	uint64	cumDownData_SHAREAZA;
	static	uint64	cumDownData_URL;
	// Session client breakdown stats for received bytes...
	static	uint64	sesDownData_EDONKEY;
	static	uint64	sesDownData_EDONKEYHYBRID;
	static	uint64	sesDownData_EMULE;
	static	uint64	sesDownData_MLDONKEY;
	static	uint64	sesDownData_AMULE;
	static	uint64	sesDownData_EMULECOMPAT;
	static	uint64	sesDownData_SHAREAZA;
	static	uint64	sesDownData_URL;

	// Cumulative port breakdown stats for received bytes...
	static	uint64	cumDownDataPort_4662;
	static	uint64	cumDownDataPort_OTHER;
	static	uint64	cumDownDataPort_PeerCache;
	// Session port breakdown stats for received bytes...
	static	uint64	sesDownDataPort_4662;
	static	uint64	sesDownDataPort_OTHER;
	static	uint64	sesDownDataPort_PeerCache;

	// Saved stats for cumulative connection data...
	static	float	cumConnAvgDownRate;
	static	float	cumConnMaxAvgDownRate;
	static	float	cumConnMaxDownRate;
	static	float	cumConnAvgUpRate;
	static	float	cumConnMaxAvgUpRate;
	static	float	cumConnMaxUpRate;
	static	time_t	cumConnRunTime;
	static	uint32	cumConnNumReconnects;
	static	uint32	cumConnAvgConnections;
	static	uint32	cumConnMaxConnLimitReached;
	static	uint32	cumConnPeakConnections;
	static	uint32	cumConnTransferTime;
	static	uint32	cumConnDownloadTime;
	static	uint32	cumConnUploadTime;
	static	uint32	cumConnServerDuration;

	// Saved records for servers / network...
	static	uint32	cumSrvrsMostWorkingServers;
	static	uint32	cumSrvrsMostUsersOnline;
	static	uint32	cumSrvrsMostFilesAvail;

	// Saved records for shared files...
	static	uint32	cumSharedMostFilesShared;
	static	uint64	cumSharedLargestShareSize;
	static	uint64	cumSharedLargestAvgFileSize;
	static	uint64	cumSharedLargestFileSize;

	// Save the date when the statistics were last reset...
	static	time_t	stat_datetimeLastReset;

	// Save new preferences for PPgStats
	static	UINT	statsConnectionsGraphRatio; // This will store the divisor, i.e. for 1:3 it will be 3, for 1:20 it will be 20.
	// Save the expanded branches of the stats tree
	static	CString	m_strStatsExpandedTreeItems;

	static	UINT	statsSaveInterval;
	static  bool	m_bShowVerticalHourMarkers;
	// <-----khaos- End Statistics Members


	// Original Stats Stuff
	static	uint64	totalDownloadedBytes;
	static	uint64	totalUploadedBytes;
	// End Original Stats Stuff
	static	WORD	m_wLanguageID;
	static	bool	transferDoubleclick;
	static	EViewSharedFilesAccess m_iSeeShares;
	static	UINT	m_iToolDelayTime;	// tooltip delay time in seconds
	static	bool	bringtoforeground;
	static	UINT	splitterbarPosition;
	static	UINT	splitterbarPositionSvr;

	static	UINT	m_uTransferWnd1;
	static	UINT	m_uTransferWnd2;
	//MORPH START - Added by SiRoB, Splitting Bar [OČ]
	static	UINT	splitterbarPositionStat;
	static	UINT	splitterbarPositionStat_HL;
	static	UINT	splitterbarPositionStat_HR;
	static	UINT	splitterbarPositionFriend;
	static	UINT	splitterbarPositionShared;
	//MORPH END - Added by SiRoB, Splitting Bar [OČ]
	static	UINT	m_uDeadServerRetries;
	static	DWORD	m_dwServerKeepAliveTimeout;
	// -khaos--+++> Changed data type to avoid overflows
	static	UINT	statsMax;
	// <-----khaos-
	static	UINT	statsAverageMinutes;

	static	CString	notifierConfiguration;
	static	bool	notifierOnDownloadFinished;
	static	bool	notifierOnNewDownload;
	static	bool	notifierOnChat;
	static	bool	notifierOnLog;
	static	bool	notifierOnImportantError;
	static	bool	notifierOnEveryChatMsg;
	static	bool	notifierOnNewVersion;
	static	ENotifierSoundType notifierSoundType;
	static	CString	notifierSoundFile;

	static	bool	m_bMessageEnableSmileys;

	static	bool	m_bRemove2bin;
	static	bool	m_bShowCopyEd2kLinkCmd;
	static	bool	m_bpreviewprio;
	static	bool	m_bSmartServerIdCheck;
	static	uint8	smartidstate;
	static	bool	m_bSafeServerConnect;
	static	bool	startMinimized;
	static	bool	m_bAutoStart;
	static	bool	m_bRestoreLastMainWndDlg;
	static	int		m_iLastMainWndDlgID;
	static	bool	m_bRestoreLastLogPane;
	static	int		m_iLastLogPaneID;
	static	UINT	MaxConperFive;
	static	bool	checkDiskspace;
	static	UINT	m_uMinFreeDiskSpace;
	static	bool	m_bSparsePartFiles;
	static	CString	m_strYourHostname;
	static	bool	m_bEnableVerboseOptions;
	static	bool	m_bVerbose;
	static	bool	m_bFullVerbose;
	static  int		m_byLogLevel;
	static	bool	m_bDebugSourceExchange; // Sony April 23. 2003, button to keep source exchange msg out of verbose log
	static	bool	m_bLogBannedClients;
	static	bool	m_bLogRatingDescReceived;
	static	bool	m_bLogSecureIdent;
	static	bool	m_bLogFilteredIPs;
	static	bool	m_bLogFileSaving;
    static  bool    m_bLogA4AF; // ZZ:DownloadManager
	static	bool	m_bLogUlDlEvents;
	static	bool	m_bUseDebugDevice;
	static	int		m_iDebugServerTCPLevel;
	static	int		m_iDebugServerUDPLevel;
	static	int		m_iDebugServerSourcesLevel;
	static	int		m_iDebugServerSearchesLevel;
	static	int		m_iDebugClientTCPLevel;
	static	int		m_iDebugClientUDPLevel;
	static	int		m_iDebugClientKadUDPLevel;
	static	int		m_iDebugSearchResultDetailLevel;
	static	bool	m_bupdatequeuelist;
	static	bool	m_bManualAddedServersHighPriority;

//	static	bool	m_btransferfullchunks;
	static	int		m_istartnextfile;
	static	bool	m_bshowoverhead;
	static	bool	m_bDAP;
	static	bool	m_bUAP;
	static	bool	m_bDisableKnownClientList;
	static	bool	m_bDisableQueueList;
	static	bool	m_bExtControls;
	static	bool	m_bTransflstRemain;

	static	UINT	versioncheckdays;
	static	bool	showRatesInTitle;

	//dlarge Sorting
	static	int		tableSortItemDownload;
	static	int		tableSortItemDownload2;
	static	int		tableSortItemUpload;
	static	int		tableSortItemQueue;
	static	int		tableSortItemSearch;
	static	int		tableSortItemShared;
	static	int		tableSortItemServer;
	static	int		tableSortItemClientList;
	static  int		tableSortItemFilenames;
	static  int		tableSortItemIrcMain;
	static  int		tableSortItemIrcChannels;
	static	int		tableSortItemDownloadClients;
	static	bool	tableSortAscendingDownload;
	static	bool	tableSortAscendingDownload2;
	static	bool	tableSortAscendingUpload;
	static	bool	tableSortAscendingQueue;
	static	bool	tableSortAscendingSearch;
	static	bool	tableSortAscendingShared;
	static	bool	tableSortAscendingServer;
	static	bool	tableSortAscendingClientList;
	static  bool	tableSortAscendingFilenames;
	static  bool	tableSortAscendingIrcMain;
	static  bool	tableSortAscendingIrcChannels;
	static	bool	tableSortAscendingDownloadClients;
//dlarge end

	static	CString	m_strTxtEditor;
	static	CString	m_strVideoPlayer;
	static	CString	m_strVideoPlayerArgs;
	static	bool	moviePreviewBackup;
	static	int		m_iPreviewSmallBlocks;
	static	bool	m_bPreviewCopiedArchives;
	static	int		m_iInspectAllFileTypes;
	static	bool	m_bPreviewOnIconDblClk;
	static	bool	indicateratings;
	static	bool	watchclipboard;
	static	bool	filterserverbyip;
	static	bool	m_bFirstStart;
	static	bool	m_bCreditSystem;

	static	bool	log2disk;
	static	bool	debug2disk;
	static	int		iMaxLogBuff;
	static	UINT	uMaxLogFileSize;
	static	ELogFileFormat m_iLogFileFormat;
	static	bool	scheduler;
	static	bool	dontcompressavi;
	static	bool	msgonlyfriends;
	static	bool	msgsecure;

	static	UINT	filterlevel;
	static	UINT	m_iFileBufferSize;
	static	UINT	m_iQueueSize;
	static	int		m_iCommitFiles;

	static	UINT	maxmsgsessions;
	static	uint32	versioncheckLastAutomatic;
	static	CString	messageFilter;
	static	CString	commentFilter;
	static	CString	filenameCleanups;
	static	CString	m_strDateTimeFormat;
	static	CString	m_strDateTimeFormat4Log;
	static	LOGFONT m_lfHyperText;
	static	LOGFONT m_lfLogText;
	static	COLORREF m_crLogError;
	static	COLORREF m_crLogWarning;
	static	COLORREF m_crLogSuccess;
	static	int		m_iExtractMetaData;
	static	bool	m_bAdjustNTFSDaylightFileTime;
	static  bool    m_bAllocFull;


	// Web Server [kuchin]
	static	CString	m_strWebPassword;
	static	CString	m_strWebLowPassword;
	static	uint16	m_nWebPort;
	static	bool	m_bWebEnabled;
	static	bool	m_bWebUseGzip;
	static	int		m_nWebPageRefresh;
	static	bool	m_bWebLowEnabled;
	static	int		m_iWebTimeoutMins;
	static	int		m_iWebFileUploadSizeLimitMB;
	static	CString	m_strTemplateFile;
	static	ProxySettings proxy; // deadlake PROXYSUPPORT
	static  bool	m_bAllowAdminHiLevFunc;
	static	CUIntArray m_aAllowedRemoteAccessIPs;

	static	bool	showCatTabInfos;
	static	bool	resumeSameCat;
	static	bool	dontRecreateGraphs;
	static	bool	autofilenamecleanup;
	//static	int		allcatType;
	//static	bool	allcatTypeNeg;
	static	bool	m_bUseAutocompl;
	static	bool	m_bShowDwlPercentage;
	static	bool	m_bRemoveFinishedDownloads;
	static	UINT	m_iMaxChatHistory;
	//static	bool	m_bShowActiveDownloadsBold; //dlarge Design Settings 

	static	int		m_iSearchMethod;
	static	bool	m_bAdvancedSpamfilter;
	static	bool	m_bUseSecureIdent;
	// mobilemule
	static	CString	m_strMMPassword;
	static	bool	m_bMMEnabled;
	static	uint16	m_nMMPort;

	static	bool	networkkademlia;
	static	bool	networked2k;

	static	bool	m_bWinaTransToolbar;

	//preview
	static	bool	m_bPreviewEnabled;
	static	bool	m_bAutomaticArcPreviewStart;

	// ZZ:UploadSpeedSense -->
	static	bool	m_bDynUpEnabled;
	static	int		m_iDynUpPingTolerance;
	static	int		m_iDynUpGoingUpDivider;
	static	int		m_iDynUpGoingDownDivider;
	static	int		m_iDynUpNumberOfPings;
	static  int		m_iDynUpPingToleranceMilliseconds;
	static  bool	m_bDynUpUseMillisecondPingTolerance;
	// ZZ:UploadSpeedSense <--

    static bool     m_bA4AFSaveCpu; // ZZ:DownloadManager

    static bool     m_bHighresTimer;

	static	CStringList shareddir_list;
	static	CStringList addresses_list;

	static	int		m_iDbgHeap;
	static	UINT	m_nWebMirrorAlertLevel;
	static	bool	m_bRunAsUser;
	static	bool	m_bPreferRestrictedOverUser;

	static  bool	m_bUseOldTimeRemaining;

	// PeerCache
	static	uint32	m_uPeerCacheLastSearch;
	static	bool	m_bPeerCacheWasFound;
	static	bool	m_bPeerCacheEnabled;
	static	uint16	m_nPeerCachePort;
	static	bool	m_bPeerCacheShow;

	// Firewall settings
	static bool		m_bOpenPortsOnStartUp;

	//AICH Options
	static bool		m_bTrustEveryHash;
	
	// files
	static bool		m_bRememberCancelledFiles;
	static bool		m_bRememberDownloadedFiles;

	//email notifier
	static bool		m_bNotifierSendMail;
	static CString	m_strNotifierMailServer;
	static CString	m_strNotifierMailSender;
	static CString	m_strNotifierMailReceiver;

	// encryption / obfuscation / verification
	static bool		m_bCryptLayerRequested;
	static bool		m_bCryptLayerSupported;
	static bool		m_bCryptLayerRequired;
	static uint8	m_byCryptTCPPaddingLength;
	static uint32   m_dwKadUDPKey;

	// UPnP
	static bool		m_bSkipWANIPSetup;
	static bool		m_bSkipWANPPPSetup;
	static bool		m_bEnableUPnP;
	static bool		m_bCloseUPnPOnExit;

	// Spam
	static bool		m_bEnableSearchResultFilter;

	static BOOL		m_bIsRunningAeroGlass;
	static bool		m_bCryptLayerRequiredStrictServer; //dlarge lh require obfuscated server connection 

//dlarge Sorting
	static	bool	m_bUseSort;
	static	bool	m_bUseSrcSortCol2;
	static	bool	m_bPausedStoppedLast;
	static	byte	m_nServerSortCol;
	static	byte	m_nDownloadSortCol;
	static	byte	m_nUploadSortCol;
	static	byte	m_nQueueSortCol;
	static	byte	m_nClientListSortCol;
	static	byte	m_nSearchSortCol;
	static	byte	m_nIRCSortCol;
	static	uint16	m_nFileSortCol;
	static	byte	m_nSrcSortCol1;
	static	byte	m_nSrcSortCol2;
//dlarge end

//dlarge lowidretry
	static	uint8	LowIdRetries;
	static	uint8	LowIdRetried;
//dlarge end

//dlarge AutoBackup
	static bool	autobackup;
	static bool	autobackup2;
//dlarge end

//dlarge queue progress bar - Client percentage - chunk dots
        static bool m_bClientQueueProgressBar; 
	static bool m_bShowClientPercentage; 
	static bool	m_bEnableChunkDots;
	static bool	m_bShowSessionDownload;
	static bool m_bStaticIcon; //dlarge Static Tray Icon
	static bool m_bTrayComplete; //dlarge Completed in Tray 
        static bool m_bSideBanner; //dlarge switch Banner
//dlarge end

//dlarge Virus Scan
	static bool	virusscannerenabled;	
	static CString	virusscanner;		
	static CString	virusscanprefilesw; 
        static CString  virusscanswitches;  
	static int 	virusscannertype;   
	static int	virusscanradio;     
//dlarge end

//dlarge Source Graph 
	static bool	m_bSrcGraph;
	static uint16  m_iStatsHLMin;
	static uint16  m_iStatsHLMax;
	static uint16  m_iStatsHLDif;
//dlarge Source Graph 

	static bool		m_bDirectoryWatcher; //dlarge Automatic shared files updater 
	static int		m_iKnownMetDays; //dlarge .met file control

//dlarge CPU/MEM usage
	static bool m_bSysInfo;
	static bool m_bSysInfoGlobal;
//dlarge end

//dlarge minimule 
	static  int		speedmetermin;
	static  int		speedmetermax;
	static  bool	m_bMiniMule;
	static  uint32	m_iMiniMuleUpdate;
	static  bool	m_bMiniMuleLives;
	static  uint8	m_iMiniMuleTransparency;
	static	bool	m_bShowSpeedMeter;
	static	bool	m_bMMCompl;
	static	bool	m_bMMOpen;
//dlarge end

 //dlarge MTU Configuration
	static uint16	MTU;                         
	static bool	usedoublesendsize;            
 //dlarge MTU Configuration

//dlarge don't overwrite bak files if last sessions crashed
	static bool		m_this_session_aborted_in_an_unnormal_way;
	static bool		m_last_session_aborted_in_an_unnormal_way;
	static bool		eMuleChrashedLastSession()		{ return m_last_session_aborted_in_an_unnormal_way;}
//dlarge end

//dlarge Smart Category Control 
	static bool		m_bValidSrcsOnly;
	static bool		m_bShowCatNames;
	static bool		m_bActiveCatDefault;
	static bool		m_bSelCatOnAdd;
	static bool		m_bAutoSetResumeOrder;
	static bool		m_bSmallFileDLPush;
	static uint8	m_iStartDLInEmptyCats;
	static bool		m_bRespectMaxSources;
	static bool		m_bUseAutoCat;
	static uint8	dlMode;
//dlarge end

//dlarge Design Settings 
	// client styles
	static DWORD		nClientStyleFlags[style_c_count]; 
	static COLORREF		nClientStyleFontColor[style_c_count];
	static COLORREF		nClientStyleBackColor[style_c_count];
	static short		nClientStyleOnOff[style_c_count];

	// download styles
	static DWORD		nDownloadStyleFlags[style_d_count]; 
	static COLORREF		nDownloadStyleFontColor[style_d_count];
	static COLORREF		nDownloadStyleBackColor[style_d_count];
	static short		nDownloadStyleOnOff[style_d_count];

	// share styles
	static DWORD		nShareStyleFlags[style_s_count]; 
	static COLORREF		nShareStyleFontColor[style_s_count];
	static COLORREF		nShareStyleBackColor[style_s_count];
	static short		nShareStyleOnOff[style_s_count];

	// server styles
	static DWORD		nServerStyleFlags[style_se_count]; 
	static COLORREF		nServerStyleFontColor[style_se_count];
	static COLORREF		nServerStyleBackColor[style_se_count];
	static short		nServerStyleOnOff[style_se_count];

	// background styles
	static DWORD		nBackgroundStyleFlags[style_b_count]; 
	static COLORREF		nBackgroundStyleFontColor[style_b_count];
	static COLORREF		nBackgroundStyleBackColor[style_b_count];
	static short		nBackgroundStyleOnOff[style_b_count];

	// window styles
	static DWORD		nWindowStyleFlags[style_w_count]; 
	static COLORREF		nWindowStyleFontColor[style_w_count];
	static COLORREF		nWindowStyleBackColor[style_w_count];
	static short		nWindowStyleOnOff[style_w_count];

	static bool			m_bAutoTextColors;
//dlarge end

	enum Table
	{
		tableDownload, 
		tableDownload2,	//dlarge Sorting
		tableUpload, 
		tableQueue, 
		tableSearch,
		tableShared, 
		tableServer, 
		tableClientList,
		tableFilenames,
		tableDownloadClients
	};

	friend class CPreferencesWnd;
	friend class CPPgGeneral;
	friend class CPPgConnection;
	friend class CPPgServer;
	friend class CPPgDirectories;
	friend class CPPgFiles;
	friend class CPPgNotify;
	friend class Wizard;
	friend class CPPgTweaks;
	friend class CPPgDisplay;
	friend class CPPgSecurity;
	friend class CPPgScheduler;
	friend class CPPgDebug;
//dlarge page
	friend class CPPgTweaks2;     //Tweaks 2 
	friend class CPPg_X_General; // Tweaks 3 
	friend class CPPgSorting;    //dlarge Sorting
	friend class CPPgDesign;     //dlarge Design Settings 
#ifdef ARGOS //dlarge Argos
	friend class CPPgArgos;
#endif //dlarge end
//end


	CPreferences();
	~CPreferences();

	static	void	Init();
	static	void	Uninit();

	static	LPCTSTR GetTempDir(int id = 0)				{return (LPCTSTR)tempdir.GetAt((id < tempdir.GetCount()) ? id : 0);}
	static	int		GetTempDirCount()					{return tempdir.GetCount();}
	static	bool	CanFSHandleLargeFiles();
	static	LPCTSTR GetConfigFile();
	static	const CString& GetFileCommentsFilePath()	{return m_strFileCommentsFilePath;}
	static	CString	GetMuleDirectory(EDefaultDirectory eDirectory, bool bCreate = true);
	static	void	SetMuleDirectory(EDefaultDirectory eDirectory, CString strNewDir);
	static	void	ChangeUserDirMode(int nNewMode);

	static	bool	IsTempFile(const CString& rstrDirectory, const CString& rstrName);
	static	bool	IsConfigFile(const CString& rstrDirectory, const CString& rstrName);
	static	bool	IsShareableDirectory(const CString& rstrDirectory);
	static	bool	IsInstallationDirectory(const CString& rstrDir);

	static	bool	Save();
	static	void	SaveCats();

	static	bool	GetUseServerPriorities()			{return m_bUseServerPriorities;}
	static	bool	GetUseUserSortedServerList()		{return m_bUseUserSortedServerList;}
	static	bool	Reconnect()							{return reconnect;}
	static	const CString& GetUserNick()				{return strNick;}
	static	void	SetUserNick(LPCTSTR pszNick);
	static	int		GetMaxUserNickLength()				{return 50;}

	static	LPCSTR	GetBindAddrA()						{return m_pszBindAddrA; }
	static	LPCWSTR	GetBindAddrW()						{return m_pszBindAddrW; }
	static	uint16	GetPort()							{return port;}
	static	uint16	GetUDPPort()						{return udpport;}
	static	uint16	GetServerUDPPort()					{return nServerUDPPort;}
	static	uchar*	GetUserHash()						{return userhash;}
	// ZZ:UploadSpeedSense -->
	static	uint16	GetMinUpload()						{return minupload;}
	// ZZ:UploadSpeedSense <--
	static	uint16	GetMaxUpload()						{return maxupload;}
	static	bool	IsICHEnabled()						{return ICH;}
	static	bool	GetAutoUpdateServerList()			{return m_bAutoUpdateServerList;}
	static	bool	UpdateNotify()						{return updatenotify;}
	static	bool	GetMinToTray()						{return mintotray;}
	static	bool	DoAutoConnect()						{return autoconnect;}
	static	void	SetAutoConnect(bool inautoconnect)	{autoconnect = inautoconnect;}
	static	bool	GetAddServersFromServer()			{return m_bAddServersFromServer;}
	static	bool	GetAddServersFromClients()			{return m_bAddServersFromClients;}
	static	bool*	GetMinTrayPTR()						{return &mintotray;}
	static	UINT	GetTrafficOMeterInterval()			{return trafficOMeterInterval;}
	static	void	SetTrafficOMeterInterval(UINT in)	{trafficOMeterInterval=in;}
	static	UINT	GetStatsInterval()					{return statsInterval;}
	static	void	SetStatsInterval(UINT in)			{statsInterval=in;}
	static	bool	GetFillGraphs()						{return m_bFillGraphs;}
	static	void	SetFillGraphs(bool bFill)			{m_bFillGraphs = bFill;}

	// -khaos--+++> Many, many, many, many methods.
	static	void	SaveStats(int bBackUp = 0);
	static	void	SetRecordStructMembers();
	static	void	SaveCompletedDownloadsStat();
	static	bool	LoadStats(int loadBackUp = 0);
	static	void	ResetCumulativeStatistics();

	static	void	Add2DownCompletedFiles()			{cumDownCompletedFiles++;}
	static	void	SetConnMaxAvgDownRate(float in)		{cumConnMaxAvgDownRate = in;}
	static	void	SetConnMaxDownRate(float in)		{cumConnMaxDownRate = in;}
	static	void	SetConnAvgUpRate(float in)			{cumConnAvgUpRate = in;}
	static	void	SetConnMaxAvgUpRate(float in)		{cumConnMaxAvgUpRate = in;}
	static	void	SetConnMaxUpRate(float in)			{cumConnMaxUpRate = in;}
	static	void	SetConnPeakConnections(int in)		{cumConnPeakConnections = in;}
	static	void	SetUpAvgTime(int in)				{cumUpAvgTime = in;}
	static	void	Add2DownSAvgTime(int in)			{sesDownAvgTime += in;}
	static	void	SetDownCAvgTime(int in)				{cumDownAvgTime = in;}
	static	void	Add2ConnTransferTime(int in)		{cumConnTransferTime += in;}
	static	void	Add2ConnDownloadTime(int in)		{cumConnDownloadTime += in;}
	static	void	Add2ConnUploadTime(int in)			{cumConnUploadTime += in;}
	static	void	Add2DownSessionCompletedFiles()		{sesDownCompletedFiles++;}
	static	void	Add2SessionTransferData(UINT uClientID, UINT uClientPort, BOOL bFromPF, BOOL bUpDown, uint32 bytes, bool sentToFriend = false);
	static	void	Add2DownSuccessfulSessions()		{sesDownSuccessfulSessions++;
														 cumDownSuccessfulSessions++;}
	static	void	Add2DownFailedSessions()			{sesDownFailedSessions++;
														 cumDownFailedSessions++;}
	static	void	Add2LostFromCorruption(uint64 in)	{sesLostFromCorruption += in;}
	static	void	Add2SavedFromCompression(uint64 in) {sesSavedFromCompression += in;}
	static	void	Add2SessionPartsSavedByICH(int in)	{sesPartsSavedByICH += in;}

	// Saved stats for cumulative downline overhead
	static	uint64	GetDownOverheadTotal()				{return cumDownOverheadTotal;}
	static	uint64	GetDownOverheadFileReq()			{return cumDownOverheadFileReq;}
	static	uint64	GetDownOverheadSrcEx()				{return cumDownOverheadSrcEx;}
	static	uint64	GetDownOverheadServer()				{return cumDownOverheadServer;}
	static	uint64	GetDownOverheadKad()				{return cumDownOverheadKad;}
	static	uint64	GetDownOverheadTotalPackets()		{return cumDownOverheadTotalPackets;}
	static	uint64	GetDownOverheadFileReqPackets()		{return cumDownOverheadFileReqPackets;}
	static	uint64	GetDownOverheadSrcExPackets()		{return cumDownOverheadSrcExPackets;}
	static	uint64	GetDownOverheadServerPackets()		{return cumDownOverheadServerPackets;}
	static	uint64	GetDownOverheadKadPackets()			{return cumDownOverheadKadPackets;}

	// Saved stats for cumulative upline overhead
	static	uint64	GetUpOverheadTotal()				{return cumUpOverheadTotal;}
	static	uint64	GetUpOverheadFileReq()				{return cumUpOverheadFileReq;}
	static	uint64	GetUpOverheadSrcEx()				{return cumUpOverheadSrcEx;}
	static	uint64	GetUpOverheadServer()				{return cumUpOverheadServer;}
	static	uint64	GetUpOverheadKad()					{return cumUpOverheadKad;}
	static	uint64	GetUpOverheadTotalPackets()			{return cumUpOverheadTotalPackets;}
	static	uint64	GetUpOverheadFileReqPackets()		{return cumUpOverheadFileReqPackets;}
	static	uint64	GetUpOverheadSrcExPackets()			{return cumUpOverheadSrcExPackets;}
	static	uint64	GetUpOverheadServerPackets()		{return cumUpOverheadServerPackets;}
	static	uint64	GetUpOverheadKadPackets()			{return cumUpOverheadKadPackets;}

	// Saved stats for cumulative upline data
	static	uint32	GetUpSuccessfulSessions()			{return cumUpSuccessfulSessions;}
	static	uint32	GetUpFailedSessions()				{return cumUpFailedSessions;}
	static	uint32	GetUpAvgTime()						{return cumUpAvgTime;}

	// Saved stats for cumulative downline data
	static	uint32	GetDownCompletedFiles()				{return cumDownCompletedFiles;}
	static	uint32	GetDownC_SuccessfulSessions()		{return cumDownSuccessfulSessions;}
	static	uint32	GetDownC_FailedSessions()			{return cumDownFailedSessions;}
	static	uint32	GetDownC_AvgTime()					{return cumDownAvgTime;}
	
	// Session download stats
	static	uint32	GetDownSessionCompletedFiles()		{return sesDownCompletedFiles;}
	static	uint32	GetDownS_SuccessfulSessions()		{return sesDownSuccessfulSessions;}
	static	uint32	GetDownS_FailedSessions()			{return sesDownFailedSessions;}
	static	uint32	GetDownS_AvgTime()					{return GetDownS_SuccessfulSessions() ? sesDownAvgTime / GetDownS_SuccessfulSessions() : 0;}

	// Saved stats for corruption/compression
	static	uint64	GetCumLostFromCorruption()			{return cumLostFromCorruption;}
	static	uint64	GetCumSavedFromCompression()		{return cumSavedFromCompression;}
	static	uint64	GetSesLostFromCorruption()			{return sesLostFromCorruption;}
	static	uint64	GetSesSavedFromCompression()		{return sesSavedFromCompression;}
	static	uint32	GetCumPartsSavedByICH()				{return cumPartsSavedByICH;}
	static	uint32	GetSesPartsSavedByICH()				{return sesPartsSavedByICH;}

	// Cumulative client breakdown stats for sent bytes
	static	uint64	GetUpTotalClientData()				{return   GetCumUpData_EDONKEY()
																+ GetCumUpData_EDONKEYHYBRID()
																+ GetCumUpData_EMULE()
																+ GetCumUpData_MLDONKEY()
																+ GetCumUpData_AMULE()
																+ GetCumUpData_EMULECOMPAT()
																+ GetCumUpData_SHAREAZA();}
	static	uint64	GetCumUpData_EDONKEY()				{return (cumUpData_EDONKEY +		sesUpData_EDONKEY );}
	static	uint64	GetCumUpData_EDONKEYHYBRID()		{return (cumUpData_EDONKEYHYBRID +	sesUpData_EDONKEYHYBRID );}
	static	uint64	GetCumUpData_EMULE()				{return (cumUpData_EMULE +			sesUpData_EMULE );}
	static	uint64	GetCumUpData_MLDONKEY()				{return (cumUpData_MLDONKEY +		sesUpData_MLDONKEY );}
	static	uint64	GetCumUpData_AMULE()				{return (cumUpData_AMULE +			sesUpData_AMULE );}
	static	uint64	GetCumUpData_EMULECOMPAT()			{return (cumUpData_EMULECOMPAT +	sesUpData_EMULECOMPAT );}
	static	uint64	GetCumUpData_SHAREAZA()				{return (cumUpData_SHAREAZA +		sesUpData_SHAREAZA );}
	
	// Session client breakdown stats for sent bytes
	static	uint64	GetUpSessionClientData()			{return   sesUpData_EDONKEY 
																+ sesUpData_EDONKEYHYBRID 
																+ sesUpData_EMULE 
																+ sesUpData_MLDONKEY 
																+ sesUpData_AMULE
																+ sesUpData_EMULECOMPAT
																+ sesUpData_SHAREAZA;}
	static	uint64	GetUpData_EDONKEY()					{return sesUpData_EDONKEY;}
	static	uint64	GetUpData_EDONKEYHYBRID()			{return sesUpData_EDONKEYHYBRID;}
	static	uint64	GetUpData_EMULE()					{return sesUpData_EMULE;}
	static	uint64	GetUpData_MLDONKEY()				{return sesUpData_MLDONKEY;}
	static	uint64	GetUpData_AMULE()					{return sesUpData_AMULE;}
	static	uint64	GetUpData_EMULECOMPAT()				{return sesUpData_EMULECOMPAT;}
	static	uint64	GetUpData_SHAREAZA()				{return sesUpData_SHAREAZA;}

	// Cumulative port breakdown stats for sent bytes...
	static	uint64	GetUpTotalPortData()				{return   GetCumUpDataPort_4662() 
																+ GetCumUpDataPort_OTHER()
																+ GetCumUpDataPort_PeerCache();}
	static	uint64	GetCumUpDataPort_4662()				{return (cumUpDataPort_4662 +		sesUpDataPort_4662 );}
	static	uint64	GetCumUpDataPort_OTHER()			{return (cumUpDataPort_OTHER +		sesUpDataPort_OTHER );}
	static	uint64	GetCumUpDataPort_PeerCache()		{return (cumUpDataPort_PeerCache +	sesUpDataPort_PeerCache );}

	// Session port breakdown stats for sent bytes...
	static	uint64	GetUpSessionPortData()				{return   sesUpDataPort_4662 
																+ sesUpDataPort_OTHER
																+ sesUpDataPort_PeerCache;}
	static	uint64	GetUpDataPort_4662()				{return sesUpDataPort_4662;}
	static	uint64	GetUpDataPort_OTHER()				{return sesUpDataPort_OTHER;}
	static	uint64	GetUpDataPort_PeerCache()			{return sesUpDataPort_PeerCache;}

	// Cumulative DS breakdown stats for sent bytes...
	static	uint64	GetUpTotalDataFile()				{return (GetCumUpData_File() +		GetCumUpData_Partfile() );}
	static	uint64	GetCumUpData_File()					{return (cumUpData_File +			sesUpData_File );}
	static	uint64	GetCumUpData_Partfile()				{return (cumUpData_Partfile +		sesUpData_Partfile );}
	// Session DS breakdown stats for sent bytes...
	static	uint64	GetUpSessionDataFile()				{return (sesUpData_File +			sesUpData_Partfile );}
	static	uint64	GetUpData_File()					{return sesUpData_File;}
	static	uint64	GetUpData_Partfile()				{return sesUpData_Partfile;}

	// Cumulative client breakdown stats for received bytes
	static	uint64	GetDownTotalClientData()			{return   GetCumDownData_EDONKEY() 
																+ GetCumDownData_EDONKEYHYBRID() 
																+ GetCumDownData_EMULE() 
																+ GetCumDownData_MLDONKEY() 
																+ GetCumDownData_AMULE()
																+ GetCumDownData_EMULECOMPAT()
																+ GetCumDownData_SHAREAZA()
																+ GetCumDownData_URL();}
	static	uint64	GetCumDownData_EDONKEY()			{return (cumDownData_EDONKEY +			sesDownData_EDONKEY);}
	static	uint64	GetCumDownData_EDONKEYHYBRID()		{return (cumDownData_EDONKEYHYBRID +	sesDownData_EDONKEYHYBRID);}
	static	uint64	GetCumDownData_EMULE()				{return (cumDownData_EMULE +			sesDownData_EMULE);}
	static	uint64	GetCumDownData_MLDONKEY()			{return (cumDownData_MLDONKEY +			sesDownData_MLDONKEY);}
	static	uint64	GetCumDownData_AMULE()				{return (cumDownData_AMULE +			sesDownData_AMULE);}
	static	uint64	GetCumDownData_EMULECOMPAT()		{return (cumDownData_EMULECOMPAT +		sesDownData_EMULECOMPAT);}
	static	uint64	GetCumDownData_SHAREAZA()			{return (cumDownData_SHAREAZA +			sesDownData_SHAREAZA);}
	static	uint64	GetCumDownData_URL()				{return (cumDownData_URL +				sesDownData_URL);}
	
	// Session client breakdown stats for received bytes
	static	uint64	GetDownSessionClientData()			{return   sesDownData_EDONKEY 
																+ sesDownData_EDONKEYHYBRID 
																+ sesDownData_EMULE 
																+ sesDownData_MLDONKEY 
																+ sesDownData_AMULE
																+ sesDownData_EMULECOMPAT
																+ sesDownData_SHAREAZA
																+ sesDownData_URL;}
	static	uint64	GetDownData_EDONKEY()				{return sesDownData_EDONKEY;}
	static	uint64	GetDownData_EDONKEYHYBRID()			{return sesDownData_EDONKEYHYBRID;}
	static	uint64	GetDownData_EMULE()					{return sesDownData_EMULE;}
	static	uint64	GetDownData_MLDONKEY()				{return sesDownData_MLDONKEY;}
	static	uint64	GetDownData_AMULE()					{return sesDownData_AMULE;}
	static	uint64	GetDownData_EMULECOMPAT()			{return sesDownData_EMULECOMPAT;}
	static	uint64	GetDownData_SHAREAZA()				{return sesDownData_SHAREAZA;}
	static	uint64	GetDownData_URL()					{return sesDownData_URL;}

	// Cumulative port breakdown stats for received bytes...
	static	uint64	GetDownTotalPortData()				{return   GetCumDownDataPort_4662() 
																+ GetCumDownDataPort_OTHER()
																+ GetCumDownDataPort_PeerCache();}
	static	uint64	GetCumDownDataPort_4662()			{return cumDownDataPort_4662		+ sesDownDataPort_4662;}
	static	uint64	GetCumDownDataPort_OTHER()			{return cumDownDataPort_OTHER		+ sesDownDataPort_OTHER;}
	static	uint64	GetCumDownDataPort_PeerCache()		{return cumDownDataPort_PeerCache	+ sesDownDataPort_PeerCache;}

	// Session port breakdown stats for received bytes...
	static	uint64	GetDownSessionDataPort()			{return   sesDownDataPort_4662 
																+ sesDownDataPort_OTHER
																+ sesDownDataPort_PeerCache;}
	static	uint64	GetDownDataPort_4662()				{return sesDownDataPort_4662;}
	static	uint64	GetDownDataPort_OTHER()				{return sesDownDataPort_OTHER;}
	static	uint64	GetDownDataPort_PeerCache()			{return sesDownDataPort_PeerCache;}

	// Saved stats for cumulative connection data
	static	float	GetConnAvgDownRate()				{return cumConnAvgDownRate;}
	static	float	GetConnMaxAvgDownRate()				{return cumConnMaxAvgDownRate;}
	static	float	GetConnMaxDownRate()				{return cumConnMaxDownRate;}
	static	float	GetConnAvgUpRate()					{return cumConnAvgUpRate;}
	static	float	GetConnMaxAvgUpRate()				{return cumConnMaxAvgUpRate;}
	static	float	GetConnMaxUpRate()					{return cumConnMaxUpRate;}
	static	time_t	GetConnRunTime()					{return cumConnRunTime;}
	static	uint32	GetConnNumReconnects()				{return cumConnNumReconnects;}
	static	uint32	GetConnAvgConnections()				{return cumConnAvgConnections;}
	static	uint32	GetConnMaxConnLimitReached()		{return cumConnMaxConnLimitReached;}
	static	uint32	GetConnPeakConnections()			{return cumConnPeakConnections;}
	static	uint32	GetConnTransferTime()				{return cumConnTransferTime;}
	static	uint32	GetConnDownloadTime()				{return cumConnDownloadTime;}
	static	uint32	GetConnUploadTime()					{return cumConnUploadTime;}
	static	uint32	GetConnServerDuration()				{return cumConnServerDuration;}

	// Saved records for servers / network
	static	uint32	GetSrvrsMostWorkingServers()		{return cumSrvrsMostWorkingServers;}
	static	uint32	GetSrvrsMostUsersOnline()			{return cumSrvrsMostUsersOnline;}
	static	uint32	GetSrvrsMostFilesAvail()			{return cumSrvrsMostFilesAvail;}

	// Saved records for shared files
	static	uint32	GetSharedMostFilesShared()			{return cumSharedMostFilesShared;}
	static	uint64	GetSharedLargestShareSize()			{return cumSharedLargestShareSize;}
	static	uint64	GetSharedLargestAvgFileSize()		{return cumSharedLargestAvgFileSize;}
	static	uint64	GetSharedLargestFileSize()			{return cumSharedLargestFileSize;}

	// Get the long date/time when the stats were last reset
	static	time_t GetStatsLastResetLng()				{return stat_datetimeLastReset;}
	static	CString GetStatsLastResetStr(bool formatLong = true);
	static	UINT	GetStatsSaveInterval()				{return statsSaveInterval;}

	// Get and Set our new preferences
	static	void	SetStatsMax(UINT in)				{statsMax = in;}
	static	void	SetStatsConnectionsGraphRatio(UINT in) {statsConnectionsGraphRatio = in;}
	static	UINT	GetStatsConnectionsGraphRatio()		{return statsConnectionsGraphRatio;}
	static	void	SetExpandedTreeItems(CString in)	{m_strStatsExpandedTreeItems = in;}
	static	const CString &GetExpandedTreeItems()		{return m_strStatsExpandedTreeItems;}

	static	uint64	GetTotalDownloaded()				{return totalDownloadedBytes;}
	static	uint64	GetTotalUploaded()					{return totalUploadedBytes;}

	static	bool	IsErrorBeepEnabled()				{return beepOnError;}
	static	bool	IsConfirmExitEnabled()				{return confirmExit;}
	static	bool	UseSplashScreen()					{return splashscreen;}
	static	bool	FilterLANIPs()						{return filterLANIPs;}
	static	bool	GetAllowLocalHostIP()				{return m_bAllocLocalHostIP;}
	static	bool	IsOnlineSignatureEnabled()			{return onlineSig;}
	static	int		GetMaxGraphUploadRate(bool bEstimateIfUnlimited);
	static	int		GetMaxGraphDownloadRate()			{return maxGraphDownloadRate;}
	static	void	SetMaxGraphUploadRate(int in);
	static	void	SetMaxGraphDownloadRate(int in)		{maxGraphDownloadRate=(in)?in:96;}

//dlarge disable compression
	static bool m_bUseCompression;
//dlarge end

//dlarge remove unused AICH-hashes
	static bool m_rememberAICH;
	static bool GetRememberAICH() {return m_rememberAICH;}
	static void SetRememberAICH(bool in) {m_rememberAICH=in;}
//dlarge end

//dlarge Drop
	static   uint16 CPreferences::GetMaxRemoveQRS()				{ return MaxRemoveQRS; }
 	static   void	SetMaxRemoveQRS(uint16 in)						{MaxRemoveQRS=in;}
	static void		SetDropSourcesNNS(bool in)					{m_bDropSourcesNNS = in;}
	static void		SetDropSourcesFQ(bool in)					{m_bDropSourcesFQ = in;}
	static void		SetDropSourcesHQR(bool in)					{m_bDropSourcesHQR = in;}
	static uint32	GetDropSourcesTimerNNS()					{return m_iDropSourcesTimerNNS;}
	static uint32	GetDropSourcesTimerFQ()						{return m_iDropSourcesTimerFQ;}
	static uint32	GetDropSourcesTimerHQR()					{return m_iDropSourcesTimerHQR;}
	static bool		GetDropSourcesNNS()							{return m_bDropSourcesNNS;}
	static bool		GetDropSourcesFQ()							{return m_bDropSourcesFQ;}
	static bool		GetDropSourcesHQR()							{return m_bDropSourcesHQR;}
//dlarge end

//dlarge InvisibleMode
    static	bool GetInvisibleMode()								{ return m_bInvisibleMode; } 
	static	bool IsStartInvisible()								{ return (m_bInvisibleMode && m_bStartInvisible);}
    static	UINT GetInvisibleModeHKKeyModifier()				{ return m_iInvisibleModeHotKeyModifier; } 
    static	char GetInvisibleModeHKKey()						{ return m_cInvisibleModeHotKey; } 
    static	void SetInvisibleMode(bool on, UINT keymodifier, char key); 
//dlarge end

//dlarge Mass Rename
	static	void	SetSimpleCleanupOptions (int _i)	      { m_SimpleCleanupOptions = _i; }
	static	int 	GetSimpleCleanupOptions ()			      { return m_SimpleCleanupOptions; }
	static	void	SetSimpleCleanupSearch (CString _s)	      { m_SimpleCleanupSearch = _s; }
	static	CString	GetSimpleCleanupSearch ()			      { return m_SimpleCleanupSearch; }
	static	void	SetSimpleCleanupReplace (CString _s)	  { m_SimpleCleanupReplace = _s; }
	static	CString	GetSimpleCleanupReplace ()				  { return m_SimpleCleanupReplace; }
	static	void	SetSimpleCleanupSearchChars (CString _s)  { m_SimpleCleanupSearchChars = _s; }
	static	CString	GetSimpleCleanupSearchChars ()			  { return m_SimpleCleanupSearchChars; }
	static	void	SetSimpleCleanupReplaceChars (CString _s) { m_SimpleCleanupReplaceChars = _s; }
	static	CString	GetSimpleCleanupReplaceChars ()			  { return m_SimpleCleanupReplaceChars; }
//dlarge end

// dlarge QuickStart
	static	UINT	GetMaxConnections(bool bOriginal = false) {return (!bOriginal && m_bOnQuickStart) ? m_iQuickMaxConnections : maxconnections;}
	static	UINT	GetMaxHalfConnections(bool bOriginal = false) {return (!bOriginal && m_bOnQuickStart) ? m_iQuickMaxHalfOpen : maxhalfconnections;}

	static	bool	UseQuickStart()					{return m_bQuickStart;}
	static	int		GetQuickStartMaxTime()			{return m_iQuickStartTime;}
	static	int		GetQuickStartMaxTimeMs()		{return MIN2MS(m_iQuickStartTime);}
	//static	int		GetQuickStartTimePerFile()		{return m_iQuickStartTimePerFile;}
	//static	int		GetQuickStartTimePerFileMs()	{return (m_iQuickStartTimePerFile*100);}

	static	bool	OnQuickStart()					{return m_bOnQuickStart;}
	static	void	SetOnQuickStart(bool in)		{m_bOnQuickStart = in;}
// dlarge end

//dlarge MenuXP
	static	bool	m_bShowXPSideBar;
	static	bool	m_bShowXPBitmap;
	static  int 	m_iXPMenuStyle;
	static	bool	m_bGrayMenuIcon;
//dlarge end

	static	uint16	GetMaxDownload();
	static	uint64	GetMaxDownloadInBytesPerSec(bool dynamic = false);
// dlarge QuickStart
	//static	UINT	GetMaxConnections()					{return maxconnections;}
	//static	UINT	GetMaxHalfConnections()				{return maxhalfconnections;}
// dlarge end
	static	UINT	GetMaxSourcePerFileDefault()		{return maxsourceperfile;}
	static	UINT	GetDeadServerRetries()				{return m_uDeadServerRetries;}
	static	DWORD	GetServerKeepAliveTimeout()			{return m_dwServerKeepAliveTimeout;}
	static	bool	GetConditionalTCPAccept()			{return m_bConditionalTCPAccept;}

//dlarge Sorting
	static	int		GetColumnSortItem (Table t);
	static	bool	GetColumnSortAscending (Table t);
	static	void	SetColumnSortItem (Table t, int sortItem);
	static	void	SetColumnSortAscending (Table t, bool sortAscending);
//dlarge end 

	static	WORD	GetLanguageID();
	static	void	SetLanguageID(WORD lid);
	static	void	GetLanguages(CWordArray& aLanguageIDs);
	static	void	SetLanguage();
	static	bool	IsLanguageSupported(LANGID lidSelected, bool bUpdateBefore);
	static	CString GetLangDLLNameByID(LANGID lidSelected);
	static	void	InitThreadLocale();
	static	void	SetRtlLocale(LCID lcid);
	static	CString GetHtmlCharset();

	static	bool	IsDoubleClickEnabled()				{return transferDoubleclick;}
	static	EViewSharedFilesAccess CanSeeShares(void)	{return m_iSeeShares;}
	static	UINT	GetToolTipDelay(void)				{return m_iToolDelayTime;}
	static	bool	IsBringToFront()					{return bringtoforeground;}

	static	UINT	GetSplitterbarPosition()			{return splitterbarPosition;}
	static	void	SetSplitterbarPosition(UINT pos)	{splitterbarPosition=pos;}
	static	UINT	GetSplitterbarPositionServer()		{return splitterbarPositionSvr;}
	static	void	SetSplitterbarPositionServer(UINT pos)	{splitterbarPositionSvr=pos;}
	static	UINT	GetTransferWnd1()					{return m_uTransferWnd1;}
	static	void	SetTransferWnd1(UINT uWnd1)			{m_uTransferWnd1 = uWnd1;}
	static	UINT	GetTransferWnd2()					{return m_uTransferWnd2;}
	static	void	SetTransferWnd2(UINT uWnd2)			{m_uTransferWnd2 = uWnd2;}
	//MORPH START - Added by SiRoB, Splitting Bar [OČ]
	static	UINT	GetSplitterbarPositionStat()		{return splitterbarPositionStat;}
	static	void	SetSplitterbarPositionStat(UINT pos) {splitterbarPositionStat=pos;}
	static	UINT	GetSplitterbarPositionStat_HL()		{return splitterbarPositionStat_HL;}
	static	void	SetSplitterbarPositionStat_HL(UINT pos) {splitterbarPositionStat_HL=pos;}
	static	UINT	GetSplitterbarPositionStat_HR()		{return splitterbarPositionStat_HR;}
	static	void	SetSplitterbarPositionStat_HR(UINT pos) {splitterbarPositionStat_HR=pos;}
	static	UINT	GetSplitterbarPositionFriend()		{return splitterbarPositionFriend;}
	static	void	SetSplitterbarPositionFriend(UINT pos) {splitterbarPositionFriend=pos;}
	static	UINT	GetSplitterbarPositionShared()		{return splitterbarPositionShared;}
	static	void	SetSplitterbarPositionShared(UINT pos) {splitterbarPositionShared=pos;}
	//MORPH END   - Added by SiRoB, Splitting Bar [OČ]
	// -khaos--+++> Changed datatype to avoid overflows
	static	UINT	GetStatsMax()						{return statsMax;}
	// <-----khaos-
	static	bool	UseFlatBar()						{return (depth3D==0);}
	static	int		GetStraightWindowStyles()			{return m_iStraightWindowStyles;}

	static	UINT	GetStatsAverageMinutes()			{return statsAverageMinutes;}
	static	void	SetStatsAverageMinutes(UINT in)	{statsAverageMinutes=in;}

	static	const CString& GetNotifierConfiguration()	{return notifierConfiguration;}
	static	void	SetNotifierConfiguration(LPCTSTR pszConfigPath) {notifierConfiguration = pszConfigPath;}
	static	bool	GetNotifierOnDownloadFinished()		{return notifierOnDownloadFinished;}
	static	bool	GetNotifierOnNewDownload()			{return notifierOnNewDownload;}
	static	bool	GetNotifierOnChat()					{return notifierOnChat;}
	static	bool	GetNotifierOnLog()					{return notifierOnLog;}
	static	bool	GetNotifierOnImportantError()		{return notifierOnImportantError;}
	static	bool	GetNotifierOnEveryChatMsg()			{return notifierOnEveryChatMsg;}
	static	bool	GetNotifierOnNewVersion()			{return notifierOnNewVersion;}
	static	ENotifierSoundType GetNotifierSoundType()	{return notifierSoundType;}
	static	const CString& GetNotifierSoundFile()		{return notifierSoundFile;}

	static	bool	GetEnableMiniMule()					{return m_bEnableMiniMule;}
	static	bool	GetRTLWindowsLayout()				{return m_bRTLWindowsLayout;}

	static	bool	GetMessageEnableSmileys()			{return m_bMessageEnableSmileys;}

	static	WORD	GetWindowsVersion();
	static  bool	IsRunningAeroGlassTheme();
	static	bool	GetStartMinimized()					{return startMinimized;}
	static	void	SetStartMinimized( bool instartMinimized) {startMinimized = instartMinimized;}
	static	bool	GetAutoStart()						{return m_bAutoStart;}
	static	void	SetAutoStart( bool val)				{m_bAutoStart = val;}

	static	bool	GetRestoreLastMainWndDlg()			{return m_bRestoreLastMainWndDlg;}
	static	int		GetLastMainWndDlgID()				{return m_iLastMainWndDlgID;}
	static	void	SetLastMainWndDlgID(int iID)		{m_iLastMainWndDlgID = iID;}

	static	bool	GetRestoreLastLogPane()				{return m_bRestoreLastLogPane;}
	static	int		GetLastLogPaneID()					{return m_iLastLogPaneID;}
	static	void	SetLastLogPaneID(int iID)			{m_iLastLogPaneID = iID;}

	static	bool	GetSmartIdCheck()					{return m_bSmartServerIdCheck;}
	static	void	SetSmartIdCheck(bool in_smartidcheck) {m_bSmartServerIdCheck = in_smartidcheck;}
	static	uint8	GetSmartIdState()					{return smartidstate;}
	static	void	SetSmartIdState(uint8 in_smartidstate) {smartidstate = in_smartidstate;}
	static	bool	GetPreviewPrio()					{return m_bpreviewprio;}
	static	void	SetPreviewPrio(bool in)				{m_bpreviewprio=in;}
	static	bool	GetUpdateQueueList()				{return m_bupdatequeuelist;}
	static	bool	GetManualAddedServersHighPriority()	{return m_bManualAddedServersHighPriority;}
//	static	bool	TransferFullChunks()				{return m_btransferfullchunks;}
//	static	void	SetTransferFullChunks( bool m_bintransferfullchunks )				{m_btransferfullchunks = m_bintransferfullchunks;}
	static	int		StartNextFile()						{return m_istartnextfile;}
	static	bool	ShowOverhead()						{return m_bshowoverhead;}
	static	void	SetNewAutoUp(bool m_bInUAP)			{m_bUAP = m_bInUAP;}
	static	bool	GetNewAutoUp()						{return m_bUAP;}
	static	void	SetNewAutoDown(bool m_bInDAP)		{m_bDAP = m_bInDAP;}
	static	bool	GetNewAutoDown()					{return m_bDAP;}
	static	bool	IsKnownClientListDisabled()			{return m_bDisableKnownClientList;}
	static	bool	IsQueueListDisabled()				{return m_bDisableQueueList;}
	static	bool	IsFirstStart()						{return m_bFirstStart;}
	static	bool	UseCreditSystem()					{return m_bCreditSystem;}
	static	void	SetCreditSystem(bool m_bInCreditSystem) {m_bCreditSystem = m_bInCreditSystem;}

	static	const CString& GetTxtEditor()				{return m_strTxtEditor;}
	static	const CString& GetVideoPlayer()				{return m_strVideoPlayer;}
	static	const CString& GetVideoPlayerArgs()			{return m_strVideoPlayerArgs;}

	static	UINT	GetFileBufferSize()					{return m_iFileBufferSize;}
	static	UINT	GetQueueSize()						{return m_iQueueSize;}
	static	int		GetCommitFiles()					{return m_iCommitFiles;}
	static	bool	GetShowCopyEd2kLinkCmd()			{return m_bShowCopyEd2kLinkCmd;}

	// Barry
	static	UINT	Get3DDepth()						{return depth3D;}
	static	bool	AutoTakeED2KLinks()					{return autotakeed2klinks;}
	static	bool	AddNewFilesPaused()					{return addnewfilespaused;}

	static	bool	TransferlistRemainSortStyle()		{return m_bTransflstRemain;}
	static	void	TransferlistRemainSortStyle(bool in){m_bTransflstRemain=in;}

	static	DWORD	GetStatsColor(int index)			{return m_adwStatsColors[index];}
	static	void	SetStatsColor(int index, DWORD value){m_adwStatsColors[index] = value;}
	static	int		GetNumStatsColors()					{return ARRSIZE(m_adwStatsColors);}
	static	void	GetAllStatsColors(int iCount, LPDWORD pdwColors);
	static	bool	SetAllStatsColors(int iCount, const DWORD* pdwColors);
	static	void	ResetStatsColor(int index);

	static	void	SetMaxConsPerFive(UINT in)			{MaxConperFive=in;}
	static	LPLOGFONT GetHyperTextLogFont()				{return &m_lfHyperText;}
	static	void	SetHyperTextFont(LPLOGFONT plf)		{m_lfHyperText = *plf;}
	static	LPLOGFONT GetLogFont()						{return &m_lfLogText;}
	static	void	SetLogFont(LPLOGFONT plf)			{m_lfLogText = *plf;}
	static	COLORREF GetLogErrorColor()					{return m_crLogError;}
	static	COLORREF GetLogWarningColor()				{return m_crLogWarning;}
	static	COLORREF GetLogSuccessColor()				{return m_crLogSuccess;}

	static	UINT	GetMaxConperFive(bool bOriginal = false) {return (!bOriginal && m_bOnQuickStart) ? m_iQuickMaxConperFive : MaxConperFive;} //dlarge QuickStart
	//static	UINT	GetMaxConperFive()					{return MaxConperFive;}//dlarge QUICKSTART
	static	UINT	GetDefaultMaxConperFive();

// dlarge Static server handling
	static bool		m_bDontRemoveStaticServers;
	static	bool    GetDontRemoveStaticServers ()			  { return m_bDontRemoveStaticServers; }
	static	void	SetDontRemoveStaticServers (bool _b)	  { m_bDontRemoveStaticServers = _b; }
// dlarge end

//dlarge Double Sendsize MTU
	static  bool    IsDoubleSendSize()                  {return usedoublesendsize;}
//dlarge end

	static	bool	IsSafeServerConnectEnabled()		{return m_bSafeServerConnect;}
	static	void	SetSafeServerConnectEnabled(bool in){m_bSafeServerConnect=in;}
	static	bool	IsMoviePreviewBackup()				{return moviePreviewBackup;}
	static	int		GetPreviewSmallBlocks()				{return m_iPreviewSmallBlocks;}
	static	bool	GetPreviewCopiedArchives()			{return m_bPreviewCopiedArchives;}
	static	int		GetInspectAllFileTypes()			{return m_iInspectAllFileTypes;}
	static	int		GetExtractMetaData()				{return m_iExtractMetaData;}
	static	bool	GetAdjustNTFSDaylightFileTime()		{return m_bAdjustNTFSDaylightFileTime;}

	static	const CString& GetYourHostname()			{return m_strYourHostname;}
	static	void	SetYourHostname(LPCTSTR pszHostname){m_strYourHostname = pszHostname;}
	static	bool	IsCheckDiskspaceEnabled()			{return checkDiskspace;}
	static	UINT	GetMinFreeDiskSpace()				{return m_uMinFreeDiskSpace;}
	static	bool	GetSparsePartFiles();
	static	void	SetSparsePartFiles(bool bEnable)	{m_bSparsePartFiles = bEnable;}

	static	void	SetMaxUpload(UINT in);
	static	void	SetMaxDownload(UINT in);

	static	WINDOWPLACEMENT GetEmuleWindowPlacement()	{return EmuleWindowPlacement;}
	static	void	SetWindowLayout(WINDOWPLACEMENT in) {EmuleWindowPlacement=in;}

	static	bool	GetAutoConnectToStaticServersOnly() {return m_bAutoConnectToStaticServersOnly;}
	static	UINT	GetUpdateDays()						{return versioncheckdays;}
	static	uint32	GetLastVC()							{return versioncheckLastAutomatic;}
	static	void	UpdateLastVC();
	static	int		GetIPFilterLevel()					{return filterlevel;}
	static	const CString& GetMessageFilter()			{return messageFilter;}
	static	const CString& GetCommentFilter()			{return commentFilter;}
	static	const CString& GetFilenameCleanups()		{return filenameCleanups;}

	static	bool	ShowRatesOnTitle()					{return showRatesInTitle;}
	static	void	LoadCats();
	static	const CString& GetDateTimeFormat()			{return m_strDateTimeFormat;}
	static	const CString& GetDateTimeFormat4Log()		{return m_strDateTimeFormat4Log;}

	// Download Categories (Ornis)
	static	int		AddCat(Category_Struct* cat)		{catMap.Add(cat); return catMap.GetCount()-1;}
	static	bool	MoveCat(UINT from, UINT to);
	static	void	RemoveCat(int index);
	static	int		GetCatCount()						{return catMap.GetCount();}
//dlarge Smart Category Control
	/*
	static  bool	SetCatFilter(int index, int filter);
	static  int		GetCatFilter(int index);
	static	bool	GetCatFilterNeg(int index);
	static	void	SetCatFilterNeg(int index, bool val);
	*/
//dlarge end
	static	Category_Struct* GetCategory(int index)		{if (index>=0 && index<catMap.GetCount()) return catMap.GetAt(index); else return NULL;}
	static	const CString &GetCatPath(int index)		{return catMap.GetAt(index)->strIncomingPath;}
	static	DWORD	GetCatColor(int index);

	static	bool	GetPreviewOnIconDblClk()			{return m_bPreviewOnIconDblClk;}
	static	bool	ShowRatingIndicator()				{return indicateratings;}
	static	bool	WatchClipboard4ED2KLinks()			{return watchclipboard;}
	static	bool	GetRemoveToBin()					{return m_bRemove2bin;}
	static	bool	GetFilterServerByIP()				{return filterserverbyip;}

	static	bool	GetLog2Disk()						{return log2disk;}
	static	bool	GetDebug2Disk()						{return m_bVerbose && debug2disk;}
	static	int		GetMaxLogBuff()						{return iMaxLogBuff;}
	static	UINT	GetMaxLogFileSize()					{return uMaxLogFileSize;}
	static	ELogFileFormat GetLogFileFormat()			{return m_iLogFileFormat;}

	// WebServer
	static	uint16	GetWSPort()							{return m_nWebPort;}
	static	void	SetWSPort(uint16 uPort)				{m_nWebPort=uPort;}
	static	const CString& GetWSPass()					{return m_strWebPassword;}
	static	void	SetWSPass(CString strNewPass);
	static	bool	GetWSIsEnabled()					{return m_bWebEnabled;}
	static	void	SetWSIsEnabled(bool bEnable)		{m_bWebEnabled=bEnable;}
	static	bool	GetWebUseGzip()						{return m_bWebUseGzip;}
	static	void	SetWebUseGzip(bool bUse)			{m_bWebUseGzip=bUse;}
	static	int		GetWebPageRefresh()					{return m_nWebPageRefresh;}
	static	void	SetWebPageRefresh(int nRefresh)		{m_nWebPageRefresh=nRefresh;}
	static	bool	GetWSIsLowUserEnabled()				{return m_bWebLowEnabled;}
	static	void	SetWSIsLowUserEnabled(bool in)		{m_bWebLowEnabled=in;}
	static	const CString& GetWSLowPass()				{return m_strWebLowPassword;}
	static	int		GetWebTimeoutMins()					{return m_iWebTimeoutMins;}
	static  bool	GetWebAdminAllowedHiLevFunc()		{return m_bAllowAdminHiLevFunc;}
	static	void	SetWSLowPass(CString strNewPass);
	static  const CUIntArray& GetAllowedRemoteAccessIPs(){return m_aAllowedRemoteAccessIPs;}
	static	uint32	GetMaxWebUploadFileSizeMB()			{return m_iWebFileUploadSizeLimitMB;}

	static	void	SetMaxSourcesPerFile(UINT in)		{maxsourceperfile=in;}
	static	void	SetMaxConnections(UINT in)			{maxconnections =in;}
	static	void	SetMaxHalfConnections(UINT in)		{maxhalfconnections =in;}
	static	bool	IsSchedulerEnabled()				{return scheduler;}
	static	void	SetSchedulerEnabled(bool in)		{scheduler=in;}
	static	bool	GetDontCompressAvi()				{return dontcompressavi;}

	static	bool	MsgOnlyFriends()					{return msgonlyfriends;}
	static	bool	MsgOnlySecure()						{return msgsecure;}
	static	UINT	GetMsgSessionsMax()					{return maxmsgsessions;}
	static	bool	IsSecureIdentEnabled()				{return m_bUseSecureIdent;} // use clientcredits->CryptoAvailable() to check if crypting is really available and not this function
	static	bool	IsAdvSpamfilterEnabled()			{return m_bAdvancedSpamfilter;}
	static	const CString& GetTemplate()				{return m_strTemplateFile;}
	static	void	SetTemplate(CString in)				{m_strTemplateFile = in;}
	static	bool	GetNetworkKademlia()				{return networkkademlia && udpport > 0;}
	static	void	SetNetworkKademlia(bool val);
	static	bool	GetNetworkED2K()					{return networked2k;}
	static	void	SetNetworkED2K(bool val)			{networked2k = val;}

	// mobileMule
	static	const CString& GetMMPass()					{return m_strMMPassword;}
	static	void	SetMMPass(CString strNewPass);
	static	bool	IsMMServerEnabled()					{return m_bMMEnabled;}
	static	void	SetMMIsEnabled(bool bEnable)		{m_bMMEnabled=bEnable;}
	static	uint16	GetMMPort()							{return m_nMMPort;}
	static	void	SetMMPort(uint16 uPort)				{m_nMMPort=uPort;}

	// deadlake PROXYSUPPORT
	static	const ProxySettings& GetProxySettings()		{return proxy;}
	static	void	SetProxySettings(const ProxySettings& proxysettings) {proxy = proxysettings;}

	static	bool	ShowCatTabInfos()					{return showCatTabInfos;}
	static	void	ShowCatTabInfos(bool in)			{showCatTabInfos=in;}

	static	bool	AutoFilenameCleanup()				{return autofilenamecleanup;}
	static	void	AutoFilenameCleanup(bool in)		{autofilenamecleanup=in;}
	static	void	SetFilenameCleanups(CString in)		{filenameCleanups=in;}

	static	bool	GetResumeSameCat()					{return resumeSameCat;}
	static	bool	IsGraphRecreateDisabled()			{return dontRecreateGraphs;}
	static	bool	IsExtControlsEnabled()				{return m_bExtControls;}
	static	void	SetExtControls(bool in)				{m_bExtControls=in;}
	static	bool	GetRemoveFinishedDownloads()		{return m_bRemoveFinishedDownloads;}

	static	UINT	GetMaxChatHistoryLines()			{return m_iMaxChatHistory;}
	static	bool	GetUseAutocompletion()				{return m_bUseAutocompl;}
	static	bool	GetUseDwlPercentage()				{return m_bShowDwlPercentage;}
	static	void	SetUseDwlPercentage(bool in)		{m_bShowDwlPercentage=in;}


	static	bool	IsTransToolbarEnabled()				{return m_bWinaTransToolbar;}

	static	int		GetSearchMethod()					{return m_iSearchMethod;}
	static	void	SetSearchMethod(int iMethod)		{m_iSearchMethod = iMethod;}

	// ZZ:UploadSpeedSense -->
	static	bool	IsDynUpEnabled();
	static	void	SetDynUpEnabled(bool newValue)		{m_bDynUpEnabled = newValue;}
	static	int		GetDynUpPingTolerance()				{return m_iDynUpPingTolerance;}
	static	int		GetDynUpGoingUpDivider()			{return m_iDynUpGoingUpDivider;}
	static	int		GetDynUpGoingDownDivider()			{return m_iDynUpGoingDownDivider;}
	static	int		GetDynUpNumberOfPings()				{return m_iDynUpNumberOfPings;}
    static  bool	IsDynUpUseMillisecondPingTolerance(){return m_bDynUpUseMillisecondPingTolerance;} // EastShare - Added by TAHO, USS limit
	static  int		GetDynUpPingToleranceMilliseconds() {return m_iDynUpPingToleranceMilliseconds;} // EastShare - Added by TAHO, USS limit
	static  void	SetDynUpPingToleranceMilliseconds(int in){m_iDynUpPingToleranceMilliseconds = in;}
	// ZZ:UploadSpeedSense <--

    static bool     GetA4AFSaveCpu()                    {return m_bA4AFSaveCpu;} // ZZ:DownloadManager

    static bool     GetHighresTimer()                   {return m_bHighresTimer;}

	static	CString	GetHomepageBaseURL()				{return GetHomepageBaseURLForLevel(GetWebMirrorAlertLevel());}
	static	CString	GetVersionCheckBaseURL();					
	static	void	SetWebMirrorAlertLevel(uint8 newValue){m_nWebMirrorAlertLevel = newValue;}
	static	bool	IsDefaultNick(const CString strCheck);
	static	UINT	GetWebMirrorAlertLevel();
	static	bool	UseSimpleTimeRemainingComputation()	{return m_bUseOldTimeRemaining;}

	static	bool	IsRunAsUserEnabled();
	static	bool	IsPreferingRestrictedOverUser()		{return m_bPreferRestrictedOverUser;}

	// PeerCache
	static	bool	IsPeerCacheDownloadEnabled()		{return (m_bPeerCacheEnabled && !IsClientCryptLayerRequested());}
	static	uint32	GetPeerCacheLastSearch()			{return m_uPeerCacheLastSearch;}
	static	bool	WasPeerCacheFound()					{return m_bPeerCacheWasFound;}
	static	void	SetPeerCacheLastSearch(uint32 dwLastSearch) {m_uPeerCacheLastSearch = dwLastSearch;}
	static	void	SetPeerCacheWasFound(bool bFound)	{m_bPeerCacheWasFound = bFound;}
	static	uint16	GetPeerCachePort()					{return m_nPeerCachePort;}
	static	void	SetPeerCachePort(uint16 nPort)		{m_nPeerCachePort = nPort;}
	static	bool	GetPeerCacheShow()					{return m_bPeerCacheShow;}

	// Verbose log options
	static	bool	GetEnableVerboseOptions()			{return m_bEnableVerboseOptions;}
	static	bool	GetVerbose()						{return m_bVerbose;}
	static	bool	GetFullVerbose()					{return m_bVerbose && m_bFullVerbose;}
	static	bool	GetDebugSourceExchange()			{return m_bVerbose && m_bDebugSourceExchange;}
	static	bool	GetLogBannedClients()				{return m_bVerbose && m_bLogBannedClients;}
	static	bool	GetLogRatingDescReceived()			{return m_bVerbose && m_bLogRatingDescReceived;}
	static	bool	GetLogSecureIdent()					{return m_bVerbose && m_bLogSecureIdent;}
	static	bool	GetLogFilteredIPs()					{return m_bVerbose && m_bLogFilteredIPs;}
	static	bool	GetLogFileSaving()					{return m_bVerbose && m_bLogFileSaving;}
    static	bool	GetLogA4AF()    					{return m_bVerbose && m_bLogA4AF;} // ZZ:DownloadManager
	static	bool	GetLogUlDlEvents()					{return m_bVerbose && m_bLogUlDlEvents;}
	static	bool	GetLogKadSecurityEvents()			{return m_bVerbose && true;}
	static	bool	GetUseDebugDevice()					{return m_bUseDebugDevice;}
	static	int		GetDebugServerTCPLevel()			{return m_iDebugServerTCPLevel;}
	static	int		GetDebugServerUDPLevel() 			{return m_iDebugServerUDPLevel;}
	static	int		GetDebugServerSourcesLevel()		{return m_iDebugServerSourcesLevel;}
	static	int		GetDebugServerSearchesLevel()		{return m_iDebugServerSearchesLevel;}
	static	int		GetDebugClientTCPLevel()			{return m_iDebugClientTCPLevel;}
	static	int		GetDebugClientUDPLevel()			{return m_iDebugClientUDPLevel;}
	static	int		GetDebugClientKadUDPLevel()			{return m_iDebugClientKadUDPLevel;}
	static	int		GetDebugSearchResultDetailLevel()	{return m_iDebugSearchResultDetailLevel;}
	static	int		GetVerboseLogPriority()				{return	m_byLogLevel;}

	// Firewall settings
	static  bool	IsOpenPortsOnStartupEnabled()		{return m_bOpenPortsOnStartUp;}
	
	//AICH Hash
	static	bool	IsTrustingEveryHash()				{return m_bTrustEveryHash;} // this is a debug option

	static	bool	IsRememberingDownloadedFiles()		{return m_bRememberDownloadedFiles;}
	static	bool	IsRememberingCancelledFiles()		{return m_bRememberCancelledFiles;}
	static	void	SetRememberDownloadedFiles(bool nv)	{m_bRememberDownloadedFiles = nv;}
	static	void	SetRememberCancelledFiles(bool nv)	{m_bRememberCancelledFiles = nv;}
	// mail notifier
	static	bool	IsNotifierSendMailEnabled()			{return m_bNotifierSendMail;}
	static	CString	GetNotifierMailServer()				{return m_strNotifierMailServer;}
	static	CString	GetNotifierMailSender()				{return m_strNotifierMailSender;}
	static	CString	GetNotifierMailReceiver()			{return m_strNotifierMailReceiver;}

	static	void	SetNotifierSendMail(bool nv)		{m_bNotifierSendMail = nv;}
	static  bool	DoFlashOnNewMessage()				{return m_bIconflashOnNewMessage;}

//dlarge MTU-Setting
	static	uint16	GetMTU()							{return MTU; } 
	static	void	SetMTU(uint16 MTUVal)				{ MTU = MTUVal; } 
//dlarge end

//dlarge high process priority 
	static	uint8	m_iProcessPrio;
	static	uint8	GetProcessPrio()					{ return m_iProcessPrio; }
	static	void	SetProcessPrio(int ProcessPrio);
	static	void	_SetPriorityClass();
//dlarge end 

//dlarge AutoBackup
	static	bool    GetAutoBackup()	{ return autobackup;}
	static	bool    GetAutoBackup2()	{ return autobackup2;}
	static	void    SetAutoBackup(bool in) { autobackup = in;}
	static	void    SetAutoBackup2(bool in) { autobackup2 = in;}
//dlarge end

#ifdef ARGOS //dlarge Argos
	static	bool	m_bUseArgosSystem;
	static	int		m_iCreditCompensation;
	static	bool	m_bTrustUnArgosHashThief;
	static	bool	m_bTrustUnArgosHashChanged;
	static	bool	m_bTrustUnArgosGhostMode;
	static	bool	m_bTrustUnArgosAgressiv;
	static	int		m_iArgosTrustTime;
	static	UINT	m_uCloseMaellaBackdoor;
	static	UINT	m_uDontBanFriends;
	static	int		m_iArgosProcessTime;
	static	int		m_iArgosTrackTime;
	static	int		m_iArgosGenericBanTime;
	static	int		m_iArgosCorruptedSenderTime;
	static	int		m_iArgosFileScannerTime;
	static	int		m_iArgosFileFakerTime;
	static	int		m_iArgosAgressionBanTime;
	static	int		m_iArgosOpCodeTime;
	static	int		m_iArgosHashChangedTime;
	static	int		m_iArgosRankFlooderTime;
	static	int		m_iArgosGhostModeTime;	
	static	int		m_iArgosFailedTime;
	static	int		m_iArgosXSExploitTime;
	static	int		m_iArgosNickChangerTime;
	static	int		m_iArgosModChangerTime;
	static	int		m_iArgosNullNickTime;
	static	int		m_iArgosSpamTime;
	static	int		m_iArgosBadHelloTime;
	static	int		m_iArgosBadProtTime;
	static	int		m_iArgosGPLBreakerPunishment;
	static	int		m_iArgosHardLeecherPunishment;
	static	int		m_iArgosNormalLeecherPunishment;
	static	int		m_iArgosSoftLeecherPunishment;
	static	int		m_iArgosBadModPunishment;
	static	int		m_iArgosNickThiefPunishment;
	static	int		m_iArgosModThiefPunishment;
	static	int		m_iArgosHashThiefPunishment;
	static	int		m_iArgosCreditHackPunishment;
	static	int		m_iArgosHashChangedPunishment;
	static	int		m_iArgosGhostModePunishment;
	static	int		m_iArgosFakeClientPunishment;
	static	int		m_iArgosAgressonPunishment;
	static	int		m_iArgosFileScannerPunishment;
	static	int		m_iArgosFileFakerPunishment;
	static	int		m_iArgosCorruptedSenderPunishment;
	static	int		m_iArgosRankFlooderPunishment;
	static	int		m_iArgosFailedPunishment;
	static	int		m_iArgosXSExploitPunishment;
	static	int		m_iArgosNickChangerPunishment;
	static	int		m_iArgosModChangerPunishment;
	static	int		m_iArgosNullNickPunishment;
	static	int		m_iArgosSpamPunishment;
	static	int		m_iArgosBadHelloPunishment;
	static	int		m_iArgosBadProtPunishment;
	static	bool	m_bArgosLeecherModDetection;
	static	UINT	m_uArgosLeecherNickDetection;
	static	int		m_iArgosDetectionLevel;
	static	bool	m_bArgosOpcodeDetection;
	static	bool	m_bArgosLeecherHashDetection;
	static	bool	m_bArgosNickThiefDetection;
	static	bool	m_bPlainAntiNickThief;
	static	bool	m_bArgosModThiefDetection;
	static	bool	m_bArgosHashThiefDetection;
	static	bool	m_bArgosCreditHackDetection;
	static	bool	m_bHashChangeDetection;
	static	bool	m_bArgosGhostModDetection;
	static	UINT	m_uArgosFakeClientDetection;
	static	UINT	m_uAgressionDetection;
	static	int 	m_iAgressionIntervals;
	static	int 	m_iAgressionThreshold;
	static	bool	m_bFileScannerDetection;
	static	bool	m_bFileFakerDetection;
	static	bool	m_bBadSenderDetection;
	static	bool	m_bRankFloodDetection;
	static	bool	m_bFailedDetection;
	static	int 	m_iFailedTries;
	static	int 	m_iFailedThreshold;
	static	bool	m_bXSExploitDetection;
	static	int 	m_iXSExploitIntervals;
	static	int 	m_iXSExploitThreshold;
	static	bool	m_bNickChangerDetection;
	static	int 	m_iNickChangeIntervals;
	static	int 	m_iNickChangeThreshold;
	static	bool	m_bModChangerDetection;
	static	int 	m_iModChangeIntervals;
	static	int 	m_iModChangeThreshold;
	static	bool	m_bNullNickDetection;
	static	bool	m_bSpamDetection;
	static	bool	m_bBadHelloDetection;
	static	UINT	m_ueMCryptDetection;
	static	bool	m_bBadProtDetection;
	static	UINT	m_uDLPDetection;
	static	bool	m_bArgosLogLeechers;
	static	bool	UseArgosSystem()					{return m_bUseArgosSystem;}
	static	int		GetCreditCompensation()				{return m_iCreditCompensation;}
	static	bool	TrustUnArgosHashThief()				{return m_bTrustUnArgosHashThief;}
	static	bool	TrustUnArgosHashChanged()			{return m_bTrustUnArgosHashChanged;}
	static	bool	TrustUnArgosGhostMode()				{return m_bTrustUnArgosGhostMode;}
	static	bool	TrustUnArgosAgressiv()				{return m_bTrustUnArgosAgressiv;}
	static	bool	IsArgosTrustTest()					{return TrustUnArgosHashThief() || TrustUnArgosHashChanged() || TrustUnArgosGhostMode() || TrustUnArgosAgressiv();}
	static	int		GetArgosTrustTime()					{return m_iArgosTrustTime;}
	static	uint32	GetArgosTrustTimeMs(bool bProcess = false) {return MIN2MS(GetArgosTrustTime()/(bProcess ? 4 : 1));}
	static	UINT	CloseMaellaBackdoor()				{return m_uCloseMaellaBackdoor;}
	static	UINT	IsDontBanFriends()					{return m_uDontBanFriends;}
	static	int		GetArgosProcessTime()				{return m_iArgosProcessTime;}
	static	uint32	GetArgosProcessTimeMs(bool bProcess = false) {return MIN2MS(GetArgosProcessTime()/(bProcess ? 2 : 1));}
	static	int		GetArgosTrackTime()					{return m_iArgosTrackTime;}
	static	uint32	GetArgosTrackTimeMs()				{return MIN2MS(GetArgosTrackTime());}
	static	int		GetArgosGenericBanTime() 			{return m_iArgosGenericBanTime;}
	static	uint32	GetArgosGenericBanTimeMs()			{return MIN2MS(GetArgosGenericBanTime());}
	static	int		GetArgosCorruptedSenderTime()		{return m_iArgosCorruptedSenderTime;}
	static	uint32	GetArgosCorruptedSenderTimeMs()		{return MIN2MS(GetArgosCorruptedSenderTime());}
	static	int		GetArgosFileScannerTime()			{return m_iArgosFileScannerTime;}
	static	uint32	GetArgosFileScannerTimeMs()			{return MIN2MS(GetArgosFileScannerTime());}
	static	int		GetArgosFileFakerTime()				{return m_iArgosFileFakerTime;}
	static	uint32	GetArgosFileFakerTimeMs()			{return MIN2MS(GetArgosFileFakerTime());}
	static	int		GetArgosAgressionBanTime()			{return m_iArgosAgressionBanTime;}
	static	uint32	GetArgosAgressionBanTimeMs()		{return MIN2MS(GetArgosAgressionBanTime());}
	static	int		GetArgosOpCodeTime()				{return m_iArgosOpCodeTime;}
	static	uint32	GetArgosOpCodeTimeMs()				{return MIN2MS(GetArgosOpCodeTime());}
	static	int		GetArgosHashChangedTime()			{return m_iArgosHashChangedTime;}
	static	uint32	GetArgosHashChangedTimeMs()			{return MIN2MS(GetArgosHashChangedTime());}
	static	int		GetArgosRankFlooderTime()			{return m_iArgosRankFlooderTime;}
	static	uint32	GetArgosRankFlooderTimeMs()			{return MIN2MS(GetArgosRankFlooderTime());}
	static	int		GetArgosGhostModeTime()				{return m_iArgosGhostModeTime;}
	static	uint32	GetArgosGhostModeTimeMs()			{return MIN2MS(GetArgosGhostModeTime());}
	static	int		GetArgosFailedTime()				{return m_iArgosFailedTime;}
	static	uint32	GetArgosFailedTimeMs()				{return MIN2MS(GetArgosFailedTime());}
	static	int		GetArgosXSExploitTime()				{return m_iArgosXSExploitTime;}
	static	uint32	GetArgosXSExploitTimeMs()			{return MIN2MS(GetArgosXSExploitTime());}
	static	int		GetArgosNickChangerTime()			{return m_iArgosNickChangerTime;}
	static	uint32	GetArgosNickChangerTimeMs()			{return MIN2MS(GetArgosNickChangerTime());}
	static	int		GetArgosModChangerTime()			{return m_iArgosModChangerTime;}
	static	uint32	GetArgosModChangerTimeMs()			{return MIN2MS(GetArgosModChangerTime());}
	static	int		GetArgosNullNickTime()				{return m_iArgosNullNickTime;}
	static	uint32	GetArgosNullNickTimeMs()			{return MIN2MS(GetArgosNullNickTime());}
	static	int		GetArgosSpamTime()					{return m_iArgosSpamTime;}
	static	uint32	GetArgosSpamTimeMs()				{return MIN2MS(GetArgosSpamTime());}
	static	int		GetArgosBadHelloTime()				{return m_iArgosBadHelloTime;}
	static	uint32	GetArgosBadHelloTimeMs()			{return MIN2MS(GetArgosBadHelloTime());}
	static	int		GetArgosBadProtTime()				{return m_iArgosBadProtTime;}
	static	uint32	GetArgosBadProtTimeMs()				{return MIN2MS(GetArgosBadProtTime());}
	static	int		GetArgosGPLBreakerPunishment()		{return m_iArgosGPLBreakerPunishment;}
	static	int		GetArgosHardLeecherPunishment()		{return m_iArgosHardLeecherPunishment;}
	static	int		GetArgosNormalLeecherPunishment()	{return m_iArgosNormalLeecherPunishment;}
	static	int		GetArgosSoftLeecherPunishment()		{return m_iArgosSoftLeecherPunishment;}
	static	int		GetArgosBadModPunishment()			{return m_iArgosBadModPunishment;}
	static	int		GetArgosNickThiefPunishment()		{return m_iArgosNickThiefPunishment;}
	static	int		GetArgosModThiefPunishment()		{return m_iArgosModThiefPunishment;}
	static	int		GetArgosHashThiefPunishment()		{return m_iArgosHashThiefPunishment;}
	static	int		GetArgosCreditHackPunishment()		{return m_iArgosCreditHackPunishment;}
	static	int		GetArgosHashChangedPunishment()		{return m_iArgosHashChangedPunishment;}
	static	int		GetArgosGhostModePunishment()		{return m_iArgosGhostModePunishment;}
	static	int		GetArgosFakeClientPunishment()		{return m_iArgosFakeClientPunishment;}
	static	int		GetArgosAgressonPunishment()		{return m_iArgosAgressonPunishment;}
	static	int		GetArgosFileScannerPunishment()		{return m_iArgosFileScannerPunishment;}
	static	int		GetArgosFileFakerPunishment()		{return m_iArgosFileFakerPunishment;}
	static	int		GetArgosCorruptedSenderPunishment()	{return m_iArgosCorruptedSenderPunishment;}
	static	int		GetArgosRankFlooderPunishment()		{return m_iArgosRankFlooderPunishment;}
	static	int		GetArgosFailedPunishment()			{return m_iArgosFailedPunishment;}
	static	int		GetArgosXSExploitPunishment()		{return m_iArgosXSExploitPunishment;}
	static	int		GetArgosNickChangerPunishment()		{return m_iArgosNickChangerPunishment;}
	static	int		GetArgosModChangerPunishment()		{return m_iArgosModChangerPunishment;}
	static	int		GetArgosNullNickPunishment()		{return m_iArgosNullNickPunishment;}
	static	int		GetArgosSpamPunishment()			{return m_iArgosSpamPunishment;}
	static	int		GetArgosBadHelloPunishment()		{return m_iArgosBadHelloPunishment;}
	static	int		GetArgosBadProtPunishment()			{return m_iArgosBadProtPunishment;}
	static	bool	UseArgosDetectionEngine()			{return (IsArgosLeecherModDetection() || IsArgosLeecherNickDetection() 
																|| IsArgosOpcodeDetection() || IsArgosFakeClientDetection() == TRUE 
																|| IsArgosSpamDetection() == TRUE) && UseArgosSystem() && (IsDLPDetection() != 2);} // dlp may be used in exclusiv mode
	static	bool	IsArgosLeecherModDetection()		{return m_bArgosLeecherModDetection && UseArgosSystem();}
	static	UINT	IsArgosLeecherNickDetection()		{if(!UseArgosSystem())return FALSE; return m_uArgosLeecherNickDetection;}
	static	int		GetArgosDetectionLevel()			{return m_iArgosDetectionLevel;}
	static	bool	IsArgosOpcodeDetection()			{return m_bArgosOpcodeDetection && UseArgosSystem();}
	static	bool	IsArgosLeecherHashDetection()		{return m_bArgosLeecherHashDetection && UseArgosSystem();}	
	static	bool	IsArgosNickThiefDetection()			{return m_bArgosNickThiefDetection && UseArgosSystem();}
	static	bool	IsPlainAntiNickThief()				{return m_bPlainAntiNickThief;}
	static	bool	IsArgosModThiefDetection()			{return m_bArgosModThiefDetection;}
	static	bool	IsArgosHashThiefDetection()			{return m_bArgosHashThiefDetection  && UseArgosSystem();}
	static	bool	IsArgosCreditHackDetection()		{return m_bArgosCreditHackDetection;}
	static	bool	IsHashChangeDetection()				{return m_bHashChangeDetection;}
	static	bool	IsArgosGhostModDetection()			{return m_bArgosGhostModDetection;}
	static	UINT	IsArgosFakeClientDetection()		{return m_uArgosFakeClientDetection;}
	static	UINT	IsAgressionDetection()				{return m_uAgressionDetection;}
	static	int		GetAgressionIntervals()				{return m_iAgressionIntervals;}
	static	uint32	GetAgressionIntervalsMs()			{return MIN2MS(GetAgressionIntervals());}
	static	int		GetAgressionThreshold()				{return m_iAgressionThreshold;}
	static	bool	IsFileScannerDetection()			{return m_bFileScannerDetection;}
	static	bool	IsFileFakerDetection()				{return m_bFileFakerDetection;}
	static	bool	IsBadSenderDetection()				{return m_bBadSenderDetection;}
	static	bool	IsRankFloodDetection()				{return m_bRankFloodDetection;}
	static	bool	IsFailedDetection()					{return m_bFailedDetection && UseArgosSystem();}
	static	int		GetFailedTries()					{return m_iFailedTries;}
	static	int		GetFailedThreshold()				{return m_iFailedThreshold;}
	static	bool	IsArgosXSExploitDetection()			{return m_bXSExploitDetection && UseArgosSystem();}
	static	int		GetArgosXSExploitIntervals()		{return m_iXSExploitIntervals;}
	static	uint32	GetArgosXSExploitIntervalsMs()		{return MIN2MS(GetArgosXSExploitIntervals());}
	static	int		GetArgosXSExploitThreshold()		{return m_iXSExploitThreshold;}
	static	bool	IsArgosNickChangerDetection()		{return m_bNickChangerDetection && UseArgosSystem();}
	static	int		GetArgosNickChangeIntervals()		{return m_iNickChangeIntervals;}
	static	uint32	GetArgosNickChangeIntervalsMs()		{return MIN2MS(GetArgosNickChangeIntervals());}
	static	int		GetArgosNickChangeThreshold()		{return m_iNickChangeThreshold;}
	static	bool	IsArgosModChangerDetection()		{return m_bModChangerDetection && UseArgosSystem();}
	static	int		GetArgosModChangeIntervals()		{return m_iModChangeIntervals;}
	static	uint32	GetArgosModChangeIntervalsMs()		{return MIN2MS(GetArgosModChangeIntervals());}
	static	int		GetArgosModChangeThreshold()		{return m_iModChangeThreshold;}
	static	bool	IsArgosNullNickDetection()			{return m_bNullNickDetection;}
	static	bool	IsArgosSpamDetection()				{return m_bSpamDetection;}
	static	bool	IsArgosBadHelloDetection()			{return m_bBadHelloDetection;}
	static	UINT	IsArgoseMCryptDetection()			{return m_ueMCryptDetection;}
	static	bool	IsArgosBadProtDetection()			{return m_bBadProtDetection;}
	static	UINT	IsDLPDetection()					{if(!UseArgosSystem())return FALSE; return m_uDLPDetection;}
	static	bool	IsArgosLogLeechers()				{return m_bArgosLogLeechers;}
#endif //dlarge end

//dlarge SafePrefsettings 
public:
	static	void	CheckSilverPreferences();
//dlarge end

	static  void	ImportOldTableSetup();
	static  void	IniCopy(CString si, CString di);

	static	void	EstimateMaxUploadCap(uint32 nCurrentUpload);
	static  bool	GetAllocCompleteMode()				{return m_bAllocFull;}
	static  void	SetAllocCompleteMode(bool in)		{m_bAllocFull=in;}

	// encryption
	static bool		IsClientCryptLayerSupported()		{return m_bCryptLayerSupported;}
	static bool		IsClientCryptLayerRequested()		{return IsClientCryptLayerSupported() && m_bCryptLayerRequested;}
	static bool		IsClientCryptLayerRequired()		{return IsClientCryptLayerRequested() && m_bCryptLayerRequired;}
	static bool		IsClientCryptLayerRequiredStrict()	{return false;} // not even incoming test connections will be answered
	static bool		IsServerCryptLayerUDPEnabled()		{return IsClientCryptLayerSupported();}
	static bool		IsServerCryptLayerTCPRequested()	{return IsClientCryptLayerSupported() && (IsClientCryptLayerRequested() ||m_bCryptLayerRequiredStrictServer);} //dlarge lh require obfuscated server connection  automatic assume requested encryption
	static bool     IsServerCryptLayerRequiredStrict()  {return IsClientCryptLayerSupported() && m_bCryptLayerRequiredStrictServer;} //dlarge lh require obfuscated server connection 
	static uint32	GetKadUDPKey()						{return m_dwKadUDPKey;}
	static uint8	GetCryptTCPPaddingLength()			{return m_byCryptTCPPaddingLength;}

	// UPnP
	static bool		GetSkipWANIPSetup()					{return m_bSkipWANIPSetup;}
	static bool		GetSkipWANPPPSetup()				{return m_bSkipWANPPPSetup;}
	static bool		IsUPnPEnabled()						{return m_bEnableUPnP;}
	static void		SetSkipWANIPSetup(bool nv)			{m_bSkipWANIPSetup = nv;}
	static void		SetSkipWANPPPSetup(bool nv)			{m_bSkipWANPPPSetup = nv;}
	static bool		CloseUPnPOnExit()					{return m_bCloseUPnPOnExit;}

	// Spamfilter
	static bool		IsSearchSpamFilterEnabled()			{return m_bEnableSearchResultFilter;}
	

	static uint16	GetRandomTCPPort();
	static uint16	GetRandomUDPPort();

//dlarge Sorting

	static	bool	DoUseSort()									{ return m_bUseSort; }
	static	void    SetUseSort(bool bUseSort)					{ m_bUseSort = bUseSort; }
	static	bool	DoUseSrcSortCol2()							{ return m_bUseSrcSortCol2; }
	static	void	SetUseSrcSortCol2(bool bUseSort)			{ m_bUseSrcSortCol2 = bUseSort; }
	static	bool	DoPausedStoppedLast()						{ return m_bPausedStoppedLast; }
	static	void	SetPausedStoppedLast(bool bEnable)			{ m_bPausedStoppedLast = bEnable; }
	static	byte	GetServerSortCol()							{ return m_nServerSortCol; }
	static	void	SetServerSortCol(byte iCol)					{ m_nServerSortCol = iCol; }
	static	byte	GetUploadSortCol()							{ return m_nUploadSortCol; }
	static	void	SetUploadSortCol(byte iSortCol)				{ m_nUploadSortCol = iSortCol; }
	static	byte	GetQueueSortCol()							{ return m_nQueueSortCol; }
	static	void	SetQueueSortCol(byte iSortCol)				{ m_nQueueSortCol = iSortCol; }
	static	byte	GetSearchSortCol()							{ return m_nSearchSortCol; }
	static	void	SetSearchSortCol(byte iSortCol)				{ m_nSearchSortCol = iSortCol; }
	static	byte	GetIrcSortCol()								{ return m_nIRCSortCol; }
	static	void	SetIrcSortCol(byte iSortCol)				{ m_nIRCSortCol = iSortCol; }
	static	byte	GetClientListSortCol()						{ return m_nClientListSortCol; }
	static	void	SetClientListSortCol(byte iSortCol)			{ m_nClientListSortCol = iSortCol; }
	static	uint16	GetFileSortCol()							{ return m_nFileSortCol; }
	static	void	SetFileSortCol(uint16 uCol)					{ m_nFileSortCol = uCol; }
	static	byte	GetDownloadSortCol()						{ return m_nDownloadSortCol; }
	static	void	SetDownloadSortCol(byte iSortCol)			{ m_nDownloadSortCol = iSortCol; }
	static	byte	GetSrcSortCol1()							{ return m_nSrcSortCol1; }
	static	void	SetSrcSortCol1(byte iSortCol)				{ m_nSrcSortCol1 = iSortCol; }
	static	byte	GetSrcSortCol2()							{ return m_nSrcSortCol2; }
	static	void	SetSrcSortCol2(byte iSortCol)				{ m_nSrcSortCol2 = iSortCol; }
//dlarge end

//dlarge queue progress bar - Client Percentage - chunk dots
	static	bool	ShowClientQueueProgressBar()	{ return m_bClientQueueProgressBar;} 
	static	bool	GetShowClientPercentage()	{ return m_bShowClientPercentage;}  
	static	bool	EnableChunkDots()		{return m_bEnableChunkDots;}
        static	bool	SessionDownload()		{return m_bShowSessionDownload;}
	static  bool	GetStaticIcon()			{return m_bStaticIcon;} //dlarge Static Tray Icon
	static	bool	GetTrayComplete()		{ return m_bTrayComplete; } //dlarge Completed in Tray 
    static  bool	UseSideBanner()			    {return m_bSideBanner;} //dlarge switch Banner
//dlarge end

//dlarge lowidretry
	static	void	SetLowIdRetries(uint8 in)		{LowIdRetries=in;}
	static	void	SetLowIdRetried()				{LowIdRetried--;}
	static	void	ResetLowIdRetried()				{LowIdRetried = LowIdRetries;}
	static	uint8	GetLowIdRetried()				{return LowIdRetried;}
	static	uint8	GetLowIdRetries()				{return LowIdRetries;}
//dlarge end

	static	int  GetKnownMetDays()	{return m_iKnownMetDays;} //dlarge .met file control

protected:
	static	CString m_strFileCommentsFilePath;
	static	Preferences_Ext_Struct* prefsExt;
	static	WORD m_wWinVer;
	static	CArray<Category_Struct*,Category_Struct*> catMap;
	static	CString	m_astrDefaultDirs[13];
	static	bool	m_abDefaultDirsCreated[13];
	static	int		m_nCurrentUserDirMode; // Only for PPgTweaks

	static void	CreateUserHash();
	static void	SetStandartValues();
	static int	GetRecommendedMaxConnections();
	static void LoadPreferences();
	static void SavePreferences();
	static CString	GetHomepageBaseURLForLevel(int nLevel);
	static CString	GetDefaultDirectory(EDefaultDirectory eDirectory, bool bCreate = true);

public:
	//dlarge Source Graph 
	static	bool GetSrcGraph()			{ return m_bSrcGraph; }
	static uint16  GetStatsHLMin()		{ return m_iStatsHLMin; }
	static uint16  GetStatsHLMax()		{ return m_iStatsHLMax; }
	static uint16  GetStatsHLDif()		{ return m_iStatsHLDif; }
	//dlarge end

#ifdef CLIENTANALYZER
private:
	static	uint8	m_uiFUChunks;
	static	uint16	m_uiClientDataRate;
	static	bool	m_bLogAnalyzerEvents;
public:
	static	uint8	GetFUChunks()					{return m_uiFUChunks;}
	static	void	SetFUChunks(const uint8 i)		{m_uiFUChunks = i;}
	static	uint16	GetClientDataRate()				{return m_uiClientDataRate;}
	static	void	SetClientDataRate(const uint16 i)	{m_uiClientDataRate = i;}

//>>> WiZaRd::AutoHL
private:
	static  uint16	m_iMinAutoHL;
	static	uint16	m_iMaxAutoHL;
	static	uint16	m_iMaxSourcesHL;
	static	sint8	m_iUseAutoHL;
	static	uint16	m_iAutoHLUpdateTimer;
public:
	static	uint16	GetAutoHLUpdateTimer()			{return m_iAutoHLUpdateTimer;}
	static	void	SetAutoHLUpdateTimer(const uint16 i)	{m_iAutoHLUpdateTimer = i;}
	static  uint16	GetMinAutoHL()					{return m_iMinAutoHL;}
	static  void	SetMinAutoHL(const uint16 i)	{m_iMinAutoHL = i;}
	static	uint16	GetMaxAutoHL()					{return m_iMaxAutoHL;}
	static	void	SetMaxAutoHL(const uint16 i)	{m_iMaxAutoHL = i;}
	static  uint16  GetMaxSourcesHL()				{return m_iMaxSourcesHL;}
	static	void	SetMaxSourcesHL(const uint16 i)	{m_iMaxSourcesHL = i;}
	static	sint8	IsUseAutoHL()					{return m_iUseAutoHL;}
	static	void	SetUseAutoHL(const sint8& i)	{m_iUseAutoHL = i;}
//<<< WiZaRd::AutoHL
#endif

//dlarge SUQWT 
private:
	static	bool	m_bSaveUploadQueueWaitTime;
public:
	static	bool	SaveUploadQueueWaitTime()					{return m_bSaveUploadQueueWaitTime;}
	static	void	SetSaveUploadQueueWaitTime(const bool& in)	{m_bSaveUploadQueueWaitTime = in;}
//dlarge end

	static bool     pp_bFirstStart;
//dlarge auto priority
	static bool	    pp_bUseAutoPrio;
	static bool	    pp_bAutoPrioKeepLow;
	static uint8    pp_uAutoPrioNormal;
	static uint8    pp_uAutoPrioHigh;
	static bool	    pp_bAutoPrioChanged;
//dlarge end

//>>> WiZaRd::PNCheck/EMF
private:
	static	CString	m_strUserName;
	static	CString	m_strUserPW;
	static	bool	m_bCheckPNCount;
	static	bool	m_bFriendlistEntry;
	static	bool	m_bAutoUpdateFriendList;
	static	bool	m_bAuthenticated;
public:
	static	bool	IsCheckPNCount(const bool bFlagOnly)	{return bFlagOnly ? m_bCheckPNCount : (m_bCheckPNCount && IsAuthenticated());}
	static	void	SetCheckPNCount(const bool b)			{m_bCheckPNCount = b;}
	static	bool	IsFriendlistEntry(const bool bFlagOnly)	{return bFlagOnly ? m_bFriendlistEntry : (m_bFriendlistEntry && IsAuthenticated());}
	static	void	SetFriendlistEntry(const bool b)		{m_bFriendlistEntry = b;}
	static	bool	IsAutoUpdateFriendList(const bool bFlagOnly){return bFlagOnly ? m_bAutoUpdateFriendList : (m_bAutoUpdateFriendList && IsAuthenticated());}
	static	void	SetAutoUpdateFriendList(const bool b)	{m_bAutoUpdateFriendList = b;}
	static	bool	IsAuthenticated()					{return m_bAuthenticated;}
	static	CString&	GetUserName()					{return m_strUserName;}
	static	CString&	GetUserPW()						{return m_strUserPW;}
	static	void	SetUserPWCombo(const CString& user, const CString& pw);
//<<< WiZaRd::PNCheck/EMF
//>>> shadow2004::FDC [BlueSonicBoy]
private:
	static	bool	m_bFDCEnabled;
	static	bool	m_bFDCDouble;
	static  uint8   m_uiFDCSensitivity;
public:
	static	bool	GetFDCEnabled()						{return m_bFDCEnabled;}
	static	void	SetFDCEnabled(const bool b)			{m_bFDCEnabled = b;}
	static	bool	GetFDCDoubleEnabled()				{return m_bFDCDouble;}
	static	void	SetFDCDoubleEnabled(const bool b)	{m_bFDCDouble = b;}
	static	uint8	GetFDCSensitivity()					{return m_uiFDCSensitivity;}
	static	void	SetFDCSensitivity(const uint8 i)	{m_uiFDCSensitivity = i;}
//<<< shadow2004::FDC [BlueSonicBoy]
//>>> Spike2::Emulate Other
private:
	static	bool	m_bEmueDonkey;
	static	bool	m_bEmueDonkeyHybrid;
	static	bool	m_bEmuMLDonkey;
	static	bool	m_bEmuShareaza;
	static	bool	m_bEmuLphant;
public:
	static	bool	IsEmueDonkey()						{return m_bEmueDonkey;}
	static	void	SetEmueDonkey(const bool b)			{m_bEmueDonkey = b;}
	static	bool	IsEmueDonkeyHybrid()				{return m_bEmueDonkeyHybrid;}
	static	void	SetEmueDonkeyHybrid(const bool b)	{m_bEmueDonkeyHybrid = b;}
	static	bool	IsEmuMLDonkey()						{return m_bEmuMLDonkey;}
	static	void	SetEmuMLDonkey(const bool b)		{m_bEmuMLDonkey = b;}
	static	bool	IsEmuShareaza()						{return m_bEmuShareaza;}
	static	void	SetEmuShareaza(const bool b)		{m_bEmuShareaza = b;}
	static	bool	IsEmuLphant()						{return m_bEmuLphant;}
	static	void	SetEmuLphant(const bool b)			{m_bEmuLphant = b;}
//<<< Spike2::Emulate other

//>>> WiZaRd::ServerMessageFilter
private:
	static	bool	m_bBlockServerMessagesCompletely;
	static	CString	m_strServerMessageFilter;
public:
	static	bool	GetBlockServerMessagesCompletely()	{return m_bBlockServerMessagesCompletely;}
	static	void	SetBlockServerMessagesCompletely(const bool b)	{m_bBlockServerMessagesCompletely = b;}
	static	CString GetServerMessageFilter()			{return m_strServerMessageFilter;}
	static	void	SetServerMessageFilter(const CString& s){m_strServerMessageFilter = s;}
//<<< WiZaRd::ServerMessageFilter

//>>> shadow2004::Toolbar
private:
	static	uint8	m_uiToolbarLabelStyle;
public:
	static	uint8	GetToolbarLabelStyle()				{return m_uiToolbarLabelStyle;}
	static	void	SetToolbarLabelStyle(const uint8 i)	{m_uiToolbarLabelStyle = i;}
//<<< shadow2004::Toolbar

//>>> WiZaRd::IntelliFlush
private:
	static	bool	m_bUseIntelliFlush;
	static	UINT	m_uiFileBufferFlushTime;
public:
	static	bool	IsUseIntelliFlush() 				{return m_bUseIntelliFlush;}
	static	void	SetUseIntelliFlush(const bool b)	{m_bUseIntelliFlush = b;}
	static	UINT	GetFileBufferFlushTime()			{return m_uiFileBufferFlushTime;}
	static	void	SetFileBufferFlushTime(const UINT& i)	{m_uiFileBufferFlushTime = i;}
	static	void	SetFileBufferSize(const UINT& i)	{m_iFileBufferSize = i;}
//<<< WiZaRd::IntelliFlush

//>>> shadow2004::IP2Country [EastShare]
private:
	static	uint8	m_uiIP2CountryNameMode;
	static	bool	m_bIP2CountryShowFlag;
	static bool		m_bIP2CountryAutoUpdate;
	static UINT		m_uiIP2CountryVersion;
public:
	static TCHAR	m_strIP2CountryUpdateURL[256];
	static TCHAR	m_strIP2CountryUpdateVerURL[256];

	static	uint8	GetIP2CountryNameMode()				{return m_uiIP2CountryNameMode;}
	static	bool	IsIP2CountryShowFlag()				{return m_bIP2CountryShowFlag;}
	static	void	SetIP2CountryNameMode(const uint8 i)	{m_uiIP2CountryNameMode = i;}
	static	void	SetIP2CountryShowFlag(const bool b)	{m_bIP2CountryShowFlag = b;}
	static	bool	IsAutoUpdateIP2CountryEnabled()		{return m_bIP2CountryAutoUpdate;}
	static	void	SetAutoUpdateIP2Country(bool b)		{m_bIP2CountryAutoUpdate = b;}

	static  CString GetIP2CountryUpdateURL()			{return CString(m_strIP2CountryUpdateURL);}
	static  CString GetIP2CountryUpdateVerURL()			{return CString(m_strIP2CountryUpdateVerURL);}
	static	UINT	GetIP2CountryVersion()				{return m_uiIP2CountryVersion;}//Commander - Added: IP2Country auto-updating
	static	void	SetIP2CountryVersion(UINT version)	{m_uiIP2CountryVersion = version;}
//<<< shadow2004::IP2Country [EastShare]

//dlarge NiceHash
private:
	static	uint8	m_iNiceHashWeight;
public:
	static	uint8	GetNiceHashWeight() {return m_iNiceHashWeight;}
	static	void	SetNiceHashWeight(uint8 in)	{m_iNiceHashWeight = in;}
//dlarge end

//>>> shadow2004::ModIconDLL Update
private:
	static	bool	m_bModIconDllAutoUpdate;
public:
	static	TCHAR	m_strModIconDllUpdateURL[256];

	static	bool	IsAutoUpdateModIconDllEnabled()		{return m_bModIconDllAutoUpdate;}
	static	void	SetAutoUpdateModIconDll(const bool b)	{m_bModIconDllAutoUpdate = b;}

	static  CString GetModIconDllUpdateURL()			{return CString(m_strModIconDllUpdateURL);}
//<<< shadow2004::ModIconDLL Update

//>>> Spike2::ConChecker [eWombat]
private:
	static  bool	m_bICMP; 
	static	uint8	m_uiPingTimeOut;
	static	uint8	m_uiPingTTL; 
	static	bool	m_bCheckCon;
public:
	static  bool    GetICMP()						{return m_bICMP;} 
	static  void    SetICMP(const bool b)			{m_bICMP = b;} 
	static  uint8   GetPingTimeout()				{return m_uiPingTimeOut;} 
	static  void    SetPingTimeout(const uint8 in)	{m_uiPingTimeOut = in;} 
	static  uint8   GetPingTTL()					{return m_uiPingTTL;} 
	static  void    SetPingTTL(const uint8 in)		{m_uiPingTTL = in;} 
	static  bool	GetCheckCon()                   {return m_bCheckCon;} 
	static  void	SetCheckCon(const bool b)		{m_bCheckCon = b;}
//<<< Spike2::ConChecker [eWombat]
//>>> WiZaRd::Payback First
private:
	static	uint8	m_uiPaybackFirst;
public:
	static	uint8	GetPaybackFirst()					{return m_uiPaybackFirst;}
	static	void	SetPaybackFirst(const uint8 i)		{m_uiPaybackFirst = i;}
//<<< WiZaRd::Payback First

//dlarge CPU/MEM usage 
	static	bool	GetSysInfo()			{ return m_bSysInfo; }
	static	bool	GetSysInfoGlobal()		{ return m_bSysInfoGlobal; }
//dlarge end 

//dlarge minimule 
	static	int		GetSpeedMeterMin()		{return speedmetermin;}
	static	int		GetSpeedMeterMax()		{return speedmetermax;}
	static	void	SetSpeedMeterMin(int in)	{speedmetermin = in;}
	static	void	SetSpeedMeterMax(int in)    {speedmetermax = in;}
	static	bool	IsMiniMuleEnabled() {return m_bMiniMule;}
	static	void	SetMiniMuleEnabled(bool in) {m_bMiniMule = in;}
	static	uint32	GetMiniMuleUpdate()	{return m_iMiniMuleUpdate;}
	static	void	SetMiniMuleUpdate(uint32 in)  {m_iMiniMuleUpdate = in;}
	static	void	SetMiniMuleLives(bool in) {m_bMiniMuleLives = in;}
	static	bool	GetMiniMuleLives()	{return m_bMiniMuleLives;}
	static	void	SetMiniMuleTransparency(uint8 in) {m_iMiniMuleTransparency = in;}
	static	uint8	GetMiniMuleTransparency() {return m_iMiniMuleTransparency;}
	static	bool	GetShowSpeedMeter()		  {return m_bShowSpeedMeter;}
	static	bool	GetMMCompl()			{ return m_bMMCompl; }
	static	bool	GetMMOpen()				{ return m_bMMOpen; }
//dlarge end

//>>> shadow2004::IPFilter-Update [Morph]
private:
	static	bool	m_bAutoUpdateIPFilter; 
	static	UINT	m_uiIPfilterVersion; 
public:
	static	TCHAR	UpdateURLIPFilter[256];
	static	CString	GetUpdateURLIPFilter()				{return CString(UpdateURLIPFilter);}
	static	UINT	GetIPfilterVersion()				{return m_uiIPfilterVersion;}
	static	void	SetIpfilterVersion(const UINT i)	{m_uiIPfilterVersion = i;}
	static	bool	IsAutoUpdateIPFilterEnabled()		{return m_bAutoUpdateIPFilter; }
	static	void	SetAutoUpdateIPFilter(const bool b)	{m_bAutoUpdateIPFilter = b;}
//<<< shadow2004::IPFilter-Update [Morph]
//>>> shadow2004::ed2k updates [WiZaRd]
private:
	static	UINT	m_dwDLingIpFilterVersion;
	static	CString	m_strDLingIpFilterLink;
	static	bool	m_bAutoResumePausedIPFilter;
	static	bool	m_bIPFilterUploadPrioManuell;
	static	uint8	m_uiIPFilterUploadPrio;
public:
	static	UINT	GetDLingIpFilterVersion()				{return m_dwDLingIpFilterVersion;}
	static	void	SetDLingIpFilterVersion(const UINT i)	{m_dwDLingIpFilterVersion = i;}
	static	CString	GetDLingIpFilterLink()					{return m_strDLingIpFilterLink;}
	static	void	SetDLingIpFilterLink(const CString& s)	{m_strDLingIpFilterLink = s;}
	static	bool	GetAutoResumePausedIPFilter()			{return m_bAutoResumePausedIPFilter;}
	static	void	SetAutoResumePausedIPFilter(const bool b)	{m_bAutoResumePausedIPFilter = b;}
	static	bool	GetIPFilterUploadPrioManuell()			{return m_bIPFilterUploadPrioManuell;}
	static	void	SetIPFilterUploadPrioManuell(const bool b)	{m_bIPFilterUploadPrioManuell = b;}
	static	uint8	GetIPFilterUploadPrio()					{return m_uiIPFilterUploadPrio;}
	static	void	SetIPFilterULPrio(const uint8 i)		{m_uiIPFilterUploadPrio = i;}
//<<< shadow2004::ed2k updates [WiZaRd]
//>>> JvA::SLS [enkeyDEV]
private:
	static	bool	m_bUseSaveLoadSources;
	static	uint8	m_iActivationLimitSLS;
	static	uint8	m_iSourcesToSaveSLS;
public:
	static	bool	UseSaveLoadSources()					{return m_bUseSaveLoadSources;}
	static	void	SetSaveLoadSource(const bool b)			{m_bUseSaveLoadSources = b;}
	static	uint8	GetActivationLimitSLS()					{return m_iActivationLimitSLS;}
	static	void	SetActivationLimitSLS(const uint8 i)	{m_iActivationLimitSLS = i;}
	static	uint8	GetSourcesToSaveSLS()					{return m_iSourcesToSaveSLS;}
	static	void	SetSourcesToSaveSLS(const uint8 i)		{m_iSourcesToSaveSLS = i;}
//<<< JvA::SLS [enkeyDEV]

//>>> WiZaRd::minRQR [WiZaRd]
private:
	static	bool	m_bShowMinRQR;
public:
	static	bool	ShowMinRQR()							{return m_bShowMinRQR;}
	static	void	SetMinRQR(const bool b)					{m_bShowMinRQR = b;}
//<<< WiZaRd::minRQR [WiZaRd]

//>>> shadow2004::InfiniteQueue [SLUGFILLER]
private:
	static	bool	m_bInfiniteQueue;
public:
	static	bool	IsInfiniteQueueEnabled()				{return m_bInfiniteQueue;}
	static	void	SetInfiniteQueue(const bool b)			{m_bInfiniteQueue = b;}
//<<< shadow2004::InfiniteQueue [SLUGFILLER]

//dlarge Smart Category Control 
	static	bool	ShowValidSrcsOnly()		{ return m_bValidSrcsOnly; }
	static	bool	ShowCatNameInDownList()	{ return m_bShowCatNames; }
	static	bool	SelectCatForNewDL()		{ return m_bSelCatOnAdd; }
	static	bool	UseActiveCatForLinks()	{ return m_bActiveCatDefault; }
	static	bool	AutoSetResumeOrder()	{ return m_bAutoSetResumeOrder; }
	static	bool	SmallFileDLPush()		{ return m_bSmallFileDLPush; }
	static	uint8	StartDLInEmptyCats()	{ return m_iStartDLInEmptyCats; } // 0 = disabled, otherwise num to resume
	static	bool	UseAutoCat()			{ return m_bUseAutoCat; }
	static	uint8	GetDlMode()				{ return dlMode;}
//dlarge end

public:
	//dlarge Design Settings 
	static void		InitStyles();
	static bool		GetStyle(int nMaster, int nStyle, StylesStruct *style=NULL);
	static bool		SetStyle(int nMaster, int nStyle, StylesStruct *style=NULL);
	static DWORD	GetStyleFlags(int nMaster, int nStyle);
	static void		SetStyleFlags(int nMaster, int nStyle, DWORD dwNew);
	static COLORREF	GetStyleFontColor(int nMaster, int nStyle);
	static void		SetStyleFontColor(int nMaster, int nStyle, COLORREF crNew);
	static COLORREF	GetStyleBackColor(int nMaster, int nStyle);
	static void		SetStyleBackColor(int nMaster, int nStyle, COLORREF crNew);
	static short	GetStyleOnOff(int nMaster, int nStyle);
	static void		SetStyleOnOff(int nMaster, int nStyle, short sNew);
	static void		SaveStylePrefs(CIni &ini);
	static void		LoadStylePrefs(CIni &ini);
	static bool		GetAutoTextColors()	{return m_bAutoTextColors;}
	//dlarge end

	//dlarge Automatic shared files updater 
	static	bool	GetDirectoryWatcher()				{ return m_bDirectoryWatcher; }
	static	void	SetDirectoryWatcher(bool on)		{ m_bDirectoryWatcher = on; }
	//dlarge end

public:
	//dlarge MenuXP
	static	bool	GetXPSideBar()					{return m_bShowXPSideBar;}
	static	bool	GetXPBitmap()					{return	m_bShowXPBitmap;}
	static  int 	GetXPMenuStyle()				{return	m_iXPMenuStyle;}
	static	bool	UseGrayMenuIcons()				{return m_bGrayMenuIcon;}
	//dlarge end
};

//dlarge SafePrefsettings 
template<class TYPE_PTR, class TYPE1, class TYPE2>
void MinMax(TYPE_PTR *data, TYPE1 min, TYPE2 max)
{
	if (*data < min)
		*data = min;
	else if (*data > max)
		*data = max;
}
//dlarge end

extern CPreferences thePrefs;
extern bool g_bLowColorDesktop;
