当前位置: 首页>>代码示例>>C++>>正文


C++ DLDS_LIST::push_back方法代码示例

本文整理汇总了C++中DLDS_LIST::push_back方法的典型用法代码示例。如果您正苦于以下问题:C++ DLDS_LIST::push_back方法的具体用法?C++ DLDS_LIST::push_back怎么用?C++ DLDS_LIST::push_back使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DLDS_LIST的用法示例。


在下文中一共展示了DLDS_LIST::push_back方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: PerformCommand

void vmsFdmApiDownloadImpl::PerformCommand(vmsFdmApiDownloadCommand enCmd)
{
	if (m_dld->dwFlags & DLD_WAS_DELETED)
		return;

	switch (enCmd)
	{
	case FADC_START:
	{
		DLDS_LIST v; v.push_back (m_dld);
		_DldsMgr.StartDownloads (v, TRUE);
		return;
	}

	case FADC_STOP:
	{
		DLDS_LIST v; v.push_back (m_dld);
		_DldsMgr.StopDownloads (v, TRUE);
		return;
	}

	case FADC_RESTART:
		_pwndDownloads->RestartDownload (m_dld, FALSE);
		return;

	case FADC_OPEN_FOLDER:
		m_dld->pMgr->Do_OpenFolder ();
		return;

	case FADC_LAUNCH_FILE:
		_DldsMgr.LaunchDownload (m_dld);
		return;
	}
}
开发者ID:pedia,项目名称:raidget,代码行数:34,代码来源:vmsfdmapidownloadimpl.cpp

示例2: ShowSelectedDldsProperties

void CFVDownloads_Tasks::ShowSelectedDldsProperties()
{
	POSITION pos = GetFirstSelectedItemPosition ();
	DLDS_LIST vDlds;
	DLDS_LIST vBtDlds;

	if (pos == NULL)
		return;

	while (pos)
	{
		int iItem = GetNextSelectedItem (pos);
		vmsDownloadSmartPtr dld = m_vDlds [iItem];
		if (dld->pMgr->GetDownloadMgr () != NULL)
			vDlds.push_back (dld);
		else if (dld->pMgr->GetBtDownloadMgr () != NULL)
			vBtDlds.push_back (dld);
	}

	if (vDlds.size () >= vBtDlds.size ())
		_pwndDownloads->OnDownloadProperties (vDlds);
	else
		_pwndDownloads->OnBtDownloadProperties (vBtDlds);

	SetFocus ();
}
开发者ID:naroya,项目名称:freedownload,代码行数:26,代码来源:FVDownloads_Tasks.cpp

示例3: OnDeletedDelete

void CDownloads_Deleted::OnDeletedDelete()
{
	DLDS_LIST v;
	POSITION pos = GetFirstSelectedItemPosition ();
	while (pos)
	{
		int iItem = GetNextSelectedItem (pos);
		vmsDownloadSmartPtr dld = (fsDownload*) GetItemData (iItem);
		v.push_back (dld);
	}

	if (v.size ())
	{
		if (IDYES == MessageBox (LS (L_AREYOUSURE), LS (L_CONFIRMATION), MB_ICONQUESTION | MB_YESNO))
		{
			if (_pwndDownloads->Get_DWWN () == DWWN_DELETED)
				_pwndDownloads->m_wndDeleted.ShowWindow (SW_HIDE);
			try {
				_DldsMgr.DeleteDeletedDownloads (v);
			}
			catch (...) {}
			if (_pwndDownloads->Get_DWWN () == DWWN_DELETED)
				_pwndDownloads->m_wndDeleted.ShowWindow (SW_SHOW);
		}
	}
}
开发者ID:pedia,项目名称:raidget,代码行数:26,代码来源:downloads_deleted.cpp

示例4: OnCreate

