#include <vmsBtSupport.h>
Public Member Functions | |
| vmsBtFile * | CreateTorrentFileObject () |
| void | Shutdown () |
| BOOL | LoadState () |
| BOOL | SaveState () |
| void | ApplyDHTSettings () |
| void | ApplyListenPortSettings () |
| void | ApplyProxySettings () |
| void | ApplyRestrainAllDownloadsMode () |
| BOOL | is_Initialized () |
| vmsBtSession * | get_Session () |
| BOOL | Initialize () |
| vmsBtSupport () | |
| virtual | ~vmsBtSupport () |
Protected Member Functions | |
| bool | LoadBtDll (vmsDLL &dll) |
Static Protected Member Functions | |
| static void | GetFirefoxProxySettings (fsString &strIp, fsString &strUser, fsString &strPwd, int &nPort) |
| static void | GetIeProxySettings (fsString &strIp, fsString &strUser, fsString &strPwd, int &nPort) |
Protected Attributes | |
| CRITICAL_SECTION | m_cs1 |
| LPBYTE | m_pbDHTstate |
| DWORD | m_dwDHTstateSize |
| vmsDLL | m_dllBt |
| vmsDLL | m_dllBtFile |
Definition at line 16 of file vmsBtSupport.h.
| vmsBtSupport::vmsBtSupport | ( | ) |
| vmsBtSupport::~vmsBtSupport | ( | ) | [virtual] |
| vmsBtFile * vmsBtSupport::CreateTorrentFileObject | ( | ) |
Definition at line 281 of file vmsBtSupport.cpp.
References vmsDLL::GetProcAddress(), vmsDLL::is_Loaded(), LoadBtDll(), m_dllBtFile, and NULL.
Referenced by vmsBtDownloadManager::CreateByTorrentFile(), and vmsBtDownloadManager::LoadState().
| void vmsBtSupport::Shutdown | ( | ) |
Definition at line 180 of file vmsBtSupport.cpp.
References FALSE, vmsDLL::Free(), vmsDLL::GetProcAddress(), is_Initialized(), and m_dllBt.
Referenced by fsDownloadsMgr::Shutdown(), and ~vmsBtSupport().
| BOOL vmsBtSupport::LoadState | ( | ) |
Definition at line 158 of file vmsBtSupport.cpp.
References FALSE, fsGetDataFilePath(), GetFileSize(), m_dwDHTstateSize, m_pbDHTstate, NULL, SAFE_DELETE_ARRAY, and TRUE.
Referenced by Initialize().
| BOOL vmsBtSupport::SaveState | ( | ) |
Definition at line 122 of file vmsBtSupport.cpp.
References vmsBtSession::DHT_getState(), vmsBtSession::DHT_isStarted(), FALSE, fsGetDataFilePath(), get_Session(), is_Initialized(), m_dwDHTstateSize, m_pbDHTstate, NULL, SAFE_DELETE_ARRAY, and TRUE.
Referenced by fsDownloadsMgr::Save().
| void vmsBtSupport::ApplyDHTSettings | ( | ) |
Definition at line 103 of file vmsBtSupport.cpp.
References _App, fsAppSettings::Bittorrent_EnableDHT(), vmsBtSession::DHT_isStarted(), vmsBtSession::DHT_start(), vmsBtSession::DHT_stop(), FALSE, get_Session(), is_Initialized(), m_dwDHTstateSize, and m_pbDHTstate.
Referenced by get_Session(), and CDownloaderProperties_BtPage::OnApply().
| void vmsBtSupport::ApplyListenPortSettings | ( | ) |
Definition at line 87 of file vmsBtSupport.cpp.
References _App, fsAppSettings::Bittorrent_ListenPort_From(), fsAppSettings::Bittorrent_ListenPort_To(), FALSE, vmsBtSession::get_ListenPort(), get_Session(), is_Initialized(), vmsBtSession::IsListening(), and vmsBtSession::ListenOn().
Referenced by get_Session(), and CDownloaderProperties_BtPage::OnApply().
| void vmsBtSupport::ApplyProxySettings | ( | ) |
Definition at line 193 of file vmsBtSupport.cpp.
References _App, FALSE, get_Session(), GetFirefoxProxySettings(), GetIeProxySettings(), fsAppSettings::HttpProxy_Name(), fsAppSettings::HttpProxy_UserName(), IATE_FIREFOXPROXY, IATE_MANUALPROXY, IATE_NOPROXY, IATE_PRECONFIGPROXY, fsAppSettings::InternetAccessType(), is_Initialized(), fsString::IsEmpty(), LPSTR, and vmsBtSession::SetProxySettings().
Referenced by get_Session().
| void vmsBtSupport::ApplyRestrainAllDownloadsMode | ( | ) |
Definition at line 74 of file vmsBtSupport.cpp.
References _App, _DldsMgr, fsAppSettings::Bittorrent_UploadTrafficLimit(), get_Session(), fsDownloadsMgr::GetTUM(), is_Initialized(), fsInternetDownloader::is_PauseMode(), vmsBtSession::SetDownloadLimit(), and vmsBtSession::SetUploadLimit().
Referenced by get_Session(), and CMainFrame::OnPausealldlds().
| BOOL vmsBtSupport::is_Initialized | ( | ) |
Definition at line 69 of file vmsBtSupport.cpp.
References vmsDLL::is_Loaded(), and m_dllBt.
Referenced by ApplyDHTSettings(), ApplyListenPortSettings(), ApplyProxySettings(), ApplyRestrainAllDownloadsMode(), fsDownloadsMgr::ApplyTrafficLimit(), fsDownloadsMgr::LoadDownloads(), CMainFrame::OnUpdateTotalSpeed(), CMainFrame::OnUpdateTrafficThisMonth(), SaveState(), CMainFrame::SaveState(), Shutdown(), and fsDownloadsMgr::Shutdown().
| vmsBtSession * vmsBtSupport::get_Session | ( | ) |
Definition at line 36 of file vmsBtSupport.cpp.
References _DldsMgr, ApplyDHTSettings(), ApplyListenPortSettings(), ApplyProxySettings(), ApplyRestrainAllDownloadsMode(), fsDownloadsMgr::ApplyTrafficLimit(), fsDownloadsMgr::AttachToBtSession(), vmsDLL::GetProcAddress(), Initialize(), vmsDLL::is_Loaded(), m_cs1, m_dllBt, NULL, and PRG_AGENT_NAME.
Referenced by fsDownloadsMgr::_threadStartSeeding(), ApplyDHTSettings(), ApplyListenPortSettings(), ApplyProxySettings(), ApplyRestrainAllDownloadsMode(), fsDownloadsMgr::ApplyTrafficLimit(), fsDownloadsMgr::AttachToBtSession(), vmsBtDownloadManager::CreateBtDownload(), vmsBtDownloadManager::DeleteBtDownload(), CMainFrame::OnUpdateTotalSpeed(), CMainFrame::OnUpdateTrafficThisMonth(), SaveState(), CMainFrame::SaveState(), and fsDownloadsMgr::Shutdown().
| BOOL vmsBtSupport::Initialize | ( | void | ) |
Definition at line 29 of file vmsBtSupport.cpp.
References FALSE, LoadBtDll(), LoadState(), and m_dllBt.
Referenced by get_Session().
Definition at line 300 of file vmsBtSupport.cpp.
References vmsDLL::Load().
Referenced by CreateTorrentFileObject(), and Initialize().
| void vmsBtSupport::GetFirefoxProxySettings | ( | fsString & | strIp, | |
| fsString & | strUser, | |||
| fsString & | strPwd, | |||
| int & | nPort | |||
| ) | [static, protected] |
Definition at line 269 of file vmsBtSupport.cpp.
References _App, fsAppSettings::FirefoxSettings_Proxy_Addr(), fsAppSettings::FirefoxSettings_Proxy_Port(), and fsAppSettings::FirefoxSettings_Proxy_Type().
Referenced by ApplyProxySettings().
| void vmsBtSupport::GetIeProxySettings | ( | fsString & | strIp, | |
| fsString & | strUser, | |||
| fsString & | strPwd, | |||
| int & | nPort | |||
| ) | [static, protected] |
CRITICAL_SECTION vmsBtSupport::m_cs1 [protected] |
Definition at line 43 of file vmsBtSupport.h.
Referenced by get_Session(), vmsBtSupport(), and ~vmsBtSupport().
LPBYTE vmsBtSupport::m_pbDHTstate [protected] |
Definition at line 48 of file vmsBtSupport.h.
Referenced by ApplyDHTSettings(), LoadState(), SaveState(), and vmsBtSupport().
DWORD vmsBtSupport::m_dwDHTstateSize [protected] |
Definition at line 49 of file vmsBtSupport.h.
Referenced by ApplyDHTSettings(), LoadState(), and SaveState().
vmsDLL vmsBtSupport::m_dllBt [protected] |
Definition at line 51 of file vmsBtSupport.h.
Referenced by get_Session(), Initialize(), is_Initialized(), and Shutdown().
vmsDLL vmsBtSupport::m_dllBtFile [protected] |
1.5.6