00001 /* 00002 Free Download Manager Copyright (c) 2003-2007 FreeDownloadManager.ORG 00003 Open Download Manager Copyright (c) 2008-2010 OpenDownloadManager.ORG 00004 */ 00005 00006 #include "stdafx.h" 00007 #include "FdmApp.h" 00008 #include "FDMDownload.h" 00009 00010 STDMETHODIMP CFDMDownload::get_Url(BSTR *pVal) 00011 { 00012 USES_CONVERSION; 00013 *pVal = SysAllocString (A2W (m_strUrl)); 00014 return S_OK; 00015 } 00016 00017 STDMETHODIMP CFDMDownload::put_Url(BSTR newVal) 00018 { 00019 USES_CONVERSION; 00020 m_strUrl = W2A (newVal); 00021 return S_OK; 00022 } 00023 00024 void CFDMDownload::ReadFromDownload(vmsDownloadSmartPtr dld) 00025 { 00026 m_strUrl = dld->pMgr->get_URL (); 00027 00028 for (int i = 0; i < 6; i++) 00029 m_astrDldTexts [i] = CDownloads_Tasks::GetDownloadText (dld, i); 00030 } 00031 00032 STDMETHODIMP CFDMDownload::get_DownloadText(long nTextIndex, BSTR *pVal) 00033 { 00034 if (nTextIndex < 0 || nTextIndex > 5) 00035 return E_INVALIDARG; 00036 00037 USES_CONVERSION; 00038 *pVal = SysAllocString (A2W (m_astrDldTexts [nTextIndex])); 00039 00040 return S_OK; 00041 }
1.5.6