本文整理汇总了C++中CDownload::IsStarted方法的典型用法代码示例。如果您正苦于以下问题:C++ CDownload::IsStarted方法的具体用法?C++ CDownload::IsStarted怎么用?C++ CDownload::IsStarted使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDownload
的用法示例。
在下文中一共展示了CDownload::IsStarted方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FindByTiger
CDownload* CDownloads::FindByTiger(const TIGEROOT* pTiger, BOOL bSharedOnly) const
{
for ( POSITION pos = GetIterator() ; pos ; )
{
CDownload* pDownload = GetNext( pos );
if ( pDownload->m_bTiger && pDownload->m_pTiger == *pTiger )
{
if ( ! bSharedOnly || ( pDownload->IsShared() && pDownload->IsStarted() ) )
return pDownload;
}
}
return NULL;
}
示例2: GetNext
CDownload* CDownloads::FindBySHA1(const SHA1* pSHA1, BOOL bSharedOnly) const
{
for ( POSITION pos = GetIterator() ; pos ; )
{
CDownload* pDownload = GetNext( pos );
if ( pDownload->m_bSHA1 && pDownload->m_pSHA1 == *pSHA1 )
{
if ( ! bSharedOnly || ( pDownload->IsShared() && pDownload->IsStarted() ) )
return pDownload;
}
}
return NULL;
}
示例3: ExecutePartialFiles
int CLocalSearch::ExecutePartialFiles(int nMaximum)
{
ASSERT( m_nProtocol == PROTOCOL_G2 );
ASSERT( m_pSearch != NULL );
if ( m_pSearch->m_bTiger == FALSE && m_pSearch->m_bSHA1 == FALSE &&
m_pSearch->m_bED2K == FALSE && m_pSearch->m_bBTH == FALSE ) return 0;
CSingleLock pLock( &Transfers.m_pSection );
if ( ! pLock.Lock( 50 ) ) return 0;
int nCount = 0;
m_pPacket = NULL;
for ( POSITION pos = Downloads.GetIterator() ; pos ; )
{
CDownload* pDownload = Downloads.GetNext( pos );
if ( ! pDownload->IsShared() ) continue;
if ( ( m_pSearch->m_bTiger && pDownload->m_bTiger && m_pSearch->m_pTiger == pDownload->m_pTiger )
|| ( m_pSearch->m_bSHA1 && pDownload->m_bSHA1 && m_pSearch->m_pSHA1 == pDownload->m_pSHA1 )
|| ( m_pSearch->m_bED2K && pDownload->m_bED2K && m_pSearch->m_pED2K == pDownload->m_pED2K )
|| ( m_pSearch->m_bBTH && pDownload->m_bBTH && m_pSearch->m_pBTH == pDownload->m_pBTH ) )
{
if ( pDownload->m_bBTH || pDownload->IsStarted() )
{
if ( m_pPacket == NULL ) CreatePacketG2();
AddHit( pDownload, nCount++ );
}
}
}
if ( m_pPacket != NULL )
{
WriteTrailerG2();
DispatchPacket();
}
return nCount;
}