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

CShareazaURL Class Reference

#include <ShareazaURL.h>

List of all members.

Public Types

enum  {
  uriNull, uriSource, uriDownload, uriSearch,
  uriHost, uriBrowse, uriDonkeyServer, uriDiscovery
}

Public Member Functions

 CShareazaURL ()
 CShareazaURL (CBTInfo *pTorrent)
virtual ~CShareazaURL ()
void Clear ()
BOOL Parse (LPCTSTR pszURL)
CQuerySearchToQuery ()

Static Public Member Functions

static void Register (BOOL bOnStartup=FALSE)
static BOOL RegisterShellType (LPCTSTR pszProtocol, LPCTSTR pszName, LPCTSTR pszType, LPCTSTR pszApplication, LPCTSTR pszTopic, UINT nIDIcon, BOOL bOverwrite=TRUE)
static BOOL RegisterMagnetHandler (LPCTSTR pszID, LPCTSTR pszName, LPCTSTR pszDescription, LPCTSTR pszApplication, UINT nIDIcon)
static BOOL IsRegistered (LPCTSTR pszProtocol)
static BOOL UnregisterShellType (LPCTSTR pszProtocol)
static void DeleteKey (HKEY hParent, LPCTSTR pszKey)

Public Attributes

int m_nAction
BOOL m_bSHA1
SHA1 m_pSHA1
BOOL m_bTiger
TIGEROOT m_pTiger
BOOL m_bMD5
MD5 m_pMD5
BOOL m_bED2K
MD4 m_pED2K
BOOL m_bBTH
SHA1 m_pBTH
CString m_sName
BOOL m_bSize
QWORD m_nSize
int m_nPort
CString m_sURL
CBTInfom_pTorrent

Protected Member Functions

BOOL ParseMagnet (LPCTSTR pszURL)
BOOL ParseShareaza (LPCTSTR pszURL)
BOOL ParseShareazaHost (LPCTSTR pszURL, BOOL bBrowse=FALSE)
BOOL ParseShareazaFile (LPCTSTR pszURL)
BOOL ParseDonkey (LPCTSTR pszURL)
BOOL ParseDonkeyFile (LPCTSTR pszURL)
BOOL ParseDonkeyServer (LPCTSTR pszURL)
BOOL ParsePiolet (LPCTSTR pszURL)
BOOL ParsePioletFile (LPCTSTR pszURL)
BOOL ParseDiscovery (LPCTSTR pszURL, int nType)
void SkipSlashes (LPCTSTR &pszURL, int nAdd=0)
void SafeString (CString &strInput)


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
uriNull 
uriSource 
uriDownload 
uriSearch 
uriHost 
uriBrowse 
uriDonkeyServer 
uriDiscovery 

Definition at line 61 of file ShareazaURL.h.


Constructor & Destructor Documentation

CShareazaURL::CShareazaURL  ) 
 

Definition at line 46 of file ShareazaURL.cpp.

References Clear(), m_pTorrent, and NULL.

CShareazaURL::CShareazaURL CBTInfo pTorrent  ) 
 

Definition at line 52 of file ShareazaURL.cpp.

References Clear(), m_bBTH, CBTInfo::m_bDataED2K, CBTInfo::m_bDataSHA1, CBTInfo::m_bDataTiger, m_bED2K, m_bSHA1, m_bSize, m_bTiger, m_nAction, m_nSize, CBTInfo::m_nTotalSize, m_pBTH, CBTInfo::m_pDataED2K, CBTInfo::m_pDataSHA1, CBTInfo::m_pDataTiger, m_pED2K, CBTInfo::m_pInfoSHA1, m_pSHA1, m_pTiger, m_pTorrent, CBTInfo::m_sName, m_sName, NULL, and uriDownload.

CShareazaURL::~CShareazaURL  )  [virtual]
 

Definition at line 71 of file ShareazaURL.cpp.

References Clear().


Member Function Documentation

void CShareazaURL::Clear  ) 
 

Definition at line 79 of file ShareazaURL.cpp.

References GNUTELLA_DEFAULT_PORT, m_bBTH, m_bED2K, m_bMD5, m_bSHA1, m_bSize, m_bTiger, m_nAction, m_nPort, m_pTorrent, NULL, and uriNull.

Referenced by CShareazaURL(), Parse(), and ~CShareazaURL().

void CShareazaURL::DeleteKey HKEY  hParent,
LPCTSTR  pszKey
[static]
 

Definition at line 878 of file ShareazaURL.cpp.

References NULL.

Referenced by UnregisterShellType().

