#include <DiscoveryServices.h>
Public Types | |
enum | { wcmHosts, wcmCaches, wcmUpdate, wcmSubmit, wcmServerMet } |
Public Member Functions | |
CDiscoveryServices () | |
virtual | ~CDiscoveryServices () |
POSITION | GetIterator () const |
CDiscoveryService * | GetNext (POSITION &pos) const |
BOOL | Check (CDiscoveryService *pService, int nType=-1) const |
int | GetCount (int nType=0, PROTOCOLID nProtocol=PROTOCOL_NULL) const |
CDiscoveryService * | Add (LPCTSTR pszAddress, int nType, PROTOCOLID nProtocol=PROTOCOL_NULL) |
CDiscoveryService * | Add (CDiscoveryService *pService) |
void | Remove (CDiscoveryService *pService, BOOL bCheck=TRUE) |
BOOL | CheckWebCacheValid (LPCTSTR pszAddress) |
BOOL | CheckMinimumServices () |
BOOL | QueryForHosts (PROTOCOLID nProtocol) |
DWORD | MetQueried () const |
CDiscoveryService * | GetByAddress (LPCTSTR pszAddress) const |
void | Clear () |
BOOL | Load () |
BOOL | Save () |
BOOL | Update () |
BOOL | Execute (BOOL bSecondary=FALSE) |
void | Stop () |
void | OnGnutellaAdded (IN_ADDR *pAddress, int nCount) |
void | OnGnutellaFailed (IN_ADDR *pAddress) |
Protected Member Functions | |
void | Serialize (CArchive &ar) |
BOOL | EnoughServices () const |
void | AddDefaults () |
int | ExecuteBootstraps (int nCount) |
BOOL | RequestRandomService (PROTOCOLID nProtocol) |
CDiscoveryService * | GetRandomService (PROTOCOLID nProtocol) |
CDiscoveryService * | GetRandomWebCache (PROTOCOLID nProtocol, BOOL bWorkingOnly, CDiscoveryService *pExclude=NULL, BOOL bForUpdate=FALSE) |
BOOL | RequestWebCache (CDiscoveryService *pService, int nMode, PROTOCOLID nProtocol) |
void | StopWebRequest () |
void | OnRun () |
BOOL | RunWebCacheGet (BOOL bCache) |
BOOL | RunWebCacheUpdate () |
BOOL | RunServerMet () |
BOOL | SendWebCacheRequest (CString strURL, CString &strOutput) |
Static Protected Member Functions | |
static UINT | ThreadStart (LPVOID pParam) |
Protected Attributes | |
CPtrList | m_pList |
HANDLE | m_hThread |
HINTERNET | m_hInternet |
HINTERNET | m_hRequest |
CDiscoveryService * | m_pWebCache |
int | m_nWebCache |
CDiscoveryService * | m_pSubmit |
DWORD | m_tQueried |
PROTOCOLID | m_nLastQueryProtocol |
DWORD | m_tUpdated |
PROTOCOLID | m_nLastUpdateProtocol |
DWORD | m_tExecute |
BOOL | m_bFirstTime |
DWORD | m_tMetQueried |
Friends | |
class | CDiscoveryService |
|
Definition at line 37 of file DiscoveryServices.h. |
|
Definition at line 48 of file DiscoveryServices.cpp. References m_bFirstTime, m_hInternet, m_hRequest, m_hThread, m_nLastQueryProtocol, m_nLastUpdateProtocol, m_nWebCache, m_pWebCache, m_tExecute, m_tMetQueried, m_tQueried, m_tUpdated, NULL, and PROTOCOL_NULL. |
|
Definition at line 64 of file DiscoveryServices.cpp. References Clear(). |
|
|
|
Definition at line 493 of file DiscoveryServices.cpp. References _tcsistr(), Add(), CDiscoveryService::dsBlocked, CDiscoveryService::dsServerMet, CDiscoveryService::dsWebCache, EnoughServices(), CBuffer::EnsureBuffer(), CSettings::General, IDS_DISCOVERY_DEFAULTS, CBuffer::m_nLength, CBuffer::m_pBuffer, CShareazaApp::Message(), MSG_DEFAULT, MSG_ERROR, NULL, CSettings::sGeneral::Path, PROTOCOL_ED2K, PROTOCOL_G1, PROTOCOL_G2, CBuffer::ReadLine(), Settings, and theApp. Referenced by CheckMinimumServices(), Load(), and Remove(). |
|
Definition at line 82 of file DiscoveryServices.cpp. Referenced by CDiscoveryWnd::GetItem(), CDiscoveryServiceDlg::OnInitDialog(), CDiscoveryServiceDlg::OnOK(), OnRun(), RunServerMet(), RunWebCacheGet(), and RunWebCacheUpdate(). |
|
Definition at line 284 of file DiscoveryServices.cpp. References AddDefaults(), and EnoughServices(). Referenced by CDiscoveryWnd::OnDiscoveryRemove(). |
|
Definition at line 247 of file DiscoveryServices.cpp. References _tcsistr(), CDiscoveryService::dsBlocked, GetIterator(), GetNext(), CDiscoveryService::m_nType, CDiscoveryService::m_sAddress, and NULL. Referenced by Add(). |
|
Definition at line 345 of file DiscoveryServices.cpp. References GetIterator(), GetNext(), m_pList, and Stop(). Referenced by Load(), Serialize(), and ~CDiscoveryServices(). |
|
Definition at line 463 of file DiscoveryServices.cpp. References CDiscoveryService::dsServerMet, CDiscoveryService::dsWebCache, GetIterator(), GetNext(), CDiscoveryService::m_bGnutella1, CDiscoveryService::m_bGnutella2, and CDiscoveryService::m_nType. Referenced by AddDefaults(), CheckMinimumServices(), Load(), and Remove(). |
|
|
Definition at line 706 of file DiscoveryServices.cpp. References CDiscoveryService::dsGnutella, GetIterator(), GetNext(), CDiscoveryService::m_nType, and CDiscoveryService::ResolveGnutella(). Referenced by Execute(). |
|
Definition at line 322 of file DiscoveryServices.cpp. References GetIterator(), GetNext(), CDiscoveryService::m_sAddress, and NULL. Referenced by Add(). |
|
Definition at line 89 of file DiscoveryServices.cpp. References CDiscoveryService::dsNull, CDiscoveryService::dsServerMet, GetIterator(), GetNext(), CDiscoveryService::m_bGnutella1, CDiscoveryService::m_bGnutella2, CDiscoveryService::m_nType, PROTOCOL_ED2K, PROTOCOL_G1, PROTOCOL_G2, and PROTOCOL_NULL. Referenced by Add(), OnRun(), and Serialize(). |
|
Definition at line 72 of file DiscoveryServices.cpp. References m_pList. Referenced by CheckWebCacheValid(), Clear(), EnoughServices(), ExecuteBootstraps(), GetByAddress(), GetCount(), GetRandomService(), GetRandomWebCache(), Serialize(), and CDiscoveryWnd::Update(). |
|
Definition at line 77 of file DiscoveryServices.cpp. References m_pList. Referenced by CheckWebCacheValid(), Clear(), EnoughServices(), ExecuteBootstraps(), GetByAddress(), GetCount(), GetRandomService(), GetRandomWebCache(), Serialize(), and CDiscoveryWnd::Update(). |
|
Definition at line 782 of file DiscoveryServices.cpp. References CDiscoveryService::dsServerMet, CDiscoveryService::dsWebCache, GetIterator(), GetNext(), CDiscoveryService::m_bGnutella1, CDiscoveryService::m_bGnutella2, CDiscoveryService::m_nAccessPeriod, CDiscoveryService::m_nType, CDiscoveryService::m_tAccessed, NULL, PROTOCOL_ED2K, PROTOCOL_G1, and PROTOCOL_G2. Referenced by RequestRandomService(). |
|
|
Definition at line 366 of file DiscoveryServices.cpp. References AddDefaults(), Clear(), EnoughServices(), CSettings::General, CNetwork::m_pSection, Network, Save(), Serialize(), Settings, and CSettings::sGeneral::UserPath. Referenced by CShareazaApp::InitInstance(). |
|
Definition at line 317 of file DiscoveryServices.cpp. References m_tMetQueried. |
|
Definition at line 738 of file DiscoveryServices.cpp. Referenced by CShakeNeighbour::OnHeaderLine(). |
|
Definition at line 743 of file DiscoveryServices.cpp. Referenced by CShakeNeighbour::OnRun(). |
|
Definition at line 1028 of file DiscoveryServices.cpp. References Check(), CSettings::Discovery, CDiscoveryService::dsWebCache, GetCount(), CSettings::sDiscovery::Lowpoint, m_bFirstTime, m_hInternet, m_hRequest, m_nLastQueryProtocol, m_nLastUpdateProtocol, m_nWebCache, CNetwork::m_pSection, m_pWebCache, m_tQueried, m_tUpdated, Network, NULL, CDiscoveryService::OnFailure(), PROTOCOL_NULL, RunServerMet(), RunWebCacheGet(), RunWebCacheUpdate(), Settings, wcmCaches, wcmHosts, wcmServerMet, wcmSubmit, and wcmUpdate. Referenced by ThreadStart(). |
|
Definition at line 303 of file DiscoveryServices.cpp. References CNetwork::m_pSection, Network, and RequestRandomService(). Referenced by CWizardNetworksPage::DoDonkeyImport(), and CWizardConnectionPage::OnWizardNext(). |
|
Definition at line 235 of file DiscoveryServices.cpp. References AddDefaults(), EnoughServices(), and m_pList. Referenced by CDiscoveryService::Remove(). |
|
Definition at line 755 of file DiscoveryServices.cpp. References CDiscoveryService::dsServerMet, GetRandomService(), CDiscoveryService::m_nType, RequestWebCache(), wcmHosts, and wcmServerMet. Referenced by Execute(), and QueryForHosts(). |
|
|
Definition at line 1418 of file DiscoveryServices.cpp. References Check(), CDiscoveryService::dsServerMet, CHostCache::eDonkey, HostCache, CHostCacheList::ImportMET(), m_hInternet, m_hRequest, CNetwork::m_pSection, m_pWebCache, CDiscoveryService::m_sAddress, Network, NULL, CDiscoveryService::OnAccess(), CDiscoveryService::OnHostAdd(), CDiscoveryService::OnSuccess(), and CHostCache::Save(). Referenced by OnRun(). |
|
|
|
Definition at line 409 of file DiscoveryServices.cpp. References CSettings::General, CNetwork::m_pSection, Network, Serialize(), Settings, and CSettings::sGeneral::UserPath. Referenced by CShareazaApp::ExitInstance(), Load(), and CDiscoveryWnd::OnDestroy(). |
|
Definition at line 1365 of file DiscoveryServices.cpp. References m_hInternet, m_hRequest, CShareazaApp::m_sVersion, CShareazaApp::Message(), MSG_DEBUG, NULL, and theApp. Referenced by RunWebCacheGet(), and RunWebCacheUpdate(). |
|
Definition at line 428 of file DiscoveryServices.cpp. References CDiscoveryService, Clear(), GetCount(), GetIterator(), GetNext(), m_pList, and CDiscoveryService::Serialize(). |
|
Definition at line 357 of file DiscoveryServices.cpp. References StopWebRequest(). Referenced by Clear(), CNetwork::Disconnect(), and CShareazaApp::ExitInstance(). |
|
Definition at line 988 of file DiscoveryServices.cpp. References m_hInternet, m_hThread, CShareazaApp::Message(), MSG_DEBUG, NULL, and theApp. Referenced by RequestWebCache(), Stop(), and Update(). |
|
Definition at line 1018 of file DiscoveryServices.cpp. References OnRun(). Referenced by RequestWebCache(). |
|
|
Definition at line 99 of file DiscoveryServices.h. Referenced by Add(), and Serialize(). |
|
Definition at line 53 of file DiscoveryServices.h. Referenced by CDiscoveryServices(), OnRun(), and RunWebCacheGet(). |
|
Definition at line 43 of file DiscoveryServices.h. Referenced by CDiscoveryServices(), Execute(), OnRun(), RequestWebCache(), RunServerMet(), SendWebCacheRequest(), StopWebRequest(), and Update(). |
|
Definition at line 44 of file DiscoveryServices.h. Referenced by CDiscoveryServices(), OnRun(), RequestWebCache(), RunServerMet(), and SendWebCacheRequest(). |
|
Definition at line 42 of file DiscoveryServices.h. Referenced by CDiscoveryServices(), RequestWebCache(), and StopWebRequest(). |
|
Definition at line 49 of file DiscoveryServices.h. Referenced by CDiscoveryServices(), Execute(), OnRun(), RequestWebCache(), and RunWebCacheGet(). |
|
Definition at line 51 of file DiscoveryServices.h. Referenced by CDiscoveryServices(), OnRun(), RequestWebCache(), RunWebCacheUpdate(), and Update(). |
|
Definition at line 46 of file DiscoveryServices.h. Referenced by CDiscoveryServices(), OnRun(), RequestWebCache(), and RunWebCacheUpdate(). |
|
Definition at line 41 of file DiscoveryServices.h. Referenced by Add(), Check(), Clear(), GetIterator(), GetNext(), Remove(), and Serialize(). |
|
Definition at line 47 of file DiscoveryServices.h. Referenced by RequestWebCache(), and RunWebCacheUpdate(). |
|
Definition at line 45 of file DiscoveryServices.h. Referenced by CDiscoveryServices(), OnRun(), RequestWebCache(), RunServerMet(), RunWebCacheGet(), and RunWebCacheUpdate(). |
|
Definition at line 52 of file DiscoveryServices.h. Referenced by CDiscoveryServices(), and Execute(). |
|
Definition at line 55 of file DiscoveryServices.h. Referenced by CDiscoveryServices(), Execute(), and MetQueried(). |
|
Definition at line 48 of file DiscoveryServices.h. Referenced by CDiscoveryServices(), Execute(), OnRun(), RequestWebCache(), and RunWebCacheGet(). |
|
Definition at line 50 of file DiscoveryServices.h. Referenced by CDiscoveryServices(), OnRun(), RequestWebCache(), and Update(). |