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.

210 lines
5.5 KiB

  1. /*
  2. * _ F S M V C P Y . H
  3. *
  4. * Sources for directory iteration object
  5. *
  6. * Copyright 1986-1997 Microsoft Corporation, All Rights Reserved
  7. */
  8. #ifndef __FSMVCPY_H_
  9. #define __FSMVCPY_H_
  10. #include <xemit.h>
  11. // Metabase operations -------------------------------------------------------
  12. //
  13. // class CAccessMetaOp -------------------------------------------------------
  14. //
  15. class CAccessMetaOp : public CMetaOp
  16. {
  17. enum { DONT_INHERIT = 0 };
  18. DWORD m_dwAcc;
  19. BOOL m_fAccessBlocked;
  20. // non-implemented
  21. //
  22. CAccessMetaOp& operator=( const CAccessMetaOp& );
  23. CAccessMetaOp( const CAccessMetaOp& );
  24. protected:
  25. // Subclass' operation to perform for each node where
  26. // a value is explicitly set.
  27. //
  28. virtual SCODE __fastcall ScOp(LPCWSTR pwszMbPath, UINT cch);
  29. public:
  30. virtual ~CAccessMetaOp() {}
  31. CAccessMetaOp (const LPMETHUTIL pmu, LPCWSTR pwszPath, DWORD dwAcc)
  32. : CMetaOp (pmu->GetEcb(), pwszPath, MD_ACCESS_PERM, DWORD_METADATA, FALSE),
  33. m_dwAcc(dwAcc),
  34. m_fAccessBlocked(FALSE)
  35. {
  36. }
  37. // If FAccessBlocked() returns true, the operation must
  38. // check the access directly on all resources that the
  39. // operation wishes to process
  40. //
  41. BOOL __fastcall FAccessBlocked() const { return m_fAccessBlocked; }
  42. };
  43. // class CAuthMetaOp -------------------------------------------------------
  44. //
  45. class CAuthMetaOp : public CMetaOp
  46. {
  47. enum { DONT_INHERIT = 0 };
  48. DWORD m_dwAuth;
  49. BOOL m_fAccessBlocked;
  50. // non-implemented
  51. //
  52. CAuthMetaOp& operator=( const CAuthMetaOp& );
  53. CAuthMetaOp( const CAuthMetaOp& );
  54. protected:
  55. // Subclass' operation to perform for each node where
  56. // a value is explicitly set.
  57. //
  58. virtual SCODE __fastcall ScOp(LPCWSTR pwszMbPath, UINT cch);
  59. public:
  60. virtual ~CAuthMetaOp() {}
  61. CAuthMetaOp (const LPMETHUTIL pmu, LPCWSTR pwszPath, DWORD dwAuth)
  62. : CMetaOp (pmu->GetEcb(), pwszPath, MD_AUTHORIZATION, DWORD_METADATA, FALSE),
  63. m_dwAuth(dwAuth),
  64. m_fAccessBlocked(FALSE)
  65. {
  66. }
  67. // If FAccessBlocked() returns true, the operation must
  68. // check the access directly on all resources that the
  69. // operation wishes to process
  70. //
  71. BOOL __fastcall FAccessBlocked() const { return m_fAccessBlocked; }
  72. };
  73. // class CIPRestrictionMetaOp ------------------------------------------------
  74. //
  75. class CIPRestrictionMetaOp : public CMetaOp
  76. {
  77. enum { DONT_INHERIT = 0 };
  78. BOOL m_fAccessBlocked;
  79. // non-implemented
  80. //
  81. CIPRestrictionMetaOp& operator=( const CIPRestrictionMetaOp& );
  82. CIPRestrictionMetaOp( const CIPRestrictionMetaOp& );
  83. protected:
  84. // Subclass' operation to perform for each node where
  85. // a value is explicitly set.
  86. //
  87. virtual SCODE __fastcall ScOp(LPCWSTR pwszMbPath, UINT cch);
  88. public:
  89. virtual ~CIPRestrictionMetaOp() {}
  90. CIPRestrictionMetaOp (const LPMETHUTIL pmu, LPCWSTR pwszPath)
  91. : CMetaOp (pmu->GetEcb(), pwszPath, MD_IP_SEC, BINARY_METADATA, FALSE),
  92. m_fAccessBlocked(FALSE)
  93. {
  94. }
  95. // If FAccessBlocked() returns true, the operation must
  96. // check the access directly on all resources that the
  97. // operation wishes to process
  98. //
  99. BOOL __fastcall FAccessBlocked() const { return m_fAccessBlocked; }
  100. };
  101. // class CContentTypeMetaOp --------------------------------------------------
  102. //
  103. class CContentTypeMetaOp : public CMetaOp
  104. {
  105. enum { DONT_INHERIT = 0 };
  106. LPCWSTR m_pwszDestPath;
  107. BOOL m_fDelete;
  108. // non-implemented
  109. //
  110. CContentTypeMetaOp& operator=( const CContentTypeMetaOp& );
  111. CContentTypeMetaOp( const CContentTypeMetaOp& );
  112. protected:
  113. // Subclass' operation to perform for each node where
  114. // a value is explicitly set.
  115. //
  116. virtual SCODE __fastcall ScOp(LPCWSTR pwszMbPath, UINT cch);
  117. public:
  118. virtual ~CContentTypeMetaOp() {}
  119. CContentTypeMetaOp (const LPMETHUTIL pmu, LPCWSTR pwszSrcPath, LPCWSTR pwszDestPath, BOOL fDelete)
  120. : CMetaOp (pmu->GetEcb(), pwszSrcPath, MD_MIME_MAP, MULTISZ_METADATA, fDelete),
  121. m_pwszDestPath(pwszDestPath),
  122. m_fDelete(fDelete)
  123. {
  124. }
  125. };
  126. // Helper functions
  127. //
  128. // XML Error construction helpers ------------------------------------------------
  129. //
  130. SCODE ScAddMulti (
  131. /* [in] */ CXMLEmitter& emitter,
  132. /* [in] */ IMethUtil * pmu,
  133. /* [in] */ LPCWSTR pwszPath,
  134. /* [in] */ LPCWSTR pwszErr,
  135. /* [in] */ ULONG hsc,
  136. /* [in] */ BOOL fCollection = FALSE,
  137. /* [in] */ CVRoot* pcvrTrans = NULL);
  138. // Access --------------------------------------------------------------------
  139. //
  140. SCODE __fastcall
  141. ScCheckMoveCopyDeleteAccess (
  142. /* [in] */ IMethUtil* pmu,
  143. /* [in] */ LPCWSTR pwszUrl,
  144. /* [in] */ CVRoot* pcvr,
  145. /* [in] */ BOOL fDirectory,
  146. /* [in] */ BOOL fCheckScriptmaps,
  147. /* [in] */ DWORD dwAccess,
  148. /* [out] */ SCODE* pscItem,
  149. /* [in] */ CXMLEmitter& msr);
  150. // Delete --------------------------------------------------------------------
  151. //
  152. SCODE
  153. ScDeleteDirectoryAndChildren (
  154. /* [in] */ IMethUtil* pmu,
  155. /* [in] */ LPCWSTR pwszUrl,
  156. /* [in] */ LPCWSTR pwszPath,
  157. /* [in] */ BOOL fCheckAccess,
  158. /* [in] */ DWORD dwAcc,
  159. /* [in] */ LONG lDepth,
  160. /* [in] */ CXMLEmitter& msr,
  161. /* [in] */ CVRoot* pcvrTranslate,
  162. /* [out] */ BOOL* pfDeleted,
  163. /* [in] */ CParseLockTokenHeader* plth, // Usually NULL -- no locktokens to worry about
  164. /* [in] */ BOOL fDeleteLocks); // Normally FALSE -- don't drop locks
  165. // MoveCopy ------------------------------------------------------------------
  166. //
  167. void MoveCopyResource (
  168. /* [in] */ IMethUtil* pmu,
  169. /* [in] */ DWORD dwAccRequired,
  170. /* [in] */ BOOL fDeleteSrc);
  171. #endif // __FSMVCPY_H_