Source code of Windows XP (NT5)
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.

81 lines
2.2 KiB

  1. // MSAAAdapter.h : Declaration of the CAccServerDocMgr
  2. #ifndef __MSAAADAPTER_H_
  3. #define __MSAAADAPTER_H_
  4. #include "resource.h" // main symbols
  5. #include <list_dl.h>
  6. /////////////////////////////////////////////////////////////////////////////
  7. // CAccServerDocMgr
  8. struct ITextStoreAnchor; // fwd. decl.
  9. struct IAccStore; // fwd. decl.
  10. class ATL_NO_VTABLE CAccServerDocMgr :
  11. public CComObjectRootEx<CComSingleThreadModel>,
  12. public CComCoClass<CAccServerDocMgr, &CLSID_AccServerDocMgr>,
  13. public IAccServerDocMgr
  14. {
  15. public:
  16. DECLARE_REGISTRY_RESOURCEID(IDR_ACCSERVERDOCMGR)
  17. DECLARE_PROTECT_FINAL_CONSTRUCT()
  18. BEGIN_COM_MAP(CAccServerDocMgr)
  19. COM_INTERFACE_ENTRY(IAccServerDocMgr)
  20. END_COM_MAP()
  21. CAccServerDocMgr();
  22. ~CAccServerDocMgr();
  23. // IAccServerDocMgr
  24. HRESULT STDMETHODCALLTYPE NewDocument (
  25. REFIID riid,
  26. IUnknown * punk
  27. );
  28. HRESULT STDMETHODCALLTYPE RevokeDocument (
  29. IUnknown * punk
  30. );
  31. HRESULT STDMETHODCALLTYPE OnDocumentFocus (
  32. IUnknown * punk
  33. );
  34. private:
  35. struct DocAssoc: public Link_dl< DocAssoc >
  36. {
  37. IUnknown * m_pdocOrig; // original doc interface
  38. IUnknown * m_pdocAnchor; // wrapped anchor
  39. // How are pdocOrig and pdocAnchor related?
  40. //
  41. // pdocOrig is the canonical IUnknown of the original doc ptr passed in to NewDocument.
  42. //
  43. // pdocAnchor is a wrapped version of the original doc ptr passed in.
  44. //
  45. // - if the original doc is ACP, an ACP->Anchor wrap layer is applied.
  46. // (this shouldn't be used much, since Cicero hand us pre-wrapped IAnchor interfaces.)
  47. //
  48. // - if the original doc doesn't support multiple clients (via IClonableWrapper),
  49. // a multi-client wrap layer is applied.
  50. //
  51. // If the passed in anchor supports IAnchor and IClonableWrapper (which is the
  52. // usual case when we get a doc from Cicero - it does the ACP wrapping, and uses
  53. // the DocWrap to allow it to share it with MSAA), then no further wrapping will
  54. // be applied.
  55. };
  56. List_dl< DocAssoc > m_Docs;
  57. IAccStore * m_pAccStore;
  58. };
  59. #endif //__MSAAADAPTER_H_