BOOL CShareazaURL::IsRegistered LPCTSTR  pszProtocol  )  [static]
 

Definition at line 834 of file ShareazaURL.cpp.

References _tcsistr(), and NULL.

Referenced by UnregisterShellType().

BOOL CShareazaURL::Parse LPCTSTR  pszURL  ) 
 

Definition at line 97 of file ShareazaURL.cpp.

References Clear(), m_nAction, m_sURL, ParseDonkey(), ParseMagnet(), ParsePiolet(), ParseShareaza(), SkipSlashes(), and uriSource.

Referenced by CDDEServer::Execute(), CDownloadDlg::OnChangeURL(), CDownloadDlg::OnInitDialog(), CDownloadDlg::OnOK(), and CRemote::PageNewDownload().

BOOL CShareazaURL::ParseDiscovery LPCTSTR  pszURL,
int  nType
[protected]
 

Definition at line 609 of file ShareazaURL.cpp.

References m_nAction, m_nSize, m_sURL, and uriDiscovery.

Referenced by ParseDonkey(), and ParseShareaza().

BOOL CShareazaURL::ParseDonkey LPCTSTR  pszURL  )  [protected]
 

Definition at line 404 of file ShareazaURL.cpp.

References CDiscoveryService::dsServerMet, ParseDiscovery(), ParseDonkeyFile(), and ParseDonkeyServer().

Referenced by Parse().

BOOL CShareazaURL::ParseDonkeyFile LPCTSTR  pszURL  )  [protected]
 

Definition at line 427 of file ShareazaURL.cpp.

References CED2K::HashFromString(), CED2K::HashToString(), m_bED2K, m_bSize, m_nAction, m_nSize, m_pED2K, m_sName, m_sURL, SafeString(), uriDownload, and CConnection::URLDecode().

Referenced by ParseDonkey().

BOOL CShareazaURL::ParseDonkeyServer LPCTSTR  pszURL  )  [protected]
 

Definition at line 531 of file ShareazaURL.cpp.

References m_nAction, m_nPort, m_sName, NULL, and uriDonkeyServer.

Referenced by ParseDonkey().

BOOL CShareazaURL::ParseMagnet LPCTSTR  pszURL  )  [protected]
 

Definition at line 146 of file ShareazaURL.cpp.

References CED2K::HashFromURN(), CMD5::HashFromURN(), CTigerNode::HashFromURN(), CSHA::HashFromURN(), m_bED2K, m_bMD5, m_bSHA1, m_bSize, m_bTiger, m_nAction, m_nSize, m_pED2K, m_pMD5, m_pSHA1, m_pTiger, m_sName, m_sURL, Replace(), SafeString(), uriDownload, uriSearch, and CConnection::URLDecode().

Referenced by Parse().

BOOL CShareazaURL::ParsePiolet LPCTSTR  pszURL  )  [protected]
 

Definition at line 555 of file ShareazaURL.cpp.

References ParsePioletFile().

Referenced by Parse().

BOOL CShareazaURL::ParsePioletFile LPCTSTR  pszURL  )  [protected]
 

Definition at line 574 of file ShareazaURL.cpp.

References CSHA::HashFromString(), m_bSHA1, m_bSize, m_nAction, m_nSize, m_pSHA1, m_sName, SafeString(), uriDownload, and CConnection::URLDecode().

Referenced by ParsePiolet().

BOOL CShareazaURL::ParseShareaza LPCTSTR  pszURL  )  [protected]
 

Definition at line 256 of file ShareazaURL.cpp.

References CDiscoveryService::dsServerMet, CDiscoveryService::dsWebCache, ParseDiscovery(), ParseShareazaFile(), and ParseShareazaHost().

Referenced by Parse().

BOOL CShareazaURL::ParseShareazaFile LPCTSTR  pszURL  )  [protected]
 

Definition at line 323 of file ShareazaURL.cpp.

References CED2K::HashFromURN(), CMD5::HashFromURN(), CTigerNode::HashFromURN(), CSHA::HashFromURN(), m_bED2K, m_bMD5, m_bSHA1, m_bTiger, m_nAction, m_pED2K, m_pMD5, m_pSHA1, m_pTiger, m_sName, m_sURL, NULL, Replace(), SafeString(), uriDownload, uriSearch, CConnection::URLDecode(), and CConnection::URLEncode().

Referenced by ParseShareaza().

BOOL CShareazaURL::ParseShareazaHost LPCTSTR  pszURL,
BOOL  bBrowse = FALSE
[protected]
 

Definition at line 299 of file ShareazaURL.cpp.

