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

CRemote Class Reference

#include <Remote.h>

Inheritance diagram for CRemote:

CTransfer CConnection List of all members.

Public Member Functions

 CRemote (CConnection *pConnection)
 ~CRemote ()
virtual BOOL OnRun ()
virtual void OnDropped (BOOL bError)
virtual BOOL OnRead ()
virtual BOOL OnHeadersComplete ()

Protected Member Functions

CString GetKey (LPCTSTR pszName)
BOOL CheckCookie ()
void Prepare (LPCTSTR pszPrefix=NULL)
void Add (LPCTSTR pszKey, LPCTSTR pszValue)
void Output (LPCTSTR pszName)
void PageSwitch (CString &strPath)
void PageLogin ()
void PageHome ()
void PageSearch ()
void PageNewSearch ()
void PageDownloads ()
void PageNewDownload ()
void PageUploads ()
void PageNetwork ()
void PageBanner (CString &strPath)
void PageImage (CString &strPath)
void PageSearchHeaderColumn (int nColumnID, LPCTSTR pszCaption, LPCTSTR pszAlign)
void PageSearchRowColumn (int nColumnID, CMatchFile *pFile, LPCTSTR pszValue, LPCTSTR pszAlign=_T("center"))
void PageNetworkNetwork (int nID, BOOL *pbConnect, LPCTSTR pszName)

Protected Attributes

CString m_sHandshake
CString m_sRedirect
CString m_sHeader
CString m_sResponse
CBuffer m_pResponse
CMapStringToString m_pKeys

Static Protected Attributes

static CList< int > m_pCookies

Constructor & Destructor Documentation

CRemote::CRemote CConnection pConnection  ) 
 

Definition at line 71 of file Remote.cpp.

References CTransfer::AttachTo(), CConnection::m_mInput, CConnection::m_mOutput, NULL, OnRead(), and TCPBandwidthMeter::pLimit.

CRemote::~CRemote  ) 
 

Definition at line 78 of file Remote.cpp.


Member Function Documentation

void CRemote::Add LPCTSTR  pszKey,
LPCTSTR  pszValue
[protected]
 

Definition at line 285 of file Remote.cpp.

References m_pKeys.

Referenced by PageDownloads(), PageLogin(), PageNetwork(), PageNetworkNetwork(), PageSearch(), PageSearchHeaderColumn(), PageSearchRowColumn(), and PageUploads().

BOOL CRemote::CheckCookie  )  [protected]
 

Definition at line 236 of file Remote.cpp.

References m_pCookies, CTransfer::m_pHeaderName, CTransfer::m_pHeaderValue, m_sRedirect, and NULL.

Referenced by PageDownloads(), PageHome(), PageImage(), PageNetwork(), PageNewDownload(), PageNewSearch(), PageSearch(), and PageUploads().

CString CRemote::GetKey LPCTSTR  pszName  )  [protected]
 

Definition at line 211 of file Remote.cpp.

References m_sHandshake, and CConnection::URLDecode().

Referenced by PageDownloads(), PageLogin(), PageNetwork(), PageNetworkNetwork(), PageNewDownload(), PageNewSearch(), PageSearch(), and PageUploads().

void CRemote::OnDropped BOOL  bError  )  [virtual]
 

Reimplemented from CConnection.

Definition at line 102 of file Remote.cpp.

References CTransfer::Close().

BOOL CRemote::OnHeadersComplete  )  [virtual]
 

Reimplemented from CConnection.

Definition at line 137 of file Remote.cpp.

References CBuffer::AddBuffer(), CBuffer::Clear(), CTransfer::ClearHeaders(), CTransfer::Close(), CBuffer::m_nLength, CConnection::m_pOutput, m_pResponse, m_sHandshake, m_sHeader, m_sRedirect, m_sResponse, NULL, CConnection::OnWrite(), Output(), PageSwitch(), Prepare(), and CBuffer::Print().

BOOL CRemote::OnRead  )  [virtual]
 

Reimplemented from CConnection.

Definition at line 111 of file Remote.cpp.

References CTransfer::Close(), CSettings::sRemote::Enable, CBuffer::m_nLength, CConnection::m_pInput, m_sHandshake, CConnection::OnRead(), CConnection::ReadHeaders(), CBuffer::ReadLine(), CSettings::Remote, and Settings.

Referenced by CRemote().

BOOL CRemote::OnRun  )  [virtual]
 

Reimplemented from CConnection.

Definition at line 85 of file Remote.cpp.

