|
9 | 9 |
|
10 | 10 | namespace Files.App.Storage.Storables |
11 | 11 | { |
12 | | - public unsafe partial struct WindowsBulkOperationsSink : IFileOperationProgressSink.Interface |
| 12 | + public sealed partial class WindowsBulkOperations : IDisposable |
13 | 13 | { |
14 | | - public HRESULT StartOperations() |
15 | | - { |
16 | | - throw new NotImplementedException(); |
17 | | - } |
18 | | - |
19 | | - public HRESULT FinishOperations(HRESULT hrResult) |
20 | | - { |
21 | | - throw new NotImplementedException(); |
22 | | - } |
23 | | - |
24 | | - public unsafe HRESULT PreRenameItem(uint dwFlags, IShellItem* psiItem, PCWSTR pszNewName) |
25 | | - { |
26 | | - throw new NotImplementedException(); |
27 | | - } |
28 | | - |
29 | | - public unsafe HRESULT PostRenameItem(uint dwFlags, IShellItem* psiItem, PCWSTR pszNewName, HRESULT hrRename, IShellItem* psiNewlyCreated) |
30 | | - { |
31 | | - throw new NotImplementedException(); |
32 | | - } |
33 | | - |
34 | | - public unsafe HRESULT PreMoveItem(uint dwFlags, IShellItem* psiItem, IShellItem* psiDestinationFolder, PCWSTR pszNewName) |
35 | | - { |
36 | | - throw new NotImplementedException(); |
37 | | - } |
38 | | - |
39 | | - public unsafe HRESULT PostMoveItem(uint dwFlags, IShellItem* psiItem, IShellItem* psiDestinationFolder, PCWSTR pszNewName, HRESULT hrMove, IShellItem* psiNewlyCreated) |
40 | | - { |
41 | | - throw new NotImplementedException(); |
42 | | - } |
43 | | - |
44 | | - public unsafe HRESULT PreCopyItem(uint dwFlags, IShellItem* psiItem, IShellItem* psiDestinationFolder, PCWSTR pszNewName) |
45 | | - { |
46 | | - throw new NotImplementedException(); |
47 | | - } |
48 | | - |
49 | | - public unsafe HRESULT PostCopyItem(uint dwFlags, IShellItem* psiItem, IShellItem* psiDestinationFolder, PCWSTR pszNewName, HRESULT hrCopy, IShellItem* psiNewlyCreated) |
50 | | - { |
51 | | - throw new NotImplementedException(); |
52 | | - } |
53 | | - |
54 | | - public unsafe HRESULT PreDeleteItem(uint dwFlags, IShellItem* psiItem) |
55 | | - { |
56 | | - throw new NotImplementedException(); |
57 | | - } |
58 | | - |
59 | | - public unsafe HRESULT PostDeleteItem(uint dwFlags, IShellItem* psiItem, HRESULT hrDelete, IShellItem* psiNewlyCreated) |
60 | | - { |
61 | | - throw new NotImplementedException(); |
62 | | - } |
63 | | - |
64 | | - public unsafe HRESULT PreNewItem(uint dwFlags, IShellItem* psiDestinationFolder, PCWSTR pszNewName) |
65 | | - { |
66 | | - throw new NotImplementedException(); |
67 | | - } |
68 | | - |
69 | | - public unsafe HRESULT PostNewItem(uint dwFlags, IShellItem* psiDestinationFolder, PCWSTR pszNewName, PCWSTR pszTemplateName, uint dwFileAttributes, HRESULT hrNew, IShellItem* psiNewItem) |
70 | | - { |
71 | | - throw new NotImplementedException(); |
72 | | - } |
73 | | - |
74 | | - public HRESULT UpdateProgress(uint iWorkTotal, uint iWorkSoFar) |
75 | | - { |
76 | | - throw new NotImplementedException(); |
77 | | - } |
78 | | - |
79 | | - public HRESULT ResetTimer() |
80 | | - { |
81 | | - throw new NotImplementedException(); |
82 | | - } |
83 | | - |
84 | | - public HRESULT PauseTimer() |
85 | | - { |
86 | | - throw new NotImplementedException(); |
87 | | - } |
88 | | - |
89 | | - public HRESULT ResumeTimer() |
90 | | - { |
91 | | - throw new NotImplementedException(); |
| 14 | + private unsafe partial struct WindowsBulkOperationsSink : IFileOperationProgressSink.Interface |
| 15 | + { |
| 16 | + public HRESULT StartOperations() |
| 17 | + { |
| 18 | + throw new NotImplementedException(); |
| 19 | + } |
| 20 | + |
| 21 | + public HRESULT FinishOperations(HRESULT hrResult) |
| 22 | + { |
| 23 | + throw new NotImplementedException(); |
| 24 | + } |
| 25 | + |
| 26 | + public unsafe HRESULT PreRenameItem(uint dwFlags, IShellItem* psiItem, PCWSTR pszNewName) |
| 27 | + { |
| 28 | + throw new NotImplementedException(); |
| 29 | + } |
| 30 | + |
| 31 | + public unsafe HRESULT PostRenameItem(uint dwFlags, IShellItem* psiItem, PCWSTR pszNewName, HRESULT hrRename, IShellItem* psiNewlyCreated) |
| 32 | + { |
| 33 | + throw new NotImplementedException(); |
| 34 | + } |
| 35 | + |
| 36 | + public unsafe HRESULT PreMoveItem(uint dwFlags, IShellItem* psiItem, IShellItem* psiDestinationFolder, PCWSTR pszNewName) |
| 37 | + { |
| 38 | + if (_operationsHandle.Target is WindowsBulkOperations operations) |
| 39 | + { |
| 40 | + operations.PreMoveItem?.Invoke(this, new()); |
| 41 | + return HRESULT.S_OK; |
| 42 | + } |
| 43 | + |
| 44 | + return HRESULT.E_INVALIDARG; |
| 45 | + } |
| 46 | + |
| 47 | + public unsafe HRESULT PostMoveItem(uint dwFlags, IShellItem* psiItem, IShellItem* psiDestinationFolder, PCWSTR pszNewName, HRESULT hrMove, IShellItem* psiNewlyCreated) |
| 48 | + { |
| 49 | + if (_operationsHandle.Target is WindowsBulkOperations operations) |
| 50 | + { |
| 51 | + operations.PostMoveItem?.Invoke(this, new()); |
| 52 | + return HRESULT.S_OK; |
| 53 | + } |
| 54 | + |
| 55 | + return HRESULT.E_INVALIDARG; |
| 56 | + } |
| 57 | + |
| 58 | + public unsafe HRESULT PreCopyItem(uint dwFlags, IShellItem* psiItem, IShellItem* psiDestinationFolder, PCWSTR pszNewName) |
| 59 | + { |
| 60 | + throw new NotImplementedException(); |
| 61 | + } |
| 62 | + |
| 63 | + public unsafe HRESULT PostCopyItem(uint dwFlags, IShellItem* psiItem, IShellItem* psiDestinationFolder, PCWSTR pszNewName, HRESULT hrCopy, IShellItem* psiNewlyCreated) |
| 64 | + { |
| 65 | + throw new NotImplementedException(); |
| 66 | + } |
| 67 | + |
| 68 | + public unsafe HRESULT PreDeleteItem(uint dwFlags, IShellItem* psiItem) |
| 69 | + { |
| 70 | + throw new NotImplementedException(); |
| 71 | + } |
| 72 | + |
| 73 | + public unsafe HRESULT PostDeleteItem(uint dwFlags, IShellItem* psiItem, HRESULT hrDelete, IShellItem* psiNewlyCreated) |
| 74 | + { |
| 75 | + throw new NotImplementedException(); |
| 76 | + } |
| 77 | + |
| 78 | + public unsafe HRESULT PreNewItem(uint dwFlags, IShellItem* psiDestinationFolder, PCWSTR pszNewName) |
| 79 | + { |
| 80 | + throw new NotImplementedException(); |
| 81 | + } |
| 82 | + |
| 83 | + public unsafe HRESULT PostNewItem(uint dwFlags, IShellItem* psiDestinationFolder, PCWSTR pszNewName, PCWSTR pszTemplateName, uint dwFileAttributes, HRESULT hrNew, IShellItem* psiNewItem) |
| 84 | + { |
| 85 | + throw new NotImplementedException(); |
| 86 | + } |
| 87 | + |
| 88 | + public HRESULT UpdateProgress(uint iWorkTotal, uint iWorkSoFar) |
| 89 | + { |
| 90 | + throw new NotImplementedException(); |
| 91 | + } |
| 92 | + |
| 93 | + public HRESULT ResetTimer() |
| 94 | + { |
| 95 | + throw new NotImplementedException(); |
| 96 | + } |
| 97 | + |
| 98 | + public HRESULT PauseTimer() |
| 99 | + { |
| 100 | + throw new NotImplementedException(); |
| 101 | + } |
| 102 | + |
| 103 | + public HRESULT ResumeTimer() |
| 104 | + { |
| 105 | + throw new NotImplementedException(); |
| 106 | + } |
92 | 107 | } |
93 | 108 | } |
94 | 109 | } |
0 commit comments