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.

84 lines
2.1 KiB

  1. /*
  2. * b a s e m h t . c p p
  3. *
  4. * Purpose:
  5. * Base classes for MHTML packer objects
  6. *
  7. * History
  8. * October 1998: brettm - created
  9. *
  10. * Copyright (C) Microsoft Corp. 1995, 1996.
  11. */
  12. #ifndef _BASEMHT_H_
  13. #define _BASEMHT_H_
  14. class CBaseTag :
  15. public IMimeEditTag
  16. {
  17. public:
  18. CBaseTag();
  19. virtual ~CBaseTag();
  20. virtual ULONG STDMETHODCALLTYPE AddRef();
  21. virtual ULONG STDMETHODCALLTYPE Release();
  22. virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID, LPVOID FAR *);
  23. virtual HRESULT STDMETHODCALLTYPE GetSrc(BSTR *pbstr);
  24. virtual HRESULT STDMETHODCALLTYPE SetSrc(BSTR bstr);
  25. virtual HRESULT STDMETHODCALLTYPE GetDest(BSTR *pbstr);
  26. virtual HRESULT STDMETHODCALLTYPE SetDest(BSTR bstr);
  27. virtual HRESULT STDMETHODCALLTYPE OnPreSave();
  28. virtual HRESULT STDMETHODCALLTYPE OnPostSave();
  29. virtual HRESULT STDMETHODCALLTYPE CanPackage();
  30. virtual HRESULT STDMETHODCALLTYPE IsValidMimeType(LPWSTR pszTypeW);
  31. virtual HRESULT Init(IHTMLElement *pElem);
  32. protected:
  33. ULONG m_cRef;
  34. IHTMLElement *m_pElem;
  35. BSTR m_bstrDest,
  36. m_bstrSrc;
  37. };
  38. class CBaseTagCollection :
  39. public IMimeEditTagCollection
  40. {
  41. public:
  42. CBaseTagCollection();
  43. virtual ~CBaseTagCollection();
  44. virtual ULONG STDMETHODCALLTYPE AddRef();
  45. virtual ULONG STDMETHODCALLTYPE Release();
  46. virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID, LPVOID FAR *);
  47. virtual HRESULT STDMETHODCALLTYPE Init(IUnknown *pUnk);
  48. virtual HRESULT STDMETHODCALLTYPE Next(ULONG cFetch, IMimeEditTag **ppTag, ULONG *pcFetched);
  49. virtual HRESULT STDMETHODCALLTYPE Reset();
  50. virtual HRESULT STDMETHODCALLTYPE Count(ULONG *pcItems);
  51. protected:
  52. ULONG m_cRef,
  53. m_cTags,
  54. m_uEnum;
  55. IMimeEditTag **m_rgpTags;
  56. virtual HRESULT _BuildCollection(IHTMLDocument2 *pDoc) PURE;
  57. virtual HRESULT _FreeCollection();
  58. };
  59. #endif //_BASEMHT_H_