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.

94 lines
3.5 KiB

  1. /******************************************************************************
  2. Copyright (c) 1999-2001 Microsoft Corporation
  3. Module Name:
  4. MPC_html2.h
  5. Abstract:
  6. This file contains the declaration of various functions and classes
  7. designed to help the handling of HTML elements.
  8. Revision History:
  9. Davide Massarenti (Dmassare) 18/03/2001
  10. created
  11. ******************************************************************************/
  12. #if !defined(__INCLUDED___MPC___HTML2_H___)
  13. #define __INCLUDED___MPC___HTML2_H___
  14. #include <MPC_html.h>
  15. /////////////////////////////////////////////////////////////////////////
  16. namespace MPC
  17. {
  18. namespace HTML
  19. {
  20. HRESULT OpenStream ( /*[in]*/ LPCWSTR szBaseURL, /*[in]*/ LPCWSTR szRelativeURL, /*[out]*/ CComPtr<IStream>& stream );
  21. HRESULT DownloadBitmap( /*[in]*/ LPCWSTR szBaseURL, /*[in]*/ LPCWSTR szRelativeURL, /*[in]*/ COLORREF crMask, /*[out]*/ HBITMAP& hbm );
  22. }; // namespace HTML
  23. }; // namespace MPC
  24. /////////////////////////////////////////////////////////////////////////
  25. class ATL_NO_VTABLE CPCHTextHelpers : // Hungarian: pchth
  26. public CComObjectRootEx<MPC::CComSafeMultiThreadModel>,
  27. public IDispatchImpl<IPCHTextHelpers, &IID_IPCHTextHelpers, &LIBID_HelpCenterTypeLib>
  28. {
  29. public:
  30. BEGIN_COM_MAP(CPCHTextHelpers)
  31. COM_INTERFACE_ENTRY(IDispatch)
  32. COM_INTERFACE_ENTRY(IPCHTextHelpers)
  33. END_COM_MAP()
  34. ////////////////////////////////////////////////////////////////////////////////
  35. public:
  36. // IPCHTextHelpers
  37. STDMETHOD(QuoteEscape)( /*[in]*/ BSTR bstrText, /*[in,optional]*/ VARIANT vQuote , /*[out, retval]*/ BSTR *pVal );
  38. STDMETHOD(URLUnescape)( /*[in]*/ BSTR bstrText, /*[in,optional]*/ VARIANT vAsQueryString, /*[out, retval]*/ BSTR *pVal );
  39. STDMETHOD(URLEscape )( /*[in]*/ BSTR bstrText, /*[in,optional]*/ VARIANT vAsQueryString, /*[out, retval]*/ BSTR *pVal );
  40. STDMETHOD(HTMLEscape )( /*[in]*/ BSTR bstrText, /*[out, retval]*/ BSTR *pVal );
  41. STDMETHOD(ParseURL )( /*[in]*/ BSTR bstrURL, /*[out, retval]*/ IPCHParsedURL* *pVal );
  42. STDMETHOD(GetLCIDDisplayString)( /*[in]*/ long lLCID , /*[out, retval]*/ BSTR *pVal );
  43. };
  44. class ATL_NO_VTABLE CPCHParsedURL : // Hungarian: pchpu
  45. public CComObjectRootEx<MPC::CComSafeMultiThreadModel>,
  46. public IDispatchImpl<IPCHParsedURL, &IID_IPCHParsedURL, &LIBID_HelpCenterTypeLib>
  47. {
  48. MPC::wstring m_strBaseURL;
  49. MPC::WStringLookup m_mapQuery;
  50. public:
  51. BEGIN_COM_MAP(CPCHParsedURL)
  52. COM_INTERFACE_ENTRY(IDispatch)
  53. COM_INTERFACE_ENTRY(IPCHParsedURL)
  54. END_COM_MAP()
  55. HRESULT Initialize( /*[in]*/ LPCWSTR szURL );
  56. ////////////////////////////////////////////////////////////////////////////////
  57. public:
  58. // IPCHParsedURL
  59. STDMETHOD(get_BasePart )( /*[out, retval]*/ BSTR * pVal );
  60. STDMETHOD(put_BasePart )( /*[in ]*/ BSTR newVal );
  61. STDMETHOD(get_QueryParameters)( /*[out, retval]*/ VARIANT * pVal );
  62. STDMETHOD(GetQueryParameter )( /*[in]*/ BSTR bstrName, /*[out, retval]*/ VARIANT* pvValue );
  63. STDMETHOD(SetQueryParameter )( /*[in]*/ BSTR bstrName, /*[in ]*/ BSTR bstrValue );
  64. STDMETHOD(DeleteQueryParameter)( /*[in]*/ BSTR bstrName );
  65. STDMETHOD(BuildFullURL)( /*[out, retval]*/ BSTR *pVal );
  66. };
  67. ////////////////////////////////////////////////////////////////////////////////
  68. #endif // !defined(__INCLUDED___MPC___HTML2_H___)