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.

89 lines
2.5 KiB

  1. //=--------------------------------------------------------------------------=
  2. // Internet.H
  3. //=--------------------------------------------------------------------------=
  4. // Copyright 1995-1996 Microsoft Corporation. All Rights Reserved.
  5. //
  6. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
  7. // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
  8. // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  9. // PARTICULAR PURPOSE.
  10. //=--------------------------------------------------------------------------=
  11. //
  12. // class declaration for the URLDib2 control.
  13. //
  14. #ifndef _INTERNET_H
  15. #define _INTERNET_H
  16. #define DISPID_PROGRESS 1958
  17. #ifndef __MKTYPLIB__
  18. #include "urlmon.H"
  19. // ZZ BUGBUG: BUILD-ISSUE: changed from <ocidl.h> to this.
  20. // ZZ Also removed datapath.h as all it had was myocidl.h and enum
  21. // for the READYSTATE_ stuff.
  22. //
  23. #include "myocidl.h"
  24. #include "docobj.h" // for IServiceProvider
  25. #include "IPServer.H"
  26. #include "CtrlObj.H"
  27. class CInternetControl : public COleControl
  28. {
  29. public:
  30. CInternetControl(IUnknown * pUnkOuter,
  31. int iPrimaryDispatch,
  32. void * pMainInterface);
  33. virtual ~CInternetControl();
  34. // IUnknown methods
  35. //
  36. DECLARE_STANDARD_UNKNOWN();
  37. // Call this method to start the download of a URL. 'propId' will
  38. // be passed back to you OnData below.
  39. HRESULT SetupDownload( LPOLESTR url, DISPID propId);
  40. // Derived classes implement this method. It will be called when
  41. // data has arrived for a given dispid.
  42. virtual HRESULT OnData( DISPID id, DWORD grfBSCF,
  43. IStream * bitstrm, DWORD amount );
  44. // Derived classes can implement this method. It will be
  45. // called at various times during the download.
  46. virtual HRESULT OnProgress( DISPID id, ULONG ulProgress,
  47. ULONG ulProgressMax,
  48. ULONG ulStatusCode,
  49. LPCWSTR pwzStatusText);
  50. // Call this method to turn a URL into a Moniker.
  51. HRESULT GetAMoniker( LPOLESTR url, IMoniker ** );
  52. HRESULT FireReadyStateChange( long newState );
  53. HRESULT FireProgress( ULONG dwAmount );
  54. // Override base class implementation...
  55. virtual HRESULT InternalQueryInterface(REFIID, void **);
  56. protected:
  57. HRESULT GetBindHost();
  58. IBindHost * m_host;
  59. long m_readyState;
  60. // BUGBUG: We should track all the downloads
  61. };
  62. #endif __MKTYPLIB__
  63. #endif _INTERNET_H