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