References CTransfer::Close(), CNetwork::IsConnected(), CConnection::m_mOutput, Network, and TCPBandwidthMeter::tLast.

void CRemote::Output LPCTSTR  pszName  )  [protected]
 

Definition at line 296 of file Remote.cpp.

References CSettings::General, m_pKeys, m_sResponse, NULL, CSettings::sGeneral::Path, and Settings.

Referenced by OnHeadersComplete(), PageDownloads(), PageHome(), PageLogin(), PageNetwork(), PageNetworkNetwork(), PageSearch(), PageSearchHeaderColumn(), PageSearchRowColumn(), PageUploads(), and Prepare().

void CRemote::PageBanner CString &  strPath  )  [protected]
 

Definition at line 1413 of file Remote.cpp.

References CBuffer::EnsureBuffer(), IDR_HOME_HEADER_1, IDR_HOME_HEADER_2, CBuffer::m_nLength, CBuffer::m_pBuffer, m_pResponse, m_sHeader, and NULL.

Referenced by PageSwitch().

void CRemote::PageDownloads  )  [protected]
 

Definition at line 788 of file Remote.cpp.

References Add(), CheckCookie(), CDownloadGroup::Contains(), DLF_ACTIVE, DLF_PAUSED, DLF_QUEUED, DLF_SOURCES, DownloadGroups, Downloads, CSettings::Downloads, dtsConnecting, CSettings::sDownloads::FilterMask, CDownloads::GetIterator(), CDownloadGroups::GetIterator(), GetKey(), CDownloads::GetNext(), CDownloadGroups::GetNext(), IDS_STATUS_ACTIVE, IDS_STATUS_CANTMOVE, IDS_STATUS_COMPLETED, IDS_STATUS_CREATING, IDS_STATUS_FILEERROR, IDS_STATUS_MOVING, IDS_STATUS_NOSOURCES, IDS_STATUS_PAUSED, IDS_STATUS_PENDING, IDS_STATUS_SEARCHING, IDS_STATUS_SEEDING, IDS_STATUS_TORRENT, IDS_STATUS_TRACKERDOWN, IDS_STATUS_UNKNOWN, IDS_STATUS_UNVERIFIED, IDS_STATUS_VERIFIED, IDS_STATUS_VERIFYING, CDownloadsCtrl::IsExpandable(), CDownloadsCtrl::IsFiltered(), LoadSourcesString(), LoadString(), CDownloadGroup::m_bRemoteSelected, CDownloadGroups::m_pSection, CDownloadGroup::m_sName, NULL, Output(), Prepare(), Settings, CSettings::sDownloads::ShowSources, SIZE_UNKNOWN, CSettings::SmartVolume(), TS_FALSE, and TS_TRUE.

Referenced by PageSwitch().

void CRemote::PageHome  )  [protected]
 

Definition at line 469 of file Remote.cpp.

References CheckCookie(), Output(), and Prepare().

Referenced by PageSwitch().

void CRemote::PageImage CString &  strPath  )  [protected]
 

Definition at line 1439 of file Remote.cpp.

References CheckCookie(), CBuffer::EnsureBuffer(), CSettings::General, CBuffer::m_nLength, CBuffer::m_pBuffer, m_pResponse, CSettings::sGeneral::Path, and Settings.

Referenced by PageSwitch().

void CRemote::PageLogin  )  [protected]
 

Definition at line 436 of file Remote.cpp.

References Add(), CSHA::Add(), CSHA::Finish(), CSHA::GetHashString(), GetKey(), m_pCookies, m_sHeader, m_sRedirect, Output(), CSettings::sRemote::Password, Prepare(), CSettings::Remote, Settings, and CSettings::sRemote::Username.

Referenced by PageSwitch().

void CRemote::PageNetwork  )  [protected]
 

Definition at line 1205 of file Remote.cpp.

References Add(), CheckCookie(), CSettings::eDonkey, CSettings::seDonkey::EnableToday, CSettings::sGnutella1::EnableToday, CSettings::sGnutella2::EnableToday, CNeighboursBase::Get(), GetKey(), CSettings::Gnutella1, CSettings::Gnutella2, CNetwork::m_pSection, Neighbours, Network, Output(), PageNetworkNetwork(), Prepare(), PROTOCOL_ED2K, PROTOCOL_G1, PROTOCOL_G2, and Settings.

Referenced by PageSwitch().

void CRemote::PageNetworkNetwork int  nID,
BOOL *  pbConnect,
LPCTSTR  pszName
[protected]
 

Definition at line 1237 of file Remote.cpp.

References Add(), CNeighbour::Close(), CNetwork::Connect(), CNeighboursBase::GetIterator(), GetKey(), CNeighboursBase::GetNext(), CGProfile::GetNick(), IDS_NEIGHBOUR_CLOSING, IDS_NEIGHBOUR_CONNECTING, IDS_NEIGHBOUR_ED2K_HIGHID, IDS_NEIGHBOUR_ED2K_LOWID, IDS_NEIGHBOUR_G1LEAF, IDS_NEIGHBOUR_G1PEER, IDS_NEIGHBOUR_G1ULTRA, IDS_NEIGHBOUR_G2HUB, IDS_NEIGHBOUR_G2LEAF, IDS_NEIGHBOUR_G2PEER, IDS_NEIGHBOUR_HANDSHAKING, IDS_NEIGHBOUR_REJECTED, IDS_NEIGHBOUR_UNKNOWN, CEDPacket::IsLowID(), LoadString(), CConnection::m_mInput, CConnection::m_mOutput, CEDNeighbour::m_nClientID, CNeighbour::m_nInputCount, CG2Neighbour::m_nLeafCount, CG2Neighbour::m_nLeafLimit, CNeighbour::m_nNodeType, CNeighbour::m_nOutputCount, CNeighbour::m_nProtocol, CNeighbour::m_nState, CNeighbour::m_nUnique, CEDNeighbour::m_nUserCount, CEDNeighbour::m_nUserLimit, CNeighbour::m_pProfile, CConnection::m_sAddress, CEDNeighbour::m_sServerName, CConnection::m_sUserAgent, CConnection::m_tConnected, CConnection::Measure(), Neighbours, Network, TCPBandwidthMeter::nMeasure, nrsClosing, nrsConnected, nrsConnecting, nrsHandshake1, nrsHandshake2, nrsHandshake3, nrsRejected, ntHub, ntLeaf, ntNode, TCPBandwidthMeter::nTotal, NULL, Output(), Prepare(), PROTOCOL_ED2K, PROTOCOL_G1, PROTOCOL_G2, PROTOCOL_NULL, Settings, and CSettings::SmartVolume().

Referenced by PageNetwork().

void CRemote::PageNewDownload  )  [protected]
 

Definition at line 1081 of file Remote.cpp.

References CDownloads::Add(), CheckCookie(), Downloads, GetKey(), m_sRedirect, and CShareazaURL::Parse().

Referenced by PageSwitch().

void CRemote::PageNewSearch  )  [protected]
 

Definition at line 751 of file Remote.cpp.

References CheckCookie(), CSchemaCache::Get(), GetKey(), CSettings::sSearch::LastSchemaURI, CQuerySearch::m_pSchema, CShareazaApp::m_pSection, m_sRedirect, CQuerySearch::m_sSearch, CSchema::m_sURI, NULL, SchemaCache, CSettings::Search, Settings, theApp, and WM_OPENSEARCH.

Referenced by PageSwitch().

void CRemote::PageSearch  )  [protected]
 

Definition at line 480 of file Remote.cpp.

References CDownloads::Add(), Add(), CheckCookie(), Downloads, CMatchList::Filter(), CWindowManager::Find(), CMatchFile::GetFilteredCount(), CSchemaCache::GetIterator(), GetKey(), CSchemaCache::GetNext(), CMatchFile::GetURN(), ID_SEARCH_STOP, CMatchFile::m_bBusy, CMatchFile::m_bExpanded, CBaseMatchWnd::m_bPaused, CSchema::m_bPrivate, CMatchFile::m_bPush, CMatchList::m_bSortDir, CMatchFile::m_bStable, CMatchFile::m_nRated, CMatchFile::m_nRating, CMatchFile::m_nSize, CMatchList::m_nSortColumn, CSchema::m_nType, CQueryHit::m_pAddress, CMatchFile::m_pBest, CMatchList::m_pFiles, CMatchFile::m_pHits, CBaseMatchWnd::m_pMatches, CMatchList::m_pSection, CShareazaApp::m_pSection, CQueryHit::m_pVendor, CMainWnd::m_pWindows, CMatchList::m_sFilter, CVendor::m_sName, CQueryHit::m_sName, m_sRedirect, m_sResponse, CMatchFile::m_sSpeed, CSchema::m_sTitle, CSchema::m_sURI, MATCH_COL_CLIENT, MATCH_COL_COUNT, MATCH_COL_NAME, MATCH_COL_RATING, MATCH_COL_SIZE, MATCH_COL_SPEED, MATCH_COL_STATUS, NULL, Output(), PageSearchHeaderColumn(), PageSearchRowColumn(), Prepare(), SchemaCache, CMatchList::SetSortColumn(), Settings, CSettings::SmartVolume(), CSchema::stFile, theApp, TS_FALSE, and TS_TRUE.

Referenced by PageSwitch().

void CRemote::PageSearchHeaderColumn int  nColumnID,
LPCTSTR  pszCaption,
LPCTSTR  pszAlign
[protected]
 

Definition at line 724 of file Remote.cpp.

References Add(), Output(), and Prepare().

Referenced by PageSearch().

void CRemote::PageSearchRowColumn int  nColumnID,
CMatchFile pFile,
LPCTSTR  pszValue,
LPCTSTR  pszAlign = _T("center")
[protected]
 

Definition at line 735 of file Remote.cpp.

References Add(), CMatchFile::GetURN(), Output(), and Prepare().

Referenced by PageSearch().

void CRemote::PageSwitch CString &  strPath  )  [protected]
 

Definition at line 385 of file Remote.cpp.

References m_sRedirect, PageBanner(), PageDownloads(), PageHome(), PageImage(), PageLogin(), PageNetwork(), PageNewDownload(), PageNewSearch(), PageSearch(), and PageUploads().

Referenced by OnHeadersComplete().

void CRemote::PageUploads  )  [protected]
 

Definition at line 1094 of file Remote.cpp.

References Add(), CheckCookie(), CUploadFile::GetActive(), CUploadsCtrl::GetFileIterator(), GetKey(), CUploadTransfer::GetMeasuredSpeed(), CUploadsCtrl::GetNextFile(), CUploadsCtrl::GetNextQueue(), CUploadsCtrl::GetQueueIterator(), IDS_STATUS_CHOKED, IDS_STATUS_COMPLETED, IDS_STATUS_NEXT, IDS_STATUS_Q, IDS_STATUS_UNINTERESTED, LoadString(), CUploadTransferBT::m_bChoked, CUploadQueue::m_bExpanded, CUploadTransferBT::m_bInterested, CUploadTransfer::m_nProtocol, CUploadFile::m_nSize, CUploadTransfer::m_nState, CUploadQueues::m_pHistoryQueue, CUploadQueues::m_pTorrentQueue, CConnection::m_sAddress, CUploadFile::m_sName, CUploadTransfer::m_sNick, CConnection::m_sUserAgent, NULL, Output(), Prepare(), PROTOCOL_BT, CUploadFile::Remove(), Settings, CSettings::SmartVolume(), UploadQueues, and upsNull.

Referenced by PageSwitch().

void CRemote::Prepare LPCTSTR  pszPrefix = NULL  )  [protected]
 

Definition at line 264 of file Remote.cpp.

References m_pKeys, m_sResponse, NULL, and Output().

Referenced by OnHeadersComplete(), PageDownloads(), PageHome(), PageLogin(), PageNetwork(), PageNetworkNetwork(), PageSearch(), PageSearchHeaderColumn(), PageSearchRowColumn(), and PageUploads().


Member Data Documentation

CList< int > CRemote::m_pCookies [static, protected]
 

Definition at line 66 of file Remote.cpp.

Referenced by CheckCookie(), and PageLogin().

CMapStringToString CRemote::m_pKeys [protected]
 

Definition at line 44 of file Remote.h.

Referenced by Add(), Output(), and Prepare().

CBuffer CRemote::m_pResponse [protected]
 

Definition at line 43 of file Remote.h.

Referenced by OnHeadersComplete(), PageBanner(), and PageImage().

CString CRemote::m_sHandshake [protected]
 

Definition at line 39 of file Remote.h.

Referenced by GetKey(), OnHeadersComplete(), and OnRead().

CString CRemote::m_sHeader [protected]
 

Definition at line 41 of file Remote.h.

Referenced by OnHeadersComplete(), PageBanner(), and PageLogin().

CString CRemote::m_sRedirect [protected]
 

Definition at line 40 of file Remote.h.

Referenced by CheckCookie(), OnHeadersComplete(), PageLogin(), PageNewDownload(), PageNewSearch(), PageSearch(), and PageSwitch().

CString CRemote::m_sResponse [protected]
 

Definition at line 42 of file Remote.h.

Referenced by OnHeadersComplete(), Output(), PageSearch(), and Prepare().


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