References m_nAction, m_nPort, m_sName, uriBrowse, and uriHost.

Referenced by ParseShareaza().

void CShareazaURL::Register BOOL  bOnStartup = FALSE  )  [static]
 

Definition at line 674 of file ShareazaURL.cpp.

References CSettings::sWeb::ED2K, CSettings::sLive::FirstRun, CSettings::sWeb::Gnutella, IDI_COLLECTION, IDR_MAINFRAME, CSettings::Live, CSettings::sWeb::Magnet, NULL, CSettings::sWeb::Piolet, RegisterMagnetHandler(), RegisterShellType(), Settings, CSettings::sWeb::Torrent, UnregisterShellType(), and CSettings::Web.

Referenced by CShareazaApp::InitInstance(), CWebSettingsPage::OnOK(), and CWizardInterfacePage::OnWizardNext().

BOOL CShareazaURL::RegisterMagnetHandler LPCTSTR  pszID,
LPCTSTR  pszName,
LPCTSTR  pszDescription,
LPCTSTR  pszApplication,
UINT  nIDIcon
[static]
 

Definition at line 909 of file ShareazaURL.cpp.

References NULL.

Referenced by Register().

BOOL CShareazaURL::RegisterShellType LPCTSTR  pszProtocol,
LPCTSTR  pszName,
LPCTSTR  pszType,
LPCTSTR  pszApplication,
LPCTSTR  pszTopic,
UINT  nIDIcon,
BOOL  bOverwrite = TRUE
[static]
 

Definition at line 740 of file ShareazaURL.cpp.

References NULL.

Referenced by Register().

void CShareazaURL::SafeString CString &  strInput  )  [protected]
 

Definition at line 630 of file ShareazaURL.cpp.

Referenced by ParseDonkeyFile(), ParseMagnet(), ParsePioletFile(), and ParseShareazaFile().

void CShareazaURL::SkipSlashes LPCTSTR &  pszURL,
int  nAdd = 0
[protected]
 

Definition at line 624 of file ShareazaURL.cpp.

Referenced by Parse().

CQuerySearch * CShareazaURL::ToQuery  ) 
 

Definition at line 645 of file ShareazaURL.cpp.

References CQuerySearch::m_bED2K, m_bED2K, CQuerySearch::m_bSHA1, m_bSHA1, m_nAction, m_pED2K, CQuerySearch::m_pED2K, m_pSHA1, CQuerySearch::m_pSHA1, m_sName, CQuerySearch::m_sSearch, uriDownload, and uriSearch.

Referenced by CURLActionDlg::OnUrlSearch().

BOOL CShareazaURL::UnregisterShellType LPCTSTR  pszProtocol  )  [static]
 

Definition at line 868 of file ShareazaURL.cpp.

References DeleteKey(), and IsRegistered().

Referenced by Register().


Member Data Documentation

BOOL CShareazaURL::m_bBTH
 

Definition at line 51 of file ShareazaURL.h.

Referenced by CDownloads::Add(), Clear(), and CShareazaURL().

BOOL CShareazaURL::m_bED2K
 

Definition at line 49 of file ShareazaURL.h.

Referenced by CDownloads::Add(), Clear(), CShareazaURL(), CCollectionFile::File::Download(), CTorrentSeedDlg::OnDownload(), CURLActionDlg::OnUrlDownload(), ParseDonkeyFile(), ParseMagnet(), ParseShareazaFile(), ToQuery(), and CURLActionDlg::Update().

BOOL CShareazaURL::m_bMD5
 

Definition at line 47 of file ShareazaURL.h.

Referenced by CDownloads::Add(), Clear(), CCollectionFile::File::Download(), ParseMagnet(), and ParseShareazaFile().

BOOL CShareazaURL::m_bSHA1
 

Definition at line 43 of file ShareazaURL.h.

Referenced by CDownloads::Add(), Clear(), CShareazaURL(), CCollectionFile::File::Download(), CTorrentSeedDlg::OnDownload(), CUpgradeDlg::OnOK(), CURLActionDlg::OnUrlDownload(), ParseMagnet(), ParsePioletFile(), ParseShareazaFile(), ToQuery(), and CURLActionDlg::Update().

BOOL CShareazaURL::m_bSize
 

Definition at line 55 of file ShareazaURL.h.

Referenced by CDownloads::Add(), Clear(), CShareazaURL(), CCollectionFile::File::Download(), CUpgradeDlg::OnOK(), ParseDonkeyFile(), ParseMagnet(), ParsePioletFile(), and CURLActionDlg::Update().

BOOL CShareazaURL::m_bTiger
 

