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.

133 lines
4.1 KiB

  1. //+--------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1992.
  5. //
  6. // File: pdocfile.hxx
  7. //
  8. // Contents: DocFile protocol header
  9. //
  10. // Classes: PDocFile
  11. //
  12. // History: 08-Jan-92 DrewB Created
  13. //
  14. //---------------------------------------------------------------
  15. #ifndef __PDOCFILE_HXX__
  16. #define __PDOCFILE_HXX__
  17. #include <dfmsp.hxx>
  18. #include <entry.hxx>
  19. class CDocFile;
  20. class PDocFileIterator;
  21. class PSStream;
  22. class CUpdate;
  23. class CUpdateList;
  24. class CWrappedDocFile;
  25. // CopyDocFileToDocFile flags
  26. #define CDF_NORMAL 0 // Normal copy
  27. #define CDF_EXACT 1 // Exact dir entry match
  28. #define CDF_REMAP 2 // Remap handles
  29. #define CDF_ENTRIESONLY 4 // Don't copy contents
  30. //+--------------------------------------------------------------
  31. //
  32. // Class: PDocFile (df)
  33. //
  34. // Purpose: DocFile protocol
  35. //
  36. // Interface: See below
  37. //
  38. // History: 08-Jan-92 DrewB Created
  39. //
  40. //---------------------------------------------------------------
  41. class PDocFile : public PTimeEntry
  42. {
  43. public:
  44. SCODE DestroyEntry(CDfName const *pdfnName,
  45. BOOL fClean);
  46. SCODE RenameEntry(CDfName const *pdfnName,
  47. CDfName const *pdfnNewName);
  48. SCODE GetClass(CLSID *pclsid);
  49. SCODE SetClass(REFCLSID clsid);
  50. SCODE GetStateBits(DWORD *pgrfStateBits);
  51. SCODE SetStateBits(DWORD grfStateBits, DWORD grfMask);
  52. SCODE CreateDocFile(CDfName const *pdfnName,
  53. DFLAGS const df,
  54. DFLUID luidSet,
  55. PDocFile **ppdfDocFile);
  56. inline SCODE CreateDocFile(CDfName const *pdfnName,
  57. DFLAGS const df,
  58. DFLUID luidSet,
  59. DWORD const dwType,
  60. PDocFile **ppdfDocFile)
  61. { return CreateDocFile(pdfnName, df, luidSet, ppdfDocFile); }
  62. SCODE GetDocFile(CDfName const *pdfnName,
  63. DFLAGS const df,
  64. PDocFile **ppdfDocFile);
  65. inline SCODE GetDocFile(CDfName const *pdfnName,
  66. DFLAGS const df,
  67. DWORD const dwType,
  68. PDocFile **ppdfDocFile)
  69. { return GetDocFile(pdfnName, df, ppdfDocFile); }
  70. SCODE CreateStream(CDfName const *pdfnName,
  71. DFLAGS const df,
  72. DFLUID luidSet,
  73. PSStream **ppsstStream);
  74. inline SCODE CreateStream(CDfName const *pdfnName,
  75. DFLAGS const df,
  76. DFLUID luidSet,
  77. DWORD const dwType,
  78. PSStream **ppsstStream)
  79. { return CreateStream(pdfnName, df, luidSet, ppsstStream); }
  80. SCODE GetStream(CDfName const *pdfnName,
  81. DFLAGS const df,
  82. PSStream **ppsstStream);
  83. inline SCODE GetStream(CDfName const *pdfnName,
  84. DFLAGS const df,
  85. DWORD const dwType,
  86. PSStream **ppsstStream)
  87. { return GetStream(pdfnName, df, ppsstStream); }
  88. SCODE FindGreaterEntry(CDfName const *pdfnKey,
  89. SIterBuffer *pib,
  90. STATSTGW *pstat);
  91. SCODE StatEntry(CDfName const *pdfn,
  92. SIterBuffer *pib,
  93. STATSTGW *pstat);
  94. SCODE BeginCommitFromChild(CUpdateList &ulChanged,
  95. DWORD const dwFlags,
  96. CWrappedDocFile *pdfChild);
  97. void EndCommitFromChild(DFLAGS const df,
  98. CWrappedDocFile *pdfChild);
  99. SCODE IsEntry(CDfName const *pdfnName,
  100. SEntryBuffer *peb);
  101. SCODE DeleteContents(void);
  102. static SCODE ExcludeEntries(PDocFile *pdf, SNBW snbExclude);
  103. static SCODE CreateFromUpdate(CUpdate *pud,
  104. PDocFile *pdf,
  105. DFLAGS df);
  106. protected:
  107. inline PDocFile(DFLUID dl);
  108. };
  109. SAFE_DFBASED_PTR(CBasedDocFilePtr, PDocFile);
  110. inline PDocFile::PDocFile(DFLUID dl)
  111. : PTimeEntry(dl)
  112. {
  113. }
  114. #endif // __PDOCFILE_HXX__