Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

CDiscoveryService Class Reference

#include <DiscoveryServices.h>

List of all members.

Public Types

enum  {
  dsNull, dsGnutella, dsWebCache, dsServerMet,
  dsBlocked
}

Public Member Functions

 CDiscoveryService (int nType=0, LPCTSTR pszAddress=NULL)
virtual ~CDiscoveryService ()
void Remove (BOOL bCheck=TRUE)
BOOL Execute (int nMode=0)
void OnAccess ()
void OnHostAdd (int nCount=1)
void OnSuccess ()
void OnFailure ()

Public Attributes

int m_nType
CString m_sAddress
BOOL m_bGnutella2
BOOL m_bGnutella1
DWORD m_tCreated
DWORD m_tAccessed
DWORD m_nAccesses
DWORD m_tUpdated
DWORD m_nUpdates
DWORD m_nHosts
DWORD m_nFailures
DWORD m_nAccessPeriod
DWORD m_nUpdatePeriod

Protected Member Functions

void Serialize (CArchive &ar, int nVersion)
BOOL ResolveGnutella ()

Friends

class CDiscoveryServices


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
dsNull 
dsGnutella 
dsWebCache 
dsServerMet 
dsBlocked 

Definition at line 127 of file DiscoveryServices.h.


Constructor & Destructor Documentation

CDiscoveryService::CDiscoveryService int  nType = 0,
LPCTSTR  pszAddress = NULL
 

Definition at line 1473 of file DiscoveryServices.cpp.

References CSettings::sDiscovery::DefaultUpdate, CSettings::Discovery, m_bGnutella1, m_bGnutella2, m_nAccesses, m_nAccessPeriod, m_nFailures, m_nHosts, m_nType, m_nUpdatePeriod, m_nUpdates, m_sAddress, m_tAccessed, m_tCreated, m_tUpdated, NULL, Settings, and CSettings::sDiscovery::UpdatePeriod.

CDiscoveryService::~CDiscoveryService  )  [virtual]
 

Definition at line 1491 of file DiscoveryServices.cpp.


Member Function Documentation

BOOL CDiscoveryService::Execute int  nMode = 0  ) 
 

Definition at line 1547 of file DiscoveryServices.cpp.

References dsGnutella, dsServerMet, dsWebCache, m_bGnutella2, m_nType, CNetwork::m_pSection, Network, PROTOCOL_ED2K, PROTOCOL_G1, PROTOCOL_G2, CDiscoveryServices::RequestWebCache(), ResolveGnutella(), and CDiscoveryServices::wcmServerMet.

Referenced by CDiscoveryWnd::OnDiscoveryQuery().

void CDiscoveryService::OnAccess  ) 
 

Definition at line 1596 of file DiscoveryServices.cpp.

References m_nAccesses, m_tAccessed, and NULL.

Referenced by CDiscoveryServices::RunServerMet(), CDiscoveryServices::RunWebCacheGet(), and CDiscoveryServices::RunWebCacheUpdate().

void CDiscoveryService::OnFailure  ) 
 

Definition at line 1619 of file DiscoveryServices.cpp.

References CSettings::Discovery, CSettings::sDiscovery::FailureLimit, IDS_DISCOVERY_FAIL_REMOVE, IDS_DISCOVERY_FAILED, m_nFailures, CShareazaApp::Message(), MSG_ERROR, Remove(), Settings, and theApp.

Referenced by CDiscoveryServices::OnRun(), and ResolveGnutella().

void CDiscoveryService::OnHostAdd int  nCount = 1  ) 
 

Definition at line 1602 of file DiscoveryServices.cpp.

References m_nFailures, and m_nHosts.

Referenced by CDiscoveryServices::RunServerMet(), and CDiscoveryServices::RunWebCacheGet().

void CDiscoveryService::OnSuccess  ) 
 

Definition at line 1608 of file DiscoveryServices.cpp.

References dsServerMet, dsWebCache, IDS_DISCOVERY_WEB_SUCCESS, m_nFailures, m_nType, m_sAddress, CShareazaApp::Message(), MSG_DEFAULT, and theApp.

Referenced by ResolveGnutella(), CDiscoveryServices::RunServerMet(), CDiscoveryServices::RunWebCacheGet(), and CDiscoveryServices::RunWebCacheUpdate().

void CDiscoveryService::Remove BOOL  bCheck = TRUE  ) 
 

Definition at line 1498 of file DiscoveryServices.cpp.

References CDiscoveryServices::Remove().

Referenced by CDiscoveryWnd::OnDiscoveryRemove(), OnFailure(), CDiscoveryServices::RunWebCacheGet(), and CDiscoveryServices::RunWebCacheUpdate().

BOOL CDiscoveryService::ResolveGnutella  )  [protected]
 

Definition at line 1571 of file DiscoveryServices.cpp.

References CNetwork::AsyncResolve(), CNetwork::Connect(), GNUTELLA_DEFAULT_PORT, m_sAddress, Network, OnFailure(), OnSuccess(), and PROTOCOL_G1.

Referenced by Execute(), and CDiscoveryServices::ExecuteBootstraps().

void CDiscoveryService::Serialize CArchive &  ar,
int  nVersion
[protected]
 

Definition at line 1506 of file DiscoveryServices.cpp.

References m_bGnutella1, m_bGnutella2, m_nAccesses, m_nAccessPeriod, m_nFailures, m_nHosts, m_nType, m_nUpdatePeriod, m_nUpdates, m_sAddress, m_tAccessed, m_tCreated, and m_tUpdated.

Referenced by CDiscoveryServices::Serialize().


