zigwin32/win32/storage/file_history.zig

635 lines
33 KiB
Zig

//! NOTE: this file is autogenerated, DO NOT MODIFY
//--------------------------------------------------------------------------------
// Section: Constants (42)
//--------------------------------------------------------------------------------
pub const FHCFG_E_CORRUPT_CONFIG_FILE = @import("../zig.zig").typedConst(HRESULT, @as(i32, -2147220736));
pub const FHCFG_E_CONFIG_FILE_NOT_FOUND = @import("../zig.zig").typedConst(HRESULT, @as(i32, -2147220735));
pub const FHCFG_E_CONFIG_ALREADY_EXISTS = @import("../zig.zig").typedConst(HRESULT, @as(i32, -2147220734));
pub const FHCFG_E_NO_VALID_CONFIGURATION_LOADED = @import("../zig.zig").typedConst(HRESULT, @as(i32, -2147220733));
pub const FHCFG_E_TARGET_NOT_CONNECTED = @import("../zig.zig").typedConst(HRESULT, @as(i32, -2147220732));
pub const FHCFG_E_CONFIGURATION_PREVIOUSLY_LOADED = @import("../zig.zig").typedConst(HRESULT, @as(i32, -2147220731));
pub const FHCFG_E_TARGET_VERIFICATION_FAILED = @import("../zig.zig").typedConst(HRESULT, @as(i32, -2147220730));
pub const FHCFG_E_TARGET_NOT_CONFIGURED = @import("../zig.zig").typedConst(HRESULT, @as(i32, -2147220729));
pub const FHCFG_E_TARGET_NOT_ENOUGH_FREE_SPACE = @import("../zig.zig").typedConst(HRESULT, @as(i32, -2147220728));
pub const FHCFG_E_TARGET_CANNOT_BE_USED = @import("../zig.zig").typedConst(HRESULT, @as(i32, -2147220727));
pub const FHCFG_E_INVALID_REHYDRATION_STATE = @import("../zig.zig").typedConst(HRESULT, @as(i32, -2147220726));
pub const FHCFG_E_RECOMMENDATION_CHANGE_NOT_ALLOWED = @import("../zig.zig").typedConst(HRESULT, @as(i32, -2147220720));
pub const FHCFG_E_TARGET_REHYDRATED_ELSEWHERE = @import("../zig.zig").typedConst(HRESULT, @as(i32, -2147220719));
pub const FHCFG_E_LEGACY_TARGET_UNSUPPORTED = @import("../zig.zig").typedConst(HRESULT, @as(i32, -2147220718));
pub const FHCFG_E_LEGACY_TARGET_VALIDATION_UNSUPPORTED = @import("../zig.zig").typedConst(HRESULT, @as(i32, -2147220717));
pub const FHCFG_E_LEGACY_BACKUP_USER_EXCLUDED = @import("../zig.zig").typedConst(HRESULT, @as(i32, -2147220716));
pub const FHCFG_E_LEGACY_BACKUP_NOT_FOUND = @import("../zig.zig").typedConst(HRESULT, @as(i32, -2147220715));
pub const FHSVC_E_BACKUP_BLOCKED = @import("../zig.zig").typedConst(HRESULT, @as(i32, -2147219968));
pub const FHSVC_E_NOT_CONFIGURED = @import("../zig.zig").typedConst(HRESULT, @as(i32, -2147219967));
pub const FHSVC_E_CONFIG_DISABLED = @import("../zig.zig").typedConst(HRESULT, @as(i32, -2147219966));
pub const FHSVC_E_CONFIG_DISABLED_GP = @import("../zig.zig").typedConst(HRESULT, @as(i32, -2147219965));
pub const FHSVC_E_FATAL_CONFIG_ERROR = @import("../zig.zig").typedConst(HRESULT, @as(i32, -2147219964));
pub const FHSVC_E_CONFIG_REHYDRATING = @import("../zig.zig").typedConst(HRESULT, @as(i32, -2147219963));
pub const FH_STATE_NOT_TRACKED = @as(u32, 0);
pub const FH_STATE_OFF = @as(u32, 1);
pub const FH_STATE_DISABLED_BY_GP = @as(u32, 2);
pub const FH_STATE_FATAL_CONFIG_ERROR = @as(u32, 3);
pub const FH_STATE_MIGRATING = @as(u32, 4);
pub const FH_STATE_REHYDRATING = @as(u32, 5);
pub const FH_STATE_TARGET_FS_LIMITATION = @as(u32, 13);
pub const FH_STATE_TARGET_ACCESS_DENIED = @as(u32, 14);
pub const FH_STATE_TARGET_VOLUME_DIRTY = @as(u32, 15);
pub const FH_STATE_TARGET_FULL_RETENTION_MAX = @as(u32, 16);
pub const FH_STATE_TARGET_FULL = @as(u32, 17);
pub const FH_STATE_STAGING_FULL = @as(u32, 18);
pub const FH_STATE_TARGET_LOW_SPACE_RETENTION_MAX = @as(u32, 19);
pub const FH_STATE_TARGET_LOW_SPACE = @as(u32, 20);
pub const FH_STATE_TARGET_ABSENT = @as(u32, 21);
pub const FH_STATE_TOO_MUCH_BEHIND = @as(u32, 240);
pub const FH_STATE_NO_ERROR = @as(u32, 255);
pub const FH_STATE_BACKUP_NOT_SUPPORTED = @as(u32, 2064);
pub const FH_STATE_RUNNING = @as(u32, 256);
//--------------------------------------------------------------------------------
// Section: Types (14)
//--------------------------------------------------------------------------------
const CLSID_FhConfigMgr_Value = Guid.initString("ed43bb3c-09e9-498a-9df6-2177244c6db4");
pub const CLSID_FhConfigMgr = &CLSID_FhConfigMgr_Value;
const CLSID_FhReassociation_Value = Guid.initString("4d728e35-16fa-4320-9e8b-bfd7100a8846");
pub const CLSID_FhReassociation = &CLSID_FhReassociation_Value;
pub const FH_TARGET_PROPERTY_TYPE = enum(i32) {
FH_TARGET_NAME = 0,
FH_TARGET_URL = 1,
FH_TARGET_DRIVE_TYPE = 2,
MAX_TARGET_PROPERTY = 3,
};
pub const FH_TARGET_NAME = FH_TARGET_PROPERTY_TYPE.FH_TARGET_NAME;
pub const FH_TARGET_URL = FH_TARGET_PROPERTY_TYPE.FH_TARGET_URL;
pub const FH_TARGET_DRIVE_TYPE = FH_TARGET_PROPERTY_TYPE.FH_TARGET_DRIVE_TYPE;
pub const MAX_TARGET_PROPERTY = FH_TARGET_PROPERTY_TYPE.MAX_TARGET_PROPERTY;
pub const FH_TARGET_DRIVE_TYPES = enum(i32) {
UNKNOWN = 0,
REMOVABLE = 2,
FIXED = 3,
REMOTE = 4,
};
pub const FH_DRIVE_UNKNOWN = FH_TARGET_DRIVE_TYPES.UNKNOWN;
pub const FH_DRIVE_REMOVABLE = FH_TARGET_DRIVE_TYPES.REMOVABLE;
pub const FH_DRIVE_FIXED = FH_TARGET_DRIVE_TYPES.FIXED;
pub const FH_DRIVE_REMOTE = FH_TARGET_DRIVE_TYPES.REMOTE;
// TODO: this type is limited to platform 'windows8.0'
const IID_IFhTarget_Value = Guid.initString("d87965fd-2bad-4657-bd3b-9567eb300ced");
pub const IID_IFhTarget = &IID_IFhTarget_Value;
pub const IFhTarget = extern struct {
pub const VTable = extern struct {
base: IUnknown.VTable,
GetStringProperty: switch (@import("builtin").zig_backend) {
.stage1 => fn(
self: *const IFhTarget,
PropertyType: FH_TARGET_PROPERTY_TYPE,
PropertyValue: ?*?BSTR,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
else => *const fn(
self: *const IFhTarget,
PropertyType: FH_TARGET_PROPERTY_TYPE,
PropertyValue: ?*?BSTR,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
},
GetNumericalProperty: switch (@import("builtin").zig_backend) {
.stage1 => fn(
self: *const IFhTarget,
PropertyType: FH_TARGET_PROPERTY_TYPE,
PropertyValue: ?*u64,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
else => *const fn(
self: *const IFhTarget,
PropertyType: FH_TARGET_PROPERTY_TYPE,
PropertyValue: ?*u64,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
},
};
vtable: *const VTable,
pub fn MethodMixin(comptime T: type) type { return struct {
pub usingnamespace IUnknown.MethodMixin(T);
// NOTE: method is namespaced with interface name to avoid conflicts for now
pub fn IFhTarget_GetStringProperty(self: *const T, PropertyType: FH_TARGET_PROPERTY_TYPE, PropertyValue: ?*?BSTR) callconv(.Inline) HRESULT {
return @as(*const IFhTarget.VTable, @ptrCast(self.vtable)).GetStringProperty(@as(*const IFhTarget, @ptrCast(self)), PropertyType, PropertyValue);
}
// NOTE: method is namespaced with interface name to avoid conflicts for now
pub fn IFhTarget_GetNumericalProperty(self: *const T, PropertyType: FH_TARGET_PROPERTY_TYPE, PropertyValue: ?*u64) callconv(.Inline) HRESULT {
return @as(*const IFhTarget.VTable, @ptrCast(self.vtable)).GetNumericalProperty(@as(*const IFhTarget, @ptrCast(self)), PropertyType, PropertyValue);
}
};}
pub usingnamespace MethodMixin(@This());
};
// TODO: this type is limited to platform 'windows8.0'
const IID_IFhScopeIterator_Value = Guid.initString("3197abce-532a-44c6-8615-f3666566a720");
pub const IID_IFhScopeIterator = &IID_IFhScopeIterator_Value;
pub const IFhScopeIterator = extern struct {
pub const VTable = extern struct {
base: IUnknown.VTable,
MoveToNextItem: switch (@import("builtin").zig_backend) {
.stage1 => fn(
self: *const IFhScopeIterator,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
else => *const fn(
self: *const IFhScopeIterator,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
},
GetItem: switch (@import("builtin").zig_backend) {
.stage1 => fn(
self: *const IFhScopeIterator,
Item: ?*?BSTR,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
else => *const fn(
self: *const IFhScopeIterator,
Item: ?*?BSTR,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
},
};
vtable: *const VTable,
pub fn MethodMixin(comptime T: type) type { return struct {
pub usingnamespace IUnknown.MethodMixin(T);
// NOTE: method is namespaced with interface name to avoid conflicts for now
pub fn IFhScopeIterator_MoveToNextItem(self: *const T) callconv(.Inline) HRESULT {
return @as(*const IFhScopeIterator.VTable, @ptrCast(self.vtable)).MoveToNextItem(@as(*const IFhScopeIterator, @ptrCast(self)));
}
// NOTE: method is namespaced with interface name to avoid conflicts for now
pub fn IFhScopeIterator_GetItem(self: *const T, Item: ?*?BSTR) callconv(.Inline) HRESULT {
return @as(*const IFhScopeIterator.VTable, @ptrCast(self.vtable)).GetItem(@as(*const IFhScopeIterator, @ptrCast(self)), Item);
}
};}
pub usingnamespace MethodMixin(@This());
};
pub const FH_PROTECTED_ITEM_CATEGORY = enum(i32) {
FH_FOLDER = 0,
FH_LIBRARY = 1,
MAX_PROTECTED_ITEM_CATEGORY = 2,
};
pub const FH_FOLDER = FH_PROTECTED_ITEM_CATEGORY.FH_FOLDER;
pub const FH_LIBRARY = FH_PROTECTED_ITEM_CATEGORY.FH_LIBRARY;
pub const MAX_PROTECTED_ITEM_CATEGORY = FH_PROTECTED_ITEM_CATEGORY.MAX_PROTECTED_ITEM_CATEGORY;
pub const FH_LOCAL_POLICY_TYPE = enum(i32) {
FH_FREQUENCY = 0,
FH_RETENTION_TYPE = 1,
FH_RETENTION_AGE = 2,
MAX_LOCAL_POLICY = 3,
};
pub const FH_FREQUENCY = FH_LOCAL_POLICY_TYPE.FH_FREQUENCY;
pub const FH_RETENTION_TYPE = FH_LOCAL_POLICY_TYPE.FH_RETENTION_TYPE;
pub const FH_RETENTION_AGE = FH_LOCAL_POLICY_TYPE.FH_RETENTION_AGE;
pub const MAX_LOCAL_POLICY = FH_LOCAL_POLICY_TYPE.MAX_LOCAL_POLICY;
pub const FH_RETENTION_TYPES = enum(i32) {
FH_RETENTION_DISABLED = 0,
FH_RETENTION_UNLIMITED = 1,
FH_RETENTION_AGE_BASED = 2,
MAX_RETENTION_TYPE = 3,
};
pub const FH_RETENTION_DISABLED = FH_RETENTION_TYPES.FH_RETENTION_DISABLED;
pub const FH_RETENTION_UNLIMITED = FH_RETENTION_TYPES.FH_RETENTION_UNLIMITED;
pub const FH_RETENTION_AGE_BASED = FH_RETENTION_TYPES.FH_RETENTION_AGE_BASED;
pub const MAX_RETENTION_TYPE = FH_RETENTION_TYPES.MAX_RETENTION_TYPE;
pub const FH_BACKUP_STATUS = enum(i32) {
FH_STATUS_DISABLED = 0,
FH_STATUS_DISABLED_BY_GP = 1,
FH_STATUS_ENABLED = 2,
FH_STATUS_REHYDRATING = 3,
MAX_BACKUP_STATUS = 4,
};
pub const FH_STATUS_DISABLED = FH_BACKUP_STATUS.FH_STATUS_DISABLED;
pub const FH_STATUS_DISABLED_BY_GP = FH_BACKUP_STATUS.FH_STATUS_DISABLED_BY_GP;
pub const FH_STATUS_ENABLED = FH_BACKUP_STATUS.FH_STATUS_ENABLED;
pub const FH_STATUS_REHYDRATING = FH_BACKUP_STATUS.FH_STATUS_REHYDRATING;
pub const MAX_BACKUP_STATUS = FH_BACKUP_STATUS.MAX_BACKUP_STATUS;
pub const FH_DEVICE_VALIDATION_RESULT = enum(i32) {
FH_ACCESS_DENIED = 0,
FH_INVALID_DRIVE_TYPE = 1,
FH_READ_ONLY_PERMISSION = 2,
FH_CURRENT_DEFAULT = 3,
FH_NAMESPACE_EXISTS = 4,
FH_TARGET_PART_OF_LIBRARY = 5,
FH_VALID_TARGET = 6,
MAX_VALIDATION_RESULT = 7,
};
pub const FH_ACCESS_DENIED = FH_DEVICE_VALIDATION_RESULT.FH_ACCESS_DENIED;
pub const FH_INVALID_DRIVE_TYPE = FH_DEVICE_VALIDATION_RESULT.FH_INVALID_DRIVE_TYPE;
pub const FH_READ_ONLY_PERMISSION = FH_DEVICE_VALIDATION_RESULT.FH_READ_ONLY_PERMISSION;
pub const FH_CURRENT_DEFAULT = FH_DEVICE_VALIDATION_RESULT.FH_CURRENT_DEFAULT;
pub const FH_NAMESPACE_EXISTS = FH_DEVICE_VALIDATION_RESULT.FH_NAMESPACE_EXISTS;
pub const FH_TARGET_PART_OF_LIBRARY = FH_DEVICE_VALIDATION_RESULT.FH_TARGET_PART_OF_LIBRARY;
pub const FH_VALID_TARGET = FH_DEVICE_VALIDATION_RESULT.FH_VALID_TARGET;
pub const MAX_VALIDATION_RESULT = FH_DEVICE_VALIDATION_RESULT.MAX_VALIDATION_RESULT;
// TODO: this type is limited to platform 'windows8.0'
const IID_IFhConfigMgr_Value = Guid.initString("6a5fea5b-bf8f-4ee5-b8c3-44d8a0d7331c");
pub const IID_IFhConfigMgr = &IID_IFhConfigMgr_Value;
pub const IFhConfigMgr = extern struct {
pub const VTable = extern struct {
base: IUnknown.VTable,
LoadConfiguration: switch (@import("builtin").zig_backend) {
.stage1 => fn(
self: *const IFhConfigMgr,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
else => *const fn(
self: *const IFhConfigMgr,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
},
CreateDefaultConfiguration: switch (@import("builtin").zig_backend) {
.stage1 => fn(
self: *const IFhConfigMgr,
OverwriteIfExists: BOOL,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
else => *const fn(
self: *const IFhConfigMgr,
OverwriteIfExists: BOOL,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
},
SaveConfiguration: switch (@import("builtin").zig_backend) {
.stage1 => fn(
self: *const IFhConfigMgr,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
else => *const fn(
self: *const IFhConfigMgr,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
},
AddRemoveExcludeRule: switch (@import("builtin").zig_backend) {
.stage1 => fn(
self: *const IFhConfigMgr,
Add: BOOL,
Category: FH_PROTECTED_ITEM_CATEGORY,
Item: ?BSTR,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
else => *const fn(
self: *const IFhConfigMgr,
Add: BOOL,
Category: FH_PROTECTED_ITEM_CATEGORY,
Item: ?BSTR,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
},
GetIncludeExcludeRules: switch (@import("builtin").zig_backend) {
.stage1 => fn(
self: *const IFhConfigMgr,
Include: BOOL,
Category: FH_PROTECTED_ITEM_CATEGORY,
Iterator: ?*?*IFhScopeIterator,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
else => *const fn(
self: *const IFhConfigMgr,
Include: BOOL,
Category: FH_PROTECTED_ITEM_CATEGORY,
Iterator: ?*?*IFhScopeIterator,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
},
GetLocalPolicy: switch (@import("builtin").zig_backend) {
.stage1 => fn(
self: *const IFhConfigMgr,
LocalPolicyType: FH_LOCAL_POLICY_TYPE,
PolicyValue: ?*u64,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
else => *const fn(
self: *const IFhConfigMgr,
LocalPolicyType: FH_LOCAL_POLICY_TYPE,
PolicyValue: ?*u64,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
},
SetLocalPolicy: switch (@import("builtin").zig_backend) {
.stage1 => fn(
self: *const IFhConfigMgr,
LocalPolicyType: FH_LOCAL_POLICY_TYPE,
PolicyValue: u64,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
else => *const fn(
self: *const IFhConfigMgr,
LocalPolicyType: FH_LOCAL_POLICY_TYPE,
PolicyValue: u64,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
},
GetBackupStatus: switch (@import("builtin").zig_backend) {
.stage1 => fn(
self: *const IFhConfigMgr,
BackupStatus: ?*FH_BACKUP_STATUS,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
else => *const fn(
self: *const IFhConfigMgr,
BackupStatus: ?*FH_BACKUP_STATUS,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
},
SetBackupStatus: switch (@import("builtin").zig_backend) {
.stage1 => fn(
self: *const IFhConfigMgr,
BackupStatus: FH_BACKUP_STATUS,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
else => *const fn(
self: *const IFhConfigMgr,
BackupStatus: FH_BACKUP_STATUS,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
},
GetDefaultTarget: switch (@import("builtin").zig_backend) {
.stage1 => fn(
self: *const IFhConfigMgr,
DefaultTarget: ?*?*IFhTarget,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
else => *const fn(
self: *const IFhConfigMgr,
DefaultTarget: ?*?*IFhTarget,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
},
ValidateTarget: switch (@import("builtin").zig_backend) {
.stage1 => fn(
self: *const IFhConfigMgr,
TargetUrl: ?BSTR,
ValidationResult: ?*FH_DEVICE_VALIDATION_RESULT,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
else => *const fn(
self: *const IFhConfigMgr,
TargetUrl: ?BSTR,
ValidationResult: ?*FH_DEVICE_VALIDATION_RESULT,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
},
ProvisionAndSetNewTarget: switch (@import("builtin").zig_backend) {
.stage1 => fn(
self: *const IFhConfigMgr,
TargetUrl: ?BSTR,
TargetName: ?BSTR,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
else => *const fn(
self: *const IFhConfigMgr,
TargetUrl: ?BSTR,
TargetName: ?BSTR,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
},
ChangeDefaultTargetRecommendation: switch (@import("builtin").zig_backend) {
.stage1 => fn(
self: *const IFhConfigMgr,
Recommend: BOOL,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
else => *const fn(
self: *const IFhConfigMgr,
Recommend: BOOL,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
},
QueryProtectionStatus: switch (@import("builtin").zig_backend) {
.stage1 => fn(
self: *const IFhConfigMgr,
ProtectionState: ?*u32,
ProtectedUntilTime: ?*?BSTR,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
else => *const fn(
self: *const IFhConfigMgr,
ProtectionState: ?*u32,
ProtectedUntilTime: ?*?BSTR,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
},
};
vtable: *const VTable,
pub fn MethodMixin(comptime T: type) type { return struct {
pub usingnamespace IUnknown.MethodMixin(T);
// NOTE: method is namespaced with interface name to avoid conflicts for now
pub fn IFhConfigMgr_LoadConfiguration(self: *const T) callconv(.Inline) HRESULT {
return @as(*const IFhConfigMgr.VTable, @ptrCast(self.vtable)).LoadConfiguration(@as(*const IFhConfigMgr, @ptrCast(self)));
}
// NOTE: method is namespaced with interface name to avoid conflicts for now
pub fn IFhConfigMgr_CreateDefaultConfiguration(self: *const T, OverwriteIfExists: BOOL) callconv(.Inline) HRESULT {
return @as(*const IFhConfigMgr.VTable, @ptrCast(self.vtable)).CreateDefaultConfiguration(@as(*const IFhConfigMgr, @ptrCast(self)), OverwriteIfExists);
}
// NOTE: method is namespaced with interface name to avoid conflicts for now
pub fn IFhConfigMgr_SaveConfiguration(self: *const T) callconv(.Inline) HRESULT {
return @as(*const IFhConfigMgr.VTable, @ptrCast(self.vtable)).SaveConfiguration(@as(*const IFhConfigMgr, @ptrCast(self)));
}
// NOTE: method is namespaced with interface name to avoid conflicts for now
pub fn IFhConfigMgr_AddRemoveExcludeRule(self: *const T, Add: BOOL, Category: FH_PROTECTED_ITEM_CATEGORY, Item: ?BSTR) callconv(.Inline) HRESULT {
return @as(*const IFhConfigMgr.VTable, @ptrCast(self.vtable)).AddRemoveExcludeRule(@as(*const IFhConfigMgr, @ptrCast(self)), Add, Category, Item);
}
// NOTE: method is namespaced with interface name to avoid conflicts for now
pub fn IFhConfigMgr_GetIncludeExcludeRules(self: *const T, Include: BOOL, Category: FH_PROTECTED_ITEM_CATEGORY, Iterator: ?*?*IFhScopeIterator) callconv(.Inline) HRESULT {
return @as(*const IFhConfigMgr.VTable, @ptrCast(self.vtable)).GetIncludeExcludeRules(@as(*const IFhConfigMgr, @ptrCast(self)), Include, Category, Iterator);
}
// NOTE: method is namespaced with interface name to avoid conflicts for now
pub fn IFhConfigMgr_GetLocalPolicy(self: *const T, LocalPolicyType: FH_LOCAL_POLICY_TYPE, PolicyValue: ?*u64) callconv(.Inline) HRESULT {
return @as(*const IFhConfigMgr.VTable, @ptrCast(self.vtable)).GetLocalPolicy(@as(*const IFhConfigMgr, @ptrCast(self)), LocalPolicyType, PolicyValue);
}
// NOTE: method is namespaced with interface name to avoid conflicts for now
pub fn IFhConfigMgr_SetLocalPolicy(self: *const T, LocalPolicyType: FH_LOCAL_POLICY_TYPE, PolicyValue: u64) callconv(.Inline) HRESULT {
return @as(*const IFhConfigMgr.VTable, @ptrCast(self.vtable)).SetLocalPolicy(@as(*const IFhConfigMgr, @ptrCast(self)), LocalPolicyType, PolicyValue);
}
// NOTE: method is namespaced with interface name to avoid conflicts for now
pub fn IFhConfigMgr_GetBackupStatus(self: *const T, BackupStatus: ?*FH_BACKUP_STATUS) callconv(.Inline) HRESULT {
return @as(*const IFhConfigMgr.VTable, @ptrCast(self.vtable)).GetBackupStatus(@as(*const IFhConfigMgr, @ptrCast(self)), BackupStatus);
}
// NOTE: method is namespaced with interface name to avoid conflicts for now
pub fn IFhConfigMgr_SetBackupStatus(self: *const T, BackupStatus: FH_BACKUP_STATUS) callconv(.Inline) HRESULT {
return @as(*const IFhConfigMgr.VTable, @ptrCast(self.vtable)).SetBackupStatus(@as(*const IFhConfigMgr, @ptrCast(self)), BackupStatus);
}
// NOTE: method is namespaced with interface name to avoid conflicts for now
pub fn IFhConfigMgr_GetDefaultTarget(self: *const T, DefaultTarget: ?*?*IFhTarget) callconv(.Inline) HRESULT {
return @as(*const IFhConfigMgr.VTable, @ptrCast(self.vtable)).GetDefaultTarget(@as(*const IFhConfigMgr, @ptrCast(self)), DefaultTarget);
}
// NOTE: method is namespaced with interface name to avoid conflicts for now
pub fn IFhConfigMgr_ValidateTarget(self: *const T, TargetUrl: ?BSTR, ValidationResult: ?*FH_DEVICE_VALIDATION_RESULT) callconv(.Inline) HRESULT {
return @as(*const IFhConfigMgr.VTable, @ptrCast(self.vtable)).ValidateTarget(@as(*const IFhConfigMgr, @ptrCast(self)), TargetUrl, ValidationResult);
}
// NOTE: method is namespaced with interface name to avoid conflicts for now
pub fn IFhConfigMgr_ProvisionAndSetNewTarget(self: *const T, TargetUrl: ?BSTR, TargetName: ?BSTR) callconv(.Inline) HRESULT {
return @as(*const IFhConfigMgr.VTable, @ptrCast(self.vtable)).ProvisionAndSetNewTarget(@as(*const IFhConfigMgr, @ptrCast(self)), TargetUrl, TargetName);
}
// NOTE: method is namespaced with interface name to avoid conflicts for now
pub fn IFhConfigMgr_ChangeDefaultTargetRecommendation(self: *const T, Recommend: BOOL) callconv(.Inline) HRESULT {
return @as(*const IFhConfigMgr.VTable, @ptrCast(self.vtable)).ChangeDefaultTargetRecommendation(@as(*const IFhConfigMgr, @ptrCast(self)), Recommend);
}
// NOTE: method is namespaced with interface name to avoid conflicts for now
pub fn IFhConfigMgr_QueryProtectionStatus(self: *const T, ProtectionState: ?*u32, ProtectedUntilTime: ?*?BSTR) callconv(.Inline) HRESULT {
return @as(*const IFhConfigMgr.VTable, @ptrCast(self.vtable)).QueryProtectionStatus(@as(*const IFhConfigMgr, @ptrCast(self)), ProtectionState, ProtectedUntilTime);
}
};}
pub usingnamespace MethodMixin(@This());
};
// TODO: this type is limited to platform 'windows8.0'
const IID_IFhReassociation_Value = Guid.initString("6544a28a-f68d-47ac-91ef-16b2b36aa3ee");
pub const IID_IFhReassociation = &IID_IFhReassociation_Value;
pub const IFhReassociation = extern struct {
pub const VTable = extern struct {
base: IUnknown.VTable,
ValidateTarget: switch (@import("builtin").zig_backend) {
.stage1 => fn(
self: *const IFhReassociation,
TargetUrl: ?BSTR,
ValidationResult: ?*FH_DEVICE_VALIDATION_RESULT,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
else => *const fn(
self: *const IFhReassociation,
TargetUrl: ?BSTR,
ValidationResult: ?*FH_DEVICE_VALIDATION_RESULT,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
},
ScanTargetForConfigurations: switch (@import("builtin").zig_backend) {
.stage1 => fn(
self: *const IFhReassociation,
TargetUrl: ?BSTR,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
else => *const fn(
self: *const IFhReassociation,
TargetUrl: ?BSTR,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
},
GetConfigurationDetails: switch (@import("builtin").zig_backend) {
.stage1 => fn(
self: *const IFhReassociation,
Index: u32,
UserName: ?*?BSTR,
PcName: ?*?BSTR,
BackupTime: ?*FILETIME,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
else => *const fn(
self: *const IFhReassociation,
Index: u32,
UserName: ?*?BSTR,
PcName: ?*?BSTR,
BackupTime: ?*FILETIME,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
},
SelectConfiguration: switch (@import("builtin").zig_backend) {
.stage1 => fn(
self: *const IFhReassociation,
Index: u32,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
else => *const fn(
self: *const IFhReassociation,
Index: u32,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
},
PerformReassociation: switch (@import("builtin").zig_backend) {
.stage1 => fn(
self: *const IFhReassociation,
OverwriteIfExists: BOOL,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
else => *const fn(
self: *const IFhReassociation,
OverwriteIfExists: BOOL,
) callconv(@import("std").os.windows.WINAPI) HRESULT,
},
};
vtable: *const VTable,
pub fn MethodMixin(comptime T: type) type { return struct {
pub usingnamespace IUnknown.MethodMixin(T);
// NOTE: method is namespaced with interface name to avoid conflicts for now
pub fn IFhReassociation_ValidateTarget(self: *const T, TargetUrl: ?BSTR, ValidationResult: ?*FH_DEVICE_VALIDATION_RESULT) callconv(.Inline) HRESULT {
return @as(*const IFhReassociation.VTable, @ptrCast(self.vtable)).ValidateTarget(@as(*const IFhReassociation, @ptrCast(self)), TargetUrl, ValidationResult);
}
// NOTE: method is namespaced with interface name to avoid conflicts for now
pub fn IFhReassociation_ScanTargetForConfigurations(self: *const T, TargetUrl: ?BSTR) callconv(.Inline) HRESULT {
return @as(*const IFhReassociation.VTable, @ptrCast(self.vtable)).ScanTargetForConfigurations(@as(*const IFhReassociation, @ptrCast(self)), TargetUrl);
}
// NOTE: method is namespaced with interface name to avoid conflicts for now
pub fn IFhReassociation_GetConfigurationDetails(self: *const T, Index: u32, UserName: ?*?BSTR, PcName: ?*?BSTR, BackupTime: ?*FILETIME) callconv(.Inline) HRESULT {
return @as(*const IFhReassociation.VTable, @ptrCast(self.vtable)).GetConfigurationDetails(@as(*const IFhReassociation, @ptrCast(self)), Index, UserName, PcName, BackupTime);
}
// NOTE: method is namespaced with interface name to avoid conflicts for now
pub fn IFhReassociation_SelectConfiguration(self: *const T, Index: u32) callconv(.Inline) HRESULT {
return @as(*const IFhReassociation.VTable, @ptrCast(self.vtable)).SelectConfiguration(@as(*const IFhReassociation, @ptrCast(self)), Index);
}
// NOTE: method is namespaced with interface name to avoid conflicts for now
pub fn IFhReassociation_PerformReassociation(self: *const T, OverwriteIfExists: BOOL) callconv(.Inline) HRESULT {
return @as(*const IFhReassociation.VTable, @ptrCast(self.vtable)).PerformReassociation(@as(*const IFhReassociation, @ptrCast(self)), OverwriteIfExists);
}
};}
pub usingnamespace MethodMixin(@This());
};
pub const FhBackupStopReason = enum(i32) {
InvalidStopReason = 0,
LimitUserBusyMachineOnAC = 1,
LimitUserIdleMachineOnDC = 2,
LimitUserBusyMachineOnDC = 3,
Cancelled = 4,
};
pub const BackupInvalidStopReason = FhBackupStopReason.InvalidStopReason;
pub const BackupLimitUserBusyMachineOnAC = FhBackupStopReason.LimitUserBusyMachineOnAC;
pub const BackupLimitUserIdleMachineOnDC = FhBackupStopReason.LimitUserIdleMachineOnDC;
pub const BackupLimitUserBusyMachineOnDC = FhBackupStopReason.LimitUserBusyMachineOnDC;
pub const BackupCancelled = FhBackupStopReason.Cancelled;
//--------------------------------------------------------------------------------
// Section: Functions (7)
//--------------------------------------------------------------------------------
// TODO: this type is limited to platform 'windows8.0'
pub extern "fhsvcctl" fn FhServiceOpenPipe(
StartServiceIfStopped: BOOL,
Pipe: ?*FH_SERVICE_PIPE_HANDLE,
) callconv(@import("std").os.windows.WINAPI) HRESULT;
// TODO: this type is limited to platform 'windows8.0'
pub extern "fhsvcctl" fn FhServiceClosePipe(
Pipe: FH_SERVICE_PIPE_HANDLE,
) callconv(@import("std").os.windows.WINAPI) HRESULT;
// TODO: this type is limited to platform 'windows8.0'
pub extern "fhsvcctl" fn FhServiceStartBackup(
Pipe: FH_SERVICE_PIPE_HANDLE,
LowPriorityIo: BOOL,
) callconv(@import("std").os.windows.WINAPI) HRESULT;
// TODO: this type is limited to platform 'windows8.0'
pub extern "fhsvcctl" fn FhServiceStopBackup(
Pipe: FH_SERVICE_PIPE_HANDLE,
StopTracking: BOOL,
) callconv(@import("std").os.windows.WINAPI) HRESULT;
// TODO: this type is limited to platform 'windows8.0'
pub extern "fhsvcctl" fn FhServiceReloadConfiguration(
Pipe: FH_SERVICE_PIPE_HANDLE,
) callconv(@import("std").os.windows.WINAPI) HRESULT;
// TODO: this type is limited to platform 'windows8.0'
pub extern "fhsvcctl" fn FhServiceBlockBackup(
Pipe: FH_SERVICE_PIPE_HANDLE,
) callconv(@import("std").os.windows.WINAPI) HRESULT;
// TODO: this type is limited to platform 'windows8.0'
pub extern "fhsvcctl" fn FhServiceUnblockBackup(
Pipe: FH_SERVICE_PIPE_HANDLE,
) callconv(@import("std").os.windows.WINAPI) HRESULT;
//--------------------------------------------------------------------------------
// Section: Unicode Aliases (0)
//--------------------------------------------------------------------------------
const thismodule = @This();
pub usingnamespace switch (@import("../zig.zig").unicode_mode) {
.ansi => struct {
},
.wide => struct {
},
.unspecified => if (@import("builtin").is_test) struct {
} else struct {
},
};
//--------------------------------------------------------------------------------
// Section: Imports (7)
//--------------------------------------------------------------------------------
const Guid = @import("../zig.zig").Guid;
const BOOL = @import("../foundation.zig").BOOL;
const BSTR = @import("../foundation.zig").BSTR;
const FH_SERVICE_PIPE_HANDLE = @import("../system/windows_programming.zig").FH_SERVICE_PIPE_HANDLE;
const FILETIME = @import("../foundation.zig").FILETIME;
const HRESULT = @import("../foundation.zig").HRESULT;
const IUnknown = @import("../system/com.zig").IUnknown;
test {
@setEvalBranchQuota(
comptime @import("std").meta.declarations(@This()).len * 3
);
// reference all the pub declarations
if (!@import("builtin").is_test) return;
inline for (comptime @import("std").meta.declarations(@This())) |decl| {
_ = @field(@This(), decl.name);
}
}