int CFlashVideoDownloadsWnd::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CWnd::OnCreate(lpCreateStruct) == -1)
		return -1;
	
	m_wndTasks.Create (this);
	m_wndPreview.Create (this);

	m_splitter.Create (AfxGetInstanceHandle (), m_hWnd, WST_HORIZONTAL);
	m_splitter.SetWnd1 (m_wndTasks.m_hWnd);
	m_splitter.SetWnd2 (m_wndPreview.m_hWnd);
	m_splitter.SetMinDimensions (50, 50);
	float fRatio = _App.View_SplitterRatio ("FVDownloads_DL_PREVIEW");
	if (fRatio < 0.1f)
		fRatio = 0.1f;
	m_splitter.SetRatio (fRatio);

	m_wndPreview.ShowWindow (SW_SHOW);

	DLDS_LIST v;

	_DldsMgr.LockList (true);
	size_t nCount = _DldsMgr.GetCount ();
	for (size_t i = 0; i < nCount; i++)
	{
		if (_DldsMgr.GetDownload (i)->dwFlags & DLD_FLASH_VIDEO)
			v.push_back (_DldsMgr.GetDownload (i));
	}
	_DldsMgr.UnlockList (true);

	for (size_t i = 0; i < v.size (); i++)
		m_wndTasks.AddDownload (v [i], TRUE);
	
	return 0;
}
开发者ID:DragonZX,项目名称:fdm2,代码行数:35,代码来源:FlashVideoDownloadsWnd.cpp

示例5: OnAdvanced

void CCreateDownloadFromTorrentFileDlg::OnAdvanced() 
{
	CBtDldSheet sheet (LS (L_ADVANCED), this);
	DLDS_LIST v;
	v.push_back (m_dld);
	sheet.Init (&v, BTDS_FILES_PAGE | BTDS_MISC_PAGE);
	_DlgMgr.DoModal (&sheet);
}
开发者ID:naroya,项目名称:freedownload,代码行数:8,代码来源:CreateDownloadFromTorrentFileDlg.cpp

示例6: OnStop

void CDlg_Download::OnStop() 
{
	DLDS_LIST vDlds;
	
	vDlds.push_back (m_dld);

	if (m_dld->pMgr->IsRunning ())
		_DldsMgr.StopDownloads (vDlds, TRUE);
	else
		_DldsMgr.StartDownloads (vDlds, TRUE);	
}
开发者ID:naroya,项目名称:fdm,代码行数:11,代码来源:Dlg_Download.cpp

示例7: OnFvdldStart

void CFVDownloads_Tasks::OnFvdldStart() 
{
	DLDS_LIST v;
	POSITION pos = GetFirstSelectedItemPosition ();
	while (pos)
	{
		int nItem = GetNextSelectedItem (pos);
		v.push_back (m_vDlds [nItem]);
	}
	_DldsMgr.StartDownloads (v, TRUE);	
}
开发者ID:naroya,项目名称:freedownload,代码行数:11,代码来源:FVDownloads_Tasks.cpp

示例8: OnAdvanced

void CUrlWithLoginDlg::OnAdvanced()
{
	if (FALSE == UpdateDNP ())
		return;

	DLDS_LIST v;
	v.push_back (m_dld);

	 CDownloadPropertiesSheet sheet (LS (L_ADVANCED), this);
	sheet.Init (&v, DPS_SHP_PROTOCOL|DPS_SHP_PROXY);
    _DlgMgr.OnDoModal (&sheet);
	sheet.DoModal ();
    _DlgMgr.OnEndDialog (&sheet);
}
开发者ID:pedia,项目名称:raidget,代码行数:14,代码来源:urlwithlogindlg.cpp

示例9: GenerateDownloads

DLDS_LIST* CCreateBatchDownload::GenerateDownloads()
{
	DLDS_LIST *vpDlds = new DLDS_LIST;

	for (int i = 0; i < m_bl.get_ResultCount (); i++)
	{
		vmsDownloadSmartPtr dld;
		Download_CreateInstance (dld);

		dld->pMgr->GetDownloadMgr ()->CreateByUrl (m_bl.get_Result (i), TRUE);
		vpDlds->push_back (dld);
	}

	return vpDlds;
}
开发者ID:DragonZX,项目名称:fdm2,代码行数:15,代码来源:CreateBatchDownload.cpp