Friends And Related Function Documentation

friend class CDiscoveryServices [friend]
 

Definition at line 144 of file DiscoveryServices.h.


Member Data Documentation

BOOL CDiscoveryService::m_bGnutella1
 

Definition at line 116 of file DiscoveryServices.h.

Referenced by CDiscoveryServices::Add(), CDiscoveryService(), CDiscoveryServices::EnoughServices(), CDiscoveryServices::GetCount(), CDiscoveryServices::GetRandomService(), CDiscoveryServices::GetRandomWebCache(), CDiscoveryServices::RunWebCacheGet(), and Serialize().

BOOL CDiscoveryService::m_bGnutella2
 

Definition at line 115 of file DiscoveryServices.h.

Referenced by CDiscoveryServices::Add(), CDiscoveryService(), CDiscoveryServices::EnoughServices(), Execute(), CDiscoveryServices::GetCount(), CDiscoveryServices::GetRandomService(), CDiscoveryServices::GetRandomWebCache(), CDiscoveryServices::RunWebCacheGet(), CDiscoveryServices::RunWebCacheUpdate(), and Serialize().

DWORD CDiscoveryService::m_nAccesses
 

Definition at line 119 of file DiscoveryServices.h.

Referenced by CDiscoveryService(), CDiscoveryServices::GetRandomWebCache(), OnAccess(), Serialize(), and CDiscoveryWnd::Update().

DWORD CDiscoveryService::m_nAccessPeriod
 

Definition at line 124 of file DiscoveryServices.h.

Referenced by CDiscoveryService(), CDiscoveryServices::GetRandomService(), CDiscoveryServices::GetRandomWebCache(), CDiscoveryServices::RequestWebCache(), CDiscoveryServices::RunWebCacheGet(), CDiscoveryServices::RunWebCacheUpdate(), and Serialize().

DWORD CDiscoveryService::m_nFailures
 

Definition at line 123 of file DiscoveryServices.h.

Referenced by CDiscoveryService(), CDiscoveryServices::GetRandomWebCache(), OnFailure(), OnHostAdd(), OnSuccess(), Serialize(), and CDiscoveryWnd::Update().

DWORD CDiscoveryService::m_nHosts
 

Definition at line 122 of file DiscoveryServices.h.

Referenced by CDiscoveryService(), CDiscoveryServices::GetRandomWebCache(), OnHostAdd(), Serialize(), and CDiscoveryWnd::Update().

int CDiscoveryService::m_nType
 

Definition at line 112 of file DiscoveryServices.h.

Referenced by CDiscoveryServices::Add(), CDiscoveryService(), CDiscoveryServices::CheckWebCacheValid(), CDiscoveryServices::EnoughServices(), Execute(), CDiscoveryServices::ExecuteBootstraps(), CDiscoveryServices::GetCount(), CDiscoveryServices::GetRandomService(), CDiscoveryServices::GetRandomWebCache(), CDiscoveryWnd::OnDiscoveryBrowse(), CDiscoveryServiceDlg::OnInitDialog(), CDiscoveryServiceDlg::OnOK(), OnSuccess(), CDiscoveryWnd::OnUpdateDiscoveryAdvertise(), CDiscoveryWnd::OnUpdateDiscoveryQuery(), CDiscoveryServices::RequestRandomService(), Serialize(), and CDiscoveryWnd::Update().

DWORD CDiscoveryService::m_nUpdatePeriod
 

Definition at line 125 of file DiscoveryServices.h.

Referenced by CDiscoveryService(), CDiscoveryServices::GetRandomWebCache(), CDiscoveryServices::RunWebCacheUpdate(), and Serialize().

DWORD CDiscoveryService::m_nUpdates
 

Definition at line 121 of file DiscoveryServices.h.

Referenced by CDiscoveryService(), CDiscoveryServices::RunWebCacheUpdate(), Serialize(), and CDiscoveryWnd::Update().

CString CDiscoveryService::m_sAddress
 

Definition at line 113 of file DiscoveryServices.h.

Referenced by CDiscoveryServices::Add(), CDiscoveryService(), CDiscoveryServices::CheckWebCacheValid(), CDiscoveryServices::GetByAddress(), CDiscoveryWnd::OnDiscoveryBrowse(), CDiscoveryServiceDlg::OnInitDialog(), CDiscoveryServiceDlg::OnOK(), OnSuccess(), CDiscoveryServices::RequestWebCache(), ResolveGnutella(), CDiscoveryServices::RunServerMet(), CDiscoveryServices::RunWebCacheGet(), CDiscoveryServices::RunWebCacheUpdate(), Serialize(), and CDiscoveryWnd::Update().

DWORD CDiscoveryService::m_tAccessed
 

Definition at line 118 of file DiscoveryServices.h.

Referenced by CDiscoveryService(), CDiscoveryServices::GetRandomService(), CDiscoveryServices::GetRandomWebCache(), OnAccess(), CDiscoveryServices::RequestWebCache(), Serialize(), and CDiscoveryWnd::Update().

DWORD CDiscoveryService::m_tCreated
 

Definition at line 117 of file DiscoveryServices.h.

Referenced by CDiscoveryService(), and Serialize().

DWORD CDiscoveryService::m_tUpdated
 

Definition at line 120 of file DiscoveryServices.h.

Referenced by CDiscoveryService(), CDiscoveryServices::GetRandomWebCache(), CDiscoveryServices::RunWebCacheUpdate(), and Serialize().


The documentation for this class was generated from the following files:
Generated on Thu Dec 15 10:40:05 2005 for Shareaza 2.2.1.0 by  doxygen 1.4.2