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.

103 lines
2.2 KiB

  1. /******************************************************************************
  2. *
  3. * Copyright (c) 1999 Microsoft Corporation
  4. *
  5. * Module Name:
  6. * RestMap.h
  7. *
  8. * Abstract:
  9. * This file code for RestMap.
  10. *
  11. * Revision History:
  12. * Kanwaljit S Marok ( kmarok ) 05/17/99
  13. * created
  14. *
  15. *****************************************************************************/
  16. #ifndef _RESTMAP_H_
  17. #define _RESTMAP_H_
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. #include "srapi.h"
  22. #define OPR_FILE_DELETE SrEventFileDelete
  23. #define OPR_FILE_RENAME SrEventFileRename
  24. #define OPR_FILE_ADD SrEventFileCreate
  25. #define OPR_FILE_MODIFY SrEventStreamOverwrite
  26. #define OPR_DIR_DELETE SrEventDirectoryDelete
  27. #define OPR_DIR_CREATE SrEventDirectoryCreate
  28. #define OPR_DIR_RENAME SrEventDirectoryRename
  29. #define OPR_SETATTRIB SrEventAttribChange
  30. #define OPR_UNKNOWN SrEventInvalid
  31. #define OPR_SETACL SrEventAclChange
  32. #define IsRename(a) (a == OPR_FILE_RENAME || a == OPR_DIR_RENAME)
  33. #pragma pack(push, vxdlog_include)
  34. #pragma pack(1)
  35. //
  36. // Structure of Restore Map Entry
  37. //
  38. typedef struct RESTORE_MAP_ENTRY
  39. {
  40. DWORD m_dwSize; // Size of Vxd Log Entry
  41. DWORD m_dwOperation ; // Operation to be performed
  42. DWORD m_dwAttribute ; // Attributes
  43. DWORD m_cbAcl; // if acl op, then size of acl
  44. BOOL m_fAclInline; // whether acl is inline or in file
  45. BYTE m_bData [ 1 ]; // pSrc / pTemp / pDest / pAcl
  46. } RestoreMapEntry;
  47. #pragma pack()
  48. //
  49. // Function Prototypes
  50. //
  51. DWORD
  52. CreateRestoreMap(
  53. LPWSTR pszDrive,
  54. DWORD dwRPNum,
  55. HANDLE hFile
  56. );
  57. BOOL
  58. AppendRestoreMapEntry(
  59. HANDLE hFile,
  60. DWORD dwOperation,
  61. DWORD dwAttribute,
  62. LPWSTR pTmpFile,
  63. LPWSTR pPathSrc,
  64. LPWSTR pPathDes,
  65. BYTE* pbAcl,
  66. DWORD cbAcl,
  67. BOOL fAclInline);
  68. DWORD
  69. ReadRestoreMapEntry(
  70. HANDLE hFile,
  71. RestoreMapEntry **pprme);
  72. PVOID
  73. GetOptional(
  74. RestoreMapEntry *prme);
  75. void
  76. FreeRestoreMapEntry(
  77. RestoreMapEntry *prme);
  78. #ifdef __cplusplus
  79. }
  80. #endif
  81. #endif // _RESTOREMAP_H_