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.

136 lines
3.4 KiB

  1. //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
  2. //
  3. // bindstcb.h
  4. //
  5. // Bind status callback object.
  6. //
  7. // History:
  8. //
  9. // 3/31/97 edwardp Created.
  10. //
  11. ////////////////////////////////////////////////////////////////////////////////
  12. //
  13. // Check for previous includes of this file.
  14. //
  15. #ifndef _BINDSTCB_H_
  16. #define _BINDSTCB_H_
  17. //
  18. // Class definition for the bind status callback class.
  19. //
  20. class CBindStatusCallback : public IBindStatusCallback
  21. {
  22. //
  23. // Methods
  24. //
  25. public:
  26. // Constructor
  27. CBindStatusCallback(IXMLDocument* pIXMLDocument, LPCWSTR pszURLW);
  28. // IUnknown
  29. STDMETHODIMP QueryInterface(REFIID, void **);
  30. STDMETHODIMP_(ULONG) AddRef(void);
  31. STDMETHODIMP_(ULONG) Release(void);
  32. // IBindStatusCallback methods.
  33. STDMETHODIMP GetBindInfo(DWORD* pgrfBINDF, BINDINFO* pbindinfo);
  34. STDMETHODIMP OnStartBinding(DWORD dwReserved, IBinding* pIBinding);
  35. STDMETHODIMP GetPriority(LONG *pnPriority);
  36. STDMETHODIMP OnProgress(ULONG ulProgress,
  37. ULONG ulProgressMax,
  38. ULONG ulStatusCode,
  39. LPCWSTR szStatusText);
  40. STDMETHODIMP OnDataAvailable(DWORD grfBSCF,
  41. DWORD dwSize,
  42. FORMATETC* pfmtect,
  43. STGMEDIUM* pstgmed);
  44. STDMETHODIMP OnObjectAvailable(REFIID riid, IUnknown* pIUnknown);
  45. STDMETHODIMP OnLowResource(DWORD dwReserved);
  46. STDMETHODIMP OnStopBinding(HRESULT hrStatus, LPCWSTR szStatusText);
  47. // Helper functions.
  48. HRESULT Init(IBindStatusCallback* pPrevIBindStatusCallback);
  49. private:
  50. // Destructor.
  51. ~CBindStatusCallback(void);
  52. //
  53. // Member variables.
  54. //
  55. private:
  56. ULONG m_cRef;
  57. IXMLDocument* m_pIXMLDocument;
  58. LPTSTR m_pszURL;
  59. IBindStatusCallback* m_pPrevIBindStatusCallback;
  60. };
  61. #define DOWNLOAD_PROGRESS 0x9001
  62. #define DOWNLOAD_COMPLETE 0x9002
  63. class CBindStatusCallback2 : public IBindStatusCallback
  64. {
  65. //
  66. // Methods
  67. //
  68. public:
  69. // Constructor
  70. CBindStatusCallback2(HWND hwnd);
  71. // IUnknown
  72. STDMETHODIMP QueryInterface(REFIID, void **);
  73. STDMETHODIMP_(ULONG) AddRef(void);
  74. STDMETHODIMP_(ULONG) Release(void);
  75. // IBindStatusCallback methods.
  76. STDMETHODIMP GetBindInfo(DWORD* pgrfBINDF, BINDINFO* pbindinfo);
  77. STDMETHODIMP OnStartBinding(DWORD dwReserved, IBinding* pIBinding);
  78. STDMETHODIMP GetPriority(LONG *pnPriority);
  79. STDMETHODIMP OnProgress(ULONG ulProgress,
  80. ULONG ulProgressMax,
  81. ULONG ulStatusCode,
  82. LPCWSTR szStatusText);
  83. STDMETHODIMP OnDataAvailable(DWORD grfBSCF,
  84. DWORD dwSize,
  85. FORMATETC* pfmtect,
  86. STGMEDIUM* pstgmed);
  87. STDMETHODIMP OnObjectAvailable(REFIID riid, IUnknown* pIUnknown);
  88. STDMETHODIMP OnLowResource(DWORD dwReserved);
  89. STDMETHODIMP OnStopBinding(HRESULT hrStatus, LPCWSTR szStatusText);
  90. private:
  91. // Destructor.
  92. ~CBindStatusCallback2(void);
  93. //
  94. // Member variables.
  95. //
  96. private:
  97. ULONG m_cRef;
  98. HWND m_hwnd;
  99. };
  100. #endif _BINDSTCB_H_