update for HEAD-2003091401
[reactos.git] / ntoskrnl / fs / notify.c
1 /* $Id$
2  *
3  * reactos/ntoskrnl/fs/notify.c
4  *
5  */
6 #include <ntos.h>
7 #include <ddk/ntifs.h>
8
9
10 /**********************************************************************
11  * NAME                                                 EXPORTED
12  *      FsRtlNotifyChangeDirectory@28
13  *
14  * DESCRIPTION
15  *      
16  * ARGUMENTS
17  *
18  * RETURN VALUE
19  *
20  * @implemented
21  */
22 VOID
23 STDCALL
24 FsRtlNotifyChangeDirectory (
25         IN      PNOTIFY_SYNC NotifySync,
26         IN      PVOID        FsContext,
27         IN      PSTRING      FullDirectoryName,
28         IN      PLIST_ENTRY  NotifyList,
29         IN      BOOLEAN      WatchTree,
30         IN      ULONG        CompletionFilter,
31         IN      PIRP         NotifyIrp
32         )
33 {
34         FsRtlNotifyFullChangeDirectory (
35                 NotifySync,
36                 NotifyList,
37                 FsContext,
38                 FullDirectoryName,
39                 WatchTree,
40                 TRUE, /* IgnoreBuffer */
41                 CompletionFilter,
42                 NotifyIrp,
43                 NULL,
44                 NULL
45                 );
46 }
47
48
49 /**********************************************************************
50  * NAME                                                 EXPORTED
51  *      FsRtlNotifyCleanup@12
52  *
53  * DESCRIPTION
54  *      
55  * ARGUMENTS
56  *
57  * RETURN VALUE
58  *
59  * @unimplemented
60  */
61 VOID
62 STDCALL
63 FsRtlNotifyCleanup (
64         IN      PNOTIFY_SYNC    NotifySync,
65         IN      PLIST_ENTRY     NotifyList,
66         IN      PVOID           FsContext
67         )
68 {
69 }
70
71
72 /**********************************************************************
73  * NAME                                                 EXPORTED
74  *      FsRtlNotifyFullChangeDirectory@40
75  *
76  * DESCRIPTION
77  *      
78  * ARGUMENTS
79  *
80  * RETURN VALUE
81  *
82  * @unimplemented
83  */
84 VOID
85 STDCALL
86 FsRtlNotifyFullChangeDirectory (
87         IN      PNOTIFY_SYNC                    NotifySync,
88         IN      PLIST_ENTRY                     NotifyList,
89         IN      PVOID                           FsContext,
90         IN      PSTRING                         FullDirectoryName,
91         IN      BOOLEAN                         WatchTree,
92         IN      BOOLEAN                         IgnoreBuffer,
93         IN      ULONG                           CompletionFilter,
94         IN      PIRP                            NotifyIrp,
95         IN      PCHECK_FOR_TRAVERSE_ACCESS      TraverseCallback        OPTIONAL,
96         IN      PSECURITY_SUBJECT_CONTEXT       SubjectContext          OPTIONAL
97         )
98 {
99         DbgPrint("%s()\n", __FUNCTION__);
100 }
101
102
103 /**********************************************************************
104  * NAME                                                 EXPORTED
105  *      FsRtlNotifyFullReportChange@36
106  *
107  * DESCRIPTION
108  *      
109  * ARGUMENTS
110  *
111  * RETURN VALUE
112  *
113  * @unimplemented
114  */
115 VOID
116 STDCALL
117 FsRtlNotifyFullReportChange (
118         IN      PNOTIFY_SYNC    NotifySync,
119         IN      PLIST_ENTRY     NotifyList,
120         IN      PSTRING         FullTargetName,
121         IN      USHORT          TargetNameOffset,
122         IN      PSTRING         StreamName              OPTIONAL,
123         IN      PSTRING         NormalizedParentName    OPTIONAL,
124         IN      ULONG           FilterMatch,
125         IN      ULONG           Action,
126         IN      PVOID           TargetContext
127         )
128 {
129 }
130
131
132 /**********************************************************************
133  * NAME                                                 EXPORTED
134  *      FsRtlNotifyInitializeSync@4
135  *
136  * DESCRIPTION
137  *      
138  * ARGUMENTS
139  *
140  * RETURN VALUE
141  *
142  * @implemented
143  */
144 VOID
145 STDCALL
146 FsRtlNotifyInitializeSync (
147     IN  PNOTIFY_SYNC *   NotifySync
148         )
149 {
150     *NotifySync = NULL;
151     *NotifySync = ExAllocatePoolWithTag (
152                         0x10,                   // PoolType???
153                         sizeof (NOTIFY_SYNC),   // NumberOfBytes = 0x28
154                         FSRTL_TAG
155                         );
156 #if 0
157     *NotifySync->Unknown0 = 1;
158     *NotifySync->Unknown2 = 0;
159     *NotifySync->Unknown3 = 1;
160     *NotifySync->Unknown4 = 4;
161     *NotifySync->Unknown5 = 0;
162     *NotifySync->Unknown9 = 0;
163     *NotifySync->Unknown10 = 0;
164 #endif
165 }
166
167
168 /**********************************************************************
169  * NAME                                                 EXPORTED
170  *      FsRtlNotifyReportChange@20
171  *
172  * DESCRIPTION
173  *      
174  * ARGUMENTS
175  *
176  * RETURN VALUE
177  *
178  * @implemented
179  */
180 VOID
181 STDCALL
182 FsRtlNotifyReportChange (
183         IN      PNOTIFY_SYNC    NotifySync,
184         IN      PLIST_ENTRY     NotifyList,
185         IN      PSTRING         FullTargetName,
186         IN      PUSHORT         FileNamePartLength,
187         IN      ULONG           FilterMatch
188         )
189 {
190         FsRtlNotifyFullReportChange (
191                 NotifySync,
192                 NotifyList,
193                 FullTargetName,
194                 (FullTargetName->Length - *FileNamePartLength), /*?*/
195                 NULL,
196                 NULL,
197                 FilterMatch,
198                 0, /* Action ? */
199                 NULL
200                 );
201 }
202
203
204 /**********************************************************************
205  * NAME                                                 EXPORTED
206  *      FsRtlNotifyUninitializeSync@4
207  *
208  * DESCRIPTION
209  *      Uninitialize a NOTIFY_SYNC object.
210  *
211  * ARGUMENTS
212  *      NotifySync is the address of a pointer
213  *      to a PNOTIFY_SYNC object previously initialized by
214  *      FsRtlNotifyInitializeSync().
215  *
216  * RETURN VALUE
217  *      None.
218  *
219  * @implemented
220  */
221 VOID
222 STDCALL
223 FsRtlNotifyUninitializeSync (
224     IN OUT  PNOTIFY_SYNC *   NotifySync
225         )
226 {
227     if (NULL != *NotifySync) 
228         {
229         ExFreePool (*NotifySync);
230         *NotifySync = NULL;
231         }
232 }
233
234 /**********************************************************************
235  * NAME                                                 EXPORTED
236  *      FsRtlNotifyVolumeEvent@8
237  *
238  * DESCRIPTION
239  *      NOTE: Only present in NT 5+.
240  *
241  * ARGUMENTS
242  *
243  * RETURN VALUE
244  *
245  * @unimplemented
246  */
247 NTSTATUS
248 STDCALL
249 FsRtlNotifyVolumeEvent (
250         IN      PFILE_OBJECT    FileObject,
251         IN      ULONG           EventCode
252         )
253 {
254         return STATUS_NOT_IMPLEMENTED;
255 }
256
257 /* EOF */