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.

123 lines
3.4 KiB

  1. // Warehse.h -- Header information for the CWarehouse class
  2. #ifndef __WAREHSE_H__
  3. #define __WAREHSE_H__
  4. class CWarehouse : public CITUnknown
  5. {
  6. public:
  7. // Creator:
  8. static HRESULT STDMETHODCALLTYPE Create(IUnknown *punkOuter, REFIID riid, PPVOID ppv);
  9. // Destructor:
  10. ~CWarehouse(void);
  11. private:
  12. // Constructor:
  13. CWarehouse(IUnknown *punkOuter);
  14. class CImpIWarehouse : public IITITStorageEx
  15. {
  16. public:
  17. CImpIWarehouse(CWarehouse *pBackObj, IUnknown *punkOuter);
  18. ~CImpIWarehouse(void);
  19. // Initialing method:
  20. STDMETHODIMP Init();
  21. // IITStorage methods:
  22. STDMETHODIMP StgCreateDocfile
  23. (const WCHAR * pwcsName, DWORD grfMode,
  24. DWORD reserved, IStorage ** ppstgOpen
  25. );
  26. STDMETHODIMP StgCreateDocfileOnILockBytes
  27. (ILockBytes * plkbyt, DWORD grfMode,
  28. DWORD reserved, IStorage ** ppstgOpen
  29. );
  30. STDMETHODIMP StgIsStorageFile(const WCHAR * pwcsName);
  31. STDMETHODIMP StgIsStorageILockBytes(ILockBytes * plkbyt);
  32. STDMETHODIMP StgOpenStorage
  33. (const WCHAR * pwcsName, IStorage * pstgPriority,
  34. DWORD grfMode, SNB snbExclude, DWORD reserved,
  35. IStorage ** ppstgOpen
  36. );
  37. STDMETHODIMP StgOpenStorageOnILockBytes
  38. (ILockBytes * plkbyt, IStorage * pStgPriority,
  39. DWORD grfMode, SNB snbExclude, DWORD reserved,
  40. IStorage ** ppstgOpen
  41. );
  42. STDMETHODIMP StgSetTimes
  43. (WCHAR const * lpszName, FILETIME const * pctime,
  44. FILETIME const * patime, FILETIME const * pmtime
  45. );
  46. STDMETHODIMP SetControlData(PITS_Control_Data pControlData);
  47. STDMETHODIMP DefaultControlData(PITS_Control_Data *ppControlData);
  48. STDMETHODIMP Compact(const WCHAR * pwcsName, ECompactionLev iLev);
  49. // ITStorageEx methods:
  50. STDMETHODIMP StgCreateDocfileForLocale
  51. (const WCHAR * pwcsName, DWORD grfMode, DWORD reserved, LCID lcid,
  52. IStorage ** ppstgOpen
  53. );
  54. STDMETHODIMP StgCreateDocfileForLocaleOnILockBytes
  55. (ILockBytes * plkbyt, DWORD grfMode, DWORD reserved, LCID lcid,
  56. IStorage ** ppstgOpen
  57. );
  58. STDMETHODIMP QueryFileStampAndLocale(const WCHAR *pwcsName, DWORD *pFileStamp,
  59. DWORD *pFileLocale);
  60. STDMETHODIMP QueryLockByteStampAndLocale(ILockBytes * plkbyt, DWORD *pFileStamp,
  61. DWORD *pFileLocale);
  62. private:
  63. ITS_Control_Data *m_pITSCD;
  64. };
  65. CImpIWarehouse m_ImpIWarehouse;
  66. };
  67. typedef CWarehouse *PCWarehouse;
  68. extern GUID aIID_CITStorage[];
  69. extern UINT cInterfaces_CITStorage;
  70. inline CWarehouse::CWarehouse(IUnknown *pUnkOuter)
  71. : m_ImpIWarehouse(this, pUnkOuter),
  72. CITUnknown(aIID_CITStorage, cInterfaces_CITStorage, (IUnknown *) &m_ImpIWarehouse)
  73. {
  74. }
  75. inline CWarehouse::~CWarehouse(void)
  76. {
  77. }
  78. inline STDMETHODIMP CWarehouse::CImpIWarehouse::Init()
  79. {
  80. return NO_ERROR;
  81. }
  82. #endif // __WAREHSE_H__