Definition at line 45 of file ShareazaURL.h.

Referenced by CDownloads::Add(), Clear(), CShareazaURL(), CCollectionFile::File::Download(), CUpgradeDlg::OnOK(), ParseMagnet(), ParseShareazaFile(), and CURLActionDlg::Update().

int CShareazaURL::m_nAction
 

Definition at line 41 of file ShareazaURL.h.

Referenced by CDownloads::Add(), CURLActionDlg::AddURL(), Clear(), CShareazaURL(), CCollectionFile::File::Download(), CDownloadDlg::OnChangeURL(), CUpgradeDlg::OnOK(), CMainWnd::OnToolsDownload(), CURLActionDlg::OnUrlDownload(), CURLActionDlg::OnUrlSearch(), Parse(), ParseDiscovery(), ParseDonkeyFile(), ParseDonkeyServer(), ParseMagnet(), ParsePioletFile(), ParseShareazaFile(), ParseShareazaHost(), ToQuery(), and CURLActionDlg::Update().

int CShareazaURL::m_nPort
 

Definition at line 57 of file ShareazaURL.h.

Referenced by Clear(), CURLActionDlg::OnUrlDownload(), CURLActionDlg::OnUrlSearch(), ParseDonkeyServer(), ParseShareazaHost(), and CURLActionDlg::Update().

QWORD CShareazaURL::m_nSize
 

Definition at line 56 of file ShareazaURL.h.

Referenced by CDownloads::Add(), CShareazaURL(), CCollectionFile::File::Download(), CUpgradeDlg::OnOK(), CURLActionDlg::OnUrlDownload(), ParseDiscovery(), ParseDonkeyFile(), ParseMagnet(), ParsePioletFile(), and CURLActionDlg::Update().

SHA1 CShareazaURL::m_pBTH
 

Definition at line 52 of file ShareazaURL.h.

Referenced by CDownloads::Add(), and CShareazaURL().

MD4 CShareazaURL::m_pED2K
 

Definition at line 50 of file ShareazaURL.h.

Referenced by CDownloads::Add(), CShareazaURL(), CCollectionFile::File::Download(), CTorrentSeedDlg::OnDownload(), CURLActionDlg::OnUrlDownload(), ParseDonkeyFile(), ParseMagnet(), ParseShareazaFile(), ToQuery(), and CURLActionDlg::Update().

MD5 CShareazaURL::m_pMD5
 

Definition at line 48 of file ShareazaURL.h.

Referenced by CDownloads::Add(), CCollectionFile::File::Download(), ParseMagnet(), and ParseShareazaFile().

SHA1 CShareazaURL::m_pSHA1
 

Definition at line 44 of file ShareazaURL.h.

Referenced by CDownloads::Add(), CShareazaURL(), CCollectionFile::File::Download(), CTorrentSeedDlg::OnDownload(), CUpgradeDlg::OnOK(), CURLActionDlg::OnUrlDownload(), ParseMagnet(), ParsePioletFile(), ParseShareazaFile(), ToQuery(), and CURLActionDlg::Update().

TIGEROOT CShareazaURL::m_pTiger
 

Definition at line 46 of file ShareazaURL.h.

Referenced by CDownloads::Add(), CShareazaURL(), CCollectionFile::File::Download(), CUpgradeDlg::OnOK(), ParseMagnet(), ParseShareazaFile(), and CURLActionDlg::Update().

CBTInfo* CShareazaURL::m_pTorrent
 

Definition at line 59 of file ShareazaURL.h.

Referenced by CDownloads::Add(), Clear(), and CShareazaURL().

CString CShareazaURL::m_sName
 

Definition at line 54 of file ShareazaURL.h.

Referenced by CDownloads::Add(), CShareazaURL(), CCollectionFile::File::Download(), CUpgradeDlg::OnOK(), CURLActionDlg::OnUrlDownload(), CURLActionDlg::OnUrlSearch(), ParseDonkeyFile(), ParseDonkeyServer(), ParseMagnet(), ParsePioletFile(), ParseShareazaFile(), ParseShareazaHost(), ToQuery(), and CURLActionDlg::Update().

CString CShareazaURL::m_sURL
 

Definition at line 58 of file ShareazaURL.h.

Referenced by CDownloads::Add(), CDownloadsWnd::OnDownloadsUrl(), CUpgradeDlg::OnOK(), CURLActionDlg::OnUrlDownload(), Parse(), ParseDiscovery(), ParseDonkeyFile(), ParseMagnet(), ParseShareazaFile(), and CURLActionDlg::Update().


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