vmsBtSessionImpl Class Reference

#include <vmsBtSessionImpl.h>

Inheritance diagram for vmsBtSessionImpl:

vmsBtSession

List of all members.

Public Member Functions

void RestoreDownloadHandle (vmsBtDownloadImpl *dld)
void ListenOn (int portFrom, int portTo)
BOOL IsListening ()
USHORT get_ListenPort ()
vmsBtDownloadCreateDownload (vmsBtFile *torrent, LPCSTR pszOutputPath, LPBYTE pbFastResumeData, DWORD dwFRDataSize, BOOL bCompactMode)
void SetDownloadLimit (int limit)
void SetUploadLimit (int limit)
void SetMaxUploads (int limit)
void DeleteDownload (vmsBtDownload *)
void DHT_start (LPBYTE pbState, DWORD dwStateSize)
void DHT_stop ()
BOOL DHT_getState (LPBYTE pbBuffer, DWORD dwBufferSize, LPDWORD pdwDataSize)
BOOL DHT_isStarted ()
void set_EventsHandler (fntBtSessionEventsHandler pfn, LPVOID pData)
void SetProxySettings (LPCSTR pszIp, int nPort, LPCSTR pszUser, LPCSTR pszPwd)
int get_TotalDownloadConnectionCount ()
int get_DownloadCount ()
vmsBtDownloadget_Download (int nIndex)
int get_TotalDownloadSpeed ()
int get_TotalUploadSpeed ()
UINT64 get_TotalDownloadedByteCount ()
UINT64 get_TotalUploadedByteCount ()
void SetUserAgent (LPCSTR pszUA)
 vmsBtSessionImpl (void)
virtual ~vmsBtSessionImpl (void)

Static Public Member Functions

static vmsBtSessionImplInstance ()

Public Attributes

session m_session

Protected Member Functions

int FindDownloadIndex (const torrent_handle &h)

Static Protected Member Functions

static DWORD WINAPI _threadSession (LPVOID lp)

Protected Attributes

bool m_bThreadRunning
bool m_bNeedStop
BOOL m_bDHTstarted
fntBtSessionEventsHandler m_pfnEvHandler
LPVOID m_pEvData
std::vector< vmsBtDownloadImpl * > m_vDownloads
CRITICAL_SECTION m_csRestoreTorrentHandle
CRITICAL_SECTION m_csDeleteDownload


Detailed Description

Definition at line 9 of file vmsBtSessionImpl.h.


Constructor & Destructor Documentation

vmsBtSessionImpl::vmsBtSessionImpl ( void   ) 

vmsBtSessionImpl::~vmsBtSessionImpl ( void   )  [virtual]


Member Function Documentation

void vmsBtSessionImpl::RestoreDownloadHandle ( vmsBtDownloadImpl dld  ) 

void vmsBtSessionImpl::ListenOn ( int  portFrom,
int  portTo 
) [virtual]

Reimplemented from vmsBtSession.

Definition at line 126 of file vmsBtSessionImpl.cpp.

References libtorrent::session::listen_on(), and m_session.

BOOL vmsBtSessionImpl::IsListening (  )  [virtual]

Reimplemented from vmsBtSession.

Definition at line 131 of file vmsBtSessionImpl.cpp.

References libtorrent::session::is_listening(), and m_session.

USHORT vmsBtSessionImpl::get_ListenPort (  )  [virtual]

Reimplemented from vmsBtSession.

Definition at line 136 of file vmsBtSessionImpl.cpp.

References libtorrent::session::listen_port(), and m_session.

vmsBtDownload * vmsBtSessionImpl::CreateDownload ( vmsBtFile torrent,
LPCSTR  pszOutputPath,
LPBYTE  pbFastResumeData,
DWORD  dwFRDataSize,
BOOL  bCompactMode 
) [virtual]

void vmsBtSessionImpl::SetDownloadLimit ( int  limit  )  [virtual]

Reimplemented from vmsBtSession.

Definition at line 116 of file vmsBtSessionImpl.cpp.

References m_session, and libtorrent::session::set_download_rate_limit().

void vmsBtSessionImpl::SetUploadLimit ( int  limit  )  [virtual]

Reimplemented from vmsBtSession.

Definition at line 121 of file vmsBtSessionImpl.cpp.

References m_session, and libtorrent::session::set_upload_rate_limit().

void vmsBtSessionImpl::SetMaxUploads ( int  limit  )  [virtual]

Reimplemented from vmsBtSession.

Definition at line 141 of file vmsBtSessionImpl.cpp.

References m_session, and libtorrent::session::set_max_uploads().

void vmsBtSessionImpl::DeleteDownload ( vmsBtDownload pDld  )  [virtual]

void vmsBtSessionImpl::DHT_start ( LPBYTE  pbState,
DWORD  dwStateSize 
) [virtual]

