Leaked source code of windows server 2003
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

  1. #define MAX_RETRIES 2
  2. // a small class that handles downloading ins and building component list
  3. class CDownloadSiteMgr : public IMyDownloadCallback, public IDownloadSiteMgr
  4. {
  5. public:
  6. CDownloadSiteMgr(IUnknown **punk);
  7. ~CDownloadSiteMgr();
  8. // IMyDownloadCallback
  9. HRESULT OnProgress(ULONG progress, LPCSTR pszStatus);
  10. // IUnknown
  11. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppvObj);
  12. STDMETHOD_(ULONG,AddRef) (THIS);
  13. STDMETHOD_(ULONG,Release) (THIS);
  14. // IDownloadSiteMgr
  15. STDMETHOD(Initialize)(THIS_ LPCSTR pszUrl, SITEQUERYPARAMS *pqp);
  16. STDMETHOD(EnumSites)(THIS_ DWORD dwIndex, IDownloadSite **pds);
  17. private:
  18. DWORD m_cRef;
  19. LPSTR m_pszUrl;
  20. SITEQUERYPARAMS *m_pquery;
  21. DOWNLOADSITE **m_ppdls;
  22. UINT m_arraysize;
  23. UINT m_numsites;
  24. BOOL m_onegoodsite;
  25. HRESULT ParseSiteFile(LPCSTR psz);
  26. HRESULT AddSite(DOWNLOADSITE *);
  27. DOWNLOADSITE *ParseAndAllocateDownloadSite(LPSTR psz);
  28. DWORD TranslateLanguage(LPSTR szLang);
  29. };