OSDN Git Service

add japanese site html
[sevenzip/7-Zip.git] / 7z457 / CPP / 7zip / UI / FileManager / IFolder.h
1 // IFolder.h
2
3 #ifndef __IFOLDER_H
4 #define __IFOLDER_H
5
6 #include "../../IProgress.h"
7
8 #define FOLDER_INTERFACE_SUB(i, b, x) DECL_INTERFACE_SUB(i, b, 8, x)
9 #define FOLDER_INTERFACE(i, x) FOLDER_INTERFACE_SUB(i, IUnknown, x)
10
11 namespace NPlugin
12 {
13   enum 
14   {
15     kName = 0,
16     kType,
17     kClassID,
18     kOptionsClassID
19   };
20 }
21
22 #define INTERFACE_FolderFolder(x) \
23   STDMETHOD(LoadItems)() x; \
24   STDMETHOD(GetNumberOfItems)(UInt32 *numItems) x; \
25   STDMETHOD(GetProperty)(UInt32 itemIndex, PROPID propID, PROPVARIANT *value) x; \
26   STDMETHOD(BindToFolder)(UInt32 index, IFolderFolder **resultFolder) x; \
27   STDMETHOD(BindToFolder)(const wchar_t *name, IFolderFolder **resultFolder) x; \
28   STDMETHOD(BindToParentFolder)(IFolderFolder **resultFolder) x; \
29   STDMETHOD(GetNumberOfProperties)(UInt32 *numProperties) x; \
30   STDMETHOD(GetPropertyInfo)(UInt32 index, BSTR *name, PROPID *propID, VARTYPE *varType) x; \
31   STDMETHOD(GetFolderProperty)(PROPID propID, PROPVARIANT *value) x; \
32
33 FOLDER_INTERFACE(IFolderFolder, 0x00)
34 {
35   INTERFACE_FolderFolder(PURE)
36 };
37
38 FOLDER_INTERFACE(IFolderWasChanged, 0x04)
39 {
40   STDMETHOD(WasChanged)(Int32 *wasChanged) PURE;
41 };
42
43 FOLDER_INTERFACE_SUB(IFolderOperationsExtractCallback, IProgress, 0x0B)
44 {
45   // STDMETHOD(SetTotalFiles)(UInt64 total) PURE;
46   // STDMETHOD(SetCompletedFiles)(const UInt64 *completedValue) PURE;
47   STDMETHOD(AskWrite)(
48       const wchar_t *srcPath, 
49       Int32 srcIsFolder, 
50       const FILETIME *srcTime, 
51       const UInt64 *srcSize,
52       const wchar_t *destPathRequest, 
53       BSTR *destPathResult, 
54       Int32 *writeAnswer) PURE;
55   STDMETHOD(ShowMessage)(const wchar_t *message) PURE;
56   STDMETHOD(SetCurrentFilePath)(const wchar_t *filePath) PURE;
57   STDMETHOD(SetNumFiles)(UInt64 numFiles) PURE;
58 };
59
60 #define INTERFACE_FolderOperations(x) \
61   STDMETHOD(CreateFolder)(const wchar_t *name, IProgress *progress) x; \
62   STDMETHOD(CreateFile)(const wchar_t *name, IProgress *progress) x; \
63   STDMETHOD(Rename)(UInt32 index, const wchar_t *newName, IProgress *progress) x; \
64   STDMETHOD(Delete)(const UInt32 *indices, UInt32 numItems, IProgress *progress) x; \
65   STDMETHOD(CopyTo)(const UInt32 *indices, UInt32 numItems, \
66       const wchar_t *path, IFolderOperationsExtractCallback *callback) x; \
67   STDMETHOD(MoveTo)(const UInt32 *indices, UInt32 numItems, \
68       const wchar_t *path, IFolderOperationsExtractCallback *callback) x; \
69   STDMETHOD(CopyFrom)(const wchar_t *fromFolderPath, \
70       const wchar_t **itemsPaths, UInt32 numItems, IProgress *progress) x; \
71   STDMETHOD(SetProperty)(UInt32 index, PROPID propID, const PROPVARIANT *value, IProgress *progress) x; \
72
73 FOLDER_INTERFACE(IFolderOperations, 0x06)
74 {
75   INTERFACE_FolderOperations(PURE)
76 };
77
78 /*
79 FOLDER_INTERFACE2(IFolderOperationsDeleteToRecycleBin, 0x06, 0x03)
80 {
81   STDMETHOD(DeleteToRecycleBin)(const UInt32 *indices, UInt32 numItems, IProgress *progress) PURE;
82 };
83 */
84
85 FOLDER_INTERFACE(IFolderGetSystemIconIndex, 0x07)
86 {
87   STDMETHOD(GetSystemIconIndex)(UInt32 index, Int32 *iconIndex) PURE;
88 };
89
90 FOLDER_INTERFACE(IFolderGetItemFullSize, 0x08)
91 {
92   STDMETHOD(GetItemFullSize)(UInt32 index, PROPVARIANT *value, IProgress *progress) PURE;
93 };
94
95 FOLDER_INTERFACE(IFolderClone, 0x09)
96 {
97   STDMETHOD(Clone)(IFolderFolder **resultFolder) PURE;
98 };
99
100 FOLDER_INTERFACE(IFolderSetFlatMode, 0x0A)
101 {
102   STDMETHOD(SetFlatMode)(Int32 flatMode) PURE;
103 };
104
105 #define INTERFACE_FolderProperties(x) \
106   STDMETHOD(GetNumberOfFolderProperties)(UInt32 *numProperties) x; \
107   STDMETHOD(GetFolderPropertyInfo)(UInt32 index, BSTR *name, PROPID *propID, VARTYPE *varType) x; \
108
109 FOLDER_INTERFACE(IFolderProperties, 0x0B)
110 {
111   INTERFACE_FolderProperties(PURE)
112 };
113
114 #define INTERFACE_IFolderArchiveProperties(x) \
115   STDMETHOD(GetArchiveProperty)(PROPID propID, PROPVARIANT *value) x; \
116   STDMETHOD(GetNumberOfArchiveProperties)(UInt32 *numProperties) x; \
117   STDMETHOD(GetArchivePropertyInfo)(UInt32 index, BSTR *name, PROPID *propID, VARTYPE *varType) x;
118
119 FOLDER_INTERFACE(IFolderArchiveProperties, 0x0C)
120 {
121   INTERFACE_IFolderArchiveProperties(PURE)
122 };
123
124 FOLDER_INTERFACE(IGetFolderArchiveProperties, 0x0D)
125 {
126   STDMETHOD(GetFolderArchiveProperties)(IFolderArchiveProperties **object) PURE;
127 };
128
129 #define FOLDER_MANAGER_INTERFACE(i, x)  DECL_INTERFACE(i, 9, x)
130
131 #define INTERFACE_IFolderManager(x) \
132   STDMETHOD(OpenFolderFile)(const wchar_t *filePath, IFolderFolder **resultFolder, IProgress *progress) x; \
133   STDMETHOD(GetExtensions)(BSTR *extensions) x; \
134   STDMETHOD(GetIconPath)(const wchar_t *ext, BSTR *iconPath, Int32 *iconIndex) x; \
135   
136   // STDMETHOD(GetTypes)(BSTR *types) PURE;
137   // STDMETHOD(CreateFolderFile)(const wchar_t *type, const wchar_t *filePath, IProgress *progress) PURE;
138             
139 FOLDER_MANAGER_INTERFACE(IFolderManager, 0x03)
140 {
141   INTERFACE_IFolderManager(PURE);
142 };
143
144
145 #endif