#include <DiscoveryServices.h>
Collaboration diagram for CDiscoveryServices:

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 () |
| DWORD | MetQueried () const |
| DWORD | LastExecute () const |
| CDiscoveryService * | GetByAddress (LPCTSTR pszAddress) const |
| CDiscoveryService * | GetByAddress (IN_ADDR *pAddress, WORD nPort, int nSubType) |
| void | Clear () |
| BOOL | Load () |
| BOOL | Save () |
| BOOL | Update () |
| BOOL | Execute (BOOL bDiscovery, PROTOCOLID nProtocol, BOOL bForceDiscovery) |
| int | ExecuteBootstraps (int nCount, BOOL bUDP=FALSE, PROTOCOLID nProtocol=PROTOCOL_NULL) |
| void | Stop () |
| void | OnGnutellaAdded (IN_ADDR *pAddress, int nCount) |
| void | OnGnutellaFailed (IN_ADDR *pAddress) |
Protected Member Functions | |
| void | Serialize (CArchive &ar) |
| 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 | |
| CList< CDiscoveryService * > | m_pList |
| HANDLE | m_hThread |
| HINTERNET | m_hInternet |
| HINTERNET | m_hRequest |
| CDiscoveryService * | m_pWebCache |
| int | m_nWebCache |
| CDiscoveryService * | m_pSubmit |
| PROTOCOLID | m_nLastQueryProtocol |
| DWORD | m_tUpdated |
| PROTOCOLID | m_nLastUpdateProtocol |
| BOOL | m_bFirstTime |
Private Member Functions | |
| BOOL | EnoughServices () const |
| void | AddDefaults () |
Private Attributes | |
| DWORD | m_tExecute |
| DWORD | m_tQueried |
| DWORD | m_tMetQueried |
Friends | |
| class | CDiscoveryService |
| CDiscoveryServices::CDiscoveryServices | ( | ) |
| CDiscoveryServices::~CDiscoveryServices | ( | ) | [virtual] |
| POSITION CDiscoveryServices::GetIterator | ( | ) | const |
| CDiscoveryService * CDiscoveryServices::GetNext | ( | POSITION & | pos | ) | const |
| BOOL CDiscoveryServices::Check | ( | CDiscoveryService * | pService, | |
| int | nType = -1 | |||
| ) | const |
| int CDiscoveryServices::GetCount | ( | int | nType = 0, |
|
| PROTOCOLID | nProtocol = PROTOCOL_NULL | |||
| ) | const |
| CDiscoveryService * CDiscoveryServices::Add | ( | LPCTSTR | pszAddress, | |
| int | nType, | |||
| PROTOCOLID | nProtocol = PROTOCOL_NULL | |||
| ) |
| CDiscoveryService * CDiscoveryServices::Add | ( | CDiscoveryService * | pService | ) |
| void CDiscoveryServices::Remove | ( | CDiscoveryService * | pService, | |
| BOOL | bCheck = TRUE | |||
| ) |
| BOOL CDiscoveryServices::CheckWebCacheValid | ( | LPCTSTR | pszAddress | ) |
| BOOL CDiscoveryServices::CheckMinimumServices | ( | ) |
| DWORD CDiscoveryServices::MetQueried | ( | ) | const |
| DWORD CDiscoveryServices::LastExecute | ( | ) | const |
| CDiscoveryService * CDiscoveryServices::GetByAddress | ( | LPCTSTR | pszAddress | ) | const |
| CDiscoveryService * CDiscoveryServices::GetByAddress | ( | IN_ADDR * | pAddress, | |
| WORD | nPort, | |||
| int | nSubType | |||
| ) |
| void CDiscoveryServices::Clear | ( | ) |
| BOOL CDiscoveryServices::Load | ( | ) |
| BOOL CDiscoveryServices::Save | ( | ) |
| BOOL CDiscoveryServices::Update | ( | ) |
| BOOL CDiscoveryServices::Execute | ( | BOOL | bDiscovery, | |
| PROTOCOLID | nProtocol, | |||
| BOOL | bForceDiscovery | |||
| ) |
| int CDiscoveryServices::ExecuteBootstraps | ( | int | nCount, | |
| BOOL | bUDP = FALSE, |
|||
| PROTOCOLID | nProtocol = PROTOCOL_NULL | |||
| ) |
| void CDiscoveryServices::Stop | ( | ) |
| void CDiscoveryServices::OnGnutellaAdded | ( | IN_ADDR * | pAddress, | |
| int | nCount | |||
| ) |
| void CDiscoveryServices::OnGnutellaFailed | ( | IN_ADDR * | pAddress | ) |
| void CDiscoveryServices::Serialize | ( | CArchive & | ar | ) | [protected] |
| BOOL CDiscoveryServices::RequestRandomService | ( | PROTOCOLID | nProtocol | ) | [protected] |
| CDiscoveryService * CDiscoveryServices::GetRandomService | ( | PROTOCOLID | nProtocol | ) | [protected] |
| CDiscoveryService * CDiscoveryServices::GetRandomWebCache | ( | PROTOCOLID | nProtocol, | |
| BOOL | bWorkingOnly, | |||
| CDiscoveryService * | pExclude = NULL, |
|||
| BOOL | bForUpdate = FALSE | |||
| ) | [protected] |
| BOOL CDiscoveryServices::RequestWebCache | ( | CDiscoveryService * | pService, | |
| int | nMode, | |||
| PROTOCOLID | nProtocol | |||
| ) | [protected] |
| void CDiscoveryServices::StopWebRequest | ( | ) | [protected] |
| UINT CDiscoveryServices::ThreadStart | ( | LPVOID | pParam | ) | [static, protected] |
| void CDiscoveryServices::OnRun | ( | ) | [protected] |
| BOOL CDiscoveryServices::RunWebCacheGet | ( | BOOL | bCache | ) | [protected] |
| BOOL CDiscoveryServices::RunWebCacheUpdate | ( | ) | [protected] |
| BOOL CDiscoveryServices::RunServerMet | ( | ) | [protected] |
| BOOL CDiscoveryServices::SendWebCacheRequest | ( | CString | strURL, | |
| CString & | strOutput | |||
| ) | [protected] |
| BOOL CDiscoveryServices::EnoughServices | ( | ) | const [private] |
| void CDiscoveryServices::AddDefaults | ( | ) | [private] |
friend class CDiscoveryService [friend] |
CList< CDiscoveryService* > CDiscoveryServices::m_pList [protected] |
HANDLE CDiscoveryServices::m_hThread [protected] |
HINTERNET CDiscoveryServices::m_hInternet [protected] |
HINTERNET CDiscoveryServices::m_hRequest [protected] |
CDiscoveryService* CDiscoveryServices::m_pWebCache [protected] |
int CDiscoveryServices::m_nWebCache [protected] |
CDiscoveryService* CDiscoveryServices::m_pSubmit [protected] |
PROTOCOLID CDiscoveryServices::m_nLastQueryProtocol [protected] |
DWORD CDiscoveryServices::m_tUpdated [protected] |
PROTOCOLID CDiscoveryServices::m_nLastUpdateProtocol [protected] |
BOOL CDiscoveryServices::m_bFirstTime [protected] |
DWORD CDiscoveryServices::m_tExecute [private] |
DWORD CDiscoveryServices::m_tQueried [private] |
DWORD CDiscoveryServices::m_tMetQueried [private] |
1.5.2