xref: /reactos/sdk/include/psdk/vsbackup.idl (revision 3904423d)
1*3904423dSOleg Dubinskiy/*
2*3904423dSOleg Dubinskiy * Copyright 2019 Alistair Leslie-Hughes
3*3904423dSOleg Dubinskiy *
4*3904423dSOleg Dubinskiy * This library is free software; you can redistribute it and/or
5*3904423dSOleg Dubinskiy * modify it under the terms of the GNU Lesser General Public
6*3904423dSOleg Dubinskiy * License as published by the Free Software Foundation; either
7*3904423dSOleg Dubinskiy * version 2.1 of the License, or (at your option) any later version.
8*3904423dSOleg Dubinskiy *
9*3904423dSOleg Dubinskiy * This library is distributed in the hope that it will be useful,
10*3904423dSOleg Dubinskiy * but WITHOUT ANY WARRANTY; without even the implied warranty of
11*3904423dSOleg Dubinskiy * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12*3904423dSOleg Dubinskiy * Lesser General Public License for more details.
13*3904423dSOleg Dubinskiy *
14*3904423dSOleg Dubinskiy * You should have received a copy of the GNU Lesser General Public
15*3904423dSOleg Dubinskiy * License along with this library; if not, write to the Free Software
16*3904423dSOleg Dubinskiy * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17*3904423dSOleg Dubinskiy */
18*3904423dSOleg Dubinskiy
19*3904423dSOleg Dubinskiyimport "oaidl.idl";
20*3904423dSOleg Dubinskiyimport "vswriter.idl";
21*3904423dSOleg Dubinskiyimport "vss.idl";
22*3904423dSOleg Dubinskiy
23*3904423dSOleg Dubinskiyinterface IVssAsync;
24*3904423dSOleg Dubinskiyinterface IVssEnumObject;
25*3904423dSOleg Dubinskiyinterface IVssExamineWriterMetadata;
26*3904423dSOleg Dubinskiyinterface IVssWriterComponentsExt;
27*3904423dSOleg Dubinskiy
28*3904423dSOleg Dubinskiycpp_quote("#ifdef _cplusplus")
29*3904423dSOleg Dubinskiycpp_quote("extern \"C\" {")
30*3904423dSOleg Dubinskiycpp_quote("#endif")
31*3904423dSOleg Dubinskiycpp_quote("HRESULT WINAPI CreateVssBackupComponentsInternal(IVssBackupComponents **backup);")
32*3904423dSOleg Dubinskiycpp_quote("#ifdef _cplusplus")
33*3904423dSOleg Dubinskiycpp_quote("}")
34*3904423dSOleg Dubinskiycpp_quote("#endif")
35*3904423dSOleg Dubinskiy
36*3904423dSOleg Dubinskiycpp_quote("static inline HRESULT CreateVssBackupComponents(IVssBackupComponents **backup)")
37*3904423dSOleg Dubinskiycpp_quote("     { return CreateVssBackupComponentsInternal(backup); }")
38*3904423dSOleg Dubinskiy
39*3904423dSOleg Dubinskiy[
40*3904423dSOleg Dubinskiy    uuid("665c1d5f-c218-414d-a05d-7fef5f9d5c86"),
41*3904423dSOleg Dubinskiy    local
42*3904423dSOleg Dubinskiy]
43*3904423dSOleg Dubinskiyinterface IVssBackupComponents : IUnknown
44*3904423dSOleg Dubinskiy{
45*3904423dSOleg Dubinskiy    HRESULT GetWriterComponentsCount([out] UINT *components);
46*3904423dSOleg Dubinskiy    HRESULT GetWriterComponents([in] UINT index, [out] IVssWriterComponentsExt **writer);
47*3904423dSOleg Dubinskiy    HRESULT InitializeForBackup( [in, optional, defaultvalue(NULL)] BSTR bstrXML);
48*3904423dSOleg Dubinskiy    HRESULT SetBackupState([in] BOOL select_components, [in] BOOL state,
49*3904423dSOleg Dubinskiy    [in] VSS_BACKUP_TYPE type, [in, defaultvalue(FALSE)] BOOL partial_support);
50*3904423dSOleg Dubinskiy    HRESULT InitializeForRestore([in] BSTR xml);
51*3904423dSOleg Dubinskiy    HRESULT SetRestoreState([in] VSS_RESTORE_TYPE restore);
52*3904423dSOleg Dubinskiy    HRESULT GatherWriterMetadata([out] IVssAsync **async);
53*3904423dSOleg Dubinskiy    HRESULT GetWriterMetadataCount([out] UINT *count);
54*3904423dSOleg Dubinskiy    HRESULT GetWriterMetadata([in] UINT index, [out] VSS_ID *instance, [out] IVssExamineWriterMetadata **metadata);
55*3904423dSOleg Dubinskiy    HRESULT FreeWriterMetadata();
56*3904423dSOleg Dubinskiy    HRESULT AddComponent([in] VSS_ID instance, [in] VSS_ID id, [in] VSS_COMPONENT_TYPE ct, [in] LPCWSTR wszLogicalPath,
57*3904423dSOleg Dubinskiy            [in] LPCWSTR name);
58*3904423dSOleg Dubinskiy    HRESULT PrepareForBackup([out] IVssAsync **async);
59*3904423dSOleg Dubinskiy    HRESULT AbortBackup();
60*3904423dSOleg Dubinskiy    HRESULT GatherWriterStatus([out] IVssAsync **async);
61*3904423dSOleg Dubinskiy    HRESULT GetWriterStatusCount([out] UINT *count);
62*3904423dSOleg Dubinskiy    HRESULT FreeWriterStatus();
63*3904423dSOleg Dubinskiy    HRESULT GetWriterStatus([in] UINT index, [out] VSS_ID *instance, [out] VSS_ID *id, [out] BSTR *writer,
64*3904423dSOleg Dubinskiy            [out] VSS_WRITER_STATE *status, [out] HRESULT *failure);
65*3904423dSOleg Dubinskiy    HRESULT SetBackupSucceeded([in] VSS_ID instance, [in] VSS_ID id, [in] VSS_COMPONENT_TYPE ct,
66*3904423dSOleg Dubinskiy            [in] LPCWSTR path, [in] LPCWSTR name, [in] BOOL succeded);
67*3904423dSOleg Dubinskiy    HRESULT SetBackupOptions([in] VSS_ID id, [in] VSS_COMPONENT_TYPE ct, [in] LPCWSTR path,
68*3904423dSOleg Dubinskiy            [in] LPCWSTR name, [in] LPCWSTR options);
69*3904423dSOleg Dubinskiy    HRESULT SetSelectedForRestore([in] VSS_ID id, [in] VSS_COMPONENT_TYPE ct, [in] LPCWSTR path,
70*3904423dSOleg Dubinskiy            [in] LPCWSTR name, [in] BOOL selected_restore);
71*3904423dSOleg Dubinskiy    HRESULT SetRestoreOptions([in] VSS_ID id, [in] VSS_COMPONENT_TYPE ct, [in] LPCWSTR path, [in] LPCWSTR name,
72*3904423dSOleg Dubinskiy            [in] LPCWSTR options);
73*3904423dSOleg Dubinskiy    HRESULT SetAdditionalRestores([in] VSS_ID id, [in] VSS_COMPONENT_TYPE ct, [in] LPCWSTR path, [in] LPCWSTR name,
74*3904423dSOleg Dubinskiy            [in] BOOL additional);
75*3904423dSOleg Dubinskiy    HRESULT SetPreviousBackupStamp([in] VSS_ID id, [in] VSS_COMPONENT_TYPE ct, [in] LPCWSTR path,  [in] LPCWSTR name,
76*3904423dSOleg Dubinskiy            [in] LPCWSTR stamp);
77*3904423dSOleg Dubinskiy    HRESULT SaveAsXML([in] BSTR *xml);
78*3904423dSOleg Dubinskiy    HRESULT BackupComplete([out] IVssAsync **async);
79*3904423dSOleg Dubinskiy    HRESULT AddAlternativeLocationMapping([in] VSS_ID id, [in] VSS_COMPONENT_TYPE type, [in] LPCWSTR logical,
80*3904423dSOleg Dubinskiy            [in] LPCWSTR name, [in] LPCWSTR path, [in] LPCWSTR filespec, [in] BOOL recursive, [in] LPCWSTR destination);
81*3904423dSOleg Dubinskiy    HRESULT AddRestoreSubcomponent([in] VSS_ID id, [in] VSS_COMPONENT_TYPE type, [in] LPCWSTR logical, [in] LPCWSTR name,
82*3904423dSOleg Dubinskiy            [in] LPCWSTR path, [in] LPCWSTR sub_name, [in] BOOL repair);
83*3904423dSOleg Dubinskiy    HRESULT SetFileRestoreStatus([in] VSS_ID id, [in] VSS_COMPONENT_TYPE ct, [in] LPCWSTR path,  [in] LPCWSTR name,
84*3904423dSOleg Dubinskiy            [in] VSS_FILE_RESTORE_STATUS status);
85*3904423dSOleg Dubinskiy    HRESULT AddNewTarget([in] VSS_ID id, [in] VSS_COMPONENT_TYPE ct, [in] LPCWSTR logical, [in] LPCWSTR component,
86*3904423dSOleg Dubinskiy            [in] LPCWSTR path, [in] LPCWSTR filename, [in] BOOL recursive, [in] LPCWSTR alternate);
87*3904423dSOleg Dubinskiy    HRESULT SetRangesFilePath([in] VSS_ID id, [in] VSS_COMPONENT_TYPE ct, [in] LPCWSTR logical, [in] LPCWSTR component,
88*3904423dSOleg Dubinskiy            [in] UINT partial,  [in] LPCWSTR ranges);
89*3904423dSOleg Dubinskiy    HRESULT PreRestore([out] IVssAsync **async);
90*3904423dSOleg Dubinskiy    HRESULT PostRestore([out] IVssAsync **async);
91*3904423dSOleg Dubinskiy    HRESULT SetContext([in] LONG context);
92*3904423dSOleg Dubinskiy    HRESULT StartSnapshotSet([out] VSS_ID *id);
93*3904423dSOleg Dubinskiy    HRESULT AddToSnapshotSet([in] VSS_PWSZ volume,[in] VSS_ID id,[out] VSS_ID *snapshot);
94*3904423dSOleg Dubinskiy    HRESULT DoSnapshotSet([out] IVssAsync ** async);
95*3904423dSOleg Dubinskiy    HRESULT DeleteSnapshots([in] VSS_ID object, [in] VSS_OBJECT_TYPE type, [in] BOOL force, [in] LONG *snapshots, [in] VSS_ID *id);
96*3904423dSOleg Dubinskiy    HRESULT ImportSnapshots([out] IVssAsync **async);
97*3904423dSOleg Dubinskiy    HRESULT BreakSnapshotSet([in] VSS_ID snapshot);
98*3904423dSOleg Dubinskiy    HRESULT GetSnapshotProperties([in] VSS_ID snapshot, [out] VSS_SNAPSHOT_PROP *prop);
99*3904423dSOleg Dubinskiy    HRESULT Query([in] VSS_ID queried, [in] VSS_OBJECT_TYPE queried_type, [in] VSS_OBJECT_TYPE returned_type, [in] IVssEnumObject **enums);
100*3904423dSOleg Dubinskiy    HRESULT IsVolumeSupported([in] VSS_ID provider, [in] VSS_PWSZ volume,[in] BOOL *supported);
101*3904423dSOleg Dubinskiy    HRESULT DisableWriterClasses([in] const VSS_ID *writer_id, [in] UINT class_id);
102*3904423dSOleg Dubinskiy    HRESULT EnableWriterClasses([in] const VSS_ID *classid, [in] UINT id);
103*3904423dSOleg Dubinskiy    HRESULT DisableWriterInstances([in] const VSS_ID *instance, [in] UINT id);
104*3904423dSOleg Dubinskiy    HRESULT ExposeSnapshot([in] VSS_ID snapshot, [in] VSS_PWSZ path, [in] LONG attributes,
105*3904423dSOleg Dubinskiy            [in] VSS_PWSZ expose, [out] VSS_PWSZ *exposed);
106*3904423dSOleg Dubinskiy    HRESULT RevertToSnapshot([in] VSS_ID snapshot, [in] BOOL force);
107*3904423dSOleg Dubinskiy    HRESULT QueryRevertStatus([in] VSS_PWSZ volume, [out] IVssAsync **async);
108*3904423dSOleg Dubinskiy};
109