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