Revert 45697:
[reactos.git] / lib / recyclebin / recyclebin_v5.h
1 /* Recycle bin management
2 * This file is under the GPLv2 licence
3 * Copyright (C) 2006 Hervé Poussineau <hpoussin@reactos.org>
4 */
5
6 #include "recyclebin_private.h"
7
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11
12 #include <pshpack1.h>
13
14 /* MS Windows 2000/XP/2003 */
15 typedef struct _DELETED_FILE_RECORD
16 {
17 CHAR FileNameA[MAX_PATH];
18 DWORD dwRecordUniqueId;
19 DWORD dwDriveNumber;
20 FILETIME DeletionTime;
21 DWORD dwPhysicalFileSize;
22 WCHAR FileNameW[MAX_PATH];
23 } DELETED_FILE_RECORD, *PDELETED_FILE_RECORD;
24
25 #include <poppack.h>
26
27 /* COM interface */
28
29 typedef interface IRecycleBin5 IRecycleBin5;
30 EXTERN_C const IID IID_IRecycleBin5;
31
32 typedef struct IRecycleBin5Vtbl
33 {
34 /* IRecycleBin interface */
35 HRESULT (STDMETHODCALLTYPE *QueryInterface)(
36 IN IRecycleBin5 *This,
37 IN REFIID riid,
38 OUT void **ppvObject);
39
40 ULONG (STDMETHODCALLTYPE *AddRef)(
41 IN IRecycleBin5 *This);
42
43 ULONG (STDMETHODCALLTYPE *Release)(
44 IN IRecycleBin5 *This);
45
46 HRESULT (STDMETHODCALLTYPE *DeleteFile)(
47 IN IRecycleBin5 *This,
48 IN LPCWSTR szFileName);
49
50 HRESULT (STDMETHODCALLTYPE *EmptyRecycleBin)(
51 IN IRecycleBin5 *This);
52
53 HRESULT (STDMETHODCALLTYPE *EnumObjects)(
54 IN IRecycleBin5 *This,
55 OUT IRecycleBinEnumList **ppEnumList);
56
57 /* IRecycleBin5 interface */
58 HRESULT (STDMETHODCALLTYPE *Delete)(
59 IN IRecycleBin5 *This,
60 IN LPCWSTR pDeletedFileName,
61 IN DELETED_FILE_RECORD *pDeletedFile);
62
63 HRESULT (STDMETHODCALLTYPE *Restore)(
64 IN IRecycleBin5 *This,
65 IN LPCWSTR pDeletedFileName,
66 IN DELETED_FILE_RECORD *pDeletedFile);
67
68 HRESULT (STDMETHODCALLTYPE *OnClosing)(
69 IN IRecycleBin5 *This,
70 IN IRecycleBinEnumList *prbel);
71 } IRecycleBin5Vtbl;
72
73 interface IRecycleBin5
74 {
75 CONST_VTBL struct IRecycleBin5Vtbl *lpVtbl;
76 };
77
78 #ifdef COBJMACROS
79 #define IRecycleBin5_QueryInterface(This, riid, ppvObject) \
80 (This)->lpVtbl->QueryInterface(This, riid, ppvObject)
81 #define IRecycleBin5_AddRef(This) \
82 (This)->lpVtbl->AddRef(This)
83 #define IRecycleBin5_Release(This) \
84 (This)->lpVtbl->Release(This)
85 #define IRecycleBin5_DeleteFile(This, szFileName) \
86 (This)->lpVtbl->DeleteFile(This, szFileName)
87 #define IRecycleBin5_EmptyRecycleBin(This) \
88 (This)->lpVtbl->EmptyRecycleBin(This)
89 #define IRecycleBin5_EnumObjects(This, ppEnumList) \
90 (This)->lpVtbl->EnumObjects(This, ppEnumList)
91 #define IRecycleBin5_Delete(This, pDeletedFileName, pDeletedFile) \
92 (This)->lpVtbl->Delete(This, pDeletedFileName, pDeletedFile)
93 #define IRecycleBin5_Restore(This, pDeletedFileName, pDeletedFile) \
94 (This)->lpVtbl->Restore(This, pDeletedFileName, pDeletedFile)
95 #define IRecycleBin5_OnClosing(This, prb5el) \
96 (This)->lpVtbl->OnClosing(This, prb5el)
97 #endif
98
99 HRESULT
100 RecycleBin5Enum_Constructor(
101 IN IRecycleBin5 *prb,
102 IN HANDLE hInfo,
103 IN HANDLE hInfoMapped,
104 IN LPCWSTR szPrefix,
105 OUT IUnknown **ppUnknown);
106
107 #ifdef __cplusplus
108 }
109 #endif