You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.1 KiB
38 lines
1.1 KiB
#define MAX_RETRIES 2
|
|
|
|
// a small class that handles downloading ins and building component list
|
|
class CDownloadSiteMgr : public IMyDownloadCallback, public IDownloadSiteMgr
|
|
{
|
|
public:
|
|
CDownloadSiteMgr(IUnknown **punk);
|
|
~CDownloadSiteMgr();
|
|
|
|
// IMyDownloadCallback
|
|
HRESULT OnProgress(ULONG progress, LPCSTR pszStatus);
|
|
|
|
// IUnknown
|
|
STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppvObj);
|
|
STDMETHOD_(ULONG,AddRef) (THIS);
|
|
STDMETHOD_(ULONG,Release) (THIS);
|
|
|
|
// IDownloadSiteMgr
|
|
STDMETHOD(Initialize)(THIS_ LPCSTR pszUrl, SITEQUERYPARAMS *pqp);
|
|
STDMETHOD(EnumSites)(THIS_ DWORD dwIndex, IDownloadSite **pds);
|
|
|
|
private:
|
|
DWORD m_cRef;
|
|
LPSTR m_pszUrl;
|
|
SITEQUERYPARAMS *m_pquery;
|
|
DOWNLOADSITE **m_ppdls;
|
|
UINT m_arraysize;
|
|
UINT m_numsites;
|
|
BOOL m_onegoodsite;
|
|
|
|
HRESULT ParseSiteFile(LPCSTR psz);
|
|
HRESULT AddSite(DOWNLOADSITE *);
|
|
DOWNLOADSITE *ParseAndAllocateDownloadSite(LPSTR psz);
|
|
DWORD TranslateLanguage(LPSTR szLang);
|
|
};
|
|
|
|
|
|
|