📄 preferences.h
字号:
static bool m_bMMEnabled;
static uint16 m_nMMPort;
static bool networkkademlia;
static bool networked2k;
// toolbar
static EToolbarLabelType m_nToolbarLabels;
static CString m_sToolbarBitmap;
static CString m_sToolbarBitmapFolder;
static CString m_sToolbarSettings;
static bool m_bReBarToolbar;
static CSize m_sizToolbarIconSize;
//preview
static bool m_bPreviewEnabled;
// 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 CStringList shareddir_list;
static CStringList adresses_list;
static int m_iDbgHeap;
static uint8 m_nWebMirrorAlertLevel;
static bool m_bRunAsUser;
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;
static uint8 m_byLogLevel;
enum Table
{
tableDownload,
tableUpload,
tableQueue,
tableSearch,
tableShared,
tableServer,
tableClientList,
tableFilenames
};
friend class CPreferencesWnd;
friend class CPPgGeneral;
friend class CPPgConnection;
friend class CPPgServer;
friend class CPPgDirectories;
friend class CPPgFiles;
friend class CPPgNotify;
friend class CPPgIRC;
friend class Wizard;
friend class CPPgTweaks;
friend class CPPgDisplay;
friend class CPPgSecurity;
friend class CPPgScheduler;
friend class CPPgDebug;
CPreferences();
~CPreferences();
static void Init();
static void Uninit();
static const CString& GetAppDir() {return appdir;}
static LPCTSTR GetIncomingDir() {return incomingdir;}
static LPCTSTR GetTempDir() {return tempdir;}
static const CString& GetConfigDir() {return configdir;}
static const CString& GetWebServerDir() {return m_strWebServerDir;}
static const CString& GetFileCommentsFilePath(){return m_strFileCommentsFilePath;}
static const CString& GetLogDir() {return m_strLogDir;}
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 uint8 Score() {return scorsystem;}
static bool Reconnect() {return reconnect;}
static const CString& GetUserNick() {return strNick;}
static void SetUserNick(LPCTSTR pszNick);
static int GetMaxUserNickLength() {return 50;}
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 AutoServerlist(){return autoserverlist;}
static bool UpdateNotify() {return updatenotify;}
static bool DoMinToTray() {return mintotray;}
static bool DoAutoConnect() {return autoconnect;}
static void SetAutoConnect( bool inautoconnect) {autoconnect = inautoconnect;}
static bool AddServersFromServer() {return addserversfromserver;}
static bool AddServersFromClient() {return addserversfromclient;}
static uint8* GetMinTrayPTR() {return &mintotray;}
static uint16 GetTrafficOMeterInterval() { return trafficOMeterInterval;}
static void SetTrafficOMeterInterval(uint16 in) { trafficOMeterInterval=in;}
static uint16 GetStatsInterval() { return statsInterval;}
static void SetStatsInterval(uint16 in) { statsInterval=in;}
static void Add2TotalDownloaded(uint64 in) {totalDownloadedBytes+=in;}
static void Add2TotalUploaded(uint64 in) {totalUploadedBytes+=in;}
// -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();
// Functions from base code that update original cumulative stats, now obsolete. (KHAOS)
//void Add2TotalDownloaded(uint64 in) {totalDownloadedBytes+=in;}
//void Add2TotalUploaded(uint64 in) {totalUploadedBytes+=in;}
// End functions from base code.
// Add to, increment and replace functions. They're all named Add2 for the sake of some kind of naming
// convention.
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;}
// Functions that return stats stuff...
// 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...
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -