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

CBENode Class Reference

#include <BENode.h>

List of all members.

Public Types

enum  {
  beNull, beString, beInt, beList,
  beDict
}

Public Member Functions

 CBENode ()
 ~CBENode ()
void Clear ()
CBENodeAdd (const LPBYTE pKey, int nKey)
CBENodeGetNode (LPCSTR pszKey) const
CBENodeGetNode (const LPBYTE pKey, int nKey) const
void GetSHA1 (SHA1 *pSHA1) const
CString GetStringFromSubNode (LPCSTR pszKey, UINT nEncoding, BOOL *pEncodingError)
CString GetStringFromSubNode (int nItem, UINT nEncoding, BOOL *pEncodingError)
void Encode (CBuffer *pBuffer) const
bool IsType (int nType) const
QWORD GetInt () const
void SetInt (QWORD nValue)
CString GetString () const
CString DecodeString (UINT nCodePage) const
BOOL IsValid (LPCTSTR psz) const
void SetString (LPCSTR psz)
void SetString (LPCWSTR psz)
void SetString (LPCVOID pString, DWORD nLength, BOOL bNull=FALSE)
CBENodeAdd (LPCSTR pszKey=NULL)
int GetCount () const
CBENodeGetNode (int nItem) const

Static Public Member Functions

static CBENodeDecode (CBuffer *pBuffer)

Public Attributes

int m_nType
LPVOID m_pValue
QWORD m_nValue

Private Member Functions

void Decode (LPBYTE &pInput, DWORD &nInput)

Static Private Member Functions

static int DecodeLen (LPBYTE &pInput, DWORD &nInput)


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
beNull 
beString 
beInt 
beList 
beDict 

Definition at line 43 of file BENode.h.


Constructor & Destructor Documentation

CBENode::CBENode  ) 
 

Definition at line 39 of file BENode.cpp.

References beNull, m_nType, m_nValue, m_pValue, and NULL.

Referenced by Add(), and Decode().

CBENode::~CBENode  ) 
 

Definition at line 46 of file BENode.cpp.

References Clear(), m_pValue, and NULL.


Member Function Documentation

CBENode* CBENode::Add LPCSTR  pszKey = NULL  )  [inline]
 

Definition at line 186 of file BENode.h.

References Add(), and NULL.

CBENode * CBENode::Add const LPBYTE  pKey,
int  nKey
 

Definition at line 88 of file BENode.cpp.

References beDict, beList, beNull, CBENode(), m_nType, m_nValue, m_pValue, and NULL.

Referenced by Add(), Decode(), CBTClient::OnSourceRequest(), and CBTClient::SendBeHandshake().

void CBENode::Clear  ) 
 

Definition at line 54 of file BENode.cpp.

References beDict, beList, beNull, beString, m_nType, m_nValue, m_pValue, and NULL.

Referenced by SetInt(), SetString(), and ~CBENode().

void CBENode::Decode LPBYTE &  pInput,
DWORD &  nInput
[private]
 

Definition at line 376 of file BENode.cpp.

References Add(), beDict, beInt, beList, beNull, beString, DecodeLen(), INC, m_nType, m_nValue, m_pValue, and NULL.

CBENode * CBENode::Decode CBuffer pBuffer  )  [static]
 

Definition at line 352 of file BENode.cpp.

References CBENode(), Decode(), CBuffer::m_nLength, CBuffer::m_pBuffer, and NULL.

Referenced by Decode(), CBTInfo::LoadTorrentBuffer(), CBTClient::OnBeHandshake(), CTorrentTrackerDlg::OnRun(), CDownloadTransferBT::OnSourceResponse(), and CBTTrackerRequest::Process().

int CBENode::DecodeLen LPBYTE &  pInput,
DWORD &  nInput
[static, private]
 

Definition at line 452 of file BENode.cpp.

References INC.

Referenced by Decode().

CString CBENode::DecodeString UINT  nCodePage  )  const [inline]
 

Definition at line 107 of file BENode.h.

References beString, CSettings::BitTorrent, CShareazaApp::m_dwWindowsVersion, m_nType, m_pValue, NULL, Settings, theApp, and CSettings::sBitTorrent::TorrentCodePage.

Referenced by GetStringFromSubNode(), and CBTInfo::LoadTorrentTree().

void CBENode::Encode CBuffer pBuffer  )  const
 

Definition at line 294 of file BENode.cpp.

References beDict, beInt, beList, beString, m_nType, m_nValue, m_pValue, and NULL.

Referenced by GetSHA1(), CBTClient::OnSourceRequest(), and CBTClient::SendBeHandshake().

int CBENode::GetCount  )  const [inline]
 

Definition at line 191 of file BENode.h.

References beDict, beList, m_nType, and m_nValue.

Referenced by CBTInfo::LoadTorrentTree(), and CBTClient::OnSourceRequest().

QWORD CBENode::GetInt  )  const [inline]
 