示例10: OnBtdldStop

void CTorrents_Tasks::OnBtdldStop() 
{
	DLDS_LIST v;
	POSITION pos = GetFirstSelectedItemPosition ();
	while (pos)
	{
		int nItem = GetNextSelectedItem (pos);
		vmsDownloadSmartPtr dld = m_vDlds [nItem];
		if (dld->pMgr->IsRunning ())
			v.push_back (dld);
		else if (dld->bAutoStart)
		{
			dld->bAutoStart = FALSE;
			_pwndDownloads->UpdateDownload (dld);
		}
	}
	if (v.size ())
		_DldsMgr.StopDownloads (v, TRUE);	
}
开发者ID:naroya,项目名称:fdm,代码行数:19,代码来源:Torrents_Tasks.cpp

示例11: OnAdvanced

void CCreateBatchDownload::OnAdvanced() 
{
	DLDS_LIST v;
	v.push_back (m_dld);

	GetDlgItemText (IDC_URL, m_strUrl);
	fsURL url;
	
	if (url.Crack (m_strUrl) != IR_SUCCESS)
	{
		WrongUrl ();
		return;
	}

	m_dld->pMgr->GetDownloadMgr ()->GetDNP ()->enProtocol = fsSchemeToNP (url.GetInternetScheme ());

	CDownloadPropertiesSheet sheet (LS (L_ADVANCED), this);
	sheet.Init (&v, DPS_SHP_NOGENERALNOMIRR);
    _DlgMgr.OnDoModal (&sheet);
	sheet.DoModal ();
    _DlgMgr.OnEndDialog (&sheet);	
}
开发者ID:DragonZX,项目名称:fdm2,代码行数:22,代码来源:CreateBatchDownload.cpp

示例12: OnDeletedRestore

void CDownloads_Deleted::OnDeletedRestore()
{
	DLDS_LIST v;
	POSITION pos = GetFirstSelectedItemPosition ();
	while (pos)
	{
		int iItem = GetNextSelectedItem (pos);
		vmsDownloadSmartPtr dld = (fsDownload*) GetItemData (iItem);
		v.push_back (dld);
	}

	if (v.size ())
	{
		if (_pwndDownloads->Get_DWWN () == DWWN_DELETED)
			_pwndDownloads->m_wndDeleted.ShowWindow (SW_HIDE);
		try {
			_DldsMgr.RestoreDownloads (v);
		}
		catch (...) {}
		if (_pwndDownloads->Get_DWWN () == DWWN_DELETED)
			_pwndDownloads->m_wndDeleted.ShowWindow (SW_SHOW);
	}	
}
开发者ID:pedia,项目名称:raidget,代码行数:23,代码来源:downloads_deleted.cpp

示例13: Copy

void vmsDownloadList::Copy(DLDS_LIST& v)
{
	for (size_t szIndex = 0; szIndex < m_vObj.size(); szIndex++)
		v.push_back (m_vObj [szIndex]);
}
开发者ID:HackLinux,项目名称:Free-Download-Manager-vs2010,代码行数:5,代码来源:vmsPersistableListOfDownloads.cpp

示例14: ExportDownloads

