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.

112 lines
2.0 KiB

  1. /*
  2. Copyright (c) 1992 Microsoft Corporation
  3. Module Name:
  4. nwtrash.h
  5. Abstract:
  6. This file defines the file network trash folder routine prototypes
  7. Author:
  8. Sue Adams (microsoft!suea)
  9. Revision History:
  10. 13 Aug 1992 Initial Version
  11. Notes: Tab stop: 4
  12. --*/
  13. #ifndef _NWTRASH_
  14. #define _NWTRASH_
  15. //
  16. // NtOpenFile/NtCreateFile values for the network trash folder
  17. //
  18. #define AFP_NWT_ACCESS FILEIO_ACCESS_DELETE
  19. #define AFP_NWT_SHAREMODE FILE_SHARE_READ | FILE_SHARE_WRITE
  20. #define AFP_NWT_OPTIONS FILEIO_OPEN_DIR
  21. #define AFP_NWT_ATTRIBS FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_HIDDEN
  22. #define AFP_NWT_DISPOSITION FILEIO_CREATE_SOFT
  23. typedef struct _WalkDirNode {
  24. BOOLEAN wdn_Enumerated;
  25. FILESYSHANDLE wdn_Handle;
  26. UNICODE_STRING wdn_RelativePath;
  27. struct _WalkDirNode *wdn_Next;
  28. } WALKDIR_NODE, *PWALKDIR_NODE;
  29. typedef NTSTATUS (*WALKDIR_WORKER)(PFILESYSHANDLE phRelative, PWCHAR Name, ULONG Namelen, BOOLEAN IsDir);
  30. extern
  31. NTSTATUS
  32. AfpCreateNetworkTrash(
  33. IN PVOLDESC pVolDesc
  34. );
  35. extern
  36. NTSTATUS
  37. AfpDeleteNetworkTrash(
  38. IN PVOLDESC pVolDesc,
  39. IN BOOLEAN VolumeStart
  40. );
  41. extern
  42. NTSTATUS
  43. AfpWalkDirectoryTree(
  44. IN PFILESYSHANDLE phTargetDir,
  45. IN WALKDIR_WORKER NodeWorker
  46. );
  47. extern
  48. NTSTATUS
  49. AfpGetNextDirectoryInfo(
  50. IN OUT PFILE_DIRECTORY_INFORMATION * ppInfoBuf,
  51. OUT PWCHAR * pNodeName,
  52. OUT PULONG pNodeNameLen,
  53. OUT PBOOLEAN pIsDir
  54. );
  55. #ifdef NWTRASH_LOCALS
  56. LOCAL
  57. NTSTATUS
  58. afpCleanNetworkTrash(
  59. IN PVOLDESC pVolDesc,
  60. IN PFILESYSHANDLE phNWT,
  61. IN PDFENTRY pDfeNWT OPTIONAL
  62. );
  63. LOCAL
  64. NTSTATUS
  65. afpPushDirNode(
  66. IN OUT PWALKDIR_NODE * ppStackTop,
  67. IN PUNICODE_STRING pParentPath, // path to parent (NULL iff walk target)
  68. IN PUNICODE_STRING pDirName // name of current directory node
  69. );
  70. LOCAL
  71. VOID
  72. afpPopDirNode(
  73. IN OUT PWALKDIR_NODE * ppStackTop
  74. );
  75. LOCAL
  76. NTSTATUS
  77. afpNwtDeleteFileEntity(
  78. IN PFILESYSHANDLE phRelative,
  79. IN PWCHAR Name,
  80. IN ULONG Namelen,
  81. IN BOOLEAN IsDir
  82. );
  83. #endif // NWTRASH_LOCALS
  84. #endif // _NWTRASH_
  85.