Definition at line 70 of file BENode.h.

References beInt, m_nType, and m_nValue.

Referenced by CBTInfo::LoadTorrentTree(), CDownloadTransferBT::OnSourceResponse(), and CBTTrackerRequest::Process().

CBENode* CBENode::GetNode int  nItem  )  const [inline]
 

Definition at line 197 of file BENode.h.

References beDict, beList, m_nType, m_nValue, m_pValue, and NULL.

CBENode * CBENode::GetNode const LPBYTE  pKey,
int  nKey
const
 

Definition at line 164 of file BENode.cpp.

References beDict, m_nType, m_nValue, m_pValue, and NULL.

CBENode * CBENode::GetNode LPCSTR  pszKey  )  const
 

Definition at line 150 of file BENode.cpp.

References beDict, m_nType, m_nValue, m_pValue, and NULL.

Referenced by GetStringFromSubNode(), CBTInfo::LoadTorrentTree(), CBTClient::OnBeHandshake(), CDownloadTransferBT::OnSourceResponse(), CTorrentTrackerDlg::OnTree(), and CBTTrackerRequest::Process().

void CBENode::GetSHA1 SHA1 pSHA1  )  const
 

Definition at line 278 of file BENode.cpp.

References CSHA::Add(), Encode(), CSHA::Finish(), CSHA::GetHash(), CBuffer::m_nLength, CBuffer::m_pBuffer, and NULL.

Referenced by CBTInfo::LoadTorrentTree().

CString CBENode::GetString  )  const [inline]
 

Definition at line 83 of file BENode.h.

References beString, CShareazaApp::m_dwWindowsVersion, m_nType, m_pValue, NULL, and theApp.

Referenced by GetStringFromSubNode(), CBTInfo::LoadTorrentTree(), CBTClient::OnBeHandshake(), CDownloadTransferBT::OnSourceResponse(), and CBTTrackerRequest::Process().

CString CBENode::GetStringFromSubNode int  nItem,
UINT  nEncoding,
BOOL *  pEncodingError
 

Definition at line 246 of file BENode.cpp.

References beDict, beList, beString, GetNode(), GetString(), IsValid(), and m_nType.

CString CBENode::GetStringFromSubNode LPCSTR  pszKey,
UINT  nEncoding,
BOOL *  pEncodingError
 

Definition at line 182 of file BENode.cpp.

References beString, CSettings::BitTorrent, DecodeString(), GetNode(), GetString(), IsValid(), m_nType, Settings, and CSettings::sBitTorrent::TorrentExtraKeys.

Referenced by CBTInfo::LoadTorrentTree().

bool CBENode::IsType int  nType  )  const [inline]
 

Definition at line 64 of file BENode.h.

References m_nType, and NULL.

Referenced by CBTInfo::LoadTorrentTree(), CBTClient::OnBeHandshake(), CDownloadTransferBT::OnSourceResponse(), CTorrentTrackerDlg::OnTree(), and CBTTrackerRequest::Process().

BOOL CBENode::IsValid LPCTSTR  psz  )  const [inline]
 

Definition at line 156 of file BENode.h.

References NULL.

Referenced by GetStringFromSubNode().

void CBENode::SetInt QWORD  nValue  )  [inline]
 

Definition at line 76 of file BENode.h.

References beInt, Clear(), m_nType, and m_nValue.

void CBENode::SetString LPCVOID  pString,
DWORD  nLength,
BOOL  bNull = FALSE
[inline]
 

Definition at line 177 of file BENode.h.

References beString, Clear(), m_nType, m_nValue, and m_pValue.

void CBENode::SetString LPCWSTR  psz  )  [inline]
 

Definition at line 170 of file BENode.h.

References SetString().

void CBENode::SetString LPCSTR  psz  )  [inline]
 

Definition at line 165 of file BENode.h.

Referenced by SetString().


Member Data Documentation

int CBENode::m_nType
 

Definition at line 39 of file BENode.h.

Referenced by Add(), CBENode(), Clear(), Decode(), DecodeString(), Encode(), GetCount(), GetInt(), GetNode(), GetString(), GetStringFromSubNode(), IsType(), SetInt(), and SetString().

QWORD CBENode::m_nValue
 

Definition at line 41 of file BENode.h.

Referenced by Add(), CBENode(), Clear(), Decode(), Encode(), GetCount(), GetInt(), GetNode(), CBTInfo::LoadTorrentTree(), CDownloadTransferBT::OnSourceResponse(), CBTTrackerRequest::Process(), SetInt(), and SetString().

LPVOID CBENode::m_pValue
 

Definition at line 40 of file BENode.h.

Referenced by Add(), CBENode(), Clear(), Decode(), DecodeString(), Encode(), GetNode(), GetString(), CBTInfo::LoadTorrentTree(), CDownloadTransferBT::OnSourceResponse(), CBTTrackerRequest::Process(), SetString(), and ~CBENode().


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