void CDlgExportDownloads::ExportDownloads(int iWhich, BOOL bNoDone, BOOL bAppend)
{
    DLDS_LIST vpDlds;



    switch (iWhich)
    {
    case 0:
    {
        _DldsMgr.LockList (true);
        size_t nCount = _DldsMgr.GetCount ();
        for (size_t i = 0; i < nCount; i++)
        {
            vmsDownloadSmartPtr dld = _DldsMgr.GetDownload (i);
            if (bNoDone && dld->pMgr->IsDone ())
                continue;
            vpDlds.push_back (dld);
        }
        _DldsMgr.UnlockList (true);
    }
    break;

    case 1:
    {
        CDownloads_Tasks* list = &_pwndDownloads->m_wndDownloads.m_tasks;
        int cItems = list->GetItemCount ();
        for (int i = 0; i < cItems; i++)
        {
            vmsDownloadSmartPtr dld;

            try
            {
                dld = (fsDownload*) list->GetItemData (i);

                if (bNoDone && dld->pMgr->IsDone ())
                    dld = NULL;
            }
            catch (const std::exception& ex)
            {
                ASSERT (FALSE);
                vmsLogger::WriteLog("CDlgExportDownloads::ExportDownloads " + tstring(ex.what()));
                dld = NULL;
            }
            catch (...)
            {
                ASSERT (FALSE);
                vmsLogger::WriteLog("CDlgExportDownloads::ExportDownloads unknown exception");
                dld = NULL;
            }

            if (dld)
                vpDlds.push_back (dld);
        }
    }
    break;

    case 2:
    {
        CDownloads_Tasks* list = &_pwndDownloads->m_wndDownloads.m_tasks;
        POSITION pos = list->GetFirstSelectedItemPosition ();
        while (pos)
        {
            int iItem = list->GetNextSelectedItem (pos);
            vmsDownloadSmartPtr dld;

            try
            {
                dld = (fsDownload*) list->GetItemData (iItem);

                if (bNoDone && dld->pMgr->IsDone ())
                    dld = NULL;
            }
            catch (const std::exception& ex)
            {
                ASSERT (FALSE);
                vmsLogger::WriteLog("CDlgExportDownloads::ExportDownloads " + tstring(ex.what()));
                dld = NULL;
            }
            catch (...)
            {
                ASSERT (FALSE);
                vmsLogger::WriteLog("CDlgExportDownloads::ExportDownloads unknown exception");
                dld = NULL;
            }

            if (dld)
                vpDlds.push_back (dld);
        }
    }
    break;
    }

    if (vpDlds.empty ())
    {
        AfxGetApp ()->m_pMainWnd->MessageBox (LS (L_NODLDSTOEXPORT), NULL, MB_ICONEXCLAMATION);
    }
    else
    {
        CString strFilter;
//.........这里部分代码省略.........
开发者ID:ratever930,项目名称:freedownload,代码行数:101,代码来源:DlgExportDownloads.cpp

示例15: processDldImportedFromOrbit

void COrbitSupplier::processDldImportedFromOrbit(const TOrbitDownload& tOrbitDownload, TImportResult& tImportResult) const
{
	CImportResultGuard resultGuard(tImportResult);

	
	CString sDownloadFilePath;
	if (!retrieveDownloadFilePath(tOrbitDownload, sDownloadFilePath)) {
		return;
	}

	if (tOrbitDownload.sUrl.IsEmpty()) {
		return;
	}

	vmsDownloadSmartPtr dld;
	Download_CreateInstance (dld);

	if (FALSE == _pwndDownloads->CreateDownloadWithDefSettings (dld, tOrbitDownload.sUrl)) {
		return;
	}

	
	configureDownloadFileName(sDownloadFilePath, dld);

	if (!tOrbitDownload.bIsComplete) {

		
		ATLASSERT(false);

		
		

		
		
		
		
		
		
		

		
		

		
		
		
		
		
	} else {
		
		HANDLE hFile = CreateFile ((LPCTSTR)sDownloadFilePath, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL);
		DWORD dwSize = GetFileSize(hFile, NULL);
		CloseHandle(hFile);

		dld->pMgr->GetDownloadMgr ()->CreateCompleteDownload((UINT64)dwSize);

	}

	DLDS_LIST v;
	v.push_back (dld);
	_pwndDownloads->CreateDownloads (v, NULL);

	resultGuard.Success(true);

}
开发者ID:HackLinux,项目名称:Free-Download-Manager-vs2010,代码行数:65,代码来源:OrbitSupplier.cpp


注:本文中的DLDS_LIST::push_back方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。