1 /**
2  * This file has no copyright assigned and is placed in the Public Domain.
3  * This file is part of the mingw-w64 runtime package.
4  * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5  */
6 #ifndef _INC_VSPROV
7 #define _INC_VSPROV
8 
9 #include <vss.h>
10 #include <vds.h>
11 #undef  INTERFACE
12 #define INTERFACE IVssHardwareSnapshotProvider
13 #ifdef __GNUC__
14 #warning COM interfaces layout in this header has not been verified.
15 #warning COM interfaces with incorrect layout may not work at all.
16 __MINGW_BROKEN_INTERFACE(INTERFACE)
17 #endif
DECLARE_INTERFACE_(IVssHardwareSnapshotProvider,IUnknown)18 DECLARE_INTERFACE_(IVssHardwareSnapshotProvider,IUnknown)
19 {
20     BEGIN_INTERFACE
21 
22     /* IUnknown methods */
23     STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
24     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
25     STDMETHOD_(ULONG, Release)(THIS) PURE;
26 
27     /* IVssHardwareSnapshotProvider methods */
28     STDMETHOD_(HRESULT,AreLunsSupported)(THIS_ LONG lLunCount,LONG lContext,VSS_PWSZ *rgwszDevices,VDS_LUN_INFORMATION *pLunInformation,WINBOOL *pbIsSupported) PURE;
29     STDMETHOD_(HRESULT,FillInLunInfo)(THIS_ VSS_PWSZ wszDeviceName,VDS_LUN_INFORMATION *pLunInfo,WINBOOL *pbIsSupported) PURE;
30     STDMETHOD_(HRESULT,BeginPrepareSnapshot)(THIS_ VSS_ID SnapshotSetId,VSS_ID SnapshotId,LONG lContext,LONG lLunCount,VSS_PWSZ *rgDeviceNames,VDS_LUN_INFORMATION *rgLunInformation) PURE;
31     STDMETHOD_(HRESULT,GetTargetLuns)(THIS_ LONG lLunCount,VSS_PWSZ *rgDeviceNames,VDS_LUN_INFORMATION *rgSourceLuns,VDS_LUN_INFORMATION *rgDestinationLuns) PURE;
32     STDMETHOD_(HRESULT,LocateLuns)(THIS_ LONG lLunCount,VDS_LUN_INFORMATION *rgSourceLuns) PURE;
33     STDMETHOD_(HRESULT,OnLunEmpty)(THIS_ VSS_PWSZ wszDeviceName,VDS_LUN_INFORMATION *pInformation) PURE;
34 
35     END_INTERFACE
36 };
37 #ifdef COBJMACROS
38 #define IVssHardwareSnapshotProvider_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
39 #define IVssHardwareSnapshotProvider_AddRef(This) (This)->lpVtbl->AddRef(This)
40 #define IVssHardwareSnapshotProvider_Release(This) (This)->lpVtbl->Release(This)
41 #define IVssHardwareSnapshotProvider_AreLunsSupported(This,lLunCount,lContext,rgwszDevices,pLunInformation,pbIsSupported) (This)->lpVtbl->AreLunsSupported(This,lLunCount,lContext,rgwszDevices,pLunInformation,pbIsSupported)
42 #define IVssHardwareSnapshotProvider_FillInLunInfo(This,wszDeviceName,pLunInfo,pbIsSupported) (This)->lpVtbl->FillInLunInfo(This,wszDeviceName,pLunInfo,pbIsSupported)
43 #define IVssHardwareSnapshotProvider_BeginPrepareSnapshot(This,SnapshotSetId,SnapshotId,lContext,lLunCount,rgDeviceNames,rgLunInformation) (This)->lpVtbl->BeginPrepareSnapshot(This,SnapshotSetId,SnapshotId,lContext,lLunCount,rgDeviceNames,rgLunInformation)
44 #define IVssHardwareSnapshotProvider_GetTargetLuns(This,lLunCount,rgDeviceNames,rgSourceLuns,rgDestinationLuns) (This)->lpVtbl->GetTargetLuns(This,lLunCount,rgDeviceNames,rgSourceLuns,rgDestinationLuns)
45 #define IVssHardwareSnapshotProvider_LocateLuns(This,lLunCount,rgSourceLuns) (This)->lpVtbl->LocateLuns(This,lLunCount,rgSourceLuns)
46 #define IVssHardwareSnapshotProvider_OnLunEmpty(This,wszDeviceName,pInformation) (This)->lpVtbl->OnLunEmpty(This,wszDeviceName,pInformation)
47 #endif /*COBJMACROS*/
48 
49 #undef  INTERFACE
50 #define INTERFACE IVssHardwareSnapshotProviderEx
51 #ifdef __GNUC__
52 #warning COM interfaces layout in this header has not been verified.
53 #warning COM interfaces with incorrect layout may not work at all.
54 __MINGW_BROKEN_INTERFACE(INTERFACE)
55 #endif
DECLARE_INTERFACE_(IVssHardwareSnapshotProviderEx,IVssHardwareSnapshotProvider)56 DECLARE_INTERFACE_(IVssHardwareSnapshotProviderEx,IVssHardwareSnapshotProvider)
57 {
58     BEGIN_INTERFACE
59 
60     /* IUnknown methods */
61     STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
62     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
63     STDMETHOD_(ULONG, Release)(THIS) PURE;
64 
65     /* IVssHardwareSnapshotProvider methods */
66     STDMETHOD_(HRESULT,AreLunsSupported)(THIS_ LONG lLunCount,LONG lContext,VSS_PWSZ *rgwszDevices,VDS_LUN_INFORMATION *pLunInformation,WINBOOL *pbIsSupported) PURE;
67     STDMETHOD_(HRESULT,FillInLunInfo)(THIS_ VSS_PWSZ wszDeviceName,VDS_LUN_INFORMATION *pLunInfo,WINBOOL *pbIsSupported) PURE;
68     STDMETHOD_(HRESULT,BeginPrepareSnapshot)(THIS_ VSS_ID SnapshotSetId,VSS_ID SnapshotId,LONG lContext,LONG lLunCount,VSS_PWSZ *rgDeviceNames,VDS_LUN_INFORMATION *rgLunInformation) PURE;
69     STDMETHOD_(HRESULT,GetTargetLuns)(THIS_ LONG lLunCount,VSS_PWSZ *rgDeviceNames,VDS_LUN_INFORMATION *rgSourceLuns,VDS_LUN_INFORMATION *rgDestinationLuns) PURE;
70     STDMETHOD_(HRESULT,LocateLuns)(THIS_ LONG lLunCount,VDS_LUN_INFORMATION *rgSourceLuns) PURE;
71     STDMETHOD_(HRESULT,OnLunEmpty)(THIS_ VSS_PWSZ wszDeviceName,VDS_LUN_INFORMATION *pInformation) PURE;
72 
73     /* IVssHardwareSnapshotProviderEx methods */
74     STDMETHOD_(HRESULT,GetProviderCapabilities)(THIS) PURE;
75     STDMETHOD_(HRESULT,OnLunStateChange)(THIS_ VDS_LUN_INFORMATION *pSnapshotLuns,VDS_LUN_INFORMATION *pOriginalLuns,DWORD dwCount,DWORD dwFlags) PURE;
76     STDMETHOD_(HRESULT,OnReuseLuns)(THIS) PURE;
77     STDMETHOD_(HRESULT,ResyncLuns)(THIS_ VDS_LUN_INFORMATION *pSourceLuns,VDS_LUN_INFORMATION *pTargetLuns,DWORD dwCount,IVssAsync **ppAsync) PURE;
78 
79     END_INTERFACE
80 };
81 #ifdef COBJMACROS
82 #define IVssHardwareSnapshotProviderEx_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
83 #define IVssHardwareSnapshotProviderEx_AddRef(This) (This)->lpVtbl->AddRef(This)
84 #define IVssHardwareSnapshotProviderEx_Release(This) (This)->lpVtbl->Release(This)
85 #define IVssHardwareSnapshotProviderEx_AreLunsSupported(This,lLunCount,lContext,rgwszDevices,pLunInformation,pbIsSupported) (This)->lpVtbl->AreLunsSupported(This,lLunCount,lContext,rgwszDevices,pLunInformation,pbIsSupported)
86 #define IVssHardwareSnapshotProviderEx_FillInLunInfo(This,wszDeviceName,pLunInfo,pbIsSupported) (This)->lpVtbl->FillInLunInfo(This,wszDeviceName,pLunInfo,pbIsSupported)
87 #define IVssHardwareSnapshotProviderEx_BeginPrepareSnapshot(This,SnapshotSetId,SnapshotId,lContext,lLunCount,rgDeviceNames,rgLunInformation) (This)->lpVtbl->BeginPrepareSnapshot(This,SnapshotSetId,SnapshotId,lContext,lLunCount,rgDeviceNames,rgLunInformation)
88 #define IVssHardwareSnapshotProviderEx_GetTargetLuns(This,lLunCount,rgDeviceNames,rgSourceLuns,rgDestinationLuns) (This)->lpVtbl->GetTargetLuns(This,lLunCount,rgDeviceNames,rgSourceLuns,rgDestinationLuns)
89 #define IVssHardwareSnapshotProviderEx_LocateLuns(This,lLunCount,rgSourceLuns) (This)->lpVtbl->LocateLuns(This,lLunCount,rgSourceLuns)
90 #define IVssHardwareSnapshotProviderEx_OnLunEmpty(This,wszDeviceName,pInformation) (This)->lpVtbl->OnLunEmpty(This,wszDeviceName,pInformation)
91 #define IVssHardwareSnapshotProviderEx_GetProviderCapabilities() (This)->lpVtbl->GetProviderCapabilities(This)
92 #define IVssHardwareSnapshotProviderEx_OnLunStateChange(This,pSnapshotLuns,pOriginalLuns,dwCount,dwFlags) (This)->lpVtbl->OnLunStateChange(This,pSnapshotLuns,pOriginalLuns,dwCount,dwFlags)
93 #define IVssHardwareSnapshotProviderEx_OnReuseLuns() (This)->lpVtbl->OnReuseLuns(This)
94 #define IVssHardwareSnapshotProviderEx_ResyncLuns(This,pSourceLuns,pTargetLuns,dwCount,ppAsync) (This)->lpVtbl->ResyncLuns(This,pSourceLuns,pTargetLuns,dwCount,ppAsync)
95 #endif /*COBJMACROS*/
96 
97 #undef  INTERFACE
98 #define INTERFACE IVssProviderCreateSnapshotSet
99 #ifdef __GNUC__
100 #warning COM interfaces layout in this header has not been verified.
101 #warning COM interfaces with incorrect layout may not work at all.
102 __MINGW_BROKEN_INTERFACE(INTERFACE)
103 #endif
DECLARE_INTERFACE_(IVssProviderCreateSnapshotSet,IUnknown)104 DECLARE_INTERFACE_(IVssProviderCreateSnapshotSet,IUnknown)
105 {
106     BEGIN_INTERFACE
107 
108     /* IUnknown methods */
109     STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
110     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
111     STDMETHOD_(ULONG, Release)(THIS) PURE;
112 
113     /* IVssProviderCreateSnapshotSet methods */
114     STDMETHOD_(HRESULT,EndPrepareSnapshots)(THIS_ VSS_ID SnapshotSetId) PURE;
115     STDMETHOD_(HRESULT,PreCommitSnapshots)(THIS_ VSS_ID SnapshotSetId) PURE;
116     STDMETHOD_(HRESULT,CommitSnapshots)(THIS_ VSS_ID SnapshotSetId) PURE;
117     STDMETHOD_(HRESULT,PostCommitSnapshots)(THIS_ VSS_ID SnapshotSetId,LONG lSnapshotsCount) PURE;
118     STDMETHOD_(HRESULT,PreFinalCommitSnapshots)(THIS_ VSS_ID SnapshotSetId) PURE;
119     STDMETHOD_(HRESULT,PostFinalCommitSnapshots)(THIS_ VSS_ID SnapshotSetId) PURE;
120     STDMETHOD_(HRESULT,AbortSnapshots)(THIS_ VSS_ID SnapshotSetId) PURE;
121 
122     END_INTERFACE
123 };
124 #ifdef COBJMACROS
125 #define IVssProviderCreateSnapshotSet_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
126 #define IVssProviderCreateSnapshotSet_AddRef(This) (This)->lpVtbl->AddRef(This)
127 #define IVssProviderCreateSnapshotSet_Release(This) (This)->lpVtbl->Release(This)
128 #define IVssProviderCreateSnapshotSet_EndPrepareSnapshots(This,SnapshotSetId) (This)->lpVtbl->EndPrepareSnapshots(This,SnapshotSetId)
129 #define IVssProviderCreateSnapshotSet_PreCommitSnapshots(This,SnapshotSetId) (This)->lpVtbl->PreCommitSnapshots(This,SnapshotSetId)
130 #define IVssProviderCreateSnapshotSet_CommitSnapshots(This,SnapshotSetId) (This)->lpVtbl->CommitSnapshots(This,SnapshotSetId)
131 #define IVssProviderCreateSnapshotSet_PostCommitSnapshots(This,SnapshotSetId,lSnapshotsCount) (This)->lpVtbl->PostCommitSnapshots(This,SnapshotSetId,lSnapshotsCount)
132 #define IVssProviderCreateSnapshotSet_PreFinalCommitSnapshots(This,SnapshotSetId) (This)->lpVtbl->PreFinalCommitSnapshots(This,SnapshotSetId)
133 #define IVssProviderCreateSnapshotSet_PostFinalCommitSnapshots(This,SnapshotSetId) (This)->lpVtbl->PostFinalCommitSnapshots(This,SnapshotSetId)
134 #define IVssProviderCreateSnapshotSet_AbortSnapshots(This,SnapshotSetId) (This)->lpVtbl->AbortSnapshots(This,SnapshotSetId)
135 #endif /*COBJMACROS*/
136 
137 #undef  INTERFACE
138 #define INTERFACE IVssProviderNotifications
DECLARE_INTERFACE_(IVssProviderNotifications,IUnknown)139 DECLARE_INTERFACE_(IVssProviderNotifications,IUnknown)
140 {
141     BEGIN_INTERFACE
142 
143     /* IUnknown methods */
144     STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
145     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
146     STDMETHOD_(ULONG, Release)(THIS) PURE;
147 
148     /* IVssProviderNotifications methods */
149     STDMETHOD_(HRESULT,OnLoad)(THIS_ IUnknown *pCallback) PURE;
150     STDMETHOD_(HRESULT,OnUnload)(THIS_ WINBOOL bForceUnload) PURE;
151 
152     END_INTERFACE
153 };
154 #ifdef COBJMACROS
155 #define IVssProviderNotifications_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
156 #define IVssProviderNotifications_AddRef(This) (This)->lpVtbl->AddRef(This)
157 #define IVssProviderNotifications_Release(This) (This)->lpVtbl->Release(This)
158 #define IVssProviderNotifications_OnLoad(This,pCallback) (This)->lpVtbl->OnLoad(This,pCallback)
159 #define IVssProviderNotifications_OnUnload(This,bForceUnload) (This)->lpVtbl->OnUnload(This,bForceUnload)
160 #endif /*COBJMACROS*/
161 
162 #undef  INTERFACE
163 #define INTERFACE IVssSoftwareSnapshotProvider
164 #ifdef __GNUC__
165 #warning COM interfaces layout in this header has not been verified.
166 #warning COM interfaces with incorrect layout may not work at all.
167 __MINGW_BROKEN_INTERFACE(INTERFACE)
168 #endif
DECLARE_INTERFACE_(IVssSoftwareSnapshotProvider,IUnknown)169 DECLARE_INTERFACE_(IVssSoftwareSnapshotProvider,IUnknown)
170 {
171     BEGIN_INTERFACE
172 
173     /* IUnknown methods */
174     STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
175     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
176     STDMETHOD_(ULONG, Release)(THIS) PURE;
177 
178     /* IVssSoftwareSnapshotProvider methods */
179     STDMETHOD_(HRESULT,SetContext)(THIS_ LONG lContext) PURE;
180     STDMETHOD_(HRESULT,GetSnapshotProperties)(THIS_ VSS_ID SnapshotId,VSS_SNAPSHOT_PROP *pProp) PURE;
181     STDMETHOD_(HRESULT,Query)(THIS_ VSS_ID QueriedObjectId,VSS_OBJECT_TYPE eQueriedObjectType,VSS_OBJECT_TYPE eReturnedObjectsType,IVssEnumObject **ppEnum) PURE;
182     STDMETHOD_(HRESULT,DeleteSnapshots)(THIS_ VSS_ID SourceObjectId,VSS_OBJECT_TYPE eSourceObjectType,WINBOOL bForceDelete,LONG *plDeletedSnapshots,VSS_ID *pNondeletedSnapshotID) PURE;
183     STDMETHOD_(HRESULT,BeginPrepareSnapshot)(THIS_ VSS_ID SnapshotSetId,VSS_ID SnapshotId,VSS_PWSZ pwszVolumeName,LONG lNewContext) PURE;
184     STDMETHOD_(HRESULT,IsVolumeSupported)(THIS_ VSS_PWSZ pwszVolumeName,WINBOOL *pbSupportedByThisProvider) PURE;
185     STDMETHOD_(HRESULT,IsVolumeSnapshotted)(THIS_ VSS_PWSZ pwszVolumeName,WINBOOL *pbSnapshotsPresent,LONG *plSnapshotCompatibility) PURE;
186     STDMETHOD_(HRESULT,SetSnapshotProperty)(THIS_ VSS_ID SnapshotId,VSS_SNAPSHOT_PROPERTY_ID eSnapshotPropertyId,VARIANT vProperty) PURE;
187     STDMETHOD_(HRESULT,RevertToSnapshot)(THIS_ VSS_ID SnapshotId) PURE;
188     STDMETHOD_(HRESULT,QueryRevertStatus)(THIS_ VSS_PWSZ pwszVolume,IVssAsync **ppAsync) PURE;
189 
190     END_INTERFACE
191 };
192 #ifdef COBJMACROS
193 #define IVssSoftwareSnapshotProvider_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
194 #define IVssSoftwareSnapshotProvider_AddRef(This) (This)->lpVtbl->AddRef(This)
195 #define IVssSoftwareSnapshotProvider_Release(This) (This)->lpVtbl->Release(This)
196 #define IVssSoftwareSnapshotProvider_SetContext(This,lContext) (This)->lpVtbl->SetContext(This,lContext)
197 #define IVssSoftwareSnapshotProvider_GetSnapshotProperties(This,SnapshotId,pProp) (This)->lpVtbl->GetSnapshotProperties(This,SnapshotId,pProp)
198 #define IVssSoftwareSnapshotProvider_Query(This,QueriedObjectId,eQueriedObjectType,eReturnedObjectsType,ppEnum) (This)->lpVtbl->Query(This,QueriedObjectId,eQueriedObjectType,eReturnedObjectsType,ppEnum)
199 #define IVssSoftwareSnapshotProvider_DeleteSnapshots(This,SourceObjectId,eSourceObjectType,bForceDelete,plDeletedSnapshots,pNondeletedSnapshotID) (This)->lpVtbl->DeleteSnapshots(This,SourceObjectId,eSourceObjectType,bForceDelete,plDeletedSnapshots,pNondeletedSnapshotID)
200 #define IVssSoftwareSnapshotProvider_BeginPrepareSnapshot(This,SnapshotSetId,SnapshotId,pwszVolumeName,lNewContext) (This)->lpVtbl->BeginPrepareSnapshot(This,SnapshotSetId,SnapshotId,pwszVolumeName,lNewContext)
201 #define IVssSoftwareSnapshotProvider_IsVolumeSupported(This,pwszVolumeName,pbSupportedByThisProvider) (This)->lpVtbl->IsVolumeSupported(This,pwszVolumeName,pbSupportedByThisProvider)
202 #define IVssSoftwareSnapshotProvider_IsVolumeSnapshotted(This,pwszVolumeName,pbSnapshotsPresent,plSnapshotCompatibility) (This)->lpVtbl->IsVolumeSnapshotted(This,pwszVolumeName,pbSnapshotsPresent,plSnapshotCompatibility)
203 #define IVssSoftwareSnapshotProvider_SetSnapshotProperty(This,SnapshotId,eSnapshotPropertyId,vProperty) (This)->lpVtbl->SetSnapshotProperty(This,SnapshotId,eSnapshotPropertyId,vProperty)
204 #define IVssSoftwareSnapshotProvider_RevertToSnapshot(This,SnapshotId) (This)->lpVtbl->RevertToSnapshot(This,SnapshotId)
205 #define IVssSoftwareSnapshotProvider_QueryRevertStatus(This,pwszVolume,ppAsync) (This)->lpVtbl->QueryRevertStatus(This,pwszVolume,ppAsync)
206 #endif /*COBJMACROS*/
207 
208 #endif /*_INC_VSPROV*/
209