Reimplemented from vmsBtSession.

Definition at line 146 of file vmsBtSessionImpl.cpp.

References libtorrent::bdecode(), m_bDHTstarted, m_session, libtorrent::session::start_dht(), and TRUE.

void vmsBtSessionImpl::DHT_stop (  )  [virtual]

Reimplemented from vmsBtSession.

Definition at line 154 of file vmsBtSessionImpl.cpp.

References FALSE, m_bDHTstarted, m_session, and libtorrent::session::stop_dht().

BOOL vmsBtSessionImpl::DHT_getState ( LPBYTE  pbBuffer,
DWORD  dwBufferSize,
LPDWORD  pdwDataSize 
) [virtual]

Reimplemented from vmsBtSession.

Definition at line 162 of file vmsBtSessionImpl.cpp.

References libtorrent::bencode(), libtorrent::session::dht_state(), FALSE, m_session, NULL, and TRUE.

BOOL vmsBtSessionImpl::DHT_isStarted (  )  [virtual]

Reimplemented from vmsBtSession.

Definition at line 181 of file vmsBtSessionImpl.cpp.

References m_bDHTstarted.

void vmsBtSessionImpl::set_EventsHandler ( fntBtSessionEventsHandler  pfn,
LPVOID  pData 
) [virtual]

Reimplemented from vmsBtSession.

Definition at line 321 of file vmsBtSessionImpl.cpp.

References m_pEvData, and m_pfnEvHandler.

void vmsBtSessionImpl::SetProxySettings ( LPCSTR  pszIp,
int  nPort,
LPCSTR  pszUser,
LPCSTR  pszPwd 
) [virtual]

int vmsBtSessionImpl::get_TotalDownloadConnectionCount (  )  [virtual]

Reimplemented from vmsBtSession.

Definition at line 379 of file vmsBtSessionImpl.cpp.

References m_vDownloads, and n.

int vmsBtSessionImpl::get_DownloadCount (  )  [virtual]

Reimplemented from vmsBtSession.

Definition at line 387 of file vmsBtSessionImpl.cpp.

References m_vDownloads.

vmsBtDownload * vmsBtSessionImpl::get_Download ( int  nIndex  )  [virtual]

Reimplemented from vmsBtSession.

Definition at line 392 of file vmsBtSessionImpl.cpp.

References m_vDownloads.

int vmsBtSessionImpl::get_TotalDownloadSpeed (  )  [virtual]

int vmsBtSessionImpl::get_TotalUploadSpeed (  )  [virtual]

UINT64 vmsBtSessionImpl::get_TotalDownloadedByteCount (  )  [virtual]

UINT64 vmsBtSessionImpl::get_TotalUploadedByteCount (  )  [virtual]

void vmsBtSessionImpl::SetUserAgent ( LPCSTR  pszUA  )  [virtual]

vmsBtSessionImpl * vmsBtSessionImpl::Instance (  )  [static]

Definition at line 101 of file vmsBtSessionImpl.cpp.

References NULL.

Referenced by __declspec(), and vmsBtDownloadImpl::check_handle_is_valid().

DWORD vmsBtSessionImpl::_threadSession ( LPVOID  lp  )  [static, protected]

int vmsBtSessionImpl::FindDownloadIndex ( const torrent_handle &  h  )  [protected]

Referenced by _threadSession(), and DeleteDownload().


Member Data Documentation

Definition at line 46 of file vmsBtSessionImpl.h.

Referenced by _threadSession(), vmsBtSessionImpl(), and ~vmsBtSessionImpl().

Definition at line 46 of file vmsBtSessionImpl.h.

Referenced by _threadSession(), vmsBtSessionImpl(), and ~vmsBtSessionImpl().

Definition at line 47 of file vmsBtSessionImpl.h.

Referenced by DHT_isStarted(), DHT_start(), DHT_stop(), and vmsBtSessionImpl().

Definition at line 49 of file vmsBtSessionImpl.h.

Referenced by _threadSession(), RestoreDownloadHandle(), and set_EventsHandler().

CRITICAL_SECTION vmsBtSessionImpl::m_csRestoreTorrentHandle [protected]

Definition at line 53 of file vmsBtSessionImpl.h.

Referenced by RestoreDownloadHandle(), vmsBtSessionImpl(), and ~vmsBtSessionImpl().

CRITICAL_SECTION vmsBtSessionImpl::m_csDeleteDownload [protected]

Definition at line 54 of file vmsBtSessionImpl.h.

Referenced by DeleteDownload(), vmsBtSessionImpl(), and ~vmsBtSessionImpl().


The documentation for this class was generated from the following files:

Generated on Sun May 25 00:21:20 2008 by  doxygen 1.5.6